impaktapps-ui-builder 0.0.361 → 0.0.363
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 +37 -11
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +10 -10
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +4 -3
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -3
- package/src/impaktapps-ui-builder/runtime/services/events.ts +9 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +24 -7
|
@@ -17,9 +17,10 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
17
17
|
getSelectOptions: (param: any) => Promise<any>;
|
|
18
18
|
onChange: () => Promise<void>;
|
|
19
19
|
updateConfigApiBody: (paramValue: any, apiBody: any) => Promise<any>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
onBack: (functionParameters: any) => Promise<void>;
|
|
21
|
+
onNext: (functionParameters: any) => Promise<void>;
|
|
22
|
+
onReset: (functionParameters: any) => Promise<void>;
|
|
23
|
+
callHandler: (eventType: string, functionParameters?: any) => Promise<void>;
|
|
23
24
|
downloadFile: (obj: any) => void;
|
|
24
25
|
};
|
|
25
26
|
export default _default;
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ const PopUP = {
|
|
|
29
29
|
export const buildPopUp = (config,componentScope) =>{
|
|
30
30
|
const popup: any = _.cloneDeep(PopUP);
|
|
31
31
|
popup.scope = componentScope;
|
|
32
|
-
popup.config.main.
|
|
32
|
+
popup.config.main.title = config.label;
|
|
33
33
|
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
34
34
|
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
35
35
|
popup.config.main.maxWidth = config.maxWidth||false;
|
|
@@ -45,9 +45,8 @@ export const EventSchema = {
|
|
|
45
45
|
{ title: "onStart", const: "onStart" },
|
|
46
46
|
|
|
47
47
|
{ title: "File Upload Event", const: "onUpload" },
|
|
48
|
-
{ title: "
|
|
49
|
-
{ title: "
|
|
50
|
-
{ title: "Stepper Skip Event", const: "onStepperSkip" },
|
|
48
|
+
{ title: "Back Event", const: "onBack" },
|
|
49
|
+
{ title: "Next Event", const: "onNext" },
|
|
51
50
|
{ title: "File Download Event", const: "onDownload" },
|
|
52
51
|
{ title: "Fail", const: "Fail" }
|
|
53
52
|
]
|
|
@@ -47,6 +47,15 @@ async function executeEventsHandler(params: handlersProps) {
|
|
|
47
47
|
params.parentEventOutput, params.componentName, params.config, params.store, params.service)
|
|
48
48
|
return result;
|
|
49
49
|
}
|
|
50
|
+
else if (params.config.Handler === "onBackHandler") {
|
|
51
|
+
return params.store.functionParameters?.handleBack()
|
|
52
|
+
}
|
|
53
|
+
else if (params.config.Handler === "onNextHandler") {
|
|
54
|
+
return params.store.functionParameters?.handleNext()
|
|
55
|
+
}
|
|
56
|
+
else if (params.config.Handler === "onResetHandler") {
|
|
57
|
+
return params.store.functionParameters?.handleReset()
|
|
58
|
+
}
|
|
50
59
|
}
|
|
51
60
|
export async function executeRefreshHandler(params: handlersProps) {
|
|
52
61
|
const compToRefresh: string[] = getRefreshElements(params.config, params.eventGroups)
|
|
@@ -32,6 +32,9 @@ 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"|| event.eventType === "onReset")) {
|
|
36
|
+
event.events.push({ Handler: `${event.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
|
|
37
|
+
}
|
|
35
38
|
eventGroups[event.eventType][eventConfigObj.name].push({ ...event, type: compType })
|
|
36
39
|
});
|
|
37
40
|
}
|
|
@@ -154,18 +157,32 @@ export default (funcParams: funcParamsProps) => {
|
|
|
154
157
|
}
|
|
155
158
|
return LastCallResponse
|
|
156
159
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
onBack: async function (functionParameters) {
|
|
161
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
162
|
+
await this.callHandler("onBack", functionParameters)
|
|
163
|
+
if (eventGroups?.["onBack"]?.[path] === undefined) {
|
|
164
|
+
functionParameters?.handleBack()
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
onNext: async function (functionParameters) {
|
|
168
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
169
|
+
await this.callHandler("onNext", functionParameters)
|
|
170
|
+
if (eventGroups?.["onNext"]?.[path] === undefined) {
|
|
171
|
+
functionParameters?.handleNext()
|
|
172
|
+
}
|
|
160
173
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
174
|
+
onReset: async function (functionParameters) {
|
|
175
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
176
|
+
await this.callHandler("onReset", functionParameters)
|
|
177
|
+
if (eventGroups?.["onReset"]?.[path] === undefined) {
|
|
178
|
+
functionParameters?.handleReset()
|
|
179
|
+
}
|
|
164
180
|
},
|
|
165
|
-
callHandler: async function (eventType: string) {
|
|
181
|
+
callHandler: async function (eventType: string, functionParameters?: any) {
|
|
166
182
|
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
167
183
|
if (eventGroups?.[eventType]?.[path] !== undefined) {
|
|
168
184
|
for (const eventConfig of eventGroups?.[eventType]?.[path]) {
|
|
185
|
+
executeEventsParameters.store.functionParameters = functionParameters
|
|
169
186
|
await executeEvents({
|
|
170
187
|
...executeEventsParameters,
|
|
171
188
|
config: eventConfig,
|