impaktapps-ui-builder 0.0.101-alpha.36 → 0.0.101-alpha.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.36",
3
+ "version": "0.0.101-alpha.38",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -45,7 +45,7 @@ const sectionLabels = {
45
45
 
46
46
  export function refreshPage (type: string, store: any) {
47
47
  const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
48
- const currentConfig = buildConfig(store.formData)
48
+ const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
49
49
  if (type) {
50
50
  const sectionUiSchema = {
51
51
  Core: CoreSection,
@@ -60,11 +60,15 @@ export function refreshPage (type: string, store: any) {
60
60
  UiSchema.elements[0].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Events", "Validation"];
61
61
  UiSchema.elements[0].elements = elements || [CoreSection, StyleSection, EventSection(store.theme.myTheme), ValidationSection];
62
62
  }
63
- //Get Widget Type of parent
63
+
64
+ // Get Widget Type of parent
64
65
  const path = store.searchParams?.get("path");
65
66
  const pathArrayAll = path.split(".");
66
67
 
67
- const parentObj = pathArrayAll.reduce((currObj, path)=>{
68
+ const parentObj = pathArrayAll.reduce((currObj, path, index)=>{
69
+ if(index === pathArrayAll.length - 1){
70
+ return currObj
71
+ }
68
72
  const currElemIndexWithBracket = path.split('[')[1];
69
73
  const currElemIndex = parseInt(currElemIndexWithBracket.slice(0,-1));
70
74
  console.log(currObj);