@evoke-platform/ui-components 1.10.0-dev.3 → 1.10.0-dev.31

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 (71) hide show
  1. package/dist/published/components/core/Autocomplete/Autocomplete.js +4 -2
  2. package/dist/published/components/core/Autocomplete/Autocomplete.test.js +112 -3
  3. package/dist/published/components/core/TextField/TextField.js +1 -1
  4. package/dist/published/components/core/TextField/TextField.test.js +0 -2
  5. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +1 -1
  6. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.test.d.ts +1 -0
  7. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.test.js +428 -0
  8. package/dist/published/components/custom/CriteriaBuilder/ValueEditor.js +19 -6
  9. package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/RepeatableField.js +1 -1
  10. package/dist/published/components/custom/Form/tests/Form.test.js +0 -2
  11. package/dist/published/components/custom/Form/utils.js +1 -0
  12. package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +14 -1
  13. package/dist/published/components/custom/FormField/DateTimePickerSelect/DateTimePickerSelect.js +14 -1
  14. package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.test.js +0 -2
  15. package/dist/published/components/custom/FormField/Select/Select.test.js +0 -2
  16. package/dist/published/components/custom/FormField/TimePickerSelect/TimePickerSelect.js +14 -1
  17. package/dist/published/components/custom/FormV2/FormRenderer.d.ts +2 -1
  18. package/dist/published/components/custom/FormV2/FormRenderer.js +19 -7
  19. package/dist/published/components/custom/FormV2/FormRendererContainer.js +117 -74
  20. package/dist/published/components/custom/FormV2/components/AccordionSections.js +7 -2
  21. package/dist/published/components/custom/FormV2/components/Body.d.ts +1 -1
  22. package/dist/published/components/custom/FormV2/components/FieldWrapper.js +1 -1
  23. package/dist/published/components/custom/FormV2/components/Footer.d.ts +1 -0
  24. package/dist/published/components/custom/FormV2/components/Footer.js +8 -5
  25. package/dist/published/components/custom/FormV2/components/FormContext.d.ts +3 -2
  26. package/dist/published/components/custom/FormV2/components/FormFieldTypes/AddressFields.d.ts +9 -0
  27. package/dist/published/components/custom/FormV2/components/FormFieldTypes/AddressFields.js +32 -15
  28. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/ActionDialog.js +2 -2
  29. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/RepeatableField.d.ts +0 -3
  30. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/RepeatableField.js +36 -49
  31. package/dist/published/components/custom/FormV2/components/FormFieldTypes/Criteria.js +16 -3
  32. package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/Document.js +16 -4
  33. package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/DocumentList.d.ts +2 -1
  34. package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/DocumentList.js +16 -3
  35. package/dist/published/components/custom/FormV2/components/FormFieldTypes/Image.js +31 -5
  36. package/dist/published/components/custom/FormV2/components/FormFieldTypes/UserProperty.js +15 -3
  37. package/dist/published/components/custom/FormV2/components/FormFieldTypes/relatedObjectFiles/ObjectPropertyInput.js +109 -81
  38. package/dist/published/components/custom/FormV2/components/FormFieldTypes/relatedObjectFiles/RelatedObjectInstance.js +38 -16
  39. package/dist/published/components/custom/FormV2/components/Header.d.ts +5 -3
  40. package/dist/published/components/custom/FormV2/components/Header.js +47 -9
  41. package/dist/published/components/custom/FormV2/components/RecursiveEntryRenderer.js +46 -35
  42. package/dist/published/components/custom/FormV2/components/ValidationFiles/ValidationErrors.js +1 -1
  43. package/dist/published/components/custom/FormV2/components/types.d.ts +1 -0
  44. package/dist/published/components/custom/FormV2/components/utils.d.ts +4 -4
  45. package/dist/published/components/custom/FormV2/components/utils.js +13 -16
  46. package/dist/published/components/custom/FormV2/tests/FormRenderer.test.js +289 -45
  47. package/dist/published/components/custom/FormV2/tests/FormRendererContainer.test.js +664 -16
  48. package/dist/published/components/custom/FormV2/tests/test-data.d.ts +1 -0
  49. package/dist/published/components/custom/FormV2/tests/test-data.js +140 -0
  50. package/dist/published/components/custom/ViewDetailsV2/InstanceEntryRenderer.d.ts +3 -0
  51. package/dist/published/components/custom/ViewDetailsV2/InstanceEntryRenderer.js +155 -0
  52. package/dist/published/components/custom/ViewDetailsV2/ViewDetailsV2Container.d.ts +13 -0
  53. package/dist/published/components/custom/ViewDetailsV2/ViewDetailsV2Container.js +144 -0
  54. package/dist/published/components/custom/ViewDetailsV2/index.d.ts +3 -0
  55. package/dist/published/components/custom/ViewDetailsV2/index.js +2 -0
  56. package/dist/published/components/custom/index.d.ts +2 -0
  57. package/dist/published/components/custom/index.js +1 -0
  58. package/dist/published/index.d.ts +6 -6
  59. package/dist/published/index.js +1 -1
  60. package/dist/published/stories/FormRenderer.stories.d.ts +8 -4
  61. package/dist/published/stories/FormRendererContainer.stories.d.ts +26 -0
  62. package/dist/published/stories/FormRendererContainer.stories.js +5 -0
  63. package/dist/published/stories/FormRendererData.d.ts +12 -0
  64. package/dist/published/stories/FormRendererData.js +29 -44
  65. package/dist/published/stories/ViewDetailsV2Container.stories.d.ts +26 -0
  66. package/dist/published/stories/ViewDetailsV2Container.stories.js +37 -0
  67. package/dist/published/stories/ViewDetailsV2Data.d.ts +4 -0
  68. package/dist/published/stories/ViewDetailsV2Data.js +203 -0
  69. package/dist/published/stories/sharedMswHandlers.js +49 -10
  70. package/dist/published/theme/hooks.d.ts +4 -3
  71. package/package.json +12 -8
@@ -93,6 +93,11 @@ export const mockGenericEvokeFormObject = {
93
93
  name: 'User',
94
94
  type: 'user',
95
95
  },
96
+ {
97
+ id: 'boolean',
98
+ name: 'Boolean',
99
+ type: 'boolean',
100
+ },
96
101
  ],
97
102
  actions: [
98
103
  {
@@ -170,7 +175,7 @@ export const mockGenericEvokeFormObject = {
170
175
  ],
171
176
  outputEvent: 'Update Generic Evoke Form 2',
172
177
  preconditions: {},
173
- defaultFormId: 'UpdateGenericEvokeForm',
178
+ defaultFormId: 'updateGenericEvokeForm',
174
179
  },
175
180
  {
176
181
  id: '_delete',
@@ -196,7 +201,7 @@ export const mockMovieObject = {
196
201
  id: 'customers',
197
202
  name: 'Customers',
198
203
  type: 'collection',
199
- objectId: 'costomerMovie',
204
+ objectId: 'customerMovie',
200
205
  relatedPropertyId: 'movie',
201
206
  manyToManyPropertyId: 'customer',
202
207
  },
@@ -533,20 +538,6 @@ export const mockEvokeForm = {
533
538
  display: {
534
539
  label: 'Multi-Select',
535
540
  },
536
- enumWithLabels: [
537
- {
538
- label: '1',
539
- value: '1',
540
- },
541
- {
542
- label: '2',
543
- value: '2',
544
- },
545
- {
546
- label: '3',
547
- value: '3',
548
- },
549
- ],
550
541
  },
551
542
  {
552
543
  type: 'input',
@@ -571,6 +562,10 @@ export const mockEvokeForm = {
571
562
  parameterId: 'collection',
572
563
  display: {
573
564
  label: 'Collection',
565
+ createActionId: '_create',
566
+ deleteActionId: '_delete',
567
+ deleteFormId: '_auto_',
568
+ createFormId: 'customerCreateForm',
574
569
  },
575
570
  },
576
571
  {
@@ -815,20 +810,6 @@ export const mockDocEvokeForm = {
815
810
  sortBy: 'ASC',
816
811
  },
817
812
  },
818
- enumWithLabels: [
819
- {
820
- label: 'Public',
821
- value: 'Public',
822
- },
823
- {
824
- label: 'Private',
825
- value: 'Private',
826
- },
827
- {
828
- label: 'Portal',
829
- value: 'Portal',
830
- },
831
- ],
832
813
  },
833
814
  {
834
815
  type: 'readonlyField',
@@ -887,20 +868,6 @@ export const mockEvokeFormWithSections = {
887
868
  display: {
888
869
  label: 'Multi-Select',
889
870
  },
890
- enumWithLabels: [
891
- {
892
- label: '1',
893
- value: '1',
894
- },
895
- {
896
- label: '2',
897
- value: '2',
898
- },
899
- {
900
- label: '3',
901
- value: '3',
902
- },
903
- ],
904
871
  },
905
872
  {
906
873
  type: 'input',
@@ -1094,3 +1061,21 @@ export const users = [
1094
1061
  name: 'User 2',
1095
1062
  },
1096
1063
  ];
1064
+ // Layouts
1065
+ export const customerLayout = {
1066
+ id: 'layoutId',
1067
+ name: 'Generic Layout 3',
1068
+ properties: [
1069
+ {
1070
+ id: 'name',
1071
+ },
1072
+ {
1073
+ id: 'document',
1074
+ },
1075
+ ],
1076
+ sort: {
1077
+ colId: 'name',
1078
+ sort: 'asc',
1079
+ },
1080
+ objectId: 'customers',
1081
+ };
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("../components/custom/FormV2/components/types").BaseProps & {
3
+ panelLayoutId?: string | undefined;
4
+ instanceId?: string | undefined;
5
+ objectId: string;
6
+ richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
7
+ renderHeader?: ((props: import("../components/custom").HeaderProps) => React.ReactNode) | undefined;
8
+ renderBody?: ((props: import("../components/custom").BodyProps) => React.ReactNode) | undefined;
9
+ }>;
10
+ export default _default;
11
+ export declare const ViewDetails: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../components/custom/FormV2/components/types").BaseProps & {
12
+ panelLayoutId?: string | undefined;
13
+ instanceId?: string | undefined;
14
+ objectId: string;
15
+ richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
16
+ renderHeader?: ((props: import("../components/custom").HeaderProps) => React.ReactNode) | undefined;
17
+ renderBody?: ((props: import("../components/custom").BodyProps) => React.ReactNode) | undefined;
18
+ }>;
19
+ export declare const ViewWithSections: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../components/custom/FormV2/components/types").BaseProps & {
20
+ panelLayoutId?: string | undefined;
21
+ instanceId?: string | undefined;
22
+ objectId: string;
23
+ richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
24
+ renderHeader?: ((props: import("../components/custom").HeaderProps) => React.ReactNode) | undefined;
25
+ renderBody?: ((props: import("../components/custom").BodyProps) => React.ReactNode) | undefined;
26
+ }>;
@@ -0,0 +1,37 @@
1
+ import { Box } from '@mui/material';
2
+ import React from 'react';
3
+ import { MemoryRouter } from 'react-router-dom';
4
+ import { ViewDetailsV2Container } from '../components/custom';
5
+ import { sharedObjectHandlers } from './sharedMswHandlers';
6
+ export default {
7
+ title: 'Custom/ViewDetailsV2Container',
8
+ component: ViewDetailsV2Container,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ msw: {
12
+ handlers: [sharedObjectHandlers],
13
+ },
14
+ },
15
+ decorators: [
16
+ (Story) => (React.createElement(Box, { sx: { padding: '2rem', paddingBottom: 0, '& .css-x8wy7h': { bottom: -1 } } },
17
+ React.createElement(Story, null))),
18
+ ],
19
+ };
20
+ const mockProps = {
21
+ panelLayoutId: 'genericEvokeView',
22
+ instanceId: 'genericEvokeViewInstanceId',
23
+ objectId: 'genericEvokeForm',
24
+ };
25
+ const Template = (args) => {
26
+ return (React.createElement(MemoryRouter, null,
27
+ React.createElement(ViewDetailsV2Container, { ...args })));
28
+ };
29
+ export const ViewDetails = Template.bind({});
30
+ ViewDetails.args = {
31
+ ...mockProps,
32
+ };
33
+ export const ViewWithSections = Template.bind({});
34
+ ViewWithSections.args = {
35
+ ...mockProps,
36
+ panelLayoutId: 'genericEvokeViewWithSections',
37
+ };
@@ -0,0 +1,4 @@
1
+ import { EvokeForm, ObjectInstance } from '@evoke-platform/context';
2
+ export declare const viewInstance: ObjectInstance;
3
+ export declare const mockGenericEvokeView: Omit<EvokeForm, 'actionId'>;
4
+ export declare const mockGenericEvokeViewWithSections: EvokeForm;
@@ -0,0 +1,203 @@
1
+ export const viewInstance = {
2
+ id: 'instanceId',
3
+ name: 'Ren Foreman',
4
+ multiSelect: ['2', '1', '3'],
5
+ address: {
6
+ city: 'Baltimore',
7
+ },
8
+ objectId: 'genericEvokeForm',
9
+ criteria: { name: 'Value' },
10
+ relatedObject: { id: 'mbSzyE9gpmRx9uMBEmnbh', name: 'A Phantom Menace' },
11
+ user: { id: 'user1', name: 'User 1' },
12
+ boolean: false,
13
+ };
14
+ // View definitions for ViewDetailsV2Container stories
15
+ export const mockGenericEvokeView = {
16
+ id: 'genericEvokeView',
17
+ name: 'Generic Evoke View',
18
+ entries: [
19
+ {
20
+ type: 'readonlyField',
21
+ propertyId: 'name',
22
+ display: {
23
+ label: 'Name',
24
+ prefix: 'Dr',
25
+ suffix: 'Jr',
26
+ required: true,
27
+ charCount: true,
28
+ },
29
+ },
30
+ {
31
+ type: 'readonlyField',
32
+ propertyId: 'criteria',
33
+ display: {
34
+ label: 'Criteria',
35
+ },
36
+ },
37
+ {
38
+ type: 'readonlyField',
39
+ propertyId: 'multiSelect',
40
+ display: {
41
+ label: 'Multi-Select',
42
+ },
43
+ },
44
+ {
45
+ type: 'readonlyField',
46
+ propertyId: 'address.city',
47
+ display: {
48
+ label: 'Address City',
49
+ description: 'address city description',
50
+ },
51
+ },
52
+ {
53
+ type: 'readonlyField',
54
+ propertyId: 'relatedObject',
55
+ display: {
56
+ label: 'Related Object',
57
+ mode: 'default',
58
+ description: 'related Object description',
59
+ relatedObjectDisplay: 'dropdown',
60
+ },
61
+ },
62
+ {
63
+ type: 'readonlyField',
64
+ propertyId: 'collection',
65
+ display: {
66
+ label: 'Collection',
67
+ viewLayout: {
68
+ id: 'layoutId',
69
+ objectId: 'customers',
70
+ },
71
+ },
72
+ },
73
+ {
74
+ type: 'readonlyField',
75
+ propertyId: 'manyToMany',
76
+ display: {
77
+ label: 'Many to Many',
78
+ },
79
+ },
80
+ {
81
+ type: 'readonlyField',
82
+ propertyId: 'documentUpload',
83
+ display: {
84
+ label: 'Document Upload',
85
+ },
86
+ },
87
+ {
88
+ type: 'readonlyField',
89
+ propertyId: 'user',
90
+ display: {
91
+ label: 'User',
92
+ },
93
+ },
94
+ {
95
+ type: 'readonlyField',
96
+ propertyId: 'boolean',
97
+ display: {
98
+ label: 'Boolean',
99
+ booleanDisplay: 'checkbox',
100
+ },
101
+ },
102
+ ],
103
+ objectId: 'genericEvokeForm',
104
+ };
105
+ export const mockGenericEvokeViewWithSections = {
106
+ id: 'genericEvokeViewWithSections',
107
+ name: 'Generic Evoke View With Sections',
108
+ entries: [
109
+ {
110
+ type: 'sections',
111
+ label: 'Section',
112
+ sections: [
113
+ {
114
+ label: 'Section 1',
115
+ entries: [
116
+ {
117
+ type: 'readonlyField',
118
+ propertyId: 'name',
119
+ display: {
120
+ label: 'Name',
121
+ prefix: 'Dr',
122
+ suffix: 'Jr',
123
+ required: true,
124
+ charCount: true,
125
+ },
126
+ },
127
+ {
128
+ type: 'readonlyField',
129
+ propertyId: 'documentUpload',
130
+ display: {
131
+ label: 'Document Upload',
132
+ },
133
+ },
134
+ {
135
+ type: 'readonlyField',
136
+ propertyId: 'criteria',
137
+ display: {
138
+ label: 'Criteria',
139
+ },
140
+ },
141
+ {
142
+ type: 'readonlyField',
143
+ propertyId: 'multiSelect',
144
+ display: {
145
+ label: 'Multi-Select',
146
+ },
147
+ },
148
+ {
149
+ type: 'readonlyField',
150
+ propertyId: 'address.city',
151
+ display: {
152
+ label: 'Address City',
153
+ description: 'address city description',
154
+ },
155
+ },
156
+ {
157
+ type: 'readonlyField',
158
+ propertyId: 'relatedObject',
159
+ display: {
160
+ label: 'Related Object',
161
+ mode: 'default',
162
+ description: 'related Object description',
163
+ relatedObjectDisplay: 'dropdown',
164
+ },
165
+ },
166
+ ],
167
+ },
168
+ {
169
+ label: 'Section 2',
170
+ entries: [
171
+ {
172
+ type: 'readonlyField',
173
+ propertyId: 'boolean',
174
+ display: {
175
+ label: 'Boolean',
176
+ booleanDisplay: 'checkbox',
177
+ },
178
+ },
179
+ {
180
+ type: 'sections',
181
+ label: 'Section',
182
+ sections: [
183
+ {
184
+ label: 'Nested Section 2',
185
+ entries: [
186
+ {
187
+ type: 'readonlyField',
188
+ propertyId: 'people',
189
+ display: {
190
+ label: 'Many to Many',
191
+ },
192
+ },
193
+ ],
194
+ },
195
+ ],
196
+ },
197
+ ],
198
+ },
199
+ ],
200
+ },
201
+ ],
202
+ objectId: 'genericEvokeForm',
203
+ };
@@ -1,5 +1,6 @@
1
1
  import { http, HttpResponse } from 'msw';
2
- import { instance, mockCustomerCreateForm, mockCustomerObject, mockCustomerUpdateForm, mockEvokeForm, mockEvokeFormWithSections, mockGenericEvokeFormObject, mockInstancesForCollection, mockInstancesForRelatedObject, mockMovieCreateForm, mockMovieObject, mockPeopleGenericObject, mockPeopleGenericObjectInstances, mockPeopleObject, mockPropertiesForCriteria, users, } from './FormRendererData';
2
+ import { customerLayout, instance, mockCustomerCreateForm, mockCustomerObject, mockCustomerUpdateForm, mockEvokeForm, mockEvokeFormWithSections, mockGenericEvokeFormObject, mockInstancesForCollection, mockInstancesForRelatedObject, mockMovieCreateForm, mockMovieObject, mockPeopleGenericObject, mockPeopleGenericObjectInstances, mockPeopleObject, mockPropertiesForCriteria, users, } from './FormRendererData';
3
+ import { mockGenericEvokeView, mockGenericEvokeViewWithSections, viewInstance } from './ViewDetailsV2Data';
3
4
  export const sharedObjectHandlers = [
4
5
  // Object fetches
5
6
  http.get('/api/data/objects/:objectId/effective', ({ params, request }) => {
@@ -30,8 +31,13 @@ export const sharedObjectHandlers = [
30
31
  http.get('/api/data/objects/:objectId/instances/:instanceId/object', ({ params }) => {
31
32
  const { objectId, instanceId } = params;
32
33
  let data;
33
- if (objectId === 'genericEvokeForm' && instanceId === 'updateGenericEvokeFormInstanceId') {
34
- data = mockGenericEvokeFormObject;
34
+ if (objectId === 'genericEvokeForm') {
35
+ if (instanceId === 'updateGenericEvokeFormInstanceId') {
36
+ data = mockGenericEvokeFormObject;
37
+ }
38
+ else if (instanceId === 'genericEvokeViewInstanceId') {
39
+ data = mockGenericEvokeFormObject;
40
+ }
35
41
  }
36
42
  else if (objectId === 'customers' && instanceId === 'collectionInstance') {
37
43
  data = mockCustomerObject;
@@ -47,24 +53,47 @@ export const sharedObjectHandlers = [
47
53
  http.get('/api/accessManagement/users', () => HttpResponse.json(users)),
48
54
  // Permission fetches
49
55
  http.get(/\/checkAccess$/, () => HttpResponse.json({ result: true })),
56
+ // Layout fetches
57
+ http.get('/api/data/objects/customers/tableLayouts/layoutId', () => HttpResponse.json(customerLayout)),
50
58
  // General instance fetches
51
- http.get('/api/data/objects/:objectId/instances/:id?', ({ params }) => {
52
- const { objectId, id } = params;
59
+ http.get('/api/data/objects/:objectId/instances/:instanceId?', ({ params }) => {
60
+ const { objectId, instanceId } = params;
53
61
  let data;
54
62
  switch (objectId) {
55
63
  case 'genericEvokeForm':
56
- data = id === 'updateGenericEvokeFormInstanceId' ? instance : {};
64
+ data =
65
+ instanceId === 'updateGenericEvokeFormInstanceId'
66
+ ? instance
67
+ : instanceId === 'genericEvokeViewInstanceId'
68
+ ? viewInstance
69
+ : {};
57
70
  break;
58
71
  case 'movies':
59
- data = id
60
- ? mockInstancesForRelatedObject.find((inst) => inst.id === id)
72
+ data = instanceId
73
+ ? mockInstancesForRelatedObject.find((inst) => inst.id === instanceId)
61
74
  : mockInstancesForRelatedObject;
62
75
  break;
63
76
  case 'customers':
64
- data = id ? mockInstancesForCollection.find((inst) => inst.id === id) : mockInstancesForCollection;
77
+ data = instanceId
78
+ ? mockInstancesForCollection.find((inst) => inst.id === instanceId)
79
+ : mockInstancesForCollection;
65
80
  break;
66
81
  case 'peopleGenericObject':
67
- data = [];
82
+ data = [
83
+ {
84
+ id: 'cgf2',
85
+ name: 'Jane Doe',
86
+ people: {
87
+ id: 'person1',
88
+ name: 'Jane Doe',
89
+ },
90
+ genericEvokeForm: {
91
+ id: 'gEV7frl7i1aUEEfkp5dAT',
92
+ name: 'Form Guy',
93
+ },
94
+ objectId: 'peopleGenericObject',
95
+ },
96
+ ];
68
97
  break;
69
98
  case 'people':
70
99
  data = mockPeopleGenericObjectInstances;
@@ -92,6 +121,16 @@ export const sharedObjectHandlers = [
92
121
  return HttpResponse.json({});
93
122
  }
94
123
  }),
124
+ // View fetches
125
+ http.get('/api/data/objects/genericEvokeForm/panelLayouts/:viewId?', ({ params, request }) => {
126
+ const viewId = Array.isArray(params.viewId) ? params.viewId[0] : params.viewId;
127
+ switch (viewId) {
128
+ case 'genericEvokeView':
129
+ return HttpResponse.json(mockGenericEvokeView);
130
+ case 'genericEvokeViewWithSections':
131
+ return HttpResponse.json(mockGenericEvokeViewWithSections);
132
+ }
133
+ }),
95
134
  // Action fetches
96
135
  // Fetch for many-to-many create action when adding a value to the field
97
136
  http.post('api/data/objects/peopleGenericObject/instances/actions', async (req) => {
@@ -137,7 +137,7 @@ export declare function useFormContext(): {
137
137
  * @returns Object with boolean flags for different breakpoints
138
138
  */
139
139
  setFetchedOptions: (newData: import("react-hook-form").FieldValues) => void;
140
- getValues: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues>;
140
+ getValues?: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues> | undefined;
141
141
  object?: import("@evoke-platform/context").Obj | undefined;
142
142
  errors?: import("react-hook-form").FieldValues | undefined;
143
143
  instance?: import("react-hook-form").FieldValues | undefined;
@@ -147,13 +147,14 @@ export declare function useFormContext(): {
147
147
  setExpandedSections?: import("react").Dispatch<import("react").SetStateAction<import("../components/custom/FormV2/components/types").ExpandedSection[]>> | undefined;
148
148
  setExpandAll?: import("react").Dispatch<import("react").SetStateAction<boolean | null | undefined>> | undefined;
149
149
  parameters?: import("@evoke-platform/context").InputParameter[] | undefined;
150
- handleChange: (name: string, value: unknown) => void;
150
+ handleChange?: ((name: string, value: unknown) => void | Promise<void>) | undefined;
151
+ onAutosave?: ((fieldId: string) => void | Promise<void>) | undefined;
151
152
  fieldHeight?: "medium" | "small" | undefined;
152
153
  triggerFieldReset?: boolean | undefined;
153
154
  showSubmitError?: boolean | undefined;
154
155
  associatedObject?: {
155
156
  instanceId?: string | undefined;
156
- propertyId?: string | undefined;
157
+ propertyId?: string | undefined; /** Extra large screens (1536px and up) */
157
158
  } | undefined;
158
159
  form?: import("@evoke-platform/context").EvokeForm | undefined;
159
160
  width: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.10.0-dev.3",
3
+ "version": "1.10.0-dev.31",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",
@@ -20,6 +20,8 @@
20
20
  "scripts": {
21
21
  "test": "vitest",
22
22
  "test:ui": "vitest --ui",
23
+ "test:preview": "vitest-preview",
24
+ "coverage": "vitest run --coverage",
23
25
  "copy-styles": "copyfiles -u 1 src/styles/*.css dist/published/",
24
26
  "build": "rm -rf ./dist && tsc && npm run copy-styles",
25
27
  "build:cjs": "tsc --module CommonJS --outDir dist/cjs",
@@ -51,22 +53,23 @@
51
53
  "@storybook/react": "^7.6.20",
52
54
  "@storybook/react-webpack5": "^7.6.20",
53
55
  "@storybook/testing-library": "^0.0.11",
54
- "@testing-library/jest-dom": "^6.8.0",
55
- "@testing-library/react": "^14.3.1",
56
- "@testing-library/user-event": "^14.5.2",
56
+ "@testing-library/jest-dom": "^6.9.1",
57
+ "@testing-library/react": "^16.3.0",
58
+ "@testing-library/user-event": "^14.6.1",
57
59
  "@types/flat": "^5.0.5",
58
60
  "@types/jest": "^28.1.4",
59
61
  "@types/json-logic-js": "^2.0.8",
60
62
  "@types/luxon": "^3.4.2",
61
63
  "@types/nanoid-dictionary": "^4.2.3",
62
- "@types/node": "^18.0.0",
64
+ "@types/node": "^24.10.0",
63
65
  "@types/react": "^18.0.17",
64
66
  "@types/react-dom": "^18.0.5",
65
67
  "@types/react-input-mask": "^2.0.4",
66
68
  "@typescript-eslint/eslint-plugin": "^5.52.0",
67
69
  "@typescript-eslint/parser": "^5.35.1",
68
70
  "@typescript-eslint/typescript-estree": "^5.35.1",
69
- "@vitest/ui": "^1.6.0",
71
+ "@vitest/coverage-v8": "^3.2.4",
72
+ "@vitest/ui": "^3.2.4",
70
73
  "babel-jest": "^28.1.2",
71
74
  "babel-loader": "^8.2.5",
72
75
  "copyfiles": "^2.4.1",
@@ -87,12 +90,13 @@
87
90
  "rimraf": "^3.0.2",
88
91
  "storybook": "^7.6.20",
89
92
  "typescript": "^4.7.3",
90
- "vitest": "^1.6.0",
93
+ "vitest": "^3.2.4",
94
+ "vitest-preview": "^0.0.3",
91
95
  "webpack": "^5.74.0",
92
96
  "yalc": "^1.0.0-pre.53"
93
97
  },
94
98
  "peerDependencies": {
95
- "@evoke-platform/context": "^1.5.0-0",
99
+ "@evoke-platform/context": "^1.5.0-testing.4",
96
100
  "react": "^18.1.0",
97
101
  "react-dom": "^18.1.0"
98
102
  },