impaktapps-ui-builder 0.0.409 → 0.0.410
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/impaktapps-ui-builder.es.js +602 -218
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +12 -12
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDate.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.d.ts +0 -19
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +0 -6
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -2
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +3 -5
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +3 -7
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -3
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +8 -11
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +1 -11
- package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +6 -8
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +0 -6
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +23 -22
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +2 -9
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +5 -14
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -15
- package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +0 -20
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +4 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -10
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +212 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -8
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +274 -67
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +104 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +22 -5
- package/src/impaktapps-ui-builder/builder/services/event.ts +11 -10
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +22 -13
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +5 -12
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +1 -2
- package/src/impaktapps-ui-builder/runtime/services/service.ts +14 -24
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +0 -46
|
@@ -228,7 +228,7 @@ export const EventUiSchema: any = {
|
|
|
228
228
|
icon: "RejectIcon",
|
|
229
229
|
color: "error",
|
|
230
230
|
tooltipMessage: "Reject This Record",
|
|
231
|
-
onClick: "
|
|
231
|
+
onClick: "deletePopUpEvent",
|
|
232
232
|
},
|
|
233
233
|
},
|
|
234
234
|
},
|
|
@@ -238,6 +238,109 @@ export const EventUiSchema: any = {
|
|
|
238
238
|
}
|
|
239
239
|
],
|
|
240
240
|
},
|
|
241
|
+
{
|
|
242
|
+
type: "Control",
|
|
243
|
+
scope: "#/properties/popUpEvent",
|
|
244
|
+
options: {
|
|
245
|
+
widget: "PopUp"
|
|
246
|
+
},
|
|
247
|
+
config: {
|
|
248
|
+
layout: {
|
|
249
|
+
xs: 12,
|
|
250
|
+
sm: 12,
|
|
251
|
+
md: 12,
|
|
252
|
+
lg: 12,
|
|
253
|
+
},
|
|
254
|
+
style:{
|
|
255
|
+
width: "32%",
|
|
256
|
+
margin: "auto"
|
|
257
|
+
},
|
|
258
|
+
main: {
|
|
259
|
+
title: "Delete Content"
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
elements:
|
|
263
|
+
[
|
|
264
|
+
{
|
|
265
|
+
type: "Control",
|
|
266
|
+
scope: "#/properties/label",
|
|
267
|
+
options: {
|
|
268
|
+
widget: "Box",
|
|
269
|
+
},
|
|
270
|
+
config: {
|
|
271
|
+
layout: 12,
|
|
272
|
+
main: {
|
|
273
|
+
heading: "Are you sure you want to delete ?",
|
|
274
|
+
},
|
|
275
|
+
style:{
|
|
276
|
+
marginTop: "-25px",
|
|
277
|
+
marginLeft: "11px"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: "Control",
|
|
283
|
+
scope: "#/properties/EmptyBox",
|
|
284
|
+
options: {
|
|
285
|
+
widget: "EmptyBox",
|
|
286
|
+
},
|
|
287
|
+
config: {
|
|
288
|
+
main:{},
|
|
289
|
+
layout: { xs: 11, sm: 5.5, md: 4.5, lg: 4.5 },
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
type: "Control",
|
|
294
|
+
scope: "#/properties/ConfirmDeleteEventButton",
|
|
295
|
+
options: {
|
|
296
|
+
widget: "Button",
|
|
297
|
+
},
|
|
298
|
+
config: {
|
|
299
|
+
layout: 3,
|
|
300
|
+
main: {
|
|
301
|
+
name: "Yes",
|
|
302
|
+
endIcon: "DeleteIcon",
|
|
303
|
+
variant: "contained",
|
|
304
|
+
color: "info",
|
|
305
|
+
type: "text",
|
|
306
|
+
onClick: "deleteEvent",
|
|
307
|
+
size: "small",
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
type: "Control",
|
|
313
|
+
scope: "#/properties/CancelDeleteEventButton",
|
|
314
|
+
options: {
|
|
315
|
+
widget: "Button",
|
|
316
|
+
},
|
|
317
|
+
config: {
|
|
318
|
+
layout: 3,
|
|
319
|
+
main: {
|
|
320
|
+
name: "No",
|
|
321
|
+
endIcon: "CloseIcon",
|
|
322
|
+
variant: "contained",
|
|
323
|
+
color: "info",
|
|
324
|
+
type: "text",
|
|
325
|
+
onClick: "deletePopUpEvent",
|
|
326
|
+
size: "small",
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
type: "Control",
|
|
332
|
+
scope: "#/properties/EmptyBox",
|
|
333
|
+
options: {
|
|
334
|
+
widget: "EmptyBox",
|
|
335
|
+
},
|
|
336
|
+
config: {
|
|
337
|
+
main:{},
|
|
338
|
+
layout: 0.5,
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
|
|
241
344
|
{
|
|
242
345
|
type: "Control",
|
|
243
346
|
scope: "#/properties/proc",
|
|
@@ -36,7 +36,6 @@ const sectionLabels = {
|
|
|
36
36
|
PopUp: ["Core", "Components","Properties", "style"],
|
|
37
37
|
Stepper: ["Core", "Components","Properties","Event", "style"],
|
|
38
38
|
DataGrid: ["Core", "Components","Properties","Event", "style"],
|
|
39
|
-
InputSlider:["Core","Properties","style", "Event","Validation"],
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
|
|
@@ -105,20 +104,28 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
105
104
|
store.navigate(`/Component?path=${`elements[${rowId}]`}&id=${id}`)
|
|
106
105
|
}
|
|
107
106
|
},
|
|
108
|
-
deleteComponents: function () {
|
|
107
|
+
deleteComponents: function (shouldUpdateDialog: boolean = true) {
|
|
109
108
|
const path = store.searchParams?.get("path");
|
|
110
|
-
const rowId =
|
|
109
|
+
const rowId = localStorage.getItem('rowId');
|
|
111
110
|
store.formData.elements.splice(rowId, 1);
|
|
112
111
|
const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
|
|
113
112
|
const data = path ? _.get(response, path) : response;
|
|
114
113
|
store.setFormdata(data);
|
|
114
|
+
if(shouldUpdateDialog){
|
|
115
|
+
store.updateDialog("popUpComponentSection");
|
|
116
|
+
}
|
|
117
|
+
localStorage.removeItem('rowId');
|
|
115
118
|
},
|
|
116
|
-
deleteEvent: function () {
|
|
119
|
+
deleteEvent: function (shouldUpdateDialog: boolean = true) {
|
|
117
120
|
const path = store.searchParams?.get("path");
|
|
118
|
-
const rowId =
|
|
121
|
+
const rowId = localStorage.getItem('rowId');
|
|
119
122
|
store.formData.events.splice(rowId, 1);
|
|
120
123
|
const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
|
|
121
124
|
store.setFormdata(_.get(response, path));
|
|
125
|
+
if(shouldUpdateDialog){
|
|
126
|
+
store.updateDialog("popUpEventSection")
|
|
127
|
+
}
|
|
128
|
+
localStorage.removeItem('rowId');
|
|
122
129
|
},
|
|
123
130
|
widgetAddClickHandler: function () {
|
|
124
131
|
if (!Array.isArray(store.formData.elements)) {
|
|
@@ -153,6 +160,16 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
153
160
|
backHandler: function () {
|
|
154
161
|
store.navigate(-1)
|
|
155
162
|
},
|
|
163
|
+
deletePopUpComponent: function(){
|
|
164
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
165
|
+
localStorage.setItem('rowId',rowId);
|
|
166
|
+
store.updateDialog("popUpComponentSection");
|
|
167
|
+
},
|
|
168
|
+
deletePopUpEvent: function(){
|
|
169
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
170
|
+
localStorage.setItem('rowId',rowId);
|
|
171
|
+
store.updateDialog("popUpEventSection");
|
|
172
|
+
},
|
|
156
173
|
}
|
|
157
174
|
};
|
|
158
175
|
|
|
@@ -11,8 +11,7 @@ export default (
|
|
|
11
11
|
store: any,
|
|
12
12
|
dynamicData: any,
|
|
13
13
|
submitHandler: any,
|
|
14
|
-
service: any
|
|
15
|
-
functionsName?: { const: string, title: string }[]
|
|
14
|
+
service: any
|
|
16
15
|
) => {
|
|
17
16
|
return {
|
|
18
17
|
setPage: async function () {
|
|
@@ -48,12 +47,6 @@ export default (
|
|
|
48
47
|
schema.required = ["eventType", "Handler", "refreshElements"]
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
if (functionsName) {
|
|
52
|
-
schema.properties.inBuiltFunctionType.oneOf = [
|
|
53
|
-
...schema.properties.inBuiltFunctionType.oneOf,
|
|
54
|
-
...functionsName
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
50
|
store.setSchema(schema)
|
|
58
51
|
store.setUiSchema(uiSchema)
|
|
59
52
|
},
|
|
@@ -66,7 +59,7 @@ export default (
|
|
|
66
59
|
return EventSchema;
|
|
67
60
|
},
|
|
68
61
|
okHandler: () => okHandler(store),
|
|
69
|
-
saveHandler: async () => await saveHandler(store, service, submitHandler,
|
|
62
|
+
saveHandler: async () => await saveHandler(store, service, submitHandler,"PageMaster"),
|
|
70
63
|
onChange: function () {
|
|
71
64
|
if (
|
|
72
65
|
store?.formData?.Handler !== store?.newData?.Handler &&
|
|
@@ -96,9 +89,17 @@ export default (
|
|
|
96
89
|
this.setPage()
|
|
97
90
|
|
|
98
91
|
},
|
|
99
|
-
deleteEvent:
|
|
92
|
+
deleteEvent: async function () {
|
|
93
|
+
await Component(store, dynamicData, submitHandler, service).deleteEvent(false);
|
|
94
|
+
store.updateDialog("popUpEvent");
|
|
95
|
+
},
|
|
100
96
|
backHandler: function () {
|
|
101
97
|
store.navigate(-1)
|
|
102
98
|
},
|
|
99
|
+
deletePopUpEvent: function(){
|
|
100
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
101
|
+
localStorage.setItem('rowId',rowId);
|
|
102
|
+
store.updateDialog("popUpEvent");
|
|
103
|
+
}
|
|
103
104
|
}
|
|
104
105
|
};
|
|
@@ -49,20 +49,17 @@ export default (funcParams: funcParamsProps) => {
|
|
|
49
49
|
store.formData.elements = []
|
|
50
50
|
}
|
|
51
51
|
const response = saveFormdataInLocalStorage(store.ctx.core.data)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
);
|
|
56
|
-
}else{
|
|
57
|
-
store.navigate(
|
|
58
|
-
`/Component?path=${`elements[${response?.elements.length}]`}`
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
52
|
+
store.navigate(
|
|
53
|
+
`/Component?path=${`elements[${response?.elements.length}]`}&id=${id}`
|
|
54
|
+
);
|
|
62
55
|
},
|
|
63
|
-
saveHandler: async ()
|
|
56
|
+
saveHandler: async ()=> await saveHandler(store,service,submitHandler),
|
|
64
57
|
Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
|
|
65
|
-
|
|
58
|
+
|
|
59
|
+
Delete_Components: async function() {
|
|
60
|
+
await Component(store, dynamicData, submitHandler, service).deleteComponents(false);
|
|
61
|
+
store.updateDialog("popUpPageMasterComponent");
|
|
62
|
+
},
|
|
66
63
|
eventAddHandler: function () {
|
|
67
64
|
const id = store.searchParams?.get("id");
|
|
68
65
|
if (!Array.isArray(store.formData.events)) {
|
|
@@ -80,10 +77,22 @@ export default (funcParams: funcParamsProps) => {
|
|
|
80
77
|
store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
|
|
81
78
|
},
|
|
82
79
|
deleteEvent: function () {
|
|
83
|
-
const rowId =
|
|
80
|
+
const rowId = localStorage.getItem('rowId');
|
|
84
81
|
store.formData.events.splice(rowId, 1);
|
|
85
82
|
const response = saveFormdataInLocalStorage(store.ctx.core.data)
|
|
86
83
|
store.setFormdata(response);
|
|
84
|
+
store.updateDialog("popUpPageMasterEvent");
|
|
85
|
+
localStorage.removeItem('rowId');
|
|
86
|
+
},
|
|
87
|
+
deletePopUpComponent: function(){
|
|
88
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
89
|
+
localStorage.setItem('rowId',rowId);
|
|
90
|
+
store.updateDialog("popUpPageMasterComponent");
|
|
91
|
+
},
|
|
92
|
+
deletePopUpEvent: function(){
|
|
93
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
94
|
+
localStorage.setItem('rowId',rowId);
|
|
95
|
+
store.updateDialog("popUpPageMasterEvent");
|
|
87
96
|
},
|
|
88
97
|
}
|
|
89
98
|
};
|
|
@@ -65,7 +65,7 @@ export async function saveHandler(store, service, submitHandler, pageName?: stri
|
|
|
65
65
|
if (_.isEmpty(store.ctx.core.errors)) {
|
|
66
66
|
try {
|
|
67
67
|
const saveReturn = await submitHandler(store, service, config);
|
|
68
|
-
navigateHandler(store, true, pageName ? `/${pageName}?id=${
|
|
68
|
+
navigateHandler(store, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords")
|
|
69
69
|
} catch (err) {
|
|
70
70
|
navigateHandler(store, false)
|
|
71
71
|
}
|
|
@@ -86,10 +86,8 @@ async function executeInBuiltFunctionHandler(params: handlersProps) {
|
|
|
86
86
|
if (params.config.funcParametersCode) {
|
|
87
87
|
const makeFunc = eval(params.config.funcParametersCode)
|
|
88
88
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
89
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service)
|
|
90
|
-
} else {
|
|
91
|
-
params.serviceHolder[params.config.inBuiltFunctionType](params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service)
|
|
92
89
|
}
|
|
90
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter)
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
async function executeCustomHandler(params: handlersProps) {
|
|
@@ -133,14 +131,14 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
|
|
|
133
131
|
}
|
|
134
132
|
else {
|
|
135
133
|
if (handlerResponse) {
|
|
136
|
-
store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse
|
|
134
|
+
store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data } });
|
|
137
135
|
const demoData = await asyncOperation();
|
|
138
136
|
}
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
const buildBodyFormat = (body: any[], formData: any, userValue: any) => {
|
|
143
|
-
|
|
141
|
+
const finalBody = { ...userValue?.payload };
|
|
144
142
|
body.map((elem) => {
|
|
145
143
|
if (typeof elem?.value !== "string") {
|
|
146
144
|
finalBody[elem.key] = elem.value;
|
|
@@ -152,12 +150,7 @@ const buildBodyFormat = (body: any[], formData: any, userValue: any) => {
|
|
|
152
150
|
else if (elem?.value?.startsWith("$")) {
|
|
153
151
|
const finalpath = elem.value.substring(1);
|
|
154
152
|
finalBody[elem.key] = _.get(formData, finalpath);;
|
|
155
|
-
} else
|
|
156
|
-
finalBody = { ...finalBody, ...formData };
|
|
157
|
-
} else if (elem?.value === "*") {
|
|
158
|
-
finalBody[elem.key] = formData;
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
153
|
+
} else {
|
|
161
154
|
finalBody[elem.key] = elem.value;
|
|
162
155
|
}
|
|
163
156
|
}
|
|
@@ -220,7 +213,7 @@ export function getRefreshElements(eventConfig: any, eventGropus: any) {
|
|
|
220
213
|
}
|
|
221
214
|
|
|
222
215
|
|
|
223
|
-
|
|
216
|
+
function asyncOperation() {
|
|
224
217
|
return new Promise((resolve, reject) => {
|
|
225
218
|
setTimeout(() => {
|
|
226
219
|
const success = true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _, { isEmpty } from "lodash";
|
|
2
2
|
import { doDownload, downloadFile } from "./downloadFile";
|
|
3
|
-
import {
|
|
3
|
+
import { executeEvents, executeRefreshHandler } from "./events";
|
|
4
4
|
import { handlersProps } from "./interface";
|
|
5
5
|
let compType: string;
|
|
6
6
|
let eventGroups: any = {};
|
|
@@ -32,7 +32,7 @@ export const extractEvents = (eventConfig: any) => {
|
|
|
32
32
|
if (!(!!SuccessEvent) && event.eventType === "onLoad") {
|
|
33
33
|
event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
|
|
34
34
|
}
|
|
35
|
-
if (!(!!SuccessEvent) && (event.eventType === "onBack" || event.eventType === "onNext"
|
|
35
|
+
if (!(!!SuccessEvent) && (event.eventType === "onBack" || event.eventType === "onNext"|| event.eventType === "onReset")) {
|
|
36
36
|
event.events.push({ Handler: `${event.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
|
|
37
37
|
}
|
|
38
38
|
eventGroups[event.eventType][eventConfigObj.name].push({ ...event, type: compType })
|
|
@@ -55,7 +55,6 @@ interface funcParamsProps {
|
|
|
55
55
|
schema: any,
|
|
56
56
|
service: any,
|
|
57
57
|
userValue: any,
|
|
58
|
-
functionsProvider?: Record<string, any>
|
|
59
58
|
}
|
|
60
59
|
export default (funcParams: funcParamsProps) => {
|
|
61
60
|
eventGroups = {}
|
|
@@ -63,25 +62,16 @@ export default (funcParams: funcParamsProps) => {
|
|
|
63
62
|
let executeEventsParameters: handlersProps = {
|
|
64
63
|
config: {}, componentName: "",
|
|
65
64
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
66
|
-
serviceHolder: { downloadFile,
|
|
67
|
-
functionsProvider: funcParams.functionsProvider,
|
|
65
|
+
serviceHolder: { downloadFile,download:doDownload }, eventGroups
|
|
68
66
|
};
|
|
69
67
|
return {
|
|
70
68
|
setPage: async function () {
|
|
71
69
|
funcParams.store.setFormdata({});
|
|
72
|
-
const demoData = await asyncOperation();
|
|
73
70
|
executeEventsParameters = {
|
|
74
71
|
config: {}, componentName: "",
|
|
75
72
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
76
|
-
functionsProvider: funcParams.functionsProvider,
|
|
77
73
|
serviceHolder: this, eventGroups
|
|
78
74
|
}
|
|
79
|
-
await executeRefreshHandler({
|
|
80
|
-
config: {}, componentName: "",
|
|
81
|
-
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
82
|
-
serviceHolder: this, eventGroups
|
|
83
|
-
})
|
|
84
|
-
const demoData2 = await asyncOperation();
|
|
85
75
|
funcParams.store.setSchema(
|
|
86
76
|
(pre: any) => {
|
|
87
77
|
return {
|
|
@@ -92,13 +82,16 @@ export default (funcParams: funcParamsProps) => {
|
|
|
92
82
|
)
|
|
93
83
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
94
84
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
95
|
-
|
|
85
|
+
await executeRefreshHandler({
|
|
86
|
+
config: {}, componentName: "",
|
|
87
|
+
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
88
|
+
serviceHolder: this, eventGroups
|
|
89
|
+
})
|
|
96
90
|
},
|
|
97
91
|
onClick: async function () {
|
|
92
|
+
funcParams.dynamicData?.setLoading(true);
|
|
98
93
|
await this.callHandler("onClick")
|
|
99
|
-
|
|
100
|
-
onMount: async function () {
|
|
101
|
-
await this.callHandler("onMount")
|
|
94
|
+
funcParams.dynamicData?.setLoading(false);
|
|
102
95
|
},
|
|
103
96
|
onFileDownload: async function () {
|
|
104
97
|
await this.callHandler("onDownload")
|
|
@@ -106,9 +99,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
106
99
|
onFileUpload: async function () {
|
|
107
100
|
await this.callHandler("onUpload")
|
|
108
101
|
},
|
|
109
|
-
backHandler:function(){
|
|
110
|
-
funcParams.store.navigate(-1)
|
|
111
|
-
},
|
|
112
102
|
onPaginationChange: async function (paginationValues) {
|
|
113
103
|
const apiBody = [
|
|
114
104
|
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
@@ -126,12 +116,12 @@ export default (funcParams: funcParamsProps) => {
|
|
|
126
116
|
{ key: "searchValue", value: param.serachValue },
|
|
127
117
|
{ key: "currentValue", value: param.currentValue }
|
|
128
118
|
]
|
|
129
|
-
|
|
130
|
-
return response?.data;
|
|
119
|
+
return await this.updateConfigApiBody(param, apiBody)
|
|
131
120
|
}
|
|
132
121
|
},
|
|
133
122
|
onChange: async function () {
|
|
134
123
|
if (eventGroups.onChange) {
|
|
124
|
+
funcParams.dynamicData?.setLoading(true);
|
|
135
125
|
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|
|
136
126
|
Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {
|
|
137
127
|
if (
|
|
@@ -147,6 +137,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
147
137
|
}
|
|
148
138
|
}
|
|
149
139
|
}))
|
|
140
|
+
funcParams.dynamicData?.setLoading(false);
|
|
150
141
|
}
|
|
151
142
|
},
|
|
152
143
|
updateConfigApiBody: async function (paramValue, apiBody) {
|
|
@@ -205,8 +196,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
205
196
|
}
|
|
206
197
|
},
|
|
207
198
|
downloadFile: downloadFile,
|
|
208
|
-
download:
|
|
209
|
-
...funcParams.functionsProvider
|
|
199
|
+
download:doDownload,
|
|
210
200
|
};
|
|
211
201
|
};
|
|
212
202
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildInputSlider: (config: any, componentScope: any) => any;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import _ from "lodash";
|
|
3
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
-
const InputSlider = {
|
|
5
|
-
type: "Control",
|
|
6
|
-
scope: "#/properties/inputSlider",
|
|
7
|
-
options: {
|
|
8
|
-
widget: "InputSlider",
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
config: {
|
|
12
|
-
layout: 12,
|
|
13
|
-
main: {
|
|
14
|
-
limitToMax: false,
|
|
15
|
-
max: 10000,
|
|
16
|
-
step: 1000,
|
|
17
|
-
min: 0,
|
|
18
|
-
label: "Slider"
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export const buildInputSlider = (config, componentScope) => {
|
|
24
|
-
const inputSlider: any = _.cloneDeep(InputSlider);
|
|
25
|
-
inputSlider.scope = componentScope;
|
|
26
|
-
inputSlider.config.main.label = config.label
|
|
27
|
-
if (config.layout) {
|
|
28
|
-
inputSlider.config.layout = createLayoutFormat(config.layout)
|
|
29
|
-
}
|
|
30
|
-
if (config.limitToMax) {
|
|
31
|
-
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
32
|
-
}
|
|
33
|
-
if (config.max) {
|
|
34
|
-
inputSlider.config.main.max = config.max
|
|
35
|
-
}
|
|
36
|
-
if (config.step) {
|
|
37
|
-
inputSlider.config.main.step = config.step;
|
|
38
|
-
}
|
|
39
|
-
if (config.min) {
|
|
40
|
-
inputSlider.config.main.min = config.min;
|
|
41
|
-
}
|
|
42
|
-
if (config.style) {
|
|
43
|
-
inputSlider.config.main.defaultStyle = JSON.parse(config.style)
|
|
44
|
-
}
|
|
45
|
-
return inputSlider;
|
|
46
|
-
}
|