@orchestrator-ui/orchestrator-ui-components 8.9.0 → 8.9.2
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 +6 -6
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +13 -13
- package/CHANGELOG.md +13 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +85 -55
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoSearchPage/utils.ts +1 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +2 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoSearchFieldWithActions.tsx +9 -9
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx +10 -10
- package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +3 -2
- package/src/components/WfoTable/WfoTableSettingsModal/styles.ts +10 -0
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useGetPydanticFormsConfig.tsx +2 -1
- package/src/pages/WfoSearchPocPage.tsx +76 -44
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.
|
|
1
|
+
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.2 build
|
|
2
2
|
npm notice run npm run generate-version && tsup src/index.ts
|
|
3
|
-
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.
|
|
3
|
+
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.2 generate-version
|
|
4
4
|
npm notice run node -p "'export const ORCHESTRATOR_UI_LIBRARY_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'" > src/configuration/version.ts && prettier --write src/configuration/version.ts
|
|
5
|
-
src/configuration/version.ts
|
|
5
|
+
src/configuration/version.ts 38ms
|
|
6
6
|
[34mCLI[39m Building entry: src/index.ts
|
|
7
7
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
8
|
[34mCLI[39m tsup v8.5.1
|
|
@@ -10,9 +10,9 @@ src/configuration/version.ts 39ms
|
|
|
10
10
|
[34mCLI[39m Target: es2022
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m899.38 KB[39m
|
|
14
14
|
[32mESM[39m [1mdist/index.js.map [22m[32m1.55 MB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 301ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 22069ms
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.56 MB[39m
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.
|
|
1
|
+
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.2 lint
|
|
2
2
|
npm notice run eslint
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.
|
|
1
|
+
npm notice run @orchestrator-ui/orchestrator-ui-components@8.9.2 test
|
|
2
2
|
npm notice run jest
|
|
3
|
-
PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
|
|
4
3
|
PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
|
|
4
|
+
PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
|
|
5
5
|
PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
|
|
6
6
|
PASS Wfo-UI Tests src/utils/date.spec.ts
|
|
7
7
|
PASS Wfo-UI Tests src/utils/string.spec.ts
|
|
@@ -9,39 +9,39 @@ PASS Wfo-UI Tests src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSe
|
|
|
9
9
|
PASS Wfo-UI Tests src/components/WfoTable/WfoStructuredSearchTable/WfoRestoreLoop.spec.tsx
|
|
10
10
|
PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
|
|
11
11
|
PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
|
|
12
|
-
PASS Wfo-UI Tests src/components/WfoTable/WfoTable/utils.spec.ts (
|
|
12
|
+
PASS Wfo-UI Tests src/components/WfoTable/WfoTable/utils.spec.ts (6.366 s)
|
|
13
|
+
PASS Wfo-UI Tests src/components/WfoTable/WfoTable/WfoTableExpandedRowReveal.spec.tsx
|
|
13
14
|
PASS Wfo-UI Tests src/components/WfoTable/WfoTable/WfoGroupedTable/utils.spec.ts
|
|
14
15
|
PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
|
|
15
16
|
PASS Wfo-UI Tests src/utils/compareVersions.spec.ts
|
|
16
|
-
PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
|
|
17
|
-
PASS Wfo-UI Tests src/components/WfoTable/WfoTable/WfoTableExpandedRowReveal.spec.tsx
|
|
18
17
|
PASS Wfo-UI Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
|
|
18
|
+
PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
|
|
19
19
|
PASS Wfo-UI Tests src/components/WfoTable/WfoStructuredSearchTable/utils.spec.ts
|
|
20
20
|
PASS Wfo-UI Tests src/messages/getTranslationMessages.spec.ts
|
|
21
|
-
PASS Wfo-UI Tests src/hooks/usePathAutoComplete.spec.tsx
|
|
22
21
|
PASS Wfo-UI Tests src/components/WfoPydanticForm/fields/WfoCron.spec.ts
|
|
22
|
+
PASS Wfo-UI Tests src/hooks/usePathAutoComplete.spec.tsx
|
|
23
23
|
PASS Wfo-UI Tests src/rtk/utils.spec.ts
|
|
24
24
|
PASS Wfo-UI Tests src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.spec.tsx
|
|
25
|
-
PASS Wfo-UI Tests src/
|
|
25
|
+
PASS Wfo-UI Tests src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.spec.tsx
|
|
26
|
+
PASS Wfo-UI Tests src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.spec.ts
|
|
26
27
|
PASS Wfo-UI Tests src/utils/getQueryParams.spec.ts
|
|
27
28
|
PASS Wfo-UI Tests src/utils/getProductLifecycleStatus.spec.ts
|
|
29
|
+
PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
|
|
28
30
|
PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
|
|
29
|
-
PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
|
|
30
|
-
PASS Wfo-UI Tests src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.spec.tsx
|
|
31
31
|
PASS Wfo-UI Tests src/utils/getToastMessage.spec.ts
|
|
32
|
+
PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
|
|
32
33
|
PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
|
|
33
34
|
PASS Wfo-UI Tests src/utils/toSortedObjectKeys.spec.ts
|
|
34
|
-
PASS Wfo-UI Tests src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.spec.ts
|
|
35
35
|
PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
|
|
36
36
|
PASS Wfo-UI Tests src/utils/filterData.spec.ts
|
|
37
|
-
PASS Wfo-UI Tests src/utils/toObjectWithSerializedValues.spec.ts
|
|
38
37
|
PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
|
|
38
|
+
PASS Wfo-UI Tests src/utils/toObjectWithSerializedValues.spec.ts
|
|
39
39
|
PASS Wfo-UI Tests src/utils/uuid.spec.ts
|
|
40
40
|
PASS Wfo-UI Tests src/utils/environmentVariables.spec.ts
|
|
41
41
|
PASS Wfo-UI Tests src/utils/integer.spec.ts
|
|
42
42
|
PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
|
|
43
|
-
PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
|
|
44
43
|
PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
|
|
44
|
+
PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
|
|
45
45
|
PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
|
|
46
46
|
PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
|
|
47
47
|
PASS Wfo-UI Tests src/utils/getQueryUrl.spec.ts
|
|
@@ -50,5 +50,5 @@ PASS Wfo-UI Tests src/components/WfoPydanticForm/fields/wfoPydanticFormUtils.spe
|
|
|
50
50
|
Test Suites: 46 passed, 46 total
|
|
51
51
|
Tests: 288 passed, 288 total
|
|
52
52
|
Snapshots: 0 total
|
|
53
|
-
Time: 11.
|
|
53
|
+
Time: 11.928 s
|
|
54
54
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @orchestrator-ui/orchestrator-ui-components
|
|
2
2
|
|
|
3
|
+
## 8.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3a6339f: 223 Tweak spacing of columns in table settings modal
|
|
8
|
+
- 2719ec4: Disables list component.
|
|
9
|
+
|
|
10
|
+
## 8.9.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 0e5b816: Fix query and filter not being applied in certain cases
|
|
15
|
+
|
|
3
16
|
## 8.9.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -19773,7 +19773,7 @@ type WfoStructuredSearchTableDataColumnConfig<T extends object> = {
|
|
|
19773
19773
|
};
|
|
19774
19774
|
type WfoStructuredSearchTableColumnConfig<T extends object> = Partial<WfoTableControlColumnConfig<T> | WfoStructuredSearchTableDataColumnConfig<T>>;
|
|
19775
19775
|
type SearchParams = {
|
|
19776
|
-
|
|
19776
|
+
queryString?: string | false;
|
|
19777
19777
|
retrieverType?: RetrieverType;
|
|
19778
19778
|
ruleGroup?: RuleGroupType | false;
|
|
19779
19779
|
limit?: number;
|
|
@@ -19788,12 +19788,12 @@ type WfoStructuredSearchTableProps<T extends object> = Omit<WfoTableProps<T>, 'c
|
|
|
19788
19788
|
defaultHiddenColumns?: TableColumnKeys<T>;
|
|
19789
19789
|
defaultShowMatchDetails?: boolean;
|
|
19790
19790
|
defaultAdvancedNestedSearch?: boolean;
|
|
19791
|
-
|
|
19791
|
+
queryString?: string;
|
|
19792
19792
|
localStorageKey: string;
|
|
19793
19793
|
exportDataIsLoading?: boolean;
|
|
19794
19794
|
error?: WfoGraphqlError[];
|
|
19795
|
-
|
|
19796
|
-
|
|
19795
|
+
onChangeQueryString: (queryString: string) => void;
|
|
19796
|
+
onSearchQueryString: (queryString: string) => void;
|
|
19797
19797
|
onShowMore: () => void;
|
|
19798
19798
|
onUpdateDataSorting: (updateSorting: WfoDataSorting<T>) => void;
|
|
19799
19799
|
getColumnSearchFieldName?: (field: keyof T) => string;
|
|
@@ -19812,7 +19812,7 @@ type WfoStructuredSearchTableProps<T extends object> = Omit<WfoTableProps<T>, 'c
|
|
|
19812
19812
|
hasNextPage: boolean;
|
|
19813
19813
|
prefilledFieldOptions: FieldToOperatorMap;
|
|
19814
19814
|
};
|
|
19815
|
-
declare const WfoStructuredSearchTable: <T extends object>({ tableColumnConfig, defaultHiddenColumns, defaultShowMatchDetails, defaultAdvancedNestedSearch,
|
|
19815
|
+
declare const WfoStructuredSearchTable: <T extends object>({ tableColumnConfig, defaultHiddenColumns, defaultShowMatchDetails, defaultAdvancedNestedSearch, queryString, localStorageKey, exportDataIsLoading, error, onChangeQueryString, onSearchQueryString, onShowMore, onExportData, retrieverType, onUpdateRetrieverType, filterString, onUpdateFilterString, isValidFilterString, queryBuilderRuleGroup, onUpdateQueryBuilder, onUpdateDataSorting, getColumnSearchFieldName, handleSearch, pageSize, setPageSize, totalItems, rowExpandingConfiguration, dataSorting, hasNextPage, data, isLoading, prefilledFieldOptions, ...tableProps }: WfoStructuredSearchTableProps<T>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
19816
19816
|
|
|
19817
19817
|
interface WfoExpandingSearchRowProps {
|
|
19818
19818
|
score?: number;
|
|
@@ -29383,7 +29383,7 @@ declare const METADATA_WORKFLOWS_ENDPOINT = "workflows";
|
|
|
29383
29383
|
declare const METADATA_SCHEDULES_ENDPOINT = "schedules/";
|
|
29384
29384
|
declare const SEARCH_QUERY_RESULTS_ENDPOINT = "search/queries";
|
|
29385
29385
|
|
|
29386
|
-
declare const ORCHESTRATOR_UI_LIBRARY_VERSION = "8.9.
|
|
29386
|
+
declare const ORCHESTRATOR_UI_LIBRARY_VERSION = "8.9.2";
|
|
29387
29387
|
|
|
29388
29388
|
declare const useGetTranslationMessages: (locale: string | undefined) => {
|
|
29389
29389
|
pydanticForms: {
|
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.
|
|
64
|
+
var ORCHESTRATOR_UI_LIBRARY_VERSION = "8.9.2";
|
|
65
65
|
|
|
66
66
|
// src/types/types.ts
|
|
67
67
|
var EngineStatus = /* @__PURE__ */ ((EngineStatus2) => {
|
|
@@ -2962,7 +2962,8 @@ var OPERATOR_MAP = {
|
|
|
2962
2962
|
between: { symbol: "\u27F7", description: "between (range)" },
|
|
2963
2963
|
has_component: { symbol: "\u2713", description: "has component" },
|
|
2964
2964
|
not_has_component: { symbol: "\u2717", description: "does not have component" },
|
|
2965
|
-
like: { symbol: "\u220B", description: "contains" }
|
|
2965
|
+
like: { symbol: "\u220B", description: "contains" },
|
|
2966
|
+
not_regexp: { symbol: "\u220C", description: "does not contain" }
|
|
2966
2967
|
};
|
|
2967
2968
|
var BOOLEAN_OPERATOR_MAP = {
|
|
2968
2969
|
eq: { symbol: "\u2713", description: "is true" },
|
|
@@ -6725,7 +6726,7 @@ var useGetComponentMatcherExtender = () => {
|
|
|
6725
6726
|
return format === PydanticFormFieldFormat.MARKDOWN;
|
|
6726
6727
|
}
|
|
6727
6728
|
},
|
|
6728
|
-
...currentMatchers.filter((matcher) => matcher.id !== "text").filter((matcher) => matcher.id !== "array").filter((matcher) => matcher.id !== "object"),
|
|
6729
|
+
...currentMatchers.filter((matcher) => matcher.id !== "text").filter((matcher) => matcher.id !== "array").filter((matcher) => matcher.id !== "object").filter((matcher) => matcher.id !== "list"),
|
|
6729
6730
|
{
|
|
6730
6731
|
id: "object",
|
|
6731
6732
|
ElementMatch: {
|
|
@@ -11641,6 +11642,14 @@ var getWfoTableSettingsModalStyles = (wfoThemeHelpers) => {
|
|
|
11641
11642
|
color: wfoThemeHelpers.theme.colors.textParagraph
|
|
11642
11643
|
}
|
|
11643
11644
|
});
|
|
11645
|
+
const formStyle = css27({
|
|
11646
|
+
".euiFormRow .euiFormRow__labelWrapper": {
|
|
11647
|
+
flexBasis: "50%"
|
|
11648
|
+
},
|
|
11649
|
+
".euiFormRow .euiFormRow__fieldWrapper": {
|
|
11650
|
+
flexBasis: "50%"
|
|
11651
|
+
}
|
|
11652
|
+
});
|
|
11644
11653
|
const { theme } = wfoThemeHelpers;
|
|
11645
11654
|
const columnsListStyle = css27({
|
|
11646
11655
|
maxHeight: theme.base * 16,
|
|
@@ -11655,6 +11664,7 @@ var getWfoTableSettingsModalStyles = (wfoThemeHelpers) => {
|
|
|
11655
11664
|
backgroundAttachment: "local, scroll"
|
|
11656
11665
|
});
|
|
11657
11666
|
return {
|
|
11667
|
+
formStyle,
|
|
11658
11668
|
formRowStyle,
|
|
11659
11669
|
columnsListStyle,
|
|
11660
11670
|
selectFieldStyle: formFieldBaseStyle
|
|
@@ -11672,7 +11682,7 @@ var TableSettingsModal = ({
|
|
|
11672
11682
|
extraSettings
|
|
11673
11683
|
}) => {
|
|
11674
11684
|
const t = useTranslations39("main");
|
|
11675
|
-
const { formRowStyle, columnsListStyle, selectFieldStyle } = useWithOrchestratorTheme(getWfoTableSettingsModalStyles);
|
|
11685
|
+
const { formStyle, formRowStyle, columnsListStyle, selectFieldStyle } = useWithOrchestratorTheme(getWfoTableSettingsModalStyles);
|
|
11676
11686
|
const scrollBarStyle = useEuiScrollBar2();
|
|
11677
11687
|
const [columns, setColumns] = useState29(tableConfig.columns);
|
|
11678
11688
|
const [selectedPageSize, setSelectedPageSize] = useState29(tableConfig.selectedPageSize);
|
|
@@ -11699,7 +11709,7 @@ var TableSettingsModal = ({
|
|
|
11699
11709
|
columns,
|
|
11700
11710
|
selectedPageSize
|
|
11701
11711
|
}),
|
|
11702
|
-
children: /* @__PURE__ */ jsxs88(EuiForm2, { children: [
|
|
11712
|
+
children: /* @__PURE__ */ jsxs88(EuiForm2, { css: formStyle, children: [
|
|
11703
11713
|
/* @__PURE__ */ jsx171("div", { css: [columnsListStyle, scrollBarStyle], children: columns.map(({ field, name, isVisible }) => /* @__PURE__ */ jsxs88("div", { children: [
|
|
11704
11714
|
/* @__PURE__ */ jsx171(EuiFormRow5, { display: "columnCompressed", label: name, css: formRowStyle, children: /* @__PURE__ */ jsx171(
|
|
11705
11715
|
EuiSwitch3,
|
|
@@ -12854,6 +12864,7 @@ var SEARCH_OPERATOR_TO_RQB_OPERATOR_MAP = {
|
|
|
12854
12864
|
gte: ">=",
|
|
12855
12865
|
between: "between",
|
|
12856
12866
|
like: "contains",
|
|
12867
|
+
not_regexp: "doesNotContain",
|
|
12857
12868
|
has_component: "notNull",
|
|
12858
12869
|
not_has_component: "null"
|
|
12859
12870
|
};
|
|
@@ -12868,7 +12879,8 @@ var OPERATOR_MAP2 = {
|
|
|
12868
12879
|
between: { symbol: "\u27F7", description: "between (range)" },
|
|
12869
12880
|
has_component: { symbol: "\u2713", description: "has component" },
|
|
12870
12881
|
not_has_component: { symbol: "\u2717", description: "does not have component" },
|
|
12871
|
-
like: { symbol: "\u220B", description: "contains" }
|
|
12882
|
+
like: { symbol: "\u220B", description: "contains" },
|
|
12883
|
+
not_regexp: { symbol: "\u220C", description: "does not contain" }
|
|
12872
12884
|
};
|
|
12873
12885
|
var initialRuleGroup = {
|
|
12874
12886
|
id: "root",
|
|
@@ -13039,9 +13051,9 @@ import { useTranslations as useTranslations48 } from "next-intl";
|
|
|
13039
13051
|
import { EuiButtonIcon as EuiButtonIcon12, EuiFieldSearch as EuiFieldSearch3, EuiFlexItem as EuiFlexItem22, EuiFormRow as EuiFormRow6 } from "@elastic/eui";
|
|
13040
13052
|
import { Fragment as Fragment38, jsx as jsx193, jsxs as jsxs97 } from "@emotion/react/jsx-runtime";
|
|
13041
13053
|
var WfoSearchFieldWithActions = ({
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13054
|
+
queryString,
|
|
13055
|
+
onChangeQueryString,
|
|
13056
|
+
onSearchQueryString,
|
|
13045
13057
|
onShowInformation,
|
|
13046
13058
|
onShowTableSettings
|
|
13047
13059
|
}) => {
|
|
@@ -13052,10 +13064,10 @@ var WfoSearchFieldWithActions = ({
|
|
|
13052
13064
|
EuiFieldSearch3,
|
|
13053
13065
|
{
|
|
13054
13066
|
css: formFieldBaseStyle,
|
|
13055
|
-
value:
|
|
13067
|
+
value: queryString,
|
|
13056
13068
|
placeholder: `${t("search")}...`,
|
|
13057
|
-
onChange: (e) =>
|
|
13058
|
-
onSearch: (
|
|
13069
|
+
onChange: (e) => onChangeQueryString(e.target.value),
|
|
13070
|
+
onSearch: (queryString2) => onSearchQueryString(queryString2),
|
|
13059
13071
|
fullWidth: true
|
|
13060
13072
|
}
|
|
13061
13073
|
) }) }),
|
|
@@ -13136,12 +13148,12 @@ var WfoStructuredSearchTable = ({
|
|
|
13136
13148
|
defaultHiddenColumns = [],
|
|
13137
13149
|
defaultShowMatchDetails = false,
|
|
13138
13150
|
defaultAdvancedNestedSearch = true,
|
|
13139
|
-
|
|
13151
|
+
queryString,
|
|
13140
13152
|
localStorageKey,
|
|
13141
13153
|
exportDataIsLoading,
|
|
13142
13154
|
error,
|
|
13143
|
-
|
|
13144
|
-
|
|
13155
|
+
onChangeQueryString,
|
|
13156
|
+
onSearchQueryString,
|
|
13145
13157
|
onShowMore,
|
|
13146
13158
|
onExportData,
|
|
13147
13159
|
retrieverType,
|
|
@@ -13271,9 +13283,9 @@ var WfoStructuredSearchTable = ({
|
|
|
13271
13283
|
/* @__PURE__ */ jsx195(
|
|
13272
13284
|
WfoSearchFieldWithActions,
|
|
13273
13285
|
{
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13286
|
+
queryString,
|
|
13287
|
+
onChangeQueryString,
|
|
13288
|
+
onSearchQueryString,
|
|
13277
13289
|
onShowInformation: () => setShowInformationModal(true),
|
|
13278
13290
|
onShowTableSettings: () => setShowTableSettingsModal(true)
|
|
13279
13291
|
}
|
|
@@ -17455,17 +17467,17 @@ var resultColumToPropertyMap = /* @__PURE__ */ new Map([
|
|
|
17455
17467
|
["subscription.metadata", "metadata"]
|
|
17456
17468
|
]);
|
|
17457
17469
|
var prefilledFieldOptions = /* @__PURE__ */ new Map([
|
|
17458
|
-
["subscription.subscription_id", ["eq", "neq", "like"]],
|
|
17459
|
-
["subscription.description", ["eq", "neq", "like"]],
|
|
17460
|
-
["subscription.status", ["eq", "neq", "like"]],
|
|
17470
|
+
["subscription.subscription_id", ["eq", "neq", "like", "not_regexp"]],
|
|
17471
|
+
["subscription.description", ["eq", "neq", "like", "not_regexp"]],
|
|
17472
|
+
["subscription.status", ["eq", "neq", "like", "not_regexp"]],
|
|
17461
17473
|
["subscription.insync", ["eq", "neq"]],
|
|
17462
|
-
["subscription.product.name", ["eq", "neq", "like"]],
|
|
17463
|
-
["subscription.product.tag", ["eq", "neq", "like"]],
|
|
17464
|
-
["subscription.customer_name", ["eq", "neq", "like"]],
|
|
17465
|
-
["subscription.customer_abbreviation", ["eq", "neq", "like"]],
|
|
17474
|
+
["subscription.product.name", ["eq", "neq", "like", "not_regexp"]],
|
|
17475
|
+
["subscription.product.tag", ["eq", "neq", "like", "not_regexp"]],
|
|
17476
|
+
["subscription.customer_name", ["eq", "neq", "like", "not_regexp"]],
|
|
17477
|
+
["subscription.customer_abbreviation", ["eq", "neq", "like", "not_regexp"]],
|
|
17466
17478
|
["subscription.start_date", ["eq", "neq", "lt", "lte", "gt", "gte", "between"]],
|
|
17467
17479
|
["subscription.end_date", ["eq", "neq", "lt", "lte", "gt", "gte", "between"]],
|
|
17468
|
-
["subscription.note", ["eq", "neq", "like"]]
|
|
17480
|
+
["subscription.note", ["eq", "neq", "like", "not_regexp"]]
|
|
17469
17481
|
]);
|
|
17470
17482
|
var WfoSearchPocPage = () => {
|
|
17471
17483
|
const t = useTranslations79("subscriptions.index");
|
|
@@ -17473,18 +17485,18 @@ var WfoSearchPocPage = () => {
|
|
|
17473
17485
|
const selectedTab = subscriptionListTabs.find(({ id }) => id === activeTab)?.id ?? "ACTIVE" /* ACTIVE */;
|
|
17474
17486
|
const getStoredTableConfig = useStoredTableConfig(SEARCH_TABLE_LOCAL_STORAGE_KEY);
|
|
17475
17487
|
const [retrieverType, setRetrieverType] = useState54("auto" /* Auto */);
|
|
17476
|
-
const [
|
|
17477
|
-
const [
|
|
17488
|
+
const [queryString, setQueryString] = useState54("");
|
|
17489
|
+
const [committedQueryString, setCommittedQueryString] = useQueryParam6("queryString", withDefault7(StringParam7, ""));
|
|
17478
17490
|
const [committedFilterString, setCommittedFilterString] = useQueryParam6("filterString", withDefault7(StringParam7, ""));
|
|
17479
17491
|
const lastSelfCommittedFilter = useRef18("");
|
|
17480
17492
|
const commitFilterString = (celString) => {
|
|
17481
17493
|
lastSelfCommittedFilter.current = celString;
|
|
17482
17494
|
setCommittedFilterString(celString || void 0);
|
|
17483
17495
|
};
|
|
17484
|
-
const
|
|
17485
|
-
const
|
|
17486
|
-
|
|
17487
|
-
|
|
17496
|
+
const lastSelfCommittedQueryString = useRef18("");
|
|
17497
|
+
const commitQueryString = (queryString2) => {
|
|
17498
|
+
lastSelfCommittedQueryString.current = queryString2;
|
|
17499
|
+
setCommittedQueryString(queryString2 || void 0);
|
|
17488
17500
|
};
|
|
17489
17501
|
const [filterString, setFilterString] = useState54("");
|
|
17490
17502
|
const [queryBuilderRuleGroup, setQueryBuilderRuleGroup] = useState54();
|
|
@@ -17493,6 +17505,7 @@ var WfoSearchPocPage = () => {
|
|
|
17493
17505
|
[committedFilterString]
|
|
17494
17506
|
);
|
|
17495
17507
|
const [isValidFilterString, setIsValidFilterString] = useState54(true);
|
|
17508
|
+
const [isCommitRefused, setIsCommitRefused] = useState54(false);
|
|
17496
17509
|
const [tableDefaults, setTableDefaults] = useState54();
|
|
17497
17510
|
const [pageSize, setPageSize] = useState54(DEFAULT_PAGE_SIZE);
|
|
17498
17511
|
const [pageCursor, setPageCursor] = useState54(void 0);
|
|
@@ -17501,7 +17514,7 @@ var WfoSearchPocPage = () => {
|
|
|
17501
17514
|
sortOrder: "DESC" /* DESC */
|
|
17502
17515
|
});
|
|
17503
17516
|
const committedSearchKey = JSON.stringify([
|
|
17504
|
-
|
|
17517
|
+
committedQueryString,
|
|
17505
17518
|
committedFilterString,
|
|
17506
17519
|
selectedTab,
|
|
17507
17520
|
retrieverType,
|
|
@@ -17515,7 +17528,7 @@ var WfoSearchPocPage = () => {
|
|
|
17515
17528
|
direction: dataSorting.sortOrder.toLowerCase()
|
|
17516
17529
|
};
|
|
17517
17530
|
return {
|
|
17518
|
-
query:
|
|
17531
|
+
query: committedQueryString,
|
|
17519
17532
|
limit: pageSize,
|
|
17520
17533
|
entity_type: "SUBSCRIPTION" /* SUBSCRIPTION */,
|
|
17521
17534
|
response_columns: Array.from(resultColumToPropertyMap.keys()),
|
|
@@ -17524,7 +17537,7 @@ var WfoSearchPocPage = () => {
|
|
|
17524
17537
|
...filters && { filters },
|
|
17525
17538
|
...cursor && { cursor }
|
|
17526
17539
|
};
|
|
17527
|
-
}, [
|
|
17540
|
+
}, [committedQueryString, committedRuleGroup, selectedTab, retrieverType, pageSize, dataSorting, cursor]);
|
|
17528
17541
|
const { data, isFetching } = useSearchQuery(searchPayload);
|
|
17529
17542
|
const [getSubscriptionListTrigger] = useLazySearchQuery();
|
|
17530
17543
|
const getSubscriptionListForExport = (exportLimit) => getSubscriptionListTrigger({ ...searchPayload, limit: exportLimit, cursor: void 0 }).unwrap();
|
|
@@ -17632,29 +17645,45 @@ var WfoSearchPocPage = () => {
|
|
|
17632
17645
|
}
|
|
17633
17646
|
};
|
|
17634
17647
|
const sortableAndFilterableFieldNames = Object.keys(tableColumnConfig).filter((fieldName) => fieldName !== "actions");
|
|
17635
|
-
const isSortingAllowed =
|
|
17648
|
+
const isSortingAllowed = queryString === "";
|
|
17636
17649
|
const tableColumnConfigWithSortingAndFiltering = mapSortableAndFilterableValuesToTableColumnConfig(
|
|
17637
17650
|
tableColumnConfig,
|
|
17638
17651
|
isSortingAllowed ? sortableAndFilterableFieldNames : [],
|
|
17639
17652
|
sortableAndFilterableFieldNames
|
|
17640
17653
|
);
|
|
17641
|
-
const
|
|
17642
|
-
const ruleGroupParam = searchParams?.ruleGroup;
|
|
17643
|
-
const effectiveRuleGroup = ruleGroupParam === false ? void 0 : ruleGroupParam ?? queryBuilderRuleGroup;
|
|
17654
|
+
const commitFilterDraft = (effectiveRuleGroup) => {
|
|
17644
17655
|
const celQuery = effectiveRuleGroup ? formatQuery2(effectiveRuleGroup, { format: "cel", fallbackExpression: "" }) : "";
|
|
17645
17656
|
if (celQuery && !parseCelToRuleGroup(celQuery)) {
|
|
17646
17657
|
setIsValidFilterString(false);
|
|
17647
|
-
|
|
17658
|
+
setIsCommitRefused(true);
|
|
17659
|
+
return false;
|
|
17648
17660
|
}
|
|
17649
17661
|
commitFilterString(celQuery);
|
|
17662
|
+
setIsCommitRefused(false);
|
|
17663
|
+
return true;
|
|
17664
|
+
};
|
|
17665
|
+
const handleApplyFilter = (searchParams) => {
|
|
17666
|
+
const ruleGroupParam = searchParams?.ruleGroup;
|
|
17667
|
+
const effectiveRuleGroup = ruleGroupParam === false ? void 0 : ruleGroupParam ?? queryBuilderRuleGroup;
|
|
17668
|
+
if (!commitFilterDraft(effectiveRuleGroup)) {
|
|
17669
|
+
return;
|
|
17670
|
+
}
|
|
17671
|
+
commitQueryString(queryString);
|
|
17650
17672
|
setPageCursor(void 0);
|
|
17651
17673
|
};
|
|
17652
|
-
const
|
|
17653
|
-
|
|
17674
|
+
const onChangeQueryString = (queryString2) => {
|
|
17675
|
+
setQueryString(queryString2);
|
|
17654
17676
|
};
|
|
17655
|
-
const
|
|
17656
|
-
|
|
17657
|
-
|
|
17677
|
+
const onSearchQueryString = (queryString2) => {
|
|
17678
|
+
setQueryString(queryString2);
|
|
17679
|
+
if (!isValidFilterString) {
|
|
17680
|
+
setIsCommitRefused(true);
|
|
17681
|
+
return;
|
|
17682
|
+
}
|
|
17683
|
+
if (!commitFilterDraft(queryBuilderRuleGroup)) {
|
|
17684
|
+
return;
|
|
17685
|
+
}
|
|
17686
|
+
commitQueryString(queryString2);
|
|
17658
17687
|
setPageCursor(void 0);
|
|
17659
17688
|
};
|
|
17660
17689
|
const onUpdateRetrieverType = (retrieverType2) => {
|
|
@@ -17679,12 +17708,12 @@ var WfoSearchPocPage = () => {
|
|
|
17679
17708
|
}
|
|
17680
17709
|
}, []);
|
|
17681
17710
|
useEffect39(() => {
|
|
17682
|
-
if (
|
|
17711
|
+
if (committedQueryString === lastSelfCommittedQueryString.current) {
|
|
17683
17712
|
return;
|
|
17684
17713
|
}
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
}, [
|
|
17714
|
+
lastSelfCommittedQueryString.current = committedQueryString;
|
|
17715
|
+
setQueryString(committedQueryString);
|
|
17716
|
+
}, [committedQueryString]);
|
|
17688
17717
|
useEffect39(() => {
|
|
17689
17718
|
if (committedFilterString === lastSelfCommittedFilter.current) {
|
|
17690
17719
|
return;
|
|
@@ -17719,9 +17748,10 @@ var WfoSearchPocPage = () => {
|
|
|
17719
17748
|
setFilterString(filterString2);
|
|
17720
17749
|
safeCelParse(filterString2);
|
|
17721
17750
|
};
|
|
17722
|
-
const
|
|
17723
|
-
const
|
|
17724
|
-
const
|
|
17751
|
+
const isSearchBlocked = isCommitRefused && !isValidFilterString;
|
|
17752
|
+
const { items: subscriptionListItems, rowExpandingConfiguration } = data && !isSearchBlocked ? getDataFromResponse(data, resultColumToPropertyMap, "subscriptionId", selectedTab) : { items: [] };
|
|
17753
|
+
const totalItems = !isSearchBlocked && getTotalItemsFromResponse(data);
|
|
17754
|
+
const hasNextPage = !isSearchBlocked && (data?.page_info?.has_next_page ?? false);
|
|
17725
17755
|
const nextPageCursor = data?.page_info?.next_page_cursor ?? void 0;
|
|
17726
17756
|
const exportData = async () => {
|
|
17727
17757
|
const exportResult = await getSubscriptionListForExport(totalItems || pageSize);
|
|
@@ -17780,12 +17810,12 @@ var WfoSearchPocPage = () => {
|
|
|
17780
17810
|
localStorageKey: SEARCH_TABLE_LOCAL_STORAGE_KEY,
|
|
17781
17811
|
onUpdateFilterString,
|
|
17782
17812
|
onUpdateQueryBuilder,
|
|
17783
|
-
|
|
17784
|
-
|
|
17813
|
+
onChangeQueryString,
|
|
17814
|
+
onSearchQueryString,
|
|
17785
17815
|
onShowMore,
|
|
17786
17816
|
onUpdateRetrieverType,
|
|
17787
17817
|
queryBuilderRuleGroup,
|
|
17788
|
-
|
|
17818
|
+
queryString,
|
|
17789
17819
|
retrieverType,
|
|
17790
17820
|
tableColumnConfig: tableColumnConfigWithSortingAndFiltering,
|
|
17791
17821
|
getColumnSearchFieldName: (field) => getKeyByValueFromMap(resultColumToPropertyMap, field),
|