@orchestrator-ui/orchestrator-ui-components 8.9.3 → 9.0.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.
Files changed (48) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/.turbo/turbo-test.log +17 -50
  4. package/CHANGELOG.md +19 -0
  5. package/dist/index.d.ts +2081 -2517
  6. package/dist/index.js +1247 -1579
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/WfoError/WfoError.tsx +2 -2
  10. package/src/components/WfoInlineNoteEdit/WfoSubscriptionDetailNoteEdit.tsx +4 -8
  11. package/src/components/WfoInlineNoteEdit/WfoSubscriptionNoteEdit.tsx +6 -7
  12. package/src/components/WfoPageTemplate/paths.ts +0 -1
  13. package/src/components/WfoSubscriptionsList/index.ts +1 -2
  14. package/src/components/WfoSubscriptionsList/subscriptionListItem.ts +14 -0
  15. package/src/components/WfoSubscriptionsList/subscriptionListTabs.ts +1 -20
  16. package/src/components/WfoSummary/WfoLatestActiveSubscriptionsSummaryCard.tsx +17 -13
  17. package/src/components/WfoSummary/WfoLatestOutOfSyncSubscriptionSummaryCard.tsx +28 -15
  18. package/src/components/WfoTable/WfoStructuredSearchTable/WfoFieldSelector.spec.tsx +0 -16
  19. package/src/components/WfoTable/WfoStructuredSearchTable/WfoFieldSelector.tsx +4 -10
  20. package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +9 -6
  21. package/src/components/WfoTable/WfoStructuredSearchTable/WfoRestoreLoop.spec.tsx +2 -2
  22. package/src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx +3 -5
  23. package/src/components/WfoTable/WfoStructuredSearchTable/useSearchWithDebouncedCallback.spec.tsx +56 -3
  24. package/src/components/WfoTable/WfoStructuredSearchTable/utils.spec.ts +60 -1
  25. package/src/components/WfoTable/WfoStructuredSearchTable/utils.ts +27 -3
  26. package/src/configuration/version.ts +1 -1
  27. package/src/messages/en-GB.json +1 -1
  28. package/src/messages/nl-NL.json +1 -1
  29. package/src/pages/index.ts +0 -1
  30. package/src/pages/startPage/index.ts +1 -0
  31. package/src/pages/startPage/mappers.ts +15 -8
  32. package/src/pages/startPage/queryVariables.ts +0 -29
  33. package/src/pages/startPage/searchPayloads.ts +22 -0
  34. package/src/pages/subscriptions/WfoSubscriptionsListPage.tsx +511 -39
  35. package/src/rtk/endpoints/index.ts +0 -1
  36. package/src/rtk/endpoints/search.ts +3 -0
  37. package/src/rtk/endpoints/subscriptionListMutation.spec.ts +80 -0
  38. package/src/rtk/endpoints/subscriptionListMutation.ts +71 -52
  39. package/src/rtk/utils.spec.ts +30 -1
  40. package/src/rtk/utils.ts +2 -1
  41. package/src/types/search.ts +0 -1
  42. package/src/types/types.ts +0 -2
  43. package/src/utils/getDefaultTableConfig.ts +1 -6
  44. package/src/utils/getQueryParams.ts +1 -0
  45. package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +0 -243
  46. package/src/components/WfoSubscriptionsList/subscriptionResultMappers.ts +0 -49
  47. package/src/pages/WfoSearchPocPage.tsx +0 -575
  48. package/src/rtk/endpoints/subscriptionListSummary.ts +0 -66
package/dist/index.js CHANGED
@@ -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.9.3";
64
+ var ORCHESTRATOR_UI_LIBRARY_VERSION = "9.0.0";
65
65
 
66
66
  // src/types/types.ts
67
67
  var EngineStatus = /* @__PURE__ */ ((EngineStatus2) => {
@@ -202,19 +202,19 @@ var Intervals = /* @__PURE__ */ ((Intervals2) => {
202
202
  })(Intervals || {});
203
203
 
204
204
  // src/types/search.ts
205
- var EntityKind = /* @__PURE__ */ ((EntityKind5) => {
206
- EntityKind5["SUBSCRIPTION"] = "SUBSCRIPTION";
207
- EntityKind5["PRODUCT"] = "PRODUCT";
208
- EntityKind5["WORKFLOW"] = "WORKFLOW";
209
- EntityKind5["PROCESS"] = "PROCESS";
210
- return EntityKind5;
205
+ var EntityKind = /* @__PURE__ */ ((EntityKind6) => {
206
+ EntityKind6["SUBSCRIPTION"] = "SUBSCRIPTION";
207
+ EntityKind6["PRODUCT"] = "PRODUCT";
208
+ EntityKind6["WORKFLOW"] = "WORKFLOW";
209
+ EntityKind6["PROCESS"] = "PROCESS";
210
+ return EntityKind6;
211
211
  })(EntityKind || {});
212
- var RetrieverType = /* @__PURE__ */ ((RetrieverType3) => {
213
- RetrieverType3["Auto"] = "auto";
214
- RetrieverType3["Fuzzy"] = "fuzzy";
215
- RetrieverType3["Semantic"] = "semantic";
216
- RetrieverType3["Hybrid"] = "hybrid";
217
- return RetrieverType3;
212
+ var RetrieverType = /* @__PURE__ */ ((RetrieverType4) => {
213
+ RetrieverType4["Auto"] = "auto";
214
+ RetrieverType4["Fuzzy"] = "fuzzy";
215
+ RetrieverType4["Semantic"] = "semantic";
216
+ RetrieverType4["Hybrid"] = "hybrid";
217
+ return RetrieverType4;
218
218
  })(RetrieverType || {});
219
219
  var VisualizationType = /* @__PURE__ */ ((VisualizationType2) => {
220
220
  VisualizationType2["PIE"] = "pie";
@@ -274,10 +274,11 @@ var mapRtkErrorToWfoError = (error) => {
274
274
  };
275
275
  });
276
276
  } else if (error && "status" in error && error.status !== void 0) {
277
+ const detail = isRecord(error.data) && typeof error.data.detail === "string" ? error.data.detail : void 0;
277
278
  return [
278
279
  {
279
280
  extensions: {},
280
- message: String(error.status)
281
+ message: detail || String(error.status)
281
282
  }
282
283
  ];
283
284
  } else if (isSerializedError(error)) {
@@ -1141,12 +1142,7 @@ var getDefaultTableConfig = (storageKey) => {
1141
1142
  return getTableConfig(completedTasksColumns);
1142
1143
  }
1143
1144
  case SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY: {
1144
- const subscriptionColumns = [
1145
- "productName",
1146
- "customerId",
1147
- "customerFullname",
1148
- "metadata"
1149
- ];
1145
+ const subscriptionColumns = ["productName", "customerFullname", "metadata"];
1150
1146
  return getTableConfig(subscriptionColumns);
1151
1147
  }
1152
1148
  default:
@@ -1350,6 +1346,7 @@ var WfoQueryParams = /* @__PURE__ */ ((WfoQueryParams2) => {
1350
1346
  WfoQueryParams2["SORT_BY"] = "sortBy";
1351
1347
  WfoQueryParams2["FILTER_BY"] = "filterBy";
1352
1348
  WfoQueryParams2["QUERY_STRING"] = "queryString";
1349
+ WfoQueryParams2["FILTER_STRING"] = "filterString";
1353
1350
  return WfoQueryParams2;
1354
1351
  })(WfoQueryParams || {});
1355
1352
  var getUrlWithQueryParams = (url, params) => {
@@ -2784,56 +2781,6 @@ var subscriptionListApi = orchestratorApi.injectEndpoints({
2784
2781
  });
2785
2782
  var { useGetSubscriptionListQuery, useLazyGetSubscriptionListQuery } = subscriptionListApi;
2786
2783
 
2787
- // src/rtk/endpoints/subscriptionListSummary.ts
2788
- var subscriptionListSummaryQuery = `
2789
- query SubscriptionsList(
2790
- $first: Int!
2791
- $after: Int!
2792
- $sortBy: [GraphqlSort!]
2793
- $filterBy: [GraphqlFilter!]
2794
- $query: String
2795
- ) {
2796
- subscriptions(
2797
- first: $first
2798
- after: $after
2799
- sortBy: $sortBy
2800
- filterBy: $filterBy
2801
- query: $query
2802
- ) {
2803
- page {
2804
- startDate
2805
- description
2806
- subscriptionId
2807
- }
2808
- pageInfo {
2809
- totalItems
2810
- startCursor
2811
- endCursor
2812
- }
2813
- }
2814
- }
2815
- `;
2816
- var subscriptionListSummaryApi = orchestratorApi.injectEndpoints({
2817
- endpoints: (builder) => ({
2818
- getSubscriptionSummaryList: builder.query({
2819
- query: (variables) => ({
2820
- document: subscriptionListSummaryQuery,
2821
- variables
2822
- }),
2823
- transformResponse: (response) => {
2824
- const subscriptions = response.subscriptions.page || [];
2825
- const pageInfo = response.subscriptions.pageInfo || {};
2826
- return {
2827
- subscriptions,
2828
- pageInfo
2829
- };
2830
- },
2831
- providesTags: getCacheTag("subscriptions" /* subscriptions */)
2832
- })
2833
- })
2834
- });
2835
- var { useGetSubscriptionSummaryListQuery } = subscriptionListSummaryApi;
2836
-
2837
2784
  // src/rtk/endpoints/forms.ts
2838
2785
  var PROCESS_ENDPOINT = "processes";
2839
2786
  var RESUME_ENDPOINT = "resume";
@@ -3100,7 +3047,8 @@ var searchApi = orchestratorApi.injectEndpoints({
3100
3047
  forceRefetch: ({ currentArg, previousArg }) => currentArg?.cursor !== previousArg?.cursor,
3101
3048
  extraOptions: {
3102
3049
  baseQueryType: "fetch" /* fetch */
3103
- }
3050
+ },
3051
+ providesTags: getCacheTag("subscriptions" /* subscriptions */)
3104
3052
  }),
3105
3053
  searchWithPagination: build.mutation({
3106
3054
  query: ({ cursor, entity_type, query, filters, limit, retriever }) => ({
@@ -3275,6 +3223,11 @@ var getOrchestratorCoreVersionIfNotCompatible = (orchestratorUiVersion, orchestr
3275
3223
 
3276
3224
  // ../../version-compatibility.json
3277
3225
  var version_compatibility_default = [
3226
+ {
3227
+ orchestratorUiVersion: "9.0.0",
3228
+ minimumOrchestratorCoreVersion: "5.4.0",
3229
+ changes: "Adds new structured search endpoints to the BE."
3230
+ },
3278
3231
  {
3279
3232
  orchestratorUiVersion: "7.8.0",
3280
3233
  minimumOrchestratorCoreVersion: "5.0.0",
@@ -4898,7 +4851,6 @@ var PATH_START_NEW_WORKFLOW = "/workflows/new";
4898
4851
  var PATH_START_NEW_TASK = "/tasks/new";
4899
4852
  var PATH_WORKFLOWS = "/workflows";
4900
4853
  var PATH_SUBSCRIPTIONS = "/subscriptions";
4901
- var PATH_SUBSCRIPTIONS_BETA = "/beta-subscriptions";
4902
4854
  var PATH_METADATA = "/metadata";
4903
4855
  var PATH_METADATA_PRODUCTS = "/metadata/products";
4904
4856
  var PATH_METADATA_PRODUCT_BLOCKS = "/metadata/productblocks";
@@ -7406,7 +7358,7 @@ var WfoError = () => {
7406
7358
  const t = useTranslations15("common");
7407
7359
  const { theme } = useOrchestratorTheme();
7408
7360
  return /* @__PURE__ */ jsxs50(EuiFlexGroup3, { direction: "row", alignItems: "center", gutterSize: "s", children: [
7409
- /* @__PURE__ */ jsx106(WfoXCircleFill, { color: theme.colors.danger }),
7361
+ /* @__PURE__ */ jsx106(WfoXCircleFill, { color: theme.colors.danger, width: 32, height: 32 }),
7410
7362
  /* @__PURE__ */ jsx106("h1", { children: t("errorMessage") })
7411
7363
  ] });
7412
7364
  };
@@ -7415,7 +7367,7 @@ var WfoErrorWithMessage = ({ error }) => {
7415
7367
  const { theme } = useOrchestratorTheme();
7416
7368
  const message = error && error.length > 0 ? error.map((err) => err.message).join(", ") : t("unknownError");
7417
7369
  return /* @__PURE__ */ jsx106(Fragment9, { children: /* @__PURE__ */ jsxs50(EuiFlexGroup3, { direction: "row", alignItems: "center", gutterSize: "s", children: [
7418
- /* @__PURE__ */ jsx106(WfoXCircleFill, { color: theme.colors.danger }),
7370
+ /* @__PURE__ */ jsx106(WfoXCircleFill, { color: theme.colors.danger, width: 32, height: 32 }),
7419
7371
  /* @__PURE__ */ jsxs50(EuiText5, { color: theme.colors.textDanger, children: [
7420
7372
  t("errorMessage"),
7421
7373
  " (",
@@ -12480,7 +12432,7 @@ var focusValueEditorAfterRender = (searchInput) => {
12480
12432
  };
12481
12433
  var WfoFieldSelector = ({ handleOnChange, disabled, rule, context }) => {
12482
12434
  const { field } = rule;
12483
- const { useAdvancedNestedSearch, prefilledFieldOptions: prefilledFieldOptions2, onFieldSelected } = context;
12435
+ const { useAdvancedNestedSearch, onFieldSelected } = context;
12484
12436
  const [autoFocus] = useState33(field === defaultPlaceholderFieldName);
12485
12437
  const selectedField = field === defaultPlaceholderFieldName ? "" : field;
12486
12438
  const [searchTerm, setSearchTerm] = useState33("");
@@ -12505,16 +12457,12 @@ var WfoFieldSelector = ({ handleOnChange, disabled, rule, context }) => {
12505
12457
  loading: isLoading,
12506
12458
  error: errorMessage
12507
12459
  } = usePathAutocomplete(autocompletePrefix, "SUBSCRIPTION" /* SUBSCRIPTION */);
12508
- const matchesPrefix = (path) => path.toLowerCase().includes(autocompletePrefix.toLowerCase());
12509
- const prefilledFields = Array.from(prefilledFieldOptions2.keys()).filter(matchesPrefix);
12510
- const autocompleteOptions = getOptionsFromPathInfo(paths).filter(
12511
- (option) => !prefilledFields.includes(option.value ?? "")
12512
- );
12460
+ const autocompleteOptions = getOptionsFromPathInfo(paths);
12513
12461
  const startTypingHintOption = {
12514
12462
  label: t("startTypingToLoadOptions"),
12515
12463
  disabled: true
12516
12464
  };
12517
- const options = autocompletePrefix ? [...prefilledFields.map(getOption), ...autocompleteOptions] : [startTypingHintOption];
12465
+ const options = autocompletePrefix ? autocompleteOptions : [startTypingHintOption];
12518
12466
  const renderHintOption = (option) => /* @__PURE__ */ jsx183(EuiText18, { size: "xs", color: "default", children: option.label });
12519
12467
  const normalizedSearchTerm = trimmedSearchTerm.toLowerCase();
12520
12468
  const hasListedOptions = autocompletePrefix !== "" && options.some(
@@ -12528,7 +12476,7 @@ var WfoFieldSelector = ({ handleOnChange, disabled, rule, context }) => {
12528
12476
  );
12529
12477
  const storeFieldOperators = (selectedValue) => {
12530
12478
  const matchingPath = paths.find((path) => path.path === selectedValue) ?? paths.find((path) => path.availablePaths?.includes(selectedValue));
12531
- const operators = matchingPath?.operators ?? prefilledFieldOptions2.get(selectedValue) ?? [];
12479
+ const operators = matchingPath?.operators ?? [];
12532
12480
  onFieldSelected(selectedValue, operators, matchingPath);
12533
12481
  };
12534
12482
  const handleFieldSelection = (selectedOptions) => {
@@ -12967,6 +12915,7 @@ var FILTER_CHANGE_DEBOUNCE_DELAY = 1e3;
12967
12915
  var useSearchWithDebouncedCallback = ({
12968
12916
  filterString,
12969
12917
  isValidFilterString,
12918
+ hasEmptyRuleValue = false,
12970
12919
  searchCallback
12971
12920
  }) => {
12972
12921
  const {
@@ -12984,12 +12933,12 @@ var useSearchWithDebouncedCallback = ({
12984
12933
  const hasFilterStringChanged = filterString !== lastFilterStringRef.current;
12985
12934
  lastFilterStringRef.current = filterString;
12986
12935
  if (!hasFilterStringChanged) return;
12987
- if (isValidFilterString) {
12936
+ if (isValidFilterString && !hasEmptyRuleValue) {
12988
12937
  triggerSearch(FILTER_CHANGE_DEBOUNCE_DELAY);
12989
12938
  } else {
12990
12939
  cancelSearch();
12991
12940
  }
12992
- }, [filterString, isValidFilterString, triggerSearch, cancelSearch]);
12941
+ }, [filterString, isValidFilterString, hasEmptyRuleValue, triggerSearch, cancelSearch]);
12993
12942
  const handleSubmitSearchOnEnter = (event) => {
12994
12943
  if (event.key !== "Enter" || event.shiftKey) return;
12995
12944
  event.preventDefault();
@@ -13062,6 +13011,24 @@ var SEARCH_OPERATOR_TO_RQB_OPERATOR_MAP = {
13062
13011
  not_has_component: "null"
13063
13012
  };
13064
13013
  var RQB_UNARY_OPERATORS = ["null", "notNull"];
13014
+ var isEmptyValue = (rule) => {
13015
+ const { value } = rule;
13016
+ if (RQB_UNARY_OPERATORS.includes(rule.operator)) {
13017
+ return false;
13018
+ } else if (typeof value !== "string") {
13019
+ return value === void 0 || value === null;
13020
+ } else if (rule.operator === "between") {
13021
+ const rangeParts = value.split(",");
13022
+ return rangeParts.length < 2 || rangeParts.some((rangePart) => rangePart.trim() === "");
13023
+ }
13024
+ return value.trim() === "";
13025
+ };
13026
+ var hasNestedRuleWithEmptyValue = (ruleGroup) => !!ruleGroup?.rules.some((rule) => {
13027
+ if (typeof rule === "string") {
13028
+ return false;
13029
+ }
13030
+ return "rules" in rule ? hasNestedRuleWithEmptyValue(rule) : isEmptyValue(rule);
13031
+ });
13065
13032
  var OPERATOR_MAP2 = {
13066
13033
  eq: { symbol: "=", description: "equals" },
13067
13034
  neq: { symbol: "\u2260", description: "not equals" },
@@ -13106,19 +13073,20 @@ var WfoFilterBuilder = ({
13106
13073
  queryBuilderRuleGroup = initialRuleGroup,
13107
13074
  onUpdateQueryBuilder,
13108
13075
  handleSearch,
13109
- prefilledFieldOptions: prefilledFieldOptions2,
13110
13076
  onToggleFilterBuilder,
13111
- useAdvancedNestedSearch = true
13077
+ useAdvancedNestedSearch = true,
13078
+ error
13112
13079
  }) => {
13113
13080
  const t = useTranslations48("common");
13114
13081
  const { queryBuilderContainerStyles } = useWithOrchestratorTheme(getWfoStructuredSearchTableStyles);
13115
- const [fieldToOperatorMap, setFieldToOperatorMap] = useState36(prefilledFieldOptions2);
13082
+ const [fieldToOperatorMap, setFieldToOperatorMap] = useState36(/* @__PURE__ */ new Map());
13116
13083
  const [fieldPathInfoMap, setFieldPathInfoMap] = useState36(/* @__PURE__ */ new Map());
13117
13084
  const latestRuleGroupRef = useRef16(queryBuilderRuleGroup);
13118
13085
  latestRuleGroupRef.current = queryBuilderRuleGroup;
13119
13086
  const { handleSubmitSearchOnClick, pendingSearchRun, handleSubmitSearchOnEnter } = useSearchWithDebouncedCallback({
13120
13087
  filterString,
13121
13088
  isValidFilterString,
13089
+ hasEmptyRuleValue: hasNestedRuleWithEmptyValue(queryBuilderRuleGroup),
13122
13090
  searchCallback: () => handleSearch({ ruleGroup: latestRuleGroupRef.current })
13123
13091
  });
13124
13092
  const handleFieldSelected = (field, operators, pathInfo) => {
@@ -13140,7 +13108,6 @@ var WfoFilterBuilder = ({
13140
13108
  const resolvedFieldsPathInfo = useFieldsPathInfo(unresolvedFields, "SUBSCRIPTION" /* SUBSCRIPTION */);
13141
13109
  const queryBuilderContext = {
13142
13110
  onFieldSelected: handleFieldSelected,
13143
- prefilledFieldOptions: prefilledFieldOptions2,
13144
13111
  fieldPathInfoMap,
13145
13112
  useAdvancedNestedSearch
13146
13113
  };
@@ -13204,7 +13171,7 @@ var WfoFilterBuilder = ({
13204
13171
  isInvalid: !isValidFilterString
13205
13172
  }
13206
13173
  ) }),
13207
- /* @__PURE__ */ jsxs99(EuiFlexGroup21, { direction: "rowReverse", alignItems: "center", children: [
13174
+ /* @__PURE__ */ jsxs99(EuiFlexGroup21, { direction: "rowReverse", alignItems: "center", gutterSize: "l", children: [
13208
13175
  /* @__PURE__ */ jsx194(
13209
13176
  WfoApplyFilterButton,
13210
13177
  {
@@ -13223,7 +13190,8 @@ var WfoFilterBuilder = ({
13223
13190
  onToggleFilterBuilder(false);
13224
13191
  }
13225
13192
  }
13226
- )
13193
+ ),
13194
+ /* @__PURE__ */ jsx194(EuiFlexItem21, { children: error && /* @__PURE__ */ jsx194(WfoErrorWithMessage, { error }) })
13227
13195
  ] })
13228
13196
  ] }) });
13229
13197
  };
@@ -13356,7 +13324,6 @@ var WfoStructuredSearchTable = ({
13356
13324
  hasNextPage,
13357
13325
  data,
13358
13326
  isLoading,
13359
- prefilledFieldOptions: prefilledFieldOptions2,
13360
13327
  ...tableProps
13361
13328
  }) => {
13362
13329
  const { theme } = useOrchestratorTheme();
@@ -13485,12 +13452,12 @@ var WfoStructuredSearchTable = ({
13485
13452
  onUpdateQueryBuilder,
13486
13453
  handleSearch,
13487
13454
  onToggleFilterBuilder: setIsFilterBuilderVisible,
13488
- prefilledFieldOptions: prefilledFieldOptions2,
13489
- useAdvancedNestedSearch: advancedNestedSearch
13455
+ useAdvancedNestedSearch: advancedNestedSearch,
13456
+ error
13490
13457
  }
13491
13458
  )
13492
13459
  ] }),
13493
- error && /* @__PURE__ */ jsx197(WfoErrorWithMessage, { error }),
13460
+ error && !isFilterBuilderVisible && /* @__PURE__ */ jsx197(WfoErrorWithMessage, { error }),
13494
13461
  /* @__PURE__ */ jsx197(EuiSpacer19, { size: "m" }),
13495
13462
  /* @__PURE__ */ jsx197(
13496
13463
  WfoTable,
@@ -13971,7 +13938,7 @@ var WfoDropdownButton = ({ label, isDisabled = false, children }) => {
13971
13938
  };
13972
13939
 
13973
13940
  // src/components/WfoProcessList/WfoProcessesList.tsx
13974
- import { useTranslations as useTranslations82 } from "next-intl";
13941
+ import { useTranslations as useTranslations81 } from "next-intl";
13975
13942
  import Link14 from "next/link";
13976
13943
  import { useRouter as useRouter17 } from "next/router";
13977
13944
 
@@ -17187,17 +17154,34 @@ var WfoStartPage = () => {
17187
17154
  ] });
17188
17155
  };
17189
17156
 
17157
+ // src/pages/startPage/searchPayloads.ts
17158
+ var SUBSCRIPTION_ID_COLUMN = "subscription.subscription_id";
17159
+ var SUBSCRIPTION_DESCRIPTION_COLUMN = "subscription.description";
17160
+ var SUBSCRIPTION_START_DATE_COLUMN = "subscription.start_date";
17161
+ var SUMMARY_CARD_ITEM_COUNT = 5;
17162
+ var getSubscriptionSummarySearchPayload = (filters) => ({
17163
+ entity_type: "SUBSCRIPTION" /* SUBSCRIPTION */,
17164
+ query: "",
17165
+ filters,
17166
+ limit: SUMMARY_CARD_ITEM_COUNT,
17167
+ order_by: { element: SUBSCRIPTION_START_DATE_COLUMN, direction: "desc" },
17168
+ response_columns: [SUBSCRIPTION_ID_COLUMN, SUBSCRIPTION_DESCRIPTION_COLUMN, SUBSCRIPTION_START_DATE_COLUMN]
17169
+ });
17170
+
17190
17171
  // src/pages/startPage/mappers.ts
17191
17172
  var mapProcessSummaryToSummaryCardListItem = (processSummary) => ({
17192
17173
  title: processSummary.workflowName,
17193
17174
  value: formatDate(processSummary?.startedAt),
17194
17175
  url: `${PATH_WORKFLOWS}/${processSummary.processId}`
17195
17176
  });
17196
- var mapSubscriptionSummaryToSummaryCardListItem = (subscription) => ({
17197
- title: subscription.description,
17198
- value: formatDate(subscription.startDate),
17199
- url: `${PATH_SUBSCRIPTIONS}/${subscription.subscriptionId}`
17200
- });
17177
+ var mapSubscriptionSearchResultToSummaryCardListItem = (result) => {
17178
+ const { response_columns } = result;
17179
+ return {
17180
+ title: String(response_columns[SUBSCRIPTION_DESCRIPTION_COLUMN] ?? ""),
17181
+ value: formatDate(response_columns[SUBSCRIPTION_START_DATE_COLUMN]),
17182
+ url: `${PATH_SUBSCRIPTIONS}/${response_columns[SUBSCRIPTION_ID_COLUMN]}`
17183
+ };
17184
+ };
17201
17185
 
17202
17186
  // src/pages/subscriptions/WfoSubscriptionDetailPage.tsx
17203
17187
  import { useRouter as useRouter14 } from "next/router";
@@ -17209,538 +17193,157 @@ var WfoSubscriptionDetailPage = () => {
17209
17193
  };
17210
17194
 
17211
17195
  // src/pages/subscriptions/WfoSubscriptionsListPage.tsx
17212
- import { useEffect as useEffect38, useState as useState52 } from "react";
17196
+ import { useCallback as useCallback15, useEffect as useEffect38, useMemo as useMemo14, useRef as useRef20, useState as useState52 } from "react";
17197
+ import { formatQuery as formatQuery2 } from "react-querybuilder/formatQuery";
17213
17198
  import { useTranslations as useTranslations77 } from "next-intl";
17199
+ import Link12 from "next/link";
17214
17200
  import { StringParam as StringParam4, useQueryParam as useQueryParam3, withDefault as withDefault4 } from "use-query-params";
17215
17201
  import { EuiSpacer as EuiSpacer26 } from "@elastic/eui";
17216
17202
  import { Fragment as Fragment60, jsx as jsx243, jsxs as jsxs128 } from "@emotion/react/jsx-runtime";
17203
+ var getKeyByValueFromMap = (resultColumToPropertyMap2, field) => {
17204
+ return [...resultColumToPropertyMap2.entries()].find(([, v]) => v === field)?.[0] || "";
17205
+ };
17206
+ var getDataFromResponse = (data, resultColumToPropertyMap2, uniqueRowId, selectedTab) => {
17207
+ const searchResult = data?.data;
17208
+ if (!searchResult)
17209
+ return {
17210
+ items: []
17211
+ };
17212
+ const responseColumns = searchResult.map(({ response_columns }) => response_columns) || [];
17213
+ const rowExpandingConfiguration = {
17214
+ uniqueRowId,
17215
+ uniqueRowIdToExpandedRowMap: searchResult.reduce(
17216
+ (rowMap, { response_columns, score, perfect_match, matching_fields }) => {
17217
+ const idColumnInResponseColumn = getKeyByValueFromMap(resultColumToPropertyMap2, uniqueRowId);
17218
+ const rowId = response_columns[idColumnInResponseColumn];
17219
+ if (rowId) {
17220
+ rowMap[rowId] = /* @__PURE__ */ jsx243(
17221
+ WfoExpandingSearchRow,
17222
+ {
17223
+ score,
17224
+ matchingFields: removeTabStatusMatchingFields(matching_fields, selectedTab, "SUBSCRIPTION" /* SUBSCRIPTION */),
17225
+ perfectMatch: perfect_match
17226
+ }
17227
+ );
17228
+ }
17229
+ return rowMap;
17230
+ },
17231
+ {}
17232
+ )
17233
+ };
17234
+ const items = responseColumns.map((responseColumn) => {
17235
+ const item = Object.entries(responseColumn).reduce((acc, [key, value]) => {
17236
+ const itemKey = resultColumToPropertyMap2.get(key);
17237
+ if (itemKey) {
17238
+ acc[itemKey] = value;
17239
+ }
17240
+ return acc;
17241
+ }, {});
17242
+ return item;
17243
+ });
17244
+ return {
17245
+ items,
17246
+ rowExpandingConfiguration
17247
+ };
17248
+ };
17249
+ var getTotalItemsFromResponse = (data) => {
17250
+ return data?.cursor?.total_items || false;
17251
+ };
17252
+ var resultColumToPropertyMap = /* @__PURE__ */ new Map([
17253
+ ["subscription.subscription_id", "subscriptionId"],
17254
+ ["subscription.description", "description"],
17255
+ ["subscription.status", "status"],
17256
+ ["subscription.insync", "insync"],
17257
+ ["subscription.product.name", "productName"],
17258
+ ["subscription.product.tag", "tag"],
17259
+ ["subscription.customer_name", "customerFullname"],
17260
+ ["subscription.customer_abbreviation", "customerShortcode"],
17261
+ ["subscription.start_date", "startDate"],
17262
+ ["subscription.end_date", "endDate"],
17263
+ ["subscription.note", "note"],
17264
+ ["subscription.metadata", "metadata"]
17265
+ ]);
17217
17266
  var WfoSubscriptionsListPage = () => {
17218
- const t = useTranslations77("subscriptions.detail");
17219
- const [tableDefaults, setTableDefaults] = useState52();
17267
+ const t = useTranslations77("subscriptions.index");
17268
+ const tDetail = useTranslations77("subscriptions.detail");
17269
+ const [activeTab, setActiveTab] = useQueryParam3("activeTab", withDefault4(StringParam4, "ACTIVE" /* ACTIVE */));
17270
+ const selectedTab = subscriptionListTabs.find(({ id }) => id === activeTab)?.id ?? "ACTIVE" /* ACTIVE */;
17220
17271
  const getStoredTableConfig = useStoredTableConfig(SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY);
17272
+ const [retrieverType, setRetrieverType] = useState52("auto" /* Auto */);
17273
+ const [queryString, setQueryString] = useState52("");
17274
+ const [committedQueryString, setCommittedQueryString] = useQueryParam3("queryString", withDefault4(StringParam4, ""));
17275
+ const [committedFilterString, setCommittedFilterString] = useQueryParam3("filterString", withDefault4(StringParam4, ""));
17276
+ const lastSelfCommittedFilter = useRef20("");
17277
+ const commitFilterString = (celString) => {
17278
+ lastSelfCommittedFilter.current = celString;
17279
+ setCommittedFilterString(celString || void 0);
17280
+ };
17281
+ const lastSelfCommittedQueryString = useRef20("");
17282
+ const commitQueryString = (queryString2) => {
17283
+ lastSelfCommittedQueryString.current = queryString2;
17284
+ setCommittedQueryString(queryString2 || void 0);
17285
+ };
17286
+ const [filterString, setFilterString] = useState52("");
17287
+ const [queryBuilderRuleGroup, setQueryBuilderRuleGroup] = useState52();
17288
+ const committedRuleGroup = useMemo14(
17289
+ () => parseCelToRuleGroup(committedFilterString),
17290
+ [committedFilterString]
17291
+ );
17292
+ const [isValidFilterString, setIsValidFilterString] = useState52(true);
17293
+ const [isCommitRefused, setIsCommitRefused] = useState52(false);
17294
+ const [tableDefaults, setTableDefaults] = useState52();
17295
+ const [pageSize, setPageSize] = useState52(DEFAULT_PAGE_SIZE);
17296
+ const [pageCursor, setPageCursor] = useState52(void 0);
17297
+ const [dataSorting, setDataSorting] = useState52({
17298
+ field: "startDate",
17299
+ sortOrder: "DESC" /* DESC */
17300
+ });
17301
+ const committedSearchKey = JSON.stringify([
17302
+ committedQueryString,
17303
+ committedFilterString,
17304
+ selectedTab,
17305
+ retrieverType,
17306
+ dataSorting
17307
+ ]);
17308
+ const cursor = pageCursor?.searchKey === committedSearchKey ? pageCursor.cursor : void 0;
17309
+ const searchPayload = useMemo14(() => {
17310
+ const filters = addStatusFilterFromTab(committedRuleGroup, selectedTab);
17311
+ const order_by = {
17312
+ element: getKeyByValueFromMap(resultColumToPropertyMap, dataSorting.field),
17313
+ direction: dataSorting.sortOrder.toLowerCase()
17314
+ };
17315
+ return {
17316
+ query: committedQueryString,
17317
+ limit: pageSize,
17318
+ entity_type: "SUBSCRIPTION" /* SUBSCRIPTION */,
17319
+ response_columns: Array.from(resultColumToPropertyMap.keys()),
17320
+ order_by,
17321
+ ...retrieverType !== "auto" /* Auto */ && { retriever: retrieverType },
17322
+ ...filters && { filters },
17323
+ ...cursor && { cursor }
17324
+ };
17325
+ }, [committedQueryString, committedRuleGroup, selectedTab, retrieverType, pageSize, dataSorting, cursor]);
17326
+ const { data, error, isFetching, endpointName } = useSearchQuery(searchPayload);
17327
+ const [getSubscriptionListTrigger] = useLazySearchQuery();
17328
+ const getSubscriptionListForExport = (exportLimit) => getSubscriptionListTrigger({ ...searchPayload, limit: exportLimit, cursor: void 0 }).unwrap();
17221
17329
  useEffect38(() => {
17222
17330
  const storedConfig = getStoredTableConfig();
17223
17331
  if (storedConfig) {
17224
17332
  setTableDefaults(storedConfig);
17225
- }
17226
- }, [getStoredTableConfig]);
17227
- const { dataDisplayParams, setDataDisplayParam } = useDataDisplayParams({
17228
- // TODO: Improvement: A default pageSize value is set to avoid a graphql error when the query is executed
17229
- // the fist time before the useEffect has populated the tableDefaults. Better is to create a way for
17230
- // the query to wait for the values to be available
17231
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/261
17232
- pageSize: tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE,
17233
- sortBy: {
17234
- field: "startDate",
17235
- order: "DESC" /* DESC */
17236
- }
17237
- });
17238
- const [activeTab, setActiveTab] = useQueryParam3("activeTab", withDefault4(StringParam4, "ACTIVE" /* ACTIVE */));
17239
- const selectedTab = (() => {
17240
- return subscriptionListTabs.find(({ id }) => id === activeTab)?.id || "ACTIVE" /* ACTIVE */;
17241
- })();
17242
- const handleChangeSubscriptionsTab = (updatedSubscriptionsTab) => {
17243
- setActiveTab(updatedSubscriptionsTab);
17244
- setDataDisplayParam("pageIndex", 0);
17245
- };
17246
- const alwaysOnFilters = subscriptionListTabs.find(({ id }) => id === activeTab)?.alwaysOnFilters;
17247
- return /* @__PURE__ */ jsxs128(Fragment60, { children: [
17248
- /* @__PURE__ */ jsx243(WfoContentHeader, { title: /* @__PURE__ */ jsx243(WfoTitleWithWebsocketBadge, { title: t("title") }) }),
17249
- /* @__PURE__ */ jsx243(
17250
- WfoFilterTabs,
17251
- {
17252
- tabs: subscriptionListTabs,
17253
- selectedTab,
17254
- translationNamespace: "subscriptions.tabs",
17255
- onChangeTab: handleChangeSubscriptionsTab
17256
- }
17257
- ),
17258
- /* @__PURE__ */ jsx243(EuiSpacer26, { size: "xxl" }),
17259
- /* @__PURE__ */ jsx243(
17260
- WfoSubscriptionsList,
17261
- {
17262
- hiddenColumns: tableDefaults?.hiddenColumns,
17263
- dataDisplayParams,
17264
- setDataDisplayParam,
17265
- alwaysOnFilters
17266
- }
17267
- )
17268
- ] });
17269
- };
17270
-
17271
- // src/pages/tasks/WfoTasksListPage.tsx
17272
- import { useContext as useContext10, useEffect as useEffect39, useState as useState53 } from "react";
17273
- import { useTranslations as useTranslations78 } from "next-intl";
17274
- import Link12 from "next/link";
17275
- import { useRouter as useRouter15 } from "next/router";
17276
- import { StringParam as StringParam5, useQueryParam as useQueryParam4, withDefault as withDefault5 } from "use-query-params";
17277
- import { EuiButton as EuiButton18, EuiSpacer as EuiSpacer27 } from "@elastic/eui";
17278
-
17279
- // src/pages/tasks/tabConfig.ts
17280
- var WfoTasksListTabType = /* @__PURE__ */ ((WfoTasksListTabType2) => {
17281
- WfoTasksListTabType2["ACTIVE"] = "ACTIVE";
17282
- WfoTasksListTabType2["COMPLETED"] = "COMPLETED";
17283
- return WfoTasksListTabType2;
17284
- })(WfoTasksListTabType || {});
17285
- var defaultTasksListTabs = [
17286
- {
17287
- id: "ACTIVE" /* ACTIVE */,
17288
- translationKey: "active",
17289
- alwaysOnFilters: [
17290
- {
17291
- // Todo: isTask is not a key of Process
17292
- // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17293
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17294
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17295
- // @ts-ignore waiting for fix in backend
17296
- field: "isTask",
17297
- value: "true"
17298
- },
17299
- {
17300
- field: "lastStatus",
17301
- value: "created-running-suspended-waiting-failed-resumed-inconsistent_data-api_unavailable-awaiting_callback"
17302
- }
17303
- ]
17304
- },
17305
- {
17306
- id: "COMPLETED" /* COMPLETED */,
17307
- translationKey: "completed",
17308
- alwaysOnFilters: [
17309
- {
17310
- // Todo: isTask is not a key of Process
17311
- // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17312
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17313
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17314
- // @ts-ignore waiting for fix in backend
17315
- field: "isTask",
17316
- value: "true"
17317
- },
17318
- {
17319
- field: "lastStatus",
17320
- value: "completed-aborted"
17321
- }
17322
- ]
17323
- }
17324
- ];
17325
-
17326
- // src/pages/tasks/getTasksListTabTypeFromString.ts
17327
- var getTasksListTabTypeFromString = (tabId) => {
17328
- if (!tabId) {
17329
- return void 0;
17330
- }
17331
- switch (tabId.toUpperCase()) {
17332
- case "ACTIVE" /* ACTIVE */.toString():
17333
- return "ACTIVE" /* ACTIVE */;
17334
- case "COMPLETED" /* COMPLETED */.toString():
17335
- return "COMPLETED" /* COMPLETED */;
17336
- default:
17337
- return void 0;
17338
- }
17339
- };
17340
-
17341
- // src/pages/tasks/WfoTasksListPage.tsx
17342
- import { Fragment as Fragment61, jsx as jsx244, jsxs as jsxs129 } from "@emotion/react/jsx-runtime";
17343
- var WfoTasksListPage = () => {
17344
- const router = useRouter15();
17345
- const t = useTranslations78("tasks.page");
17346
- const [activeTab, setActiveTab] = useQueryParam4("activeTab", withDefault5(StringParam5, "ACTIVE" /* ACTIVE */));
17347
- const [tableDefaults, setTableDefaults] = useState53();
17348
- const selectedTasksListTab = getTasksListTabTypeFromString(activeTab);
17349
- const localStorageKey = selectedTasksListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY;
17350
- const getStoredTableConfig = useStoredTableConfig(localStorageKey);
17351
- const { theme } = useOrchestratorTheme();
17352
- const { showConfirmDialog } = useContext10(ConfirmationDialogContext);
17353
- const [retryAllProcesses] = useRetryAllProcessesMutation();
17354
- const { isEngineRunningNow } = useCheckEngineStatus();
17355
- useEffect39(() => {
17356
- const storedConfig = getStoredTableConfig();
17357
- if (storedConfig) {
17358
- setTableDefaults(storedConfig);
17359
- }
17360
- }, [getStoredTableConfig]);
17361
- const { dataDisplayParams, setDataDisplayParam } = useDataDisplayParams({
17362
- // TODO: Improvement: A default pageSize value is set to avoid a graphql error when the query is executed
17363
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/261
17364
- pageSize: tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE,
17365
- sortBy: {
17366
- field: "lastModifiedAt",
17367
- order: "DESC" /* DESC */
17368
- }
17369
- });
17370
- const handleChangeTasksListTab = (updatedTasksListTab) => {
17371
- setActiveTab(updatedTasksListTab);
17372
- setDataDisplayParam("pageIndex", 0);
17373
- };
17374
- const alwaysOnFilters = defaultTasksListTabs.find(({ id }) => id === selectedTasksListTab)?.alwaysOnFilters;
17375
- if (!selectedTasksListTab) {
17376
- router.replace(PATH_TASKS);
17377
- return null;
17378
- }
17379
- const handleRerunAllButtonClick = async () => {
17380
- if (await isEngineRunningNow()) {
17381
- showConfirmDialog({
17382
- question: t("rerunAllQuestion"),
17383
- onConfirm: () => {
17384
- retryAllProcesses(null);
17385
- }
17386
- });
17387
- }
17388
- };
17389
- const handleOverrideTableColumns = (defaultTableColumns) => ({
17390
- workflowName: {
17391
- columnType: "data" /* DATA */,
17392
- label: t("taskName"),
17393
- renderData: (value, { processId }) => /* @__PURE__ */ jsx244(Link12, { href: `${PATH_TASKS}/${processId}`, children: value })
17394
- },
17395
- ...toSortedTableColumnConfig(defaultTableColumns, [
17396
- "lastStep",
17397
- "lastStatus",
17398
- "workflowTarget",
17399
- "tag",
17400
- "productName",
17401
- "customer",
17402
- "customerAbbreviation",
17403
- "note",
17404
- "subscriptions",
17405
- "createdBy",
17406
- "assignee",
17407
- "processId",
17408
- "startedAt",
17409
- "lastModifiedAt"
17410
- ])
17411
- });
17412
- return /* @__PURE__ */ jsxs129(Fragment61, { children: [
17413
- /* @__PURE__ */ jsxs129(WfoContentHeader, { title: /* @__PURE__ */ jsx244(WfoTitleWithWebsocketBadge, { title: "Tasks" }), children: [
17414
- /* @__PURE__ */ jsx244(WfoIsAllowedToRender, { resource: "/orchestrator/processes/all-tasks/retry" /* TASKS_RETRY_ALL */, children: /* @__PURE__ */ jsx244(
17415
- EuiButton18,
17416
- {
17417
- onClick: handleRerunAllButtonClick,
17418
- iconType: () => /* @__PURE__ */ jsx244(WfoRefresh, { color: theme.colors.textPrimary }),
17419
- children: t("rerunAll")
17420
- }
17421
- ) }),
17422
- /* @__PURE__ */ jsx244(WfoIsAllowedToRender, { resource: "/orchestrator/processes/create/task" /* TASKS_CREATE */, children: /* @__PURE__ */ jsx244(WfoStartTaskButtonComboBox, {}) })
17423
- ] }),
17424
- /* @__PURE__ */ jsx244(
17425
- WfoFilterTabs,
17426
- {
17427
- tabs: defaultTasksListTabs,
17428
- translationNamespace: "tasks.tabs",
17429
- selectedTab: selectedTasksListTab,
17430
- onChangeTab: handleChangeTasksListTab
17431
- }
17432
- ),
17433
- /* @__PURE__ */ jsx244(EuiSpacer27, { size: "xxl" }),
17434
- /* @__PURE__ */ jsx244(
17435
- WfoProcessesList,
17436
- {
17437
- defaultHiddenColumns: tableDefaults?.hiddenColumns,
17438
- localStorageKey,
17439
- overrideDefaultTableColumns: handleOverrideTableColumns,
17440
- dataDisplayParams,
17441
- setDataDisplayParam,
17442
- alwaysOnFilters
17443
- }
17444
- )
17445
- ] });
17446
- };
17447
-
17448
- // src/pages/workflows/WfoWorkflowsListPage.tsx
17449
- import { useEffect as useEffect40, useState as useState54 } from "react";
17450
- import { useTranslations as useTranslations79 } from "next-intl";
17451
- import { useRouter as useRouter16 } from "next/router";
17452
- import { StringParam as StringParam6, useQueryParam as useQueryParam5, withDefault as withDefault6 } from "use-query-params";
17453
- import { EuiSpacer as EuiSpacer28 } from "@elastic/eui";
17454
-
17455
- // src/pages/workflows/tabConfig.ts
17456
- var WfoWorkflowsListTabType = /* @__PURE__ */ ((WfoWorkflowsListTabType2) => {
17457
- WfoWorkflowsListTabType2["ACTIVE"] = "ACTIVE";
17458
- WfoWorkflowsListTabType2["COMPLETED"] = "COMPLETED";
17459
- return WfoWorkflowsListTabType2;
17460
- })(WfoWorkflowsListTabType || {});
17461
- var defaultWorkflowsListTabs = [
17462
- {
17463
- id: "ACTIVE" /* ACTIVE */,
17464
- translationKey: "active",
17465
- alwaysOnFilters: [
17466
- {
17467
- // Todo: isTask is not a key of Process
17468
- // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17469
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17470
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17471
- // @ts-ignore waiting for fix in backend
17472
- field: "isTask",
17473
- value: "false"
17474
- },
17475
- {
17476
- field: "lastStatus",
17477
- value: "created-running-suspended-waiting-failed-resumed-inconsistent_data-api_unavailable-awaiting_callback"
17478
- }
17479
- ]
17480
- },
17481
- {
17482
- id: "COMPLETED" /* COMPLETED */,
17483
- translationKey: "completed",
17484
- alwaysOnFilters: [
17485
- {
17486
- // Todo: isTask is not a key of Process
17487
- // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17488
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17489
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17490
- // @ts-ignore waiting for fix in backend
17491
- field: "isTask",
17492
- value: "false"
17493
- },
17494
- {
17495
- field: "lastStatus",
17496
- value: "completed-aborted"
17497
- }
17498
- ]
17499
- }
17500
- ];
17501
-
17502
- // src/pages/workflows/getWorkflowsListTabTypeFromString.ts
17503
- var getWorkflowsListTabTypeFromString = (tabId) => {
17504
- if (!tabId) {
17505
- return void 0;
17506
- }
17507
- switch (tabId.toUpperCase()) {
17508
- case "ACTIVE" /* ACTIVE */.toString():
17509
- return "ACTIVE" /* ACTIVE */;
17510
- case "COMPLETED" /* COMPLETED */.toString():
17511
- return "COMPLETED" /* COMPLETED */;
17512
- default:
17513
- return void 0;
17514
- }
17515
- };
17516
-
17517
- // src/pages/workflows/WfoWorkflowsListPage.tsx
17518
- import { Fragment as Fragment62, jsx as jsx245, jsxs as jsxs130 } from "@emotion/react/jsx-runtime";
17519
- var WfoWorkflowsListPage = () => {
17520
- const router = useRouter16();
17521
- const t = useTranslations79("workflows.index");
17522
- const [activeTab, setActiveTab] = useQueryParam5(
17523
- "activeTab",
17524
- withDefault6(StringParam6, "ACTIVE" /* ACTIVE */)
17525
- );
17526
- const [tableDefaults, setTableDefaults] = useState54();
17527
- const selectedWorkflowsListTab = getWorkflowsListTabTypeFromString(activeTab);
17528
- const localStorageKey = selectedWorkflowsListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY;
17529
- const getStoredTableConfig = useStoredTableConfig(localStorageKey);
17530
- useEffect40(() => {
17531
- const storedConfig = getStoredTableConfig();
17532
- if (storedConfig) {
17533
- setTableDefaults(storedConfig);
17534
- }
17535
- }, [getStoredTableConfig]);
17536
- const { dataDisplayParams, setDataDisplayParam } = useDataDisplayParams({
17537
- // TODO: Improvement: A default pageSize value is set to avoid a graphql error when the query is executed
17538
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/261
17539
- pageSize: tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE,
17540
- sortBy: {
17541
- field: "lastModifiedAt",
17542
- order: "DESC" /* DESC */
17543
- }
17544
- });
17545
- const handleChangeWorkflowsListTab = (updatedWorkflowsListTab) => {
17546
- setActiveTab(updatedWorkflowsListTab);
17547
- setDataDisplayParam("pageIndex", 0);
17548
- };
17549
- const alwaysOnFilters = defaultWorkflowsListTabs.find(({ id }) => id === selectedWorkflowsListTab)?.alwaysOnFilters;
17550
- if (!selectedWorkflowsListTab) {
17551
- router.replace(PATH_WORKFLOWS);
17552
- return null;
17553
- }
17554
- return /* @__PURE__ */ jsxs130(Fragment62, { children: [
17555
- /* @__PURE__ */ jsx245(WfoContentHeader, { title: /* @__PURE__ */ jsx245(WfoTitleWithWebsocketBadge, { title: t("title") }) }),
17556
- /* @__PURE__ */ jsx245(
17557
- WfoFilterTabs,
17558
- {
17559
- tabs: defaultWorkflowsListTabs,
17560
- translationNamespace: "workflows.tabs",
17561
- selectedTab: selectedWorkflowsListTab,
17562
- onChangeTab: handleChangeWorkflowsListTab
17563
- }
17564
- ),
17565
- /* @__PURE__ */ jsx245(EuiSpacer28, { size: "xxl" }),
17566
- /* @__PURE__ */ jsx245(
17567
- WfoProcessesList,
17568
- {
17569
- alwaysOnFilters,
17570
- defaultHiddenColumns: tableDefaults?.hiddenColumns,
17571
- localStorageKey,
17572
- dataDisplayParams,
17573
- setDataDisplayParam
17574
- }
17575
- )
17576
- ] });
17577
- };
17578
-
17579
- // src/pages/WfoSearchPocPage.tsx
17580
- import { useCallback as useCallback15, useEffect as useEffect41, useMemo as useMemo14, useRef as useRef20, useState as useState55 } from "react";
17581
- import { formatQuery as formatQuery2 } from "react-querybuilder/formatQuery";
17582
- import { useTranslations as useTranslations80 } from "next-intl";
17583
- import Link13 from "next/link";
17584
- import { StringParam as StringParam7, useQueryParam as useQueryParam6, withDefault as withDefault7 } from "use-query-params";
17585
- import { EuiSpacer as EuiSpacer29 } from "@elastic/eui";
17586
- import { Fragment as Fragment63, jsx as jsx246, jsxs as jsxs131 } from "@emotion/react/jsx-runtime";
17587
- var SEARCH_TABLE_LOCAL_STORAGE_KEY = "SEARCH_TABLE_LOCAL_STORAGE_KEY";
17588
- var getKeyByValueFromMap = (resultColumToPropertyMap2, field) => {
17589
- return [...resultColumToPropertyMap2.entries()].find(([, v]) => v === field)?.[0] || "";
17590
- };
17591
- var getDataFromResponse = (data, resultColumToPropertyMap2, uniqueRowId, selectedTab) => {
17592
- const searchResult = data?.data;
17593
- if (!searchResult)
17594
- return {
17595
- items: []
17596
- };
17597
- const responseColumns = searchResult.map(({ response_columns }) => response_columns) || [];
17598
- const rowExpandingConfiguration = {
17599
- uniqueRowId,
17600
- uniqueRowIdToExpandedRowMap: searchResult.reduce(
17601
- (rowMap, { response_columns, score, perfect_match, matching_fields }) => {
17602
- const idColumnInResponseColumn = getKeyByValueFromMap(resultColumToPropertyMap2, uniqueRowId);
17603
- const rowId = response_columns[idColumnInResponseColumn];
17604
- if (rowId) {
17605
- rowMap[rowId] = /* @__PURE__ */ jsx246(
17606
- WfoExpandingSearchRow,
17607
- {
17608
- score,
17609
- matchingFields: removeTabStatusMatchingFields(matching_fields, selectedTab, "SUBSCRIPTION" /* SUBSCRIPTION */),
17610
- perfectMatch: perfect_match
17611
- }
17612
- );
17613
- }
17614
- return rowMap;
17615
- },
17616
- {}
17617
- )
17618
- };
17619
- const items = responseColumns.map((responseColumn) => {
17620
- const item = Object.entries(responseColumn).reduce((acc, [key, value]) => {
17621
- const itemKey = resultColumToPropertyMap2.get(key);
17622
- if (itemKey) {
17623
- acc[itemKey] = value;
17624
- }
17625
- return acc;
17626
- }, {});
17627
- return item;
17628
- });
17629
- return {
17630
- items,
17631
- rowExpandingConfiguration
17632
- };
17633
- };
17634
- var getTotalItemsFromResponse = (data) => {
17635
- return data?.cursor?.total_items || false;
17636
- };
17637
- var resultColumToPropertyMap = /* @__PURE__ */ new Map([
17638
- ["subscription.subscription_id", "subscriptionId"],
17639
- ["subscription.description", "description"],
17640
- ["subscription.status", "status"],
17641
- ["subscription.insync", "insync"],
17642
- ["subscription.product.name", "productName"],
17643
- ["subscription.product.tag", "tag"],
17644
- ["subscription.customer_name", "customerFullname"],
17645
- ["subscription.customer_abbreviation", "customerShortcode"],
17646
- ["subscription.start_date", "startDate"],
17647
- ["subscription.end_date", "endDate"],
17648
- ["subscription.note", "note"],
17649
- ["subscription.metadata", "metadata"]
17650
- ]);
17651
- var prefilledFieldOptions = /* @__PURE__ */ new Map([
17652
- ["subscription.subscription_id", ["eq", "neq", "like", "not_regexp"]],
17653
- ["subscription.description", ["eq", "neq", "like", "not_regexp"]],
17654
- ["subscription.status", ["eq", "neq", "like", "not_regexp"]],
17655
- ["subscription.insync", ["eq", "neq"]],
17656
- ["subscription.product.name", ["eq", "neq", "like", "not_regexp"]],
17657
- ["subscription.product.tag", ["eq", "neq", "like", "not_regexp"]],
17658
- ["subscription.customer_name", ["eq", "neq", "like", "not_regexp"]],
17659
- ["subscription.customer_abbreviation", ["eq", "neq", "like", "not_regexp"]],
17660
- ["subscription.start_date", ["eq", "neq", "lt", "lte", "gt", "gte", "between"]],
17661
- ["subscription.end_date", ["eq", "neq", "lt", "lte", "gt", "gte", "between"]],
17662
- ["subscription.note", ["eq", "neq", "like", "not_regexp"]]
17663
- ]);
17664
- var WfoSearchPocPage = () => {
17665
- const t = useTranslations80("subscriptions.index");
17666
- const [activeTab, setActiveTab] = useQueryParam6("activeTab", withDefault7(StringParam7, "ACTIVE" /* ACTIVE */));
17667
- const selectedTab = subscriptionListTabs.find(({ id }) => id === activeTab)?.id ?? "ACTIVE" /* ACTIVE */;
17668
- const getStoredTableConfig = useStoredTableConfig(SEARCH_TABLE_LOCAL_STORAGE_KEY);
17669
- const [retrieverType, setRetrieverType] = useState55("auto" /* Auto */);
17670
- const [queryString, setQueryString] = useState55("");
17671
- const [committedQueryString, setCommittedQueryString] = useQueryParam6("queryString", withDefault7(StringParam7, ""));
17672
- const [committedFilterString, setCommittedFilterString] = useQueryParam6("filterString", withDefault7(StringParam7, ""));
17673
- const lastSelfCommittedFilter = useRef20("");
17674
- const commitFilterString = (celString) => {
17675
- lastSelfCommittedFilter.current = celString;
17676
- setCommittedFilterString(celString || void 0);
17677
- };
17678
- const lastSelfCommittedQueryString = useRef20("");
17679
- const commitQueryString = (queryString2) => {
17680
- lastSelfCommittedQueryString.current = queryString2;
17681
- setCommittedQueryString(queryString2 || void 0);
17682
- };
17683
- const [filterString, setFilterString] = useState55("");
17684
- const [queryBuilderRuleGroup, setQueryBuilderRuleGroup] = useState55();
17685
- const committedRuleGroup = useMemo14(
17686
- () => parseCelToRuleGroup(committedFilterString),
17687
- [committedFilterString]
17688
- );
17689
- const [isValidFilterString, setIsValidFilterString] = useState55(true);
17690
- const [isCommitRefused, setIsCommitRefused] = useState55(false);
17691
- const [tableDefaults, setTableDefaults] = useState55();
17692
- const [pageSize, setPageSize] = useState55(DEFAULT_PAGE_SIZE);
17693
- const [pageCursor, setPageCursor] = useState55(void 0);
17694
- const [dataSorting, setDataSorting] = useState55({
17695
- field: "subscriptionId",
17696
- sortOrder: "DESC" /* DESC */
17697
- });
17698
- const committedSearchKey = JSON.stringify([
17699
- committedQueryString,
17700
- committedFilterString,
17701
- selectedTab,
17702
- retrieverType,
17703
- dataSorting
17704
- ]);
17705
- const cursor = pageCursor?.searchKey === committedSearchKey ? pageCursor.cursor : void 0;
17706
- const searchPayload = useMemo14(() => {
17707
- const filters = addStatusFilterFromTab(committedRuleGroup, selectedTab);
17708
- const order_by = {
17709
- element: getKeyByValueFromMap(resultColumToPropertyMap, dataSorting.field),
17710
- direction: dataSorting.sortOrder.toLowerCase()
17711
- };
17712
- return {
17713
- query: committedQueryString,
17714
- limit: pageSize,
17715
- entity_type: "SUBSCRIPTION" /* SUBSCRIPTION */,
17716
- response_columns: Array.from(resultColumToPropertyMap.keys()),
17717
- order_by,
17718
- ...retrieverType !== "auto" /* Auto */ && { retriever: retrieverType },
17719
- ...filters && { filters },
17720
- ...cursor && { cursor }
17721
- };
17722
- }, [committedQueryString, committedRuleGroup, selectedTab, retrieverType, pageSize, dataSorting, cursor]);
17723
- const { data, isFetching } = useSearchQuery(searchPayload);
17724
- const [getSubscriptionListTrigger] = useLazySearchQuery();
17725
- const getSubscriptionListForExport = (exportLimit) => getSubscriptionListTrigger({ ...searchPayload, limit: exportLimit, cursor: void 0 }).unwrap();
17726
- useEffect41(() => {
17727
- const storedConfig = getStoredTableConfig();
17728
- if (storedConfig) {
17729
- setTableDefaults(storedConfig);
17730
- setPageSize(storedConfig.selectedPageSize);
17333
+ setPageSize(storedConfig.selectedPageSize);
17731
17334
  }
17732
17335
  }, [getStoredTableConfig]);
17733
17336
  const tableColumnConfig = {
17734
17337
  actions: {
17735
17338
  columnType: "control" /* CONTROL */,
17736
17339
  width: "50px",
17737
- renderControl: (row) => /* @__PURE__ */ jsx246(WfoSubscriptionActions, { compactMode: true, subscriptionId: row.subscriptionId })
17340
+ renderControl: (row) => /* @__PURE__ */ jsx243(WfoSubscriptionActions, { compactMode: true, subscriptionId: row.subscriptionId })
17738
17341
  },
17739
17342
  subscriptionId: {
17740
17343
  columnType: "data" /* DATA */,
17741
17344
  label: t("id"),
17742
17345
  width: "100px",
17743
- renderData: (value) => /* @__PURE__ */ jsx246(WfoFirstPartUUID, { UUID: value }),
17346
+ renderData: (value) => /* @__PURE__ */ jsx243(WfoFirstPartUUID, { UUID: value }),
17744
17347
  renderDetails: (value) => value,
17745
17348
  renderTooltip: (value) => value
17746
17349
  },
@@ -17748,20 +17351,20 @@ var WfoSearchPocPage = () => {
17748
17351
  columnType: "data" /* DATA */,
17749
17352
  label: t("description"),
17750
17353
  width: "500px",
17751
- renderData: (value, record) => /* @__PURE__ */ jsx246(Link13, { href: `/subscriptions/${record.subscriptionId}`, children: value }),
17354
+ renderData: (value, record) => /* @__PURE__ */ jsx243(Link12, { href: `/subscriptions/${record.subscriptionId}`, children: value }),
17752
17355
  renderTooltip: (value) => value
17753
17356
  },
17754
17357
  status: {
17755
17358
  columnType: "data" /* DATA */,
17756
17359
  label: t("status"),
17757
17360
  width: "120px",
17758
- renderData: (value) => /* @__PURE__ */ jsx246(WfoSubscriptionStatusBadge, { status: value })
17361
+ renderData: (value) => /* @__PURE__ */ jsx243(WfoSubscriptionStatusBadge, { status: value })
17759
17362
  },
17760
17363
  insync: {
17761
17364
  columnType: "data" /* DATA */,
17762
17365
  label: t("insync"),
17763
17366
  width: "75px",
17764
- renderData: (value) => /* @__PURE__ */ jsx246(WfoInsyncIcon, { inSync: value })
17367
+ renderData: (value) => /* @__PURE__ */ jsx243(WfoInsyncIcon, { inSync: value })
17765
17368
  },
17766
17369
  productName: {
17767
17370
  columnType: "data" /* DATA */,
@@ -17786,7 +17389,7 @@ var WfoSearchPocPage = () => {
17786
17389
  columnType: "data" /* DATA */,
17787
17390
  label: t("startDate"),
17788
17391
  width: "100px",
17789
- renderData: (value) => /* @__PURE__ */ jsx246(WfoDateTime, { dateOrIsoString: value }),
17392
+ renderData: (value) => /* @__PURE__ */ jsx243(WfoDateTime, { dateOrIsoString: value }),
17790
17393
  renderDetails: parseDateToLocaleDateTimeString,
17791
17394
  clipboardText: parseDateToLocaleDateTimeString,
17792
17395
  renderTooltip: (cellValue) => cellValue?.toString()
@@ -17795,7 +17398,7 @@ var WfoSearchPocPage = () => {
17795
17398
  columnType: "data" /* DATA */,
17796
17399
  label: t("endDate"),
17797
17400
  width: "100px",
17798
- renderData: (value) => /* @__PURE__ */ jsx246(WfoDateTime, { dateOrIsoString: value }),
17401
+ renderData: (value) => /* @__PURE__ */ jsx243(WfoDateTime, { dateOrIsoString: value }),
17799
17402
  renderDetails: parseDateToLocaleDateTimeString,
17800
17403
  clipboardText: parseDateToLocaleDateTimeString,
17801
17404
  renderTooltip: (cellValue) => cellValue?.toString()
@@ -17805,12 +17408,12 @@ var WfoSearchPocPage = () => {
17805
17408
  label: t("note"),
17806
17409
  width: "300px",
17807
17410
  renderData: (cellValue, row) => {
17808
- return /* @__PURE__ */ jsx246(
17411
+ return /* @__PURE__ */ jsx243(
17809
17412
  WfoSubscriptionNoteEdit,
17810
17413
  {
17811
17414
  onlyShowOnHover: true,
17812
- endpointName: "",
17813
- queryVariables: {},
17415
+ endpointName,
17416
+ queryVariables: searchPayload,
17814
17417
  subscriptionId: row.subscriptionId,
17815
17418
  note: cellValue
17816
17419
  }
@@ -17821,9 +17424,9 @@ var WfoSearchPocPage = () => {
17821
17424
  columnType: "data" /* DATA */,
17822
17425
  label: t("metadata"),
17823
17426
  width: "100px",
17824
- renderData: (value) => /* @__PURE__ */ jsx246(WfoInlineJson, { data: value }),
17825
- renderDetails: (value) => value && /* @__PURE__ */ jsx246(WfoJsonCodeBlock, { data: value, isBasicStyle: true }),
17826
- renderTooltip: (value) => value && /* @__PURE__ */ jsx246(WfoJsonCodeBlock, { data: value, isBasicStyle: false })
17427
+ renderData: (value) => /* @__PURE__ */ jsx243(WfoInlineJson, { data: value }),
17428
+ renderDetails: (value) => value && /* @__PURE__ */ jsx243(WfoJsonCodeBlock, { data: value, isBasicStyle: true }),
17429
+ renderTooltip: (value) => value && /* @__PURE__ */ jsx243(WfoJsonCodeBlock, { data: value, isBasicStyle: false })
17827
17430
  }
17828
17431
  };
17829
17432
  const sortableAndFilterableFieldNames = Object.keys(tableColumnConfig).filter((fieldName) => fieldName !== "actions");
@@ -17889,14 +17492,14 @@ var WfoSearchPocPage = () => {
17889
17492
  setIsValidFilterString(false);
17890
17493
  }
17891
17494
  }, []);
17892
- useEffect41(() => {
17495
+ useEffect38(() => {
17893
17496
  if (committedQueryString === lastSelfCommittedQueryString.current) {
17894
17497
  return;
17895
17498
  }
17896
17499
  lastSelfCommittedQueryString.current = committedQueryString;
17897
17500
  setQueryString(committedQueryString);
17898
17501
  }, [committedQueryString]);
17899
- useEffect41(() => {
17502
+ useEffect38(() => {
17900
17503
  if (committedFilterString === lastSelfCommittedFilter.current) {
17901
17504
  return;
17902
17505
  }
@@ -17908,114 +17511,422 @@ var WfoSearchPocPage = () => {
17908
17511
  setQueryBuilderRuleGroup(void 0);
17909
17512
  setIsValidFilterString(true);
17910
17513
  }
17911
- }, [committedFilterString, safeCelParse]);
17912
- const onUpdateQueryBuilder = (ruleGroup) => {
17913
- if (ruleGroup === false) {
17914
- setQueryBuilderRuleGroup(void 0);
17915
- setFilterString("");
17916
- setIsValidFilterString(true);
17917
- } else {
17918
- setQueryBuilderRuleGroup({ ...ruleGroup });
17919
- const celQuery = formatQuery2({ ...ruleGroup }, { format: "cel", fallbackExpression: "" });
17920
- if (!celQuery || celQuery === "1 == 1") {
17921
- setFilterString("");
17922
- setIsValidFilterString(true);
17923
- } else {
17924
- setFilterString(celQuery);
17925
- setIsValidFilterString(!!parseCelToRuleGroup(celQuery));
17926
- }
17514
+ }, [committedFilterString, safeCelParse]);
17515
+ const onUpdateQueryBuilder = (ruleGroup) => {
17516
+ if (ruleGroup === false) {
17517
+ setQueryBuilderRuleGroup(void 0);
17518
+ setFilterString("");
17519
+ setIsValidFilterString(true);
17520
+ } else {
17521
+ setQueryBuilderRuleGroup({ ...ruleGroup });
17522
+ const celQuery = formatQuery2({ ...ruleGroup }, { format: "cel", fallbackExpression: "" });
17523
+ if (!celQuery || celQuery === "1 == 1") {
17524
+ setFilterString("");
17525
+ setIsValidFilterString(true);
17526
+ } else {
17527
+ setFilterString(celQuery);
17528
+ setIsValidFilterString(!!parseCelToRuleGroup(celQuery));
17529
+ }
17530
+ }
17531
+ };
17532
+ const onUpdateFilterString = (filterString2) => {
17533
+ setFilterString(filterString2);
17534
+ safeCelParse(filterString2);
17535
+ };
17536
+ const isSearchBlocked = isCommitRefused && !isValidFilterString;
17537
+ const { items: subscriptionListItems, rowExpandingConfiguration } = data && !isSearchBlocked ? getDataFromResponse(data, resultColumToPropertyMap, "subscriptionId", selectedTab) : { items: [] };
17538
+ const totalItems = !isSearchBlocked && getTotalItemsFromResponse(data);
17539
+ const hasNextPage = !isSearchBlocked && (data?.page_info?.has_next_page ?? false);
17540
+ const nextPageCursor = data?.page_info?.next_page_cursor ?? void 0;
17541
+ const exportData = async () => {
17542
+ const exportResult = await getSubscriptionListForExport(totalItems || pageSize);
17543
+ const { items: exportItems } = getDataFromResponse(
17544
+ exportResult,
17545
+ resultColumToPropertyMap,
17546
+ "subscriptionId",
17547
+ selectedTab
17548
+ );
17549
+ if (!exportItems.length) {
17550
+ return;
17551
+ }
17552
+ initiateCsvFileDownload(exportItems, Object.keys(tableColumnConfig), getCsvFileNameWithDate("Subscriptions"));
17553
+ };
17554
+ const onShowMore = () => {
17555
+ if (!isFetching && nextPageCursor) {
17556
+ setPageCursor({ cursor: nextPageCursor, searchKey: committedSearchKey });
17557
+ }
17558
+ };
17559
+ const onUpdateDataSorting = ({ field, sortOrder }) => {
17560
+ setDataSorting({ field, sortOrder });
17561
+ setPageCursor(void 0);
17562
+ };
17563
+ const onUpdatePageSize = (updatedPageSize) => {
17564
+ if (updatedPageSize === pageSize) {
17565
+ return;
17566
+ }
17567
+ setPageSize(updatedPageSize);
17568
+ setPageCursor(void 0);
17569
+ };
17570
+ return /* @__PURE__ */ jsxs128(Fragment60, { children: [
17571
+ /* @__PURE__ */ jsx243(WfoContentHeader, { title: tDetail("title") }),
17572
+ /* @__PURE__ */ jsx243(
17573
+ WfoFilterTabs,
17574
+ {
17575
+ tabs: subscriptionListTabs,
17576
+ selectedTab,
17577
+ translationNamespace: "subscriptions.tabs",
17578
+ onChangeTab: handleChangeTab
17579
+ }
17580
+ ),
17581
+ /* @__PURE__ */ jsx243(EuiSpacer26, { size: "l" }),
17582
+ /* @__PURE__ */ jsx243(
17583
+ WfoStructuredSearchTable,
17584
+ {
17585
+ data: subscriptionListItems,
17586
+ error: mapRtkErrorToWfoError(error),
17587
+ rowExpandingConfiguration,
17588
+ defaultHiddenColumns: tableDefaults?.hiddenColumns,
17589
+ defaultShowMatchDetails: tableDefaults?.showMatchDetails,
17590
+ defaultAdvancedNestedSearch: tableDefaults?.advancedNestedSearch,
17591
+ filterString,
17592
+ handleSearch: handleApplyFilter,
17593
+ isLoading: isFetching,
17594
+ dataSorting: [dataSorting],
17595
+ isValidFilterString,
17596
+ localStorageKey: SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY,
17597
+ onUpdateFilterString,
17598
+ onUpdateQueryBuilder,
17599
+ onChangeQueryString,
17600
+ onSearchQueryString,
17601
+ onShowMore,
17602
+ onUpdateRetrieverType,
17603
+ queryBuilderRuleGroup,
17604
+ queryString,
17605
+ retrieverType,
17606
+ tableColumnConfig: tableColumnConfigWithSortingAndFiltering,
17607
+ getColumnSearchFieldName: (field) => getKeyByValueFromMap(resultColumToPropertyMap, field),
17608
+ pageSize,
17609
+ onUpdateDataSorting,
17610
+ setPageSize: onUpdatePageSize,
17611
+ totalItems,
17612
+ hasNextPage,
17613
+ onExportData: exportData
17614
+ }
17615
+ )
17616
+ ] });
17617
+ };
17618
+
17619
+ // src/pages/tasks/WfoTasksListPage.tsx
17620
+ import { useContext as useContext10, useEffect as useEffect39, useState as useState53 } from "react";
17621
+ import { useTranslations as useTranslations78 } from "next-intl";
17622
+ import Link13 from "next/link";
17623
+ import { useRouter as useRouter15 } from "next/router";
17624
+ import { StringParam as StringParam5, useQueryParam as useQueryParam4, withDefault as withDefault5 } from "use-query-params";
17625
+ import { EuiButton as EuiButton18, EuiSpacer as EuiSpacer27 } from "@elastic/eui";
17626
+
17627
+ // src/pages/tasks/tabConfig.ts
17628
+ var WfoTasksListTabType = /* @__PURE__ */ ((WfoTasksListTabType2) => {
17629
+ WfoTasksListTabType2["ACTIVE"] = "ACTIVE";
17630
+ WfoTasksListTabType2["COMPLETED"] = "COMPLETED";
17631
+ return WfoTasksListTabType2;
17632
+ })(WfoTasksListTabType || {});
17633
+ var defaultTasksListTabs = [
17634
+ {
17635
+ id: "ACTIVE" /* ACTIVE */,
17636
+ translationKey: "active",
17637
+ alwaysOnFilters: [
17638
+ {
17639
+ // Todo: isTask is not a key of Process
17640
+ // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17641
+ // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17642
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17643
+ // @ts-ignore waiting for fix in backend
17644
+ field: "isTask",
17645
+ value: "true"
17646
+ },
17647
+ {
17648
+ field: "lastStatus",
17649
+ value: "created-running-suspended-waiting-failed-resumed-inconsistent_data-api_unavailable-awaiting_callback"
17650
+ }
17651
+ ]
17652
+ },
17653
+ {
17654
+ id: "COMPLETED" /* COMPLETED */,
17655
+ translationKey: "completed",
17656
+ alwaysOnFilters: [
17657
+ {
17658
+ // Todo: isTask is not a key of Process
17659
+ // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17660
+ // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17661
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17662
+ // @ts-ignore waiting for fix in backend
17663
+ field: "isTask",
17664
+ value: "true"
17665
+ },
17666
+ {
17667
+ field: "lastStatus",
17668
+ value: "completed-aborted"
17669
+ }
17670
+ ]
17671
+ }
17672
+ ];
17673
+
17674
+ // src/pages/tasks/getTasksListTabTypeFromString.ts
17675
+ var getTasksListTabTypeFromString = (tabId) => {
17676
+ if (!tabId) {
17677
+ return void 0;
17678
+ }
17679
+ switch (tabId.toUpperCase()) {
17680
+ case "ACTIVE" /* ACTIVE */.toString():
17681
+ return "ACTIVE" /* ACTIVE */;
17682
+ case "COMPLETED" /* COMPLETED */.toString():
17683
+ return "COMPLETED" /* COMPLETED */;
17684
+ default:
17685
+ return void 0;
17686
+ }
17687
+ };
17688
+
17689
+ // src/pages/tasks/WfoTasksListPage.tsx
17690
+ import { Fragment as Fragment61, jsx as jsx244, jsxs as jsxs129 } from "@emotion/react/jsx-runtime";
17691
+ var WfoTasksListPage = () => {
17692
+ const router = useRouter15();
17693
+ const t = useTranslations78("tasks.page");
17694
+ const [activeTab, setActiveTab] = useQueryParam4("activeTab", withDefault5(StringParam5, "ACTIVE" /* ACTIVE */));
17695
+ const [tableDefaults, setTableDefaults] = useState53();
17696
+ const selectedTasksListTab = getTasksListTabTypeFromString(activeTab);
17697
+ const localStorageKey = selectedTasksListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY;
17698
+ const getStoredTableConfig = useStoredTableConfig(localStorageKey);
17699
+ const { theme } = useOrchestratorTheme();
17700
+ const { showConfirmDialog } = useContext10(ConfirmationDialogContext);
17701
+ const [retryAllProcesses] = useRetryAllProcessesMutation();
17702
+ const { isEngineRunningNow } = useCheckEngineStatus();
17703
+ useEffect39(() => {
17704
+ const storedConfig = getStoredTableConfig();
17705
+ if (storedConfig) {
17706
+ setTableDefaults(storedConfig);
17707
+ }
17708
+ }, [getStoredTableConfig]);
17709
+ const { dataDisplayParams, setDataDisplayParam } = useDataDisplayParams({
17710
+ // TODO: Improvement: A default pageSize value is set to avoid a graphql error when the query is executed
17711
+ // https://github.com/workfloworchestrator/orchestrator-ui/issues/261
17712
+ pageSize: tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE,
17713
+ sortBy: {
17714
+ field: "lastModifiedAt",
17715
+ order: "DESC" /* DESC */
17927
17716
  }
17717
+ });
17718
+ const handleChangeTasksListTab = (updatedTasksListTab) => {
17719
+ setActiveTab(updatedTasksListTab);
17720
+ setDataDisplayParam("pageIndex", 0);
17928
17721
  };
17929
- const onUpdateFilterString = (filterString2) => {
17930
- setFilterString(filterString2);
17931
- safeCelParse(filterString2);
17932
- };
17933
- const isSearchBlocked = isCommitRefused && !isValidFilterString;
17934
- const { items: subscriptionListItems, rowExpandingConfiguration } = data && !isSearchBlocked ? getDataFromResponse(data, resultColumToPropertyMap, "subscriptionId", selectedTab) : { items: [] };
17935
- const totalItems = !isSearchBlocked && getTotalItemsFromResponse(data);
17936
- const hasNextPage = !isSearchBlocked && (data?.page_info?.has_next_page ?? false);
17937
- const nextPageCursor = data?.page_info?.next_page_cursor ?? void 0;
17938
- const exportData = async () => {
17939
- const exportResult = await getSubscriptionListForExport(totalItems || pageSize);
17940
- const { items: exportItems } = getDataFromResponse(
17941
- exportResult,
17942
- resultColumToPropertyMap,
17943
- "subscriptionId",
17944
- selectedTab
17945
- );
17946
- if (!exportItems.length) {
17947
- return;
17722
+ const alwaysOnFilters = defaultTasksListTabs.find(({ id }) => id === selectedTasksListTab)?.alwaysOnFilters;
17723
+ if (!selectedTasksListTab) {
17724
+ router.replace(PATH_TASKS);
17725
+ return null;
17726
+ }
17727
+ const handleRerunAllButtonClick = async () => {
17728
+ if (await isEngineRunningNow()) {
17729
+ showConfirmDialog({
17730
+ question: t("rerunAllQuestion"),
17731
+ onConfirm: () => {
17732
+ retryAllProcesses(null);
17733
+ }
17734
+ });
17948
17735
  }
17949
- initiateCsvFileDownload(exportItems, Object.keys(tableColumnConfig), getCsvFileNameWithDate("Subscriptions"));
17950
17736
  };
17951
- const onShowMore = () => {
17952
- if (!isFetching && nextPageCursor) {
17953
- setPageCursor({ cursor: nextPageCursor, searchKey: committedSearchKey });
17737
+ const handleOverrideTableColumns = (defaultTableColumns) => ({
17738
+ workflowName: {
17739
+ columnType: "data" /* DATA */,
17740
+ label: t("taskName"),
17741
+ renderData: (value, { processId }) => /* @__PURE__ */ jsx244(Link13, { href: `${PATH_TASKS}/${processId}`, children: value })
17742
+ },
17743
+ ...toSortedTableColumnConfig(defaultTableColumns, [
17744
+ "lastStep",
17745
+ "lastStatus",
17746
+ "workflowTarget",
17747
+ "tag",
17748
+ "productName",
17749
+ "customer",
17750
+ "customerAbbreviation",
17751
+ "note",
17752
+ "subscriptions",
17753
+ "createdBy",
17754
+ "assignee",
17755
+ "processId",
17756
+ "startedAt",
17757
+ "lastModifiedAt"
17758
+ ])
17759
+ });
17760
+ return /* @__PURE__ */ jsxs129(Fragment61, { children: [
17761
+ /* @__PURE__ */ jsxs129(WfoContentHeader, { title: /* @__PURE__ */ jsx244(WfoTitleWithWebsocketBadge, { title: "Tasks" }), children: [
17762
+ /* @__PURE__ */ jsx244(WfoIsAllowedToRender, { resource: "/orchestrator/processes/all-tasks/retry" /* TASKS_RETRY_ALL */, children: /* @__PURE__ */ jsx244(
17763
+ EuiButton18,
17764
+ {
17765
+ onClick: handleRerunAllButtonClick,
17766
+ iconType: () => /* @__PURE__ */ jsx244(WfoRefresh, { color: theme.colors.textPrimary }),
17767
+ children: t("rerunAll")
17768
+ }
17769
+ ) }),
17770
+ /* @__PURE__ */ jsx244(WfoIsAllowedToRender, { resource: "/orchestrator/processes/create/task" /* TASKS_CREATE */, children: /* @__PURE__ */ jsx244(WfoStartTaskButtonComboBox, {}) })
17771
+ ] }),
17772
+ /* @__PURE__ */ jsx244(
17773
+ WfoFilterTabs,
17774
+ {
17775
+ tabs: defaultTasksListTabs,
17776
+ translationNamespace: "tasks.tabs",
17777
+ selectedTab: selectedTasksListTab,
17778
+ onChangeTab: handleChangeTasksListTab
17779
+ }
17780
+ ),
17781
+ /* @__PURE__ */ jsx244(EuiSpacer27, { size: "xxl" }),
17782
+ /* @__PURE__ */ jsx244(
17783
+ WfoProcessesList,
17784
+ {
17785
+ defaultHiddenColumns: tableDefaults?.hiddenColumns,
17786
+ localStorageKey,
17787
+ overrideDefaultTableColumns: handleOverrideTableColumns,
17788
+ dataDisplayParams,
17789
+ setDataDisplayParam,
17790
+ alwaysOnFilters
17791
+ }
17792
+ )
17793
+ ] });
17794
+ };
17795
+
17796
+ // src/pages/workflows/WfoWorkflowsListPage.tsx
17797
+ import { useEffect as useEffect40, useState as useState54 } from "react";
17798
+ import { useTranslations as useTranslations79 } from "next-intl";
17799
+ import { useRouter as useRouter16 } from "next/router";
17800
+ import { StringParam as StringParam6, useQueryParam as useQueryParam5, withDefault as withDefault6 } from "use-query-params";
17801
+ import { EuiSpacer as EuiSpacer28 } from "@elastic/eui";
17802
+
17803
+ // src/pages/workflows/tabConfig.ts
17804
+ var WfoWorkflowsListTabType = /* @__PURE__ */ ((WfoWorkflowsListTabType2) => {
17805
+ WfoWorkflowsListTabType2["ACTIVE"] = "ACTIVE";
17806
+ WfoWorkflowsListTabType2["COMPLETED"] = "COMPLETED";
17807
+ return WfoWorkflowsListTabType2;
17808
+ })(WfoWorkflowsListTabType || {});
17809
+ var defaultWorkflowsListTabs = [
17810
+ {
17811
+ id: "ACTIVE" /* ACTIVE */,
17812
+ translationKey: "active",
17813
+ alwaysOnFilters: [
17814
+ {
17815
+ // Todo: isTask is not a key of Process
17816
+ // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17817
+ // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17818
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17819
+ // @ts-ignore waiting for fix in backend
17820
+ field: "isTask",
17821
+ value: "false"
17822
+ },
17823
+ {
17824
+ field: "lastStatus",
17825
+ value: "created-running-suspended-waiting-failed-resumed-inconsistent_data-api_unavailable-awaiting_callback"
17826
+ }
17827
+ ]
17828
+ },
17829
+ {
17830
+ id: "COMPLETED" /* COMPLETED */,
17831
+ translationKey: "completed",
17832
+ alwaysOnFilters: [
17833
+ {
17834
+ // Todo: isTask is not a key of Process
17835
+ // However, backend still supports it. Field should not be a keyof ProcessListItem (or process)
17836
+ // https://github.com/workfloworchestrator/orchestrator-ui/issues/290
17837
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17838
+ // @ts-ignore waiting for fix in backend
17839
+ field: "isTask",
17840
+ value: "false"
17841
+ },
17842
+ {
17843
+ field: "lastStatus",
17844
+ value: "completed-aborted"
17845
+ }
17846
+ ]
17847
+ }
17848
+ ];
17849
+
17850
+ // src/pages/workflows/getWorkflowsListTabTypeFromString.ts
17851
+ var getWorkflowsListTabTypeFromString = (tabId) => {
17852
+ if (!tabId) {
17853
+ return void 0;
17854
+ }
17855
+ switch (tabId.toUpperCase()) {
17856
+ case "ACTIVE" /* ACTIVE */.toString():
17857
+ return "ACTIVE" /* ACTIVE */;
17858
+ case "COMPLETED" /* COMPLETED */.toString():
17859
+ return "COMPLETED" /* COMPLETED */;
17860
+ default:
17861
+ return void 0;
17862
+ }
17863
+ };
17864
+
17865
+ // src/pages/workflows/WfoWorkflowsListPage.tsx
17866
+ import { Fragment as Fragment62, jsx as jsx245, jsxs as jsxs130 } from "@emotion/react/jsx-runtime";
17867
+ var WfoWorkflowsListPage = () => {
17868
+ const router = useRouter16();
17869
+ const t = useTranslations79("workflows.index");
17870
+ const [activeTab, setActiveTab] = useQueryParam5(
17871
+ "activeTab",
17872
+ withDefault6(StringParam6, "ACTIVE" /* ACTIVE */)
17873
+ );
17874
+ const [tableDefaults, setTableDefaults] = useState54();
17875
+ const selectedWorkflowsListTab = getWorkflowsListTabTypeFromString(activeTab);
17876
+ const localStorageKey = selectedWorkflowsListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY;
17877
+ const getStoredTableConfig = useStoredTableConfig(localStorageKey);
17878
+ useEffect40(() => {
17879
+ const storedConfig = getStoredTableConfig();
17880
+ if (storedConfig) {
17881
+ setTableDefaults(storedConfig);
17954
17882
  }
17955
- };
17956
- const onUpdateDataSorting = ({ field, sortOrder }) => {
17957
- setDataSorting({ field, sortOrder });
17958
- setPageCursor(void 0);
17959
- };
17960
- const onUpdatePageSize = (updatedPageSize) => {
17961
- if (updatedPageSize === pageSize) {
17962
- return;
17883
+ }, [getStoredTableConfig]);
17884
+ const { dataDisplayParams, setDataDisplayParam } = useDataDisplayParams({
17885
+ // TODO: Improvement: A default pageSize value is set to avoid a graphql error when the query is executed
17886
+ // https://github.com/workfloworchestrator/orchestrator-ui/issues/261
17887
+ pageSize: tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE,
17888
+ sortBy: {
17889
+ field: "lastModifiedAt",
17890
+ order: "DESC" /* DESC */
17963
17891
  }
17964
- setPageSize(updatedPageSize);
17965
- setPageCursor(void 0);
17892
+ });
17893
+ const handleChangeWorkflowsListTab = (updatedWorkflowsListTab) => {
17894
+ setActiveTab(updatedWorkflowsListTab);
17895
+ setDataDisplayParam("pageIndex", 0);
17966
17896
  };
17967
- return /* @__PURE__ */ jsxs131(Fragment63, { children: [
17968
- /* @__PURE__ */ jsx246(WfoContentHeader, { title: "Subscriptions (Beta)" }),
17969
- /* @__PURE__ */ jsx246(
17897
+ const alwaysOnFilters = defaultWorkflowsListTabs.find(({ id }) => id === selectedWorkflowsListTab)?.alwaysOnFilters;
17898
+ if (!selectedWorkflowsListTab) {
17899
+ router.replace(PATH_WORKFLOWS);
17900
+ return null;
17901
+ }
17902
+ return /* @__PURE__ */ jsxs130(Fragment62, { children: [
17903
+ /* @__PURE__ */ jsx245(WfoContentHeader, { title: /* @__PURE__ */ jsx245(WfoTitleWithWebsocketBadge, { title: t("title") }) }),
17904
+ /* @__PURE__ */ jsx245(
17970
17905
  WfoFilterTabs,
17971
17906
  {
17972
- tabs: subscriptionListTabs,
17973
- selectedTab,
17974
- translationNamespace: "subscriptions.tabs",
17975
- onChangeTab: handleChangeTab
17907
+ tabs: defaultWorkflowsListTabs,
17908
+ translationNamespace: "workflows.tabs",
17909
+ selectedTab: selectedWorkflowsListTab,
17910
+ onChangeTab: handleChangeWorkflowsListTab
17976
17911
  }
17977
17912
  ),
17978
- /* @__PURE__ */ jsx246(EuiSpacer29, { size: "l" }),
17979
- /* @__PURE__ */ jsx246(
17980
- WfoStructuredSearchTable,
17913
+ /* @__PURE__ */ jsx245(EuiSpacer28, { size: "xxl" }),
17914
+ /* @__PURE__ */ jsx245(
17915
+ WfoProcessesList,
17981
17916
  {
17982
- data: subscriptionListItems,
17983
- rowExpandingConfiguration,
17917
+ alwaysOnFilters,
17984
17918
  defaultHiddenColumns: tableDefaults?.hiddenColumns,
17985
- defaultShowMatchDetails: tableDefaults?.showMatchDetails,
17986
- defaultAdvancedNestedSearch: tableDefaults?.advancedNestedSearch,
17987
- filterString,
17988
- handleSearch: handleApplyFilter,
17989
- isLoading: isFetching,
17990
- dataSorting: [dataSorting],
17991
- isValidFilterString,
17992
- localStorageKey: SEARCH_TABLE_LOCAL_STORAGE_KEY,
17993
- onUpdateFilterString,
17994
- onUpdateQueryBuilder,
17995
- onChangeQueryString,
17996
- onSearchQueryString,
17997
- onShowMore,
17998
- onUpdateRetrieverType,
17999
- queryBuilderRuleGroup,
18000
- queryString,
18001
- retrieverType,
18002
- tableColumnConfig: tableColumnConfigWithSortingAndFiltering,
18003
- getColumnSearchFieldName: (field) => getKeyByValueFromMap(resultColumToPropertyMap, field),
18004
- pageSize,
18005
- onUpdateDataSorting,
18006
- setPageSize: onUpdatePageSize,
18007
- totalItems,
18008
- hasNextPage,
18009
- prefilledFieldOptions,
18010
- onExportData: exportData
17919
+ localStorageKey,
17920
+ dataDisplayParams,
17921
+ setDataDisplayParam
18011
17922
  }
18012
17923
  )
18013
17924
  ] });
18014
17925
  };
18015
17926
 
18016
17927
  // src/components/WfoProcessList/WfoProcessListDeltaPopover.tsx
18017
- import { useState as useState56 } from "react";
18018
- import { useTranslations as useTranslations81 } from "next-intl";
17928
+ import { useState as useState55 } from "react";
17929
+ import { useTranslations as useTranslations80 } from "next-intl";
18019
17930
  import { EuiButtonIcon as EuiButtonIcon16, EuiLoadingSpinner as EuiLoadingSpinner6, EuiPanel as EuiPanel8, EuiPopover as EuiPopover9 } from "@elastic/eui";
18020
17931
 
18021
17932
  // src/components/WfoProcessList/styles.ts
@@ -18043,32 +17954,32 @@ var getWfoProcessListDeltaPopoverStyles = ({ theme }) => {
18043
17954
  };
18044
17955
 
18045
17956
  // src/components/WfoProcessList/WfoProcessListDeltaPopover.tsx
18046
- import { jsx as jsx247 } from "@emotion/react/jsx-runtime";
17957
+ import { jsx as jsx246 } from "@emotion/react/jsx-runtime";
18047
17958
  var WfoProcessListDeltaPopover = ({ processListItem }) => {
18048
17959
  const { theme } = useOrchestratorTheme();
18049
17960
  const { popoverPanelStyle, deltaContentPanelStyle, loadingSpinnerStyle } = useWithOrchestratorTheme(
18050
17961
  getWfoProcessListDeltaPopoverStyles
18051
17962
  );
18052
- const t = useTranslations81("processes.steps");
18053
- const [isPopoverOpen, setPopoverOpen] = useState56(false);
17963
+ const t = useTranslations80("processes.steps");
17964
+ const [isPopoverOpen, setPopoverOpen] = useState55(false);
18054
17965
  const { processId, workflowTarget } = processListItem;
18055
17966
  const { data, isFetching } = useGetRawProcessDetailQuery({ processId }, { skip: !isPopoverOpen });
18056
17967
  if (workflowTarget !== "MODIFY" /* MODIFY */) {
18057
17968
  return null;
18058
17969
  }
18059
17970
  const { oldText, newText } = getSubscriptionDiffTexts(data);
18060
- const iconButton = /* @__PURE__ */ jsx247(
17971
+ const iconButton = /* @__PURE__ */ jsx246(
18061
17972
  EuiButtonIcon16,
18062
17973
  {
18063
- iconType: () => /* @__PURE__ */ jsx247(WfoCode, { color: theme.colors.textDisabled }),
17974
+ iconType: () => /* @__PURE__ */ jsx246(WfoCode, { color: theme.colors.textDisabled }),
18064
17975
  onClick: () => setPopoverOpen(!isPopoverOpen),
18065
17976
  "aria-label": t("showDelta"),
18066
17977
  isLoading: isFetching
18067
17978
  }
18068
17979
  );
18069
- const button = isPopoverOpen ? iconButton : /* @__PURE__ */ jsx247(WfoToolTip, { tooltipContent: t("showDelta"), children: iconButton });
18070
- const SubscriptionDeltaContent = () => /* @__PURE__ */ jsx247(WfoDiff_default, { oldText, newText, syntax: "javascript" });
18071
- return /* @__PURE__ */ jsx247(
17980
+ const button = isPopoverOpen ? iconButton : /* @__PURE__ */ jsx246(WfoToolTip, { tooltipContent: t("showDelta"), children: iconButton });
17981
+ const SubscriptionDeltaContent = () => /* @__PURE__ */ jsx246(WfoDiff_default, { oldText, newText, syntax: "javascript" });
17982
+ return /* @__PURE__ */ jsx246(
18072
17983
  EuiPopover9,
18073
17984
  {
18074
17985
  id: `delta-${processId}`,
@@ -18080,7 +17991,7 @@ var WfoProcessListDeltaPopover = ({ processListItem }) => {
18080
17991
  ownFocus: true,
18081
17992
  repositionOnScroll: true,
18082
17993
  panelStyle: popoverPanelStyle,
18083
- children: /* @__PURE__ */ jsx247(EuiPanel8, { color: "transparent", paddingSize: "s", css: deltaContentPanelStyle, children: isFetching ? /* @__PURE__ */ jsx247("div", { css: loadingSpinnerStyle, children: /* @__PURE__ */ jsx247(EuiLoadingSpinner6, { size: "xl" }) }) : /* @__PURE__ */ jsx247(SubscriptionDeltaContent, {}) })
17994
+ children: /* @__PURE__ */ jsx246(EuiPanel8, { color: "transparent", paddingSize: "s", css: deltaContentPanelStyle, children: isFetching ? /* @__PURE__ */ jsx246("div", { css: loadingSpinnerStyle, children: /* @__PURE__ */ jsx246(EuiLoadingSpinner6, { size: "xl" }) }) : /* @__PURE__ */ jsx246(SubscriptionDeltaContent, {}) })
18084
17995
  }
18085
17996
  );
18086
17997
  };
@@ -18186,7 +18097,7 @@ var graphQlProcessFilterMapper = (data) => data?.map(({ field, value }) => ({
18186
18097
  }));
18187
18098
 
18188
18099
  // src/components/WfoProcessList/WfoProcessesList.tsx
18189
- import { jsx as jsx248, jsxs as jsxs132 } from "@emotion/react/jsx-runtime";
18100
+ import { jsx as jsx247, jsxs as jsxs131 } from "@emotion/react/jsx-runtime";
18190
18101
  var WfoProcessesList = ({
18191
18102
  alwaysOnFilters,
18192
18103
  defaultHiddenColumns = [],
@@ -18195,21 +18106,21 @@ var WfoProcessesList = ({
18195
18106
  overrideDefaultTableColumns,
18196
18107
  setDataDisplayParam
18197
18108
  }) => {
18198
- const t = useTranslations82("processes.index");
18199
- const tError = useTranslations82("errors");
18109
+ const t = useTranslations81("processes.index");
18110
+ const tError = useTranslations81("errors");
18200
18111
  const { showToastMessage } = useShowToastMessage();
18201
18112
  const router = useRouter17();
18202
18113
  const defaultTableColumns = {
18203
18114
  delta: {
18204
18115
  columnType: "control" /* CONTROL */,
18205
18116
  width: "50px",
18206
- renderControl: (row) => /* @__PURE__ */ jsx248(WfoProcessListDeltaPopover, { processListItem: row })
18117
+ renderControl: (row) => /* @__PURE__ */ jsx247(WfoProcessListDeltaPopover, { processListItem: row })
18207
18118
  },
18208
18119
  workflowName: {
18209
18120
  columnType: "data" /* DATA */,
18210
18121
  label: t("workflowName"),
18211
18122
  width: "225px",
18212
- renderData: (value, { processId }) => /* @__PURE__ */ jsx248(Link14, { href: `${PATH_WORKFLOWS}/${processId}`, children: value }),
18123
+ renderData: (value, { processId }) => /* @__PURE__ */ jsx247(Link14, { href: `${PATH_WORKFLOWS}/${processId}`, children: value }),
18213
18124
  renderTooltip: (value) => value
18214
18125
  },
18215
18126
  lastStep: {
@@ -18220,13 +18131,13 @@ var WfoProcessesList = ({
18220
18131
  lastStatus: {
18221
18132
  columnType: "data" /* DATA */,
18222
18133
  label: t("status"),
18223
- renderData: (cellValue) => /* @__PURE__ */ jsx248(WfoProcessStatusBadge, { processStatus: cellValue }),
18134
+ renderData: (cellValue) => /* @__PURE__ */ jsx247(WfoProcessStatusBadge, { processStatus: cellValue }),
18224
18135
  width: "150px"
18225
18136
  },
18226
18137
  workflowTarget: {
18227
18138
  columnType: "data" /* DATA */,
18228
18139
  label: t("workflowTarget"),
18229
- renderData: (target) => /* @__PURE__ */ jsx248(WfoWorkflowTargetBadge, { target }),
18140
+ renderData: (target) => /* @__PURE__ */ jsx247(WfoWorkflowTargetBadge, { target }),
18230
18141
  width: "100px"
18231
18142
  },
18232
18143
  tag: {
@@ -18253,13 +18164,13 @@ var WfoProcessesList = ({
18253
18164
  columnType: "data" /* DATA */,
18254
18165
  label: t("note"),
18255
18166
  width: "250px",
18256
- renderData: (note, { processId }) => /* @__PURE__ */ jsx248(WfoProcessListNoteEdit, { processId, note })
18167
+ renderData: (note, { processId }) => /* @__PURE__ */ jsx247(WfoProcessListNoteEdit, { processId, note })
18257
18168
  },
18258
18169
  subscriptions: {
18259
18170
  columnType: "data" /* DATA */,
18260
18171
  label: t("subscriptions"),
18261
18172
  width: "425px",
18262
- renderData: ({ page: subscriptions }, { processId }) => /* @__PURE__ */ jsx248(
18173
+ renderData: ({ page: subscriptions }, { processId }) => /* @__PURE__ */ jsx247(
18263
18174
  WfoProcessListSubscriptionsCell,
18264
18175
  {
18265
18176
  subscriptions,
@@ -18267,8 +18178,8 @@ var WfoProcessesList = ({
18267
18178
  onMoreSubscriptionsClick: () => router.push(`${PATH_WORKFLOWS}/${processId}`)
18268
18179
  }
18269
18180
  ),
18270
- renderDetails: ({ page: subscriptions }) => /* @__PURE__ */ jsx248(WfoProcessListSubscriptionsCell, { subscriptions }),
18271
- renderTooltip: ({ page: subscriptions }) => subscriptions.map(({ description, subscriptionId }) => /* @__PURE__ */ jsxs132("p", { children: [
18181
+ renderDetails: ({ page: subscriptions }) => /* @__PURE__ */ jsx247(WfoProcessListSubscriptionsCell, { subscriptions }),
18182
+ renderTooltip: ({ page: subscriptions }) => subscriptions.map(({ description, subscriptionId }) => /* @__PURE__ */ jsxs131("p", { children: [
18272
18183
  "- ",
18273
18184
  description
18274
18185
  ] }, subscriptionId)),
@@ -18288,7 +18199,7 @@ var WfoProcessesList = ({
18288
18199
  columnType: "data" /* DATA */,
18289
18200
  label: t("processId"),
18290
18201
  width: "90px",
18291
- renderData: (value) => /* @__PURE__ */ jsx248(WfoFirstPartUUID, { UUID: value }),
18202
+ renderData: (value) => /* @__PURE__ */ jsx247(WfoFirstPartUUID, { UUID: value }),
18292
18203
  renderDetails: (value) => value,
18293
18204
  renderTooltip: (value) => value
18294
18205
  },
@@ -18296,7 +18207,7 @@ var WfoProcessesList = ({
18296
18207
  columnType: "data" /* DATA */,
18297
18208
  label: t("started"),
18298
18209
  width: "100px",
18299
- renderData: (value) => /* @__PURE__ */ jsx248(WfoDateTime, { dateOrIsoString: value }),
18210
+ renderData: (value) => /* @__PURE__ */ jsx247(WfoDateTime, { dateOrIsoString: value }),
18300
18211
  renderDetails: parseDateToLocaleDateTimeString,
18301
18212
  clipboardText: parseDateToLocaleDateTimeString,
18302
18213
  renderTooltip: (value) => value.toString()
@@ -18305,7 +18216,7 @@ var WfoProcessesList = ({
18305
18216
  columnType: "data" /* DATA */,
18306
18217
  label: t("lastModified"),
18307
18218
  width: "125px",
18308
- renderData: (value) => /* @__PURE__ */ jsx248(WfoDateTime, { dateOrIsoString: value }),
18219
+ renderData: (value) => /* @__PURE__ */ jsx247(WfoDateTime, { dateOrIsoString: value }),
18309
18220
  renderDetails: parseDateToLocaleDateTimeString,
18310
18221
  clipboardText: parseDateToLocaleDateTimeString,
18311
18222
  renderTooltip: (value) => value.toString()
@@ -18341,7 +18252,7 @@ var WfoProcessesList = ({
18341
18252
  pageInfo?.sortFields,
18342
18253
  pageInfo?.filterFields
18343
18254
  );
18344
- return /* @__PURE__ */ jsx248(
18255
+ return /* @__PURE__ */ jsx247(
18345
18256
  WfoAdvancedTable,
18346
18257
  {
18347
18258
  queryString,
@@ -18398,11 +18309,11 @@ var getStyles13 = ({ theme }) => {
18398
18309
  };
18399
18310
 
18400
18311
  // src/components/WfoJsonCodeBlock/WfoJsonCodeBlock.tsx
18401
- import { jsx as jsx249 } from "@emotion/react/jsx-runtime";
18312
+ import { jsx as jsx248 } from "@emotion/react/jsx-runtime";
18402
18313
  var WfoJsonCodeBlock = ({ data, isBasicStyle = false }) => {
18403
18314
  const { euiCodeBlockStyle, euiBasicCodeBlockStyle } = useWithOrchestratorTheme(getStyles13);
18404
18315
  const json = JSON.stringify(data, null, 4);
18405
- return /* @__PURE__ */ jsx249(
18316
+ return /* @__PURE__ */ jsx248(
18406
18317
  EuiCodeBlock3,
18407
18318
  {
18408
18319
  css: isBasicStyle ? euiBasicCodeBlockStyle : euiCodeBlockStyle,
@@ -18415,9 +18326,9 @@ var WfoJsonCodeBlock = ({ data, isBasicStyle = false }) => {
18415
18326
  };
18416
18327
 
18417
18328
  // src/components/WfoSettings/WfoFlushSettings.tsx
18418
- import { useState as useState57 } from "react";
18419
- import { useTranslations as useTranslations83 } from "next-intl";
18420
- import { EuiButton as EuiButton19, EuiComboBox as EuiComboBox2, EuiPanel as EuiPanel9, EuiSpacer as EuiSpacer30, EuiText as EuiText30 } from "@elastic/eui";
18329
+ import { useState as useState56 } from "react";
18330
+ import { useTranslations as useTranslations82 } from "next-intl";
18331
+ import { EuiButton as EuiButton19, EuiComboBox as EuiComboBox2, EuiPanel as EuiPanel9, EuiSpacer as EuiSpacer29, EuiText as EuiText30 } from "@elastic/eui";
18421
18332
 
18422
18333
  // src/components/WfoSettings/styles.ts
18423
18334
  import { css as css41 } from "@emotion/react";
@@ -18443,12 +18354,12 @@ var getWfoFlushSettingsStyle = ({ theme }) => {
18443
18354
  };
18444
18355
 
18445
18356
  // src/components/WfoSettings/WfoFlushSettings.tsx
18446
- import { jsx as jsx250, jsxs as jsxs133 } from "@emotion/react/jsx-runtime";
18357
+ import { jsx as jsx249, jsxs as jsxs132 } from "@emotion/react/jsx-runtime";
18447
18358
  var WfoFlushSettings = () => {
18448
18359
  const { comboboxStyle } = useWithOrchestratorTheme(getWfoFlushSettingsStyle);
18449
18360
  const [clearCache] = useClearCacheMutation();
18450
- const t = useTranslations83("settings.page");
18451
- const [selectedOptions, setSelected] = useState57([]);
18361
+ const t = useTranslations82("settings.page");
18362
+ const [selectedOptions, setSelected] = useState56([]);
18452
18363
  const { showToastMessage } = useShowToastMessage();
18453
18364
  const onChange = (selectedOptions2) => {
18454
18365
  setSelected(selectedOptions2);
@@ -18469,10 +18380,10 @@ var WfoFlushSettings = () => {
18469
18380
  showToastMessage("ERROR" /* ERROR */, `Flush for cache key ${cacheKey} failed`, "Flush failed");
18470
18381
  });
18471
18382
  };
18472
- return /* @__PURE__ */ jsx250(WfoIsAllowedToRender, { resource: "/orchestrator/settings/flush-cache" /* SETTINGS_FLUSH_CACHE */, children: /* @__PURE__ */ jsxs133(EuiPanel9, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
18473
- /* @__PURE__ */ jsx250(EuiText30, { size: "s", children: /* @__PURE__ */ jsx250("h4", { children: t("flushCacheSettingsTitle") }) }),
18474
- /* @__PURE__ */ jsx250(EuiSpacer30, { size: "m" }),
18475
- /* @__PURE__ */ jsx250(
18383
+ return /* @__PURE__ */ jsx249(WfoIsAllowedToRender, { resource: "/orchestrator/settings/flush-cache" /* SETTINGS_FLUSH_CACHE */, children: /* @__PURE__ */ jsxs132(EuiPanel9, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
18384
+ /* @__PURE__ */ jsx249(EuiText30, { size: "s", children: /* @__PURE__ */ jsx249("h4", { children: t("flushCacheSettingsTitle") }) }),
18385
+ /* @__PURE__ */ jsx249(EuiSpacer29, { size: "m" }),
18386
+ /* @__PURE__ */ jsx249(
18476
18387
  EuiComboBox2,
18477
18388
  {
18478
18389
  css: comboboxStyle,
@@ -18485,119 +18396,119 @@ var WfoFlushSettings = () => {
18485
18396
  fullWidth: true
18486
18397
  }
18487
18398
  ),
18488
- /* @__PURE__ */ jsx250(EuiSpacer30, { size: "m" }),
18489
- /* @__PURE__ */ jsx250(EuiButton19, { onClick: flushCache, iconType: "refresh", children: t("flushButton") })
18399
+ /* @__PURE__ */ jsx249(EuiSpacer29, { size: "m" }),
18400
+ /* @__PURE__ */ jsx249(EuiButton19, { onClick: flushCache, iconType: "refresh", children: t("flushButton") })
18490
18401
  ] }) });
18491
18402
  };
18492
18403
 
18493
18404
  // src/components/WfoSettings/WfoEngineStatusButton.tsx
18494
- import { useTranslations as useTranslations84 } from "next-intl";
18405
+ import { useTranslations as useTranslations83 } from "next-intl";
18495
18406
  import { EuiButton as EuiButton20 } from "@elastic/eui";
18496
- import { jsx as jsx251 } from "@emotion/react/jsx-runtime";
18407
+ import { jsx as jsx250 } from "@emotion/react/jsx-runtime";
18497
18408
  var WfoEngineStatusButton = () => {
18498
18409
  const { data, isLoading } = useGetEngineStatusQuery();
18499
18410
  const { engineStatus } = data || {};
18500
18411
  const [setEngineStatus, { isLoading: isSettingEngineStatus }] = useSetEngineStatusMutation();
18501
- const t = useTranslations84("settings.page");
18412
+ const t = useTranslations83("settings.page");
18502
18413
  if (isLoading || isSettingEngineStatus) {
18503
- return /* @__PURE__ */ jsx251(EuiButton20, { isLoading: true, fill: true, children: "Loading..." });
18414
+ return /* @__PURE__ */ jsx250(EuiButton20, { isLoading: true, fill: true, children: "Loading..." });
18504
18415
  }
18505
- return engineStatus === "RUNNING" /* RUNNING */ ? /* @__PURE__ */ jsx251(EuiButton20, { onClick: () => setEngineStatus(true), color: "warning", fill: true, iconType: "pause", children: t("pauseEngine") }) : /* @__PURE__ */ jsx251(EuiButton20, { onClick: () => setEngineStatus(false), color: "primary", fill: true, iconType: "play", children: t("startEngine") });
18416
+ return engineStatus === "RUNNING" /* RUNNING */ ? /* @__PURE__ */ jsx250(EuiButton20, { onClick: () => setEngineStatus(true), color: "warning", fill: true, iconType: "pause", children: t("pauseEngine") }) : /* @__PURE__ */ jsx250(EuiButton20, { onClick: () => setEngineStatus(false), color: "primary", fill: true, iconType: "play", children: t("startEngine") });
18506
18417
  };
18507
18418
 
18508
18419
  // src/components/WfoSettings/WfoModifySettings.tsx
18509
- import { useTranslations as useTranslations85 } from "next-intl";
18510
- import { EuiFlexItem as EuiFlexItem33, EuiPanel as EuiPanel10, EuiSpacer as EuiSpacer31, EuiText as EuiText31 } from "@elastic/eui";
18511
- import { jsx as jsx252, jsxs as jsxs134 } from "@emotion/react/jsx-runtime";
18420
+ import { useTranslations as useTranslations84 } from "next-intl";
18421
+ import { EuiFlexItem as EuiFlexItem33, EuiPanel as EuiPanel10, EuiSpacer as EuiSpacer30, EuiText as EuiText31 } from "@elastic/eui";
18422
+ import { jsx as jsx251, jsxs as jsxs133 } from "@emotion/react/jsx-runtime";
18512
18423
  var WfoModifySettings = () => {
18513
- const t = useTranslations85("settings.page");
18514
- return /* @__PURE__ */ jsxs134(EuiFlexItem33, { children: [
18515
- /* @__PURE__ */ jsxs134(EuiPanel10, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
18516
- /* @__PURE__ */ jsx252(EuiText31, { size: "s", children: /* @__PURE__ */ jsx252("h4", { children: t("resetTextSearchIndex") }) }),
18517
- /* @__PURE__ */ jsx252(EuiSpacer31, { size: "m" }),
18518
- /* @__PURE__ */ jsx252(WfoResetTextSearchIndexButton, {})
18424
+ const t = useTranslations84("settings.page");
18425
+ return /* @__PURE__ */ jsxs133(EuiFlexItem33, { children: [
18426
+ /* @__PURE__ */ jsxs133(EuiPanel10, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
18427
+ /* @__PURE__ */ jsx251(EuiText31, { size: "s", children: /* @__PURE__ */ jsx251("h4", { children: t("resetTextSearchIndex") }) }),
18428
+ /* @__PURE__ */ jsx251(EuiSpacer30, { size: "m" }),
18429
+ /* @__PURE__ */ jsx251(WfoResetTextSearchIndexButton, {})
18519
18430
  ] }),
18520
- /* @__PURE__ */ jsxs134(WfoIsAllowedToRender, { resource: "/orchestrator/settings/start-stop-engine" /* SETTINGS_START_STOP_ENGINE */, children: [
18521
- /* @__PURE__ */ jsx252(EuiSpacer31, {}),
18522
- /* @__PURE__ */ jsxs134(EuiPanel10, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
18523
- /* @__PURE__ */ jsx252(EuiText31, { size: "s", children: /* @__PURE__ */ jsx252("h4", { children: t("modifyEngine") }) }),
18524
- /* @__PURE__ */ jsx252(EuiSpacer31, { size: "m" }),
18525
- /* @__PURE__ */ jsx252(WfoEngineStatusButton, {})
18431
+ /* @__PURE__ */ jsxs133(WfoIsAllowedToRender, { resource: "/orchestrator/settings/start-stop-engine" /* SETTINGS_START_STOP_ENGINE */, children: [
18432
+ /* @__PURE__ */ jsx251(EuiSpacer30, {}),
18433
+ /* @__PURE__ */ jsxs133(EuiPanel10, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
18434
+ /* @__PURE__ */ jsx251(EuiText31, { size: "s", children: /* @__PURE__ */ jsx251("h4", { children: t("modifyEngine") }) }),
18435
+ /* @__PURE__ */ jsx251(EuiSpacer30, { size: "m" }),
18436
+ /* @__PURE__ */ jsx251(WfoEngineStatusButton, {})
18526
18437
  ] })
18527
18438
  ] })
18528
18439
  ] });
18529
18440
  };
18530
18441
 
18531
18442
  // src/components/WfoSettings/WfoEngineStatus.tsx
18532
- import { useTranslations as useTranslations86 } from "next-intl";
18443
+ import { useTranslations as useTranslations85 } from "next-intl";
18533
18444
  import { EuiFlexGroup as EuiFlexGroup32, EuiFlexItem as EuiFlexItem34, EuiPanel as EuiPanel11, EuiText as EuiText32 } from "@elastic/eui";
18534
- import { jsx as jsx253, jsxs as jsxs135 } from "@emotion/react/jsx-runtime";
18445
+ import { jsx as jsx252, jsxs as jsxs134 } from "@emotion/react/jsx-runtime";
18535
18446
  var WfoEngineStatus = () => {
18536
18447
  const { theme } = useOrchestratorTheme();
18537
18448
  const { data } = useGetEngineStatusQuery();
18538
18449
  const { engineStatus, runningProcesses } = data || {};
18539
18450
  const isRunning = engineStatus === "RUNNING" /* RUNNING */;
18540
- const t = useTranslations86("settings.page");
18541
- return /* @__PURE__ */ jsx253(EuiPanel11, { hasShadow: false, color: "subdued", paddingSize: "l", children: /* @__PURE__ */ jsxs135(EuiFlexGroup32, { direction: "column", gutterSize: "s", children: [
18542
- /* @__PURE__ */ jsx253(EuiFlexItem34, { children: /* @__PURE__ */ jsx253(EuiText32, { size: "s", children: /* @__PURE__ */ jsx253("h4", { children: t("engineStatusTitle") }) }) }),
18543
- /* @__PURE__ */ jsxs135(EuiFlexItem34, { css: { flexDirection: "row" }, children: [
18544
- /* @__PURE__ */ jsx253(EuiText32, { size: "s", style: { minWidth: 200 }, children: t("runningProcesses") }),
18545
- /* @__PURE__ */ jsx253(EuiText32, { size: "s", children: runningProcesses || "-" })
18451
+ const t = useTranslations85("settings.page");
18452
+ return /* @__PURE__ */ jsx252(EuiPanel11, { hasShadow: false, color: "subdued", paddingSize: "l", children: /* @__PURE__ */ jsxs134(EuiFlexGroup32, { direction: "column", gutterSize: "s", children: [
18453
+ /* @__PURE__ */ jsx252(EuiFlexItem34, { children: /* @__PURE__ */ jsx252(EuiText32, { size: "s", children: /* @__PURE__ */ jsx252("h4", { children: t("engineStatusTitle") }) }) }),
18454
+ /* @__PURE__ */ jsxs134(EuiFlexItem34, { css: { flexDirection: "row" }, children: [
18455
+ /* @__PURE__ */ jsx252(EuiText32, { size: "s", style: { minWidth: 200 }, children: t("runningProcesses") }),
18456
+ /* @__PURE__ */ jsx252(EuiText32, { size: "s", children: runningProcesses || "-" })
18546
18457
  ] }),
18547
- /* @__PURE__ */ jsxs135(EuiFlexItem34, { css: { flexDirection: "row" }, children: [
18548
- /* @__PURE__ */ jsx253(EuiText32, { size: "s", style: { minWidth: 190 }, children: t("status") }),
18549
- /* @__PURE__ */ jsx253(WfoStatusDotIcon, { color: isRunning ? theme.colors.success : theme.colors.warning }),
18550
- /* @__PURE__ */ jsx253(EuiText32, { size: "xs", css: { paddingTop: theme.size.xs }, children: /* @__PURE__ */ jsx253("p", { children: engineStatus }) })
18458
+ /* @__PURE__ */ jsxs134(EuiFlexItem34, { css: { flexDirection: "row" }, children: [
18459
+ /* @__PURE__ */ jsx252(EuiText32, { size: "s", style: { minWidth: 190 }, children: t("status") }),
18460
+ /* @__PURE__ */ jsx252(WfoStatusDotIcon, { color: isRunning ? theme.colors.success : theme.colors.warning }),
18461
+ /* @__PURE__ */ jsx252(EuiText32, { size: "xs", css: { paddingTop: theme.size.xs }, children: /* @__PURE__ */ jsx252("p", { children: engineStatus }) })
18551
18462
  ] })
18552
18463
  ] }) });
18553
18464
  };
18554
18465
 
18555
18466
  // src/components/WfoSettings/WfoWorkerStatus.tsx
18556
- import { useTranslations as useTranslations87 } from "next-intl";
18467
+ import { useTranslations as useTranslations86 } from "next-intl";
18557
18468
  import { EuiFlexGroup as EuiFlexGroup33, EuiFlexItem as EuiFlexItem35, EuiPanel as EuiPanel12, EuiText as EuiText33 } from "@elastic/eui";
18558
- import { jsx as jsx254, jsxs as jsxs136 } from "@emotion/react/jsx-runtime";
18469
+ import { jsx as jsx253, jsxs as jsxs135 } from "@emotion/react/jsx-runtime";
18559
18470
  var WfoWorkerStatus = () => {
18560
18471
  const { data } = useGetWorkerStatusQuery();
18561
18472
  const { executorType, numberOfQueuedJobs, numberOfRunningJobs, numberOfWorkersOnline } = data || {};
18562
- const t = useTranslations87("settings.page");
18563
- return executorType?.toUpperCase() === "CELERY" /* CELERY */ && /* @__PURE__ */ jsx254(EuiPanel12, { hasShadow: false, color: "subdued", paddingSize: "l", children: /* @__PURE__ */ jsxs136(EuiFlexGroup33, { direction: "column", gutterSize: "s", children: [
18564
- /* @__PURE__ */ jsx254(EuiFlexItem35, { children: /* @__PURE__ */ jsx254(EuiText33, { size: "s", children: /* @__PURE__ */ jsx254("h4", { children: t("workerStatusTitle") }) }) }),
18565
- /* @__PURE__ */ jsxs136(EuiFlexItem35, { css: { flexDirection: "row" }, children: [
18566
- /* @__PURE__ */ jsx254(EuiText33, { size: "s", style: { minWidth: 200 }, children: t("numberOfQueuedJobs") }),
18567
- /* @__PURE__ */ jsx254(EuiText33, { size: "s", children: numberOfQueuedJobs || "-" })
18473
+ const t = useTranslations86("settings.page");
18474
+ return executorType?.toUpperCase() === "CELERY" /* CELERY */ && /* @__PURE__ */ jsx253(EuiPanel12, { hasShadow: false, color: "subdued", paddingSize: "l", children: /* @__PURE__ */ jsxs135(EuiFlexGroup33, { direction: "column", gutterSize: "s", children: [
18475
+ /* @__PURE__ */ jsx253(EuiFlexItem35, { children: /* @__PURE__ */ jsx253(EuiText33, { size: "s", children: /* @__PURE__ */ jsx253("h4", { children: t("workerStatusTitle") }) }) }),
18476
+ /* @__PURE__ */ jsxs135(EuiFlexItem35, { css: { flexDirection: "row" }, children: [
18477
+ /* @__PURE__ */ jsx253(EuiText33, { size: "s", style: { minWidth: 200 }, children: t("numberOfQueuedJobs") }),
18478
+ /* @__PURE__ */ jsx253(EuiText33, { size: "s", children: numberOfQueuedJobs || "-" })
18568
18479
  ] }),
18569
- /* @__PURE__ */ jsxs136(EuiFlexItem35, { css: { flexDirection: "row" }, children: [
18570
- /* @__PURE__ */ jsx254(EuiText33, { size: "s", style: { minWidth: 200 }, children: t("numberOfRunningJobs") }),
18571
- /* @__PURE__ */ jsx254(EuiText33, { size: "s", children: numberOfRunningJobs || "-" })
18480
+ /* @__PURE__ */ jsxs135(EuiFlexItem35, { css: { flexDirection: "row" }, children: [
18481
+ /* @__PURE__ */ jsx253(EuiText33, { size: "s", style: { minWidth: 200 }, children: t("numberOfRunningJobs") }),
18482
+ /* @__PURE__ */ jsx253(EuiText33, { size: "s", children: numberOfRunningJobs || "-" })
18572
18483
  ] }),
18573
- /* @__PURE__ */ jsxs136(EuiFlexItem35, { css: { flexDirection: "row" }, children: [
18574
- /* @__PURE__ */ jsx254(EuiText33, { size: "s", style: { minWidth: 200 }, children: t("numberOfWorkersOnline") }),
18575
- /* @__PURE__ */ jsx254(EuiText33, { size: "s", children: numberOfWorkersOnline || "-" })
18484
+ /* @__PURE__ */ jsxs135(EuiFlexItem35, { css: { flexDirection: "row" }, children: [
18485
+ /* @__PURE__ */ jsx253(EuiText33, { size: "s", style: { minWidth: 200 }, children: t("numberOfWorkersOnline") }),
18486
+ /* @__PURE__ */ jsx253(EuiText33, { size: "s", children: numberOfWorkersOnline || "-" })
18576
18487
  ] })
18577
18488
  ] }) }) || null;
18578
18489
  };
18579
18490
 
18580
18491
  // src/components/WfoSettings/WfoResetTextSearchIndexButton.tsx
18581
- import { useTranslations as useTranslations88 } from "next-intl";
18492
+ import { useTranslations as useTranslations87 } from "next-intl";
18582
18493
  import { EuiButton as EuiButton21 } from "@elastic/eui";
18583
- import { jsx as jsx255 } from "@emotion/react/jsx-runtime";
18494
+ import { jsx as jsx254 } from "@emotion/react/jsx-runtime";
18584
18495
  var WfoResetTextSearchIndexButton = () => {
18585
18496
  const [resetTextSearchIndex] = useResetTextSearchIndexMutation();
18586
- const t = useTranslations88("settings.page");
18587
- return /* @__PURE__ */ jsx255(EuiButton21, { onClick: () => resetTextSearchIndex(null), iconType: "refresh", children: t("resetTextSearchIndexButton") });
18497
+ const t = useTranslations87("settings.page");
18498
+ return /* @__PURE__ */ jsx254(EuiButton21, { onClick: () => resetTextSearchIndex(null), iconType: "refresh", children: t("resetTextSearchIndexButton") });
18588
18499
  };
18589
18500
 
18590
18501
  // src/components/WfoInsyncIcon/WfoInsyncIcon.tsx
18591
- import { jsx as jsx256 } from "@emotion/react/jsx-runtime";
18502
+ import { jsx as jsx255 } from "@emotion/react/jsx-runtime";
18592
18503
  var WfoInsyncIcon = ({ inSync }) => {
18593
18504
  const { theme } = useOrchestratorTheme();
18594
- return inSync ? /* @__PURE__ */ jsx256(WfoCheckmarkCircleFill, { height: 20, width: 20, color: theme.colors.primary }) : /* @__PURE__ */ jsx256(WfoMinusCircleFill, { height: 20, width: 20, color: theme.colors.danger });
18505
+ return inSync ? /* @__PURE__ */ jsx255(WfoCheckmarkCircleFill, { height: 20, width: 20, color: theme.colors.primary }) : /* @__PURE__ */ jsx255(WfoMinusCircleFill, { height: 20, width: 20, color: theme.colors.danger });
18595
18506
  };
18596
18507
 
18597
18508
  // src/components/WfoErrorBoundary/WfoErrorBoundary.tsx
18598
- import React85 from "react";
18599
- import { jsx as jsx257, jsxs as jsxs137 } from "@emotion/react/jsx-runtime";
18600
- var WfoErrorBoundary = class extends React85.Component {
18509
+ import React84 from "react";
18510
+ import { jsx as jsx256, jsxs as jsxs136 } from "@emotion/react/jsx-runtime";
18511
+ var WfoErrorBoundary = class extends React84.Component {
18601
18512
  constructor(props) {
18602
18513
  super(props);
18603
18514
  this.state = { hasError: false };
@@ -18613,9 +18524,9 @@ var WfoErrorBoundary = class extends React85.Component {
18613
18524
  if (this.props.fallback) {
18614
18525
  return this.props.fallback;
18615
18526
  }
18616
- return /* @__PURE__ */ jsxs137("p", { children: [
18527
+ return /* @__PURE__ */ jsxs136("p", { children: [
18617
18528
  "An unexpected error occurred, try to go back to the ",
18618
- /* @__PURE__ */ jsx257("a", { href: "/", children: "home page" })
18529
+ /* @__PURE__ */ jsx256("a", { href: "/", children: "home page" })
18619
18530
  ] });
18620
18531
  }
18621
18532
  return this.props.children;
@@ -18647,317 +18558,92 @@ var getStyles14 = ({ theme }) => {
18647
18558
  };
18648
18559
 
18649
18560
  // src/components/WfoNoResults/WfoNoResults.tsx
18650
- import { jsxs as jsxs138 } from "@emotion/react/jsx-runtime";
18561
+ import { jsxs as jsxs137 } from "@emotion/react/jsx-runtime";
18651
18562
  var WfoNoResults = ({ text, icon }) => {
18652
18563
  const { panelStyle } = useWithOrchestratorTheme(getStyles14);
18653
- return /* @__PURE__ */ jsxs138(EuiFlexGroup34, { css: panelStyle, children: [
18564
+ return /* @__PURE__ */ jsxs137(EuiFlexGroup34, { css: panelStyle, children: [
18654
18565
  icon,
18655
18566
  " ",
18656
18567
  text
18657
18568
  ] });
18658
18569
  };
18659
18570
 
18660
- // src/components/WfoRenderElementOrString/WfoRenderElementOrString.tsx
18661
- import { Fragment as Fragment64, jsx as jsx258 } from "@emotion/react/jsx-runtime";
18662
- var WfoRenderElementOrString = ({
18663
- children,
18664
- renderString
18665
- }) => {
18666
- if (typeof children === "string" && renderString) {
18667
- return renderString(children);
18668
- }
18669
- return /* @__PURE__ */ jsx258(Fragment64, { children });
18670
- };
18671
-
18672
- // src/components/WfoStartButton/WfoStartTaskComboBox.tsx
18673
- import { useTranslations as useTranslations89 } from "next-intl";
18674
- import { useRouter as useRouter18 } from "next/router";
18675
- import { jsx as jsx259 } from "@emotion/react/jsx-runtime";
18676
- var WfoStartTaskButtonComboBox = () => {
18677
- const router = useRouter18();
18678
- const t = useTranslations89("common");
18679
- const { isEngineRunningNow } = useCheckEngineStatus();
18680
- const { data } = useGetTaskOptionsQuery();
18681
- const taskOptions = data?.startOptions || [];
18682
- const comboBoxOptions = [...taskOptions].map((option) => ({
18683
- data: {
18684
- workflowName: option.name
18685
- },
18686
- label: option.description ?? option.name,
18687
- disabled: option.isAllowed === false
18688
- })).sort((taskA, taskB) => taskA.label.localeCompare(taskB.label));
18689
- const handleOptionChange = async (selectedProduct) => {
18690
- if (await isEngineRunningNow()) {
18691
- const { workflowName } = selectedProduct.data;
18692
- router.push({
18693
- pathname: `${PATH_START_NEW_TASK}/${workflowName}`
18694
- });
18695
- }
18696
- };
18697
- return /* @__PURE__ */ jsx259(
18698
- WfoStartButtonComboBox,
18699
- {
18700
- buttonText: t("newTask"),
18701
- options: comboBoxOptions,
18702
- onOptionChange: handleOptionChange,
18703
- isProcess: false,
18704
- css: { width: "600px" }
18705
- }
18706
- );
18707
- };
18708
-
18709
- // src/components/WfoSubscriptionsList/subscriptionResultMappers.ts
18710
- var mapGraphQlSubscriptionsResultToPageInfo = (graphqlResponse) => graphqlResponse.pageInfo;
18711
- var mapGraphQlSubscriptionsResultToSubscriptionListItems = (graphqlResponse) => {
18712
- if (!graphqlResponse) return [];
18713
- return graphqlResponse.subscriptions.map((subscription) => {
18714
- const { description, insync, product, startDate, endDate, status, subscriptionId, note, customer, metadata } = subscription;
18715
- const { name: productName, tag } = product;
18716
- const { fullname: customerFullname, shortcode: customerShortcode, customerId } = customer;
18717
- return {
18718
- subscriptionId,
18719
- description,
18720
- status,
18721
- insync,
18722
- startDate: parseDate(startDate),
18723
- endDate: parseDate(endDate),
18724
- note,
18725
- productName,
18726
- tag,
18727
- customerFullname,
18728
- customerShortcode,
18729
- customerId,
18730
- metadata: Object.keys(metadata).length > 0 ? metadata : null
18731
- };
18732
- });
18733
- };
18734
-
18735
- // src/components/WfoSubscriptionsList/subscriptionListTabs.ts
18736
- var WfoSubscriptionListTab = /* @__PURE__ */ ((WfoSubscriptionListTab2) => {
18737
- WfoSubscriptionListTab2["ACTIVE"] = "ACTIVE";
18738
- WfoSubscriptionListTab2["TERMINATED"] = "TERMINATED";
18739
- WfoSubscriptionListTab2["TRANSIENT"] = "TRANSIENT";
18740
- WfoSubscriptionListTab2["ALL"] = "ALL";
18741
- return WfoSubscriptionListTab2;
18742
- })(WfoSubscriptionListTab || {});
18743
- var subscriptionListTabs = [
18744
- {
18745
- id: "ACTIVE" /* ACTIVE */,
18746
- translationKey: "active",
18747
- alwaysOnFilters: [
18748
- {
18749
- field: "status",
18750
- value: "active"
18751
- }
18752
- ]
18753
- },
18754
- {
18755
- id: "TERMINATED" /* TERMINATED */,
18756
- translationKey: "terminated",
18757
- alwaysOnFilters: [
18758
- {
18759
- field: "status",
18760
- value: "terminated"
18761
- }
18762
- ]
18763
- },
18764
- {
18765
- id: "TRANSIENT" /* TRANSIENT */,
18766
- translationKey: "transient",
18767
- alwaysOnFilters: [
18768
- {
18769
- field: "status",
18770
- value: "initial-provisioning-migrating"
18771
- }
18772
- ]
18773
- },
18774
- {
18775
- id: "ALL" /* ALL */,
18776
- translationKey: "all"
18777
- }
18778
- ];
18779
-
18780
- // src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx
18781
- import { useTranslations as useTranslations90 } from "next-intl";
18782
- import Link15 from "next/link";
18783
- import { useRouter as useRouter19 } from "next/router";
18784
- import { jsx as jsx260 } from "@emotion/react/jsx-runtime";
18785
- var WfoSubscriptionsList = ({
18786
- alwaysOnFilters,
18787
- dataDisplayParams,
18788
- setDataDisplayParam,
18789
- hiddenColumns
18790
- }) => {
18791
- const router = useRouter19();
18792
- const t = useTranslations90("subscriptions.index");
18793
- const tError = useTranslations90("errors");
18794
- const { showToastMessage } = useShowToastMessage();
18795
- const { sortBy: sortBy2, queryString, pageIndex, pageSize } = dataDisplayParams;
18796
- const graphqlQueryVariables = {
18797
- first: pageSize,
18798
- after: pageIndex * pageSize,
18799
- sortBy: sortBy2,
18800
- filterBy: alwaysOnFilters,
18801
- query: queryString || void 0
18802
- };
18803
- const { data, isFetching, error, endpointName } = useGetSubscriptionListQuery(graphqlQueryVariables);
18804
- const subscriptionList = mapGraphQlSubscriptionsResultToSubscriptionListItems(data);
18805
- const tableColumnConfig = {
18806
- actions: {
18807
- columnType: "control" /* CONTROL */,
18808
- width: "50px",
18809
- renderControl: (row) => /* @__PURE__ */ jsx260(WfoSubscriptionActions, { compactMode: true, subscriptionId: row.subscriptionId })
18810
- },
18811
- subscriptionId: {
18812
- columnType: "data" /* DATA */,
18813
- label: t("id"),
18814
- width: "100px",
18815
- renderData: (value) => /* @__PURE__ */ jsx260(WfoFirstPartUUID, { UUID: value }),
18816
- renderDetails: (value) => value,
18817
- renderTooltip: (value) => value
18818
- },
18819
- description: {
18820
- columnType: "data" /* DATA */,
18821
- label: t("description"),
18822
- width: "500px",
18823
- renderData: (value, record) => /* @__PURE__ */ jsx260(Link15, { href: `/subscriptions/${record.subscriptionId}`, children: value }),
18824
- renderTooltip: (value) => value
18825
- },
18826
- status: {
18827
- columnType: "data" /* DATA */,
18828
- label: t("status"),
18829
- width: "120px",
18830
- renderData: (value) => /* @__PURE__ */ jsx260(WfoSubscriptionStatusBadge, { status: value })
18831
- },
18832
- insync: {
18833
- columnType: "data" /* DATA */,
18834
- label: t("insync"),
18835
- width: "75px",
18836
- renderData: (value) => /* @__PURE__ */ jsx260(WfoInsyncIcon, { inSync: value })
18837
- },
18838
- productName: {
18839
- columnType: "data" /* DATA */,
18840
- width: "260px",
18841
- label: t("product")
18842
- },
18843
- tag: {
18844
- columnType: "data" /* DATA */,
18845
- label: t("tag"),
18846
- width: "100px"
18847
- },
18848
- customerId: {
18849
- columnType: "data" /* DATA */,
18850
- label: t("customerId"),
18851
- width: "100px"
18852
- },
18853
- customerFullname: {
18854
- columnType: "data" /* DATA */,
18855
- label: t("customerFullname")
18856
- },
18857
- customerShortcode: {
18858
- columnType: "data" /* DATA */,
18859
- label: t("customerShortcode"),
18860
- width: "150px"
18861
- },
18862
- startDate: {
18863
- columnType: "data" /* DATA */,
18864
- label: t("startDate"),
18865
- width: "100px",
18866
- renderData: (value) => /* @__PURE__ */ jsx260(WfoDateTime, { dateOrIsoString: value }),
18867
- renderDetails: parseDateToLocaleDateTimeString,
18868
- clipboardText: parseDateToLocaleDateTimeString,
18869
- renderTooltip: (cellValue) => cellValue?.toString()
18870
- },
18871
- endDate: {
18872
- columnType: "data" /* DATA */,
18873
- label: t("endDate"),
18874
- width: "100px",
18875
- renderData: (value) => /* @__PURE__ */ jsx260(WfoDateTime, { dateOrIsoString: value }),
18876
- renderDetails: parseDateToLocaleDateTimeString,
18877
- clipboardText: parseDateToLocaleDateTimeString,
18878
- renderTooltip: (cellValue) => cellValue?.toString()
18879
- },
18880
- note: {
18881
- columnType: "data" /* DATA */,
18882
- label: t("note"),
18883
- width: "300px",
18884
- renderData: (cellValue, row) => {
18885
- return /* @__PURE__ */ jsx260(
18886
- WfoSubscriptionNoteEdit,
18887
- {
18888
- onlyShowOnHover: true,
18889
- endpointName,
18890
- queryVariables: graphqlQueryVariables,
18891
- subscriptionId: row.subscriptionId,
18892
- note: cellValue
18893
- }
18894
- );
18895
- }
18571
+ // src/components/WfoRenderElementOrString/WfoRenderElementOrString.tsx
18572
+ import { Fragment as Fragment63, jsx as jsx257 } from "@emotion/react/jsx-runtime";
18573
+ var WfoRenderElementOrString = ({
18574
+ children,
18575
+ renderString
18576
+ }) => {
18577
+ if (typeof children === "string" && renderString) {
18578
+ return renderString(children);
18579
+ }
18580
+ return /* @__PURE__ */ jsx257(Fragment63, { children });
18581
+ };
18582
+
18583
+ // src/components/WfoStartButton/WfoStartTaskComboBox.tsx
18584
+ import { useTranslations as useTranslations88 } from "next-intl";
18585
+ import { useRouter as useRouter18 } from "next/router";
18586
+ import { jsx as jsx258 } from "@emotion/react/jsx-runtime";
18587
+ var WfoStartTaskButtonComboBox = () => {
18588
+ const router = useRouter18();
18589
+ const t = useTranslations88("common");
18590
+ const { isEngineRunningNow } = useCheckEngineStatus();
18591
+ const { data } = useGetTaskOptionsQuery();
18592
+ const taskOptions = data?.startOptions || [];
18593
+ const comboBoxOptions = [...taskOptions].map((option) => ({
18594
+ data: {
18595
+ workflowName: option.name
18896
18596
  },
18897
- metadata: {
18898
- columnType: "data" /* DATA */,
18899
- label: t("metadata"),
18900
- width: "100px",
18901
- renderData: (value) => /* @__PURE__ */ jsx260(WfoInlineJson, { data: value }),
18902
- renderDetails: (value) => value && /* @__PURE__ */ jsx260(WfoJsonCodeBlock, { data: value, isBasicStyle: true }),
18903
- renderTooltip: (value) => value && /* @__PURE__ */ jsx260(WfoJsonCodeBlock, { data: value, isBasicStyle: false })
18597
+ label: option.description ?? option.name,
18598
+ disabled: option.isAllowed === false
18599
+ })).sort((taskA, taskB) => taskA.label.localeCompare(taskB.label));
18600
+ const handleOptionChange = async (selectedProduct) => {
18601
+ if (await isEngineRunningNow()) {
18602
+ const { workflowName } = selectedProduct.data;
18603
+ router.push({
18604
+ pathname: `${PATH_START_NEW_TASK}/${workflowName}`
18605
+ });
18904
18606
  }
18905
18607
  };
18906
- const [getSubscriptionListTrigger, { isFetching: isFetchingCsv }] = useLazyGetSubscriptionListQuery();
18907
- const getSubscriptionListForExport = () => getSubscriptionListTrigger(getQueryVariablesForExport(graphqlQueryVariables)).unwrap();
18908
- const sortedColumnId = getTypedFieldFromObject(sortBy2?.field, tableColumnConfig);
18909
- if (!sortedColumnId) {
18910
- router.replace(PATH_SUBSCRIPTIONS);
18911
- return null;
18912
- }
18913
- const dataSorting = {
18914
- field: sortedColumnId,
18915
- sortOrder: dataDisplayParams.sortBy?.order ?? "ASC" /* ASC */
18916
- };
18917
- const { totalItems, sortFields, filterFields } = data?.pageInfo ?? {};
18918
- const pageChange = getPageIndexChangeHandler(setDataDisplayParam);
18919
- const pageSizeChange = getPageSizeChangeHandler(setDataDisplayParam);
18920
- const updateQuery = getQueryStringHandler(setDataDisplayParam);
18921
- const updateSorting = getDataSortHandler(setDataDisplayParam);
18922
- const pagination = {
18923
- pageIndex: dataDisplayParams.pageIndex,
18924
- pageSize: dataDisplayParams.pageSize,
18925
- pageSizeOptions: DEFAULT_PAGE_SIZES,
18926
- totalItemCount: totalItems ?? 0,
18927
- onChangePage: pageChange,
18928
- onChangeItemsPerPage: pageSizeChange
18929
- };
18930
- const exportData = csvDownloadHandler(
18931
- getSubscriptionListForExport,
18932
- mapGraphQlSubscriptionsResultToSubscriptionListItems,
18933
- mapGraphQlSubscriptionsResultToPageInfo,
18934
- Object.keys(tableColumnConfig),
18935
- getCsvFileNameWithDate("Subscriptions"),
18936
- showToastMessage,
18937
- tError
18938
- );
18939
- const tableConfig = mapSortableAndFilterableValuesToTableColumnConfig(tableColumnConfig, sortFields, filterFields);
18940
- return /* @__PURE__ */ jsx260(
18941
- WfoAdvancedTable,
18608
+ return /* @__PURE__ */ jsx258(
18609
+ WfoStartButtonComboBox,
18942
18610
  {
18943
- queryString: dataDisplayParams.queryString,
18944
- onUpdateQueryString: updateQuery,
18945
- data: subscriptionList,
18946
- tableColumnConfig: tableConfig,
18947
- defaultHiddenColumns: hiddenColumns,
18948
- dataSorting: [dataSorting],
18949
- isLoading: isFetching,
18950
- localStorageKey: SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY,
18951
- detailModalTitle: "Details - Subscription",
18952
- pagination,
18953
- error: mapRtkErrorToWfoError(error),
18954
- onUpdateDataSorting: updateSorting,
18955
- onExportData: exportData,
18956
- exportDataIsLoading: isFetchingCsv
18611
+ buttonText: t("newTask"),
18612
+ options: comboBoxOptions,
18613
+ onOptionChange: handleOptionChange,
18614
+ isProcess: false,
18615
+ css: { width: "600px" }
18957
18616
  }
18958
18617
  );
18959
18618
  };
18960
18619
 
18620
+ // src/components/WfoSubscriptionsList/subscriptionListTabs.ts
18621
+ var WfoSubscriptionListTab = /* @__PURE__ */ ((WfoSubscriptionListTab2) => {
18622
+ WfoSubscriptionListTab2["ACTIVE"] = "ACTIVE";
18623
+ WfoSubscriptionListTab2["TERMINATED"] = "TERMINATED";
18624
+ WfoSubscriptionListTab2["TRANSIENT"] = "TRANSIENT";
18625
+ WfoSubscriptionListTab2["ALL"] = "ALL";
18626
+ return WfoSubscriptionListTab2;
18627
+ })(WfoSubscriptionListTab || {});
18628
+ var subscriptionListTabs = [
18629
+ {
18630
+ id: "ACTIVE" /* ACTIVE */,
18631
+ translationKey: "active"
18632
+ },
18633
+ {
18634
+ id: "TERMINATED" /* TERMINATED */,
18635
+ translationKey: "terminated"
18636
+ },
18637
+ {
18638
+ id: "TRANSIENT" /* TRANSIENT */,
18639
+ translationKey: "transient"
18640
+ },
18641
+ {
18642
+ id: "ALL" /* ALL */,
18643
+ translationKey: "all"
18644
+ }
18645
+ ];
18646
+
18961
18647
  // src/components/WfoSummary/getNumberOfColumns.ts
18962
18648
  var getNumberOfColumns = (currentBreakpoint) => {
18963
18649
  switch (currentBreakpoint) {
@@ -19001,7 +18687,7 @@ var getWfoSummaryCardHeaderStyles = ({ theme }) => {
19001
18687
  };
19002
18688
 
19003
18689
  // src/components/WfoSummary/WfoSummaryCardHeader/WfoSummaryCardHeader.tsx
19004
- import { jsx as jsx261, jsxs as jsxs139 } from "@emotion/react/jsx-runtime";
18690
+ import { jsx as jsx259, jsxs as jsxs138 } from "@emotion/react/jsx-runtime";
19005
18691
  var WfoSummaryCardHeader = ({
19006
18692
  text,
19007
18693
  value,
@@ -19011,8 +18697,8 @@ var WfoSummaryCardHeader = ({
19011
18697
  }) => {
19012
18698
  const { theme } = useOrchestratorTheme();
19013
18699
  const { avatarStyle, totalSectionStyle, valueStyle } = useWithOrchestratorTheme(getWfoSummaryCardHeaderStyles);
19014
- return /* @__PURE__ */ jsx261(EuiFlexItem36, { grow: 0, children: /* @__PURE__ */ jsx261(EuiPanel13, { hasShadow: false, css: { backgroundColor: theme.colors.backgroundBaseSubdued }, paddingSize: "l", children: /* @__PURE__ */ jsxs139(EuiFlexGroup35, { alignItems: "center", children: [
19015
- /* @__PURE__ */ jsx261(
18700
+ return /* @__PURE__ */ jsx259(EuiFlexItem36, { grow: 0, children: /* @__PURE__ */ jsx259(EuiPanel13, { hasShadow: false, css: { backgroundColor: theme.colors.backgroundBaseSubdued }, paddingSize: "l", children: /* @__PURE__ */ jsxs138(EuiFlexGroup35, { alignItems: "center", children: [
18701
+ /* @__PURE__ */ jsx259(
19016
18702
  EuiAvatar,
19017
18703
  {
19018
18704
  iconSize: "l",
@@ -19025,25 +18711,25 @@ var WfoSummaryCardHeader = ({
19025
18711
  color: iconColor
19026
18712
  }
19027
18713
  ),
19028
- /* @__PURE__ */ jsxs139("div", { css: totalSectionStyle, children: [
19029
- /* @__PURE__ */ jsx261(EuiText34, { color: "subdued", children: text }),
19030
- /* @__PURE__ */ jsxs139(EuiFlexGroup35, { gutterSize: "s", alignItems: "center", children: [
19031
- /* @__PURE__ */ jsx261(EuiText34, { css: valueStyle, children: value }),
19032
- isFetching && /* @__PURE__ */ jsx261(EuiLoadingSpinner7, {})
18714
+ /* @__PURE__ */ jsxs138("div", { css: totalSectionStyle, children: [
18715
+ /* @__PURE__ */ jsx259(EuiText34, { color: "subdued", children: text }),
18716
+ /* @__PURE__ */ jsxs138(EuiFlexGroup35, { gutterSize: "s", alignItems: "center", children: [
18717
+ /* @__PURE__ */ jsx259(EuiText34, { css: valueStyle, children: value }),
18718
+ isFetching && /* @__PURE__ */ jsx259(EuiLoadingSpinner7, {})
19033
18719
  ] })
19034
18720
  ] })
19035
18721
  ] }) }) });
19036
18722
  };
19037
18723
 
19038
18724
  // src/components/WfoSummary/WfoSummaryCardList/WfoSummaryCardList.tsx
19039
- import { useRouter as useRouter20 } from "next/router";
18725
+ import { useRouter as useRouter19 } from "next/router";
19040
18726
  import {
19041
18727
  EuiButton as EuiButton22,
19042
18728
  EuiFlexItem as EuiFlexItem38,
19043
18729
  EuiHorizontalRule as EuiHorizontalRule8,
19044
18730
  EuiPanel as EuiPanel14,
19045
18731
  EuiSkeletonText as EuiSkeletonText2,
19046
- EuiSpacer as EuiSpacer32,
18732
+ EuiSpacer as EuiSpacer31,
19047
18733
  useEuiScrollBar as useEuiScrollBar4
19048
18734
  } from "@elastic/eui";
19049
18735
 
@@ -19051,13 +18737,13 @@ import {
19051
18737
  import { EuiFlexGroup as EuiFlexGroup36, EuiFlexItem as EuiFlexItem37, EuiIcon as EuiIcon4, EuiTextColor } from "@elastic/eui";
19052
18738
 
19053
18739
  // src/components/WfoOptionalLink/WfoOptionalLink.tsx
19054
- import Link16 from "next/link";
19055
- import { jsx as jsx262 } from "@emotion/react/jsx-runtime";
18740
+ import Link15 from "next/link";
18741
+ import { jsx as jsx260 } from "@emotion/react/jsx-runtime";
19056
18742
  var WfoOptionalLink = ({ children, href }) => {
19057
18743
  if (!href) {
19058
- return /* @__PURE__ */ jsx262("span", { children });
18744
+ return /* @__PURE__ */ jsx260("span", { children });
19059
18745
  }
19060
- return /* @__PURE__ */ jsx262(Link16, { href, children });
18746
+ return /* @__PURE__ */ jsx260(Link15, { href, children });
19061
18747
  };
19062
18748
 
19063
18749
  // src/components/WfoSummary/WfoSummaryCardList/styles.ts
@@ -19108,49 +18794,49 @@ var getWfoSummaryCardListStyles = ({ theme }) => {
19108
18794
  };
19109
18795
 
19110
18796
  // src/components/WfoSummary/WfoSummaryCardList/WfoSummaryCardListItem.tsx
19111
- import { jsx as jsx263, jsxs as jsxs140 } from "@emotion/react/jsx-runtime";
18797
+ import { jsx as jsx261, jsxs as jsxs139 } from "@emotion/react/jsx-runtime";
19112
18798
  var WfoSummaryCardListItem = ({ title, value, url }) => {
19113
18799
  const { theme } = useOrchestratorTheme();
19114
18800
  const { listItemContainerStyle, listItemTitleStyle, listItemSubtitleStyle, listItemHighlightIconStyle } = useWithOrchestratorTheme(getWfoSummaryCardListStyles);
19115
- return /* @__PURE__ */ jsx263(WfoOptionalLink, { href: url, children: /* @__PURE__ */ jsxs140(EuiFlexGroup36, { css: listItemContainerStyle, gutterSize: "none", children: [
19116
- /* @__PURE__ */ jsxs140(EuiFlexItem37, { children: [
19117
- /* @__PURE__ */ jsx263(EuiTextColor, { color: url ? theme.colors.link : theme.colors.textHeading, css: listItemTitleStyle, children: title }),
19118
- /* @__PURE__ */ jsx263(EuiTextColor, { css: listItemSubtitleStyle, children: value })
18801
+ return /* @__PURE__ */ jsx261(WfoOptionalLink, { href: url, children: /* @__PURE__ */ jsxs139(EuiFlexGroup36, { css: listItemContainerStyle, gutterSize: "none", children: [
18802
+ /* @__PURE__ */ jsxs139(EuiFlexItem37, { children: [
18803
+ /* @__PURE__ */ jsx261(EuiTextColor, { color: url ? theme.colors.link : theme.colors.textHeading, css: listItemTitleStyle, children: title }),
18804
+ /* @__PURE__ */ jsx261(EuiTextColor, { css: listItemSubtitleStyle, children: value })
19119
18805
  ] }),
19120
- /* @__PURE__ */ jsx263(EuiFlexItem37, { className: url ? "highlight-icon" : void 0, grow: false, css: listItemHighlightIconStyle, children: /* @__PURE__ */ jsx263(EuiIcon4, { type: "sortRight", color: "primary" }) })
18806
+ /* @__PURE__ */ jsx261(EuiFlexItem37, { className: url ? "highlight-icon" : void 0, grow: false, css: listItemHighlightIconStyle, children: /* @__PURE__ */ jsx261(EuiIcon4, { type: "sortRight", color: "primary" }) })
19121
18807
  ] }) });
19122
18808
  };
19123
18809
 
19124
18810
  // src/components/WfoSummary/WfoSummaryCardList/WfoSummaryCardList.tsx
19125
- import { jsx as jsx264, jsxs as jsxs141 } from "@emotion/react/jsx-runtime";
18811
+ import { jsx as jsx262, jsxs as jsxs140 } from "@emotion/react/jsx-runtime";
19126
18812
  var WfoSummaryCardList = ({ title, items, button, isLoading = false }) => {
19127
- const router = useRouter20();
18813
+ const router = useRouter19();
19128
18814
  const euiScrollBarStyle = useEuiScrollBar4();
19129
18815
  const { listContainerStyle, listHeaderStyle, listStyle } = useWithOrchestratorTheme(getWfoSummaryCardListStyles);
19130
- return /* @__PURE__ */ jsx264(EuiFlexItem38, { children: /* @__PURE__ */ jsxs141(EuiPanel14, { css: listContainerStyle, hasShadow: false, hasBorder: true, paddingSize: "l", children: [
19131
- /* @__PURE__ */ jsxs141("div", { children: [
19132
- /* @__PURE__ */ jsx264("p", { css: listHeaderStyle, children: title }),
19133
- /* @__PURE__ */ jsx264(EuiSpacer32, { size: "m" }),
19134
- /* @__PURE__ */ jsx264(EuiSkeletonText2, { isLoading, lines: 10, children: /* @__PURE__ */ jsx264("div", { css: [listStyle, euiScrollBarStyle], children: items?.map((item, index) => /* @__PURE__ */ jsxs141("div", { children: [
19135
- /* @__PURE__ */ jsx264(WfoSummaryCardListItem, { title: item.title, value: item.value, url: item.url }),
19136
- index === items.length - 1 ? null : /* @__PURE__ */ jsx264(EuiHorizontalRule8, { margin: "none" })
18816
+ return /* @__PURE__ */ jsx262(EuiFlexItem38, { children: /* @__PURE__ */ jsxs140(EuiPanel14, { css: listContainerStyle, hasShadow: false, hasBorder: true, paddingSize: "l", children: [
18817
+ /* @__PURE__ */ jsxs140("div", { children: [
18818
+ /* @__PURE__ */ jsx262("p", { css: listHeaderStyle, children: title }),
18819
+ /* @__PURE__ */ jsx262(EuiSpacer31, { size: "m" }),
18820
+ /* @__PURE__ */ jsx262(EuiSkeletonText2, { isLoading, lines: 10, children: /* @__PURE__ */ jsx262("div", { css: [listStyle, euiScrollBarStyle], children: items?.map((item, index) => /* @__PURE__ */ jsxs140("div", { children: [
18821
+ /* @__PURE__ */ jsx262(WfoSummaryCardListItem, { title: item.title, value: item.value, url: item.url }),
18822
+ index === items.length - 1 ? null : /* @__PURE__ */ jsx262(EuiHorizontalRule8, { margin: "none" })
19137
18823
  ] }, index)) }) })
19138
18824
  ] }),
19139
- /* @__PURE__ */ jsx264(EuiSpacer32, { size: "m" }),
19140
- button && /* @__PURE__ */ jsx264(EuiButton22, { fullWidth: true, onClick: () => router.push(button.url), children: button.name })
18825
+ /* @__PURE__ */ jsx262(EuiSpacer31, { size: "m" }),
18826
+ button && /* @__PURE__ */ jsx262(EuiButton22, { fullWidth: true, onClick: () => router.push(button.url), children: button.name })
19141
18827
  ] }) });
19142
18828
  };
19143
18829
 
19144
18830
  // src/components/WfoSummary/WfoSummaryCards.tsx
19145
18831
  import { EuiFlexGrid as EuiFlexGrid2, useCurrentEuiBreakpoint } from "@elastic/eui";
19146
- import { jsx as jsx265 } from "@emotion/react/jsx-runtime";
18832
+ import { jsx as jsx263 } from "@emotion/react/jsx-runtime";
19147
18833
  var WfoSummaryCards = ({ children }) => {
19148
18834
  const currentBreakpoint = useCurrentEuiBreakpoint();
19149
- return /* @__PURE__ */ jsx265(EuiFlexGrid2, { responsive: false, columns: getNumberOfColumns(currentBreakpoint), gutterSize: "xl", children });
18835
+ return /* @__PURE__ */ jsx263(EuiFlexGrid2, { responsive: false, columns: getNumberOfColumns(currentBreakpoint), gutterSize: "xl", children });
19150
18836
  };
19151
18837
 
19152
18838
  // src/components/WfoSummary/WfoSummaryCard.tsx
19153
- import { EuiFlexItem as EuiFlexItem39, EuiSpacer as EuiSpacer33 } from "@elastic/eui";
18839
+ import { EuiFlexItem as EuiFlexItem39, EuiSpacer as EuiSpacer32 } from "@elastic/eui";
19154
18840
 
19155
18841
  // src/components/WfoSummary/styles.ts
19156
18842
  import { css as css45 } from "@emotion/react";
@@ -19165,7 +18851,7 @@ var getWfoSummaryCardsStyles = ({ theme }) => {
19165
18851
  };
19166
18852
 
19167
18853
  // src/components/WfoSummary/WfoSummaryCard.tsx
19168
- import { jsx as jsx266, jsxs as jsxs142 } from "@emotion/react/jsx-runtime";
18854
+ import { jsx as jsx264, jsxs as jsxs141 } from "@emotion/react/jsx-runtime";
19169
18855
  var SummaryCardStatus = /* @__PURE__ */ ((SummaryCardStatus2) => {
19170
18856
  SummaryCardStatus2["Success"] = "Success";
19171
18857
  SummaryCardStatus2["Error"] = "Error";
@@ -19189,28 +18875,28 @@ var WfoSummaryCard = ({
19189
18875
  switch (status) {
19190
18876
  case "Success" /* Success */:
19191
18877
  return {
19192
- iconType: () => /* @__PURE__ */ jsx266(WfoCheckmarkCircleFill, { width: 32, height: 32, color: theme.colors.textGhost }),
18878
+ iconType: () => /* @__PURE__ */ jsx264(WfoCheckmarkCircleFill, { width: 32, height: 32, color: theme.colors.textGhost }),
19193
18879
  iconColor: theme.colors.success
19194
18880
  };
19195
18881
  case "Error" /* Error */:
19196
18882
  return {
19197
- iconType: () => /* @__PURE__ */ jsx266(WfoXCircleFill, { width: 32, height: 32, color: theme.colors.textGhost }),
18883
+ iconType: () => /* @__PURE__ */ jsx264(WfoXCircleFill, { width: 32, height: 32, color: theme.colors.textGhost }),
19198
18884
  iconColor: theme.colors.danger
19199
18885
  };
19200
18886
  case "Neutral" /* Neutral */:
19201
18887
  return {
19202
- iconType: () => /* @__PURE__ */ jsx266(WfoCubeFill, { width: 32, height: 32, color: theme.colors.textGhost }),
18888
+ iconType: () => /* @__PURE__ */ jsx264(WfoCubeFill, { width: 32, height: 32, color: theme.colors.textGhost }),
19203
18889
  iconColor: theme.colors.primary
19204
18890
  };
19205
18891
  default:
19206
18892
  return headerBadge ?? {
19207
- iconType: () => /* @__PURE__ */ jsx266(WfoCubeFill, { width: 32, height: 32, color: theme.colors.textGhost }),
18893
+ iconType: () => /* @__PURE__ */ jsx264(WfoCubeFill, { width: 32, height: 32, color: theme.colors.textGhost }),
19208
18894
  iconColor: theme.colors.primary
19209
18895
  };
19210
18896
  }
19211
18897
  };
19212
- return /* @__PURE__ */ jsxs142(EuiFlexItem39, { css: cardContainerStyle, children: [
19213
- /* @__PURE__ */ jsx266(
18898
+ return /* @__PURE__ */ jsxs141(EuiFlexItem39, { css: cardContainerStyle, children: [
18899
+ /* @__PURE__ */ jsx264(
19214
18900
  WfoSummaryCardHeader,
19215
18901
  {
19216
18902
  text: headerTitle,
@@ -19219,26 +18905,19 @@ var WfoSummaryCard = ({
19219
18905
  ...getIconTypeAndColorForHeaderStatus(headerStatus)
19220
18906
  }
19221
18907
  ),
19222
- /* @__PURE__ */ jsx266(EuiSpacer33, { size: "m" }),
19223
- /* @__PURE__ */ jsx266(WfoSummaryCardList, { title: listTitle, items: listItems, button, isLoading })
18908
+ /* @__PURE__ */ jsx264(EuiSpacer32, { size: "m" }),
18909
+ /* @__PURE__ */ jsx264(WfoSummaryCardList, { title: listTitle, items: listItems, button, isLoading })
19224
18910
  ] });
19225
18911
  };
19226
18912
 
19227
18913
  // src/components/WfoSummary/WfoActiveWorkflowsSummaryCard.tsx
19228
- import { useTranslations as useTranslations91 } from "next-intl";
18914
+ import { useTranslations as useTranslations89 } from "next-intl";
19229
18915
 
19230
18916
  // src/pages/startPage/queryVariables.ts
19231
18917
  var baseQueryVariables = {
19232
18918
  first: 5,
19233
18919
  after: 0
19234
18920
  };
19235
- var baseQueryVariablesForSubscription = {
19236
- ...baseQueryVariables,
19237
- sortBy: {
19238
- field: "startDate",
19239
- order: "DESC" /* DESC */
19240
- }
19241
- };
19242
18921
  var baseQueryVariablesForProcess = {
19243
18922
  ...baseQueryVariables,
19244
18923
  sortBy: {
@@ -19257,25 +18936,6 @@ var getTaskFilter = (isTask) => {
19257
18936
  value: isTask ? "true" : "false"
19258
18937
  };
19259
18938
  };
19260
- var subscriptionsListSummaryQueryVariables = {
19261
- ...baseQueryVariablesForSubscription,
19262
- filterBy: [
19263
- {
19264
- field: "status",
19265
- value: "Active"
19266
- }
19267
- ]
19268
- };
19269
- var outOfSyncSubscriptionsListSummaryQueryVariables = {
19270
- ...baseQueryVariablesForSubscription,
19271
- query: "insync:false",
19272
- filterBy: [
19273
- {
19274
- field: "status",
19275
- value: "Active-Provisioning"
19276
- }
19277
- ]
19278
- };
19279
18939
  var getMyWorkflowListSummaryQueryVariables = (username) => ({
19280
18940
  ...baseQueryVariablesForProcess,
19281
18941
  filterBy: [
@@ -19322,15 +18982,15 @@ var productsSummaryQueryVariables = {
19322
18982
  };
19323
18983
 
19324
18984
  // src/components/WfoSummary/WfoActiveWorkflowsSummaryCard.tsx
19325
- import { jsx as jsx267 } from "@emotion/react/jsx-runtime";
18985
+ import { jsx as jsx265 } from "@emotion/react/jsx-runtime";
19326
18986
  var WfoActiveWorkflowsSummaryCard = () => {
19327
- const t = useTranslations91("startPage.activeWorkflows");
18987
+ const t = useTranslations89("startPage.activeWorkflows");
19328
18988
  const {
19329
18989
  data: activeWorkflowsSummaryResponse,
19330
18990
  isFetching,
19331
18991
  isLoading
19332
18992
  } = useGetProcessListSummaryQuery(activeWorkflowsListSummaryQueryVariables);
19333
- return /* @__PURE__ */ jsx267(
18993
+ return /* @__PURE__ */ jsx265(
19334
18994
  WfoSummaryCard,
19335
18995
  {
19336
18996
  headerTitle: t("headerTitle"),
@@ -19346,16 +19006,16 @@ var WfoActiveWorkflowsSummaryCard = () => {
19346
19006
  };
19347
19007
 
19348
19008
  // src/components/WfoSummary/WfoFailedTasksSummaryCard.tsx
19349
- import { useTranslations as useTranslations92 } from "next-intl";
19350
- import { jsx as jsx268 } from "@emotion/react/jsx-runtime";
19009
+ import { useTranslations as useTranslations90 } from "next-intl";
19010
+ import { jsx as jsx266 } from "@emotion/react/jsx-runtime";
19351
19011
  var WfoFailedTasksSummaryCard = () => {
19352
- const t = useTranslations92("startPage.failedTasks");
19012
+ const t = useTranslations90("startPage.failedTasks");
19353
19013
  const {
19354
19014
  data: failedTasksSummaryResponse,
19355
19015
  isFetching,
19356
19016
  isLoading
19357
19017
  } = useGetProcessListSummaryQuery(taskListSummaryQueryVariables);
19358
- return /* @__PURE__ */ jsx268(
19018
+ return /* @__PURE__ */ jsx266(
19359
19019
  WfoSummaryCard,
19360
19020
  {
19361
19021
  headerTitle: t("headerTitle"),
@@ -19371,26 +19031,25 @@ var WfoFailedTasksSummaryCard = () => {
19371
19031
  };
19372
19032
 
19373
19033
  // src/components/WfoSummary/WfoLatestActiveSubscriptionsSummaryCard.tsx
19374
- import { useTranslations as useTranslations93 } from "next-intl";
19375
- import { jsx as jsx269 } from "@emotion/react/jsx-runtime";
19034
+ import { useTranslations as useTranslations91 } from "next-intl";
19035
+ import { jsx as jsx267 } from "@emotion/react/jsx-runtime";
19036
+ var activeSubscriptionsFilter = {
19037
+ bool: {
19038
+ must: [{ term: { "subscription.status": "active" } }]
19039
+ }
19040
+ };
19041
+ var activeSubscriptionsSearchPayload = getSubscriptionSummarySearchPayload(activeSubscriptionsFilter);
19376
19042
  var WfoLatestActiveSubscriptionsSummaryCard = () => {
19377
- const t = useTranslations93("startPage.activeSubscriptions");
19378
- const {
19379
- data: subscriptionsSummaryResult,
19380
- isFetching,
19381
- isLoading
19382
- } = useGetSubscriptionSummaryListQuery(subscriptionsListSummaryQueryVariables);
19383
- return /* @__PURE__ */ jsx269(
19043
+ const t = useTranslations91("startPage.activeSubscriptions");
19044
+ const { data, isFetching, isLoading } = useSearchQuery(activeSubscriptionsSearchPayload);
19045
+ return /* @__PURE__ */ jsx267(
19384
19046
  WfoSummaryCard,
19385
19047
  {
19386
19048
  headerTitle: t("headerTitle"),
19387
- headerValue: subscriptionsSummaryResult?.pageInfo.totalItems ?? "-",
19049
+ headerValue: data?.cursor?.total_items ?? "-",
19388
19050
  headerStatus: "Neutral" /* Neutral */,
19389
19051
  listTitle: t("listTitle"),
19390
- listItems: optionalArrayMapper(
19391
- subscriptionsSummaryResult?.subscriptions,
19392
- mapSubscriptionSummaryToSummaryCardListItem
19393
- ),
19052
+ listItems: optionalArrayMapper(data?.data, mapSubscriptionSearchResultToSummaryCardListItem),
19394
19053
  button: { name: t("buttonText"), url: PATH_SUBSCRIPTIONS },
19395
19054
  isLoading,
19396
19055
  isFetching
@@ -19399,31 +19058,37 @@ var WfoLatestActiveSubscriptionsSummaryCard = () => {
19399
19058
  };
19400
19059
 
19401
19060
  // src/components/WfoSummary/WfoLatestOutOfSyncSubscriptionSummaryCard.tsx
19402
- import { useTranslations as useTranslations94 } from "next-intl";
19403
- import { jsx as jsx270 } from "@emotion/react/jsx-runtime";
19061
+ import { useTranslations as useTranslations92 } from "next-intl";
19062
+ import { jsx as jsx268 } from "@emotion/react/jsx-runtime";
19063
+ var OUT_OF_SYNC_CEL = 'subscription.insync == false && (subscription.status == "provisioning" || subscription.status == "active")';
19064
+ var outOfSyncSubscriptionsFilter = {
19065
+ bool: {
19066
+ must: [
19067
+ { term: { "subscription.insync": false } },
19068
+ {
19069
+ bool: {
19070
+ should: [{ term: { "subscription.status": "active" } }, { term: { "subscription.status": "provisioning" } }]
19071
+ }
19072
+ }
19073
+ ]
19074
+ }
19075
+ };
19076
+ var outOfSyncSubscriptionsSearchPayload = getSubscriptionSummarySearchPayload(outOfSyncSubscriptionsFilter);
19404
19077
  var WfoLatestOutOfSyncSubscriptionSummaryCard = () => {
19405
- const t = useTranslations94("startPage.outOfSyncSubscriptions");
19406
- const {
19407
- data: outOfSyncSubscriptionsSummaryResult,
19408
- isFetching,
19409
- isLoading
19410
- } = useGetSubscriptionSummaryListQuery(outOfSyncSubscriptionsListSummaryQueryVariables);
19078
+ const t = useTranslations92("startPage.outOfSyncSubscriptions");
19079
+ const { data, isFetching, isLoading } = useSearchQuery(outOfSyncSubscriptionsSearchPayload);
19411
19080
  const queryParams = {
19412
19081
  ["activeTab" /* ACTIVE_TAB */]: "ALL" /* ALL */,
19413
- ["sortBy" /* SORT_BY */]: "field-startDate_order-ASC",
19414
- ["queryString" /* QUERY_STRING */]: "status:(provisioning|active) insync:false"
19082
+ ["filterString" /* FILTER_STRING */]: OUT_OF_SYNC_CEL
19415
19083
  };
19416
- return /* @__PURE__ */ jsx270(
19084
+ return /* @__PURE__ */ jsx268(
19417
19085
  WfoSummaryCard,
19418
19086
  {
19419
19087
  headerTitle: t("headerTitle"),
19420
- headerValue: outOfSyncSubscriptionsSummaryResult?.pageInfo.totalItems ?? "-",
19088
+ headerValue: data?.cursor?.total_items ?? "-",
19421
19089
  headerStatus: "Error" /* Error */,
19422
19090
  listTitle: t("listTitle"),
19423
- listItems: optionalArrayMapper(
19424
- outOfSyncSubscriptionsSummaryResult?.subscriptions,
19425
- mapSubscriptionSummaryToSummaryCardListItem
19426
- ),
19091
+ listItems: optionalArrayMapper(data?.data, mapSubscriptionSearchResultToSummaryCardListItem),
19427
19092
  button: {
19428
19093
  name: t("buttonText"),
19429
19094
  url: getUrlWithQueryParams(PATH_SUBSCRIPTIONS, queryParams)
@@ -19435,10 +19100,10 @@ var WfoLatestOutOfSyncSubscriptionSummaryCard = () => {
19435
19100
  };
19436
19101
 
19437
19102
  // src/components/WfoSummary/WfoMyWorkflowsSummaryCard.tsx
19438
- import { useTranslations as useTranslations95 } from "next-intl";
19439
- import { jsx as jsx271 } from "@emotion/react/jsx-runtime";
19103
+ import { useTranslations as useTranslations93 } from "next-intl";
19104
+ import { jsx as jsx269 } from "@emotion/react/jsx-runtime";
19440
19105
  var WfoMyWorkflowsSummaryCard = ({ username }) => {
19441
- const t = useTranslations95("startPage.myWorkflows");
19106
+ const t = useTranslations93("startPage.myWorkflows");
19442
19107
  const {
19443
19108
  data: myWorkflowsSummaryResponse,
19444
19109
  isFetching,
@@ -19449,7 +19114,7 @@ var WfoMyWorkflowsSummaryCard = ({ username }) => {
19449
19114
  ["sortBy" /* SORT_BY */]: "field-lastModifiedAt_order-DESC",
19450
19115
  ["queryString" /* QUERY_STRING */]: `createdBy:"${username}"`
19451
19116
  };
19452
- return /* @__PURE__ */ jsx271(
19117
+ return /* @__PURE__ */ jsx269(
19453
19118
  WfoSummaryCard,
19454
19119
  {
19455
19120
  headerTitle: t("headerTitle"),
@@ -19468,10 +19133,10 @@ var WfoMyWorkflowsSummaryCard = ({ username }) => {
19468
19133
  };
19469
19134
 
19470
19135
  // src/components/WfoSummary/WfoProductsSummaryCard.tsx
19471
- import { useTranslations as useTranslations96 } from "next-intl";
19472
- import { jsx as jsx272, jsxs as jsxs143 } from "@emotion/react/jsx-runtime";
19136
+ import { useTranslations as useTranslations94 } from "next-intl";
19137
+ import { jsx as jsx270, jsxs as jsxs142 } from "@emotion/react/jsx-runtime";
19473
19138
  var WfoProductsSummaryCard = () => {
19474
- const t = useTranslations96("startPage.products");
19139
+ const t = useTranslations94("startPage.products");
19475
19140
  const {
19476
19141
  data: productsSummaryResult,
19477
19142
  isFetching,
@@ -19481,7 +19146,7 @@ var WfoProductsSummaryCard = () => {
19481
19146
  (left, right) => (right.subscriptions.pageInfo.totalItems ?? 0) - (left.subscriptions.pageInfo.totalItems ?? 0)
19482
19147
  ).map((product) => ({
19483
19148
  title: "",
19484
- value: /* @__PURE__ */ jsxs143(
19149
+ value: /* @__PURE__ */ jsxs142(
19485
19150
  "div",
19486
19151
  {
19487
19152
  css: {
@@ -19489,13 +19154,13 @@ var WfoProductsSummaryCard = () => {
19489
19154
  justifyContent: "space-between"
19490
19155
  },
19491
19156
  children: [
19492
- /* @__PURE__ */ jsx272("div", { children: product.name }),
19493
- /* @__PURE__ */ jsx272("div", { children: product.subscriptions.pageInfo.totalItems || 0 })
19157
+ /* @__PURE__ */ jsx270("div", { children: product.name }),
19158
+ /* @__PURE__ */ jsx270("div", { children: product.subscriptions.pageInfo.totalItems || 0 })
19494
19159
  ]
19495
19160
  }
19496
19161
  )
19497
19162
  })) ?? [];
19498
- return /* @__PURE__ */ jsx272(
19163
+ return /* @__PURE__ */ jsx270(
19499
19164
  WfoSummaryCard,
19500
19165
  {
19501
19166
  headerTitle: t("headerTitle"),
@@ -19511,27 +19176,27 @@ var WfoProductsSummaryCard = () => {
19511
19176
 
19512
19177
  // src/components/WfoTitleWithWebsocketBadge/WfoTitleWithWebsocketBadge.tsx
19513
19178
  import { EuiFlexGroup as EuiFlexGroup37, EuiFlexItem as EuiFlexItem40, EuiPageHeader as EuiPageHeader3 } from "@elastic/eui";
19514
- import { jsx as jsx273, jsxs as jsxs144 } from "@emotion/react/jsx-runtime";
19179
+ import { jsx as jsx271, jsxs as jsxs143 } from "@emotion/react/jsx-runtime";
19515
19180
  var WfoTitleWithWebsocketBadge = ({
19516
19181
  title,
19517
19182
  wsUrl = void 0,
19518
19183
  extraElement
19519
19184
  }) => {
19520
19185
  const { useWebSockets } = useGetOrchestratorConfig();
19521
- const pageTitle = useWebSockets || extraElement ? /* @__PURE__ */ jsxs144(EuiFlexGroup37, { alignItems: "center", gutterSize: "s", responsive: false, children: [
19522
- /* @__PURE__ */ jsx273(EuiFlexItem40, { grow: false, children: title }),
19523
- useWebSockets && /* @__PURE__ */ jsx273(EuiFlexItem40, { grow: false, children: /* @__PURE__ */ jsx273(WfoWebsocketStatusBadge, { wsUrl }) }),
19524
- extraElement && /* @__PURE__ */ jsx273(EuiFlexItem40, { grow: false, children: extraElement })
19186
+ const pageTitle = useWebSockets || extraElement ? /* @__PURE__ */ jsxs143(EuiFlexGroup37, { alignItems: "center", gutterSize: "s", responsive: false, children: [
19187
+ /* @__PURE__ */ jsx271(EuiFlexItem40, { grow: false, children: title }),
19188
+ useWebSockets && /* @__PURE__ */ jsx271(EuiFlexItem40, { grow: false, children: /* @__PURE__ */ jsx271(WfoWebsocketStatusBadge, { wsUrl }) }),
19189
+ extraElement && /* @__PURE__ */ jsx271(EuiFlexItem40, { grow: false, children: extraElement })
19525
19190
  ] }) : title;
19526
- return /* @__PURE__ */ jsx273(EuiPageHeader3, { pageTitle });
19191
+ return /* @__PURE__ */ jsx271(EuiPageHeader3, { pageTitle });
19527
19192
  };
19528
19193
 
19529
19194
  // src/components/WfoRadioDropdown/WfoRadioDropdown.tsx
19530
- import { useState as useState58 } from "react";
19195
+ import { useState as useState57 } from "react";
19531
19196
  import { EuiButtonEmpty as EuiButtonEmpty7, EuiFlexGroup as EuiFlexGroup38, EuiPopover as EuiPopover10, EuiRadioGroup as EuiRadioGroup2 } from "@elastic/eui";
19532
- import { jsx as jsx274 } from "@emotion/react/jsx-runtime";
19197
+ import { jsx as jsx272 } from "@emotion/react/jsx-runtime";
19533
19198
  var WfoRadioDropdown = ({ options, onUpdateOption, selectedOption }) => {
19534
- const [isOpen, setIsOpen] = useState58(false);
19199
+ const [isOpen, setIsOpen] = useState57(false);
19535
19200
  const handleClose = () => {
19536
19201
  if (isOpen) {
19537
19202
  setIsOpen(false);
@@ -19549,10 +19214,10 @@ var WfoRadioDropdown = ({ options, onUpdateOption, selectedOption }) => {
19549
19214
  id: option.id,
19550
19215
  label: option.label
19551
19216
  }));
19552
- return /* @__PURE__ */ jsx274(EuiFlexGroup38, { gutterSize: "s", alignItems: "center", justifyContent: "flexEnd", children: /* @__PURE__ */ jsx274(
19217
+ return /* @__PURE__ */ jsx272(EuiFlexGroup38, { gutterSize: "s", alignItems: "center", justifyContent: "flexEnd", children: /* @__PURE__ */ jsx272(
19553
19218
  EuiPopover10,
19554
19219
  {
19555
- button: /* @__PURE__ */ jsx274(
19220
+ button: /* @__PURE__ */ jsx272(
19556
19221
  EuiButtonEmpty7,
19557
19222
  {
19558
19223
  size: "s",
@@ -19573,69 +19238,80 @@ var WfoRadioDropdown = ({ options, onUpdateOption, selectedOption }) => {
19573
19238
  isOpen,
19574
19239
  closePopover: handleClose,
19575
19240
  anchorPosition: "downLeft",
19576
- children: /* @__PURE__ */ jsx274(EuiRadioGroup2, { options: radioGroupOptions, idSelected: selectedOption.id, onChange: handleSelectRadio })
19241
+ children: /* @__PURE__ */ jsx272(EuiRadioGroup2, { options: radioGroupOptions, idSelected: selectedOption.id, onChange: handleSelectRadio })
19577
19242
  }
19578
19243
  ) });
19579
19244
  };
19580
19245
 
19581
19246
  // src/rtk/endpoints/subscriptionListMutation.ts
19247
+ var SEARCH_NOTE_COLUMN = "subscription.note";
19248
+ var SEARCH_ID_COLUMN = "subscription.subscription_id";
19249
+ var patchNoteInListDraft = (draft, subscriptionId, note) => {
19250
+ if ("subscriptions" in draft) {
19251
+ const subscription = draft.subscriptions.find((item) => item.subscriptionId === subscriptionId);
19252
+ if (subscription) {
19253
+ subscription.note = note;
19254
+ }
19255
+ return;
19256
+ }
19257
+ const searchResult = draft.data?.find(
19258
+ ({ response_columns }) => response_columns[SEARCH_ID_COLUMN] === subscriptionId
19259
+ );
19260
+ if (searchResult) {
19261
+ searchResult.response_columns[SEARCH_NOTE_COLUMN] = note;
19262
+ }
19263
+ };
19264
+ var SEARCH_ENDPOINT_NAME = "search";
19582
19265
  var subscriptionListMutationApi = orchestratorApi.injectEndpoints({
19583
19266
  endpoints: (builder) => ({
19584
- emptyQuery: builder.query({
19585
- query: () => ({})
19586
- }),
19587
- emptyDetailQuery: builder.query({ query: () => ({}) }),
19588
19267
  updateSubscriptionNoteOptimistic: builder.mutation({
19589
19268
  queryFn: async () => ({ data: { mockResponse: true } }),
19590
- async onQueryStarted({ queryName, subscriptionId, graphQlQueryVariables, ...patch }, { dispatch, queryFulfilled }) {
19591
- const patchResult = dispatch(
19269
+ // Patches the detail cache, all cached search result sets and the optional GraphQL list so
19270
+ // the note stays consistent when navigating between pages. updateQueryData is a no-op for
19271
+ // a cache entry that does not exist, and patching the same entry twice is harmless.
19272
+ async onQueryStarted({ subscriptionId, note, listQuery }, { dispatch, getState, queryFulfilled }) {
19273
+ const patchList = (queryName, queryVariables) => dispatch(
19592
19274
  subscriptionListMutationApi.util.updateQueryData(
19593
- // @ts-expect-error - Suggest ts ignore because of the type mismatch between emptyQuery and queryName
19275
+ // @ts-expect-error - queryName is a runtime string, not a known endpoint name
19594
19276
  queryName,
19595
- graphQlQueryVariables,
19596
- (draft) => {
19597
- const subscription = draft.subscriptions.find((item) => item.subscriptionId === subscriptionId);
19598
- if (subscription) {
19599
- subscription.note = patch.note;
19600
- }
19601
- }
19277
+ queryVariables,
19278
+ (draft) => patchNoteInListDraft(draft, subscriptionId, note)
19602
19279
  )
19603
19280
  );
19604
- try {
19605
- await queryFulfilled;
19606
- } catch {
19607
- patchResult.undo();
19608
- }
19609
- }
19610
- }),
19611
- updateSubscriptionDetailNoteOptimistic: builder.mutation({
19612
- queryFn: async () => ({ data: { mockResponse: true } }),
19613
- async onQueryStarted({ queryName, subscriptionId, ...patch }, { dispatch, queryFulfilled }) {
19614
- const patchResult = dispatch(
19615
- subscriptionListMutationApi.util.updateQueryData(
19616
- // @ts-expect-error - Suggest ts ignore because of the type mismatch between emptyDetailQuery and queryName
19617
- queryName,
19618
- { subscriptionId },
19619
- (draft) => {
19620
- if (draft) {
19621
- draft.subscription.note = patch.note;
19622
- }
19623
- }
19624
- )
19281
+ const cachedSearchArgs = subscriptionListMutationApi.util.selectCachedArgsForQuery(
19282
+ getState(),
19283
+ // @ts-expect-error - search is injected by another slice, unknown to this one
19284
+ SEARCH_ENDPOINT_NAME
19625
19285
  );
19286
+ const patchResults = [
19287
+ dispatch(
19288
+ subscriptionListMutationApi.util.updateQueryData(
19289
+ // @ts-expect-error - getSubscriptionDetail is injected by another slice, unknown to this one
19290
+ "getSubscriptionDetail",
19291
+ { subscriptionId },
19292
+ (draft) => {
19293
+ if (draft?.subscription) {
19294
+ draft.subscription.note = note;
19295
+ }
19296
+ }
19297
+ )
19298
+ ),
19299
+ ...cachedSearchArgs.map((searchArgs) => patchList(SEARCH_ENDPOINT_NAME, searchArgs)),
19300
+ ...listQuery ? [patchList(listQuery.queryName, listQuery.queryVariables)] : []
19301
+ ];
19626
19302
  try {
19627
19303
  await queryFulfilled;
19628
19304
  } catch {
19629
- patchResult.undo();
19305
+ patchResults.forEach((patchResult) => patchResult.undo());
19630
19306
  }
19631
19307
  }
19632
19308
  })
19633
19309
  })
19634
19310
  });
19635
- var { useUpdateSubscriptionNoteOptimisticMutation, useUpdateSubscriptionDetailNoteOptimisticMutation } = subscriptionListMutationApi;
19311
+ var { useUpdateSubscriptionNoteOptimisticMutation } = subscriptionListMutationApi;
19636
19312
 
19637
19313
  // src/components/WfoInlineNoteEdit/WfoSubscriptionNoteEdit.tsx
19638
- import { jsx as jsx275 } from "@emotion/react/jsx-runtime";
19314
+ import { jsx as jsx273 } from "@emotion/react/jsx-runtime";
19639
19315
  var WfoSubscriptionNoteEdit = ({
19640
19316
  onlyShowOnHover = false,
19641
19317
  queryVariables,
@@ -19644,21 +19320,20 @@ var WfoSubscriptionNoteEdit = ({
19644
19320
  note
19645
19321
  }) => {
19646
19322
  const [startProcess] = useStartProcessMutation();
19647
- const [updateSub] = useUpdateSubscriptionNoteOptimisticMutation();
19323
+ const [updateSubscriptionNoteOptimistic] = useUpdateSubscriptionNoteOptimisticMutation();
19648
19324
  const triggerNoteModifyWorkflow = (note2) => {
19649
19325
  const noteModifyPayload = [{ subscription_id: subscriptionId }, { note: note2 === INVISIBLE_CHARACTER ? "" : note2 }];
19650
19326
  startProcess({
19651
19327
  workflowName: "modify_note",
19652
19328
  userInputs: noteModifyPayload
19653
19329
  });
19654
- updateSub({
19655
- queryName: endpointName ?? "",
19330
+ updateSubscriptionNoteOptimistic({
19656
19331
  subscriptionId,
19657
- graphQlQueryVariables: queryVariables,
19658
- note: note2
19332
+ note: note2,
19333
+ listQuery: { queryName: endpointName ?? "", queryVariables }
19659
19334
  });
19660
19335
  };
19661
- return /* @__PURE__ */ jsx275(
19336
+ return /* @__PURE__ */ jsx273(
19662
19337
  WfoInlineEdit,
19663
19338
  {
19664
19339
  value: note?.trim() ? note : INVISIBLE_CHARACTER,
@@ -19669,30 +19344,26 @@ var WfoSubscriptionNoteEdit = ({
19669
19344
  };
19670
19345
 
19671
19346
  // src/components/WfoInlineNoteEdit/WfoSubscriptionDetailNoteEdit.tsx
19672
- import { jsx as jsx276 } from "@emotion/react/jsx-runtime";
19347
+ import { jsx as jsx274 } from "@emotion/react/jsx-runtime";
19673
19348
  var WfoSubscriptionDetailNoteEdit = ({
19674
19349
  subscriptionId,
19675
19350
  onlyShowOnHover = false
19676
19351
  }) => {
19677
- const { data, endpointName } = useGetSubscriptionDetailQuery({
19352
+ const { data } = useGetSubscriptionDetailQuery({
19678
19353
  subscriptionId
19679
19354
  });
19680
19355
  const selectedItem = data?.subscription ?? { note: "" };
19681
19356
  const [startProcess] = useStartProcessMutation();
19682
- const [updateSub] = useUpdateSubscriptionDetailNoteOptimisticMutation();
19357
+ const [updateSubscriptionNoteOptimistic] = useUpdateSubscriptionNoteOptimisticMutation();
19683
19358
  const triggerNoteModifyWorkflow = (note) => {
19684
19359
  const noteModifyPayload = [{ subscription_id: subscriptionId }, { note }];
19685
19360
  startProcess({
19686
19361
  workflowName: "modify_note",
19687
19362
  userInputs: noteModifyPayload
19688
19363
  });
19689
- updateSub({
19690
- queryName: endpointName ?? "",
19691
- subscriptionId,
19692
- note
19693
- });
19364
+ updateSubscriptionNoteOptimistic({ subscriptionId, note });
19694
19365
  };
19695
- return /* @__PURE__ */ jsx276(
19366
+ return /* @__PURE__ */ jsx274(
19696
19367
  WfoInlineEdit,
19697
19368
  {
19698
19369
  value: selectedItem?.note?.trim() ? selectedItem.note : INVISIBLE_CHARACTER,
@@ -19703,7 +19374,7 @@ var WfoSubscriptionDetailNoteEdit = ({
19703
19374
  };
19704
19375
 
19705
19376
  // src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.tsx
19706
- import { jsx as jsx277 } from "@emotion/react/jsx-runtime";
19377
+ import { jsx as jsx275 } from "@emotion/react/jsx-runtime";
19707
19378
  var WfoProcessListNoteEdit = ({ processId, note }) => {
19708
19379
  const [patchProcess] = usePatchProcessMutation();
19709
19380
  const onSaveNote = async (note2) => {
@@ -19711,7 +19382,7 @@ var WfoProcessListNoteEdit = ({ processId, note }) => {
19711
19382
  patchProcess(noteModifyPayload);
19712
19383
  return note2;
19713
19384
  };
19714
- return /* @__PURE__ */ jsx277(WfoInlineEdit, { value: note?.trim() ? note : INVISIBLE_CHARACTER, onSave: onSaveNote });
19385
+ return /* @__PURE__ */ jsx275(WfoInlineEdit, { value: note?.trim() ? note : INVISIBLE_CHARACTER, onSave: onSaveNote });
19715
19386
  };
19716
19387
 
19717
19388
  // src/components/WfoTableCodeBlock/WfoTableCodeBlock.tsx
@@ -19731,7 +19402,7 @@ var getStyles15 = ({ theme }) => {
19731
19402
  };
19732
19403
 
19733
19404
  // src/components/WfoTableCodeBlock/WfoTableCodeBlock.tsx
19734
- import { jsx as jsx278 } from "@emotion/react/jsx-runtime";
19405
+ import { jsx as jsx276 } from "@emotion/react/jsx-runtime";
19735
19406
  var WfoTableCodeBlock = ({ stepState: data }) => {
19736
19407
  const { tableCodeBlockMarginStyle } = useWithOrchestratorTheme(getStyles15);
19737
19408
  const keyValues = Object.entries(data).map((entry) => {
@@ -19743,12 +19414,12 @@ var WfoTableCodeBlock = ({ stepState: data }) => {
19743
19414
  textToCopy: value
19744
19415
  };
19745
19416
  });
19746
- return /* @__PURE__ */ jsx278(EuiFlexItem41, { css: tableCodeBlockMarginStyle, children: /* @__PURE__ */ jsx278(WfoKeyValueTable, { keyValues, showCopyToClipboardIcon: true }) });
19417
+ return /* @__PURE__ */ jsx276(EuiFlexItem41, { css: tableCodeBlockMarginStyle, children: /* @__PURE__ */ jsx276(WfoKeyValueTable, { keyValues, showCopyToClipboardIcon: true }) });
19747
19418
  };
19748
19419
 
19749
19420
  // src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
19750
- import { useEffect as useEffect44, useState as useState62 } from "react";
19751
- import { useTranslations as useTranslations97 } from "next-intl";
19421
+ import { useEffect as useEffect43, useState as useState61 } from "react";
19422
+ import { useTranslations as useTranslations95 } from "next-intl";
19752
19423
  import {
19753
19424
  EuiButton as EuiButton23,
19754
19425
  EuiCallOut as EuiCallOut5,
@@ -19757,14 +19428,14 @@ import {
19757
19428
  EuiFlexItem as EuiFlexItem42,
19758
19429
  EuiPanel as EuiPanel15,
19759
19430
  EuiSelect as EuiSelect4,
19760
- EuiSpacer as EuiSpacer34,
19431
+ EuiSpacer as EuiSpacer33,
19761
19432
  EuiTab as EuiTab4,
19762
19433
  EuiTabs as EuiTabs4,
19763
19434
  EuiText as EuiText35
19764
19435
  } from "@elastic/eui";
19765
19436
 
19766
19437
  // src/hooks/useSearch.ts
19767
- import { useEffect as useEffect42, useState as useState59 } from "react";
19438
+ import { useEffect as useEffect41, useState as useState58 } from "react";
19768
19439
  var emptyResult = {
19769
19440
  data: [],
19770
19441
  page_info: { has_next_page: false, next_page_cursor: null },
@@ -19776,9 +19447,9 @@ var emptyResult = {
19776
19447
  }
19777
19448
  };
19778
19449
  var useSearch = (query, entityType, filterGroup, limit, retriever = "auto" /* Auto */) => {
19779
- const [results, setResults] = useState59({ ...emptyResult });
19450
+ const [results, setResults] = useState58({ ...emptyResult });
19780
19451
  const [triggerSearch, { isFetching, isError }] = useLazySearchQuery();
19781
- useEffect42(() => {
19452
+ useEffect41(() => {
19782
19453
  const queryText = typeof query === "string" ? query : query.text?.trim() || "";
19783
19454
  const hasFilters = filterGroup && filterGroup.children.length > 0;
19784
19455
  if (queryText.length < 2 && !hasFilters) {
@@ -19827,12 +19498,12 @@ var useSearch = (query, entityType, filterGroup, limit, retriever = "auto" /* Au
19827
19498
  };
19828
19499
 
19829
19500
  // src/hooks/useSearchPagination.ts
19830
- import { useCallback as useCallback16, useState as useState60 } from "react";
19501
+ import { useCallback as useCallback16, useState as useState59 } from "react";
19831
19502
  var useSearchPagination = (debouncedQuery, selectedEntityTab, filterGroup, pageSize, results, setResults, retriever) => {
19832
- const [currentPage, setCurrentPage] = useState60(1);
19833
- const [pageHistory, setPageHistory] = useState60([]);
19834
- const [error, setError] = useState60(null);
19835
- const [isLoadingMore, setIsLoadingMore] = useState60(false);
19503
+ const [currentPage, setCurrentPage] = useState59(1);
19504
+ const [pageHistory, setPageHistory] = useState59([]);
19505
+ const [error, setError] = useState59(null);
19506
+ const [isLoadingMore, setIsLoadingMore] = useState59(false);
19836
19507
  const [triggerSearchPagination] = useSearchWithPaginationMutation();
19837
19508
  const handleNextPage = useCallback16(
19838
19509
  async (nextPageCursor) => {
@@ -19927,30 +19598,30 @@ var useSearchPagination = (debouncedQuery, selectedEntityTab, filterGroup, pageS
19927
19598
  };
19928
19599
 
19929
19600
  // src/hooks/useUrlParams.ts
19930
- import { useCallback as useCallback17, useEffect as useEffect43, useState as useState61 } from "react";
19601
+ import { useCallback as useCallback17, useEffect as useEffect42, useState as useState60 } from "react";
19931
19602
  var useUrlParams = () => {
19932
- const [urlParams, setUrlParams] = useState61(() => {
19603
+ const [urlParams, setUrlParams] = useState60(() => {
19933
19604
  if (typeof window !== "undefined") {
19934
19605
  return new URLSearchParams(window.location.search);
19935
19606
  }
19936
19607
  return new URLSearchParams();
19937
19608
  });
19938
- const [query, setQuery] = useState61(() => {
19609
+ const [query, setQuery] = useState60(() => {
19939
19610
  const queryParam = urlParams.get("q");
19940
19611
  return queryParam || "";
19941
19612
  });
19942
- const [selectedEntityTab, setSelectedEntityTab] = useState61(() => {
19613
+ const [selectedEntityTab, setSelectedEntityTab] = useState60(() => {
19943
19614
  const entityKind = urlParams.get("tab");
19944
19615
  return entityKind && Object.values(EntityKind).includes(entityKind) ? entityKind : "SUBSCRIPTION" /* SUBSCRIPTION */;
19945
19616
  });
19946
- const [showFilters, setShowFilters] = useState61(() => {
19617
+ const [showFilters, setShowFilters] = useState60(() => {
19947
19618
  return urlParams.get("filters") === "true";
19948
19619
  });
19949
- const [selectedRecordIndex, setSelectedRecordIndex] = useState61(() => {
19620
+ const [selectedRecordIndex, setSelectedRecordIndex] = useState60(() => {
19950
19621
  const indexParam = urlParams.get("selected");
19951
19622
  return indexParam ? parseInt(indexParam, 10) || 0 : 0;
19952
19623
  });
19953
- const [selectedRecordId, setSelectedRecordId] = useState61(() => {
19624
+ const [selectedRecordId, setSelectedRecordId] = useState60(() => {
19954
19625
  return urlParams.get("id") || null;
19955
19626
  });
19956
19627
  const updateUrl = useCallback17(() => {
@@ -19975,7 +19646,7 @@ var useUrlParams = () => {
19975
19646
  window.history.replaceState({}, "", newUrl);
19976
19647
  setUrlParams(newParams);
19977
19648
  }, [query, selectedEntityTab, showFilters, selectedRecordIndex, selectedRecordId]);
19978
- useEffect43(() => {
19649
+ useEffect42(() => {
19979
19650
  updateUrl();
19980
19651
  }, [updateUrl]);
19981
19652
  return {
@@ -20003,9 +19674,9 @@ var LAYOUT_RATIOS = {
20003
19674
  };
20004
19675
 
20005
19676
  // src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx
20006
- import { Fragment as Fragment65, jsx as jsx279, jsxs as jsxs145 } from "@emotion/react/jsx-runtime";
19677
+ import { Fragment as Fragment64, jsx as jsx277, jsxs as jsxs144 } from "@emotion/react/jsx-runtime";
20007
19678
  var WfoSearch = () => {
20008
- const t = useTranslations97("search.page");
19679
+ const t = useTranslations95("search.page");
20009
19680
  const searchAvailability = useSearchAvailability();
20010
19681
  const {
20011
19682
  urlParams,
@@ -20021,12 +19692,12 @@ var WfoSearch = () => {
20021
19692
  setSelectedRecordId
20022
19693
  } = useUrlParams();
20023
19694
  const pageSize = DEFAULT_PAGE_SIZE2;
20024
- const [filterGroup, setFilterGroup] = useState62({
19695
+ const [filterGroup, setFilterGroup] = useState61({
20025
19696
  op: "AND",
20026
19697
  children: []
20027
19698
  });
20028
- const [showDetailPanel, setShowDetailPanel] = useState62(false);
20029
- const [retrieverType, setRetrieverType] = useState62("auto" /* Auto */);
19699
+ const [showDetailPanel, setShowDetailPanel] = useState61(false);
19700
+ const [retrieverType, setRetrieverType] = useState61("auto" /* Auto */);
20030
19701
  const debouncedQuery = useDebounce(query, DEFAULT_DEBOUNCE_DELAY);
20031
19702
  const { results, loading, setResults } = useSearch(
20032
19703
  debouncedQuery,
@@ -20035,8 +19706,8 @@ var WfoSearch = () => {
20035
19706
  pageSize,
20036
19707
  retrieverType
20037
19708
  );
20038
- const [hasSearchBeenAttempted, setHasSearchBeenAttempted] = useState62(false);
20039
- useEffect44(() => {
19709
+ const [hasSearchBeenAttempted, setHasSearchBeenAttempted] = useState61(false);
19710
+ useEffect43(() => {
20040
19711
  const queryText = typeof debouncedQuery === "string" ? debouncedQuery : debouncedQuery?.text?.trim() || "";
20041
19712
  const hasFilters = filterGroup && filterGroup.children.length > 0;
20042
19713
  if (queryText.length >= 2 || hasFilters) {
@@ -20046,7 +19717,7 @@ var WfoSearch = () => {
20046
19717
  }
20047
19718
  }, [debouncedQuery, filterGroup]);
20048
19719
  const { currentPage, error, isLoadingMore, handleNextPage, handlePrevPage, resetPagination, setError } = useSearchPagination(debouncedQuery, selectedEntityTab, filterGroup, pageSize, results, setResults, retrieverType);
20049
- const [searchValue, setSearchValue] = useState62(() => {
19720
+ const [searchValue, setSearchValue] = useState61(() => {
20050
19721
  if (typeof query === "string") {
20051
19722
  return query;
20052
19723
  }
@@ -20084,7 +19755,7 @@ var WfoSearch = () => {
20084
19755
  setSearchValue(searchText);
20085
19756
  setQuery(searchText);
20086
19757
  };
20087
- useEffect44(() => {
19758
+ useEffect43(() => {
20088
19759
  if (typeof query === "string") {
20089
19760
  if (query !== searchValue) {
20090
19761
  setSearchValue(query);
@@ -20101,7 +19772,7 @@ var WfoSearch = () => {
20101
19772
  const shouldShowNoResults = (() => {
20102
19773
  return hasSearchBeenAttempted && !loading && results.data.length === 0;
20103
19774
  })();
20104
- useEffect44(() => {
19775
+ useEffect43(() => {
20105
19776
  if (results.data.length > 0) {
20106
19777
  if (selectedRecordId) {
20107
19778
  const foundIndex = results.data.findIndex((result) => result.entity_id === selectedRecordId);
@@ -20119,17 +19790,17 @@ var WfoSearch = () => {
20119
19790
  }
20120
19791
  }
20121
19792
  }, [results.data, selectedRecordId, setSelectedRecordId, setSelectedRecordIndex, urlParams]);
20122
- useEffect44(() => {
19793
+ useEffect43(() => {
20123
19794
  setShowDetailPanel(results?.data?.length > 0 && selectedRecordIndex >= 0 && selectedEntityTab === "SUBSCRIPTION");
20124
19795
  }, [results?.data?.length, selectedRecordIndex, selectedEntityTab]);
20125
- useEffect44(() => {
19796
+ useEffect43(() => {
20126
19797
  resetPagination();
20127
19798
  }, [debouncedQuery, selectedEntityTab, filterGroup, resetPagination]);
20128
19799
  const { RESULTS_GROW, DETAIL_GROW } = LAYOUT_RATIOS;
20129
- return /* @__PURE__ */ jsxs145(WfoAvailabilityCheck, { featureType: "search", availability: searchAvailability, children: [
20130
- /* @__PURE__ */ jsx279(EuiTabs4, { children: ENTITY_TABS.map((tab) => /* @__PURE__ */ jsx279(EuiTab4, { onClick: () => handleTabChange(tab.id), isSelected: selectedEntityTab === tab.id, children: tab.label }, tab.id)) }),
20131
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "m" }),
20132
- /* @__PURE__ */ jsx279(
19800
+ return /* @__PURE__ */ jsxs144(WfoAvailabilityCheck, { featureType: "search", availability: searchAvailability, children: [
19801
+ /* @__PURE__ */ jsx277(EuiTabs4, { children: ENTITY_TABS.map((tab) => /* @__PURE__ */ jsx277(EuiTab4, { onClick: () => handleTabChange(tab.id), isSelected: selectedEntityTab === tab.id, children: tab.label }, tab.id)) }),
19802
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "m" }),
19803
+ /* @__PURE__ */ jsx277(
20133
19804
  EuiFieldSearch4,
20134
19805
  {
20135
19806
  placeholder: t("searchPlaceholder", {
@@ -20146,11 +19817,11 @@ var WfoSearch = () => {
20146
19817
  fullWidth: true
20147
19818
  }
20148
19819
  ),
20149
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "s" }),
20150
- /* @__PURE__ */ jsxs145(EuiFlexGroup39, { gutterSize: "s", alignItems: "center", children: [
20151
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx279(EuiButton23, { iconType: showFilters ? "eyeClosed" : "eye", size: "s", onClick: () => setShowFilters(!showFilters), children: showFilters ? t("hideFilters") : t("showFilters") }) }),
20152
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: true }),
20153
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx279(
19820
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "s" }),
19821
+ /* @__PURE__ */ jsxs144(EuiFlexGroup39, { gutterSize: "s", alignItems: "center", children: [
19822
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx277(EuiButton23, { iconType: showFilters ? "eyeClosed" : "eye", size: "s", onClick: () => setShowFilters(!showFilters), children: showFilters ? t("hideFilters") : t("showFilters") }) }),
19823
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: true }),
19824
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx277(
20154
19825
  EuiSelect4,
20155
19826
  {
20156
19827
  options: [
@@ -20178,37 +19849,37 @@ var WfoSearch = () => {
20178
19849
  }
20179
19850
  ) })
20180
19851
  ] }),
20181
- showFilters && /* @__PURE__ */ jsxs145(Fragment65, { children: [
20182
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "m" }),
20183
- /* @__PURE__ */ jsxs145(EuiPanel15, { hasBorder: true, paddingSize: "m", children: [
20184
- /* @__PURE__ */ jsx279(EuiText35, { children: /* @__PURE__ */ jsx279("h4", { children: t("structuredFilters") }) }),
20185
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "s" }),
20186
- /* @__PURE__ */ jsx279(FilterGroup, { group: filterGroup, entityType: selectedEntityTab, onChange: setFilterGroup, isRoot: true })
19852
+ showFilters && /* @__PURE__ */ jsxs144(Fragment64, { children: [
19853
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "m" }),
19854
+ /* @__PURE__ */ jsxs144(EuiPanel15, { hasBorder: true, paddingSize: "m", children: [
19855
+ /* @__PURE__ */ jsx277(EuiText35, { children: /* @__PURE__ */ jsx277("h4", { children: t("structuredFilters") }) }),
19856
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "s" }),
19857
+ /* @__PURE__ */ jsx277(FilterGroup, { group: filterGroup, entityType: selectedEntityTab, onChange: setFilterGroup, isRoot: true })
20187
19858
  ] })
20188
19859
  ] }),
20189
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "m" }),
20190
- error && /* @__PURE__ */ jsxs145(Fragment65, { children: [
20191
- /* @__PURE__ */ jsxs145(EuiCallOut5, { title: t("searchError"), color: "danger", iconType: "alert", size: "s", children: [
20192
- /* @__PURE__ */ jsx279("p", { children: error }),
20193
- /* @__PURE__ */ jsx279(EuiButton23, { size: "s", color: "danger", onClick: () => setError(null), children: t("dismiss") })
19860
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "m" }),
19861
+ error && /* @__PURE__ */ jsxs144(Fragment64, { children: [
19862
+ /* @__PURE__ */ jsxs144(EuiCallOut5, { title: t("searchError"), color: "danger", iconType: "alert", size: "s", children: [
19863
+ /* @__PURE__ */ jsx277("p", { children: error }),
19864
+ /* @__PURE__ */ jsx277(EuiButton23, { size: "s", color: "danger", onClick: () => setError(null), children: t("dismiss") })
20194
19865
  ] }),
20195
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "m" })
19866
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "m" })
20196
19867
  ] }),
20197
- shouldShowNoResults && /* @__PURE__ */ jsxs145(Fragment65, { children: [
20198
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "l" }),
20199
- /* @__PURE__ */ jsxs145(EuiCallOut5, { title: t("noResults"), color: "primary", iconType: "search", size: "m", children: [
20200
- /* @__PURE__ */ jsx279("p", { children: t("noResultsMessage", {
19868
+ shouldShowNoResults && /* @__PURE__ */ jsxs144(Fragment64, { children: [
19869
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "l" }),
19870
+ /* @__PURE__ */ jsxs144(EuiCallOut5, { title: t("noResults"), color: "primary", iconType: "search", size: "m", children: [
19871
+ /* @__PURE__ */ jsx277("p", { children: t("noResultsMessage", {
20201
19872
  entityType: currentTab?.label.toLowerCase() || ""
20202
19873
  }) }),
20203
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "s" }),
20204
- /* @__PURE__ */ jsx279(EuiText35, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx279("p", { children: t("noResultsSuggestions") }) })
19874
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "s" }),
19875
+ /* @__PURE__ */ jsx277(EuiText35, { size: "s", color: "subdued", children: /* @__PURE__ */ jsx277("p", { children: t("noResultsSuggestions") }) })
20205
19876
  ] }),
20206
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "l" })
19877
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "l" })
20207
19878
  ] }),
20208
- isSearchActive && /* @__PURE__ */ jsxs145(Fragment65, { children: [
20209
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "m" }),
20210
- /* @__PURE__ */ jsxs145(EuiFlexGroup39, { gutterSize: "s", alignItems: "center", children: [
20211
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsxs145(
19879
+ isSearchActive && /* @__PURE__ */ jsxs144(Fragment64, { children: [
19880
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "m" }),
19881
+ /* @__PURE__ */ jsxs144(EuiFlexGroup39, { gutterSize: "s", alignItems: "center", children: [
19882
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsxs144(
20212
19883
  EuiFlexGroup39,
20213
19884
  {
20214
19885
  gutterSize: "s",
@@ -20217,8 +19888,8 @@ var WfoSearch = () => {
20217
19888
  responsive: false,
20218
19889
  style: { width: "100%" },
20219
19890
  children: [
20220
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx279(WfoSearchMetadataHeader, { search_metadata: results.search_metadata }) }),
20221
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx279(
19891
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx277(WfoSearchMetadataHeader, { search_metadata: results.search_metadata }) }),
19892
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: false, children: /* @__PURE__ */ jsx277(
20222
19893
  WfoSearchPaginationInfo,
20223
19894
  {
20224
19895
  has_next_page: results.page_info.has_next_page,
@@ -20234,11 +19905,11 @@ var WfoSearch = () => {
20234
19905
  ]
20235
19906
  }
20236
19907
  ) }),
20237
- showDetailPanel && /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: DETAIL_GROW })
19908
+ showDetailPanel && /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: DETAIL_GROW })
20238
19909
  ] }),
20239
- /* @__PURE__ */ jsx279(EuiSpacer34, { size: "s" }),
20240
- /* @__PURE__ */ jsxs145(EuiFlexGroup39, { gutterSize: "s", alignItems: "flexStart", children: [
20241
- /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsx279(EuiPanel15, { paddingSize: "none", hasBorder: true, children: /* @__PURE__ */ jsx279(
19910
+ /* @__PURE__ */ jsx277(EuiSpacer33, { size: "s" }),
19911
+ /* @__PURE__ */ jsxs144(EuiFlexGroup39, { gutterSize: "s", alignItems: "flexStart", children: [
19912
+ /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: showDetailPanel ? RESULTS_GROW : 1, children: /* @__PURE__ */ jsx277(EuiPanel15, { paddingSize: "none", hasBorder: true, children: /* @__PURE__ */ jsx277(
20242
19913
  WfoSearchResults,
20243
19914
  {
20244
19915
  results: results.data,
@@ -20253,7 +19924,7 @@ var WfoSearch = () => {
20253
19924
  }
20254
19925
  }
20255
19926
  ) }) }),
20256
- showDetailPanel && /* @__PURE__ */ jsx279(EuiFlexItem42, { grow: DETAIL_GROW, children: /* @__PURE__ */ jsx279(EuiPanel15, { paddingSize: "m", hasBorder: true, hasShadow: false, color: "transparent", children: results.data[selectedRecordIndex] && /* @__PURE__ */ jsx279(TreeProvider, { children: /* @__PURE__ */ jsx279(WfoSubscription, { subscriptionId: results.data[selectedRecordIndex].entity_id }) }) }) })
19927
+ showDetailPanel && /* @__PURE__ */ jsx277(EuiFlexItem42, { grow: DETAIL_GROW, children: /* @__PURE__ */ jsx277(EuiPanel15, { paddingSize: "m", hasBorder: true, hasShadow: false, color: "transparent", children: results.data[selectedRecordIndex] && /* @__PURE__ */ jsx277(TreeProvider, { children: /* @__PURE__ */ jsx277(WfoSubscription, { subscriptionId: results.data[selectedRecordIndex].entity_id }) }) }) })
20257
19928
  ] })
20258
19929
  ] })
20259
19930
  ] });
@@ -20263,34 +19934,34 @@ var WfoSearch = () => {
20263
19934
  import { EuiFlexGroup as EuiFlexGroup44, EuiPanel as EuiPanel19 } from "@elastic/eui";
20264
19935
 
20265
19936
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchEmptyState.tsx
20266
- import { useTranslations as useTranslations98 } from "next-intl";
19937
+ import { useTranslations as useTranslations96 } from "next-intl";
20267
19938
  import { EuiFlexGroup as EuiFlexGroup40, EuiFlexItem as EuiFlexItem43, EuiPanel as EuiPanel16, EuiText as EuiText36 } from "@elastic/eui";
20268
- import { jsx as jsx280 } from "@emotion/react/jsx-runtime";
19939
+ import { jsx as jsx278 } from "@emotion/react/jsx-runtime";
20269
19940
  var WfoSearchEmptyState = () => {
20270
- const t = useTranslations98("search.page");
19941
+ const t = useTranslations96("search.page");
20271
19942
  const { theme } = useOrchestratorTheme();
20272
- return /* @__PURE__ */ jsx280(EuiPanel16, { paddingSize: "l", color: "transparent", hasShadow: false, children: /* @__PURE__ */ jsx280(EuiFlexGroup40, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx280(EuiFlexItem43, { grow: false, children: /* @__PURE__ */ jsx280(EuiText36, { size: "m", color: theme.colors.textSubdued, children: t("noResultsFound") }) }) }) });
19943
+ return /* @__PURE__ */ jsx278(EuiPanel16, { paddingSize: "l", color: "transparent", hasShadow: false, children: /* @__PURE__ */ jsx278(EuiFlexGroup40, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx278(EuiFlexItem43, { grow: false, children: /* @__PURE__ */ jsx278(EuiText36, { size: "m", color: theme.colors.textSubdued, children: t("noResultsFound") }) }) }) });
20273
19944
  };
20274
19945
 
20275
19946
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchLoadingState.tsx
20276
- import { useTranslations as useTranslations99 } from "next-intl";
19947
+ import { useTranslations as useTranslations97 } from "next-intl";
20277
19948
  import { EuiFlexGroup as EuiFlexGroup41, EuiFlexItem as EuiFlexItem44, EuiPanel as EuiPanel17, EuiText as EuiText37 } from "@elastic/eui";
20278
- import { jsx as jsx281 } from "@emotion/react/jsx-runtime";
19949
+ import { jsx as jsx279 } from "@emotion/react/jsx-runtime";
20279
19950
  var WfoSearchLoadingState = () => {
20280
- const t = useTranslations99("search.page");
19951
+ const t = useTranslations97("search.page");
20281
19952
  const { theme } = useOrchestratorTheme();
20282
- return /* @__PURE__ */ jsx281(EuiPanel17, { paddingSize: "l", color: "transparent", hasShadow: false, children: /* @__PURE__ */ jsx281(EuiFlexGroup41, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx281(EuiFlexItem44, { grow: false, children: /* @__PURE__ */ jsx281(EuiText37, { size: "m", color: theme.colors.textSubdued, children: t("loadingSearchResults") }) }) }) });
19953
+ return /* @__PURE__ */ jsx279(EuiPanel17, { paddingSize: "l", color: "transparent", hasShadow: false, children: /* @__PURE__ */ jsx279(EuiFlexGroup41, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx279(EuiFlexItem44, { grow: false, children: /* @__PURE__ */ jsx279(EuiText37, { size: "m", color: theme.colors.textSubdued, children: t("loadingSearchResults") }) }) }) });
20283
19954
  };
20284
19955
 
20285
19956
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx
20286
- import { useEffect as useEffect45, useRef as useRef21 } from "react";
20287
- import { useTranslations as useTranslations100 } from "next-intl";
20288
- import { EuiButtonIcon as EuiButtonIcon17, EuiFlexGroup as EuiFlexGroup43, EuiFlexItem as EuiFlexItem46, EuiPanel as EuiPanel18, EuiSpacer as EuiSpacer35, EuiText as EuiText38 } from "@elastic/eui";
19957
+ import { useEffect as useEffect44, useRef as useRef21 } from "react";
19958
+ import { useTranslations as useTranslations98 } from "next-intl";
19959
+ import { EuiButtonIcon as EuiButtonIcon17, EuiFlexGroup as EuiFlexGroup43, EuiFlexItem as EuiFlexItem46, EuiPanel as EuiPanel18, EuiSpacer as EuiSpacer34, EuiText as EuiText38 } from "@elastic/eui";
20289
19960
 
20290
19961
  // src/components/WfoSearchPage/WfoSearchResults/WfoPathBreadcrumb.tsx
20291
- import { Fragment as Fragment66 } from "react";
19962
+ import { Fragment as Fragment65 } from "react";
20292
19963
  import { EuiFlexGroup as EuiFlexGroup42, EuiFlexItem as EuiFlexItem45, EuiIcon as EuiIcon5 } from "@elastic/eui";
20293
- import { jsx as jsx282, jsxs as jsxs146 } from "@emotion/react/jsx-runtime";
19964
+ import { jsx as jsx280, jsxs as jsxs145 } from "@emotion/react/jsx-runtime";
20294
19965
  var WfoPathBreadcrumb = ({
20295
19966
  path,
20296
19967
  size = "m",
@@ -20309,14 +19980,14 @@ var WfoPathBreadcrumb = ({
20309
19980
  }
20310
19981
  const displaySegments = maxSegments && segments.length > maxSegments ? [...segments.slice(0, maxSegments - 1), "...", segments[segments.length - 1]] : segments;
20311
19982
  const badgeColor = color || theme.colors.primary;
20312
- return /* @__PURE__ */ jsx282(EuiFlexGroup42, { gutterSize: size, alignItems: "center", wrap: false, responsive: false, children: displaySegments.map((segment, index) => /* @__PURE__ */ jsxs146(Fragment66, { children: [
20313
- /* @__PURE__ */ jsx282(EuiFlexItem45, { grow: false, children: /* @__PURE__ */ jsx282(WfoBadge, { color: badgeColor, textColor: theme.colors.textGhost, size, children: segment }) }),
20314
- showArrows && index < displaySegments.length - 1 && /* @__PURE__ */ jsx282(EuiFlexItem45, { grow: false, children: /* @__PURE__ */ jsx282(EuiIcon5, { type: "arrowRight", size, color: theme.colors.link }) })
19983
+ return /* @__PURE__ */ jsx280(EuiFlexGroup42, { gutterSize: size, alignItems: "center", wrap: false, responsive: false, children: displaySegments.map((segment, index) => /* @__PURE__ */ jsxs145(Fragment65, { children: [
19984
+ /* @__PURE__ */ jsx280(EuiFlexItem45, { grow: false, children: /* @__PURE__ */ jsx280(WfoBadge, { color: badgeColor, textColor: theme.colors.textGhost, size, children: segment }) }),
19985
+ showArrows && index < displaySegments.length - 1 && /* @__PURE__ */ jsx280(EuiFlexItem45, { grow: false, children: /* @__PURE__ */ jsx280(EuiIcon5, { type: "arrowRight", size, color: theme.colors.link }) })
20315
19986
  ] }, index)) });
20316
19987
  };
20317
19988
 
20318
19989
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchResultItem.tsx
20319
- import { Fragment as Fragment67, jsx as jsx283, jsxs as jsxs147 } from "@emotion/react/jsx-runtime";
19990
+ import { Fragment as Fragment66, jsx as jsx281, jsxs as jsxs146 } from "@emotion/react/jsx-runtime";
20320
19991
  var WfoSearchResultItem = ({
20321
19992
  result,
20322
19993
  isSelected = false,
@@ -20324,19 +19995,19 @@ var WfoSearchResultItem = ({
20324
19995
  onPositionChange,
20325
19996
  index
20326
19997
  }) => {
20327
- const t = useTranslations100("search.page");
19998
+ const t = useTranslations98("search.page");
20328
19999
  const matchingFields = result.matching_fields;
20329
20000
  const matchingField = matchingFields?.[0];
20330
20001
  const { theme } = useOrchestratorTheme();
20331
20002
  const baseUrl = `${window.location.protocol}//${window.location.host}`;
20332
20003
  const detailUrl = getDetailUrl(result, baseUrl);
20333
20004
  const itemRef = useRef21(null);
20334
- useEffect45(() => {
20005
+ useEffect44(() => {
20335
20006
  if (isSelected && onPositionChange && itemRef.current) {
20336
20007
  onPositionChange(index, itemRef.current);
20337
20008
  }
20338
20009
  }, [isSelected, index, onPositionChange]);
20339
- return /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsx283(
20010
+ return /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsx281(
20340
20011
  EuiPanel18,
20341
20012
  {
20342
20013
  panelRef: itemRef,
@@ -20353,9 +20024,9 @@ var WfoSearchResultItem = ({
20353
20024
  borderRight: "none",
20354
20025
  borderColor: theme.colors.primary
20355
20026
  } : void 0,
20356
- children: /* @__PURE__ */ jsxs147(EuiFlexGroup43, { alignItems: "flexStart", gutterSize: "m", children: [
20357
- /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsxs147(EuiFlexGroup43, { direction: "column", gutterSize: "xs", children: [
20358
- /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsx283(
20027
+ children: /* @__PURE__ */ jsxs146(EuiFlexGroup43, { alignItems: "flexStart", gutterSize: "m", children: [
20028
+ /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsxs146(EuiFlexGroup43, { direction: "column", gutterSize: "xs", children: [
20029
+ /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsx281(
20359
20030
  EuiText38,
20360
20031
  {
20361
20032
  size: "m",
@@ -20365,8 +20036,8 @@ var WfoSearchResultItem = ({
20365
20036
  children: result.entity_title
20366
20037
  }
20367
20038
  ) }),
20368
- matchingField && /* @__PURE__ */ jsxs147(Fragment67, { children: [
20369
- matchingField.path && /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsx283(
20039
+ matchingField && /* @__PURE__ */ jsxs146(Fragment66, { children: [
20040
+ matchingField.path && /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsx281(
20370
20041
  WfoPathBreadcrumb,
20371
20042
  {
20372
20043
  path: matchingField.path,
@@ -20375,7 +20046,7 @@ var WfoSearchResultItem = ({
20375
20046
  color: theme.colors.primary
20376
20047
  }
20377
20048
  ) }),
20378
- /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsx283(
20049
+ /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsx281(
20379
20050
  EuiText38,
20380
20051
  {
20381
20052
  style: {
@@ -20383,7 +20054,7 @@ var WfoSearchResultItem = ({
20383
20054
  borderRadius: theme.border.radius.medium,
20384
20055
  fontSize: theme.size.base
20385
20056
  },
20386
- children: /* @__PURE__ */ jsx283(
20057
+ children: /* @__PURE__ */ jsx281(
20387
20058
  WfoHighlightedText,
20388
20059
  {
20389
20060
  text: matchingField.text,
@@ -20392,12 +20063,12 @@ var WfoSearchResultItem = ({
20392
20063
  )
20393
20064
  }
20394
20065
  ) }),
20395
- /* @__PURE__ */ jsx283(EuiSpacer35, { size: "xs" })
20066
+ /* @__PURE__ */ jsx281(EuiSpacer34, { size: "xs" })
20396
20067
  ] })
20397
20068
  ] }) }),
20398
- /* @__PURE__ */ jsx283(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsxs147(EuiFlexGroup43, { direction: "column", alignItems: "flexEnd", gutterSize: "xs", children: [
20399
- /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsx283(WfoBadge, { color: theme.colors.primary, textColor: theme.colors.textGhost, children: "score" in result && result.score ? result.score.toFixed(4) : "N/A" }) }),
20400
- /* @__PURE__ */ jsx283(EuiFlexItem46, { children: /* @__PURE__ */ jsx283(
20069
+ /* @__PURE__ */ jsx281(EuiFlexItem46, { grow: false, children: /* @__PURE__ */ jsxs146(EuiFlexGroup43, { direction: "column", alignItems: "flexEnd", gutterSize: "xs", children: [
20070
+ /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsx281(WfoBadge, { color: theme.colors.primary, textColor: theme.colors.textGhost, children: "score" in result && result.score ? result.score.toFixed(4) : "N/A" }) }),
20071
+ /* @__PURE__ */ jsx281(EuiFlexItem46, { children: /* @__PURE__ */ jsx281(
20401
20072
  EuiButtonIcon17,
20402
20073
  {
20403
20074
  iconType: "popout",
@@ -20417,7 +20088,7 @@ var WfoSearchResultItem = ({
20417
20088
  };
20418
20089
 
20419
20090
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchResults.tsx
20420
- import { jsx as jsx284 } from "@emotion/react/jsx-runtime";
20091
+ import { jsx as jsx282 } from "@emotion/react/jsx-runtime";
20421
20092
  var WfoSearchResults = ({
20422
20093
  results,
20423
20094
  loading,
@@ -20425,12 +20096,12 @@ var WfoSearchResults = ({
20425
20096
  onRecordSelect
20426
20097
  }) => {
20427
20098
  if (loading) {
20428
- return /* @__PURE__ */ jsx284(WfoSearchLoadingState, {});
20099
+ return /* @__PURE__ */ jsx282(WfoSearchLoadingState, {});
20429
20100
  }
20430
20101
  if (!results || results.length === 0) {
20431
- return /* @__PURE__ */ jsx284(WfoSearchEmptyState, {});
20102
+ return /* @__PURE__ */ jsx282(WfoSearchEmptyState, {});
20432
20103
  }
20433
- return /* @__PURE__ */ jsx284(EuiPanel19, { paddingSize: "m", hasShadow: false, children: /* @__PURE__ */ jsx284(EuiFlexGroup44, { direction: "column", gutterSize: "s", children: results.map((result, idx) => /* @__PURE__ */ jsx284(
20104
+ return /* @__PURE__ */ jsx282(EuiPanel19, { paddingSize: "m", hasShadow: false, children: /* @__PURE__ */ jsx282(EuiFlexGroup44, { direction: "column", gutterSize: "s", children: results.map((result, idx) => /* @__PURE__ */ jsx282(
20434
20105
  WfoSearchResultItem,
20435
20106
  {
20436
20107
  result,
@@ -20445,16 +20116,16 @@ var WfoSearchResults = ({
20445
20116
  };
20446
20117
 
20447
20118
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchMetadataHeader.tsx
20448
- import { jsx as jsx285 } from "@emotion/react/jsx-runtime";
20119
+ import { jsx as jsx283 } from "@emotion/react/jsx-runtime";
20449
20120
  var WfoSearchMetadataHeader = ({ search_metadata }) => {
20450
20121
  if (!search_metadata.search_type) return null;
20451
- return /* @__PURE__ */ jsx285(WfoToolTip, { tooltipContent: search_metadata.description || "", children: /* @__PURE__ */ jsx285(WfoBadge, { color: "hollow", iconType: "search", textColor: "default", children: search_metadata.search_type }) });
20122
+ return /* @__PURE__ */ jsx283(WfoToolTip, { tooltipContent: search_metadata.description || "", children: /* @__PURE__ */ jsx283(WfoBadge, { color: "hollow", iconType: "search", textColor: "default", children: search_metadata.search_type }) });
20452
20123
  };
20453
20124
 
20454
20125
  // src/components/WfoSearchPage/WfoSearchResults/WfoSearchPaginationInfo.tsx
20455
- import { useTranslations as useTranslations101 } from "next-intl";
20126
+ import { useTranslations as useTranslations99 } from "next-intl";
20456
20127
  import { EuiButtonIcon as EuiButtonIcon18, EuiFlexGroup as EuiFlexGroup45, EuiFlexItem as EuiFlexItem47, EuiText as EuiText39 } from "@elastic/eui";
20457
- import { jsx as jsx286, jsxs as jsxs148 } from "@emotion/react/jsx-runtime";
20128
+ import { jsx as jsx284, jsxs as jsxs147 } from "@emotion/react/jsx-runtime";
20458
20129
  var WfoSearchPaginationInfo = ({
20459
20130
  has_next_page,
20460
20131
  next_page_cursor,
@@ -20465,7 +20136,7 @@ var WfoSearchPaginationInfo = ({
20465
20136
  hasPrevPage = false,
20466
20137
  resultCount
20467
20138
  }) => {
20468
- const t = useTranslations101("search.page");
20139
+ const t = useTranslations99("search.page");
20469
20140
  const { theme } = useOrchestratorTheme();
20470
20141
  const handleNextPage = () => {
20471
20142
  if (!isLoading && next_page_cursor && onNextPage) onNextPage(next_page_cursor);
@@ -20474,7 +20145,7 @@ var WfoSearchPaginationInfo = ({
20474
20145
  if (!isLoading && onPrevPage) onPrevPage();
20475
20146
  };
20476
20147
  if (!has_next_page && !hasPrevPage) return null;
20477
- return /* @__PURE__ */ jsxs148(
20148
+ return /* @__PURE__ */ jsxs147(
20478
20149
  EuiFlexGroup45,
20479
20150
  {
20480
20151
  justifyContent: "flexEnd",
@@ -20490,7 +20161,7 @@ var WfoSearchPaginationInfo = ({
20490
20161
  role: "navigation",
20491
20162
  "aria-label": t("searchResultsPagination"),
20492
20163
  children: [
20493
- /* @__PURE__ */ jsx286(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx286(
20164
+ /* @__PURE__ */ jsx284(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx284(
20494
20165
  EuiButtonIcon18,
20495
20166
  {
20496
20167
  iconType: "arrowLeft",
@@ -20501,12 +20172,12 @@ var WfoSearchPaginationInfo = ({
20501
20172
  size: "s"
20502
20173
  }
20503
20174
  ) }),
20504
- /* @__PURE__ */ jsx286(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsxs148(EuiText39, { size: "xs", color: theme.colors.textSubdued, children: [
20175
+ /* @__PURE__ */ jsx284(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsxs147(EuiText39, { size: "xs", color: theme.colors.textSubdued, children: [
20505
20176
  t("page"),
20506
20177
  " ",
20507
20178
  currentPage
20508
20179
  ] }) }),
20509
- /* @__PURE__ */ jsx286(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx286(
20180
+ /* @__PURE__ */ jsx284(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx284(
20510
20181
  EuiButtonIcon18,
20511
20182
  {
20512
20183
  iconType: "arrowRight",
@@ -20518,14 +20189,14 @@ var WfoSearchPaginationInfo = ({
20518
20189
  isLoading
20519
20190
  }
20520
20191
  ) }),
20521
- resultCount && resultCount > 0 && /* @__PURE__ */ jsx286(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx286(WfoBadge, { className: "wfoPagination__badge", color: "hollow", textColor: "default", children: t("resultsOnPage", { resultCount }) }) })
20192
+ resultCount && resultCount > 0 && /* @__PURE__ */ jsx284(EuiFlexItem47, { grow: false, children: /* @__PURE__ */ jsx284(WfoBadge, { className: "wfoPagination__badge", color: "hollow", textColor: "default", children: t("resultsOnPage", { resultCount }) }) })
20522
20193
  ]
20523
20194
  }
20524
20195
  );
20525
20196
  };
20526
20197
 
20527
20198
  // src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx
20528
- import { useTranslations as useTranslations108 } from "next-intl";
20199
+ import { useTranslations as useTranslations106 } from "next-intl";
20529
20200
  import {
20530
20201
  EuiButton as EuiButton25,
20531
20202
  EuiButtonIcon as EuiButtonIcon20,
@@ -20534,18 +20205,18 @@ import {
20534
20205
  EuiFlexGroup as EuiFlexGroup51,
20535
20206
  EuiFlexItem as EuiFlexItem53,
20536
20207
  EuiPanel as EuiPanel21,
20537
- EuiSpacer as EuiSpacer36,
20208
+ EuiSpacer as EuiSpacer35,
20538
20209
  EuiText as EuiText44
20539
20210
  } from "@elastic/eui";
20540
20211
 
20541
20212
  // src/components/WfoSearchPage/WfoConditionRow/WfoConditionRow.tsx
20542
- import { useState as useState63 } from "react";
20543
- import { useTranslations as useTranslations107 } from "next-intl";
20213
+ import { useState as useState62 } from "react";
20214
+ import { useTranslations as useTranslations105 } from "next-intl";
20544
20215
  import { EuiButtonIcon as EuiButtonIcon19, EuiFlexGroup as EuiFlexGroup50, EuiFlexItem as EuiFlexItem52, EuiFormRow as EuiFormRow10, EuiPanel as EuiPanel20 } from "@elastic/eui";
20545
20216
 
20546
20217
  // src/components/WfoSearchPage/WfoValueControl/WfoValueControl.tsx
20547
20218
  import moment4 from "moment";
20548
- import { useTranslations as useTranslations102 } from "next-intl";
20219
+ import { useTranslations as useTranslations100 } from "next-intl";
20549
20220
  import {
20550
20221
  EuiComboBox as EuiComboBox3,
20551
20222
  EuiDatePicker as EuiDatePicker3,
@@ -20557,9 +20228,9 @@ import {
20557
20228
  EuiIcon as EuiIcon6,
20558
20229
  EuiText as EuiText40
20559
20230
  } from "@elastic/eui";
20560
- import { Fragment as Fragment68, jsx as jsx287, jsxs as jsxs149 } from "@emotion/react/jsx-runtime";
20231
+ import { Fragment as Fragment67, jsx as jsx285, jsxs as jsxs148 } from "@emotion/react/jsx-runtime";
20561
20232
  var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20562
- const t = useTranslations102("search.page");
20233
+ const t = useTranslations100("search.page");
20563
20234
  const { theme } = useOrchestratorTheme();
20564
20235
  if (!pathInfo || !operator) return null;
20565
20236
  const schema = pathInfo.value_schema[operator];
@@ -20578,8 +20249,8 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20578
20249
  };
20579
20250
  const currentValue = String(value || "");
20580
20251
  const hasWildcards = currentValue.includes("%") || currentValue.includes("_");
20581
- return /* @__PURE__ */ jsxs149(Fragment68, { children: [
20582
- /* @__PURE__ */ jsx287(
20252
+ return /* @__PURE__ */ jsxs148(Fragment67, { children: [
20253
+ /* @__PURE__ */ jsx285(
20583
20254
  EuiFieldText4,
20584
20255
  {
20585
20256
  placeholder: "Enter pattern (% = any chars, _ = single char)",
@@ -20591,17 +20262,17 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20591
20262
  handleLikeChange(finalValue);
20592
20263
  }
20593
20264
  },
20594
- prepend: /* @__PURE__ */ jsx287(EuiIcon6, { type: "search" })
20265
+ prepend: /* @__PURE__ */ jsx285(EuiIcon6, { type: "search" })
20595
20266
  }
20596
20267
  ),
20597
- /* @__PURE__ */ jsx287(EuiFormHelpText, { children: hasWildcards ? /* @__PURE__ */ jsxs149("span", { children: [
20598
- /* @__PURE__ */ jsx287(EuiIcon6, { type: "checkInCircleFilled", color: "success", size: "s" }),
20268
+ /* @__PURE__ */ jsx285(EuiFormHelpText, { children: hasWildcards ? /* @__PURE__ */ jsxs148("span", { children: [
20269
+ /* @__PURE__ */ jsx285(EuiIcon6, { type: "checkInCircleFilled", color: "success", size: "s" }),
20599
20270
  " Pattern with wildcards:",
20600
20271
  " ",
20601
- /* @__PURE__ */ jsx287("strong", { children: currentValue })
20602
- ] }) : /* @__PURE__ */ jsxs149("span", { children: [
20272
+ /* @__PURE__ */ jsx285("strong", { children: currentValue })
20273
+ ] }) : /* @__PURE__ */ jsxs148("span", { children: [
20603
20274
  "Will search for: ",
20604
- /* @__PURE__ */ jsxs149("strong", { children: [
20275
+ /* @__PURE__ */ jsxs148("strong", { children: [
20605
20276
  "%",
20606
20277
  currentValue || "your-text",
20607
20278
  "%"
@@ -20615,7 +20286,7 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20615
20286
  label: val,
20616
20287
  value: val
20617
20288
  }));
20618
- return /* @__PURE__ */ jsx287(
20289
+ return /* @__PURE__ */ jsx285(
20619
20290
  EuiComboBox3,
20620
20291
  {
20621
20292
  placeholder: t("selectOrEnterValue"),
@@ -20627,7 +20298,7 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20627
20298
  }
20628
20299
  );
20629
20300
  }
20630
- return /* @__PURE__ */ jsx287(
20301
+ return /* @__PURE__ */ jsx285(
20631
20302
  EuiFieldText4,
20632
20303
  {
20633
20304
  placeholder: t("enterValue"),
@@ -20639,8 +20310,8 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20639
20310
  if (pathInfo.type === "number") {
20640
20311
  if (operator === "between") {
20641
20312
  const betweenValue = value || { start: "", end: "" };
20642
- return /* @__PURE__ */ jsxs149(EuiFlexGroup46, { gutterSize: "s", alignItems: "center", children: [
20643
- /* @__PURE__ */ jsx287(EuiFlexItem48, { children: /* @__PURE__ */ jsx287(
20313
+ return /* @__PURE__ */ jsxs148(EuiFlexGroup46, { gutterSize: "s", alignItems: "center", children: [
20314
+ /* @__PURE__ */ jsx285(EuiFlexItem48, { children: /* @__PURE__ */ jsx285(
20644
20315
  EuiFieldNumber3,
20645
20316
  {
20646
20317
  placeholder: t("fromNumber"),
@@ -20651,8 +20322,8 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20651
20322
  })
20652
20323
  }
20653
20324
  ) }),
20654
- /* @__PURE__ */ jsx287(EuiFlexItem48, { grow: false, children: /* @__PURE__ */ jsx287(EuiText40, { size: "s", color: theme.colors.textSubdued, children: "to" }) }),
20655
- /* @__PURE__ */ jsx287(EuiFlexItem48, { children: /* @__PURE__ */ jsx287(
20325
+ /* @__PURE__ */ jsx285(EuiFlexItem48, { grow: false, children: /* @__PURE__ */ jsx285(EuiText40, { size: "s", color: theme.colors.textSubdued, children: "to" }) }),
20326
+ /* @__PURE__ */ jsx285(EuiFlexItem48, { children: /* @__PURE__ */ jsx285(
20656
20327
  EuiFieldNumber3,
20657
20328
  {
20658
20329
  placeholder: t("toNumber"),
@@ -20665,7 +20336,7 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20665
20336
  ) })
20666
20337
  ] });
20667
20338
  }
20668
- return /* @__PURE__ */ jsx287(
20339
+ return /* @__PURE__ */ jsx285(
20669
20340
  EuiFieldNumber3,
20670
20341
  {
20671
20342
  placeholder: t("enterNumber"),
@@ -20677,8 +20348,8 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20677
20348
  if (pathInfo.type === "datetime") {
20678
20349
  if (operator === "between") {
20679
20350
  const betweenValue = value || { start: null, end: null };
20680
- return /* @__PURE__ */ jsxs149(EuiFlexGroup46, { gutterSize: "s", alignItems: "center", children: [
20681
- /* @__PURE__ */ jsx287(EuiFlexItem48, { children: /* @__PURE__ */ jsx287(
20351
+ return /* @__PURE__ */ jsxs148(EuiFlexGroup46, { gutterSize: "s", alignItems: "center", children: [
20352
+ /* @__PURE__ */ jsx285(EuiFlexItem48, { children: /* @__PURE__ */ jsx285(
20682
20353
  EuiDatePicker3,
20683
20354
  {
20684
20355
  selected: betweenValue.start ? moment4(betweenValue.start) : null,
@@ -20691,8 +20362,8 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20691
20362
  placeholderText: t("fromDate")
20692
20363
  }
20693
20364
  ) }),
20694
- /* @__PURE__ */ jsx287(EuiFlexItem48, { grow: false, children: /* @__PURE__ */ jsx287(EuiText40, { size: "s", color: theme.colors.textSubdued, children: t("valueControlTo") }) }),
20695
- /* @__PURE__ */ jsx287(EuiFlexItem48, { children: /* @__PURE__ */ jsx287(
20365
+ /* @__PURE__ */ jsx285(EuiFlexItem48, { grow: false, children: /* @__PURE__ */ jsx285(EuiText40, { size: "s", color: theme.colors.textSubdued, children: t("valueControlTo") }) }),
20366
+ /* @__PURE__ */ jsx285(EuiFlexItem48, { children: /* @__PURE__ */ jsx285(
20696
20367
  EuiDatePicker3,
20697
20368
  {
20698
20369
  selected: betweenValue.end ? moment4(betweenValue.end) : null,
@@ -20707,7 +20378,7 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20707
20378
  ) })
20708
20379
  ] });
20709
20380
  }
20710
- return /* @__PURE__ */ jsx287(
20381
+ return /* @__PURE__ */ jsx285(
20711
20382
  EuiDatePicker3,
20712
20383
  {
20713
20384
  selected: value ? moment4(String(value)) : null,
@@ -20722,9 +20393,9 @@ var ValueControl = ({ pathInfo, operator, value, onChange }) => {
20722
20393
  };
20723
20394
 
20724
20395
  // src/components/WfoSearchPage/WfoConditionRow/WfoFieldSelector.tsx
20725
- import { useTranslations as useTranslations103 } from "next-intl";
20396
+ import { useTranslations as useTranslations101 } from "next-intl";
20726
20397
  import { EuiComboBox as EuiComboBox4 } from "@elastic/eui";
20727
- import { jsx as jsx288 } from "@emotion/react/jsx-runtime";
20398
+ import { jsx as jsx286 } from "@emotion/react/jsx-runtime";
20728
20399
  var WfoFieldSelector2 = ({
20729
20400
  pathOptions,
20730
20401
  loading,
@@ -20734,7 +20405,7 @@ var WfoFieldSelector2 = ({
20734
20405
  onClear,
20735
20406
  renderPathOption
20736
20407
  }) => {
20737
- const t = useTranslations103("search.page");
20408
+ const t = useTranslations101("search.page");
20738
20409
  const handleSelectionChange = (selected) => {
20739
20410
  if (selected[0]?.value) {
20740
20411
  onFieldSelection(selected[0].value);
@@ -20742,7 +20413,7 @@ var WfoFieldSelector2 = ({
20742
20413
  onClear();
20743
20414
  }
20744
20415
  };
20745
- return /* @__PURE__ */ jsx288(
20416
+ return /* @__PURE__ */ jsx286(
20746
20417
  EuiComboBox4,
20747
20418
  {
20748
20419
  placeholder: t("searchFieldsPlaceholder"),
@@ -20761,45 +20432,45 @@ var WfoFieldSelector2 = ({
20761
20432
  };
20762
20433
 
20763
20434
  // src/components/WfoSearchPage/WfoConditionRow/WfoOperatorSelector.tsx
20764
- import { useTranslations as useTranslations104 } from "next-intl";
20435
+ import { useTranslations as useTranslations102 } from "next-intl";
20765
20436
  import { EuiButton as EuiButton24, EuiFlexGroup as EuiFlexGroup47, EuiFlexItem as EuiFlexItem49, EuiFormRow as EuiFormRow9, EuiText as EuiText41 } from "@elastic/eui";
20766
- import { jsx as jsx289, jsxs as jsxs150 } from "@emotion/react/jsx-runtime";
20437
+ import { jsx as jsx287, jsxs as jsxs149 } from "@emotion/react/jsx-runtime";
20767
20438
  var WfoOperatorSelector2 = ({ selectedPathInfo, condition, onOperatorChange }) => {
20768
- const t = useTranslations104("search.page");
20439
+ const t = useTranslations102("search.page");
20769
20440
  const { theme } = useOrchestratorTheme();
20770
- return /* @__PURE__ */ jsx289(EuiFormRow9, { label: t("operatorLabel"), children: /* @__PURE__ */ jsxs150(EuiFlexGroup47, { gutterSize: "xs", wrap: true, children: [
20441
+ return /* @__PURE__ */ jsx287(EuiFormRow9, { label: t("operatorLabel"), children: /* @__PURE__ */ jsxs149(EuiFlexGroup47, { gutterSize: "xs", wrap: true, children: [
20771
20442
  selectedPathInfo?.operators?.map((operator) => {
20772
20443
  const { symbol, description } = getOperatorDisplay(operator, selectedPathInfo);
20773
- const tooltipContent = operator === "like" ? /* @__PURE__ */ jsxs150("div", { children: [
20774
- /* @__PURE__ */ jsx289("strong", { children: description }),
20775
- /* @__PURE__ */ jsx289("br", {}),
20776
- /* @__PURE__ */ jsx289("br", {}),
20777
- /* @__PURE__ */ jsx289("strong", { children: "Wildcards:" }),
20778
- /* @__PURE__ */ jsx289("br", {}),
20444
+ const tooltipContent = operator === "like" ? /* @__PURE__ */ jsxs149("div", { children: [
20445
+ /* @__PURE__ */ jsx287("strong", { children: description }),
20446
+ /* @__PURE__ */ jsx287("br", {}),
20447
+ /* @__PURE__ */ jsx287("br", {}),
20448
+ /* @__PURE__ */ jsx287("strong", { children: "Wildcards:" }),
20449
+ /* @__PURE__ */ jsx287("br", {}),
20779
20450
  "\u2022 ",
20780
- /* @__PURE__ */ jsx289("code", { children: "%" }),
20451
+ /* @__PURE__ */ jsx287("code", { children: "%" }),
20781
20452
  " matches any number of characters",
20782
- /* @__PURE__ */ jsx289("br", {}),
20453
+ /* @__PURE__ */ jsx287("br", {}),
20783
20454
  "\u2022 ",
20784
- /* @__PURE__ */ jsx289("code", { children: "_" }),
20455
+ /* @__PURE__ */ jsx287("code", { children: "_" }),
20785
20456
  " matches exactly one character",
20786
- /* @__PURE__ */ jsx289("br", {}),
20787
- /* @__PURE__ */ jsx289("br", {}),
20788
- /* @__PURE__ */ jsx289("strong", { children: "Examples:" }),
20789
- /* @__PURE__ */ jsx289("br", {}),
20457
+ /* @__PURE__ */ jsx287("br", {}),
20458
+ /* @__PURE__ */ jsx287("br", {}),
20459
+ /* @__PURE__ */ jsx287("strong", { children: "Examples:" }),
20460
+ /* @__PURE__ */ jsx287("br", {}),
20790
20461
  "\u2022 ",
20791
- /* @__PURE__ */ jsx289("code", { children: "%test%" }),
20462
+ /* @__PURE__ */ jsx287("code", { children: "%test%" }),
20792
20463
  ' finds anything containing "test"',
20793
- /* @__PURE__ */ jsx289("br", {}),
20464
+ /* @__PURE__ */ jsx287("br", {}),
20794
20465
  "\u2022 ",
20795
- /* @__PURE__ */ jsx289("code", { children: "test%" }),
20466
+ /* @__PURE__ */ jsx287("code", { children: "test%" }),
20796
20467
  ' finds anything starting with "test"',
20797
- /* @__PURE__ */ jsx289("br", {}),
20468
+ /* @__PURE__ */ jsx287("br", {}),
20798
20469
  "\u2022 ",
20799
- /* @__PURE__ */ jsx289("code", { children: "test_" }),
20470
+ /* @__PURE__ */ jsx287("code", { children: "test_" }),
20800
20471
  ' finds "test" + one character'
20801
20472
  ] }) : description;
20802
- return /* @__PURE__ */ jsx289(EuiFlexItem49, { grow: false, children: /* @__PURE__ */ jsx289(WfoToolTip, { tooltipContent, children: /* @__PURE__ */ jsx289(
20473
+ return /* @__PURE__ */ jsx287(EuiFlexItem49, { grow: false, children: /* @__PURE__ */ jsx287(WfoToolTip, { tooltipContent, children: /* @__PURE__ */ jsx287(
20803
20474
  EuiButton24,
20804
20475
  {
20805
20476
  size: "s",
@@ -20815,17 +20486,17 @@ var WfoOperatorSelector2 = ({ selectedPathInfo, condition, onOperatorChange }) =
20815
20486
  }
20816
20487
  ) }) }, operator);
20817
20488
  }),
20818
- (!selectedPathInfo || selectedPathInfo.operators.length === 0) && /* @__PURE__ */ jsx289(EuiFlexItem49, { grow: false, children: /* @__PURE__ */ jsx289(EuiText41, { size: "s", color: theme.colors.textSubdued, children: t("selectFieldFirst") }) })
20489
+ (!selectedPathInfo || selectedPathInfo.operators.length === 0) && /* @__PURE__ */ jsx287(EuiFlexItem49, { grow: false, children: /* @__PURE__ */ jsx287(EuiText41, { size: "s", color: theme.colors.textSubdued, children: t("selectFieldFirst") }) })
20819
20490
  ] }) });
20820
20491
  };
20821
20492
 
20822
20493
  // src/components/WfoSearchPage/WfoConditionRow/WfoPathChips.tsx
20823
20494
  import { EuiIcon as EuiIcon7 } from "@elastic/eui";
20824
- import { jsx as jsx290, jsxs as jsxs151 } from "@emotion/react/jsx-runtime";
20495
+ import { jsx as jsx288, jsxs as jsxs150 } from "@emotion/react/jsx-runtime";
20825
20496
  var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20826
20497
  const { theme } = useOrchestratorTheme();
20827
20498
  if (isAnyPath) {
20828
- return /* @__PURE__ */ jsx290(WfoToolTip, { tooltipContent: label, children: /* @__PURE__ */ jsxs151(
20499
+ return /* @__PURE__ */ jsx288(WfoToolTip, { tooltipContent: label, children: /* @__PURE__ */ jsxs150(
20829
20500
  "div",
20830
20501
  {
20831
20502
  style: {
@@ -20839,7 +20510,7 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20839
20510
  minHeight: theme.size.xl
20840
20511
  },
20841
20512
  children: [
20842
- /* @__PURE__ */ jsx290(
20513
+ /* @__PURE__ */ jsx288(
20843
20514
  "div",
20844
20515
  {
20845
20516
  style: {
@@ -20852,14 +20523,14 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20852
20523
  flex: 1,
20853
20524
  overflow: "visible"
20854
20525
  },
20855
- children: /* @__PURE__ */ jsx290(
20526
+ children: /* @__PURE__ */ jsx288(
20856
20527
  "div",
20857
20528
  {
20858
20529
  style: {
20859
20530
  textDecoration: "none",
20860
20531
  borderBottom: "none"
20861
20532
  },
20862
- children: /* @__PURE__ */ jsx290(WfoBadge, { color: "primary", textColor: theme.colors.textGhost, size: "xs", children: /* @__PURE__ */ jsx290(
20533
+ children: /* @__PURE__ */ jsx288(WfoBadge, { color: "primary", textColor: theme.colors.textGhost, size: "xs", children: /* @__PURE__ */ jsx288(
20863
20534
  "span",
20864
20535
  {
20865
20536
  style: {
@@ -20876,7 +20547,7 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20876
20547
  )
20877
20548
  }
20878
20549
  ),
20879
- fieldType && /* @__PURE__ */ jsx290("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx290(WfoBadge, { color: getTypeColor(fieldType, theme), textColor: theme.colors.textInk, size: "xs", children: /* @__PURE__ */ jsx290("span", { style: { textDecoration: "none" }, children: fieldType }) }) })
20550
+ fieldType && /* @__PURE__ */ jsx288("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx288(WfoBadge, { color: getTypeColor(fieldType, theme), textColor: theme.colors.textInk, size: "xs", children: /* @__PURE__ */ jsx288("span", { style: { textDecoration: "none" }, children: fieldType }) }) })
20880
20551
  ]
20881
20552
  }
20882
20553
  ) });
@@ -20884,7 +20555,7 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20884
20555
  const completePath = fullPath || label;
20885
20556
  const allSegments = completePath.split(".").filter((segment) => segment && !segment.match(/^\d+$/) && !segment.includes("("));
20886
20557
  const pathSegments = allSegments.slice(-2);
20887
- return /* @__PURE__ */ jsx290(WfoToolTip, { tooltipContent: completePath, children: /* @__PURE__ */ jsxs151(
20558
+ return /* @__PURE__ */ jsx288(WfoToolTip, { tooltipContent: completePath, children: /* @__PURE__ */ jsxs150(
20888
20559
  "div",
20889
20560
  {
20890
20561
  style: {
@@ -20898,7 +20569,7 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20898
20569
  minHeight: theme.size.xl
20899
20570
  },
20900
20571
  children: [
20901
- /* @__PURE__ */ jsx290(
20572
+ /* @__PURE__ */ jsx288(
20902
20573
  "div",
20903
20574
  {
20904
20575
  style: {
@@ -20913,14 +20584,14 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20913
20584
  },
20914
20585
  children: pathSegments.map(
20915
20586
  (segment, index) => [
20916
- /* @__PURE__ */ jsx290(
20587
+ /* @__PURE__ */ jsx288(
20917
20588
  "div",
20918
20589
  {
20919
20590
  style: {
20920
20591
  textDecoration: "none",
20921
20592
  borderBottom: "none"
20922
20593
  },
20923
- children: /* @__PURE__ */ jsx290(WfoBadge, { color: "primary", textColor: theme.colors.textGhost, size: "xs", children: /* @__PURE__ */ jsx290(
20594
+ children: /* @__PURE__ */ jsx288(WfoBadge, { color: "primary", textColor: theme.colors.textGhost, size: "xs", children: /* @__PURE__ */ jsx288(
20924
20595
  "span",
20925
20596
  {
20926
20597
  style: {
@@ -20936,7 +20607,7 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20936
20607
  },
20937
20608
  `segment-${index}`
20938
20609
  ),
20939
- index < pathSegments.length - 1 && /* @__PURE__ */ jsx290(
20610
+ index < pathSegments.length - 1 && /* @__PURE__ */ jsx288(
20940
20611
  EuiIcon7,
20941
20612
  {
20942
20613
  type: "arrowRight",
@@ -20954,16 +20625,16 @@ var WfoPathChips = ({ fullPath, label, fieldType, isAnyPath = false }) => {
20954
20625
  )
20955
20626
  }
20956
20627
  ),
20957
- fieldType && /* @__PURE__ */ jsx290("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx290(WfoBadge, { color: getTypeColor(fieldType, theme), textColor: theme.colors.textInk, size: "xs", children: /* @__PURE__ */ jsx290("span", { style: { textDecoration: "none" }, children: fieldType }) }) })
20628
+ fieldType && /* @__PURE__ */ jsx288("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx288(WfoBadge, { color: getTypeColor(fieldType, theme), textColor: theme.colors.textInk, size: "xs", children: /* @__PURE__ */ jsx288("span", { style: { textDecoration: "none" }, children: fieldType }) }) })
20958
20629
  ]
20959
20630
  }
20960
20631
  ) });
20961
20632
  };
20962
20633
 
20963
20634
  // src/components/WfoSearchPage/WfoConditionRow/WfoPathSelector.tsx
20964
- import { useTranslations as useTranslations105 } from "next-intl";
20635
+ import { useTranslations as useTranslations103 } from "next-intl";
20965
20636
  import { EuiComboBox as EuiComboBox5 } from "@elastic/eui";
20966
- import { jsx as jsx291 } from "@emotion/react/jsx-runtime";
20637
+ import { jsx as jsx289 } from "@emotion/react/jsx-runtime";
20967
20638
  var WfoPathSelector = ({
20968
20639
  selectedFieldName,
20969
20640
  pathOptions,
@@ -20971,8 +20642,8 @@ var WfoPathSelector = ({
20971
20642
  onClear,
20972
20643
  renderOption
20973
20644
  }) => {
20974
- const t = useTranslations105("search.page");
20975
- return /* @__PURE__ */ jsx291(
20645
+ const t = useTranslations103("search.page");
20646
+ return /* @__PURE__ */ jsx289(
20976
20647
  EuiComboBox5,
20977
20648
  {
20978
20649
  placeholder: t("selectSpecificPathPlaceholder"),
@@ -21010,21 +20681,21 @@ var WfoPathSelector = ({
21010
20681
  };
21011
20682
 
21012
20683
  // src/components/WfoSearchPage/WfoConditionRow/WfoRenderFunctions.tsx
21013
- import { useTranslations as useTranslations106 } from "next-intl";
20684
+ import { useTranslations as useTranslations104 } from "next-intl";
21014
20685
  import { EuiFlexGroup as EuiFlexGroup48, EuiFlexItem as EuiFlexItem50, EuiText as EuiText42 } from "@elastic/eui";
21015
- import { Fragment as Fragment69, jsx as jsx292, jsxs as jsxs152 } from "@emotion/react/jsx-runtime";
20686
+ import { Fragment as Fragment68, jsx as jsx290, jsxs as jsxs151 } from "@emotion/react/jsx-runtime";
21016
20687
  var WfoRenderPathOption = ({ option, contentClassName, paths }) => {
21017
- const t = useTranslations106("search.page");
20688
+ const t = useTranslations104("search.page");
21018
20689
  const { theme } = useOrchestratorTheme();
21019
20690
  const pathInfo = option.value ? paths.find(({ path }) => path === option.value) : null;
21020
- if (!pathInfo) return /* @__PURE__ */ jsx292(Fragment69, { children: option.label });
21021
- return /* @__PURE__ */ jsxs152(EuiFlexGroup48, { alignItems: "center", gutterSize: "s", responsive: false, className: contentClassName, title: "", children: [
21022
- /* @__PURE__ */ jsx292(EuiFlexItem50, { grow: true, children: /* @__PURE__ */ jsx292(EuiText42, { size: "s", children: pathInfo.displayLabel || pathInfo.path }) }),
21023
- /* @__PURE__ */ jsx292(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsxs152(EuiFlexGroup48, { gutterSize: "xs", alignItems: "center", responsive: false, children: [
21024
- pathInfo.group === "leaf" && pathInfo.pathCount && pathInfo.pathCount > 1 && /* @__PURE__ */ jsx292(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsx292(WfoBadge, { color: "default", textColor: theme.colors.textInk, size: "xs", children: t("pathsCount", {
20691
+ if (!pathInfo) return /* @__PURE__ */ jsx290(Fragment68, { children: option.label });
20692
+ return /* @__PURE__ */ jsxs151(EuiFlexGroup48, { alignItems: "center", gutterSize: "s", responsive: false, className: contentClassName, title: "", children: [
20693
+ /* @__PURE__ */ jsx290(EuiFlexItem50, { grow: true, children: /* @__PURE__ */ jsx290(EuiText42, { size: "s", children: pathInfo.displayLabel || pathInfo.path }) }),
20694
+ /* @__PURE__ */ jsx290(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsxs151(EuiFlexGroup48, { gutterSize: "xs", alignItems: "center", responsive: false, children: [
20695
+ pathInfo.group === "leaf" && pathInfo.pathCount && pathInfo.pathCount > 1 && /* @__PURE__ */ jsx290(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsx290(WfoBadge, { color: "default", textColor: theme.colors.textInk, size: "xs", children: t("pathsCount", {
21025
20696
  count: pathInfo.pathCount
21026
20697
  }) }) }),
21027
- (!pathInfo.pathCount || pathInfo.pathCount <= 1) && pathInfo.ui_types?.map((type, index) => /* @__PURE__ */ jsx292(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsx292(WfoBadge, { color: getTypeColor(type, theme), textColor: theme.colors.textInk, size: "xs", children: type }) }, index))
20698
+ (!pathInfo.pathCount || pathInfo.pathCount <= 1) && pathInfo.ui_types?.map((type, index) => /* @__PURE__ */ jsx290(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsx290(WfoBadge, { color: getTypeColor(type, theme), textColor: theme.colors.textInk, size: "xs", children: type }) }, index))
21028
20699
  ] }) })
21029
20700
  ] });
21030
20701
  };
@@ -21034,9 +20705,9 @@ var WfoRenderPathSelectionOption = ({
21034
20705
  fieldType
21035
20706
  }) => {
21036
20707
  const { theme } = useOrchestratorTheme();
21037
- return /* @__PURE__ */ jsx292(WfoToolTip, { tooltipContent: option.fullPath || option.label, children: /* @__PURE__ */ jsxs152(EuiFlexGroup48, { alignItems: "center", gutterSize: "s", responsive: false, className: contentClassName, title: "", children: [
21038
- /* @__PURE__ */ jsx292(EuiFlexItem50, { grow: true, children: /* @__PURE__ */ jsx292(EuiText42, { size: "s", children: option.label }) }),
21039
- /* @__PURE__ */ jsx292(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsx292(WfoBadge, { color: getTypeColor(fieldType, theme), textColor: theme.colors.textInk, size: "xs", children: fieldType }) })
20708
+ return /* @__PURE__ */ jsx290(WfoToolTip, { tooltipContent: option.fullPath || option.label, children: /* @__PURE__ */ jsxs151(EuiFlexGroup48, { alignItems: "center", gutterSize: "s", responsive: false, className: contentClassName, title: "", children: [
20709
+ /* @__PURE__ */ jsx290(EuiFlexItem50, { grow: true, children: /* @__PURE__ */ jsx290(EuiText42, { size: "s", children: option.label }) }),
20710
+ /* @__PURE__ */ jsx290(EuiFlexItem50, { grow: false, children: /* @__PURE__ */ jsx290(WfoBadge, { color: getTypeColor(fieldType, theme), textColor: theme.colors.textInk, size: "xs", children: fieldType }) })
21040
20711
  ] }) });
21041
20712
  };
21042
20713
 
@@ -21078,11 +20749,11 @@ var getPathSelectionOptions = (selectedFieldName, paths) => {
21078
20749
  };
21079
20750
 
21080
20751
  // src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx
21081
- import { jsx as jsx293, jsxs as jsxs153 } from "@emotion/react/jsx-runtime";
20752
+ import { jsx as jsx291, jsxs as jsxs152 } from "@emotion/react/jsx-runtime";
21082
20753
  var WfoSelectedPathDisplay = ({ condition, onEdit }) => {
21083
20754
  const { theme } = useOrchestratorTheme();
21084
20755
  const isFullPath = condition.path.includes(".");
21085
- return /* @__PURE__ */ jsx293(
20756
+ return /* @__PURE__ */ jsx291(
21086
20757
  "div",
21087
20758
  {
21088
20759
  onClick: onEdit,
@@ -21096,12 +20767,12 @@ var WfoSelectedPathDisplay = ({ condition, onEdit }) => {
21096
20767
  display: "flex",
21097
20768
  alignItems: "center"
21098
20769
  },
21099
- children: /* @__PURE__ */ jsx293(EuiFlexGroup49, { alignItems: "center", gutterSize: "s", responsive: false, justifyContent: "spaceBetween", children: /* @__PURE__ */ jsx293(EuiFlexItem51, { grow: true, children: isFullPath ? /* @__PURE__ */ jsxs153(EuiFlexGroup49, { gutterSize: "none", alignItems: "center", responsive: false, children: [
21100
- /* @__PURE__ */ jsx293(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsxs153(EuiText43, { size: "s", color: theme.colors.textParagraph, children: [
20770
+ children: /* @__PURE__ */ jsx291(EuiFlexGroup49, { alignItems: "center", gutterSize: "s", responsive: false, justifyContent: "spaceBetween", children: /* @__PURE__ */ jsx291(EuiFlexItem51, { grow: true, children: isFullPath ? /* @__PURE__ */ jsxs152(EuiFlexGroup49, { gutterSize: "none", alignItems: "center", responsive: false, children: [
20771
+ /* @__PURE__ */ jsx291(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsxs152(EuiText43, { size: "s", color: theme.colors.textParagraph, children: [
21101
20772
  getFieldNameFromFullPath(condition.path),
21102
20773
  ":"
21103
20774
  ] }) }),
21104
- /* @__PURE__ */ jsx293(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx293(
20775
+ /* @__PURE__ */ jsx291(EuiFlexItem51, { grow: false, children: /* @__PURE__ */ jsx291(
21105
20776
  EuiText43,
21106
20777
  {
21107
20778
  size: "s",
@@ -21115,19 +20786,19 @@ var WfoSelectedPathDisplay = ({ condition, onEdit }) => {
21115
20786
  children: condition.path
21116
20787
  }
21117
20788
  ) })
21118
- ] }) : /* @__PURE__ */ jsx293(EuiText43, { size: "s", color: theme.colors.textParagraph, children: condition.path }) }) })
20789
+ ] }) : /* @__PURE__ */ jsx291(EuiText43, { size: "s", color: theme.colors.textParagraph, children: condition.path }) }) })
21119
20790
  }
21120
20791
  );
21121
20792
  };
21122
20793
 
21123
20794
  // src/components/WfoSearchPage/WfoConditionRow/WfoConditionRow.tsx
21124
- import { jsx as jsx294, jsxs as jsxs154 } from "@emotion/react/jsx-runtime";
20795
+ import { jsx as jsx292, jsxs as jsxs153 } from "@emotion/react/jsx-runtime";
21125
20796
  var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21126
- const t = useTranslations107("search.page");
20797
+ const t = useTranslations105("search.page");
21127
20798
  const { theme } = useOrchestratorTheme();
21128
- const [searchValue, setSearchValue] = useState63(condition.path);
21129
- const [showPathSelection, setShowPathSelection] = useState63(false);
21130
- const [selectedFieldName, setSelectedFieldName] = useState63("");
20799
+ const [searchValue, setSearchValue] = useState62(condition.path);
20800
+ const [showPathSelection, setShowPathSelection] = useState62(false);
20801
+ const [selectedFieldName, setSelectedFieldName] = useState62("");
21131
20802
  const { paths, loading, error } = usePathAutocomplete(searchValue, entityType);
21132
20803
  const selectedPathInfo = (() => {
21133
20804
  if (!condition.path) return null;
@@ -21250,11 +20921,11 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21250
20921
  }
21251
20922
  return baseOptions;
21252
20923
  })();
21253
- const renderPathOption = (option, searchValue2, contentClassName) => /* @__PURE__ */ jsx294(WfoRenderPathOption, { option, searchValue: searchValue2, contentClassName, paths });
20924
+ const renderPathOption = (option, searchValue2, contentClassName) => /* @__PURE__ */ jsx292(WfoRenderPathOption, { option, searchValue: searchValue2, contentClassName, paths });
21254
20925
  const renderPathSelectionOption = (option) => {
21255
20926
  const fieldInfo = paths.find(({ path }) => path === selectedFieldName);
21256
20927
  const fieldType = fieldInfo?.type || "string";
21257
- return /* @__PURE__ */ jsx294(
20928
+ return /* @__PURE__ */ jsx292(
21258
20929
  WfoPathChips,
21259
20930
  {
21260
20931
  fullPath: option.fullPath || "",
@@ -21264,9 +20935,9 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21264
20935
  }
21265
20936
  );
21266
20937
  };
21267
- return /* @__PURE__ */ jsx294(EuiPanel20, { paddingSize: "m", color: "subdued", children: /* @__PURE__ */ jsxs154(EuiFlexGroup50, { direction: "column", gutterSize: "m", children: [
21268
- /* @__PURE__ */ jsx294(EuiFlexItem52, { children: /* @__PURE__ */ jsx294(EuiFormRow10, { label: t("fieldLabel"), error, isInvalid: !!error, children: /* @__PURE__ */ jsxs154(EuiFlexGroup50, { gutterSize: "s", alignItems: "center", children: [
21269
- /* @__PURE__ */ jsx294(EuiFlexItem52, { children: showPathSelection ? /* @__PURE__ */ jsx294(
20938
+ return /* @__PURE__ */ jsx292(EuiPanel20, { paddingSize: "m", color: "subdued", children: /* @__PURE__ */ jsxs153(EuiFlexGroup50, { direction: "column", gutterSize: "m", children: [
20939
+ /* @__PURE__ */ jsx292(EuiFlexItem52, { children: /* @__PURE__ */ jsx292(EuiFormRow10, { label: t("fieldLabel"), error, isInvalid: !!error, children: /* @__PURE__ */ jsxs153(EuiFlexGroup50, { gutterSize: "s", alignItems: "center", children: [
20940
+ /* @__PURE__ */ jsx292(EuiFlexItem52, { children: showPathSelection ? /* @__PURE__ */ jsx292(
21270
20941
  WfoPathSelector,
21271
20942
  {
21272
20943
  selectedFieldName,
@@ -21278,7 +20949,7 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21278
20949
  },
21279
20950
  renderOption: renderPathSelectionOption
21280
20951
  }
21281
- ) : condition.path && fullPathSelected ? /* @__PURE__ */ jsx294(
20952
+ ) : condition.path && fullPathSelected ? /* @__PURE__ */ jsx292(
21282
20953
  WfoSelectedPathDisplay,
21283
20954
  {
21284
20955
  condition,
@@ -21294,7 +20965,7 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21294
20965
  });
21295
20966
  }
21296
20967
  }
21297
- ) : /* @__PURE__ */ jsx294(
20968
+ ) : /* @__PURE__ */ jsx292(
21298
20969
  WfoFieldSelector2,
21299
20970
  {
21300
20971
  pathOptions,
@@ -21316,10 +20987,10 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21316
20987
  renderPathOption
21317
20988
  }
21318
20989
  ) }),
21319
- condition.path && selectedPathInfo?.ui_types && selectedPathInfo.ui_types.length > 0 && /* @__PURE__ */ jsx294(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx294(EuiFlexGroup50, { gutterSize: "xs", alignItems: "center", responsive: false, children: selectedPathInfo.ui_types.map((type, index) => /* @__PURE__ */ jsx294(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx294(WfoBadge, { color: getTypeColor(type, theme), textColor: theme.colors.textInk, size: "s", children: type }) }, index)) }) })
20990
+ condition.path && selectedPathInfo?.ui_types && selectedPathInfo.ui_types.length > 0 && /* @__PURE__ */ jsx292(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx292(EuiFlexGroup50, { gutterSize: "xs", alignItems: "center", responsive: false, children: selectedPathInfo.ui_types.map((type, index) => /* @__PURE__ */ jsx292(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx292(WfoBadge, { color: getTypeColor(type, theme), textColor: theme.colors.textInk, size: "s", children: type }) }, index)) }) })
21320
20991
  ] }) }) }),
21321
- /* @__PURE__ */ jsx294(EuiFlexItem52, { children: /* @__PURE__ */ jsxs154(EuiFlexGroup50, { gutterSize: "s", alignItems: "flexEnd", children: [
21322
- /* @__PURE__ */ jsx294(EuiFlexItem52, { children: /* @__PURE__ */ jsx294(
20992
+ /* @__PURE__ */ jsx292(EuiFlexItem52, { children: /* @__PURE__ */ jsxs153(EuiFlexGroup50, { gutterSize: "s", alignItems: "flexEnd", children: [
20993
+ /* @__PURE__ */ jsx292(EuiFlexItem52, { children: /* @__PURE__ */ jsx292(
21323
20994
  WfoOperatorSelector2,
21324
20995
  {
21325
20996
  selectedPathInfo,
@@ -21327,7 +20998,7 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21327
20998
  onOperatorChange: handleOperatorChange
21328
20999
  }
21329
21000
  ) }),
21330
- !hideValueInput && /* @__PURE__ */ jsx294(EuiFlexItem52, { children: /* @__PURE__ */ jsx294(EuiFormRow10, { label: t("valueLabel"), children: /* @__PURE__ */ jsx294(
21001
+ !hideValueInput && /* @__PURE__ */ jsx292(EuiFlexItem52, { children: /* @__PURE__ */ jsx292(EuiFormRow10, { label: t("valueLabel"), children: /* @__PURE__ */ jsx292(
21331
21002
  ValueControl,
21332
21003
  {
21333
21004
  pathInfo: selectedPathInfo,
@@ -21336,7 +21007,7 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21336
21007
  onChange: handleValueChange
21337
21008
  }
21338
21009
  ) }) }),
21339
- /* @__PURE__ */ jsx294(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx294(
21010
+ /* @__PURE__ */ jsx292(EuiFlexItem52, { grow: false, children: /* @__PURE__ */ jsx292(
21340
21011
  EuiButtonIcon19,
21341
21012
  {
21342
21013
  iconType: "trash",
@@ -21351,7 +21022,7 @@ var ConditionRow = ({ condition, entityType, onChange, onRemove }) => {
21351
21022
  };
21352
21023
 
21353
21024
  // src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx
21354
- import { Fragment as Fragment70, jsx as jsx295, jsxs as jsxs155 } from "@emotion/react/jsx-runtime";
21025
+ import { Fragment as Fragment69, jsx as jsx293, jsxs as jsxs154 } from "@emotion/react/jsx-runtime";
21355
21026
  var FilterGroup = ({
21356
21027
  group,
21357
21028
  entityType,
@@ -21360,7 +21031,7 @@ var FilterGroup = ({
21360
21031
  depth = 0,
21361
21032
  isRoot = false
21362
21033
  }) => {
21363
- const t = useTranslations108("search.page");
21034
+ const t = useTranslations106("search.page");
21364
21035
  const { theme } = useOrchestratorTheme();
21365
21036
  const MAX_DEPTH = 5;
21366
21037
  const canAddGroup = depth < MAX_DEPTH;
@@ -21405,24 +21076,24 @@ var FilterGroup = ({
21405
21076
  op: group.op === "AND" ? "OR" : "AND"
21406
21077
  });
21407
21078
  };
21408
- return /* @__PURE__ */ jsxs155(EuiPanel21, { paddingSize: "m", color: depth % 2 === 0 ? "primary" : "plain", hasBorder: true, children: [
21409
- /* @__PURE__ */ jsxs155(EuiFlexGroup51, { gutterSize: "s", alignItems: "center", justifyContent: "spaceBetween", children: [
21410
- /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsxs155(EuiFlexGroup51, { gutterSize: "s", alignItems: "center", children: [
21411
- /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx295(EuiText44, { size: "s", children: /* @__PURE__ */ jsx295("strong", { children: t("groupLabel") }) }) }),
21412
- /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx295(EuiButton25, { size: "s", fill: true, color: "primary", onClick: toggleOperator, children: group.op }) })
21079
+ return /* @__PURE__ */ jsxs154(EuiPanel21, { paddingSize: "m", color: depth % 2 === 0 ? "primary" : "plain", hasBorder: true, children: [
21080
+ /* @__PURE__ */ jsxs154(EuiFlexGroup51, { gutterSize: "s", alignItems: "center", justifyContent: "spaceBetween", children: [
21081
+ /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsxs154(EuiFlexGroup51, { gutterSize: "s", alignItems: "center", children: [
21082
+ /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx293(EuiText44, { size: "s", children: /* @__PURE__ */ jsx293("strong", { children: t("groupLabel") }) }) }),
21083
+ /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx293(EuiButton25, { size: "s", fill: true, color: "primary", onClick: toggleOperator, children: group.op }) })
21413
21084
  ] }) }),
21414
- /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsxs155(EuiFlexGroup51, { gutterSize: "s", alignItems: "center", children: [
21415
- /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx295(EuiButton25, { size: "s", iconType: "plusInCircle", onClick: addCondition, children: t("addRule") }) }),
21416
- /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx295(WfoToolTip, { tooltipContent: !canAddGroup ? t("maxNestingDepth") : t("addNestedGroup"), children: /* @__PURE__ */ jsx295(EuiButton25, { size: "s", iconType: "nested", onClick: addGroup, disabled: !canAddGroup, children: t("addGroup") }) }) }),
21417
- !isRoot && onRemove && /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx295(EuiButtonIcon20, { iconType: "trash", color: "danger", onClick: onRemove, "aria-label": t("removeGroup") }) })
21085
+ /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsxs154(EuiFlexGroup51, { gutterSize: "s", alignItems: "center", children: [
21086
+ /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx293(EuiButton25, { size: "s", iconType: "plusInCircle", onClick: addCondition, children: t("addRule") }) }),
21087
+ /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx293(WfoToolTip, { tooltipContent: !canAddGroup ? t("maxNestingDepth") : t("addNestedGroup"), children: /* @__PURE__ */ jsx293(EuiButton25, { size: "s", iconType: "nested", onClick: addGroup, disabled: !canAddGroup, children: t("addGroup") }) }) }),
21088
+ !isRoot && onRemove && /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx293(EuiButtonIcon20, { iconType: "trash", color: "danger", onClick: onRemove, "aria-label": t("removeGroup") }) })
21418
21089
  ] }) })
21419
21090
  ] }),
21420
- group.children.length > 0 && /* @__PURE__ */ jsxs155(Fragment70, { children: [
21421
- /* @__PURE__ */ jsx295(EuiSpacer36, { size: "m" }),
21422
- /* @__PURE__ */ jsx295(EuiPanel21, { paddingSize: isRoot ? "none" : "s", color: "transparent", hasShadow: false, children: group.children.map((child, index) => /* @__PURE__ */ jsxs155("div", { children: [
21423
- index > 0 && /* @__PURE__ */ jsx295(EuiFlexGroup51, { gutterSize: "none", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx295(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx295(EuiText44, { size: "s", color: theme.colors.textSubdued, textAlign: "center", children: /* @__PURE__ */ jsx295(EuiCode2, { children: group.op }) }) }) }),
21424
- /* @__PURE__ */ jsx295(EuiSpacer36, { size: "s" }),
21425
- isCondition(child) ? /* @__PURE__ */ jsx295(
21091
+ group.children.length > 0 && /* @__PURE__ */ jsxs154(Fragment69, { children: [
21092
+ /* @__PURE__ */ jsx293(EuiSpacer35, { size: "m" }),
21093
+ /* @__PURE__ */ jsx293(EuiPanel21, { paddingSize: isRoot ? "none" : "s", color: "transparent", hasShadow: false, children: group.children.map((child, index) => /* @__PURE__ */ jsxs154("div", { children: [
21094
+ index > 0 && /* @__PURE__ */ jsx293(EuiFlexGroup51, { gutterSize: "none", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx293(EuiFlexItem53, { grow: false, children: /* @__PURE__ */ jsx293(EuiText44, { size: "s", color: theme.colors.textSubdued, textAlign: "center", children: /* @__PURE__ */ jsx293(EuiCode2, { children: group.op }) }) }) }),
21095
+ /* @__PURE__ */ jsx293(EuiSpacer35, { size: "s" }),
21096
+ isCondition(child) ? /* @__PURE__ */ jsx293(
21426
21097
  ConditionRow,
21427
21098
  {
21428
21099
  condition: child,
@@ -21430,7 +21101,7 @@ var FilterGroup = ({
21430
21101
  onChange: (newCondition) => updateChild(index, newCondition),
21431
21102
  onRemove: () => removeChild(index)
21432
21103
  }
21433
- ) : /* @__PURE__ */ jsx295(
21104
+ ) : /* @__PURE__ */ jsx293(
21434
21105
  FilterGroup,
21435
21106
  {
21436
21107
  group: child,
@@ -21440,18 +21111,18 @@ var FilterGroup = ({
21440
21111
  depth: depth + 1
21441
21112
  }
21442
21113
  ),
21443
- /* @__PURE__ */ jsx295(EuiSpacer36, { size: "s" })
21114
+ /* @__PURE__ */ jsx293(EuiSpacer35, { size: "s" })
21444
21115
  ] }, index)) })
21445
21116
  ] }),
21446
- group.children.length === 0 && /* @__PURE__ */ jsxs155(Fragment70, { children: [
21447
- /* @__PURE__ */ jsx295(EuiSpacer36, { size: "s" }),
21448
- /* @__PURE__ */ jsx295(EuiCallOut6, { title: t("emptyGroupTitle"), color: "primary", iconType: "info", size: "s", children: /* @__PURE__ */ jsx295("p", { children: t("emptyGroupDescription") }) })
21117
+ group.children.length === 0 && /* @__PURE__ */ jsxs154(Fragment69, { children: [
21118
+ /* @__PURE__ */ jsx293(EuiSpacer35, { size: "s" }),
21119
+ /* @__PURE__ */ jsx293(EuiCallOut6, { title: t("emptyGroupTitle"), color: "primary", iconType: "info", size: "s", children: /* @__PURE__ */ jsx293("p", { children: t("emptyGroupDescription") }) })
21449
21120
  ] })
21450
21121
  ] });
21451
21122
  };
21452
21123
 
21453
21124
  // src/components/WfoWorkflowUserGuide/WfoWorkflowGuideExpandablePanel.tsx
21454
- import { useTranslations as useTranslations109 } from "next-intl";
21125
+ import { useTranslations as useTranslations107 } from "next-intl";
21455
21126
  import {
21456
21127
  EuiFlexGroup as EuiFlexGroup52,
21457
21128
  EuiFlexItem as EuiFlexItem54,
@@ -21581,7 +21252,7 @@ var getStyles16 = ({ theme }) => {
21581
21252
  };
21582
21253
 
21583
21254
  // src/components/WfoWorkflowUserGuide/WfoWorkflowGuideExpandablePanel.tsx
21584
- import { jsx as jsx296, jsxs as jsxs156 } from "@emotion/react/jsx-runtime";
21255
+ import { jsx as jsx294, jsxs as jsxs155 } from "@emotion/react/jsx-runtime";
21585
21256
  var WfoWorkflowGuideToggleStrip = ({
21586
21257
  onToggle,
21587
21258
  ariaLabel,
@@ -21603,7 +21274,7 @@ var WfoWorkflowGuideToggleStrip = ({
21603
21274
  noBottomBorderStyle
21604
21275
  } = useWithOrchestratorTheme(getStyles16);
21605
21276
  const containerStyle = isBigScreen ? sticky ? stickyStripContainerStyle : toggleStripContainerStyle : sticky ? stickyHorizontalStripContainerStyle : toggleStripContainerHorizontalStyle;
21606
- return /* @__PURE__ */ jsx296(EuiFlexItem54, { grow: false, onClick: onToggle, "aria-label": ariaLabel, css: containerStyle, children: /* @__PURE__ */ jsx296(
21277
+ return /* @__PURE__ */ jsx294(EuiFlexItem54, { grow: false, onClick: onToggle, "aria-label": ariaLabel, css: containerStyle, children: /* @__PURE__ */ jsx294(
21607
21278
  EuiPanel22,
21608
21279
  {
21609
21280
  hasShadow: false,
@@ -21612,7 +21283,7 @@ var WfoWorkflowGuideToggleStrip = ({
21612
21283
  sticky && stickyPanelFillStyle,
21613
21284
  noLeadingBorder && (isBigScreen ? noLeftBorderStyle : noBottomBorderStyle)
21614
21285
  ],
21615
- children: isBigScreen ? /* @__PURE__ */ jsx296("div", { css: stripIconStyle, children }) : /* @__PURE__ */ jsx296(
21286
+ children: isBigScreen ? /* @__PURE__ */ jsx294("div", { css: stripIconStyle, children }) : /* @__PURE__ */ jsx294(
21616
21287
  EuiFlexGroup52,
21617
21288
  {
21618
21289
  direction: "row",
@@ -21627,54 +21298,54 @@ var WfoWorkflowGuideToggleStrip = ({
21627
21298
  ) });
21628
21299
  };
21629
21300
  var WfoWorkflowGuideMarkdown = ({ workflowName, isBigScreen }) => {
21630
- const t = useTranslations109("workflowGuide");
21301
+ const t = useTranslations107("workflowGuide");
21631
21302
  const { guideBodyStyle, guidePanelStyle, guideStackedBodyStyle, guideStackedPanelStyle } = useWithOrchestratorTheme(getStyles16);
21632
21303
  const { data, isLoading, isError } = useGetWorkflowGuideQuery({ workflowName });
21633
21304
  const content = data?.content ?? "";
21634
- return /* @__PURE__ */ jsx296("div", { css: isBigScreen ? guideBodyStyle : guideStackedBodyStyle, children: isLoading && /* @__PURE__ */ jsx296(EuiLoadingSpinner8, { size: "m" }) || /* @__PURE__ */ jsx296(EuiPanel22, { paddingSize: "m", hasShadow: true, css: isBigScreen ? guidePanelStyle : guideStackedPanelStyle, children: (isError || !content) && /* @__PURE__ */ jsx296(EuiText45, { color: "subdued", children: t("noGuideAvailable") }) || /* @__PURE__ */ jsx296(EuiMarkdownFormat2, { children: content }) }) });
21305
+ return /* @__PURE__ */ jsx294("div", { css: isBigScreen ? guideBodyStyle : guideStackedBodyStyle, children: isLoading && /* @__PURE__ */ jsx294(EuiLoadingSpinner8, { size: "m" }) || /* @__PURE__ */ jsx294(EuiPanel22, { paddingSize: "m", hasShadow: true, css: isBigScreen ? guidePanelStyle : guideStackedPanelStyle, children: (isError || !content) && /* @__PURE__ */ jsx294(EuiText45, { color: "subdued", children: t("noGuideAvailable") }) || /* @__PURE__ */ jsx294(EuiMarkdownFormat2, { children: content }) }) });
21635
21306
  };
21636
21307
  var WfoWorkflowGuideExpandablePanel = ({ workflowName, isExpanded, onToggle }) => {
21637
- const t = useTranslations109("workflowGuide");
21308
+ const t = useTranslations107("workflowGuide");
21638
21309
  const { fullHeightStyle, guideExpandedItemStyle, guideExpandedFillStyle } = useWithOrchestratorTheme(getStyles16);
21639
21310
  const isBigScreen = useIsWithinBreakpoints(["xl", "xxl"]);
21640
- const OpenGuideButton = () => /* @__PURE__ */ jsx296(EuiIcon8, { type: "info", size: "xxl", color: "primary" });
21641
- const CloseGuideButton = () => /* @__PURE__ */ jsx296(EuiFlexItem54, { grow: false, children: /* @__PURE__ */ jsx296(EuiIcon8, { type: isBigScreen ? "arrowRight" : "arrowUp", size: "xl", color: "primary" }) });
21311
+ const OpenGuideButton = () => /* @__PURE__ */ jsx294(EuiIcon8, { type: "info", size: "xxl", color: "primary" });
21312
+ const CloseGuideButton = () => /* @__PURE__ */ jsx294(EuiFlexItem54, { grow: false, children: /* @__PURE__ */ jsx294(EuiIcon8, { type: isBigScreen ? "arrowRight" : "arrowUp", size: "xl", color: "primary" }) });
21642
21313
  if (!isExpanded) {
21643
- return /* @__PURE__ */ jsx296(WfoWorkflowGuideToggleStrip, { onToggle, ariaLabel: t("show"), isBigScreen, sticky: true, children: /* @__PURE__ */ jsx296(OpenGuideButton, {}) });
21314
+ return /* @__PURE__ */ jsx294(WfoWorkflowGuideToggleStrip, { onToggle, ariaLabel: t("show"), isBigScreen, sticky: true, children: /* @__PURE__ */ jsx294(OpenGuideButton, {}) });
21644
21315
  }
21645
21316
  if (isBigScreen) {
21646
- return /* @__PURE__ */ jsx296(EuiFlexItem54, { grow: 1, css: guideExpandedItemStyle, children: /* @__PURE__ */ jsxs156(EuiFlexGroup52, { gutterSize: "none", css: [fullHeightStyle, guideExpandedFillStyle], children: [
21647
- /* @__PURE__ */ jsx296(WfoWorkflowGuideMarkdown, { workflowName, isBigScreen: true }),
21648
- /* @__PURE__ */ jsx296(WfoWorkflowGuideToggleStrip, { onToggle, ariaLabel: t("hide"), isBigScreen: true, noLeadingBorder: true, children: /* @__PURE__ */ jsx296(CloseGuideButton, {}) })
21317
+ return /* @__PURE__ */ jsx294(EuiFlexItem54, { grow: 1, css: guideExpandedItemStyle, children: /* @__PURE__ */ jsxs155(EuiFlexGroup52, { gutterSize: "none", css: [fullHeightStyle, guideExpandedFillStyle], children: [
21318
+ /* @__PURE__ */ jsx294(WfoWorkflowGuideMarkdown, { workflowName, isBigScreen: true }),
21319
+ /* @__PURE__ */ jsx294(WfoWorkflowGuideToggleStrip, { onToggle, ariaLabel: t("hide"), isBigScreen: true, noLeadingBorder: true, children: /* @__PURE__ */ jsx294(CloseGuideButton, {}) })
21649
21320
  ] }) });
21650
21321
  }
21651
- return /* @__PURE__ */ jsx296(EuiFlexItem54, { grow: false, children: /* @__PURE__ */ jsxs156(EuiFlexGroup52, { direction: "column", gutterSize: "none", children: [
21652
- /* @__PURE__ */ jsx296(
21322
+ return /* @__PURE__ */ jsx294(EuiFlexItem54, { grow: false, children: /* @__PURE__ */ jsxs155(EuiFlexGroup52, { direction: "column", gutterSize: "none", children: [
21323
+ /* @__PURE__ */ jsx294(
21653
21324
  WfoWorkflowGuideToggleStrip,
21654
21325
  {
21655
21326
  onToggle,
21656
21327
  ariaLabel: t("hide"),
21657
21328
  isBigScreen,
21658
21329
  noLeadingBorder: true,
21659
- children: /* @__PURE__ */ jsx296(CloseGuideButton, {})
21330
+ children: /* @__PURE__ */ jsx294(CloseGuideButton, {})
21660
21331
  }
21661
21332
  ),
21662
- /* @__PURE__ */ jsx296(WfoWorkflowGuideMarkdown, { workflowName, isBigScreen: true })
21333
+ /* @__PURE__ */ jsx294(WfoWorkflowGuideMarkdown, { workflowName, isBigScreen: true })
21663
21334
  ] }) });
21664
21335
  };
21665
21336
 
21666
21337
  // src/components/WfoWorkflowUserGuide/WfoPageWithUserGuide.tsx
21667
- import { useState as useState64 } from "react";
21338
+ import { useState as useState63 } from "react";
21668
21339
  import { EuiFlexGroup as EuiFlexGroup53, EuiFlexItem as EuiFlexItem55, useIsWithinBreakpoints as useIsWithinBreakpoints2 } from "@elastic/eui";
21669
- import { Fragment as Fragment71, jsx as jsx297, jsxs as jsxs157 } from "@emotion/react/jsx-runtime";
21340
+ import { Fragment as Fragment70, jsx as jsx295, jsxs as jsxs156 } from "@emotion/react/jsx-runtime";
21670
21341
  var WfoPageWithUserGuide = ({ workflowName, children }) => {
21671
- const [isExpanded, setIsExpanded] = useState64(false);
21342
+ const [isExpanded, setIsExpanded] = useState63(false);
21672
21343
  const isBigScreen = useIsWithinBreakpoints2(["xl", "xxl"]);
21673
21344
  const { showWorkflowUserGuide } = useGetOrchestratorConfig();
21674
21345
  if (!workflowName || !showWorkflowUserGuide) {
21675
- return /* @__PURE__ */ jsx297(Fragment71, { children });
21346
+ return /* @__PURE__ */ jsx295(Fragment70, { children });
21676
21347
  }
21677
- const workflowGuideExpandablePanel = /* @__PURE__ */ jsx297(
21348
+ const workflowGuideExpandablePanel = /* @__PURE__ */ jsx295(
21678
21349
  WfoWorkflowGuideExpandablePanel,
21679
21350
  {
21680
21351
  workflowName,
@@ -21682,7 +21353,7 @@ var WfoPageWithUserGuide = ({ workflowName, children }) => {
21682
21353
  onToggle: () => setIsExpanded((expanded) => !expanded)
21683
21354
  }
21684
21355
  );
21685
- return /* @__PURE__ */ jsxs157(
21356
+ return /* @__PURE__ */ jsxs156(
21686
21357
  EuiFlexGroup53,
21687
21358
  {
21688
21359
  gutterSize: "s",
@@ -21690,7 +21361,7 @@ var WfoPageWithUserGuide = ({ workflowName, children }) => {
21690
21361
  alignItems: isBigScreen ? "flexStart" : "stretch",
21691
21362
  children: [
21692
21363
  !isBigScreen && workflowGuideExpandablePanel,
21693
- /* @__PURE__ */ jsx297(EuiFlexItem55, { grow: true, css: { minWidth: 0 }, children }),
21364
+ /* @__PURE__ */ jsx295(EuiFlexItem55, { grow: true, css: { minWidth: 0 }, children }),
21694
21365
  isBigScreen && workflowGuideExpandablePanel
21695
21366
  ]
21696
21367
  }
@@ -21698,7 +21369,7 @@ var WfoPageWithUserGuide = ({ workflowName, children }) => {
21698
21369
  };
21699
21370
 
21700
21371
  // src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx
21701
- import { useCallback as useCallback18, useEffect as useEffect46, useState as useState65 } from "react";
21372
+ import { useCallback as useCallback18, useEffect as useEffect45, useState as useState64 } from "react";
21702
21373
  import { EuiFlexItem as EuiFlexItem56 } from "@elastic/eui";
21703
21374
  import Editor from "@monaco-editor/react";
21704
21375
 
@@ -21717,7 +21388,7 @@ var getStyles17 = ({ theme, isDarkModeActive }) => {
21717
21388
  };
21718
21389
 
21719
21390
  // src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx
21720
- import { jsx as jsx298 } from "@emotion/react/jsx-runtime";
21391
+ import { jsx as jsx296 } from "@emotion/react/jsx-runtime";
21721
21392
  var MONACO_THEME = {
21722
21393
  light: "vs",
21723
21394
  dark: "hc-black"
@@ -21725,9 +21396,9 @@ var MONACO_THEME = {
21725
21396
  var WfoMonacoCodeBlock = ({ data }) => {
21726
21397
  const { theme, isDarkModeActive } = useOrchestratorTheme();
21727
21398
  const { monacoEditorStyle } = useWithOrchestratorTheme(getStyles17);
21728
- const [monacoInstance, setMonacoInstance] = useState65(void 0);
21399
+ const [monacoInstance, setMonacoInstance] = useState64(void 0);
21729
21400
  const json = JSON.stringify(data, null, 4);
21730
- const [editorHeight, setEditorHeight] = useState65(0);
21401
+ const [editorHeight, setEditorHeight] = useState64(0);
21731
21402
  const addThemeToEditor = useCallback18(
21732
21403
  (monaco) => {
21733
21404
  monaco.editor.defineTheme("wfoTheme", {
@@ -21742,7 +21413,7 @@ var WfoMonacoCodeBlock = ({ data }) => {
21742
21413
  },
21743
21414
  [theme, isDarkModeActive]
21744
21415
  );
21745
- useEffect46(() => {
21416
+ useEffect45(() => {
21746
21417
  if (monacoInstance) {
21747
21418
  addThemeToEditor(monacoInstance);
21748
21419
  }
@@ -21752,7 +21423,7 @@ var WfoMonacoCodeBlock = ({ data }) => {
21752
21423
  setEditorHeight(Math.min(scrollHeight, 500));
21753
21424
  setMonacoInstance(monaco);
21754
21425
  }
21755
- return /* @__PURE__ */ jsx298(EuiFlexItem56, { css: monacoEditorStyle, children: /* @__PURE__ */ jsx298(
21426
+ return /* @__PURE__ */ jsx296(EuiFlexItem56, { css: monacoEditorStyle, children: /* @__PURE__ */ jsx296(
21756
21427
  Editor,
21757
21428
  {
21758
21429
  height: editorHeight,
@@ -21814,11 +21485,11 @@ var getWfoLogoSpinnerStyles = () => {
21814
21485
  };
21815
21486
 
21816
21487
  // src/components/WfoLogoSpinner/WfoLogoSpinner.tsx
21817
- import { jsx as jsx299, jsxs as jsxs158 } from "@emotion/react/jsx-runtime";
21488
+ import { jsx as jsx297, jsxs as jsxs157 } from "@emotion/react/jsx-runtime";
21818
21489
  var WfoLogoSpinner = () => {
21819
21490
  const { spinContainerCss, spinCenteringCss, spinPathCss } = getWfoLogoSpinnerStyles();
21820
- return /* @__PURE__ */ jsx299("div", { css: spinCenteringCss, children: /* @__PURE__ */ jsx299("div", { css: spinContainerCss, children: /* @__PURE__ */ jsxs158("svg", { width: "64", height: "64", viewBox: "0 0 640 640", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
21821
- /* @__PURE__ */ jsx299(
21491
+ return /* @__PURE__ */ jsx297("div", { css: spinCenteringCss, children: /* @__PURE__ */ jsx297("div", { css: spinContainerCss, children: /* @__PURE__ */ jsxs157("svg", { width: "64", height: "64", viewBox: "0 0 640 640", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
21492
+ /* @__PURE__ */ jsx297(
21822
21493
  "path",
21823
21494
  {
21824
21495
  css: spinPathCss,
@@ -21828,7 +21499,7 @@ var WfoLogoSpinner = () => {
21828
21499
  fill: "#76B5E0"
21829
21500
  }
21830
21501
  ),
21831
- /* @__PURE__ */ jsx299(
21502
+ /* @__PURE__ */ jsx297(
21832
21503
  "path",
21833
21504
  {
21834
21505
  fillRule: "evenodd",
@@ -21843,7 +21514,7 @@ var WfoLogoSpinner = () => {
21843
21514
  // src/components/WfoButtonWithConfirm/WfoButtonWithConfirm.tsx
21844
21515
  import { useContext as useContext11 } from "react";
21845
21516
  import { EuiButtonIcon as EuiButtonIcon21 } from "@elastic/eui";
21846
- import { jsx as jsx300 } from "@emotion/react/jsx-runtime";
21517
+ import { jsx as jsx298 } from "@emotion/react/jsx-runtime";
21847
21518
  var WfoButtonWithConfirm = ({
21848
21519
  question,
21849
21520
  onConfirm,
@@ -21851,7 +21522,7 @@ var WfoButtonWithConfirm = ({
21851
21522
  ariaLabel = "Confirmation button"
21852
21523
  }) => {
21853
21524
  const { showConfirmDialog } = useContext11(ConfirmationDialogContext);
21854
- return /* @__PURE__ */ jsx300(
21525
+ return /* @__PURE__ */ jsx298(
21855
21526
  EuiButtonIcon21,
21856
21527
  {
21857
21528
  iconType,
@@ -21912,6 +21583,7 @@ var en_GB_default = {
21912
21583
  retrieverHybrid: "Hybrid",
21913
21584
  retrieverSemantic: "Semantic",
21914
21585
  search: "Search",
21586
+ searchError: "Search failed",
21915
21587
  searchModalText: '<p>Different options are available from free text search covering all data columns, or column specific filtering. Note that: <p></p><ul><li>Hidden columns are included</li> <li>Searching is case-insensitive</li> <li>Ordering of words does not matter (unless it is a Phrase)</li> <li>TSV (text search vector) search only available for subscriptions table</li></ul></p> <p>For example:</p> <li><b>"l2vpn"</b> \u2013 free text search</li> <li><b>tag:l2vpn</b> \u2013 search in a specific column</li><li><b>tag:lp description:test</b> \u2013 search in multiple columns</li><li><b>tag:(lp|lr)</b> \u2013 multiselect within 1 column</li><li><b>-tag:lp</b> \u2013 negated filter</li><li><b>test*</b> \u2013 prefix filter</li> <p></p><p><b>Note:</b> Search words containing characters `|-*():"` may not be valid, as they are part of the search query grammar</p><p>Invalid search strings are for example:</p><ul><li>2a10:e300:fff0::/48</li> <li>"node123(planned)"</li> <li>"node123|planned"</li></ul>',
21916
21588
  searchModalTitle: "Search string options",
21917
21589
  showAllColumnsInDetailView: "Show all columns in detail view",
@@ -22439,7 +22111,6 @@ var en_GB_default = {
22439
22111
  },
22440
22112
  index: {
22441
22113
  customerFullname: "Customer",
22442
- customerId: "Customer ID",
22443
22114
  customerShortcode: "Customer abbr",
22444
22115
  description: "Description",
22445
22116
  endDate: "End date",
@@ -22512,6 +22183,7 @@ var nl_NL_default = {
22512
22183
  retrieverHybrid: "Hybride",
22513
22184
  retrieverSemantic: "Semantic",
22514
22185
  search: "Zoeken",
22186
+ searchError: "Zoeken mislukt",
22515
22187
  searchModalText: '<p>Er zijn verschillende opties beschikbaar: zoeken in vrije tekst voor alle datakolommen en specifiek per kolom te filteren. Houd er rekening mee dat: </p><p></p><ul><li>Verborgen kolommen zijn inbegrepen</li> <li>Zoeken is niet hoofdlettergevoelig</li> <li>De volgorde van woorden doet er niet toe (tenzij het een quote)</li> <li>TSV (text search vector) zoekactie alleen beschikbaar voor subscription tabel</li></ul><p>Bijvoorbeeld:</p> <li><b>"l2vpn"</b> \u2013 vrije tekst search</li> <li><b>tag:l2vpn</b> \u2013 zoeken in een specifieke kolom</li> <li><b>tag:lp beschrijving: test</b> \u2013 zoeken in meerdere kolommen</li><li><b>tag:(lp|lr)</b> \u2013 multi select binnen 1 kolom</li> <li><b>-tag:lp</b> \u2013 omgekeerd filteren</li> <li><b>test*</b> \u2013 prefix filter</li> <p></p><p><b>Opmerking:</b> Zoeken op woorden die tekens `|-*():"` bevatten, zijn mogelijk niet geldig, omdat ze deel uitmaken van de grammatica van de zoekfunctie</p><p>Ongeldige zoekwoorden zijn bijvoorbeeld:</p><ul><li>2a10:e300:fff0::/48</li> <li>"node123(gepland)"</li> <li>"node123|gepland"</li></ul>',
22516
22188
  searchModalTitle: "Zoekwoorden opties",
22517
22189
  showAllColumnsInDetailView: "Toon alle kolommen in detailweergave",
@@ -23039,7 +22711,6 @@ var nl_NL_default = {
23039
22711
  },
23040
22712
  index: {
23041
22713
  customerFullname: "Klant",
23042
- customerId: "Klant ID",
23043
22714
  customerShortcode: "Klantafkorting",
23044
22715
  description: "Beschrijving",
23045
22716
  endDate: "Einddatum",
@@ -23181,7 +22852,6 @@ export {
23181
22852
  PATH_START_NEW_TASK,
23182
22853
  PATH_START_NEW_WORKFLOW,
23183
22854
  PATH_SUBSCRIPTIONS,
23184
- PATH_SUBSCRIPTIONS_BETA,
23185
22855
  PATH_TASKS,
23186
22856
  PATH_WORKFLOWS,
23187
22857
  PROCESSES_ENDPOINT,
@@ -23213,7 +22883,10 @@ export {
23213
22883
  STEP_STATE_HIDDEN_KEYS,
23214
22884
  SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY,
23215
22885
  SUBSCRIPTION_ACTIONS_ENDPOINT,
22886
+ SUBSCRIPTION_DESCRIPTION_COLUMN,
23216
22887
  SUBSCRIPTION_DROPDOWN_OPTIONS_ENDPOINT,
22888
+ SUBSCRIPTION_ID_COLUMN,
22889
+ SUBSCRIPTION_START_DATE_COLUMN,
23217
22890
  ScheduleFrequency,
23218
22891
  SortOrder,
23219
22892
  StepStatus,
@@ -23390,7 +23063,6 @@ export {
23390
23063
  WfoSearchLoadingState,
23391
23064
  WfoSearchMetadataHeader,
23392
23065
  WfoSearchPaginationInfo,
23393
- WfoSearchPocPage,
23394
23066
  WfoSearchResultItem,
23395
23067
  WfoSearchResults,
23396
23068
  WfoSearchStrikethrough,
@@ -23436,7 +23108,6 @@ export {
23436
23108
  WfoSubscriptionProductInfoSection,
23437
23109
  WfoSubscriptionStatusBadge,
23438
23110
  WfoSubscriptionSyncStatusBadge,
23439
- WfoSubscriptionsList,
23440
23111
  WfoSubscriptionsListPage,
23441
23112
  WfoSummary,
23442
23113
  WfoSummaryCard,
@@ -23552,6 +23223,7 @@ export {
23552
23223
  getStatusBadgeColor,
23553
23224
  getStepContent,
23554
23225
  getSubscriptionDiffTexts,
23226
+ getSubscriptionSummarySearchPayload,
23555
23227
  getTableConfigFromLocalStorage,
23556
23228
  getTableSettingsColumns,
23557
23229
  getTasksListTabTypeFromString,
@@ -23589,12 +23261,10 @@ export {
23589
23261
  isUuid4,
23590
23262
  isValidLocalStorageTableConfig,
23591
23263
  isWorkflowSearchResult,
23592
- mapGraphQlSubscriptionsResultToPageInfo,
23593
- mapGraphQlSubscriptionsResultToSubscriptionListItems,
23594
23264
  mapProcessSummaryToSummaryCardListItem,
23595
23265
  mapProductBlockInstancesToEuiSelectableOptions,
23596
23266
  mapRtkErrorToWfoError,
23597
- mapSubscriptionSummaryToSummaryCardListItem,
23267
+ mapSubscriptionSearchResultToSummaryCardListItem,
23598
23268
  mapWorkflowDefinitionToWorkflowListItem,
23599
23269
  menuItemIsAllowed,
23600
23270
  metaDataTabs,
@@ -23636,7 +23306,6 @@ export {
23636
23306
  subscriptionDetailQuery,
23637
23307
  subscriptionInUseByRelationQuery,
23638
23308
  subscriptionListQuery,
23639
- subscriptionListSummaryQuery,
23640
23309
  subscriptionListTabs,
23641
23310
  tasksQuery,
23642
23311
  tintOrchestratorColor,
@@ -23688,7 +23357,6 @@ export {
23688
23357
  useGetSubscriptionActionsQuery,
23689
23358
  useGetSubscriptionDetailQuery,
23690
23359
  useGetSubscriptionListQuery,
23691
- useGetSubscriptionSummaryListQuery,
23692
23360
  useGetTaskOptionsQuery,
23693
23361
  useGetTasksQuery,
23694
23362
  useGetTimeLineItemsQuery,