impaktapps-ui-builder 0.0.297 → 0.0.298

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 (33) hide show
  1. package/dist/impaktapps-ui-builder.es.js +2781 -2735
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +11 -11
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildButton.d.ts +1 -27
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +0 -4
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +25 -18
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +19 -2
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +28 -1
  10. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +9 -0
  11. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +1 -0
  12. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +1 -0
  13. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +9 -0
  14. package/package.json +1 -1
  15. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +11 -2
  16. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +9 -9
  17. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +9 -1
  18. package/src/impaktapps-ui-builder/builder/build/buildText.ts +1 -1
  19. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +25 -8
  20. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -2
  21. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +6 -10
  22. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +9 -19
  23. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +19 -0
  24. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +1 -1
  25. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +52 -1
  26. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +101 -64
  27. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +5 -36
  28. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +11 -1
  29. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +5 -31
  30. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +72 -69
  31. package/src/impaktapps-ui-builder/builder/services/component.ts +12 -5
  32. package/src/impaktapps-ui-builder/builder/services/event.ts +12 -4
  33. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +23 -15
@@ -1,40 +1,39 @@
1
- export const ComponentSchema:any = {
1
+ export const ComponentSchema: any = {
2
2
  type: "object",
3
3
  properties: {
4
- type:{
5
- type:"string",
6
- oneOf:[
7
- { title: "Select", const: "Select" },
8
- { title: "Date", const: "Date" },
9
- { title: "CheckBox", const: "CheckBox" },
10
- { title: "Table", const: "Table" },
11
- { title: "Lazy Loading Table", const: "LazyLoadingTable" },
12
- { title: "Array", const: "Array" },
13
- { title: "Container", const: "WrapperSection" },
14
- { title: "Tabs", const: "TabSection" },
15
- { title: "Text", const: "Text" },
16
- { title: "Text Area", const: "TextArea" },
17
- { title: "Button", const: "Button" },
18
- { title: "Card", const: "card" },
19
- { title: "Radio", const: "Radio" },
20
- { title: "Rank", const: "Rank" },
21
- { title: "SpeedoMeter", const: "SpeedoMeter" },
22
- { title: "ProgressBar", const: "ProgressBar" },
23
- { title: "Graph", const: "Graph" },
24
- { title: "Label", const: "Box" },
25
- { title: "Upload File", const: "UploadFile" },
26
- { title: "Download File", const: "DownloadFile" },
27
- { title: "Empty Box", const: "EmptyBox" },
28
- { title: "ProgressBar Card", const: "ProgressBarCard" },
29
- { title: "Rank Card", const: "RankCard" },
30
- { title: "Runner Boy Progress Bar", const: "RunnerBoyProgressBar" },
31
- { title: "Slider", const: "Slider" },
32
- { title: "Timer", const: "Timer" },
33
- { title: "MultipleSelect", const: "MultipleSelect" },
34
- { title: "LeaderBoard", const: "LeaderBoard" },]
35
- },
36
- method:{
37
- type:"string",
4
+ type: {
5
+ type: "string",
6
+ oneOf: [
7
+ { title: "Array", const: "Array" },
8
+ { title: "Button", const: "Button" },
9
+ { title: "Card", const: "card" },
10
+ { title: "CheckBox", const: "CheckBox" },
11
+ { title: "Container", const: "WrapperSection" },
12
+ { title: "Date", const: "Date" },
13
+ { title: "Download File", const: "DownloadFile" },
14
+ { title: "Empty Box", const: "EmptyBox" },
15
+ { title: "Graph", const: "Graph" },
16
+ { title: "Label", const: "Box" },
17
+ { title: "LeaderBoard", const: "LeaderBoard" },
18
+ { title: "MultipleSelect", const: "MultipleSelect" },
19
+ { title: "ProgressBar", const: "ProgressBar" },
20
+ { title: "ProgressBar Card", const: "ProgressBarCard" },
21
+ { title: "Select", const: "Select" },
22
+ { title: "Slider", const: "Slider" },
23
+ { title: "SpeedoMeter", const: "SpeedoMeter" },
24
+ { title: "Radio", const: "Radio" },
25
+ { title: "Rank", const: "Rank" },
26
+ { title: "Rank Card", const: "RankCard" },
27
+ { title: "Runner Boy Progress Bar", const: "RunnerBoyProgressBar" },
28
+ { title: "Table", const: "Table" },
29
+ { title: "Tabs", const: "TabSection" },
30
+ { title: "Text", const: "Text" },
31
+ { title: "Text Area", const: "TextArea" },
32
+ { title: "Timer", const: "Timer" },
33
+ { title: "Upload File", const: "UploadFile" },]
34
+ },
35
+ method: {
36
+ type: "string",
38
37
  oneOf: [
39
38
  { title: "Get", const: "get" },
40
39
  { title: "Post", const: "post" },
@@ -49,7 +48,7 @@ export const ComponentSchema:any = {
49
48
  properties: {
50
49
  key: {
51
50
  type: "string",
52
- oneOf:[
51
+ oneOf: [
53
52
  { title: "Extra Small", const: "xs" },
54
53
  { title: "Small", const: "sm" },
55
54
  { title: "Medium", const: "md" },
@@ -57,7 +56,8 @@ export const ComponentSchema:any = {
57
56
  ],
58
57
  },
59
58
  value: {
60
- type: "string",
59
+ // type: "string",
60
+
61
61
  },
62
62
  },
63
63
  },
@@ -98,7 +98,7 @@ export const ComponentSchema:any = {
98
98
  items: {
99
99
  type: "object",
100
100
  properties: {
101
- eventType: {
101
+ eventType: {
102
102
  type: "string",
103
103
  },
104
104
  configType: {
@@ -115,7 +115,7 @@ export const ComponentSchema:any = {
115
115
  label: {
116
116
  type: "string",
117
117
  },
118
-
118
+
119
119
  },
120
120
  },
121
121
  },
@@ -127,7 +127,7 @@ export const ComponentSchema:any = {
127
127
  label: {
128
128
  type: "string",
129
129
  },
130
-
130
+
131
131
  },
132
132
  },
133
133
  },
@@ -139,7 +139,7 @@ export const ComponentSchema:any = {
139
139
  label: {
140
140
  type: "string",
141
141
  },
142
-
142
+
143
143
  },
144
144
  },
145
145
  },
@@ -150,16 +150,16 @@ export const ComponentSchema:any = {
150
150
  properties: {
151
151
  componentName: {
152
152
  type: "string",
153
-
153
+
154
154
  },
155
- validationType:{
156
- type: "string",
157
- oneOf:[
158
- { const: "required", title: "Required" },
159
- { const: "minLength", title: "Minimum Length" },
160
- { const: "maxLength", title: "Maximum Length" },
161
- { const: "pattern", title: "Pattern" },
162
- ]
155
+ validationType: {
156
+ type: "string",
157
+ oneOf: [
158
+ { const: "required", title: "Required" },
159
+ { const: "minLength", title: "Minimum Length" },
160
+ { const: "maxLength", title: "Maximum Length" },
161
+ { const: "pattern", title: "Pattern" },
162
+ ]
163
163
  },
164
164
  validationValue: {
165
165
  type: "string",
@@ -167,31 +167,68 @@ export const ComponentSchema:any = {
167
167
  },
168
168
  },
169
169
  },
170
- buttonType:{
171
- type:"string",
172
- oneOf:[
173
- { title: "Button With Text", const: "Button" },
174
- { title: "Button With Icon", const: "IconButton" },
175
- { title: "Button With Icon and Text", const: "ButtonWithIconAndText" },
170
+ buttonType: {
171
+ type: "string",
172
+ oneOf: [
173
+ { title: "Button", const: "Button" },
174
+ { title: "IconButton", const: "IconButton" },
175
+ { title: "HybridButton", const: "ButtonWithIconAndText" },
176
176
  ]
177
177
  },
178
- defaultStyle:{
179
- type:"string",
180
- oneOf:[
178
+ defaultStyle: {
179
+ type: "string",
180
+ oneOf: [
181
181
  { title: "Apply Default Style", const: "true" },
182
182
  { title: "No Style", const: "false" },
183
183
  ]
184
184
  },
185
- graphType:{
186
- type:"string",
187
- oneOf:[
185
+ graphType: {
186
+ type: "string",
187
+ oneOf: [
188
188
  { title: "Bar Graph", const: "BarGraph" },
189
189
  { title: "Stack Bar Graph", const: "StackBarGraph" },
190
190
  { title: "Line Graph", const: "LineGraph" },
191
191
  { title: "Pie Graph", const: "PieGraph" },
192
192
  { title: "Horizontal Bar Graph", const: "HorizontalBarGraph" },
193
193
  ]
194
- }
194
+ },
195
+ iconName:{
196
+ type:"string",
197
+ oneOf:[
198
+ { title: "Search Icon", const: "SearchIcon" },
199
+ { title: "Edit Icon", const: "EditIcon" },
200
+ { title: "Add Icon", const: "AddIcon" },
201
+ { title: "Send Icon", const: "SendIcon" },
202
+ { title: "Approve Icon", const: "ApproveIcon" },
203
+ { title: "RejectIcon", const: "RejectIcon" },
204
+ { title: "Back Icon", const: "BackIcon" },
205
+ { title: "Back Icon Second ", const: "BackIcon2" },
206
+ { title: "Pending Icon", const: "PendingIcon" },
207
+ { title: "View Icon", const: "ViewIcon" },
208
+ { title: "Notification Icon", const: "NotificationIcon" },
209
+ { title: "Person Icon", const: "PersonIcon" },
210
+ { title: "Report Icon", const: "ReportIcon" },
211
+ { title: "Error Icon", const: "ErrorIcon" },
212
+ { title: "Refresh Icon", const: "RefreshIcon" },
213
+ { title: "Download Icon", const: "DownloadIcon" },
214
+ { title: "Exception Icon", const: "ExceptionIcon" },
215
+ ]
216
+ },
217
+ color:{
218
+ type:"string",
219
+ oneOf: [
220
+ { title: "Primary", const: "primary" },
221
+ { title: "Secondary", const: "secondary" },
222
+ { title: "Error", const: "error" },
223
+ { title: "Success", const: "success" },
224
+ { title: "Info", const: "info" },
225
+ ]
226
+ },
227
+ name: {
228
+ type: "string",
229
+ },
230
+ label: { type: 'string' }
195
231
  },
196
-
232
+
233
+ required: ["type", "name", "label"]
197
234
  };
@@ -101,36 +101,6 @@ export const componentBasicUiSchema: any = {
101
101
  layout: { xs: 12, sm: 12, md: 6, lg: 6 },
102
102
  main: {
103
103
  label: "Type",
104
- options: [
105
- { label: "Select", value: "Select" },
106
- { label: "Date", value: "Date" },
107
- { label: "CheckBox", value: "CheckBox" },
108
- { label: "Table", value: "Table" },
109
- { label: "Lazy Loading Table", value: "LazyLoadingTable" },
110
- { label: "Array", value: "Array" },
111
- { label: "Container", value: "WrapperSection" },
112
- { label: "Tabs", value: "TabSection" },
113
- { label: "Text", value: "Text" },
114
- { label: "Radio", value: "Radio" },
115
- { label: "Text Area", value: "TextArea" },
116
- { label: "Button", value: "Button" },
117
- { label: "Card", value: "card" },
118
- { label: "Rank", value: "Rank" },
119
- { label: "SpeedoMeter", value: "SpeedoMeter" },
120
- { label: "ProgressBar", value: "ProgressBar" },
121
- { label: "Graph", value: "Graph" },
122
- { label: "Label", value: "Box" },
123
- { label: "Upload File", value: "UploadFile" },
124
- { label: "Download File", value: "DownloadFile" },
125
- { label: "Empty Box", value: "EmptyBox" },
126
- { label: "ProgressBar Card", value: "ProgressBarCard" },
127
- { label: "Rank Card", value: "RankCard" },
128
- { label: "Runner Boy Progress Bar", value: "RunnerBoyProgressBar" },
129
- { label: "Slider", value: "Slider" },
130
- { label: "Timer", value: "Timer" },
131
- { label: "MultipleSelect", value: "MultipleSelect" },
132
- { label: "LeaderBoard", value: "LeaderBoard" }
133
- ],
134
104
  },
135
105
  },
136
106
  },
@@ -232,12 +202,11 @@ export const componentBasicUiSchema: any = {
232
202
  },
233
203
  main: {
234
204
  label: "Value",
235
- options: [
236
- { label: "3", value: "3" },
237
- { label: "5.5", value: "5.5" },
238
- { label: "8", value: "8" },
239
- { label: "12", value: "12" },
240
- ],
205
+ type:"number",
206
+ // freeSolo:true,
207
+ helperText:'Number should be in range of 0 to 12',
208
+ errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
209
+
241
210
  },
242
211
  },
243
212
  },
@@ -1,6 +1,14 @@
1
1
  export const PageMasterSchema = {
2
2
  type: "object",
3
3
  properties: {
4
+ name:{
5
+ type:"string",
6
+ minLength: 6,
7
+ pattern: '^page_\\w+$'
8
+ },
9
+ label:{
10
+ type:"string",
11
+ },
4
12
  layout: {
5
13
  type: "array",
6
14
  items: {
@@ -26,4 +34,6 @@ export const PageMasterSchema = {
26
34
  },
27
35
  },
28
36
  }
29
- }}
37
+ },
38
+ required:["label","name"]
39
+ }
@@ -72,24 +72,8 @@ export const PageMasterUiSchema: any = {
72
72
  label: "Name",
73
73
  options: [],
74
74
  color: "secondary",
75
- required: true,
76
- },
77
- },
78
- },
79
- {
80
- type: "Control",
81
- scope: "#/properties/template",
82
-
83
- options: {
84
- widget: "SelectInputField",
85
- },
86
- config: {
87
- layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
88
- main: {
89
- label: "Template",
90
- programType: true,
91
- options: [{ label: "Basic Template", value: 1 }],
92
-
75
+ errorMessage:"Name should be start with 'page_'",
76
+ helperText:'Name should be start with "page_"',
93
77
  required: true,
94
78
  },
95
79
  },
@@ -110,17 +94,7 @@ export const PageMasterUiSchema: any = {
110
94
  required: true,
111
95
  },
112
96
  },
113
- },
114
- {
115
- type: "Control",
116
- scope: "#/properties/proc",
117
- config: {
118
- layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
119
- },
120
- options: {
121
- widget: "EmptyBox",
122
- },
123
- },
97
+ }
124
98
  ],
125
99
  },
126
100
  {
@@ -178,7 +152,7 @@ export const PageMasterUiSchema: any = {
178
152
  styleDefault: true,
179
153
  size: "small",
180
154
  onClick: "onAddClickHandler",
181
- tooltipMessage: "Back",
155
+ tooltipMessage: "Add New",
182
156
  },
183
157
  style: {
184
158
  float: "right",
@@ -224,7 +198,7 @@ export const PageMasterUiSchema: any = {
224
198
  icon: "EditIcon",
225
199
  color: "primary",
226
200
  onClick: "Edit_Components",
227
- tooltipMessage: "Reject This Record",
201
+ tooltipMessage: "Edit This Record",
228
202
  },
229
203
  },
230
204
  },
@@ -1,78 +1,81 @@
1
1
  export const EventSchema = {
2
- type: "object",
3
- properties: {
4
- headers: {
5
- type: "array",
6
- items: {
7
- type: "object",
8
- properties: {
9
- headers_key: {
10
- type: "string",
11
- },
12
- headers_value: {
13
- type: "string",
2
+ type: "object",
3
+ properties: {
4
+ headers: {
5
+ type: "array",
6
+ items: {
7
+ type: "object",
8
+ properties: {
9
+ headers_key: {
10
+ type: "string",
11
+ },
12
+ headers_value: {
13
+ type: "string",
14
+ },
14
15
  },
15
16
  },
16
17
  },
17
- },
18
- method:{
19
- type:"string",
20
- oneOf: [
21
- { title: "Get", const: "get" },
22
- { title: "Post", const: "post" },
23
- { title: "Delete", const: "delete" },
24
- { title: "Put", const: "put" },
25
- ]
26
- },
27
- refreshElements: {
28
- type: "array",
29
- items: {
30
- type: "object",
31
- properties: {
32
- value: {
33
- type: "string",
18
+ method: {
19
+ type: "string",
20
+ oneOf: [
21
+ { title: "Get", const: "get" },
22
+ { title: "Post", const: "post" },
23
+ { title: "Delete", const: "delete" },
24
+ { title: "Put", const: "put" },
25
+ ]
26
+ },
27
+ refreshElements: {
28
+ type: "array",
29
+ items: {
30
+ type: "object",
31
+ properties: {
32
+ value: {
33
+ type: "string",
34
+ },
34
35
  },
35
36
  },
36
37
  },
37
- },
38
- eventType:{
39
- type:"string",
40
- oneOf:[
41
- { title: "Click Event", const: "onClick" },
42
- { title: "onStart", const: "onStart" },
43
- { title: "Load Event", const: "onLoad" },
44
- { title: "Change Event", const: "onChange" },
45
- { title: "Success", const: "Success" },
46
- { title: "Fail", const: "Fail" }
47
- ]
48
- },
49
- Handler:{
50
- type:"string",
51
- oneOf:[
52
- { title: "Custom", const: "custom" },
53
- { title: "Api", const: "api" },
54
- { title: "Inbuilt Function", const: "inBuiltFunction" },
55
- { title: "Refresh", const: "refresh" },
56
- ]
57
- },
58
- inBuiltFunctionType:{
59
- type:"string",
60
- oneOf:[
61
- { title: "RankProvider", const: "RankProvider" },
62
- { title: "Download File", const: "downloadFile" },
63
- ]
64
- },
65
- body: {
66
- type: "array",
67
- items: {
68
- type: "object",
69
- properties: {
70
- body_key: {
71
- type: "string",
72
- },
73
- body_value: {
74
- type: "string",
38
+ eventType: {
39
+ type: "string",
40
+ oneOf: [
41
+ { title: "Click Event", const: "onClick" },
42
+ { title: "onStart", const: "onStart" },
43
+ { title: "Load Event", const: "onLoad" },
44
+ { title: "Change Event", const: "onChange" },
45
+ { title: "Success", const: "Success" },
46
+ { title: "Fail", const: "Fail" }
47
+ ]
48
+ },
49
+ Handler: {
50
+ type: "string",
51
+ oneOf: [
52
+ { title: "Custom", const: "custom" },
53
+ { title: "Api", const: "api" },
54
+ { title: "Inbuilt Function", const: "inBuiltFunction" },
55
+ { title: "Refresh", const: "refresh" },
56
+ ]
57
+ },
58
+ inBuiltFunctionType: {
59
+ type: "string",
60
+ oneOf: [
61
+ { title: "RankProvider", const: "RankProvider" },
62
+ { title: "Download File", const: "downloadFile" },
63
+ ]
64
+ },
65
+ body: {
66
+ type: "array",
67
+ items: {
68
+ type: "object",
69
+ properties: {
70
+ body_key: {
71
+ type: "string",
72
+ },
73
+ body_value: {
74
+ type: "string",
75
+ },
75
76
  },
76
77
  },
77
- },
78
- }}}
78
+ }
79
+ },
80
+ required:["eventType","Handler"]
81
+ }
@@ -13,7 +13,6 @@ const sectionLabels = {
13
13
  Select: ["Core", "Properties","Value", "style", "Event","Validation"],
14
14
  MultipleSelect: ["Core", "Properties","Value", "style", "Event","Validation"],
15
15
  Table: ["Core", "Components", "Properties","style", "Event","Validation"],
16
- LazyLoadingTable:["Core", "Components", "Properties", "style", "Event","Validation"],
17
16
  LeaderBoard: ["Core", "Components", "Properties", "style", "Event","Validation"],
18
17
  WrapperSection: ["Core", "Components","Properties", "style","Validation"],
19
18
  TabSection: ["Core", "Components", "Properties", "style","Validation"],
@@ -26,9 +25,9 @@ const sectionLabels = {
26
25
  Properties: ["Core", "Properties", "style", "Event","Validation"],
27
26
  ProgressBarCard: ["Core", "Properties", "style", "Event","Validation"],
28
27
  RankCard: ["Core", "Properties", "style", "Event","Validation"],
29
- Slider: ["Core", "Components","Properties", "style", "Event","Validation"],
30
- Timer: ["Core", "Properties", "style", "Event","Validation"],
31
- Rank: ["Core", "Properties", "style", "Event","Validation"],
28
+ Slider: ["Core", "Components", "style", "Event","Validation"],
29
+ Timer: ["Core", "style", "Event","Validation"],
30
+ Rank: ["Core","style", "Event","Validation"],
32
31
  Button: ["Core", "Properties", "style", "Event","Validation"],
33
32
  Array:["Core","Components","Validation"],
34
33
  Radio:["Core", "Properties", "style", "Event","Validation"],
@@ -76,12 +75,20 @@ export default (store: any, dynamicData: any) => {
76
75
  },
77
76
  saveHandler: async function () {
78
77
  const path = store.searchParams?.get("path");
79
- saveFormdataInLocalStorage(store.formData,path)
78
+ if (_.isEmpty(store.ctx.core.errors)) {
79
+ saveFormdataInLocalStorage(store.formData,path)
80
80
  store.navigate(-1)
81
81
  store.setNotify({
82
82
  SuccessMessage: "Save Successfully",
83
83
  Success: true,
84
84
  });
85
+ } else {
86
+ store.setValidation("ValidateAndShow");
87
+ store.setNotify({
88
+ Fail:true,
89
+ FailMessage:"Errors on Page"
90
+ })
91
+ }
85
92
  },
86
93
  onChange: function () {
87
94
  if (
@@ -20,23 +20,31 @@ export default (
20
20
  this.refreshPage(formdata.Handler,store)
21
21
  },
22
22
  refreshPage: (handlerType: any, store: any) => {
23
- const uiSchema = _.cloneDeep(EventUiSchema)
23
+ const uiSchema = _.cloneDeep(EventUiSchema);
24
+ const schema:any = _.cloneDeep(EventSchema)
24
25
  if (handlerType) {
25
26
  if (handlerType === "custom") {
26
27
  uiSchema.elements[1].elements[0].elements[2] = getTextArea("eventCode", "Write Custom Code", false)
28
+ schema.required = ["eventType","Handler","eventCode"]
29
+
27
30
  } else if (handlerType === "api") {
28
31
  uiSchema.elements[1].elements[0].elements[2] = APISection;
29
-
32
+ schema.required = ["eventType","Handler","method","path"]
30
33
  } else if (handlerType === "inBuiltFunction") {
31
34
  uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
32
35
  { label: "RankProvider", value: "RankProvider" },
33
36
  { label: "Download File", value: "downloadFile" },
34
37
  ])
35
- uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 })
38
+ uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 });
39
+ schema.required = ["eventType","Handler","inBuiltFunctionType"]
36
40
  } else if (handlerType === "refresh") {
37
- uiSchema.elements[1].elements[0].elements[2] = refreshSectionUiSchema
41
+ uiSchema.elements[1].elements[0].elements[2] = refreshSectionUiSchema;
42
+ schema.properties.refreshElements.required = ["value"]
43
+ schema.properties.refreshElements.items.required = ["value"]
44
+ schema.required = ["eventType","Handler","refreshElements"]
38
45
  }
39
46
  }
47
+ store.setSchema(schema)
40
48
  store.setUiSchema(uiSchema)
41
49
  },
42
50