impaktapps-ui-builder 0.0.101-alpha.42 → 0.0.101-alpha.44

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.42",
3
+ "version": "0.0.101-alpha.44",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -9,7 +9,6 @@ import { TableSection } from "../build/uischema/tableSection";
9
9
  import { ValueTab } from "../build/uischema/valueTab";
10
10
  import { ValidationSection } from "../build/uischema/validationSections";
11
11
  import { getFormdataFromSessionStorage, okHandler, saveFormdataInSessionStorage, saveHandler } from "./utils";
12
- import buildConfig from "../build/buildConfig";
13
12
  const sectionLabels = {
14
13
  Select: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
15
14
  MultipleSelect: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
@@ -63,16 +62,21 @@ export function refreshPage (type: string, store: any) {
63
62
 
64
63
  // Get Widget Type of parent
65
64
  const path = store.searchParams?.get("path");
66
- const pathArrayAll = path.split(".");
67
65
 
68
- const parentObj = pathArrayAll.reduce((currObj, path, index)=>{
69
- if(index === pathArrayAll.length - 1){
70
- return currObj
71
- }
72
- const currElemIndexWithBracket = path.split('[')[1];
73
- const currElemIndex = parseInt(currElemIndexWithBracket.slice(0,-1));
74
- return currObj?.["elements"]?.[currElemIndex]
75
- }, currentConfig)
66
+ const parentObj = _.get(currentConfig, path)
67
+
68
+ console.log("currentConfig", currentConfig);
69
+ console.log("path", path);
70
+ console.log("parentObj", parentObj)
71
+
72
+ // const parentObj = pathArrayAll.reduce((currObj, path, index)=>{
73
+ // if(index === pathArrayAll.length - 1){
74
+ // return currObj
75
+ // }
76
+ // const currElemIndexWithBracket = path.split('[')[1];
77
+ // const currElemIndex = parseInt(currElemIndexWithBracket.slice(0,-1));
78
+ // return currObj?.["elements"]?.[currElemIndex]
79
+ // }, currentConfig)
76
80
  if(parentObj?.type === "Table"){
77
81
  UiSchema.elements[0].elements[0].elements[4] =
78
82
  {
@@ -88,7 +92,8 @@ export function refreshPage (type: string, store: any) {
88
92
 
89
93
  },
90
94
  },
91
- };UiSchema.elements[0].elements[0].elements[5] =
95
+ };
96
+ UiSchema.elements[0].elements[0].elements[5] =
92
97
  {
93
98
  type: "Control",
94
99
  scope: "#/properties/filteringOptions",