@evoke-platform/ui-components 1.15.1 → 1.17.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.
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +3 -0
- package/dist/published/components/custom/Form/utils.d.ts +2 -2
- package/dist/published/components/custom/FormField/AddressFieldComponent/addressFieldComponent.js +1 -1
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.js +15 -7
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +1 -1
- package/dist/published/components/custom/FormField/Select/Select.js +1 -1
- package/dist/published/components/custom/FormV2/FormRenderer.js +5 -5
- package/dist/published/components/custom/FormV2/FormRendererContainer.js +20 -10
- package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/DropdownRepeatableFieldInput.js +3 -0
- package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/RepeatableField.js +1 -1
- package/dist/published/components/custom/FormV2/components/FormFieldTypes/DocumentFiles/Document.js +1 -0
- package/dist/published/components/custom/FormV2/components/FormFieldTypes/Image.js +1 -0
- package/dist/published/components/custom/FormV2/components/FormFieldTypes/UserProperty.js +2 -0
- package/dist/published/components/custom/FormV2/components/FormletRenderer.d.ts +6 -0
- package/dist/published/components/custom/FormV2/components/FormletRenderer.js +30 -0
- package/dist/published/components/custom/FormV2/components/HtmlView.js +12 -9
- package/dist/published/components/custom/FormV2/components/RecursiveEntryRenderer.js +8 -10
- package/dist/published/components/custom/FormV2/components/utils.d.ts +6 -2
- package/dist/published/components/custom/FormV2/components/utils.js +54 -4
- package/dist/published/components/custom/FormV2/tests/FormRenderer.test.js +48 -5
- package/dist/published/components/custom/FormV2/tests/FormRendererContainer.test.js +279 -35
- package/dist/published/stories/FormRendererData.d.ts +15 -0
- package/dist/published/stories/FormRendererData.js +63 -0
- package/dist/published/stories/sharedMswHandlers.js +4 -2
- package/package.json +2 -2
|
@@ -571,6 +571,29 @@ export const mockEvokeForm = {
|
|
|
571
571
|
label: 'User',
|
|
572
572
|
},
|
|
573
573
|
},
|
|
574
|
+
{
|
|
575
|
+
display: {
|
|
576
|
+
booleanDisplay: 'checkbox',
|
|
577
|
+
label: 'Boolean',
|
|
578
|
+
required: false,
|
|
579
|
+
},
|
|
580
|
+
type: 'inputField',
|
|
581
|
+
input: {
|
|
582
|
+
type: 'boolean',
|
|
583
|
+
id: 'boolean',
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
type: 'inputField',
|
|
588
|
+
input: {
|
|
589
|
+
type: 'image',
|
|
590
|
+
id: 'image',
|
|
591
|
+
},
|
|
592
|
+
display: {
|
|
593
|
+
label: 'Image',
|
|
594
|
+
required: false,
|
|
595
|
+
},
|
|
596
|
+
},
|
|
574
597
|
],
|
|
575
598
|
objectId: 'genericEvokeForm',
|
|
576
599
|
actionId: '_update',
|
|
@@ -898,6 +921,28 @@ export const mockEvokeFormWithSections = {
|
|
|
898
921
|
},
|
|
899
922
|
],
|
|
900
923
|
},
|
|
924
|
+
{
|
|
925
|
+
label: 'Nested Section 3',
|
|
926
|
+
entries: [
|
|
927
|
+
// This is how effective forms will show formlets
|
|
928
|
+
{
|
|
929
|
+
type: 'inputField',
|
|
930
|
+
input: {
|
|
931
|
+
type: 'date',
|
|
932
|
+
id: 'dateId1',
|
|
933
|
+
},
|
|
934
|
+
display: {
|
|
935
|
+
label: 'Date 1',
|
|
936
|
+
required: false,
|
|
937
|
+
},
|
|
938
|
+
},
|
|
939
|
+
// This is how non effective forms will show formlets
|
|
940
|
+
{
|
|
941
|
+
type: 'formlet',
|
|
942
|
+
formletId: 'formletId',
|
|
943
|
+
},
|
|
944
|
+
],
|
|
945
|
+
},
|
|
901
946
|
],
|
|
902
947
|
},
|
|
903
948
|
],
|
|
@@ -1057,3 +1102,21 @@ export const customerLayout = {
|
|
|
1057
1102
|
},
|
|
1058
1103
|
objectId: 'customers',
|
|
1059
1104
|
};
|
|
1105
|
+
// Formlets
|
|
1106
|
+
export const formlet = {
|
|
1107
|
+
id: 'formletId',
|
|
1108
|
+
name: 'Formlet with no objectId',
|
|
1109
|
+
entries: [
|
|
1110
|
+
{
|
|
1111
|
+
type: 'inputField',
|
|
1112
|
+
input: {
|
|
1113
|
+
type: 'date',
|
|
1114
|
+
id: 'dateId2',
|
|
1115
|
+
},
|
|
1116
|
+
display: {
|
|
1117
|
+
label: 'Date 2',
|
|
1118
|
+
required: false,
|
|
1119
|
+
},
|
|
1120
|
+
},
|
|
1121
|
+
],
|
|
1122
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { http, HttpResponse } from 'msw';
|
|
2
|
-
import { customerLayout, instance, mockCustomerCreateForm, mockCustomerObject, mockCustomerUpdateForm, mockEvokeForm, mockEvokeFormWithSections, mockGenericEvokeFormObject, mockInstancesForCollection, mockInstancesForRelatedObject, mockMovieCreateForm, mockMovieObject, mockPeopleGenericObject, mockPeopleGenericObjectInstances, mockPeopleObject, mockPropertiesForCriteria, users, } from './FormRendererData';
|
|
2
|
+
import { customerLayout, formlet, instance, mockCustomerCreateForm, mockCustomerObject, mockCustomerUpdateForm, mockEvokeForm, mockEvokeFormWithSections, mockGenericEvokeFormObject, mockInstancesForCollection, mockInstancesForRelatedObject, mockMovieCreateForm, mockMovieObject, mockPeopleGenericObject, mockPeopleGenericObjectInstances, mockPeopleObject, mockPropertiesForCriteria, users, } from './FormRendererData';
|
|
3
3
|
import { mockGenericEvokeView, mockGenericEvokeViewWithSections, viewInstance } from './ViewDetailsV2Data';
|
|
4
4
|
export const sharedObjectHandlers = [
|
|
5
5
|
// Object fetches
|
|
@@ -55,6 +55,8 @@ export const sharedObjectHandlers = [
|
|
|
55
55
|
http.get(/\/checkAccess$/, () => HttpResponse.json({ result: true })),
|
|
56
56
|
// Layout fetches
|
|
57
57
|
http.get('/api/data/objects/customers/tableLayouts/layoutId', () => HttpResponse.json(customerLayout)),
|
|
58
|
+
// Formlet fetches
|
|
59
|
+
http.get('/api/data/formlets/formletId', () => HttpResponse.json(formlet)),
|
|
58
60
|
// General instance fetches
|
|
59
61
|
http.get('/api/data/objects/:objectId/instances/:instanceId?', ({ params }) => {
|
|
60
62
|
const { objectId, instanceId } = params;
|
|
@@ -104,7 +106,7 @@ export const sharedObjectHandlers = [
|
|
|
104
106
|
return HttpResponse.json(data);
|
|
105
107
|
}),
|
|
106
108
|
// Form fetches
|
|
107
|
-
http.get('/api/data/forms/:formId
|
|
109
|
+
http.get('/api/data/forms/:formId/effective', ({ params, request }) => {
|
|
108
110
|
const formId = Array.isArray(params.formId) ? params.formId[0] : params.formId;
|
|
109
111
|
switch (formId) {
|
|
110
112
|
case 'customerUpdateForm':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evoke-platform/ui-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/published/index.js",
|
|
6
6
|
"module": "dist/published/index.js",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"yalc": "^1.0.0-pre.53"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@evoke-platform/context": "^1.8.0-
|
|
91
|
+
"@evoke-platform/context": "^1.8.0-dev.10",
|
|
92
92
|
"react": "^18.1.0",
|
|
93
93
|
"react-dom": "^18.1.0"
|
|
94
94
|
},
|