impaktapps-ui-builder 0.0.412-mtreemap.9 → 0.0.591

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.
Files changed (53) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1082 -351
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +13 -13
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +1 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +2 -2
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +18 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +1 -6
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +10 -12
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +2 -2
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/file.d.ts +6 -6
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +5 -0
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +58 -45
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +25 -1
  17. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -2
  18. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -1
  19. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +3 -1
  20. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -1
  21. package/package.json +1 -1
  22. package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +1 -1
  23. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +5 -5
  24. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +1 -1
  25. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
  26. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  27. package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +0 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +1 -5
  29. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +17 -1
  30. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +3 -2
  32. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +78 -33
  33. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +2 -7
  34. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +88 -90
  35. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +10 -0
  36. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +3 -3
  37. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +6 -55
  38. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -12
  39. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +6 -118
  40. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +82 -72
  41. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +5 -7
  42. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +93 -137
  43. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -2
  44. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +206 -74
  45. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +195 -120
  46. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -0
  47. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +118 -128
  48. package/src/impaktapps-ui-builder/builder/services/component.ts +26 -9
  49. package/src/impaktapps-ui-builder/builder/services/event.ts +17 -9
  50. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +18 -2
  51. package/src/impaktapps-ui-builder/builder/services/utils.ts +0 -1
  52. package/src/impaktapps-ui-builder/runtime/services/events.ts +14 -20
  53. package/src/impaktapps-ui-builder/runtime/services/service.ts +128 -9
@@ -5,79 +5,26 @@ export const EventUiSchema: any = (theme) => {
5
5
  type: "HorizontalLayout",
6
6
  heading: "Component",
7
7
  elements: [
8
- // {
9
- // type: "WrapperLayout",
10
- // config: {
11
- // main: {
12
- // rowSpacing: 1,
13
- // header: true
14
- // },
15
- // defaultStyle: true
16
- // },
17
- // elements: [
18
- // {
19
- // type: "Control",
20
- // scope: "#/properties/Component",
21
-
22
- // options: {
23
- // widget: "Box",
24
- // },
25
- // config: {
26
- // layout: {xs:12,sm:12,md:2},
27
- // main: {
28
- // heading: "Component",
29
- // },
30
- // style:{
31
- // "float":"left",
32
- // }
33
- // },
34
- // },
35
-
36
- // {
37
- // type: "Control",
38
- // scope: "#/properties/pageName",
39
-
40
- // options: {
41
- // widget: "Box",
42
- // },
43
- // config: {
44
- // layout: {xs:7,sm:7,md:9},
45
- // main: {
46
- // heading: " ",
47
- // },
48
- // style: {
49
- // float: "right",
50
- // width:"auto",
51
- // fontSize:"12px",
52
- // color:"gray",
53
- // paddingTop:"10px"
54
- // },
55
- // },
56
- // },
57
-
58
- // {
59
- // type: "Control",
60
- // scope: "#/properties/Back_Button",
61
-
62
- // options: {
63
- // widget: "IconButton",
64
- // },
65
- // config: {
66
- // layout: {xs:2,sm:2,md:0.5},
67
- // main: {
68
- // icon: "BackIcon",
69
- // styleDefault: true,
70
- // size: "small",
71
- // onClick: "backHandler",
72
- // tooltipMessage: "Back",
73
- // },
74
- // style: {
75
- // float: "right",
76
- // },
77
- // },
78
- // },
79
- // ],
80
- // },
8
+ {
9
+ type: "Control",
10
+ scope: "#/properties/pageName",
11
+
12
+ options: {
13
+ widget: "Box",
14
+ },
15
+ config: {
16
+ layout: 12,
17
+ main: {
18
+ heading: " ",
19
+ },
20
+ style: {
21
+ marginLeft: theme.spacing(3),
22
+ width:"auto",
23
+ fontSize:"12px",
24
+ color:"gray",
25
+ },
26
+ },
27
+ },
81
28
  {
82
29
  type: "TabLayout",
83
30
  config: {
@@ -126,59 +73,6 @@ export const EventUiSchema: any = (theme) => {
126
73
  },
127
74
  ],
128
75
  },
129
- // {
130
- // type: "WrapperLayout",
131
- // config: {
132
- // main: {
133
- // // label: "Success Case Event",
134
- // // divider: true,
135
- // },
136
- // wrapperStyle: {
137
- // border: "1px solid gray"
138
- // },
139
- // },
140
- // elements: [
141
- // {
142
- // type: "Control",
143
- // scope: "#/properties/heading",
144
-
145
- // options: {
146
- // widget: "Box",
147
- // },
148
- // config: {
149
- // layout: 8,
150
- // main: {
151
- // heading: "Response Event",
152
- // },
153
- // style: {
154
- // fontFamily: "Roboto",
155
- // fontWeight: "500",
156
- // paddingLeft: "-10px",
157
- // fontSize: "20px",
158
- // },
159
- // },
160
- // },
161
- // {
162
- // type: "Control",
163
- // scope: "#/properties/AddButton",
164
- // options: {
165
- // widget: "IconButton",
166
- // },
167
- // config: {
168
- // layout: 3,
169
- // main: {
170
- // icon: "AddIcon",
171
- // styleDefault: true,
172
- // size: "small",
173
- // onClick: "addEvent",
174
- // tooltipMessage: "Back",
175
- // },
176
- // style: {
177
- // float: "right",
178
- // },
179
- // },
180
- // },
181
-
182
76
  {
183
77
  type: "Control",
184
78
  scope: "#/properties/events",
@@ -248,7 +142,7 @@ export const EventUiSchema: any = (theme) => {
248
142
  onClick: "editEvent",
249
143
  },
250
144
  style: {
251
- color: "#3949ab",
145
+ color: theme.palette.primary.main,
252
146
  },
253
147
  },
254
148
  },
@@ -267,7 +161,7 @@ export const EventUiSchema: any = (theme) => {
267
161
  icon: "RejectIcon",
268
162
  color: "error",
269
163
  tooltipMessage: "Reject This Record",
270
- onClick: "deleteEvent",
164
+ onClick: "deletePopUpEvent",
271
165
  },
272
166
  },
273
167
  },
@@ -343,6 +237,102 @@ export const EventUiSchema: any = (theme) => {
343
237
  },
344
238
  },
345
239
  },
240
+ {
241
+ type: "Control",
242
+ scope: "#/properties/popUpEvent",
243
+ options: {
244
+ widget: "PopUp"
245
+ },
246
+ config: {
247
+ layout: {
248
+ xs: 12,
249
+ sm: 12,
250
+ md: 6,
251
+ lg: 6,
252
+ },
253
+ main: {
254
+ },
255
+ style: {
256
+ "& .MuiPaper-root":{
257
+ width: '30%',
258
+ },
259
+ "& .MuiTypography-root":{
260
+ padding: 0
261
+ },
262
+ wrapperStyle: {
263
+ width: { xs: "100%", sm: "100%", md: "98%" },
264
+ }
265
+ }
266
+ },
267
+ elements:
268
+ [
269
+ {
270
+ type: "Control",
271
+ scope: "#/properties/label",
272
+ options: {
273
+ widget: "Box",
274
+ },
275
+ config: {
276
+ layout: 12,
277
+ main: {
278
+ heading: "Are you sure you want to delete ?",
279
+ },
280
+ style: {
281
+ marginTop: "-40px"
282
+ }
283
+ },
284
+ },
285
+ {
286
+ type: "Control",
287
+ scope: "#/properties/EmptyBox",
288
+ options: {
289
+ widget: "EmptyBox",
290
+ },
291
+ config: {
292
+ main: {},
293
+ layout: { xs: 11, sm: 5.5, md: 5.5, lg: 5.5 },
294
+ },
295
+ },
296
+ {
297
+ type: "Control",
298
+ scope: "#/properties/ConfirmDeleteEventButton",
299
+ options: {
300
+ widget: "Button",
301
+ },
302
+ config: {
303
+ layout: 3,
304
+ main: {
305
+ name: "Yes",
306
+ startIcon: "ApproveIcon",
307
+ variant: "contained",
308
+ color: "error",
309
+ type: "text",
310
+ onClick: "deleteEvent",
311
+ size: "small",
312
+ },
313
+ },
314
+ },
315
+ {
316
+ type: "Control",
317
+ scope: "#/properties/CancelDeleteEventButton",
318
+ options: {
319
+ widget: "Button",
320
+ },
321
+ config: {
322
+ layout: 3,
323
+ main: {
324
+ name: "No",
325
+ startIcon: "ApproveIcon",
326
+ variant: "contained",
327
+ color: "info",
328
+ type: "text",
329
+ onClick: "deletePopUpEvent",
330
+ size: "small",
331
+ },
332
+ },
333
+ },
334
+ ]
335
+ },
346
336
  {
347
337
  type: "Control",
348
338
  scope: "#/properties/notify",
@@ -50,15 +50,14 @@ export const refreshPage = (type: string, store: any) => {
50
50
  Core: CoreSection,
51
51
  Value: ValueTab,
52
52
  Style: StyleSection,
53
- Event: EventSection,
54
- Components: TableSection,
53
+ Event: EventSection(store.theme.myTheme),
54
+ Components: TableSection(store.theme.myTheme),
55
55
  Properties: buildPropertiesSection(type),
56
56
  Validation: ValidationSection
57
-
58
57
  }
59
58
  const elements = sectionLabels[type]?.map(e => sectionUiSchema[e]);
60
- UiSchema.elements[0].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
61
- UiSchema.elements[0].elements = elements || [CoreSection, StyleSection, EventSection, ValidationSection];
59
+ UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
60
+ UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store.theme.myTheme), ValidationSection];
62
61
 
63
62
  }
64
63
  store.setUiSchema(UiSchema);
@@ -107,20 +106,28 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
107
106
  store.navigate(`/Component?path=${`elements[${rowId}]`}&id=${id}`)
108
107
  }
109
108
  },
110
- deleteComponents: function () {
109
+ deleteComponents: function (shouldUpdateDialog: boolean = true) {
111
110
  const path = store.searchParams?.get("path");
112
- const rowId = dynamicData.path.split(".")[1];
111
+ const rowId = localStorage.getItem('rowId');
113
112
  store.formData.elements.splice(rowId, 1);
114
113
  const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
115
114
  const data = path ? _.get(response, path) : response;
116
115
  store.setFormdata(data);
116
+ if (shouldUpdateDialog) {
117
+ store.updateDialog("popUpComponentSection");
118
+ }
119
+ localStorage.removeItem('rowId');
117
120
  },
118
- deleteEvent: function () {
121
+ deleteEvent: function (shouldUpdateDialog: boolean = true) {
119
122
  const path = store.searchParams?.get("path");
120
- const rowId = dynamicData.path.split(".")[1];
123
+ const rowId = localStorage.getItem('rowId');
121
124
  store.formData.events.splice(rowId, 1);
122
125
  const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
123
126
  store.setFormdata(_.get(response, path));
127
+ if (shouldUpdateDialog) {
128
+ store.updateDialog("popUpEventSection")
129
+ }
130
+ localStorage.removeItem('rowId');
124
131
  },
125
132
  widgetAddClickHandler: function () {
126
133
  if (!Array.isArray(store.formData.elements)) {
@@ -155,6 +162,16 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
155
162
  backHandler: function () {
156
163
  store.navigate(-1)
157
164
  },
165
+ deletePopUpComponent: function () {
166
+ const rowId = dynamicData.path.split(".")[1];
167
+ localStorage.setItem('rowId', rowId);
168
+ store.updateDialog("popUpComponentSection");
169
+ },
170
+ deletePopUpEvent: function () {
171
+ const rowId = dynamicData.path.split(".")[1];
172
+ localStorage.setItem('rowId', rowId);
173
+ store.updateDialog("popUpEventSection");
174
+ },
158
175
  }
159
176
  };
160
177
 
@@ -28,26 +28,26 @@ export default (
28
28
  const schema: any = _.cloneDeep(EventSchema)
29
29
  if (handlerType) {
30
30
  if (handlerType === "custom") {
31
- uiSchema.elements[0].elements[0].elements[2] = getRadioInputField("isSync","Run in Sync",["Yes","No"])
31
+ uiSchema.elements[1].elements[0].elements[2] = getRadioInputField("isSync","Run in Sync",["Yes","No"])
32
32
  // uiSchema.elements[0].elements[0].elements[3] = emptyBox;
33
- uiSchema.elements[0].elements[0].elements[3] = getTextArea("eventCode", "Write Custom Code", false)
33
+ uiSchema.elements[1].elements[0].elements[3] = getTextArea("eventCode", "Write Custom Code", false)
34
34
  schema.required = ["eventType", "Handler", "eventCode"]
35
35
 
36
36
  } else if (handlerType === "api") {
37
- uiSchema.elements[0].elements[0].elements[2] = emptyBox;
38
- uiSchema.elements[0].elements[0].elements[3] = APISection;
37
+ uiSchema.elements[1].elements[0].elements[2] = emptyBox;
38
+ uiSchema.elements[1].elements[0].elements[3] = APISection;
39
39
  schema.required = ["eventType", "Handler", "method", "path"]
40
40
  } else if (handlerType === "inBuiltFunction") {
41
- uiSchema.elements[0].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
41
+ uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
42
42
  { label: "RankProvider", value: "RankProvider" },
43
43
  { label: "Download File", value: "downloadFile" },
44
44
  { label: "Download Blob File", value: "downloadBlobFile" }
45
45
  ])
46
- uiSchema.elements[0].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true);
46
+ uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true);
47
47
  schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
48
48
  } else if (handlerType === "refresh") {
49
- uiSchema.elements[0].elements[0].elements[2] = emptyBox;
50
- uiSchema.elements[0].elements[0].elements[3] = refreshSectionUiSchema;
49
+ uiSchema.elements[1].elements[0].elements[2] = emptyBox;
50
+ uiSchema.elements[1].elements[0].elements[3] = refreshSectionUiSchema;
51
51
  schema.properties.refreshElements.required = ["value"]
52
52
  schema.properties.refreshElements.items.required = ["value"]
53
53
  schema.required = ["eventType", "Handler", "refreshElements"]
@@ -101,9 +101,17 @@ export default (
101
101
  this.setPage()
102
102
 
103
103
  },
104
- deleteEvent: Component(store, dynamicData, submitHandler, service).deleteEvent,
104
+ deleteEvent: async function () {
105
+ await Component(store, dynamicData, submitHandler, service).deleteEvent(false);
106
+ store.updateDialog("popUpEvent");
107
+ },
105
108
  backHandler: function () {
106
109
  store.navigate(-1)
107
110
  },
111
+ deletePopUpEvent: function(){
112
+ const rowId = dynamicData.path.split(".")[1];
113
+ localStorage.setItem('rowId',rowId);
114
+ store.updateDialog("popUpEvent");
115
+ }
108
116
  }
109
117
  };
@@ -62,7 +62,11 @@ export default (funcParams: funcParamsProps) => {
62
62
  },
63
63
  saveHandler: async () => await saveHandler(store, service, submitHandler),
64
64
  Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
65
- Delete_Components: Component(store, dynamicData, submitHandler, service).deleteComponents,
65
+
66
+ Delete_Components: async function() {
67
+ await Component(store, dynamicData, submitHandler, service).deleteComponents(false);
68
+ store.updateDialog("popUpPageMasterComponent");
69
+ },
66
70
  eventAddHandler: function () {
67
71
  const id = store.searchParams?.get("id");
68
72
  if (!Array.isArray(store.formData.events)) {
@@ -80,10 +84,22 @@ export default (funcParams: funcParamsProps) => {
80
84
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
81
85
  },
82
86
  deleteEvent: function () {
83
- const rowId = dynamicData.path.split(".")[1];
87
+ const rowId = localStorage.getItem('rowId');
84
88
  store.formData.events.splice(rowId, 1);
85
89
  const response = saveFormdataInLocalStorage(store.ctx.core.data)
86
90
  store.setFormdata(response);
91
+ store.updateDialog("popUpPageMasterEvent");
92
+ localStorage.removeItem('rowId');
93
+ },
94
+ deletePopUpComponent: function(){
95
+ const rowId = dynamicData.path.split(".")[1];
96
+ localStorage.setItem('rowId',rowId);
97
+ store.updateDialog("popUpPageMasterComponent");
98
+ },
99
+ deletePopUpEvent: function(){
100
+ const rowId = dynamicData.path.split(".")[1];
101
+ localStorage.setItem('rowId',rowId);
102
+ store.updateDialog("popUpPageMasterEvent");
87
103
  },
88
104
  }
89
105
  };
@@ -91,7 +91,6 @@ export const navigateHandler = (store, isSubmitted, pageName?: string | boolean)
91
91
 
92
92
  export function okHandler(store) {
93
93
  const path = store.searchParams?.get("path");
94
- console.log(store.ctx.core.errors)
95
94
  if (_.isEmpty(store.ctx.core.errors)) {
96
95
  saveFormdataInLocalStorage(store.ctx.core.data, path)
97
96
  store.navigate(-1)
@@ -93,35 +93,20 @@ export function getRefreshElements(eventConfig: any, eventGropus: any) {
93
93
  result.push(result[0]);
94
94
  }
95
95
  }
96
- console.log(result);
97
96
  return result;
98
97
  }
99
98
  export async function executeRefreshHandler(params: handlersProps) {
100
99
  const compToRefresh: string[] = getRefreshElements(params.config, params.eventGroups);
101
-
102
- // Create an array of promises for the components to refresh
103
100
  return Promise.allSettled(compToRefresh.map(componentName => {
104
101
  const eventConfigs = params.eventGroups.onLoad[componentName];
105
-
106
- // If eventConfigs is undefined, return a resolved promise
107
102
  if (!eventConfigs) {
108
- return Promise.resolve(); // Resolve immediately if there are no events to load
103
+ return Promise.resolve();
109
104
  }
110
-
111
- // Create an array of promises for the defined eventConfigs
112
105
  return Promise.allSettled(eventConfigs.map(compEventConfig => {
113
106
  return executeEvents({ ...params, config: compEventConfig, componentName });
114
107
  }));
115
108
  }));
116
109
  }
117
- // export function executeRefreshHandler(params: handlersProps) {
118
- // const compToRefresh: string[] = getRefreshElements(params.config, params.eventGroups);
119
- // return Promise.all(compToRefresh.map(componentName => {
120
- // return Promise.all(params.eventGroups.onLoad[componentName].map(compEventConfig => {
121
- // return executeEvents({ ...params, config: compEventConfig, componentName });
122
- // }));
123
- // }))
124
- // };
125
110
  export function executeApiRequest(params: any) {
126
111
  const initialBody = { ...params.userValue?.payload };
127
112
  const initialHeaders = {
@@ -200,13 +185,13 @@ function mergeFormdata(handlerResponse: any, componentName: string, eventConfig:
200
185
  }
201
186
  else {
202
187
  if (handlerResponse) {
203
- formDataHolder[componentName] = eventConfig.lazyLoading ? handlerResponse?.data?.data : handlerResponse.data
188
+ formDataHolder[componentName] = handlerResponse.data
204
189
  store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
205
190
  }
206
191
  }
207
192
  }
208
193
 
209
- const buildBodyFormat = (body: any[], formData: any, userValue: any) => {
194
+ const buildBodyFormat = (body: any[], formData: any, userValue: any, store: any) => {
210
195
  let finalBody = { ...userValue?.payload };
211
196
  body.map((elem) => {
212
197
  if (typeof elem?.value !== "string") {
@@ -215,6 +200,15 @@ const buildBodyFormat = (body: any[], formData: any, userValue: any) => {
215
200
  if (elem?.value?.startsWith("$userValue")) {
216
201
  const finalpath = elem.value.substring(11);
217
202
  finalBody[elem.key] = _.get(userValue, finalpath);;
203
+ } else if (elem?.value?.startsWith("$urlParams")) {
204
+ const finalpath = elem.value.substring(11);
205
+ const value = store?.searchParams?.get(finalpath);
206
+ finalBody[elem.key] = value;
207
+ }
208
+ else if (elem?.value?.startsWith("$local")) {
209
+ const finalpath = elem.value.substring(7);
210
+ const value = JSON.parse(localStorage.getItem(finalpath) || '""')
211
+ finalBody[elem.key] = value;
218
212
  }
219
213
  else if (elem?.value?.startsWith("$")) {
220
214
  const finalpath = elem.value.substring(1);
@@ -269,7 +263,7 @@ export function buildApiPayload(compConfig: any, body: any, headers: any, store:
269
263
  headers = buildHeadersFormat(compConfig.headers);
270
264
  }
271
265
  if (compConfig.body) {
272
- body = { ...buildBodyFormat(compConfig.body, store.newData || store?.ctx?.core?.data || store.formData, userValue) };
266
+ body = { ...buildBodyFormat(compConfig.body, store.newData || store?.ctx?.core?.data || store.formData, userValue, store) };
273
267
  }
274
268
  const promiseChain = { body, headers };
275
269
  if (compConfig.apiBody) {
@@ -288,4 +282,4 @@ export function asyncOperation() {
288
282
  }
289
283
  }, 50);
290
284
  });
291
- }
285
+ }