impaktapps-ui-builder 0.0.396 → 0.0.398

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