@orchestrator-ui/orchestrator-ui-components 8.4.4 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +7 -7
- package/CHANGELOG.md +17 -0
- package/dist/index.d.ts +1890 -562
- package/dist/index.js +3814 -2103
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/WfoPydanticForm/WfoPydanticForm.tsx +23 -1
- package/src/components/WfoSearchBar/WfoSearchField.tsx +0 -1
- package/src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx +5 -5
- package/src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx +12 -5
- package/src/components/WfoSearchPage/constants.ts +0 -4
- package/src/components/WfoSearchPage/utils.ts +75 -20
- package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionExpandableMenuItem.tsx +36 -18
- package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionsMenuItem.tsx +38 -2
- package/src/components/WfoSubscription/utils/index.ts +3 -0
- package/src/components/WfoSubscription/utils/utils.spec.ts +39 -4
- package/src/components/WfoSubscription/utils/utils.ts +10 -4
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoAddGroupAction.tsx +19 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoAddRuleAction.tsx +23 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoCombinatorSelector.tsx +30 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoExpandingSearchRow.tsx +38 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFieldSelector.tsx +84 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +189 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.tsx +33 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRangeEditor.tsx +64 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRemoveGroupAction.tsx +21 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRemoveRuleAction.tsx +20 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRule.tsx +16 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRuleGroup.tsx +73 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx +323 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.tsx +159 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/index.ts +2 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/styles.ts +146 -0
- package/src/components/WfoTable/WfoTable/WfoDragHandler.tsx +4 -2
- package/src/components/WfoTable/index.ts +2 -6
- package/src/components/WfoTitleWithWebsocketBadge/WfoTitleWithWebsocketBadge.tsx +14 -6
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +1 -0
- package/src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx +3 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx +32 -12
- package/src/components/WfoWorkflowUserGuide/WfoPageWithUserGuide.tsx +38 -0
- package/src/components/WfoWorkflowUserGuide/WfoWorkflowGuideExpandablePanel.tsx +151 -0
- package/src/components/WfoWorkflowUserGuide/index.ts +2 -0
- package/src/components/WfoWorkflowUserGuide/styles.ts +87 -0
- package/src/components/index.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/contexts/OrchestratorConfigContext.tsx +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/usePathAutoComplete.ts +3 -4
- package/src/hooks/useSearch.ts +20 -15
- package/src/hooks/useSearchPagination.ts +11 -8
- package/src/hooks/useUrlParams.ts +3 -5
- package/src/icons/WfoTrashFilled.tsx +13 -0
- package/src/icons/WfoXMarkSmall.tsx +2 -2
- package/src/icons/index.ts +1 -0
- package/src/messages/en-GB.json +94 -8
- package/src/messages/nl-NL.json +23 -5
- package/src/pages/WfoSearchPocPage.tsx +402 -0
- package/src/pages/index.ts +1 -0
- package/src/pages/processes/WfoProcessDetail.tsx +10 -10
- package/src/pages/processes/WfoProcessDetailPage.tsx +1 -0
- package/src/pages/processes/WfoStartProcessPage.tsx +15 -19
- package/src/rtk/api.ts +1 -0
- package/src/rtk/endpoints/index.ts +1 -0
- package/src/rtk/endpoints/search.ts +45 -10
- package/src/rtk/endpoints/workflowGuides.ts +25 -0
- package/src/types/search.ts +21 -5
- package/src/types/types.ts +10 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { WfoIconProps } from './WfoIconProps';
|
|
4
|
+
|
|
5
|
+
export const WfoTrashFilled: FC<WfoIconProps> = ({ color = '#000000' }) => (
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={24} height={24} viewBox="0 0 24 24" fill={color}>
|
|
7
|
+
<path
|
|
8
|
+
fillRule="evenodd"
|
|
9
|
+
d="M16.5 4.478v.227a48.816 48.816 0 0 1 3.878.512.75.75 0 1 1-.256 1.478l-.209-.035-1.005 13.07a3 3 0 0 1-2.991 2.77H8.084a3 3 0 0 1-2.991-2.77L4.087 6.66l-.209.035a.75.75 0 0 1-.256-1.478A48.567 48.567 0 0 1 7.5 4.705v-.227c0-1.564 1.213-2.9 2.816-2.951a52.662 52.662 0 0 1 3.369 0c1.603.051 2.815 1.387 2.815 2.951Zm-6.136-1.452a51.196 51.196 0 0 1 3.273 0C14.39 3.05 15 3.684 15 4.478v.113a49.488 49.488 0 0 0-6 0v-.113c0-.794.609-1.428 1.364-1.452Zm-.355 5.945a.75.75 0 1 0-1.5.058l.347 9a.75.75 0 1 0 1.499-.058l-.346-9Zm5.48.058a.75.75 0 1 0-1.498-.058l-.347 9a.75.75 0 0 0 1.5.058l.345-9Z"
|
|
10
|
+
clipRule="evenodd"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
13
|
+
);
|
|
@@ -2,11 +2,11 @@ import React, { FC } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { WfoIconProps } from './WfoIconProps';
|
|
4
4
|
|
|
5
|
-
export const WfoXMarkSmall: FC<WfoIconProps> = ({ width = 20, height = 20 }) => (
|
|
5
|
+
export const WfoXMarkSmall: FC<WfoIconProps> = ({ width = 20, height = 20, color = '#000' }) => (
|
|
6
6
|
<svg width={width} height={height} viewBox="0 -2 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<title>icon/x-mark</title>
|
|
8
8
|
<g id="Symbols" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
9
|
-
<g xmlns="http://www.w3.org/2000/svg" fill=
|
|
9
|
+
<g xmlns="http://www.w3.org/2000/svg" fill={color}>
|
|
10
10
|
<path d="M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z" />
|
|
11
11
|
</g>
|
|
12
12
|
</g>
|
package/src/icons/index.ts
CHANGED
package/src/messages/en-GB.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"workflows": "Workflows",
|
|
20
20
|
"darkMode": "Dark mode",
|
|
21
21
|
"lightMode": "Light mode",
|
|
22
|
-
"websocketConnected": "This page
|
|
22
|
+
"websocketConnected": "This page recexives live updates from the server",
|
|
23
23
|
"websocketDisconnected": "The connection to the server is lost, click the icon or refresh the page",
|
|
24
24
|
"websocketDisconnectedShort": "WebSocket disconnected, click the icon to reconnect",
|
|
25
25
|
"resetToDefault": "Reset to default",
|
|
@@ -50,7 +50,16 @@
|
|
|
50
50
|
"insyncFalse": "out-of-sync",
|
|
51
51
|
"searchModalTitle": "Search string options",
|
|
52
52
|
"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>",
|
|
53
|
-
"
|
|
53
|
+
"retrieval": "Retrieval",
|
|
54
|
+
"retrieverAuto": "Auto",
|
|
55
|
+
"retrieverFuzzy": "Fuzzy",
|
|
56
|
+
"retrieverSemantic": "Semantic",
|
|
57
|
+
"retrieverHybrid": "Hybrid",
|
|
58
|
+
"createFilter": "Create a filter",
|
|
59
|
+
"applyFilter": "Apply filter",
|
|
60
|
+
"removeFilter": "Remove filter",
|
|
61
|
+
"cancel": "Cancel",
|
|
62
|
+
"loadMore": "Load more"
|
|
54
63
|
},
|
|
55
64
|
"confirmationDialog": {
|
|
56
65
|
"title": "Please confirm",
|
|
@@ -85,7 +94,9 @@
|
|
|
85
94
|
"startWorkflow": "Start workflow",
|
|
86
95
|
"resumeTask": "Resume task",
|
|
87
96
|
"resumeWorkflow": "Resume workflow",
|
|
88
|
-
"inputFieldsHaveValidationErrors": "{nrOfValidationErrors} input field(s) have validation errors"
|
|
97
|
+
"inputFieldsHaveValidationErrors": "{nrOfValidationErrors} input field(s) have validation errors",
|
|
98
|
+
"preconditionFailedTitle": "This task cannot be started right now",
|
|
99
|
+
"preconditionFailedFallback": "A precondition for starting this task was not met."
|
|
89
100
|
},
|
|
90
101
|
"widgets": {
|
|
91
102
|
"customer": {
|
|
@@ -234,6 +245,12 @@
|
|
|
234
245
|
"createScheduleButton": "Create schedule"
|
|
235
246
|
}
|
|
236
247
|
},
|
|
248
|
+
"workflowGuide": {
|
|
249
|
+
"title": "User guide of {workflowName}",
|
|
250
|
+
"noGuideAvailable": "No user guide is available for this workflow/task",
|
|
251
|
+
"show": "Show user guide",
|
|
252
|
+
"hide": "Hide user guide"
|
|
253
|
+
},
|
|
237
254
|
"processes": {
|
|
238
255
|
"index": {
|
|
239
256
|
"workflowName": "Workflow",
|
|
@@ -358,14 +375,14 @@
|
|
|
358
375
|
"validateSubscription": "Validate subscription",
|
|
359
376
|
"subscription": {
|
|
360
377
|
"no_modify_deleted_related_objects": "This subscription can not be modified because it contains references to other systems that are deleted.",
|
|
361
|
-
"no_modify_in_use_by_subscription": "This subscription can not be {action} as it is used in other subscriptions:
|
|
378
|
+
"no_modify_in_use_by_subscription": "This subscription can not be {action} as it is used in other subscriptions:",
|
|
362
379
|
"no_modify_invalid_status": "This subscription can not be modified because of the status: {status}. Only subscriptions with status {usable_when} can be {action}.",
|
|
363
380
|
"no_modify_workflow": "This subscription can not be modified as the product has no modify workflows.",
|
|
364
381
|
"no_termination_workflow": "This subscription can not be terminated as the product has no termination workflows.",
|
|
365
382
|
"no_validate_workflow": "This subscription can not be validated as the product has no validate workflows.",
|
|
366
383
|
"not_in_sync": "This subscription can not be modified because it is not in-sync. This means there is some error in the registration of the subscription or that it is being modified by another workflow.",
|
|
367
|
-
"relations_not_in_sync": "This subscription can not be modified because some related subscriptions are not in-sync
|
|
368
|
-
"no_modify_subscription_in_use_by_others": "This subscription can not be modified because it is in use by one or more other subscriptions:
|
|
384
|
+
"relations_not_in_sync": "This subscription can not be modified because some related subscriptions are not in-sync.\n\nLocked subscriptions:",
|
|
385
|
+
"no_modify_subscription_in_use_by_others": "This subscription can not be modified because it is in use by one or more other subscriptions.\n\nSubscriptions:",
|
|
369
386
|
"insufficient_workflow_permissions": "Insufficient user permissions to run this workflow",
|
|
370
387
|
"running_process": "This action cannot be started because this subscription already has a running process or task."
|
|
371
388
|
}
|
|
@@ -513,6 +530,68 @@
|
|
|
513
530
|
"logout": "Logout",
|
|
514
531
|
"aoStatusPage": "A&O application status page"
|
|
515
532
|
},
|
|
533
|
+
"agent": {
|
|
534
|
+
"title": "Wfo Agent",
|
|
535
|
+
"availability": {
|
|
536
|
+
"unavailable": {
|
|
537
|
+
"title": "Agent Service Not Available",
|
|
538
|
+
"instructions": {
|
|
539
|
+
"setAgentEnvironment": {
|
|
540
|
+
"before": "Set ",
|
|
541
|
+
"after": " in your service environment variables"
|
|
542
|
+
},
|
|
543
|
+
"setSearchEnvironment": {
|
|
544
|
+
"before": "Set ",
|
|
545
|
+
"after": " (agent functionality requires search)"
|
|
546
|
+
},
|
|
547
|
+
"checkVersion": "Ensure your orchestrator-core version supports agent functionality",
|
|
548
|
+
"configureOpenAI": "Configure your OpenAI API key if using OpenAI models",
|
|
549
|
+
"restartService": "Restart your service",
|
|
550
|
+
"checkDockerConfig": "If using Docker, make sure the environment variables are set in docker-compose.yml"
|
|
551
|
+
},
|
|
552
|
+
"documentation": "Please refer to the orchestrator documentation for detailed setup instructions.",
|
|
553
|
+
"retryButton": "Retry Connection"
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
"page": {
|
|
557
|
+
"filledParameters": "Filled parameters",
|
|
558
|
+
"emptyGroup": "Empty group",
|
|
559
|
+
"searchQuery": "Search query",
|
|
560
|
+
"activeFilters": "Active filters",
|
|
561
|
+
"noFiltersApplied": "No filters applied",
|
|
562
|
+
"entityType": "Entity type",
|
|
563
|
+
"action": "Action",
|
|
564
|
+
"copilot": {
|
|
565
|
+
"title": "Database assistant",
|
|
566
|
+
"initial": "What can I help you with?"
|
|
567
|
+
},
|
|
568
|
+
"suggestions": {
|
|
569
|
+
"findActiveSubscriptions": "Find active subscriptions",
|
|
570
|
+
"showTerminatedWorkflows": "Show terminated workflows",
|
|
571
|
+
"listAllSubscriptionsAndExport": "List all subscriptions and export them",
|
|
572
|
+
"showActiveSubscriptionsPerMonth": "Show the number of active subscriptions per month"
|
|
573
|
+
},
|
|
574
|
+
"tools": {
|
|
575
|
+
"set_filter_tree": "I'm setting up filters",
|
|
576
|
+
"start_new_search": "I'm starting a new search",
|
|
577
|
+
"run_search": "I'm executing a search",
|
|
578
|
+
"discover_filter_paths": "I'm discovering available filters",
|
|
579
|
+
"run_aggregation": "I'm running aggregations",
|
|
580
|
+
"prepare_export": "I'm preparing the export",
|
|
581
|
+
"get_valid_operators": "I'm getting valid operators",
|
|
582
|
+
"set_temporal_grouping": "I'm setting temporal grouping"
|
|
583
|
+
},
|
|
584
|
+
"planProgress": {
|
|
585
|
+
"planning": "Planning...",
|
|
586
|
+
"completed": "Plan completed",
|
|
587
|
+
"executing": "Executing plan ({completed}/{total})"
|
|
588
|
+
},
|
|
589
|
+
"visualization": {
|
|
590
|
+
"noDataAvailable": "No data available for visualization.",
|
|
591
|
+
"invalidDataStructure": "Invalid data structure."
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
},
|
|
516
595
|
"search": {
|
|
517
596
|
"availability": {
|
|
518
597
|
"unavailable": {
|
|
@@ -534,7 +613,7 @@
|
|
|
534
613
|
"selectFieldFirst": "Select a field first",
|
|
535
614
|
"maxNestingDepth": "Maximum nesting depth reached",
|
|
536
615
|
"addNestedGroup": "Add nested group",
|
|
537
|
-
"
|
|
616
|
+
"addRule": "Add rule",
|
|
538
617
|
"addGroup": "Add group",
|
|
539
618
|
"removeGroup": "Remove group",
|
|
540
619
|
"emptyGroupDescription": "Add conditions or nested groups to build your filter.",
|
|
@@ -581,7 +660,14 @@
|
|
|
581
660
|
"valueLabel": "Value",
|
|
582
661
|
"fieldsGroupLabel": "Fields",
|
|
583
662
|
"componentsGroupLabel": "Components",
|
|
584
|
-
"pathsCount": "{count} paths"
|
|
663
|
+
"pathsCount": "{count} paths",
|
|
664
|
+
"id": "Id",
|
|
665
|
+
"type": "Entity type",
|
|
666
|
+
"title": "Title",
|
|
667
|
+
"score": "Score",
|
|
668
|
+
"matchingField": "Matching field",
|
|
669
|
+
"perfectMatch": "Perfect match",
|
|
670
|
+
"removeRule": "Remove rule"
|
|
585
671
|
},
|
|
586
672
|
"tabs": {
|
|
587
673
|
"subscriptions": "Subscriptions",
|
package/src/messages/nl-NL.json
CHANGED
|
@@ -50,7 +50,17 @@
|
|
|
50
50
|
"insyncFalse": "out-of-sync",
|
|
51
51
|
"showAllColumnsInDetailView": "Toon alle kolommen in detailweergave",
|
|
52
52
|
"searchModalTitle": "Zoekwoorden opties",
|
|
53
|
-
"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>"
|
|
53
|
+
"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>",
|
|
54
|
+
"retrieval": "Retrieval",
|
|
55
|
+
"retrieverAuto": "Auto",
|
|
56
|
+
"retrieverFuzzy": "Fuzzy",
|
|
57
|
+
"retrieverSemantic": "Semantic",
|
|
58
|
+
"retrieverHybrid": "Hybride",
|
|
59
|
+
"createFilter": "Filter",
|
|
60
|
+
"applyFilter": "Pas filter tpe",
|
|
61
|
+
"removeFilter": "Verwijder filter",
|
|
62
|
+
"cancel": "Cancel",
|
|
63
|
+
"loadMore": "Meer laden"
|
|
54
64
|
},
|
|
55
65
|
"confirmationDialog": {
|
|
56
66
|
"title": "Graag bevestigen",
|
|
@@ -85,7 +95,9 @@
|
|
|
85
95
|
"startWorkflow": "Start workflow",
|
|
86
96
|
"resumeTask": "Hervat task",
|
|
87
97
|
"resumeWorkflow": "Hervat workflow",
|
|
88
|
-
"inputFieldsHaveValidationErrors": "{nrOfValidationErrors} input veld(en) hebben validatiefouten"
|
|
98
|
+
"inputFieldsHaveValidationErrors": "{nrOfValidationErrors} input veld(en) hebben validatiefouten",
|
|
99
|
+
"preconditionFailedTitle": "Deze workflow kan op dit moment niet worden gestart",
|
|
100
|
+
"preconditionFailedFallback": "Aan een voorwaarde voor het starten van deze workflow is niet voldaan."
|
|
89
101
|
},
|
|
90
102
|
"widgets": {
|
|
91
103
|
"customer": {
|
|
@@ -233,6 +245,12 @@
|
|
|
233
245
|
"createScheduleButton": "Maak schema"
|
|
234
246
|
}
|
|
235
247
|
},
|
|
248
|
+
"workflowGuide": {
|
|
249
|
+
"title": "Gebruikershandleiding van {workflowName}",
|
|
250
|
+
"noGuideAvailable": "Er is geen gebruikershandleiding beschikbaar voor deze workflow/taak",
|
|
251
|
+
"show": "Toon gebruikershandleiding",
|
|
252
|
+
"hide": "Verberg gebruikershandleiding"
|
|
253
|
+
},
|
|
236
254
|
"processes": {
|
|
237
255
|
"index": {
|
|
238
256
|
"workflowName": "Workflow naam",
|
|
@@ -357,14 +375,14 @@
|
|
|
357
375
|
"lockedBySubscriptions": "Deze actie is geblokkeerd door de volgende subscriptions:",
|
|
358
376
|
"subscription": {
|
|
359
377
|
"no_modify_deleted_related_objects": "Deze subscription kan niet worden gewijzigd omdat het verwijzingen bevat naar andere systemen die zijn verwijderd.",
|
|
360
|
-
"no_modify_in_use_by_subscription": "Deze subscription kan niet worden {gewijzigd} omdat het wordt gebruikt in andere subscriptions:
|
|
378
|
+
"no_modify_in_use_by_subscription": "Deze subscription kan niet worden {gewijzigd} omdat het wordt gebruikt in andere subscriptions:",
|
|
361
379
|
"no_modify_invalid_status": "Deze subscription kan niet worden gewijzigd vanwege de status: {status}. Alleen abonnementen met de status {usable_when} kunnen worden {action}.",
|
|
362
380
|
"no_modify_workflow": "Deze subscription kan niet worden gewijzigd omdat het product geen modify workflows heeft.",
|
|
363
381
|
"no_termination_workflow": "Deze subscription kan niet worden beëindigd omdat het product geen termination workflows heeft.",
|
|
364
382
|
"no_validate_workflow": "Deze subscription kan niet worden gevalideerd omdat het product geen validate workflows heeft.",
|
|
365
383
|
"not_in_sync": "Deze subscription kan niet worden gewijzigd omdat het niet in-sync is. Dit betekent dat er een fout zit in de registratie van de subscription of dat het wordt gewijzigd door een andere workflow.",
|
|
366
|
-
"relations_not_in_sync": "Deze subscription kan niet worden gewijzigd omdat sommige gerelateerde subscriptions niet in-sync zijn
|
|
367
|
-
"no_modify_subscription_in_use_by_others": "Deze subscription kan niet worden gewijzigd omdat het in gebruik is door een of meer andere subscriptions:
|
|
384
|
+
"relations_not_in_sync": "Deze subscription kan niet worden gewijzigd omdat sommige gerelateerde subscriptions niet in-sync zijn.\n\nGeblokkeerde subscriptions:",
|
|
385
|
+
"no_modify_subscription_in_use_by_others": "Deze subscription kan niet worden gewijzigd omdat het in gebruik is door een of meer andere subscriptions.\n\nSubscriptions:",
|
|
368
386
|
"insufficient_workflow_permissions": "Onvoldoende rechten om deze actie uit te kunnen voeren",
|
|
369
387
|
"running_process": "Deze actie kan niet worden gestart omdat deze subscription al een lopend proces of taak heeft."
|
|
370
388
|
}
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import type { RuleGroupType } from 'react-querybuilder';
|
|
3
|
+
import { formatQuery } from 'react-querybuilder/formatQuery';
|
|
4
|
+
import { parseCEL } from 'react-querybuilder/parseCEL';
|
|
5
|
+
|
|
6
|
+
import { useTranslations } from 'next-intl';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import { StringParam, useQueryParam, withDefault } from 'use-query-params';
|
|
9
|
+
|
|
10
|
+
import { EuiSpacer } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
import { SearchParams, combineSearchFilters } from '@/components';
|
|
13
|
+
import {
|
|
14
|
+
DEFAULT_PAGE_SIZE,
|
|
15
|
+
StoredTableConfig,
|
|
16
|
+
SubscriptionListItem,
|
|
17
|
+
WfoContentHeader,
|
|
18
|
+
WfoDataSorting,
|
|
19
|
+
WfoDateTime,
|
|
20
|
+
WfoExpandingSearchRow,
|
|
21
|
+
WfoFilterTabs,
|
|
22
|
+
WfoFirstPartUUID,
|
|
23
|
+
WfoInlineJson,
|
|
24
|
+
WfoInsyncIcon,
|
|
25
|
+
WfoJsonCodeBlock,
|
|
26
|
+
WfoStructuredSearchTable,
|
|
27
|
+
WfoStructuredSearchTableColumnConfig,
|
|
28
|
+
WfoSubscriptionActions,
|
|
29
|
+
WfoSubscriptionListTab,
|
|
30
|
+
WfoSubscriptionNoteEdit,
|
|
31
|
+
WfoSubscriptionStatusBadge,
|
|
32
|
+
WfoTableColumnConfig,
|
|
33
|
+
subscriptionListTabs,
|
|
34
|
+
} from '@/components';
|
|
35
|
+
import { ColumnType, WfoTableProps } from '@/components/WfoTable/WfoTable';
|
|
36
|
+
import { useStoredTableConfig } from '@/hooks';
|
|
37
|
+
import { SearchPayload, useSearchQuery } from '@/rtk';
|
|
38
|
+
import { EntityKind, PaginatedSearchResults, RetrieverType, SortOrder } from '@/types';
|
|
39
|
+
import { parseDateToLocaleDateTimeString } from '@/utils';
|
|
40
|
+
|
|
41
|
+
const SEARCH_TABLE_LOCAL_STORAGE_KEY = 'SEARCH_TABLE_LOCAL_STORAGE_KEY';
|
|
42
|
+
|
|
43
|
+
type ResultColumToPropertyMap<T> = Map<string, keyof T>;
|
|
44
|
+
|
|
45
|
+
const getKeyByValueFromMap = <T,>(resultColumToPropertyMap: ResultColumToPropertyMap<T>, field: keyof T) => {
|
|
46
|
+
return [...resultColumToPropertyMap.entries()].find(([, v]) => v === field)?.[0] || '';
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const getDataFromResponse = <T extends object>(
|
|
50
|
+
data: PaginatedSearchResults,
|
|
51
|
+
resultColumToPropertyMap: ResultColumToPropertyMap<T>,
|
|
52
|
+
uniqueRowId: keyof T,
|
|
53
|
+
): {
|
|
54
|
+
items: T[];
|
|
55
|
+
rowExpandingConfiguration?: WfoTableProps<T>['rowExpandingConfiguration'];
|
|
56
|
+
} => {
|
|
57
|
+
const searchResult = data?.data;
|
|
58
|
+
if (!searchResult)
|
|
59
|
+
return {
|
|
60
|
+
items: [],
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const responseColumns: Record<string, string | number | null>[] =
|
|
64
|
+
searchResult.map(({ response_columns }) => response_columns) || [];
|
|
65
|
+
|
|
66
|
+
const rowExpandingConfiguration: WfoTableProps<T>['rowExpandingConfiguration'] = {
|
|
67
|
+
uniqueRowId: uniqueRowId as keyof WfoTableColumnConfig<T>,
|
|
68
|
+
uniqueRowIdToExpandedRowMap: searchResult.reduce(
|
|
69
|
+
(rowMap, { response_columns, score, perfect_match, matching_field }) => {
|
|
70
|
+
const idColumnInResponseColumn = getKeyByValueFromMap<T>(resultColumToPropertyMap, uniqueRowId);
|
|
71
|
+
const rowId = response_columns[idColumnInResponseColumn];
|
|
72
|
+
if (rowId) {
|
|
73
|
+
rowMap[rowId] = (
|
|
74
|
+
<WfoExpandingSearchRow score={score} matchingField={matching_field} perfectMatch={perfect_match} />
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
return rowMap;
|
|
78
|
+
},
|
|
79
|
+
{} as Record<string, ReactNode>,
|
|
80
|
+
),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const items: T[] = responseColumns.map((responseColumn) => {
|
|
84
|
+
const item = Object.entries(responseColumn).reduce((acc, [key, value]) => {
|
|
85
|
+
const itemKey = resultColumToPropertyMap.get(key);
|
|
86
|
+
if (itemKey) {
|
|
87
|
+
acc[itemKey] = value as unknown as T[keyof T];
|
|
88
|
+
}
|
|
89
|
+
return acc;
|
|
90
|
+
}, {} as T);
|
|
91
|
+
return item;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
items,
|
|
96
|
+
rowExpandingConfiguration,
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const getTotalItemsFromResponse = (data: PaginatedSearchResults | undefined): number | false => {
|
|
101
|
+
return data?.cursor?.total_items || false;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const resultColumToPropertyMap: ResultColumToPropertyMap<SubscriptionListItem> = new Map([
|
|
105
|
+
['subscription.subscription_id', 'subscriptionId'],
|
|
106
|
+
['subscription.description', 'description'],
|
|
107
|
+
['subscription.status', 'status'],
|
|
108
|
+
['subscription.insync', 'insync'],
|
|
109
|
+
['subscription.product.name', 'productName'],
|
|
110
|
+
['subscription.product.tag', 'tag'],
|
|
111
|
+
['subscription.customer_name', 'customerFullname'],
|
|
112
|
+
['subscription.customer_abbreviation', 'customerShortcode'],
|
|
113
|
+
['subscription.start_date', 'startDate'],
|
|
114
|
+
['subscription.end_date', 'endDate'],
|
|
115
|
+
['subscription.note', 'note'],
|
|
116
|
+
['subscription.metadata', 'metadata'],
|
|
117
|
+
]);
|
|
118
|
+
|
|
119
|
+
export const WfoSearchPocPage = () => {
|
|
120
|
+
const t = useTranslations('subscriptions.index');
|
|
121
|
+
const [activeTab, setActiveTab] = useQueryParam('activeTab', withDefault(StringParam, WfoSubscriptionListTab.ACTIVE));
|
|
122
|
+
const selectedTab = subscriptionListTabs.find(({ id }) => id === activeTab)?.id ?? WfoSubscriptionListTab.ACTIVE;
|
|
123
|
+
const getStoredTableConfig = useStoredTableConfig<SubscriptionListItem>(SEARCH_TABLE_LOCAL_STORAGE_KEY);
|
|
124
|
+
const [retrieverType, setRetrieverType] = useState<RetrieverType>(RetrieverType.Auto);
|
|
125
|
+
|
|
126
|
+
// Part of the search endpoint payload that is passed in the q parameter
|
|
127
|
+
const [queryText, setQueryText] = useState<string>('');
|
|
128
|
+
const [committedSearchQuery, setCommittedSearchQuery] = useState<string>('');
|
|
129
|
+
|
|
130
|
+
// String that is displayed in the filter textarea. This is transformed and if valid passed to the search endpoint in the filter parameter
|
|
131
|
+
const [filterString, setFilterString] = useState<string>();
|
|
132
|
+
const [queryBuilderRuleGroup, setQueryBuilderRuleGroup] = useState<RuleGroupType | undefined>();
|
|
133
|
+
const [committedRuleGroup, setCommittedRuleGroup] = useState<RuleGroupType | undefined>();
|
|
134
|
+
const [isValidFilterString, setIsValidFilterString] = useState<boolean>(true);
|
|
135
|
+
const [tableDefaults, setTableDefaults] = useState<StoredTableConfig<SubscriptionListItem>>();
|
|
136
|
+
const [pageSize, setPageSize] = useState<number>(tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE);
|
|
137
|
+
const [limit, setLimit] = useState<number>(pageSize);
|
|
138
|
+
const [cursor, setCursor] = useState<string | undefined>(undefined);
|
|
139
|
+
const [dataSorting, setDataSorting] = useState<WfoDataSorting<SubscriptionListItem>>({
|
|
140
|
+
field: 'subscriptionId',
|
|
141
|
+
sortOrder: SortOrder.DESC,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// The search payload is derived entirely from the committed search state. Changing any of these
|
|
145
|
+
// values — including the active tab, whether via a tab click or a browser back/forward that
|
|
146
|
+
// updates the activeTab URL param — produces a new payload and RTK Query re-runs the search
|
|
147
|
+
// automatically. No imperative trigger or effect (and no eslint-disable) is needed.
|
|
148
|
+
// Cursor is stripped from the RTK cache key, so a cursor change appends to the accumulated
|
|
149
|
+
// result set instead of creating a new cache entry — see search endpoint's merge() logic.
|
|
150
|
+
const searchPayload: SearchPayload = useMemo(() => {
|
|
151
|
+
const filters = combineSearchFilters(committedRuleGroup, selectedTab);
|
|
152
|
+
const order_by = {
|
|
153
|
+
element: getKeyByValueFromMap(resultColumToPropertyMap, dataSorting.field),
|
|
154
|
+
direction: dataSorting.sortOrder.toLowerCase(),
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
query: committedSearchQuery,
|
|
158
|
+
limit,
|
|
159
|
+
entity_type: EntityKind.SUBSCRIPTION,
|
|
160
|
+
response_columns: Array.from(resultColumToPropertyMap.keys()),
|
|
161
|
+
order_by,
|
|
162
|
+
...(retrieverType !== RetrieverType.Auto && { retriever: retrieverType }),
|
|
163
|
+
...(filters && { filters }),
|
|
164
|
+
...(cursor && { cursor }),
|
|
165
|
+
};
|
|
166
|
+
}, [committedSearchQuery, committedRuleGroup, selectedTab, retrieverType, limit, dataSorting, cursor]);
|
|
167
|
+
|
|
168
|
+
const { data, isFetching } = useSearchQuery(searchPayload);
|
|
169
|
+
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
const storedConfig = getStoredTableConfig();
|
|
172
|
+
if (storedConfig) {
|
|
173
|
+
setTableDefaults(storedConfig);
|
|
174
|
+
}
|
|
175
|
+
}, [getStoredTableConfig]);
|
|
176
|
+
|
|
177
|
+
const tableColumnConfig: WfoStructuredSearchTableColumnConfig<SubscriptionListItem> = {
|
|
178
|
+
actions: {
|
|
179
|
+
columnType: ColumnType.CONTROL,
|
|
180
|
+
width: '50px',
|
|
181
|
+
renderControl: (row) => <WfoSubscriptionActions compactMode={true} subscriptionId={row.subscriptionId} />,
|
|
182
|
+
},
|
|
183
|
+
subscriptionId: {
|
|
184
|
+
columnType: ColumnType.DATA,
|
|
185
|
+
label: t('id'),
|
|
186
|
+
width: '100px',
|
|
187
|
+
renderData: (value) => <WfoFirstPartUUID UUID={value} />,
|
|
188
|
+
renderDetails: (value) => value,
|
|
189
|
+
renderTooltip: (value) => value,
|
|
190
|
+
isSortable: true,
|
|
191
|
+
},
|
|
192
|
+
description: {
|
|
193
|
+
columnType: ColumnType.DATA,
|
|
194
|
+
label: t('description'),
|
|
195
|
+
width: '500px',
|
|
196
|
+
renderData: (value, record) => <Link href={`/subscriptions/${record.subscriptionId}`}>{value}</Link>,
|
|
197
|
+
renderTooltip: (value) => value,
|
|
198
|
+
},
|
|
199
|
+
status: {
|
|
200
|
+
columnType: ColumnType.DATA,
|
|
201
|
+
label: t('status'),
|
|
202
|
+
width: '120px',
|
|
203
|
+
renderData: (value) => <WfoSubscriptionStatusBadge status={value} />,
|
|
204
|
+
},
|
|
205
|
+
insync: {
|
|
206
|
+
columnType: ColumnType.DATA,
|
|
207
|
+
label: t('insync'),
|
|
208
|
+
width: '75px',
|
|
209
|
+
renderData: (value) => <WfoInsyncIcon inSync={value} />,
|
|
210
|
+
},
|
|
211
|
+
productName: {
|
|
212
|
+
columnType: ColumnType.DATA,
|
|
213
|
+
width: '260px',
|
|
214
|
+
label: t('product'),
|
|
215
|
+
},
|
|
216
|
+
tag: {
|
|
217
|
+
columnType: ColumnType.DATA,
|
|
218
|
+
label: t('tag'),
|
|
219
|
+
width: '100px',
|
|
220
|
+
},
|
|
221
|
+
customerFullname: {
|
|
222
|
+
columnType: ColumnType.DATA,
|
|
223
|
+
label: t('customerFullname'),
|
|
224
|
+
},
|
|
225
|
+
customerShortcode: {
|
|
226
|
+
columnType: ColumnType.DATA,
|
|
227
|
+
label: t('customerShortcode'),
|
|
228
|
+
width: '150px',
|
|
229
|
+
},
|
|
230
|
+
startDate: {
|
|
231
|
+
columnType: ColumnType.DATA,
|
|
232
|
+
label: t('startDate'),
|
|
233
|
+
width: '100px',
|
|
234
|
+
renderData: (value) => <WfoDateTime dateOrIsoString={value} />,
|
|
235
|
+
renderDetails: parseDateToLocaleDateTimeString,
|
|
236
|
+
clipboardText: parseDateToLocaleDateTimeString,
|
|
237
|
+
renderTooltip: (cellValue) => cellValue?.toString(),
|
|
238
|
+
},
|
|
239
|
+
endDate: {
|
|
240
|
+
columnType: ColumnType.DATA,
|
|
241
|
+
label: t('endDate'),
|
|
242
|
+
width: '100px',
|
|
243
|
+
renderData: (value) => <WfoDateTime dateOrIsoString={value} />,
|
|
244
|
+
renderDetails: parseDateToLocaleDateTimeString,
|
|
245
|
+
clipboardText: parseDateToLocaleDateTimeString,
|
|
246
|
+
renderTooltip: (cellValue) => cellValue?.toString(),
|
|
247
|
+
},
|
|
248
|
+
note: {
|
|
249
|
+
columnType: ColumnType.DATA,
|
|
250
|
+
label: t('note'),
|
|
251
|
+
width: '300px',
|
|
252
|
+
renderData: (cellValue, row) => {
|
|
253
|
+
return (
|
|
254
|
+
<WfoSubscriptionNoteEdit
|
|
255
|
+
onlyShowOnHover={true}
|
|
256
|
+
endpointName={''}
|
|
257
|
+
queryVariables={{}}
|
|
258
|
+
subscriptionId={row.subscriptionId}
|
|
259
|
+
note={cellValue}
|
|
260
|
+
/>
|
|
261
|
+
);
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
metadata: {
|
|
265
|
+
columnType: ColumnType.DATA,
|
|
266
|
+
label: t('metadata'),
|
|
267
|
+
width: '100px',
|
|
268
|
+
renderData: (value) => <WfoInlineJson data={value} />,
|
|
269
|
+
renderDetails: (value) => value && <WfoJsonCodeBlock data={value} isBasicStyle />,
|
|
270
|
+
renderTooltip: (value) => value && <WfoJsonCodeBlock data={value} isBasicStyle={false} />,
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
const handleApplyFilter = (searchParams?: SearchParams) => {
|
|
275
|
+
setCommittedRuleGroup(searchParams?.ruleGroup === false ? undefined : queryBuilderRuleGroup);
|
|
276
|
+
setCursor(undefined);
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
const onChangeQueryText = (queryText: string) => {
|
|
280
|
+
setQueryText(queryText);
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
const onSearchQueryText = (queryText: string) => {
|
|
284
|
+
setQueryText(queryText);
|
|
285
|
+
setCommittedSearchQuery(queryText);
|
|
286
|
+
setCursor(undefined);
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
const onUpdateRetrieverType = (retrieverType: RetrieverType) => {
|
|
290
|
+
setRetrieverType(retrieverType);
|
|
291
|
+
setCursor(undefined);
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
const handleChangeTab = (updatedTab: WfoSubscriptionListTab) => {
|
|
295
|
+
setActiveTab(updatedTab);
|
|
296
|
+
setLimit(pageSize);
|
|
297
|
+
setCursor(undefined);
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
const safeCelParse = (celString: string) => {
|
|
301
|
+
try {
|
|
302
|
+
const ruleGroup = parseCEL(celString);
|
|
303
|
+
if (celString === '') {
|
|
304
|
+
setIsValidFilterString(true);
|
|
305
|
+
} else if (ruleGroup?.rules?.length > 0) {
|
|
306
|
+
// parseCEL returns a query object — check if it has any rules
|
|
307
|
+
setIsValidFilterString(true);
|
|
308
|
+
setQueryBuilderRuleGroup(ruleGroup);
|
|
309
|
+
} else {
|
|
310
|
+
// If there are no rules created based on this string then
|
|
311
|
+
// we assume the string is not valid. In any case it will not do anything
|
|
312
|
+
// to the search results
|
|
313
|
+
setIsValidFilterString(false);
|
|
314
|
+
}
|
|
315
|
+
} catch {
|
|
316
|
+
setIsValidFilterString(false);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
const onUpdateQueryBuilder = (ruleGroup: RuleGroupType | false) => {
|
|
321
|
+
if (ruleGroup === false) {
|
|
322
|
+
setQueryBuilderRuleGroup(undefined);
|
|
323
|
+
setFilterString('');
|
|
324
|
+
setIsValidFilterString(true);
|
|
325
|
+
} else {
|
|
326
|
+
setQueryBuilderRuleGroup({ ...ruleGroup });
|
|
327
|
+
const celQuery = formatQuery({ ...ruleGroup }, { format: 'cel', fallbackExpression: '' });
|
|
328
|
+
// 1 == 1 indicates the query can't be parsed. This is a fallback to allow it to still be used as
|
|
329
|
+
// part of other queries.
|
|
330
|
+
if (!celQuery || celQuery === '1 == 1') {
|
|
331
|
+
setFilterString('');
|
|
332
|
+
setIsValidFilterString(true);
|
|
333
|
+
} else {
|
|
334
|
+
setFilterString(celQuery);
|
|
335
|
+
setIsValidFilterString(true);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
const onUpdateFilterString = (filterString: string) => {
|
|
341
|
+
setFilterString(filterString);
|
|
342
|
+
safeCelParse(filterString);
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
const { items: subscriptionListItems, rowExpandingConfiguration } =
|
|
346
|
+
data ? getDataFromResponse<SubscriptionListItem>(data, resultColumToPropertyMap, 'subscriptionId') : { items: [] };
|
|
347
|
+
|
|
348
|
+
const totalItems = getTotalItemsFromResponse(data);
|
|
349
|
+
const hasNextPage = data?.page_info?.has_next_page ?? false;
|
|
350
|
+
const nextPageCursor = data?.page_info?.next_page_cursor ?? undefined;
|
|
351
|
+
|
|
352
|
+
const onShowMore = () => {
|
|
353
|
+
if (!isFetching && nextPageCursor) {
|
|
354
|
+
setCursor(nextPageCursor);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
const onUpdateDataSorting = ({ field, sortOrder }: WfoDataSorting<SubscriptionListItem>) => {
|
|
359
|
+
setDataSorting({ field, sortOrder });
|
|
360
|
+
setLimit(pageSize);
|
|
361
|
+
setCursor(undefined);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
return (
|
|
365
|
+
<>
|
|
366
|
+
<WfoContentHeader title="Subscriptions (POC)" />
|
|
367
|
+
<WfoFilterTabs
|
|
368
|
+
tabs={subscriptionListTabs}
|
|
369
|
+
selectedTab={selectedTab}
|
|
370
|
+
translationNamespace="subscriptions.tabs"
|
|
371
|
+
onChangeTab={handleChangeTab}
|
|
372
|
+
/>
|
|
373
|
+
<EuiSpacer size="l" />
|
|
374
|
+
<WfoStructuredSearchTable<SubscriptionListItem>
|
|
375
|
+
data={subscriptionListItems}
|
|
376
|
+
rowExpandingConfiguration={rowExpandingConfiguration}
|
|
377
|
+
defaultHiddenColumns={tableDefaults?.hiddenColumns}
|
|
378
|
+
filterString={filterString}
|
|
379
|
+
handleSearch={handleApplyFilter}
|
|
380
|
+
isLoading={isFetching}
|
|
381
|
+
dataSorting={[dataSorting]}
|
|
382
|
+
isValidFilterString={isValidFilterString}
|
|
383
|
+
localStorageKey={SEARCH_TABLE_LOCAL_STORAGE_KEY}
|
|
384
|
+
onUpdateFilterString={onUpdateFilterString}
|
|
385
|
+
onUpdateQueryBuilder={onUpdateQueryBuilder}
|
|
386
|
+
onChangeQueryText={onChangeQueryText}
|
|
387
|
+
onSearchQueryText={onSearchQueryText}
|
|
388
|
+
onShowMore={onShowMore}
|
|
389
|
+
onUpdateRetrieverType={onUpdateRetrieverType}
|
|
390
|
+
queryBuilderRuleGroup={queryBuilderRuleGroup}
|
|
391
|
+
queryText={queryText}
|
|
392
|
+
retrieverType={retrieverType}
|
|
393
|
+
tableColumnConfig={tableColumnConfig}
|
|
394
|
+
pageSize={pageSize}
|
|
395
|
+
onUpdateDataSorting={onUpdateDataSorting}
|
|
396
|
+
setPageSize={setPageSize}
|
|
397
|
+
totalItems={totalItems}
|
|
398
|
+
hasNextPage={hasNextPage}
|
|
399
|
+
/>
|
|
400
|
+
</>
|
|
401
|
+
);
|
|
402
|
+
};
|