impaktapps-ui-builder 0.0.409-c → 0.0.409-f
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 +11 -3
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +1 -2
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +8 -3
|
@@ -3,11 +3,10 @@ interface funcParamsProps {
|
|
|
3
3
|
dynamicData: any;
|
|
4
4
|
submitHandler: any;
|
|
5
5
|
service: any;
|
|
6
|
-
config?: any;
|
|
7
6
|
}
|
|
8
7
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
9
8
|
setPage: () => Promise<void>;
|
|
10
|
-
getFormdata: () => any
|
|
9
|
+
getFormdata: () => Promise<any>;
|
|
11
10
|
getUiSchema: () => any;
|
|
12
11
|
getSchema: () => {
|
|
13
12
|
type: string;
|
package/package.json
CHANGED
|
@@ -11,10 +11,9 @@ interface funcParamsProps {
|
|
|
11
11
|
|
|
12
12
|
submitHandler: any,
|
|
13
13
|
service: any
|
|
14
|
-
config?: any
|
|
15
14
|
}
|
|
16
15
|
export default (funcParams: funcParamsProps) => {
|
|
17
|
-
const { store, dynamicData,
|
|
16
|
+
const { store, dynamicData, submitHandler, service } = funcParams
|
|
18
17
|
return {
|
|
19
18
|
setPage: async function () {
|
|
20
19
|
const formdata = await this.getFormdata();
|
|
@@ -24,8 +23,14 @@ export default (funcParams: funcParamsProps) => {
|
|
|
24
23
|
store.setSchema(schema);
|
|
25
24
|
store.setUiSchema(uiSchema);
|
|
26
25
|
},
|
|
27
|
-
getFormdata: function () {
|
|
26
|
+
getFormdata: async function () {
|
|
28
27
|
const id = store.searchParams?.get("id");
|
|
28
|
+
let config: any = {};
|
|
29
|
+
if (id) {
|
|
30
|
+
await service.get(`/page/getById?id=${id}`).then((res: any) => {
|
|
31
|
+
config = res.data?.config;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
29
34
|
const formData = getFormdataFromLocalStorage()
|
|
30
35
|
if (formData) {
|
|
31
36
|
return formData;
|