impaktapps-ui-builder 0.0.101-alpha.68 → 0.0.101-alpha.69

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.68",
3
+ "version": "0.0.101-alpha.69",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -125,6 +125,35 @@ export default (
125
125
  );
126
126
  schema.properties.RemoveItemButton.disabled = false;
127
127
  }
128
+
129
+
130
+ const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
131
+ const path = store.searchParams?.get("path");
132
+ const id = store.searchParams?.get("id");
133
+
134
+ let pathArray = [];
135
+
136
+ if (path) {
137
+ const pathArrayAll = path.split(".");
138
+ const arr: any = [];
139
+ pathArrayAll.map((e: string, i: number) => {
140
+ if (i === 0) {
141
+ arr.push(e);
142
+ return;
143
+ }
144
+ arr.push(`${arr[i - 1]}.${e}`);
145
+ });
146
+
147
+ arr.map((e) => {
148
+ const data = _.get(config, e);
149
+ pathArray.push({
150
+ label: data?.name || data?.eventType || "NewComponent",
151
+ path: data?.eventType ? `/ComponentEvents?path=${e}&id=${id}` : `/Component?path=${e}&id=${id}`,
152
+ });
153
+ });
154
+ }
155
+ console.log("pathArray>>",pathArray)
156
+ schema.properties.pageName.path = pathArray;
128
157
  store.setSchema(schema);
129
158
  store.setUiSchema(uiSchema);
130
159
  },