@camunda/ccma-saas-frontend 0.7.1 → 0.8.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 (167) hide show
  1. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
  2. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +9 -5
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
  4. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
  5. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +9 -0
  6. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +6 -3
  7. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +3 -0
  8. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +9 -0
  9. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +2 -0
  10. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +2 -0
  11. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
  12. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +19 -21
  13. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +19 -2
  14. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +4 -3
  15. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +2 -1
  16. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  17. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +6 -4
  18. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
  19. package/lib/esm/components/c4-cluster-overview/applications.d.ts +20 -0
  20. package/lib/esm/components/c4-cluster-overview/applications.js +37 -24
  21. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
  22. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +5 -5
  23. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +6 -1
  24. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +15 -2
  25. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +10 -0
  26. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +7 -0
  27. package/lib/esm/components/c4-cluster-overview/cluster-details.js +5 -2
  28. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +8 -0
  29. package/lib/esm/components/c4-cluster-overview/cluster-load.js +20 -8
  30. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  31. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
  32. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
  33. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +3 -1
  34. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +7 -3
  35. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -1
  36. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +9 -1
  37. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +69 -12
  38. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +10 -1
  39. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +16 -2
  40. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +14 -0
  41. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +12 -0
  42. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.d.ts +15 -0
  43. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +10 -0
  44. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
  45. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +4 -2
  46. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +24 -3
  47. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
  48. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +1 -0
  49. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -0
  50. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
  51. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +2 -2
  52. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +10 -5
  53. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +10 -0
  54. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -1
  55. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -2
  56. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -2
  57. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
  58. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +7 -2
  59. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +8 -0
  60. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
  61. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
  62. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +10 -5
  63. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +10 -0
  64. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +3 -2
  65. package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
  66. package/lib/esm/components/c4-link-button/c4-link-button.js +2 -2
  67. package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +6 -0
  68. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +13 -1
  69. package/lib/esm/components/c4-page-template/c4-page-template.js +3 -3
  70. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  71. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +5 -0
  72. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -1
  73. package/lib/esm/externalUrls.const.d.ts +1 -1
  74. package/lib/esm/externalUrls.const.js +1 -1
  75. package/lib/esm/i18n/c4-console-i18n.js +6 -0
  76. package/lib/esm/i18n/en/pages/clusterdetails.json +28 -3
  77. package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
  78. package/lib/esm/index.d.ts +13 -3
  79. package/lib/esm/index.js +7 -3
  80. package/lib/esm/runtime/build-cluster-sso-callback-url.d.ts +34 -0
  81. package/lib/esm/runtime/build-cluster-sso-callback-url.js +49 -0
  82. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +7 -2
  83. package/lib/esm/runtime/build-cluster-swagger-url.js +20 -5
  84. package/lib/esm/runtime/index.d.ts +2 -0
  85. package/lib/esm/runtime/index.js +2 -0
  86. package/lib/esm/ui/families.d.ts +4 -0
  87. package/lib/esm/ui/families.js +22 -2
  88. package/lib/esm/utils/safe-translate.d.ts +27 -0
  89. package/lib/esm/utils/safe-translate.js +56 -0
  90. package/lib/esm/utils/section-heading-style.d.ts +13 -0
  91. package/lib/esm/utils/section-heading-style.js +25 -0
  92. package/lib/esm/widgets/c4-widget-scope.types.d.ts +20 -0
  93. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +16 -1
  94. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +92 -74
  95. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +27 -0
  96. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  97. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +81 -13
  98. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +24 -0
  99. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +3 -2
  100. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +10 -1
  101. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +8 -13
  102. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +42 -2
  103. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +38 -23
  104. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +7 -0
  105. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +26 -5
  106. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +16 -1
  107. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +50 -18
  108. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +174 -3
  109. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.d.ts +13 -0
  110. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.js +29 -0
  111. package/lib/esm/widgets/cluster-health-override.d.ts +16 -0
  112. package/lib/esm/widgets/cluster-health-override.js +33 -0
  113. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  114. package/lib/esm/widgets/clusters/c4-clusters-page.js +10 -10
  115. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
  116. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
  117. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +10 -5
  118. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +9 -0
  119. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
  120. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +10 -5
  121. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +9 -0
  122. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
  123. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +10 -5
  124. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +9 -0
  125. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  126. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +10 -5
  127. package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
  128. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  129. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.d.ts +5 -0
  130. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +66 -0
  131. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -0
  132. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.d.ts +5 -0
  133. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +59 -0
  134. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.d.ts +22 -0
  135. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.js +6 -0
  136. package/lib/esm/widgets/environment/use-cluster-api-clients.d.ts +26 -0
  137. package/lib/esm/widgets/environment/use-cluster-api-clients.js +48 -0
  138. package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +22 -0
  139. package/lib/esm/widgets/environment/use-cluster-swagger-url.js +47 -0
  140. package/lib/esm/widgets/environment/use-cluster-version-flags.d.ts +16 -0
  141. package/lib/esm/widgets/environment/use-cluster-version-flags.js +40 -0
  142. package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
  143. package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +34 -25
  144. package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
  145. package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +26 -21
  146. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +12 -0
  147. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +6 -0
  148. package/lib/esm/widgets/job-worker/c4-job-worker.types.d.ts +19 -0
  149. package/package.json +25 -25
  150. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +0 -16
  151. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +0 -40
  152. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +0 -16
  153. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +0 -142
  154. package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +0 -14
  155. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +0 -136
  156. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +0 -13
  157. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +0 -58
  158. package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +0 -16
  159. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +0 -118
  160. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +0 -3
  161. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +0 -408
  162. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +0 -32
  163. package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +0 -14
  164. package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +0 -5
  165. package/lib/esm/components/c4-advanced-search-filters/utils.js +0 -58
  166. /package/lib/esm/{components/c4-advanced-search-filters/c4-advanced-search-filters.types.js → widgets/c4-widget-scope.types.js} +0 -0
  167. /package/lib/esm/{components/c4-advanced-search-filters/state.types.js → widgets/environment/c4-cluster-api-clients-widget.types.js} +0 -0
@@ -1,58 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Stack } from '../../ui/index.js';
3
- import { ArrayFieldContainer } from './ArrayFieldContainer.js';
4
- export const FiltersSection = ({ fields, filterFields, addArrayItem, updateFilter, renderFieldRow, }) => {
5
- const groupedFields = filterFields.reduce((groups, field) => {
6
- if (field.parentArrayField) {
7
- const key = `${field.parentArrayField}-${field.arrayIndex}`;
8
- if (!groups[key]) {
9
- groups[key] = [];
10
- }
11
- groups[key].push(field);
12
- }
13
- else {
14
- const key = field.fieldName;
15
- if (!groups[key]) {
16
- groups[key] = [];
17
- }
18
- groups[key].push(field);
19
- }
20
- return groups;
21
- }, {});
22
- const addedArrayFields = new Set(filterFields
23
- .filter((f) => f.parentArrayField)
24
- .map((f) => f.parentArrayField));
25
- const arrayFieldContainers = Object.keys(fields).filter((fieldName) => fields[fieldName].matchType === 'array' &&
26
- (!fields[fieldName].optional || addedArrayFields.has(fieldName)));
27
- return (_jsxs(Stack, { gap: 4, children: [Object.entries(groupedFields)
28
- .filter(([, groupFields]) => !groupFields[0].parentArrayField)
29
- .map(([, groupFields]) => {
30
- const firstField = groupFields[0];
31
- const spec = fields[firstField.fieldName];
32
- if (spec.matchType === 'array') {
33
- return null;
34
- }
35
- return groupFields.map((field) => renderFieldRow(field, spec));
36
- }), arrayFieldContainers.map((fieldName) => {
37
- const spec = fields[fieldName];
38
- const arrayFields = filterFields.filter((f) => f.parentArrayField === fieldName);
39
- const arrayGroups = new Map();
40
- arrayFields.forEach((field) => {
41
- const index = field.arrayIndex ?? 0;
42
- if (!arrayGroups.has(index)) {
43
- arrayGroups.set(index, []);
44
- }
45
- arrayGroups.get(index)?.push(field);
46
- });
47
- return (_jsx(ArrayFieldContainer, { fieldName: fieldName, spec: spec, groups: Array.from(arrayGroups.entries()), onAddItem: () => addArrayItem(fieldName, 'root'), onRemoveItem: (arrayIndex) => {
48
- const updated = filterFields.filter((f) => !(f.parentArrayField === fieldName &&
49
- f.arrayIndex === arrayIndex));
50
- updateFilter(updated);
51
- }, onRemoveAll: spec.optional
52
- ? () => {
53
- const updated = filterFields.filter((f) => f.parentArrayField !== fieldName);
54
- updateFilter(updated);
55
- }
56
- : undefined, renderRow: (f, s) => renderFieldRow(f, s) }, fieldName));
57
- })] }));
58
- };
@@ -1,16 +0,0 @@
1
- import type React from 'react';
2
- import type { JSX } from 'react';
3
- import type { FieldSpec } from './c4-advanced-search-filters.types.js';
4
- import type { FilterFieldState } from './state.types.js';
5
- interface OrSectionProps {
6
- sectionId: string;
7
- fieldsConfig: Record<string, FieldSpec>;
8
- filterFields: FilterFieldState[];
9
- addArrayItem: (parentFieldName: string, orSectionId: string) => void;
10
- removeOrSection: (sectionId: string) => void;
11
- addOptionalFieldToSection: (fieldName: string, sectionId: string) => void;
12
- updateFilter: (updatedFields: FilterFieldState[]) => void;
13
- renderFieldRow: (field: FilterFieldState, spec: FieldSpec) => JSX.Element;
14
- }
15
- export declare const OrSection: React.FC<OrSectionProps>;
16
- export {};
@@ -1,118 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
- * under one or more contributor license agreements. Licensed under a commercial license.
5
- * You may not use this file except in compliance with the commercial license.
6
- */
7
- import { Close } from '@carbon/react/icons/index.esm.js';
8
- import { Button } from '../../ui/index.js';
9
- import { useSelectFamily } from '../../ui/families.js';
10
- import { ArrayFieldContainer } from './ArrayFieldContainer.js';
11
- export const OrSection = ({ sectionId, fieldsConfig, filterFields, addArrayItem, removeOrSection, addOptionalFieldToSection, updateFilter, renderFieldRow, }) => {
12
- const { Select, SelectItem } = useSelectFamily();
13
- const sectionFields = filterFields;
14
- const availableFields = Object.entries(fieldsConfig)
15
- .filter(([fieldName, spec]) => {
16
- const addedInSection = sectionFields.some((f) => (f.fieldName === fieldName && !f.parentArrayField) ||
17
- f.parentArrayField === fieldName);
18
- return spec.optional && !addedInSection;
19
- })
20
- .map(([fieldName, spec]) => ({ fieldName, spec }))
21
- .sort((a, b) => a.spec.label.localeCompare(b.spec.label));
22
- const groupedFields = sectionFields.reduce((groups, field) => {
23
- if (field.parentArrayField) {
24
- const key = `${field.parentArrayField}-${field.arrayIndex}`;
25
- if (!groups[key]) {
26
- groups[key] = [];
27
- }
28
- groups[key].push(field);
29
- }
30
- else {
31
- const key = field.fieldName;
32
- if (!groups[key]) {
33
- groups[key] = [];
34
- }
35
- groups[key].push(field);
36
- }
37
- return groups;
38
- }, {});
39
- const regularFields = Object.entries(groupedFields)
40
- .filter(([, groupFields]) => !groupFields[0].parentArrayField)
41
- .map(([, groupFields]) => {
42
- const firstField = groupFields[0];
43
- const spec = fieldsConfig[firstField.fieldName];
44
- if (!spec || spec.matchType === 'array') {
45
- return null;
46
- }
47
- return groupFields.map((field) => renderFieldRow(field, spec));
48
- })
49
- .filter(Boolean);
50
- const arrayFieldsInSection = new Set(sectionFields
51
- .filter((f) => f.parentArrayField)
52
- .map((f) => f.parentArrayField));
53
- const arrayFieldElements = Array.from(arrayFieldsInSection).map((fieldName) => {
54
- const spec = fieldsConfig[fieldName];
55
- if (!spec || spec.matchType !== 'array') {
56
- return null;
57
- }
58
- const arrayFields = sectionFields.filter((f) => f.parentArrayField === fieldName);
59
- const arrayGroups = new Map();
60
- arrayFields.forEach((field) => {
61
- const index = field.arrayIndex ?? 0;
62
- if (!arrayGroups.has(index)) {
63
- arrayGroups.set(index, []);
64
- }
65
- arrayGroups.get(index)?.push(field);
66
- });
67
- return (_jsx(ArrayFieldContainer, { fieldName: fieldName, spec: spec, title: `${spec.label} Array`, groups: Array.from(arrayGroups.entries()), onAddItem: () => addArrayItem(fieldName, sectionId), onRemoveItem: (arrayIndex) => {
68
- const updatedFields = filterFields.filter((f) => !(f.parentArrayField === fieldName &&
69
- f.arrayIndex === arrayIndex &&
70
- f.orSectionId === sectionId));
71
- updateFilter(updatedFields);
72
- }, onRemoveAll: spec.optional
73
- ? () => {
74
- const updatedFields = filterFields.filter((f) => !(f.parentArrayField === fieldName &&
75
- f.orSectionId === sectionId));
76
- updateFilter(updatedFields);
77
- }
78
- : undefined, renderRow: (f, s) => renderFieldRow(f, s) }, fieldName));
79
- });
80
- return (_jsxs("div", { style: {
81
- border: '2px solid var(--cds-border-accent)',
82
- borderRadius: 8,
83
- padding: '1rem',
84
- backgroundColor: 'var(--cds-layer-01)',
85
- position: 'relative',
86
- }, children: [_jsxs("div", { style: {
87
- display: 'flex',
88
- justifyContent: 'space-between',
89
- alignItems: 'center',
90
- marginBottom: '1rem',
91
- paddingBottom: '0.5rem',
92
- borderBottom: '1px solid var(--cds-border-subtle)',
93
- }, children: [_jsxs("div", { style: {
94
- fontSize: '0.875rem',
95
- fontWeight: 600,
96
- color: 'var(--cds-text-primary)',
97
- display: 'flex',
98
- alignItems: 'center',
99
- gap: '0.5rem',
100
- }, children: [_jsx("span", { style: {
101
- backgroundColor: 'var(--cds-support-info)',
102
- color: 'white',
103
- padding: '0.25rem 0.5rem',
104
- borderRadius: 4,
105
- fontSize: '0.75rem',
106
- fontWeight: 500,
107
- }, children: "OR" }), "Alternative Filter Conditions"] }), _jsx(Button, { kind: 'ghost', size: 'sm', renderIcon: Close, iconDescription: 'Remove OR section', onClick: () => removeOrSection(sectionId), hasIconOnly: true })] }), sectionFields.length === 0 ? (_jsx("div", { style: {
108
- textAlign: 'center',
109
- padding: '1rem',
110
- color: 'var(--cds-text-secondary)',
111
- fontSize: '0.875rem',
112
- }, children: "No conditions added to this OR section. Add fields below to create alternative filter conditions." })) : (_jsxs("div", { children: [regularFields, arrayFieldElements] })), availableFields.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsxs(Select, { id: `or-section-${sectionId}-field-select`, labelText: 'Add Field to OR Section', value: '', onChange: (e) => {
113
- const fieldName = e.target.value;
114
- if (fieldName) {
115
- addOptionalFieldToSection(fieldName, sectionId);
116
- }
117
- }, children: [_jsx(SelectItem, { value: '', text: 'Select field to add...' }), availableFields.map((field) => (_jsx(SelectItem, { value: field.fieldName, text: field.spec.label }, field.fieldName)))] }) }))] }, sectionId));
118
- };
@@ -1,3 +0,0 @@
1
- import { type JSX } from 'react';
2
- import type { C4AdvancedSearchFiltersProps } from './c4-advanced-search-filters.types.js';
3
- export declare const C4AdvancedSearchFilters: ({ fields, onFilterChange, }: C4AdvancedSearchFiltersProps) => JSX.Element;
@@ -1,408 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /*
3
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
- * under one or more contributor license agreements. Licensed under a commercial license.
5
- * You may not use this file except in compliance with the commercial license.
6
- */
7
- import { Add } from '@carbon/react/icons/index.esm.js';
8
- import { useCallback, useEffect, useMemo, useState } from 'react';
9
- import { Button, Stack } from '../../ui/index.js';
10
- import { useSelectFamily } from '../../ui/families.js';
11
- import { FieldRow } from './FieldRow.js';
12
- import { FiltersSection } from './FiltersSection.js';
13
- import { OrSection } from './OrSection.js';
14
- import { convertDateToISOString, getInitialValue, isArrayOperator, validateComparisonOperatorValue, } from './utils.js';
15
- export const C4AdvancedSearchFilters = ({ fields, onFilterChange, }) => {
16
- const { Select, SelectItem } = useSelectFamily();
17
- const [filterFields, setFilterFields] = useState([]);
18
- const [orSections, setOrSections] = useState([]);
19
- const [nextId, setNextId] = useState(1);
20
- // Initialize with non-optional fields in the root section
21
- useEffect(() => {
22
- const initialFields = [];
23
- Object.entries(fields)
24
- .filter(([, spec]) => !spec.optional)
25
- .forEach(([fieldName, spec], index) => {
26
- if (spec.matchType === 'array' && spec.arrayItems) {
27
- Object.entries(spec.arrayItems).forEach(([arrayFieldName, arrayFieldSpec]) => {
28
- initialFields.push({
29
- id: `field-init-${index}-0-${arrayFieldName}`,
30
- fieldName: arrayFieldName,
31
- matchType: arrayFieldSpec.matchType === 'exact-match'
32
- ? 'exact-match'
33
- : arrayFieldSpec.matchType === 'advanced-filter'
34
- ? 'advanced-filter'
35
- : undefined,
36
- operator: arrayFieldSpec.matchType === 'advanced-filter'
37
- ? arrayFieldSpec.operators?.[0]
38
- : undefined,
39
- value: getInitialValue(arrayFieldSpec),
40
- arrayIndex: 0,
41
- arrayFieldName,
42
- parentArrayField: fieldName,
43
- orSectionId: 'root',
44
- });
45
- });
46
- }
47
- else {
48
- initialFields.push({
49
- id: `field-init-${index}`,
50
- fieldName,
51
- matchType: spec.matchType === 'exact-match'
52
- ? 'exact-match'
53
- : spec.matchType === 'advanced-filter'
54
- ? 'advanced-filter'
55
- : undefined,
56
- operator: spec.matchType === 'advanced-filter'
57
- ? spec.operators?.[0]
58
- : undefined,
59
- value: getInitialValue(spec),
60
- orSectionId: 'root',
61
- });
62
- }
63
- });
64
- setFilterFields(initialFields);
65
- setNextId(1000);
66
- // eslint-disable-next-line react-hooks/exhaustive-deps
67
- }, [fields]);
68
- const createInitialField = useCallback((fieldName, spec, arrayIndex, arrayFieldName, parentArrayField, orSectionId = 'root') => {
69
- const id = `field-${nextId}-${Date.now()}-${Math.random()}`;
70
- setNextId((prev) => prev + 1);
71
- return {
72
- id,
73
- fieldName,
74
- matchType: spec.matchType === 'exact-match'
75
- ? 'exact-match'
76
- : spec.matchType === 'advanced-filter'
77
- ? 'advanced-filter'
78
- : spec.matchType === 'both'
79
- ? undefined
80
- : undefined,
81
- operator: spec.matchType === 'advanced-filter' && spec.operators?.length
82
- ? spec.operators[0]
83
- : undefined,
84
- value: getInitialValue(spec),
85
- arrayIndex,
86
- arrayFieldName,
87
- parentArrayField,
88
- orSectionId,
89
- };
90
- }, [nextId]);
91
- const generatePayload = useCallback((fieldsToProcess) => {
92
- const payload = {};
93
- const rootFields = fieldsToProcess.filter((field) => field.orSectionId === 'root');
94
- const orSectionFields = fieldsToProcess.filter((field) => field.orSectionId !== 'root');
95
- const processFieldsToPayload = (fieldsList) => {
96
- const sectionPayload = {};
97
- const arrayFieldGroups = new Map();
98
- fieldsList.forEach((field) => {
99
- const isExistsOperator = field.operator === '$exists';
100
- if (!isExistsOperator &&
101
- !['$in', '$notIn'].includes(field.operator || '') &&
102
- (field.value === undefined ||
103
- field.value === null ||
104
- (typeof field.value === 'string' && !field.value.trim()))) {
105
- return;
106
- }
107
- if (['$in', '$notIn'].includes(field.operator || '') &&
108
- (!field.arrayValues || field.arrayValues.length === 0)) {
109
- return;
110
- }
111
- if (field.parentArrayField &&
112
- field.arrayIndex !== undefined &&
113
- field.arrayFieldName) {
114
- if (!arrayFieldGroups.has(field.parentArrayField)) {
115
- arrayFieldGroups.set(field.parentArrayField, new Map());
116
- }
117
- const arrayItems = arrayFieldGroups.get(field.parentArrayField);
118
- if (!arrayItems.has(field.arrayIndex)) {
119
- arrayItems.set(field.arrayIndex, {});
120
- }
121
- const arrayItem = arrayItems.get(field.arrayIndex);
122
- let fieldValue;
123
- if (field.matchType === 'exact-match' || !field.operator) {
124
- fieldValue = convertDateToISOString(field.value);
125
- }
126
- else if (['$in', '$notIn'].includes(field.operator)) {
127
- fieldValue = {
128
- [field.operator]: convertDateToISOString(field.arrayValues),
129
- };
130
- }
131
- else {
132
- fieldValue = {
133
- [field.operator]: convertDateToISOString(field.value),
134
- };
135
- }
136
- arrayItem[field.arrayFieldName] = fieldValue;
137
- }
138
- else {
139
- let fieldValue;
140
- if (field.matchType === 'exact-match' || !field.operator) {
141
- fieldValue = convertDateToISOString(field.value);
142
- }
143
- else if (['$in', '$notIn'].includes(field.operator)) {
144
- fieldValue = {
145
- [field.operator]: convertDateToISOString(field.arrayValues),
146
- };
147
- }
148
- else {
149
- fieldValue = {
150
- [field.operator]: convertDateToISOString(field.value),
151
- };
152
- }
153
- sectionPayload[field.fieldName] = fieldValue;
154
- }
155
- });
156
- arrayFieldGroups.forEach((arrayItems, parentFieldName) => {
157
- const sortedArrayItems = Array.from(arrayItems.entries())
158
- .sort(([a], [b]) => a - b)
159
- .map(([, item]) => item)
160
- .filter((item) => Object.keys(item).length > 0);
161
- if (sortedArrayItems.length > 0) {
162
- sectionPayload[parentFieldName] = sortedArrayItems;
163
- }
164
- });
165
- return sectionPayload;
166
- };
167
- const rootPayload = processFieldsToPayload(rootFields);
168
- Object.assign(payload, rootPayload);
169
- if (orSectionFields.length > 0) {
170
- const orSectionMap = new Map();
171
- orSectionFields.forEach((field) => {
172
- const sectionId = field.orSectionId;
173
- if (!orSectionMap.has(sectionId)) {
174
- orSectionMap.set(sectionId, []);
175
- }
176
- orSectionMap.get(sectionId)?.push(field);
177
- });
178
- const orPayloads = [];
179
- orSectionMap.forEach((fields) => {
180
- const orPayload = processFieldsToPayload(fields);
181
- if (Object.keys(orPayload).length > 0) {
182
- orPayloads.push(orPayload);
183
- }
184
- });
185
- if (orPayloads.length > 0) {
186
- payload.$or = orPayloads;
187
- }
188
- }
189
- return payload;
190
- }, []);
191
- const updateFilter = useCallback((updatedFields) => {
192
- setFilterFields(updatedFields);
193
- const payload = generatePayload(updatedFields);
194
- onFilterChange(payload);
195
- }, [generatePayload, onFilterChange]);
196
- const addOrSection = useCallback(() => {
197
- const newSectionId = `or-${Date.now()}`;
198
- setOrSections((prev) => [...prev, newSectionId]);
199
- }, []);
200
- const removeOrSection = useCallback((sectionId) => {
201
- const updatedFields = filterFields.filter((field) => field.orSectionId !== sectionId);
202
- updateFilter(updatedFields);
203
- setOrSections((prev) => prev.filter((id) => id !== sectionId));
204
- }, [filterFields, updateFilter]);
205
- const addOptionalFieldToSection = useCallback((fieldName, sectionId = 'root') => {
206
- const spec = fields[fieldName];
207
- if (!spec) {
208
- return;
209
- }
210
- if (spec.matchType === 'array' && spec.arrayItems) {
211
- const newFields = [];
212
- Object.entries(spec.arrayItems).forEach(([arrayFieldName, arrayFieldSpec]) => {
213
- newFields.push(createInitialField(arrayFieldName, arrayFieldSpec, 0, arrayFieldName, fieldName, sectionId));
214
- });
215
- updateFilter([...filterFields, ...newFields]);
216
- }
217
- else {
218
- const newField = createInitialField(fieldName, spec, undefined, undefined, undefined, sectionId);
219
- updateFilter([...filterFields, newField]);
220
- }
221
- }, [fields, filterFields, createInitialField, updateFilter]);
222
- const handleFieldChange = useCallback((fieldId, updates) => {
223
- const updatedFields = filterFields.map((field) => {
224
- if (field.id === fieldId) {
225
- const updatedField = { ...field, ...updates };
226
- // Get field spec to determine field type
227
- const spec = field.parentArrayField
228
- ? fields[field.parentArrayField]?.arrayItems?.[field.arrayFieldName]
229
- : fields[field.fieldName];
230
- // Validate comparison operators for number and date-time fields
231
- if (updatedField.operator && updatedField.value && spec) {
232
- const fieldType = spec.type || 'string';
233
- const error = validateComparisonOperatorValue(updatedField.value, updatedField.operator, fieldType);
234
- updatedField.inputError = error;
235
- }
236
- else {
237
- updatedField.inputError = undefined;
238
- }
239
- // Reset operator-specific data when operator changes
240
- if (updates.operator && updates.operator !== field.operator) {
241
- if (isArrayOperator(updates.operator)) {
242
- updatedField.arrayValues = updatedField.arrayValues || [];
243
- updatedField.value = '';
244
- }
245
- else {
246
- updatedField.arrayValues = undefined;
247
- }
248
- }
249
- return updatedField;
250
- }
251
- return field;
252
- });
253
- updateFilter(updatedFields);
254
- }, [filterFields, updateFilter, fields]);
255
- const addArrayValue = useCallback((fieldId, value) => {
256
- // For dates, use ISO string for comparison and storage
257
- const comparisonValue = value instanceof Date ? value.toISOString() : String(value).trim();
258
- if (comparisonValue.length === 0) {
259
- return;
260
- }
261
- const updatedFields = filterFields.map((field) => {
262
- if (field.id === fieldId) {
263
- const currentArrayValues = field.arrayValues || [];
264
- // Check if value already exists (use ISO string for dates)
265
- const valueExists = currentArrayValues.some((v) => {
266
- const existingValue = v instanceof Date ? v.toISOString() : String(v);
267
- return existingValue === comparisonValue;
268
- });
269
- if (!valueExists) {
270
- return {
271
- ...field,
272
- arrayValues: [...currentArrayValues, value],
273
- value: getInitialValue(fields[field.fieldName] || fields[field.arrayFieldName]), // Clear input after adding
274
- };
275
- }
276
- }
277
- return field;
278
- });
279
- updateFilter(updatedFields);
280
- }, [filterFields, updateFilter, fields]);
281
- const removeArrayValue = useCallback((fieldId, valueToRemove) => {
282
- const comparisonValue = valueToRemove instanceof Date
283
- ? valueToRemove.toISOString()
284
- : String(valueToRemove);
285
- const updatedFields = filterFields.map((field) => {
286
- if (field.id === fieldId && field.arrayValues) {
287
- return {
288
- ...field,
289
- arrayValues: field.arrayValues.filter((v) => {
290
- const existingValue = v instanceof Date ? v.toISOString() : String(v);
291
- return existingValue !== comparisonValue;
292
- }),
293
- };
294
- }
295
- return field;
296
- });
297
- updateFilter(updatedFields);
298
- }, [filterFields, updateFilter]);
299
- const addOptionalField = useCallback((fieldName) => {
300
- const spec = fields[fieldName];
301
- if (!spec) {
302
- return;
303
- }
304
- if (spec.matchType === 'array' && spec.arrayItems) {
305
- // For array fields, create initial empty array items
306
- // Start with one array item by default
307
- const newFields = [];
308
- Object.entries(spec.arrayItems).forEach(([arrayFieldName, arrayFieldSpec]) => {
309
- newFields.push(createInitialField(arrayFieldName, arrayFieldSpec, 0, // Start with index 0
310
- arrayFieldName, fieldName, // parentArrayField
311
- 'root'));
312
- });
313
- updateFilter([...filterFields, ...newFields]);
314
- }
315
- else {
316
- // Regular fields
317
- const newField = createInitialField(fieldName, spec);
318
- updateFilter([...filterFields, newField]);
319
- }
320
- }, [fields, filterFields, createInitialField, updateFilter]);
321
- const removeField = useCallback((fieldId) => {
322
- const updatedFields = filterFields.filter((field) => field.id !== fieldId);
323
- updateFilter(updatedFields);
324
- }, [filterFields, updateFilter]);
325
- const addArrayItem = useCallback((parentFieldName, orSectionId = 'root') => {
326
- const spec = fields[parentFieldName];
327
- if (!spec?.arrayItems) {
328
- return;
329
- }
330
- const existingArrayItems = filterFields.filter((f) => f.parentArrayField === parentFieldName &&
331
- f.orSectionId === orSectionId);
332
- // Find the highest array index for this parent field in this OR section
333
- const maxIndex = existingArrayItems.reduce((max, field) => field.arrayIndex !== undefined
334
- ? Math.max(max, field.arrayIndex)
335
- : max, -1);
336
- const nextIndex = maxIndex + 1;
337
- // Create new fields for all array item properties
338
- const newFields = [];
339
- Object.entries(spec.arrayItems).forEach(([arrayFieldName, arrayFieldSpec]) => {
340
- newFields.push(createInitialField(arrayFieldName, arrayFieldSpec, nextIndex, arrayFieldName, parentFieldName, orSectionId));
341
- });
342
- updateFilter([...filterFields, ...newFields]);
343
- }, [fields, filterFields, createInitialField, updateFilter]);
344
- const renderFieldRow = (field, spec) => (_jsx(FieldRow, { field: field, spec: spec, onFieldChange: handleFieldChange, onRemove: spec.optional ? removeField : undefined, onAddArrayValue: addArrayValue, onRemoveArrayValue: removeArrayValue }, field.id));
345
- // Root-section fields and the still-available optional fields are both pure
346
- // functions of `filterFields`/`fields` but were recomputed several times per
347
- // render; memoize them so each render does the work at most once.
348
- const rootFilterFields = useMemo(() => filterFields.filter((f) => f.orSectionId === 'root'), [filterFields]);
349
- const availableOptionalFields = useMemo(() => {
350
- const addedFields = new Set(filterFields
351
- .filter((f) => f.orSectionId === 'root' && !f.parentArrayField)
352
- .map((f) => f.fieldName));
353
- // Also include array fields that have been added
354
- const addedArrayFields = new Set(filterFields
355
- .filter((f) => f.orSectionId === 'root' && f.parentArrayField)
356
- .map((f) => f.parentArrayField));
357
- return Object.entries(fields)
358
- .filter(([fieldName, spec]) => spec.optional &&
359
- !addedFields.has(fieldName) &&
360
- !addedArrayFields.has(fieldName))
361
- .map(([fieldName, spec]) => ({ fieldName, spec }))
362
- .sort((a, b) => a.spec.label.localeCompare(b.spec.label));
363
- }, [filterFields, fields]);
364
- return (_jsx(Stack, { gap: 5, children: Object.keys(fields).length === 0 ? (_jsx("div", { style: {
365
- textAlign: 'center',
366
- padding: '2rem',
367
- color: 'var(--cds-text-secondary)',
368
- fontSize: '0.875rem',
369
- }, children: "No fields are configured for this filter component." })) : (_jsxs(_Fragment, { children: [rootFilterFields.length === 0 &&
370
- availableOptionalFields.length > 0 ? (_jsx("div", { style: {
371
- textAlign: 'center',
372
- padding: '1rem',
373
- color: 'var(--cds-text-secondary)',
374
- fontSize: '0.875rem',
375
- marginBottom: '1rem',
376
- }, children: "No fields are currently selected. Add optional fields below to start filtering." })) : (_jsxs("div", { children: [_jsxs("div", { style: {
377
- fontSize: '1rem',
378
- fontWeight: '600',
379
- color: 'var(--cds-text-primary)',
380
- marginBottom: '1rem',
381
- display: 'flex',
382
- alignItems: 'center',
383
- gap: '0.5rem',
384
- }, children: [_jsx("span", { style: {
385
- backgroundColor: 'var(--cds-support-success)',
386
- color: 'white',
387
- padding: '0.25rem 0.5rem',
388
- borderRadius: '4px',
389
- fontSize: '0.75rem',
390
- fontWeight: '500',
391
- }, children: "AND" }), "Main Filter Conditions"] }), _jsx(FiltersSection, { fields: fields, filterFields: rootFilterFields, addArrayItem: addArrayItem, updateFilter: updateFilter, renderFieldRow: renderFieldRow })] })), availableOptionalFields.length > 0 && (_jsxs("div", { style: {
392
- marginTop: rootFilterFields.length === 0 ? '0' : '1rem',
393
- }, children: [rootFilterFields.length === 0 && (_jsx("div", { style: {
394
- marginBottom: '1rem',
395
- color: 'var(--cds-text-primary)',
396
- fontSize: '0.875rem',
397
- fontWeight: '500',
398
- }, children: "Add fields to create your filter:" })), _jsxs(Select, { id: 'optional-field-select', labelText: 'Add Fields to Main Filter', value: '', onChange: (e) => {
399
- const fieldName = e.target.value;
400
- if (fieldName) {
401
- addOptionalField(fieldName);
402
- }
403
- }, children: [_jsx(SelectItem, { value: '', text: 'Select field to add...' }), availableOptionalFields.map((field) => (_jsx(SelectItem, { value: field.fieldName, text: field.spec.label }, field.fieldName)))] })] })), orSections.map((sectionId) => (_jsx(OrSection, { sectionId: sectionId, fieldsConfig: fields, filterFields: filterFields.filter((f) => f.orSectionId === sectionId), addArrayItem: addArrayItem, removeOrSection: removeOrSection, addOptionalFieldToSection: addOptionalFieldToSection, updateFilter: updateFilter, renderFieldRow: renderFieldRow }, sectionId))), _jsxs("div", { style: { marginTop: '1rem' }, children: [_jsx(Button, { kind: 'tertiary', size: 'sm', renderIcon: Add, onClick: addOrSection, children: "Add OR Condition" }), _jsx("div", { style: {
404
- fontSize: '0.75rem',
405
- color: 'var(--cds-text-secondary)',
406
- marginTop: '0.5rem',
407
- }, children: "OR conditions provide alternative filter criteria. Records matching ANY of these conditions will be included." })] })] })) }));
408
- };
@@ -1,32 +0,0 @@
1
- export type AdvancedFilterOperator = '$eq' | '$neq' | '$exists' | '$gt' | '$gte' | '$lt' | '$lte' | '$like' | '$in' | '$notIn';
2
- export type FieldMatchType = 'exact-match' | 'advanced-filter' | 'both' | 'array';
3
- export type FieldDataType = 'string' | 'number' | 'date-time' | 'enum' | 'boolean';
4
- export interface FieldSpec {
5
- label: string;
6
- description: string;
7
- matchType: FieldMatchType;
8
- type?: FieldDataType;
9
- optional: boolean;
10
- operators?: AdvancedFilterOperator[];
11
- enumValues?: string[];
12
- arrayItems?: FieldSpecMap;
13
- /**
14
- * Optional async suggestion provider. If present (and the field data type is string),
15
- * it will be invoked (debounced) after the user stops typing for 500ms.
16
- * Returned suggestions (string array) will be rendered beneath the input allowing
17
- * quick selection. An empty / falsy result clears the suggestions list.
18
- */
19
- fetchSuggestions?: (input: string) => Promise<string[]>;
20
- }
21
- export interface FieldSpecMap {
22
- [fieldName: string]: FieldSpec;
23
- }
24
- export interface FilterPayload {
25
- [fieldName: string]: unknown;
26
- $or?: FilterPayload[];
27
- }
28
- export interface C4AdvancedSearchFiltersProps {
29
- fields: FieldSpecMap;
30
- onFilterChange: (payload: FilterPayload) => void;
31
- initialFilters?: FilterPayload;
32
- }
@@ -1,14 +0,0 @@
1
- import type { AdvancedFilterOperator } from './c4-advanced-search-filters.types.js';
2
- export interface FilterFieldState {
3
- id: string;
4
- fieldName: string;
5
- matchType?: 'exact-match' | 'advanced-filter';
6
- operator?: AdvancedFilterOperator;
7
- value: string | number | boolean | Date;
8
- arrayValues?: (string | number | boolean | Date)[];
9
- inputError?: string;
10
- arrayIndex?: number;
11
- arrayFieldName?: string;
12
- parentArrayField?: string;
13
- orSectionId?: string;
14
- }
@@ -1,5 +0,0 @@
1
- import type { AdvancedFilterOperator, FieldDataType, FieldSpec } from './c4-advanced-search-filters.types.js';
2
- export declare const validateComparisonOperatorValue: (value: string | number | boolean | Date, operator: AdvancedFilterOperator, fieldType?: FieldDataType) => string | undefined;
3
- export declare const isArrayOperator: (operator?: AdvancedFilterOperator) => boolean;
4
- export declare const convertDateToISOString: (value: unknown) => unknown;
5
- export declare const getInitialValue: (spec: FieldSpec) => string | number | boolean | Date;