impaktapps-ui-builder 1.0.286 → 1.0.288

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 (34) hide show
  1. package/dist/impaktapps-ui-builder.es.js +221 -32
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +7 -7
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +25 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +3 -1
  11. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -0
  12. package/package.json +1 -1
  13. package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +0 -3
  14. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +10 -6
  15. package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +1 -1
  16. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +0 -2
  17. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +3 -0
  18. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +6 -3
  19. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
  20. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
  21. package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +69 -0
  22. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +9 -0
  23. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -3
  24. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +2 -1
  25. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +43 -15
  26. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
  27. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +16 -0
  28. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  29. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +3 -1
  30. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +2 -0
  31. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +17 -0
  32. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -4
  33. package/src/impaktapps-ui-builder/builder/services/component.ts +102 -102
  34. package/src/impaktapps-ui-builder/runtime/services/service.ts +24 -2
@@ -12,48 +12,48 @@ import { getFormdataFromSessionStorage, validateAndShowErrors, okHandler, saveFo
12
12
  const sectionLabels = {
13
13
  Select: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
14
14
  MultipleSelect: ["Core", "Properties", "Value", "Events", "Style", "Validation"],
15
- Table: ["Core", "Components", "Properties", "Events", "Style", ],
16
- LeaderBoard: ["Core", "Components", "Properties", "Events", "Style", ],
17
- WrapperSection: ["Core", "Components", "Properties", "Style", ],
18
- HorizontalLayout: ["Core", "Components", "Properties", "Style", ],
15
+ Table: ["Core", "Components", "Properties", "Events", "Style",],
16
+ LeaderBoard: ["Core", "Components", "Properties", "Events", "Style",],
17
+ WrapperSection: ["Core", "Components", "Properties", "Style",],
18
+ HorizontalLayout: ["Core", "Components", "Properties", "Style",],
19
19
  TabSection: ["Core", "Components", "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"],
23
23
  Graph: ["Core", "Properties", "Events", "Style", "Validation"],
24
24
  DownloadFile: ["Core", "Events", "Style", "Validation"],
25
- Box: ["Core", "Properties" , "Events", "Style", "Validation"],
25
+ Box: ["Core", "Properties", "Events", "Style", "Validation"],
26
26
  Properties: ["Core", "Properties", "Events", "Style", "Validation"],
27
27
  ProgressBarCard: ["Core", "Properties", "Events", "Style"],
28
- ProgressBar:["Core", "Properties", "Events", "Style", ],
29
- RankCard: ["Core", "Properties", "Events", "Style", ],
28
+ ProgressBar: ["Core", "Properties", "Events", "Style",],
29
+ RankCard: ["Core", "Properties", "Events", "Style",],
30
30
  MetricCard: ["Core", "Properties", "Events", "Style", "Validation"],
31
31
  HierarchyChart: ["Core","Components","Properties", "Events", "Style", "Validation"],
32
32
  Slider: ["Core", "Components", "Events", "Style", "Validation"],
33
33
  Timer: ["Core", "Events", "Style",],
34
- Rank: ["Core", "Events", "Style", ],
34
+ Rank: ["Core", "Events", "Style",],
35
35
  Button: ["Core", "Properties", "Events", "Style", "Validation"],
36
- ButtonGroup: ["Core","Components","Properties", "Events", "Style", "Validation"],
37
- Array: ["Core", "Components", "Properties","Events","Validation"],
36
+ ButtonGroup: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
37
+ Array: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
38
38
  Radio: ["Core", "Properties", "Events", "Style", "Validation"],
39
39
  Text: ["Core", "Properties", "Events", "Style", "Validation"],
40
40
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
41
- PopUp: ["Core", "Components", "Properties", "Style"],
41
+ PopUp: ["Core", "Components", "Properties", "Events", "Style"],
42
42
  PopOver: ["Core", "Components", "Properties", "Style"],
43
+ PdfViewer: ["Core","Properties", "Style"],
43
44
  Stepper: ["Core", "Components", "Properties", "Events", "Style"],
44
45
  DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
45
46
  InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
46
47
  TreeMap: ["Core", "Components", "Properties", "Events", "Style"],
47
48
  ColumnGroup: ["Core", "Components"],
48
- Thought: ["Core", "Properties", "Events", "Style", ],
49
+ Thought: ["Core", "Properties", "Events", "Style",],
49
50
  Date: ["Core", "Properties", "Events", "Style", "Validation"],
50
51
  DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
51
- Image: ["Core", "Properties","Style"],
52
- FileInput: ["Core","Properties","Events", "Style", "Validation"],
53
- Camera:["Core","Properties","Events", "Style", "Validation"],
54
- OTP_Input: ["Core","Properties","Events", "Style", "Validation"],
52
+ Image: ["Core", "Properties", "Events", "Style"],
53
+ FileInput: ["Core", "Properties", "Events", "Style", "Validation"],
54
+ Camera: ["Core", "Properties", "Events", "Style", "Validation"],
55
+ OTP_Input: ["Core", "Properties", "Events", "Style", "Validation"],
55
56
  }
56
-
57
57
  export function refreshPage(type: string, store: any) {
58
58
  const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
59
59
  const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
@@ -79,8 +79,8 @@ export function refreshPage(type: string, store: any) {
79
79
 
80
80
  const parentObj = _.get(currentConfig, parentPath)
81
81
 
82
- if(parentObj?.type === "Table" || parentObj?.type === "ColumnGroup"){
83
- UiSchema.elements[0].elements[0].elements[4] =
82
+ if (parentObj?.type === "Table" || parentObj?.type === "ColumnGroup") {
83
+ UiSchema.elements[0].elements[0].elements[4] =
84
84
  {
85
85
  type: "Control",
86
86
  scope: "#/properties/columnFormat",
@@ -95,7 +95,7 @@ export function refreshPage(type: string, store: any) {
95
95
  },
96
96
  },
97
97
  };
98
- UiSchema.elements[0].elements[0].elements[6] =
98
+ UiSchema.elements[0].elements[0].elements[6] =
99
99
  {
100
100
  type: "Control",
101
101
  scope: "#/properties/filteringOptions",
@@ -110,7 +110,7 @@ export function refreshPage(type: string, store: any) {
110
110
  },
111
111
  },
112
112
  };
113
- UiSchema.elements[0].elements[0].elements[5] =
113
+ UiSchema.elements[0].elements[0].elements[5] =
114
114
  {
115
115
  type: "Control",
116
116
  scope: "#/properties/enableFilter",
@@ -125,49 +125,49 @@ export function refreshPage(type: string, store: any) {
125
125
  },
126
126
  },
127
127
  },
128
- UiSchema.elements[0].elements[0].elements[7] =
129
- {
130
- type: "Control",
131
- scope: "#/properties/enableSorting",
132
- options: {
133
- widget: "RadioInputField",
134
- },
135
- config: {
136
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
137
- main: {
138
- label: "Enable Sorting",
139
- options: ["Yes", "No"],
128
+ UiSchema.elements[0].elements[0].elements[7] =
129
+ {
130
+ type: "Control",
131
+ scope: "#/properties/enableSorting",
132
+ options: {
133
+ widget: "RadioInputField",
140
134
  },
141
- },
142
- },
143
- UiSchema.elements[0].elements[0].elements[8] =
144
- {
145
- type: "Control",
146
- scope: "#/properties/columnKey",
147
- config: {
148
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
149
- main: {
150
- label: "Column Key",
135
+ config: {
136
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
137
+ main: {
138
+ label: "Enable Sorting",
139
+ options: ["Yes", "No"],
140
+ },
151
141
  },
152
142
  },
153
- options: {
154
- widget: "InputField",
155
- },
156
- },
157
- UiSchema.elements[0].elements[0].elements[9] =
158
- {
159
- type: "Control",
160
- scope: "#/properties/elementType",
161
- options: {
162
- widget: "SelectInputField",
163
- },
164
- config: {
165
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
166
- main: {
167
- label: "Element Type",
143
+ UiSchema.elements[0].elements[0].elements[8] =
144
+ {
145
+ type: "Control",
146
+ scope: "#/properties/columnKey",
147
+ config: {
148
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
149
+ main: {
150
+ label: "Column Key",
151
+ },
152
+ },
153
+ options: {
154
+ widget: "InputField",
168
155
  },
169
156
  },
170
- }
157
+ UiSchema.elements[0].elements[0].elements[9] =
158
+ {
159
+ type: "Control",
160
+ scope: "#/properties/elementType",
161
+ options: {
162
+ widget: "SelectInputField",
163
+ },
164
+ config: {
165
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
166
+ main: {
167
+ label: "Element Type",
168
+ },
169
+ },
170
+ }
171
171
  UiSchema.elements[0].elements[0].elements[10] = {
172
172
  type: "Control",
173
173
  scope: "#/properties/dateFormat",
@@ -192,8 +192,8 @@ export function refreshPage(type: string, store: any) {
192
192
  },
193
193
  }
194
194
  }
195
- if(parentObj?.type === "LeaderBoard"){
196
- UiSchema.elements[0].elements[0].elements[4] =
195
+ if (parentObj?.type === "LeaderBoard") {
196
+ UiSchema.elements[0].elements[0].elements[4] =
197
197
  {
198
198
  type: "Control",
199
199
  scope: "#/properties/columnFormat",
@@ -209,7 +209,7 @@ export function refreshPage(type: string, store: any) {
209
209
  };
210
210
  }
211
211
 
212
- if (sessionStorage.getItem("copiedConfig") ) {
212
+ if (sessionStorage.getItem("copiedConfig")) {
213
213
  this.ElementPathSetter(UiSchema);
214
214
  }
215
215
  store.setUiSchema(UiSchema);
@@ -240,28 +240,28 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
240
240
  const path = store.searchParams?.get("path");
241
241
  const id = store.searchParams?.get("id")
242
242
 
243
- let pathArray = [{label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}`}];
243
+ let pathArray = [{ label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}` }];
244
244
 
245
245
  if (path) {
246
- const pathArrayAll = path.split(".");
247
- const arr: any = []
248
- pathArrayAll.map((e: string, i: number) => {
249
- if (i === 0) {
250
- arr.push(e)
251
- return;
252
- }
253
- arr.push(`${arr[i - 1]}.${e}`)
254
- })
246
+ const pathArrayAll = path.split(".");
247
+ const arr: any = []
248
+ pathArrayAll.map((e: string, i: number) => {
249
+ if (i === 0) {
250
+ arr.push(e)
251
+ return;
252
+ }
253
+ arr.push(`${arr[i - 1]}.${e}`)
254
+ })
255
255
 
256
256
 
257
- arr.map((e) => {
258
- const data = _.get(config, e)
259
- pathArray.push({
260
- label: data?.name || data?.eventType || "NewComponent",
261
- path: `/Component?path=${e}${id ? `&id=${id}` : ''}`
262
- });
263
- })
264
- }
257
+ arr.map((e) => {
258
+ const data = _.get(config, e)
259
+ pathArray.push({
260
+ label: data?.name || data?.eventType || "NewComponent",
261
+ path: `/Component?path=${e}${id ? `&id=${id}` : ''}`
262
+ });
263
+ })
264
+ }
265
265
 
266
266
  schema.properties.pageName.path = pathArray
267
267
  return schema;
@@ -278,7 +278,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
278
278
  },
279
279
  editComponents: function () {
280
280
 
281
- if (validateAndShowErrors(store)) return;
281
+ if (validateAndShowErrors(store)) return;
282
282
  const rowId = dynamicData.path.split(".")[1];
283
283
  const path = store.searchParams?.get("path");
284
284
  const id = store.searchParams?.get("id");
@@ -318,7 +318,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
318
318
  },
319
319
  widgetAddClickHandler: function () {
320
320
 
321
- if (validateAndShowErrors(store)) return;
321
+ if (validateAndShowErrors(store)) return;
322
322
  if (!Array.isArray(store.formData.elements)) {
323
323
  store.formData.elements = []
324
324
  }
@@ -331,7 +331,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
331
331
 
332
332
  },
333
333
  eventEditHandler: function () {
334
- if (validateAndShowErrors(store)) return;
334
+ if (validateAndShowErrors(store)) return;
335
335
  const rowId = dynamicData.path.split(".")[1];
336
336
  const path = store.searchParams?.get("path");
337
337
  const id = store.searchParams?.get("id");
@@ -340,7 +340,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
340
340
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
341
341
  },
342
342
  eventAddHandler: function () {
343
- if (validateAndShowErrors(store)) return;
343
+ if (validateAndShowErrors(store)) return;
344
344
  const path = store.searchParams?.get("path");
345
345
  const id = store.searchParams?.get("id");
346
346
  if (!Array.isArray(store.formData.events)) {
@@ -378,8 +378,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
378
378
  const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
379
379
  const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
380
380
 
381
- this.ElementPathSetter(uiSchema,copiedFormData);
382
- sessionStorage.setItem('copiedConfig',JSON.stringify(copiedFormData));
381
+ this.ElementPathSetter(uiSchema, copiedFormData);
382
+ sessionStorage.setItem('copiedConfig', JSON.stringify(copiedFormData));
383
383
  store.setNotify({
384
384
  SuccessMessage: `${elementType} Copied Successfully`,
385
385
  Success: true,
@@ -418,7 +418,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
418
418
  Fail: true,
419
419
  });
420
420
  }
421
- else if(copiedConfig.name && elementType === "Events"){
421
+ else if (copiedConfig.name && elementType === "Events") {
422
422
  store.setNotify({
423
423
  FailMessage: notificationMessages.Component,
424
424
  Fail: true,
@@ -446,29 +446,29 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
446
446
  },
447
447
  ElementPathSetter: function (uiSchema: any, copiedFormData?: any) {
448
448
  const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
449
- if(uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
450
- uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
449
+ if (uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons) {
450
+ uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
451
451
  }
452
- else if(uiSchema?.elements?.[0]?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons){
453
- uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
452
+ else if (uiSchema?.elements?.[0]?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons) {
453
+ uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
454
454
  }
455
455
 
456
-
457
- if(uiSchema?.elements?.[1]?.elements?.[1]?.config?.main?.headerIcons){
458
- uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Event: ${formData.eventType}`;
456
+
457
+ if (uiSchema?.elements?.[1]?.elements?.[1]?.config?.main?.headerIcons) {
458
+ uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Event: ${formData.eventType}`;
459
459
  }
460
- else if(uiSchema?.elements?.[0]?.elements?.[1]?.config?.main?.headerIcons){
461
- uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.eventType}`;
460
+ else if (uiSchema?.elements?.[0]?.elements?.[1]?.config?.main?.headerIcons) {
461
+ uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.eventType}`;
462
462
  }
463
463
  },
464
464
 
465
-
466
- onNavigatePopupYes: function() {
467
- try{
465
+
466
+ onNavigatePopupYes: function () {
467
+ try {
468
468
  store.navigate(sessionStorage.getItem("pendingNavigatePath"))
469
469
  store.updateDialog(`pageNamepopup`)
470
470
  }
471
- catch(e){
471
+ catch (e) {
472
472
  store.updateDialog(`pageNamepopup`)
473
473
  store.setNotify({
474
474
  FailMessage: "Couldn't navigate page",
@@ -476,8 +476,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
476
476
  })
477
477
  }
478
478
  },
479
- onNavigatePopupNo: function() {
480
- store.updateDialog(`pageNamepopup`)
479
+ onNavigatePopupNo: function () {
480
+ store.updateDialog(`pageNamepopup`)
481
481
  }
482
482
  }
483
483
  };
@@ -80,7 +80,7 @@ export default (funcParams: funcParamsProps) => {
80
80
  const config = pageData?.config;
81
81
  const uiSchema = pageData?.uiSchema;
82
82
  const event = new CustomEvent('pageNameChanged', {
83
- detail: { pageName: config.label, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
83
+ detail: { pageName: config.label, pageIconUrl: config.pageIconUrl, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
84
84
  });
85
85
  window.dispatchEvent(event)
86
86
  const theme = funcParams?.store?.theme?.myTheme;
@@ -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
  },
@@ -192,7 +214,7 @@ export default (funcParams: funcParamsProps) => {
192
214
  { key: "selectedNodeId", value: param.selectedNodeId },
193
215
  { key: "uncollapsedIds", value: param.uncollapsedIds }
194
216
  ]
195
- const response = await this.callExecuteEvents(param, apiBody, "onSearchNodeSelect");
217
+ const response = await this.callExecuteEvents(param, apiBody, "onLoad");
196
218
  return response?.data;
197
219
  },
198
220
  getSelectOptions: async function (param) {