@evoke-platform/ui-components 1.10.0-testing.9 → 1.10.1-dev.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 (78) 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 +24 -2
  6. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.test.js +45 -2
  7. package/dist/published/components/custom/Form/FormComponents/DocumentComponent/Document.js +2 -1
  8. package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/RepeatableField.js +1 -1
  9. package/dist/published/components/custom/Form/tests/Form.test.js +0 -2
  10. package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +36 -7
  11. package/dist/published/components/custom/FormField/DateTimePickerSelect/DateTimePickerSelect.js +14 -1
  12. package/dist/published/components/custom/FormField/FormField.d.ts +3 -1
  13. package/dist/published/components/custom/FormField/FormField.js +17 -5
  14. package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +6 -4
  15. package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.test.js +0 -2
  16. package/dist/published/components/custom/FormField/Select/Select.test.js +0 -2
  17. package/dist/published/components/custom/FormField/TimePickerSelect/TimePickerSelect.js +14 -1
  18. package/dist/published/components/custom/FormV2/FormRenderer.d.ts +2 -1
  19. package/dist/published/components/custom/FormV2/FormRenderer.js +46 -8
  20. package/dist/published/components/custom/FormV2/FormRendererContainer.js +178 -153
  21. package/dist/published/components/custom/FormV2/components/AccordionSections.js +7 -2
  22. package/dist/published/components/custom/FormV2/components/Body.d.ts +1 -1
  23. package/dist/published/components/custom/FormV2/components/DefaultValues.d.ts +2 -2
  24. package/dist/published/components/custom/FormV2/components/DefaultValues.js +36 -28
  25. package/dist/published/components/custom/FormV2/components/FieldWrapper.js +1 -1
  26. package/dist/published/components/custom/FormV2/components/Footer.d.ts +1 -0
  27. package/dist/published/components/custom/FormV2/components/Footer.js +8 -5
  28. package/dist/published/components/custom/FormV2/components/FormContext.d.ts +3 -2
  29. package/dist/published/components/custom/FormV2/components/FormFieldTypes/AddressFields.d.ts +9 -0
  30. package/dist/published/components/custom/FormV2/components/FormFieldTypes/AddressFields.js +32 -15
  31. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/ActionDialog.js +2 -2
  32. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/RepeatableField.js +9 -23
  33. package/dist/published/components/custom/FormV2/components/FormFieldTypes/Criteria.js +16 -3
  34. package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/Document.js +22 -4
  35. package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/DocumentList.d.ts +2 -1
  36. package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/DocumentList.js +16 -3
  37. package/dist/published/components/custom/FormV2/components/FormFieldTypes/Image.js +31 -5
  38. package/dist/published/components/custom/FormV2/components/FormFieldTypes/UserProperty.js +15 -3
  39. package/dist/published/components/custom/FormV2/components/FormFieldTypes/relatedObjectFiles/ObjectPropertyInput.js +127 -92
  40. package/dist/published/components/custom/FormV2/components/FormFieldTypes/relatedObjectFiles/RelatedObjectInstance.d.ts +2 -3
  41. package/dist/published/components/custom/FormV2/components/FormFieldTypes/relatedObjectFiles/RelatedObjectInstance.js +43 -20
  42. package/dist/published/components/custom/FormV2/components/Header.d.ts +5 -3
  43. package/dist/published/components/custom/FormV2/components/Header.js +47 -9
  44. package/dist/published/components/custom/FormV2/components/PropertyProtection.d.ts +16 -0
  45. package/dist/published/components/custom/FormV2/components/PropertyProtection.js +113 -0
  46. package/dist/published/components/custom/FormV2/components/RecursiveEntryRenderer.js +47 -24
  47. package/dist/published/components/custom/FormV2/components/ValidationFiles/ValidationErrors.js +1 -1
  48. package/dist/published/components/custom/FormV2/components/types.d.ts +2 -0
  49. package/dist/published/components/custom/FormV2/components/utils.d.ts +6 -4
  50. package/dist/published/components/custom/FormV2/components/utils.js +83 -13
  51. package/dist/published/components/custom/FormV2/tests/FormRenderer.test.js +411 -44
  52. package/dist/published/components/custom/FormV2/tests/FormRendererContainer.test.js +983 -16
  53. package/dist/published/components/custom/FormV2/tests/test-data.d.ts +1 -0
  54. package/dist/published/components/custom/FormV2/tests/test-data.js +138 -0
  55. package/dist/published/components/custom/ViewDetailsV2/InstanceEntryRenderer.d.ts +3 -0
  56. package/dist/published/components/custom/ViewDetailsV2/InstanceEntryRenderer.js +165 -0
  57. package/dist/published/components/custom/ViewDetailsV2/ViewDetailsV2Container.d.ts +13 -0
  58. package/dist/published/components/custom/ViewDetailsV2/ViewDetailsV2Container.js +144 -0
  59. package/dist/published/components/custom/ViewDetailsV2/index.d.ts +3 -0
  60. package/dist/published/components/custom/ViewDetailsV2/index.js +2 -0
  61. package/dist/published/components/custom/index.d.ts +2 -0
  62. package/dist/published/components/custom/index.js +1 -0
  63. package/dist/published/index.d.ts +6 -6
  64. package/dist/published/index.js +1 -1
  65. package/dist/published/stories/CriteriaBuilder.stories.js +6 -0
  66. package/dist/published/stories/FormRenderer.stories.d.ts +8 -4
  67. package/dist/published/stories/FormRendererContainer.stories.d.ts +26 -0
  68. package/dist/published/stories/FormRendererContainer.stories.js +5 -0
  69. package/dist/published/stories/FormRendererData.d.ts +12 -0
  70. package/dist/published/stories/FormRendererData.js +26 -1
  71. package/dist/published/stories/ViewDetailsV2Container.stories.d.ts +26 -0
  72. package/dist/published/stories/ViewDetailsV2Container.stories.js +37 -0
  73. package/dist/published/stories/ViewDetailsV2Data.d.ts +4 -0
  74. package/dist/published/stories/ViewDetailsV2Data.js +203 -0
  75. package/dist/published/stories/sharedMswHandlers.js +49 -10
  76. package/dist/published/theme/hooks.d.ts +4 -3
  77. package/dist/published/types.d.ts +3 -0
  78. package/package.json +10 -8
@@ -121,3 +121,15 @@ export declare const users: {
121
121
  email: string;
122
122
  name: string;
123
123
  }[];
124
+ export declare const customerLayout: {
125
+ id: string;
126
+ name: string;
127
+ properties: {
128
+ id: string;
129
+ }[];
130
+ sort: {
131
+ colId: string;
132
+ sort: string;
133
+ };
134
+ objectId: string;
135
+ };
@@ -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',
@@ -558,6 +563,8 @@ export const mockEvokeForm = {
558
563
  display: {
559
564
  label: 'Collection',
560
565
  createActionId: '_create',
566
+ deleteActionId: '_delete',
567
+ deleteFormId: '_auto_',
561
568
  createFormId: 'customerCreateForm',
562
569
  },
563
570
  },
@@ -1054,3 +1061,21 @@ export const users = [
1054
1061
  name: 'User 2',
1055
1062
  },
1056
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;
@@ -1,3 +1,4 @@
1
+ import { PropertyProtection } from '@evoke-platform/context';
1
2
  export type EvokeObject = {
2
3
  id: string;
3
4
  name: string;
@@ -13,6 +14,8 @@ export type ObjectProperty = {
13
14
  searchable?: boolean;
14
15
  objectId?: string;
15
16
  formula?: string;
17
+ mask?: string;
18
+ protection?: PropertyProtection;
16
19
  };
17
20
  export type Obj = {
18
21
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.10.0-testing.9",
3
+ "version": "1.10.1-dev.0",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",
@@ -21,6 +21,7 @@
21
21
  "test": "vitest",
22
22
  "test:ui": "vitest --ui",
23
23
  "test:preview": "vitest-preview",
24
+ "coverage": "vitest run --coverage",
24
25
  "copy-styles": "copyfiles -u 1 src/styles/*.css dist/published/",
25
26
  "build": "rm -rf ./dist && tsc && npm run copy-styles",
26
27
  "build:cjs": "tsc --module CommonJS --outDir dist/cjs",
@@ -52,22 +53,23 @@
52
53
  "@storybook/react": "^7.6.20",
53
54
  "@storybook/react-webpack5": "^7.6.20",
54
55
  "@storybook/testing-library": "^0.0.11",
55
- "@testing-library/jest-dom": "^6.8.0",
56
- "@testing-library/react": "^14.3.1",
57
- "@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",
58
59
  "@types/flat": "^5.0.5",
59
60
  "@types/jest": "^28.1.4",
60
61
  "@types/json-logic-js": "^2.0.8",
61
62
  "@types/luxon": "^3.4.2",
62
63
  "@types/nanoid-dictionary": "^4.2.3",
63
- "@types/node": "^18.0.0",
64
+ "@types/node": "^24.10.0",
64
65
  "@types/react": "^18.0.17",
65
66
  "@types/react-dom": "^18.0.5",
66
67
  "@types/react-input-mask": "^2.0.4",
67
68
  "@typescript-eslint/eslint-plugin": "^5.52.0",
68
69
  "@typescript-eslint/parser": "^5.35.1",
69
70
  "@typescript-eslint/typescript-estree": "^5.35.1",
70
- "@vitest/ui": "^1.6.0",
71
+ "@vitest/coverage-v8": "^3.2.4",
72
+ "@vitest/ui": "^3.2.4",
71
73
  "babel-jest": "^28.1.2",
72
74
  "babel-loader": "^8.2.5",
73
75
  "copyfiles": "^2.4.1",
@@ -88,13 +90,13 @@
88
90
  "rimraf": "^3.0.2",
89
91
  "storybook": "^7.6.20",
90
92
  "typescript": "^4.7.3",
91
- "vitest": "^1.6.0",
93
+ "vitest": "^3.2.4",
92
94
  "vitest-preview": "^0.0.3",
93
95
  "webpack": "^5.74.0",
94
96
  "yalc": "^1.0.0-pre.53"
95
97
  },
96
98
  "peerDependencies": {
97
- "@evoke-platform/context": "^1.5.0-0",
99
+ "@evoke-platform/context": "^1.5.0",
98
100
  "react": "^18.1.0",
99
101
  "react-dom": "^18.1.0"
100
102
  },