impaktapps-ui-builder 1.0.280 → 1.0.301

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 (29) hide show
  1. package/dist/impaktapps-ui-builder.es.js +92 -80
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +12 -12
  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/uischema/box.d.ts +1 -0
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/{hierarchyChart.d.ts → pdfViewer.d.ts} +4 -7
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +3 -1
  9. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -1
  10. package/package.json +1 -1
  11. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +10 -6
  12. package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +1 -1
  13. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +3 -0
  14. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +6 -3
  15. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +19 -0
  16. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -4
  17. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +6 -3
  18. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +2 -1
  19. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +29 -21
  20. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +1 -1
  21. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  22. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +3 -1
  23. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -8
  24. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +17 -0
  25. package/src/impaktapps-ui-builder/builder/services/component.ts +101 -102
  26. package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -8
  27. package/dist/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.d.ts +0 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.ts +0 -38
  29. package/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.ts +0 -13
@@ -12,46 +12,46 @@ 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
- HierarchyChart: ["Core","Components","Properties", "Events", "Style", "Validation"],
32
31
  Slider: ["Core", "Components", "Events", "Style", "Validation"],
33
32
  Timer: ["Core", "Events", "Style",],
34
- Rank: ["Core", "Events", "Style", ],
33
+ Rank: ["Core", "Events", "Style",],
35
34
  Button: ["Core", "Properties", "Events", "Style", "Validation"],
36
- ButtonGroup: ["Core","Components","Properties", "Events", "Style", "Validation"],
37
- Array: ["Core", "Components", "Properties","Events","Validation"],
35
+ ButtonGroup: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
36
+ Array: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
38
37
  Radio: ["Core", "Properties", "Events", "Style", "Validation"],
39
38
  Text: ["Core", "Properties", "Events", "Style", "Validation"],
40
39
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
41
40
  PopUp: ["Core", "Components", "Properties", "Style"],
42
41
  PopOver: ["Core", "Components", "Properties", "Style"],
42
+ PdfViewer: ["Core", "Components", "Properties", "Style"],
43
43
  Stepper: ["Core", "Components", "Properties", "Events", "Style"],
44
44
  DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
45
45
  InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
46
46
  TreeMap: ["Core", "Components", "Properties", "Events", "Style"],
47
47
  ColumnGroup: ["Core", "Components"],
48
- Thought: ["Core", "Properties", "Events", "Style", ],
48
+ Thought: ["Core", "Properties", "Events", "Style",],
49
49
  Date: ["Core", "Properties", "Events", "Style", "Validation"],
50
50
  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"],
51
+ Image: ["Core", "Properties", "Events", "Style"],
52
+ FileInput: ["Core", "Properties", "Events", "Style", "Validation"],
53
+ Camera: ["Core", "Properties", "Events", "Style", "Validation"],
54
+ OTP_Input: ["Core", "Properties", "Events", "Style", "Validation"],
55
55
  }
56
56
 
57
57
  export function refreshPage(type: string, store: any) {
@@ -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);
@@ -235,33 +235,32 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
235
235
  if (sessionStorage.getItem("copiedConfig")) {
236
236
  schema.properties.RemoveItemButton.disabled = false;
237
237
  }
238
-
239
238
  const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
240
239
  const path = store.searchParams?.get("path");
241
240
  const id = store.searchParams?.get("id")
242
241
 
243
- let pathArray = [{label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}`}];
242
+ let pathArray = [{ label: config.name ?? "NewPage", path: `/PageMaster${id ? `?id=${id}` : ''}` }];
244
243
 
245
244
  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
- })
245
+ const pathArrayAll = path.split(".");
246
+ const arr: any = []
247
+ pathArrayAll.map((e: string, i: number) => {
248
+ if (i === 0) {
249
+ arr.push(e)
250
+ return;
251
+ }
252
+ arr.push(`${arr[i - 1]}.${e}`)
253
+ })
255
254
 
256
255
 
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
- }
256
+ arr.map((e) => {
257
+ const data = _.get(config, e)
258
+ pathArray.push({
259
+ label: data?.name || data?.eventType || "NewComponent",
260
+ path: `/Component?path=${e}${id ? `&id=${id}` : ''}`
261
+ });
262
+ })
263
+ }
265
264
 
266
265
  schema.properties.pageName.path = pathArray
267
266
  return schema;
@@ -278,7 +277,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
278
277
  },
279
278
  editComponents: function () {
280
279
 
281
- if (validateAndShowErrors(store)) return;
280
+ if (validateAndShowErrors(store)) return;
282
281
  const rowId = dynamicData.path.split(".")[1];
283
282
  const path = store.searchParams?.get("path");
284
283
  const id = store.searchParams?.get("id");
@@ -318,7 +317,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
318
317
  },
319
318
  widgetAddClickHandler: function () {
320
319
 
321
- if (validateAndShowErrors(store)) return;
320
+ if (validateAndShowErrors(store)) return;
322
321
  if (!Array.isArray(store.formData.elements)) {
323
322
  store.formData.elements = []
324
323
  }
@@ -331,7 +330,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
331
330
 
332
331
  },
333
332
  eventEditHandler: function () {
334
- if (validateAndShowErrors(store)) return;
333
+ if (validateAndShowErrors(store)) return;
335
334
  const rowId = dynamicData.path.split(".")[1];
336
335
  const path = store.searchParams?.get("path");
337
336
  const id = store.searchParams?.get("id");
@@ -340,7 +339,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
340
339
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
341
340
  },
342
341
  eventAddHandler: function () {
343
- if (validateAndShowErrors(store)) return;
342
+ if (validateAndShowErrors(store)) return;
344
343
  const path = store.searchParams?.get("path");
345
344
  const id = store.searchParams?.get("id");
346
345
  if (!Array.isArray(store.formData.events)) {
@@ -378,8 +377,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
378
377
  const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
379
378
  const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
380
379
 
381
- this.ElementPathSetter(uiSchema,copiedFormData);
382
- sessionStorage.setItem('copiedConfig',JSON.stringify(copiedFormData));
380
+ this.ElementPathSetter(uiSchema, copiedFormData);
381
+ sessionStorage.setItem('copiedConfig', JSON.stringify(copiedFormData));
383
382
  store.setNotify({
384
383
  SuccessMessage: `${elementType} Copied Successfully`,
385
384
  Success: true,
@@ -418,7 +417,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
418
417
  Fail: true,
419
418
  });
420
419
  }
421
- else if(copiedConfig.name && elementType === "Events"){
420
+ else if (copiedConfig.name && elementType === "Events") {
422
421
  store.setNotify({
423
422
  FailMessage: notificationMessages.Component,
424
423
  Fail: true,
@@ -446,29 +445,29 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
446
445
  },
447
446
  ElementPathSetter: function (uiSchema: any, copiedFormData?: any) {
448
447
  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}`;
448
+ if (uiSchema?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons) {
449
+ uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
451
450
  }
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}`;
451
+ else if (uiSchema?.elements?.[0]?.elements?.[1]?.elements?.[0]?.config?.main?.headerIcons) {
452
+ uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
454
453
  }
455
454
 
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}`;
455
+
456
+ if (uiSchema?.elements?.[1]?.elements?.[1]?.config?.main?.headerIcons) {
457
+ uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Event: ${formData.eventType}`;
459
458
  }
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}`;
459
+ else if (uiSchema?.elements?.[0]?.elements?.[1]?.config?.main?.headerIcons) {
460
+ uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.eventType}`;
462
461
  }
463
462
  },
464
463
 
465
-
466
- onNavigatePopupYes: function() {
467
- try{
464
+
465
+ onNavigatePopupYes: function () {
466
+ try {
468
467
  store.navigate(sessionStorage.getItem("pendingNavigatePath"))
469
468
  store.updateDialog(`pageNamepopup`)
470
469
  }
471
- catch(e){
470
+ catch (e) {
472
471
  store.updateDialog(`pageNamepopup`)
473
472
  store.setNotify({
474
473
  FailMessage: "Couldn't navigate page",
@@ -476,8 +475,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
476
475
  })
477
476
  }
478
477
  },
479
- onNavigatePopupNo: function() {
480
- store.updateDialog(`pageNamepopup`)
478
+ onNavigatePopupNo: function () {
479
+ store.updateDialog(`pageNamepopup`)
481
480
  }
482
481
  }
483
482
  };
@@ -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;
@@ -173,13 +173,6 @@ export default (funcParams: funcParamsProps) => {
173
173
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
174
174
  return response?.data;
175
175
  },
176
- onNodeExpandChange: async function (param) {
177
- const apiBody = [
178
- { key: "expandedNodeId", value: param.expandedNodeId }
179
- ]
180
- const response = await this.callExecuteEvents(param, apiBody, "onLoad");
181
- return response?.data;
182
- },
183
176
  getSelectOptions: async function (param) {
184
177
  if (param.serachValue !== "" && param.serachValue !== undefined) {
185
178
  const apiBody = [
@@ -1 +0,0 @@
1
- export declare const buildHierarchyChart: (config: any, componentScope: any, store: any) => any;
@@ -1,38 +0,0 @@
1
- import { HierarchyChart } from "./uischema/hierarchyChart";
2
- import _ from "lodash";
3
- import { createLayoutFormat } from "./buildConfig";
4
-
5
- export const buildHierarchyChart = (config, componentScope, store) => {
6
- const hierarchyChart: any = _.cloneDeep(HierarchyChart);
7
-
8
- hierarchyChart.scope = componentScope;
9
- if (config.style) {
10
- hierarchyChart.config.style = JSON.parse(config.style)
11
- }
12
- if (config.layout) {
13
- hierarchyChart.config.layout = createLayoutFormat(config.layout)
14
- }
15
- if (config.linkType) {
16
- hierarchyChart.config.main.linkType = config.linkType;
17
- }
18
- if (config.stepPercent) {
19
- hierarchyChart.config.main.stepPercent = config.stepPercent;
20
- }
21
- if (config.nodeWidth) {
22
- hierarchyChart.config.main.nodeWidth = config.nodeWidth;
23
- }
24
- if (config.nodeHeight) {
25
- hierarchyChart.config.main.nodeHeight = config.nodeHeight;
26
- }
27
- if (config.chartHeight) {
28
- hierarchyChart.config.main.chartHeight = config.chartHeight;
29
- }
30
- if (config.lazyLoading) {
31
- hierarchyChart.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
32
- }
33
- if (config.isExpandAll) {
34
- hierarchyChart.config.main.isExpandAll = config.isExpandAll === "YES" ? true : false;
35
- }
36
- return hierarchyChart;
37
- }
38
-
@@ -1,13 +0,0 @@
1
- export const HierarchyChart = {
2
- type: "Control",
3
- scope: "#/properties/HierarchyChart",
4
- options: {
5
- widget: "HierarchyChart",
6
- },
7
- config: {
8
- layout: {xs :12,sm:12,md:12,lg:12},
9
- main: {
10
- },
11
- style:{ containerStyle: {},labelStyle:{margin:{}} }
12
- },
13
- };