impaktapps-ui-builder 0.0.397 → 0.0.399

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.
@@ -1,4 +1,4 @@
1
- declare const _default: (store: any, dynamicData: any, submitHandler: any, service: any, functionsName: {
1
+ declare const _default: (store: any, dynamicData: any, submitHandler: any, service: any, functionsName?: {
2
2
  const: string;
3
3
  title: string;
4
4
  }[]) => {
@@ -8,4 +8,5 @@ export interface handlersProps {
8
8
  serviceHolder: any;
9
9
  eventGroups?: any;
10
10
  parentEventOutput?: any;
11
+ functionsProvider?: Record<string, any>;
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.397",
3
+ "version": "0.0.399",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -12,7 +12,7 @@ export default (
12
12
  dynamicData: any,
13
13
  submitHandler: any,
14
14
  service: any,
15
- functionsName:{const:string,title:string}[]
15
+ functionsName?: { const: string, title: string }[]
16
16
  ) => {
17
17
  return {
18
18
  setPage: async function () {
@@ -48,12 +48,10 @@ export default (
48
48
  schema.required = ["eventType", "Handler", "refreshElements"]
49
49
  }
50
50
  }
51
- if(functionsName){
52
- schema.inBuiltFunctionType.oneOf = [
53
- schema.properties.inBuiltFunctionType.oneOf = [
54
- ...schema.properties.inBuiltFunctionType.oneOf,
55
- ...functionsName
56
- ]
51
+ if (functionsName) {
52
+ schema.properties.inBuiltFunctionType.oneOf = [
53
+ ...schema.properties.inBuiltFunctionType.oneOf,
54
+ ...functionsName
57
55
  ]
58
56
  }
59
57
  store.setSchema(schema)
@@ -68,7 +66,7 @@ export default (
68
66
  return EventSchema;
69
67
  },
70
68
  okHandler: () => okHandler(store),
71
- saveHandler: async () => await saveHandler(store, service, submitHandler,"PageMaster"),
69
+ saveHandler: async () => await saveHandler(store, service, submitHandler, "PageMaster"),
72
70
  onChange: function () {
73
71
  if (
74
72
  store?.formData?.Handler !== store?.newData?.Handler &&
@@ -7,5 +7,6 @@ export interface handlersProps {
7
7
  service: any,
8
8
  serviceHolder: any,
9
9
  eventGroups?: any,
10
- parentEventOutput?: any
10
+ parentEventOutput?: any,
11
+ functionsProvider?:Record<string,any>
11
12
  }
@@ -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"|| event.eventType === "onReset")) {
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,7 @@ interface funcParamsProps {
55
55
  schema: any,
56
56
  service: any,
57
57
  userValue: any,
58
- functionsProvider?:Record<string,any>
58
+ functionsProvider?: Record<string, any>
59
59
  }
60
60
  export default (funcParams: funcParamsProps) => {
61
61
  eventGroups = {}
@@ -63,7 +63,8 @@ export default (funcParams: funcParamsProps) => {
63
63
  let executeEventsParameters: handlersProps = {
64
64
  config: {}, componentName: "",
65
65
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
66
- serviceHolder: { downloadFile ,download:doDownload}, eventGroups
66
+ serviceHolder: { downloadFile, download: doDownload }, eventGroups,
67
+ functionsProvider: funcParams.functionsProvider,
67
68
  };
68
69
  return {
69
70
  setPage: async function () {
@@ -71,6 +72,7 @@ export default (funcParams: funcParamsProps) => {
71
72
  executeEventsParameters = {
72
73
  config: {}, componentName: "",
73
74
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
75
+ functionsProvider: funcParams.functionsProvider,
74
76
  serviceHolder: this, eventGroups
75
77
  }
76
78
  funcParams.store.setSchema(
@@ -196,7 +198,7 @@ export default (funcParams: funcParamsProps) => {
196
198
  }
197
199
  },
198
200
  downloadFile: downloadFile,
199
- download:doDownload,
201
+ download: doDownload,
200
202
  ...funcParams.functionsProvider
201
203
  };
202
204
  };