impaktapps-ui-builder 1.0.320 → 1.0.321
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 +235 -35
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +25 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +11 -7
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +0 -2
- package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +25 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +12 -5
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +39 -8
- package/src/impaktapps-ui-builder/runtime/services/service.ts +23 -2
|
@@ -16,7 +16,7 @@ const sectionLabels = {
|
|
|
16
16
|
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style",],
|
|
17
17
|
WrapperSection: ["Core", "Components", "Properties", "Style",],
|
|
18
18
|
HorizontalLayout: ["Core", "Components", "Properties", "Style",],
|
|
19
|
-
TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
19
|
+
TabSection: ["Core", "Components", "TabTitles", "Properties", "Style", "Validation"],
|
|
20
20
|
SpeedoMeter: ["Core", "Properties", "Events", "Style",],
|
|
21
21
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
22
22
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
@@ -37,8 +37,9 @@ const sectionLabels = {
|
|
|
37
37
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
38
38
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
39
39
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
40
|
-
PopUp: ["Core", "Components", "Properties", "Style"],
|
|
40
|
+
PopUp: ["Core", "Components", "Properties", "Events", "Style"],
|
|
41
41
|
PopOver: ["Core", "Components", "Properties", "Style"],
|
|
42
|
+
PdfViewer: ["Core", "Properties", "Style"],
|
|
42
43
|
Stepper: ["Core", "Components", "Properties", "Events", "Style"],
|
|
43
44
|
DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
|
|
44
45
|
InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -52,7 +53,6 @@ const sectionLabels = {
|
|
|
52
53
|
Camera: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
53
54
|
OTP_Input: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
54
55
|
}
|
|
55
|
-
|
|
56
56
|
export function refreshPage(type: string, store: any) {
|
|
57
57
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
|
|
58
58
|
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
@@ -63,6 +63,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
63
63
|
Style: StyleSection,
|
|
64
64
|
Events: EventSection(store.theme.myTheme),
|
|
65
65
|
Components: TableSection(store.theme.myTheme),
|
|
66
|
+
TabTitles: TableSection(store.theme.myTheme, "tabLabelElements"),
|
|
66
67
|
Properties: buildPropertiesSection(type),
|
|
67
68
|
Validation: ValidationSection
|
|
68
69
|
}
|
|
@@ -283,8 +284,12 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
283
284
|
const id = store.searchParams?.get("id");
|
|
284
285
|
saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
285
286
|
if (path) {
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
let finalPath = `${path}`;
|
|
288
|
+
if (dynamicData?.path?.startsWith("tabLabel")) {
|
|
289
|
+
finalPath = `${finalPath}.tabLabelElements[${rowId}]`
|
|
290
|
+
} else {
|
|
291
|
+
finalPath = `${finalPath}.elements[${rowId}]`
|
|
292
|
+
}
|
|
288
293
|
store.searchParams.set("path", finalPath)
|
|
289
294
|
store.setSearchParams(store.searchParams)
|
|
290
295
|
this.setPage()
|
|
@@ -295,7 +300,12 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
295
300
|
deleteComponents: function (shouldUpdateDialog: boolean = true) {
|
|
296
301
|
const path = store.searchParams?.get("path");
|
|
297
302
|
const rowId = sessionStorage.getItem('rowId');
|
|
298
|
-
|
|
303
|
+
const isTabLabelElements = sessionStorage.getItem('isTabLabelElements') === "true";
|
|
304
|
+
if (isTabLabelElements) {
|
|
305
|
+
store.formData.tabLabelElements.splice(rowId, 1);
|
|
306
|
+
} else {
|
|
307
|
+
store.formData.elements.splice(rowId, 1);
|
|
308
|
+
}
|
|
299
309
|
const response = saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
300
310
|
const data = path ? _.get(response, path) : response;
|
|
301
311
|
store.setFormdata(data);
|
|
@@ -303,6 +313,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
303
313
|
store.updateDialog("popUpComponentSection");
|
|
304
314
|
}
|
|
305
315
|
sessionStorage.removeItem('rowId');
|
|
316
|
+
sessionStorage.removeItem('isTabLabelElements');
|
|
306
317
|
},
|
|
307
318
|
deleteEvent: function (shouldUpdateDialog: boolean = true) {
|
|
308
319
|
const path = store.searchParams?.get("path");
|
|
@@ -321,9 +332,17 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
321
332
|
if (!Array.isArray(store.formData.elements)) {
|
|
322
333
|
store.formData.elements = []
|
|
323
334
|
}
|
|
335
|
+
if (!Array.isArray(store.formData.tabLabelElements)) {
|
|
336
|
+
store.formData.tabLabelElements = []
|
|
337
|
+
}
|
|
324
338
|
const path = store.searchParams?.get("path");
|
|
325
339
|
saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
326
|
-
|
|
340
|
+
let finalPath = `${path}`;
|
|
341
|
+
if (dynamicData.path.startsWith("tabLabel")) {
|
|
342
|
+
finalPath = `${finalPath}.tabLabelElements[${store.formData.tabLabelElements.length}]`
|
|
343
|
+
} else {
|
|
344
|
+
finalPath = `${finalPath}.elements[${store.formData.elements.length}]`
|
|
345
|
+
}
|
|
327
346
|
store.searchParams.set("path", finalPath)
|
|
328
347
|
store.setSearchParams(store.searchParams)
|
|
329
348
|
this.setPage()
|
|
@@ -355,6 +374,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
355
374
|
deletePopUpComponent: function () {
|
|
356
375
|
const rowId = dynamicData.path.split(".")[1];
|
|
357
376
|
sessionStorage.setItem('rowId', rowId);
|
|
377
|
+
sessionStorage.setItem('isTabLabelElements', dynamicData.path.startsWith("tabLabel") ? "true" : "false");
|
|
358
378
|
store.updateDialog("popUpComponentSection");
|
|
359
379
|
},
|
|
360
380
|
deletePopUpEvent: function () {
|
|
@@ -401,9 +421,17 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
401
421
|
if (!Array.isArray(store.formData.events)) {
|
|
402
422
|
store.formData.events = []
|
|
403
423
|
}
|
|
424
|
+
if (!Array.isArray(store.formData.tabLabelElements)) {
|
|
425
|
+
store.formData.tabLabelElements = []
|
|
426
|
+
}
|
|
404
427
|
saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
|
|
405
428
|
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
406
|
-
const
|
|
429
|
+
const currentLength = {
|
|
430
|
+
"TabsComponent": formData.tabLabelElements.length,
|
|
431
|
+
"Component": formData.elements.length,
|
|
432
|
+
"Events": formData.events.length
|
|
433
|
+
};
|
|
434
|
+
const insertElementIndex = currentLength[elementType] || 0;
|
|
407
435
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
408
436
|
|
|
409
437
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
@@ -440,6 +468,9 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
440
468
|
elementPathHandler: function (parentPath: string, rowId: any, elementType: string) {
|
|
441
469
|
if (elementType === "Component") {
|
|
442
470
|
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
471
|
+
}
|
|
472
|
+
if(elementType === "TabsComponent"){
|
|
473
|
+
return `${parentPath}.tabLabelElements[${rowId}]`
|
|
443
474
|
}
|
|
444
475
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
445
476
|
},
|
|
@@ -101,6 +101,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
)
|
|
104
|
+
|
|
104
105
|
executeRefreshHandler({
|
|
105
106
|
config: {}, componentName: "",
|
|
106
107
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
@@ -111,6 +112,24 @@ export default (funcParams: funcParamsProps) => {
|
|
|
111
112
|
funcParams.store.setUiSchema(uiSchema);
|
|
112
113
|
});
|
|
113
114
|
},
|
|
115
|
+
getStyle: () => {
|
|
116
|
+
const cloneEventGroup = _.cloneDeep(eventGroups)
|
|
117
|
+
if (cloneEventGroup.setStyle) {
|
|
118
|
+
let finalResponse = {};
|
|
119
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams?.dynamicData.path?.split(".").pop();
|
|
120
|
+
if (cloneEventGroup?.setStyle?.[path]) {
|
|
121
|
+
for (const eventConfig of cloneEventGroup?.setStyle?.[path]) {
|
|
122
|
+
finalResponse = executeEvents({
|
|
123
|
+
...executeEventsParameters,
|
|
124
|
+
config: eventConfig,
|
|
125
|
+
componentName: path
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
return finalResponse
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return {}
|
|
132
|
+
},
|
|
114
133
|
onCellRenderer: (cellParams) => {
|
|
115
134
|
const cloneEventGroup = _.cloneDeep(eventGroups)
|
|
116
135
|
if (cloneEventGroup.onCellRenderer) {
|
|
@@ -139,6 +158,9 @@ export default (funcParams: funcParamsProps) => {
|
|
|
139
158
|
onFileDelete: async function () {
|
|
140
159
|
this.callHandler("onFileDelete")
|
|
141
160
|
},
|
|
161
|
+
onClose: function () {
|
|
162
|
+
this.callHandler("onClose")
|
|
163
|
+
},
|
|
142
164
|
onMount: function () {
|
|
143
165
|
this.callHandler("onMount")
|
|
144
166
|
},
|
|
@@ -190,8 +212,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
190
212
|
|
|
191
213
|
const promises = ChangeEventsKeysArray.flatMap((componentName: string) => {
|
|
192
214
|
if (
|
|
193
|
-
funcParams.store?.formData[componentName] === funcParams.store.newData[componentName]
|
|
194
|
-
funcParams.store?.newData[componentName] === undefined
|
|
215
|
+
funcParams.store?.formData[componentName] === funcParams.store.newData[componentName]
|
|
195
216
|
) {
|
|
196
217
|
return [];
|
|
197
218
|
}
|