impaktapps-ui-builder 1.0.3 → 1.0.41

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 (23) hide show
  1. package/dist/impaktapps-ui-builder.es.js +240 -200
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +7 -7
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  11. package/package.json +1 -1
  12. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +20 -15
  13. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
  14. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -6
  15. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  16. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +89 -128
  17. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +58 -119
  18. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  19. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  20. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  21. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +60 -118
  22. package/src/impaktapps-ui-builder/builder/services/component.ts +1 -1
  23. package/src/impaktapps-ui-builder/runtime/services/service.ts +7 -8
@@ -7,122 +7,67 @@ export const ValidationSection = {
7
7
  }
8
8
  },
9
9
  elements: [
10
- {
11
- type: "Control",
12
- scope: "#/properties/validation",
13
- layout: 11.5,
14
- options: {
15
- "elementLabelProp": "validationType",
16
- detail: {
17
- type: "HorizontalLayout",
18
- elements: [
19
- {
20
- type: "Control",
21
- scope: "#/properties/validationType",
22
-
23
- options: {
24
- widget: "SelectInputField",
25
- },
26
- config: {
27
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
28
- main: {
29
- label: "Validation Type",
30
- },
31
- },
32
- },
33
- {
34
- type: "Control",
35
- scope: "#/properties/validationValue",
36
-
37
- options: {
38
- widget: "InputField",
39
- },
40
- config: {
41
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
42
- main: {
43
- label: "Validation Value",
44
- },
45
- },
46
- },
47
- {
48
- type: "Control",
49
- scope: "#/properties/emptyBox",
50
- options: {
51
- widget: "EmptyBox"
52
- },
53
- config: {
54
- layout: {xs: 0, sm: 0, md: 4}
55
- }
56
- }
57
- ],
58
- },
10
+
11
+ {
12
+ type: "Control",
13
+ scope: "#/properties/validation",
14
+ config: {
15
+ layout: 12,
16
+ main: {
17
+ label: "Validation",
18
+ childElementLabel: "Validation",
59
19
  },
60
-
20
+ style: {
21
+ marginLeft: "-24px",
22
+ marginBottom: "24px !important",
23
+ labelStyle: {
24
+ marginLeft: "24px",
25
+ },
26
+ detailsStyle: {
27
+ marginLeft: "24px",
28
+ }
29
+ }
61
30
  },
31
+ elements: [
32
+ {
33
+ type: "Control",
34
+ scope: "#/properties/validationType",
35
+ options: {
36
+ widget: "SelectInputField",
37
+ },
38
+ config: {
39
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
40
+ main: {
41
+ label: "Validation Type",
42
+ },
43
+ },
44
+ },
45
+ {
46
+ type: "Control",
47
+ scope: "#/properties/validationValue",
62
48
 
63
- // {
64
- // type: "Control",
65
- // scope: "#/properties/validation",
66
- // options: {
67
- // widget: "Array",
68
- // },
69
- // config: {
70
- // layout: 12,
71
- // main: {
72
- // label: "Validation",
73
- // childElementLabel: "Validation",
74
- // },
75
- // style: {
76
- // marginLeft: "-24px",
77
- // marginBottom: "24px !important",
78
- // labelStyle: {
79
- // marginLeft: "24px",
80
- // },
81
- // detailsStyle: {
82
- // marginLeft: "24px",
83
- // }
84
- // }
85
- // },
86
- // elements: [
87
- // {
88
- // type: "Control",
89
- // scope: "#/properties/validationType",
90
- // options: {
91
- // widget: "SelectInputField",
92
- // },
93
- // config: {
94
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
95
- // main: {
96
- // label: "Validation Type",
97
- // },
98
- // },
99
- // },
100
- // {
101
- // type: "Control",
102
- // scope: "#/properties/validationValue",
103
-
104
- // options: {
105
- // widget: "InputField",
106
- // },
107
- // config: {
108
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
109
- // main: {
110
- // label: "Validation Value",
111
- // },
112
- // },
113
- // },
114
- // {
115
- // type: "Control",
116
- // scope: "#/properties/emptyBox",
117
- // options: {
118
- // widget: "EmptyBox"
119
- // },
120
- // config: {
121
- // layout: {xs: 0, sm: 0, md: 4, lg: 4}
122
- // }
123
- // }
124
- // ],
125
- // },
49
+ options: {
50
+ widget: "InputField",
51
+ },
52
+ config: {
53
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
54
+ main: {
55
+ label: "Validation Value",
56
+ },
57
+ },
58
+ },
59
+ {
60
+ type: "Control",
61
+ scope: "#/properties/emptyBox",
62
+ options: {
63
+ widget: "EmptyBox"
64
+ },
65
+ config: {
66
+ layout: {xs: 0, sm: 0, md: 4, lg: 4}
67
+ }
68
+ }
69
+ ],
70
+ },
126
71
 
127
72
  ]
128
73
  };
@@ -10,9 +10,6 @@ export const ValueTab = {
10
10
  {
11
11
  type: "Control",
12
12
  scope: "#/properties/value",
13
- options: {
14
- widget: "Array",
15
- },
16
13
  config: {
17
14
  layout: 12,
18
15
  main: {
@@ -100,129 +100,71 @@ export const componentBasicUiSchema: any = (theme) => {
100
100
  widget: "EmptyBox",
101
101
  },
102
102
  },
103
- // {
104
- // type: "Control",
105
- // scope: "#/properties/layout",
106
- // options: {
107
- // widget: "Array",
108
- // },
109
- // config: {
110
- // layout: 12,
111
- // main: {
112
- // label: "Layout",
113
- // childElementLabel: "Layout",
114
- // },
115
- // style: {
116
- // marginLeft: "-24px",
117
- // marginBottom: "24px !important",
118
- // labelStyle: {
119
- // marginLeft: "24px",
120
- // },
121
- // detailsStyle: {
122
- // marginLeft: "24px",
123
- // }
124
- // }
125
- // },
126
- // elements: [
127
- // {
128
- // type: "Control",
129
- // scope: "#/properties/key",
130
- // options: {
131
- // widget: "SelectInputField",
132
- // },
133
- // config: {
134
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
135
- // main: {
136
- // label: "Screen Size",
137
-
138
- // },
139
- // },
140
- // },
141
- // {
142
- // type: "Control",
143
- // scope: "#/properties/value",
144
-
145
- // options: {
146
- // widget: "InputField",
147
- // },
148
- // config: {
149
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
150
- // main: {
151
- // label: "Value",
152
- // type:"number",
153
- // helperText:'Number should be in range of 0 to 12',
154
- // errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
155
-
156
- // },
157
- // },
158
- // },
159
- // {
160
- // type: "Control",
161
- // scope: "#/properties/proc",
162
- // config: {
163
- // layout: { xs: 0, sm: 0, md: 4, lg: 4 },
164
- // },
165
- // options: {
166
- // widget: "EmptyBox",
167
- // },
168
- // },
169
- // ],
170
- // },
171
103
  {
172
- type: "Control",
173
- scope: "#/properties/layout",
104
+ type: "Control",
105
+ scope: "#/properties/layout",
106
+ config: {
174
107
  layout: 12,
175
- options: {
176
- detail: {
177
- type: "HorizontalLayout",
178
- elements: [
179
- {
180
- type: "Control",
181
- scope: "#/properties/key",
182
- options: {
183
- widget: "SelectInputField",
184
- },
185
- config: {
186
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
187
- main: {
188
- label: "Screen Size",
189
-
190
- },
191
- },
192
- },
193
- {
194
- type: "Control",
195
- scope: "#/properties/value",
196
-
197
- options: {
198
- widget: "InputField",
199
- },
200
- config: {
201
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
202
- main: {
203
- label: "Value",
204
- type: "number",
205
- // freeSolo:true,
206
- helperText: 'Number should be in range of 0 to 12',
207
- errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
108
+ main: {
109
+ label: "Layout",
110
+ childElementLabel: "Layout",
111
+ },
112
+ style: {
113
+ marginLeft: "-24px",
114
+ marginBottom: "24px !important",
115
+ labelStyle: {
116
+ marginLeft: "24px",
117
+ },
118
+ detailsStyle: {
119
+ marginLeft: "24px",
120
+ }
121
+ }
122
+ },
123
+ elements: [
124
+ {
125
+ type: "Control",
126
+ scope: "#/properties/key",
127
+ options: {
128
+ widget: "SelectInputField",
129
+ },
130
+ config: {
131
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
132
+ main: {
133
+ label: "Screen Size",
134
+
135
+ },
136
+ },
137
+ },
138
+ {
139
+ type: "Control",
140
+ scope: "#/properties/value",
208
141
 
209
- },
210
- },
211
- },
212
- {
213
- type: "Control",
214
- scope: "#/properties/proc",
215
- config: {
216
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
217
- },
218
- options: {
219
- widget: "EmptyBox",
220
- },
221
- },
222
- ],
142
+ options: {
143
+ widget: "InputField",
144
+ },
145
+ config: {
146
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
147
+ main: {
148
+ label: "Value",
149
+ type:"number",
150
+ helperText:'Number should be in range of 0 to 12',
151
+ errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
152
+
153
+ },
223
154
  },
224
155
  },
225
- },
156
+ {
157
+ type: "Control",
158
+ scope: "#/properties/proc",
159
+ config: {
160
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
161
+ },
162
+ options: {
163
+ widget: "EmptyBox",
164
+ },
165
+ },
166
+ ],
167
+ }
226
168
  ],
227
169
  },
228
170
  ],
@@ -29,7 +29,7 @@ const sectionLabels = {
29
29
  Timer: ["Core", "Events", "Style", "Validation"],
30
30
  Rank: ["Core", "Events", "Style", "Validation"],
31
31
  Button: ["Core", "Properties", "Events", "Style", "Validation"],
32
- Array: ["Core", "Components", "Validation"],
32
+ Array: ["Core", "Components", "Properties","Validation"],
33
33
  Radio: ["Core", "Properties", "Events", "Style", "Validation"],
34
34
  Text: ["Core", "Properties", "Events", "Style", "Validation"],
35
35
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
@@ -65,7 +65,7 @@ export default (funcParams: funcParamsProps) => {
65
65
  let executeEventsParameters: handlersProps = {
66
66
  config: {}, componentName: "",
67
67
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
68
- serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider },eventGroups,
68
+ serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider }, eventGroups,
69
69
  functionsProvider: funcParams.functionsProvider, formDataHolder
70
70
  };
71
71
  return {
@@ -190,19 +190,17 @@ export default (funcParams: funcParamsProps) => {
190
190
  }
191
191
  );
192
192
  const schema = pageData?.schema ?? { type: "object", properties: {} };
193
- const newEventGroups = extractEvents(config);
194
- console.log("newEventGroups", newEventGroups,eventGroups)
195
- eventGroups = newEventGroups;
193
+ eventGroups = extractEvents(config);
196
194
  executeEventsParameters = {
197
195
  config: {}, componentName: "",
198
196
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
199
197
  functionsProvider: funcParams.functionsProvider,
200
- serviceHolder: this, eventGroups: newEventGroups, formDataHolder
198
+ serviceHolder: this, eventGroups, formDataHolder
201
199
  }
202
200
  await executeRefreshHandler({
203
201
  config: {}, componentName: "",
204
202
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
205
- serviceHolder: this, eventGroups: newEventGroups, formDataHolder: {}
203
+ serviceHolder: this, eventGroups, formDataHolder: {}
206
204
  })
207
205
  funcParams.store.setSchema(
208
206
  (pre: any) => {
@@ -262,7 +260,7 @@ export default (funcParams: funcParamsProps) => {
262
260
  { key: "size", value: paginationValues.pagination.pageSize },
263
261
  { key: "pageIndex", value: paginationValues.pagination.pageIndex },
264
262
  { key: "sorting", value: paginationValues.sorting || [] },
265
- { key: "filters", value: paginationValues.tableColumnConfig|| [] },
263
+ { key: "filters", value: paginationValues.tableColumnConfig || [] },
266
264
  { key: "globalFilter", value: paginationValues.globalFilter ?? '' }
267
265
  ]
268
266
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
@@ -299,7 +297,8 @@ export default (funcParams: funcParamsProps) => {
299
297
  },
300
298
  callExecuteEvents: async function (paramValue, apiBody, eventType: string) {
301
299
  let LastCallResponse = undefined;
302
- for (const eventConfig of eventGroups?.[eventType]?.[paramValue.path]) {
300
+ const cloneEventGroup = _.cloneDeep(eventGroups)
301
+ for (const eventConfig of cloneEventGroup?.[eventType]?.[paramValue.path]) {
303
302
  if (eventConfig.body) {
304
303
  eventConfig.body = [
305
304
  ...eventConfig.body,