@evenicanpm/admin-integrate 1.8.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/documents/ConfigImport/configuration-import.ts +1 -1
  2. package/documents/Endpoint/list.ts +3 -3
  3. package/documents/Process/list.ts +3 -3
  4. package/documents/ProcessExecution/list.ts +2 -2
  5. package/documents/ProcessExport/read.ts +1 -1
  6. package/documents/ProcessSchedule/read.ts +1 -1
  7. package/documents/ProcessScheduleGroup/read.ts +3 -3
  8. package/documents/ProcessTask/fragments.ts +4 -0
  9. package/documents/ProcessTemplate/fragments.ts +30 -0
  10. package/documents/ProcessTemplate/list.ts +29 -0
  11. package/documents/ProcessTemplate/read.ts +1 -1
  12. package/documents/ScheduledProcess/list.ts +1 -1
  13. package/package.json +2 -2
  14. package/src/api/process-config/mutation/process-config-import.mutation.ts +1 -1
  15. package/src/api/templates/queries/get-field-values.query.ts +48 -0
  16. package/src/api/templates/queries/get-field-values.server.ts +9 -0
  17. package/src/api/templates/queries/index.ts +4 -0
  18. package/src/api/templates/queries/types.ts +2 -2
  19. package/src/api/templates/queries/validate-field-on-check.query.ts +22 -0
  20. package/src/api/templates/queries/validate-field-on-check.server.ts +30 -0
  21. package/src/api/templates/queries/validate-field-on-submit.server.ts +18 -0
  22. package/src/components/data-table/table-row.tsx +1 -1
  23. package/src/components/icons/up-down.tsx +1 -0
  24. package/src/components/integration-view/animated-svg.tsx +0 -1
  25. package/src/components/integration-view/elk-types.ts +1 -1
  26. package/src/components/integration-view/integration-view.tsx +274 -187
  27. package/src/components/integration-view/nodes/execution-entry-node.tsx +3 -2
  28. package/src/components/integration-view/nodes/task-node.tsx +1 -1
  29. package/src/components/integration-view/types.ts +2 -0
  30. package/src/components/integration-view/utils/mapping.ts +68 -48
  31. package/src/components/list-filter/list-filter-types.ts +6 -0
  32. package/src/components/list-filter/list-filter.tsx +21 -15
  33. package/src/components/list-filter/multi-select-filter.tsx +7 -7
  34. package/src/components/list-filter/select-filter.tsx +6 -6
  35. package/src/components/scheduler/day-selector.tsx +1 -1
  36. package/src/components/templatesV2/inputs/FormikPageBody.tsx +191 -0
  37. package/src/components/templatesV2/inputs/context/FormModeContext.tsx +31 -0
  38. package/src/components/templatesV2/inputs/context/TemplateContext.tsx +37 -0
  39. package/src/components/templatesV2/inputs/field-names.ts +8 -0
  40. package/src/components/templatesV2/inputs/form-type.ts +54 -0
  41. package/src/components/templatesV2/inputs/index.tsx +33 -0
  42. package/src/components/templatesV2/inputs/input-type.ts +23 -0
  43. package/src/components/templatesV2/inputs/primitives/CheckboxInput.tsx +45 -0
  44. package/src/components/templatesV2/inputs/primitives/NumberInput.tsx +58 -0
  45. package/src/components/templatesV2/inputs/primitives/SelectorInput.tsx +111 -0
  46. package/src/components/templatesV2/inputs/primitives/TextInput.tsx +55 -0
  47. package/src/components/templatesV2/inputs/primitives/TextWithQueryInput.tsx +292 -0
  48. package/src/components/templatesV2/inputs/primitives/index.ts +10 -0
  49. package/src/components/templatesV2/inputs/renderers/index.ts +2 -0
  50. package/src/components/templatesV2/inputs/renderers/renderFormControl.tsx +384 -0
  51. package/src/components/templatesV2/inputs/renderers/renderSearchInput.tsx +128 -0
  52. package/src/components/templatesV2/inputs/search/MultiTextSearchInput.tsx +87 -0
  53. package/src/components/templatesV2/inputs/search/SearchInputWrapper.tsx +113 -0
  54. package/src/components/templatesV2/inputs/search/TextSearchInput.tsx +309 -0
  55. package/src/components/templatesV2/inputs/search/index.ts +4 -0
  56. package/src/components/templatesV2/inputs/search/search-query-key.ts +23 -0
  57. package/src/components/templatesV2/inputs/search/useFieldValuesOptions.ts +58 -0
  58. package/src/components/templatesV2/inputs/search/useSearchInput.ts +79 -0
  59. package/src/components/templatesV2/inputs/table/InputTable.tsx +268 -0
  60. package/src/components/templatesV2/inputs/table/index.ts +1 -0
  61. package/src/components/templatesV2/inputs/utils/applyTemplateConfig.ts +28 -0
  62. package/src/components/templatesV2/inputs/utils/arrangeInputs.ts +52 -0
  63. package/src/components/templatesV2/inputs/utils/index.ts +6 -0
  64. package/src/components/templatesV2/inputs/utils/parseQueryName.ts +20 -0
  65. package/src/components/templatesV2/inputs/utils/renderReadOnlyText.tsx +26 -0
  66. package/src/components/templatesV2/inputs/utils/selectors.ts +69 -0
  67. package/src/components/templatesV2/inputs/utils/toStringArray.ts +23 -0
  68. package/src/components/templatesV2/pageForm.tsx +153 -0
  69. package/src/components/{templates → templatesV2}/templates-list/templates-list-row.tsx +2 -1
  70. package/src/components/{templates → templatesV2}/templates-list/templates-list-table.tsx +2 -2
  71. package/src/components/{templates → templatesV2}/templates-list/templates-list.tsx +19 -28
  72. package/src/components/{templates → templatesV2}/types.tsx +12 -12
  73. package/src/components/templatesV2/validation/buildZodSchema.ts +212 -0
  74. package/src/components/templatesV2/validation/zodFormikValidate.ts +17 -0
  75. package/src/components/templatesV2/wizard.tsx +746 -0
  76. package/src/pages/dashboard/dashboard-link-cards.tsx +0 -1
  77. package/src/pages/dashboard/dashboard-list-sections.tsx +1 -1
  78. package/src/pages/dashboard/dashboard.tsx +0 -1
  79. package/src/pages/executions/executions-list/executions-list-table.tsx +0 -1
  80. package/src/pages/executions/executions.tsx +1 -1
  81. package/src/pages/integration-create/integration-create-steps.ts +8 -0
  82. package/src/pages/integration-create/integration-create.tsx +81 -28
  83. package/src/pages/integration-create/pre-creation-step.tsx +9 -9
  84. package/src/pages/integration-create/select-step.tsx +3 -3
  85. package/src/pages/integration-create/template-list-step.tsx +28 -3
  86. package/src/pages/integration-create/template-options-step.tsx +119 -0
  87. package/src/pages/integration-create/wizard-step.tsx +5 -4
  88. package/src/pages/integration-details/import-process/copy-tasks-list.tsx +1 -3
  89. package/src/pages/integration-details/integration-details.tsx +1 -1
  90. package/src/pages/integration-details/task-drawer/add-task.tsx +4 -4
  91. package/src/pages/integration-details/task-drawer/edit-task.tsx +5 -5
  92. package/src/pages/integration-details/task-drawer/task-drawer.tsx +2 -2
  93. package/src/components/templates/inputs/index.tsx +0 -1392
  94. package/src/components/templates/wizard.tsx +0 -737
  95. /package/src/components/{templates → templatesV2}/index.ts +0 -0
  96. /package/src/components/{templates → templatesV2}/template-filter.ts +0 -0
  97. /package/src/components/{templates → templatesV2}/templates-list/index.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { gql } from "graphql-request";
2
2
 
3
- const CONFIGURATION_IMPORT = gql`
3
+ const _CONFIGURATION_IMPORT = gql`
4
4
  mutation ConfigurationImport($config: ConfigImport!, $reRoutedFromMerge: Boolean) {
5
5
  configurationImport(config: $config, reRoutedFromMerge: $reRoutedFromMerge) {
6
6
  success
@@ -2,7 +2,7 @@ import { gql } from "graphql-request";
2
2
 
3
3
  import { ENDPOINT_FRAGMENT_SM } from "./fragments";
4
4
 
5
- const GET_SOURCE_ENDPOINTS = gql`
5
+ const _GET_SOURCE_ENDPOINTS = gql`
6
6
  ${ENDPOINT_FRAGMENT_SM}
7
7
  query GetSourceEndpoints($input: SearchQueryInput) {
8
8
  getSourceEndpoints(input: $input) {
@@ -11,7 +11,7 @@ const GET_SOURCE_ENDPOINTS = gql`
11
11
  }
12
12
  `;
13
13
 
14
- const GET_DATA_DESCRIPTIONS = gql`
14
+ const _GET_DATA_DESCRIPTIONS = gql`
15
15
  query GetDataDescriptions($input: SearchQueryInput) {
16
16
  getDataDescriptions(input: $input) {
17
17
  dataDescription
@@ -21,7 +21,7 @@ const GET_DATA_DESCRIPTIONS = gql`
21
21
  }
22
22
  `;
23
23
 
24
- const CHECK_UNIQUE_IDENTIFIER = gql`
24
+ const _CHECK_UNIQUE_IDENTIFIER = gql`
25
25
  query CheckUniqueIdentifier($uniqueIdentifier: String) {
26
26
  checkUniqueIdentifier(uniqueIdentifier: $uniqueIdentifier) {
27
27
  isUnique
@@ -2,7 +2,7 @@ import { gql } from "graphql-request";
2
2
 
3
3
  import { PROCESS_FRAGMENT_SM } from "./fragments";
4
4
 
5
- const GET_PROCESS = gql`
5
+ const _GET_PROCESS = gql`
6
6
  ${PROCESS_FRAGMENT_SM}
7
7
  query GetProcesses($input: ProcessInput) {
8
8
  processes(input: $input) {
@@ -26,8 +26,8 @@ const GET_PROCESS = gql`
26
26
  }
27
27
  `;
28
28
 
29
- const GET_NON_SCHEDULED_PROCESSES = gql`
30
- query GetNonScheduledProcesses($input: FilterQueryInput) {
29
+ const _GET_NON_SCHEDULED_PROCESSES = gql`
30
+ query GetNonScheduledProcesses($input: FilterQueryInput) {
31
31
  nonScheduledProcesses(input: $input) {
32
32
  nodes {
33
33
  id
@@ -5,7 +5,7 @@ import {
5
5
  PROCESS_EXECUTION_FRAGMENT_XS,
6
6
  } from "./fragments";
7
7
 
8
- const GET_PROCESS_EXECUTIONS = gql`
8
+ const _GET_PROCESS_EXECUTIONS = gql`
9
9
  ${PROCESS_EXECUTION_FRAGMENT_SM}
10
10
  query GetProcessExecutions($input: ProcessExecutionInput) {
11
11
  processExecutions(input: $input) {
@@ -33,7 +33,7 @@ const GET_PROCESS_EXECUTIONS = gql`
33
33
  }
34
34
  `;
35
35
 
36
- const GET_PROCESS_EXECUTIONS_BY_PROCESS = gql`
36
+ const _GET_PROCESS_EXECUTIONS_BY_PROCESS = gql`
37
37
  ${PROCESS_EXECUTION_FRAGMENT_XS}
38
38
  query GetProcessExecutionsByProcess(
39
39
  $processId: ID!
@@ -1,6 +1,6 @@
1
1
  import { gql } from "graphql-request";
2
2
 
3
- const GET_CONFIGURATION_EXPORT = gql`
3
+ const _GET_CONFIGURATION_EXPORT = gql`
4
4
  query ConfigurationExport($processId: ID, $includeIds: Boolean, $useSourceEndpoint: Boolean) {
5
5
  configurationExport(processId: $processId, includeIds: $includeIds, useSourceEndpoint: $useSourceEndpoint) {
6
6
  DepotGroups {
@@ -2,7 +2,7 @@ import { gql } from "graphql-request";
2
2
 
3
3
  import { PROCESS_SCHEDULE_FRAGMENT_MD } from "./fragments";
4
4
 
5
- const GetProcessSchedule = gql`
5
+ const _GetProcessSchedule = gql`
6
6
  ${PROCESS_SCHEDULE_FRAGMENT_MD}
7
7
  query GetProcessScheduleById($id: ID!) {
8
8
  processScheduleById(id: $id) {
@@ -2,7 +2,7 @@ import { gql } from "graphql-request";
2
2
 
3
3
  import { PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD } from "./fragments";
4
4
 
5
- const GetProcessScheduleGroupDetails = gql`
5
+ const _GetProcessScheduleGroupDetails = gql`
6
6
  ${PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD}
7
7
  query GetProcessScheduleGroupDetails($id: ID!) {
8
8
  processScheduleGroupDetails(id: $id) {
@@ -11,7 +11,7 @@ const GetProcessScheduleGroupDetails = gql`
11
11
  }
12
12
  `;
13
13
 
14
- const UpdateProcessSchedule = gql`
14
+ const _UpdateProcessSchedule = gql`
15
15
  ${PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD}
16
16
  mutation UpdateProcessScheduleGroupDetails($input: ProcessScheduleGroupDetailsUpdate!) {
17
17
  updateProcessScheduleGroupDetails(input: $input) {
@@ -33,7 +33,7 @@ const UpdateProcessSchedule = gql`
33
33
  }
34
34
  `;
35
35
 
36
- const CreateProcessSchedule = gql`
36
+ const _CreateProcessSchedule = gql`
37
37
  mutation CreateProcessScheduleGroupDetails($input: ProcessScheduleGroupDetailsCreate!) {
38
38
  createProcessScheduleGroupDetails(input: $input) {
39
39
  id
@@ -232,6 +232,8 @@ export const PROCESS_TASK_FRAGMENT_XL = gql`
232
232
  helpText
233
233
  validationRegex
234
234
  queryName
235
+ validationQueryOnCheck
236
+ validationQueryOnSubmit
235
237
  created
236
238
  modified
237
239
  schemas {
@@ -243,7 +245,9 @@ export const PROCESS_TASK_FRAGMENT_XL = gql`
243
245
  validationRegex
244
246
  options {
245
247
  id
248
+ sort
246
249
  label
250
+ optionValue
247
251
  }
248
252
  sort
249
253
  isRequired
@@ -24,6 +24,8 @@ export const PROCESS_TEMPLATE_FRAGMENT = gql`
24
24
  helpText
25
25
  validationRegex
26
26
  queryName
27
+ validationQueryOnCheck
28
+ validationQueryOnSubmit
27
29
  created
28
30
  modified
29
31
  defaultValue
@@ -36,7 +38,9 @@ export const PROCESS_TEMPLATE_FRAGMENT = gql`
36
38
  validationRegex
37
39
  options {
38
40
  id
41
+ sort
39
42
  label
43
+ optionValue
40
44
  }
41
45
  sort
42
46
  isRequired
@@ -72,3 +76,29 @@ export const PROCESS_TEMPLATE_GROUP_FRAGMENT = gql`
72
76
  isActive
73
77
  }
74
78
  `;
79
+
80
+ export const WIZARD_FIELD_VALIDATION_FRAGMENT = gql`
81
+ fragment WizardFieldValidationFragment on WizardFieldValidationResult {
82
+ fieldName
83
+ isValid
84
+ message
85
+ }
86
+ `;
87
+
88
+ export const FIELD_VALUE_FRAGMENT = gql`
89
+ fragment FieldValueFragment on FieldValue {
90
+ name
91
+ value
92
+ }
93
+ `;
94
+
95
+ export const FIELD_VALUE_RESULT_FRAGMENT = gql`
96
+ ${FIELD_VALUE_FRAGMENT}
97
+ fragment FieldValueResultFragment on FieldValueResult {
98
+ fieldName
99
+ message
100
+ values {
101
+ ...FieldValueFragment
102
+ }
103
+ }
104
+ `;
@@ -1,9 +1,11 @@
1
1
  import { gql } from "graphql-request";
2
2
 
3
3
  import {
4
+ FIELD_VALUE_RESULT_FRAGMENT,
4
5
  PROCESS_TEMPLATE_FRAGMENT_XS,
5
6
  PROCESS_TEMPLATE_GROUP_FRAGMENT,
6
7
  PROCESS_TEMPLATE_RECORD_FRAGMENT,
8
+ WIZARD_FIELD_VALIDATION_FRAGMENT,
7
9
  } from "./fragments";
8
10
 
9
11
  const _GetProcessTemplateRecords = gql`
@@ -65,3 +67,30 @@ const _GetProcessTemplates = gql`
65
67
  }
66
68
  }
67
69
  `;
70
+
71
+ export const VALIDATE_FIELD_ON_CHECK = gql`
72
+ ${WIZARD_FIELD_VALIDATION_FRAGMENT}
73
+ query ValidateFieldOnCheck($input: WizardFieldCheckValidationInput) {
74
+ validateFieldOnCheck(input: $input) {
75
+ ...WizardFieldValidationFragment
76
+ }
77
+ }
78
+ `;
79
+
80
+ export const VALIDATE_FIELD_ON_SUBMIT = gql`
81
+ ${WIZARD_FIELD_VALIDATION_FRAGMENT}
82
+ query ValidateFieldOnSubmit($input: [WizardFieldValidationInput]) {
83
+ validateFieldOnSubmit(input: $input) {
84
+ ...WizardFieldValidationFragment
85
+ }
86
+ }
87
+ `;
88
+
89
+ export const GET_FIELD_VALUES = gql`
90
+ ${FIELD_VALUE_RESULT_FRAGMENT}
91
+ query GetFieldValues($input: WizardFieldValidationInput) {
92
+ getFieldValues(input: $input) {
93
+ ...FieldValueResultFragment
94
+ }
95
+ }
96
+ `;
@@ -2,7 +2,7 @@ import { gql } from "graphql-request";
2
2
 
3
3
  import { PROCESS_TEMPLATE_FRAGMENT } from "./fragments";
4
4
 
5
- const GetProcessTemplate = gql`
5
+ const _GetProcessTemplate = gql`
6
6
  ${PROCESS_TEMPLATE_FRAGMENT}
7
7
  query GetProcessTemplate($input: ProcessTemplateFilter) {
8
8
  processTemplate(input: $input) {
@@ -2,7 +2,7 @@ import { gql } from "graphql-request";
2
2
 
3
3
  import { SCHEDULED_PROCESS_FRAGMENT_MD } from "./fragments";
4
4
 
5
- const GET_SCHEDULED_PROCESSES = gql`
5
+ const _GET_SCHEDULED_PROCESSES = gql`
6
6
  ${SCHEDULED_PROCESS_FRAGMENT_MD}
7
7
  query GetScheduledProcesses($input: ScheduledProcessInput) {
8
8
  scheduledProcesses(input: $input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evenicanpm/admin-integrate",
3
- "version": "1.8.1",
3
+ "version": "2.0.1",
4
4
  "description": "e4Integrate Admin Panel",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,5 +21,5 @@
21
21
  "elkjs": "^0.10.0",
22
22
  "lodash": "^4.17.21"
23
23
  },
24
- "gitHead": "07cfd4496c6a137e1420a6572298998b25b6369d"
24
+ "gitHead": "bbaff05f6f592114ad7a25caeee531e4fa1b14cf"
25
25
  }
@@ -1,7 +1,7 @@
1
1
  import type { ConfigurationImportMutationVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
2
2
  import { useMutation, useQueryClient } from "@tanstack/react-query";
3
- import { queryFn } from "./process-config-import.server";
4
3
  import { buildConfigurationExportQueryKey } from "../../../api/configuration/queries/configuration-export.query";
4
+ import { queryFn } from "./process-config-import.server";
5
5
 
6
6
  export const buildProcessScheduleGroupDetailsQueryKey = {
7
7
  all: () => ["configurationImport"] as const,
@@ -0,0 +1,48 @@
1
+ import type { GetFieldValuesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
2
+ import {
3
+ type QueryClient,
4
+ type UseQueryOptions,
5
+ useQuery,
6
+ } from "@tanstack/react-query";
7
+ import { queryFn } from "./get-field-values.server";
8
+
9
+ export const buildGetFieldValuesQueryKey = {
10
+ all: () => ["getFieldValues"] as const,
11
+ byInput: (variables?: GetFieldValuesQueryVariables) => [
12
+ "getFieldValues",
13
+ variables,
14
+ ],
15
+ };
16
+
17
+ export const getFieldValues = {
18
+ queryKey: buildGetFieldValuesQueryKey.all(),
19
+
20
+ prefetch: (
21
+ queryClient: QueryClient,
22
+ variables: GetFieldValuesQueryVariables,
23
+ ) =>
24
+ queryClient.prefetchQuery({
25
+ queryKey: buildGetFieldValuesQueryKey.byInput(variables),
26
+ queryFn: () => queryFn(variables),
27
+ }),
28
+
29
+ fetchData: async (
30
+ queryClient: QueryClient,
31
+ variables: GetFieldValuesQueryVariables,
32
+ ) => {
33
+ return await queryClient.fetchQuery({
34
+ queryKey: buildGetFieldValuesQueryKey.byInput(variables),
35
+ queryFn: () => queryFn(variables),
36
+ });
37
+ },
38
+
39
+ useData: (
40
+ variables: GetFieldValuesQueryVariables,
41
+ options?: UseQueryOptions,
42
+ ) =>
43
+ useQuery({
44
+ queryKey: buildGetFieldValuesQueryKey.byInput(variables),
45
+ queryFn: () => queryFn(variables),
46
+ ...options,
47
+ }),
48
+ };
@@ -0,0 +1,9 @@
1
+ "use server";
2
+ import type { GetFieldValuesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
3
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
4
+
5
+ export const queryFn = async (variables: GetFieldValuesQueryVariables) => {
6
+ const sdk = await createGraphqlclient();
7
+ const { data } = await sdk.GetFieldValues(variables);
8
+ return data;
9
+ };
@@ -1,3 +1,7 @@
1
+ export {
2
+ buildGetFieldValuesQueryKey,
3
+ getFieldValues,
4
+ } from "./get-field-values.query";
1
5
  export { getProcessTemplate } from "./get-process-template.query";
2
6
  export { getProcessTemplateGroups } from "./get-process-template-groups.query";
3
7
  export { getProcessTemplateRecords } from "./get-process-template-records.query";
@@ -1,10 +1,10 @@
1
1
  import type {
2
+ CheckUniqueIdentifierQuery,
3
+ CheckUniqueIdentifierQueryVariables,
2
4
  GetDataDescriptionsQuery,
3
5
  GetDataDescriptionsQueryVariables,
4
6
  GetSourceEndpointsQuery,
5
7
  GetSourceEndpointsQueryVariables,
6
- CheckUniqueIdentifierQuery,
7
- CheckUniqueIdentifierQueryVariables,
8
8
  } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
9
9
 
10
10
  export type TemplateInputSearchQueryVariables =
@@ -0,0 +1,22 @@
1
+ import type {
2
+ WizardFieldCheckValidationInput,
3
+ WizardFieldValidationResult,
4
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
5
+ import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
6
+ import { queryFn } from "./validate-field-on-check.server";
7
+
8
+ export const buildValidateFieldOnCheckQueryKey = (
9
+ variables: WizardFieldCheckValidationInput,
10
+ ) => ["validateFieldOnCheck", variables] as const;
11
+
12
+ export const validateFieldOnCheckQuery = {
13
+ useData: (
14
+ variables: WizardFieldCheckValidationInput,
15
+ options?: UseQueryOptions<WizardFieldValidationResult | null>,
16
+ ) =>
17
+ useQuery({
18
+ queryKey: buildValidateFieldOnCheckQueryKey(variables),
19
+ queryFn: () => queryFn(variables),
20
+ ...options,
21
+ }),
22
+ };
@@ -0,0 +1,30 @@
1
+ "use server";
2
+
3
+ import type {
4
+ ValidateFieldOnCheckQueryVariables,
5
+ WizardFieldCheckValidationInput,
6
+ WizardFieldValidationResult,
7
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
8
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
9
+
10
+ export const queryFn = async (
11
+ variables: WizardFieldCheckValidationInput,
12
+ ): Promise<WizardFieldValidationResult | null> => {
13
+ const sdk = await createGraphqlclient();
14
+ const { data } = await sdk.ValidateFieldOnCheck({
15
+ input: {
16
+ fieldId: variables.fieldId,
17
+ fieldName: variables.fieldName,
18
+ value: variables.value,
19
+ },
20
+ });
21
+ return data?.validateFieldOnCheck ?? null;
22
+ };
23
+
24
+ export async function validateFieldOnCheck(
25
+ payload: ValidateFieldOnCheckQueryVariables,
26
+ ): Promise<WizardFieldValidationResult | null> {
27
+ const sdk = await createGraphqlclient();
28
+ const { data } = await sdk.ValidateFieldOnCheck(payload);
29
+ return data?.validateFieldOnCheck ?? null;
30
+ }
@@ -0,0 +1,18 @@
1
+ "use server";
2
+
3
+ import type {
4
+ WizardFieldValidationInput,
5
+ WizardFieldValidationResult,
6
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
7
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
8
+
9
+ export type ValidateFieldOnSubmitInput = WizardFieldValidationInput;
10
+
11
+ export async function validateFieldOnSubmit(
12
+ input: WizardFieldValidationInput[],
13
+ ): Promise<WizardFieldValidationResult[]> {
14
+ const sdk = await createGraphqlclient();
15
+ const { data } = await sdk.ValidateFieldOnSubmit({ input });
16
+ const results = data?.validateFieldOnSubmit ?? [];
17
+ return results.filter((r): r is WizardFieldValidationResult => r != null);
18
+ }
@@ -24,4 +24,4 @@ const StyledIconButton = styled(IconButton)(({ theme }) => ({
24
24
  ":hover": { color: theme.palette.info.main },
25
25
  }));
26
26
 
27
- export { StyledTableCell, StyledTableRow, StyledIconButton };
27
+ export { StyledIconButton, StyledTableCell, StyledTableRow };
@@ -2,6 +2,7 @@ import createSvgIcon from "@mui/material/utils/createSvgIcon";
2
2
 
3
3
  const UpDown = createSvgIcon(
4
4
  <svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <title>Sort ascending and descending</title>
5
6
  <path
6
7
  d="M8.64847 6.88354H3.35158C3.04454 6.88354 2.86173 7.2269 3.03517 7.4812L5.68362 11.3824C5.83596 11.6062 6.16526 11.6062 6.3176 11.3824L8.96605 7.4812C9.13714 7.2269 8.9555 6.88354 8.64847 6.88354Z"
7
8
  fill="currentColor"
@@ -1,5 +1,4 @@
1
1
  import { BaseEdge, type EdgeProps, getSmoothStepPath } from "@xyflow/react";
2
- import React from "react";
3
2
 
4
3
  export function AnimatedSVGEdge({
5
4
  id,
@@ -6,7 +6,7 @@ import type {
6
6
 
7
7
  export interface ElkNodeWithFlow extends ElkNode {
8
8
  type?: string;
9
- data?: any;
9
+ data?: unknown;
10
10
  position?: {
11
11
  x: number;
12
12
  y: number;