@orchestrator-ui/orchestrator-ui-components 8.7.2 → 8.8.1

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 (52) 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 -10
  4. package/CHANGELOG.md +28 -0
  5. package/dist/index.d.ts +506 -19
  6. package/dist/index.js +614 -399
  7. package/dist/index.js.map +1 -1
  8. package/jest.config.cjs +9 -8
  9. package/package.json +1 -1
  10. package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +2 -2
  11. package/src/components/WfoContentHeader/WfoContentHeader.tsx +1 -1
  12. package/src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.spec.tsx +35 -0
  13. package/src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.tsx +7 -9
  14. package/src/components/WfoProcessList/WfoProcessListDeltaPopover.tsx +1 -1
  15. package/src/components/WfoProcessList/WfoProcessesList.tsx +7 -5
  16. package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +21 -7
  17. package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActions.tsx +25 -9
  18. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionDetailSection.tsx +1 -1
  19. package/src/components/WfoSubscription/styles.ts +6 -0
  20. package/src/components/WfoSubscription/utils/utils.ts +2 -4
  21. package/src/components/WfoTable/WfoStructuredSearchTable/WfoExpandingSearchRow.tsx +0 -1
  22. package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +30 -3
  23. package/src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.spec.tsx +143 -0
  24. package/src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.tsx +33 -11
  25. package/src/components/WfoTable/WfoStructuredSearchTable/WfoRestoreLoop.spec.tsx +130 -0
  26. package/src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx +40 -1
  27. package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.spec.tsx +60 -0
  28. package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.tsx +22 -4
  29. package/src/components/WfoTable/WfoStructuredSearchTable/styles.ts +8 -9
  30. package/src/components/WfoTable/WfoStructuredSearchTable/utils.spec.ts +56 -0
  31. package/src/components/WfoTable/WfoStructuredSearchTable/utils.ts +40 -1
  32. package/src/components/WfoTable/WfoTable/WfoTable.tsx +5 -1
  33. package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +11 -2
  34. package/src/components/WfoTable/WfoTable/WfoTableExpandedRowReveal.spec.tsx +120 -0
  35. package/src/components/WfoTable/WfoTable/styles.ts +6 -0
  36. package/src/components/WfoTable/utils/tableConfigPersistence.ts +1 -0
  37. package/src/components/WfoTimeline/styles.ts +1 -1
  38. package/src/components/WfoWorkflowUserGuide/WfoPageWithUserGuide.tsx +8 -2
  39. package/src/components/WfoWorkflowUserGuide/WfoWorkflowGuideExpandablePanel.tsx +39 -30
  40. package/src/components/WfoWorkflowUserGuide/styles.ts +55 -7
  41. package/src/configuration/constants.ts +1 -1
  42. package/src/configuration/version.ts +1 -1
  43. package/src/hooks/usePathAutoComplete.spec.tsx +64 -0
  44. package/src/hooks/usePathAutoComplete.ts +98 -41
  45. package/src/hooks/useStoredTableConfig.ts +1 -0
  46. package/src/messages/en-GB.json +3 -1
  47. package/src/messages/nl-NL.json +4 -2
  48. package/src/pages/WfoSearchPocPage.tsx +19 -18
  49. package/src/pages/tasks/WfoTasksListPage.tsx +1 -0
  50. package/src/rtk/endpoints/search.ts +1 -0
  51. package/src/types/types.ts +11 -11
  52. package/src/utils/getDefaultTableConfig.ts +2 -0
@@ -24,6 +24,7 @@
24
24
  "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> – free text search</li> <li><b>tag:l2vpn</b> – search in a specific column</li><li><b>tag:lp description:test</b> – search in multiple columns</li><li><b>tag:(lp|lr)</b> – multiselect within 1 column</li><li><b>-tag:lp</b> – negated filter</li><li><b>test*</b> – 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>",
25
25
  "searchModalTitle": "Search string options",
26
26
  "showAllColumnsInDetailView": "Show all columns in detail view",
27
+ "showMatchDetails": "Show match details",
27
28
  "tableSettings": "Table settings",
28
29
  "unauthorizedPage": "You are not authorized to see this page",
29
30
  "unknownError": "Unknown error"
@@ -520,7 +521,8 @@
520
521
  "title": "Subscriptions",
521
522
  "workflowsTab": {
522
523
  "startWithNewestLabel": "Start with newest first",
523
- "startWithOldestLabel": "Start with oldest first"
524
+ "startWithOldestLabel": "Start with oldest first",
525
+ "hideValidateTasks": "Hide validation tasks"
524
526
  }
525
527
  },
526
528
  "index": {
@@ -24,6 +24,7 @@
24
24
  "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> – vrije tekst search</li> <li><b>tag:l2vpn</b> – zoeken in een specifieke kolom</li> <li><b>tag:lp beschrijving: test</b> – zoeken in meerdere kolommen</li><li><b>tag:(lp|lr)</b> – multi select binnen 1 kolom</li> <li><b>-tag:lp</b> – omgekeerd filteren</li> <li><b>test*</b> – 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>",
25
25
  "searchModalTitle": "Zoekwoorden opties",
26
26
  "showAllColumnsInDetailView": "Toon alle kolommen in detailweergave",
27
+ "showMatchDetails": "Toon overeenkomstdetails",
27
28
  "tableSettings": "Tabel instellingen",
28
29
  "unauthorizedPage": "Niet geautoriseerd om deze pagina te bekijken",
29
30
  "unknownError": "Onbekende fout"
@@ -519,8 +520,9 @@
519
520
  "tag": "Tag",
520
521
  "title": "Subscriptions",
521
522
  "workflowsTab": {
522
- "startWithNewestLabel": "Start met nieuwste eerst",
523
- "startWithOldestLabel": "Start met oudste eerst"
523
+ "startWithNewestLabel": "Start met nieuwste",
524
+ "startWithOldestLabel": "Start met oudste",
525
+ "hideValidateTasks": "Verberg validatie taken"
524
526
  }
525
527
  },
526
528
  "index": {
@@ -1,7 +1,6 @@
1
1
  import React, { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
2
  import type { RuleGroupType } from 'react-querybuilder';
3
3
  import { formatQuery } from 'react-querybuilder/formatQuery';
4
- import { parseCEL } from 'react-querybuilder/parseCEL';
5
4
 
6
5
  import { useTranslations } from 'next-intl';
7
6
  import Link from 'next/link';
@@ -89,7 +88,6 @@ const getDataFromResponse = <T extends object>(
89
88
  },
90
89
  {} as Record<string, ReactNode>,
91
90
  ),
92
- shouldOnlyShowOnHover: true,
93
91
  };
94
92
 
95
93
  const items: T[] = responseColumns.map((responseColumn) => {
@@ -389,21 +387,19 @@ export const WfoSearchPocPage = () => {
389
387
  };
390
388
 
391
389
  const safeCelParse = useCallback((celString: string) => {
392
- try {
393
- const ruleGroup = parseCEL(celString);
394
- if (celString === '') {
395
- setIsValidFilterString(true);
396
- } else if (ruleGroup?.rules?.length > 0) {
397
- // parseCEL returns a query object check if it has any rules
398
- setIsValidFilterString(true);
399
- setQueryBuilderRuleGroup(ruleGroup);
400
- } else {
401
- // If there are no rules created based on this string then
402
- // we assume the string is not valid. In any case it will not do anything
403
- // to the search results
404
- setIsValidFilterString(false);
405
- }
406
- } catch {
390
+ if (celString === '') {
391
+ setIsValidFilterString(true);
392
+ return;
393
+ }
394
+ // parseCelToRuleGroup returns undefined when the string parses to no rules in that
395
+ // case we assume the string is not valid. In any case it would not do anything to the
396
+ // search results. It also assigns the rule ids parseCEL leaves out, which the query
397
+ // builder needs to keep rule identity stable across query updates.
398
+ const ruleGroup = parseCelToRuleGroup(celString);
399
+ if (ruleGroup) {
400
+ setIsValidFilterString(true);
401
+ setQueryBuilderRuleGroup(ruleGroup);
402
+ } else {
407
403
  setIsValidFilterString(false);
408
404
  }
409
405
  }, []);
@@ -448,7 +444,11 @@ export const WfoSearchPocPage = () => {
448
444
  setIsValidFilterString(true);
449
445
  } else {
450
446
  setFilterString(celQuery);
451
- setIsValidFilterString(true);
447
+ // formatQuery output is normally valid CEL, but not unconditionally — a rule can
448
+ // hold state formatQuery renders as unparseable CEL (e.g. a 'field' value source
449
+ // renders its value unquoted). Validate the round trip so the invalid marker and
450
+ // the Apply button track what the textarea actually shows.
451
+ setIsValidFilterString(!!parseCelToRuleGroup(celQuery));
452
452
  }
453
453
  }
454
454
  };
@@ -507,6 +507,7 @@ export const WfoSearchPocPage = () => {
507
507
  data={subscriptionListItems}
508
508
  rowExpandingConfiguration={rowExpandingConfiguration}
509
509
  defaultHiddenColumns={tableDefaults?.hiddenColumns}
510
+ defaultShowMatchDetails={tableDefaults?.showMatchDetails}
510
511
  filterString={filterString}
511
512
  handleSearch={handleApplyFilter}
512
513
  isLoading={isFetching}
@@ -110,6 +110,7 @@ export const WfoTasksListPage = () => {
110
110
  'productName',
111
111
  'customer',
112
112
  'customerAbbreviation',
113
+ 'note',
113
114
  'subscriptions',
114
115
  'createdBy',
115
116
  'assignee',
@@ -112,5 +112,6 @@ export const {
112
112
  useLazySearchQuery,
113
113
  useSearchWithPaginationMutation,
114
114
  useSearchPathsQuery,
115
+ useLazySearchPathsQuery,
115
116
  useSearchDefinitionsQuery,
116
117
  } = searchApi;
@@ -134,12 +134,12 @@ export interface ProductDefinition {
134
134
  export type ProductsSummary = Pick<ProductDefinition, 'name'> & SubscriptionsResult<never>;
135
135
 
136
136
  export enum WorkflowTarget {
137
- CREATE = 'create',
138
- MODIFY = 'modify',
139
- TERMINATE = 'terminate',
140
- SYSTEM = 'system',
141
- VALIDATE = 'validate',
142
- RECONCILE = 'reconcile',
137
+ CREATE = 'CREATE',
138
+ MODIFY = 'MODIFY',
139
+ TERMINATE = 'TERMINATE',
140
+ SYSTEM = 'SYSTEM',
141
+ VALIDATE = 'VALIDATE',
142
+ RECONCILE = 'RECONCILE',
143
143
  }
144
144
 
145
145
  export type Process = {
@@ -624,11 +624,11 @@ export type SubscriptionActions = {
624
624
  reason?: string;
625
625
  locked_relations?: string[];
626
626
  locked_relations_detail?: SubscriptionRelation[];
627
- modify: SubscriptionAction[];
628
- terminate: SubscriptionAction[];
629
- system: SubscriptionAction[];
630
- validate: SubscriptionAction[];
631
- reconcile: SubscriptionAction[];
627
+ [WorkflowTarget.MODIFY]: SubscriptionAction[];
628
+ [WorkflowTarget.TERMINATE]: SubscriptionAction[];
629
+ [WorkflowTarget.SYSTEM]: SubscriptionAction[];
630
+ [WorkflowTarget.VALIDATE]: SubscriptionAction[];
631
+ [WorkflowTarget.RECONCILE]: SubscriptionAction[];
632
632
  };
633
633
 
634
634
  export enum CacheTagType {
@@ -19,10 +19,12 @@ import { ProductBlockDefinition, ProductDefinition, ResourceTypeDefinition, Work
19
19
  function getTableConfig<T>(
20
20
  hiddenColumns: (keyof T)[] = [],
21
21
  selectedPageSize = DEFAULT_PAGE_SIZE,
22
+ showMatchDetails = false,
22
23
  ): StoredTableConfig<T> {
23
24
  return {
24
25
  selectedPageSize,
25
26
  hiddenColumns,
27
+ showMatchDetails,
26
28
  };
27
29
  }
28
30