impaktapps-ui-builder 1.0.451 → 1.0.481

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.
@@ -1,4 +1,4 @@
1
- export declare const TableSection: (theme: any, scopeName?: string) => {
1
+ export declare const TableSection: (theme: any) => {
2
2
  type: string;
3
3
  elements: {
4
4
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.451",
3
+ "version": "1.0.481",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -37,9 +37,6 @@ const buildAreaGraph = (config:any,componentScope:string) => {
37
37
  if(config.yAxisTickCount){
38
38
  AreaGraph.config.main.yAxisTickCount = config.yAxisTickCount
39
39
  }
40
- if(config.xAxisTickCount){
41
- AreaGraph.config.main.xAxisTickCount = config.xAxisTickCount
42
- }
43
40
  if (config.xAxisValue) {
44
41
  AreaGraph.config.main.xAxisValue = config.xAxisValue;
45
42
  }
@@ -22,31 +22,27 @@ export default (FormData: any) => {
22
22
  if (formData.events) {
23
23
  delete formData.events
24
24
  }
25
- if (formData.tabLabelElements) {
26
- component.tabLabelElements = formData.tabLabelElements || [];
27
- delete formData.tabLabelElements
28
- }
29
25
  component = { ...formData, ...component };
30
26
  return component;
31
27
  };
32
28
 
33
29
  export const createLayoutFormat = (layout: any[], type?: string) => {
34
30
  if (_.isEmpty(layout)) {
35
- const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout", "Table"]
36
- if (fullLayoutComponents.includes(type)) {
31
+ const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout","Table"]
32
+ if(fullLayoutComponents.includes(type)){
37
33
  return { xs: 12, sm: 12, md: 12, lg: 12 }
38
34
  }
39
- else if (type === "Graph") {
40
- return { xs: 12, sm: 12, md: 12, lg: 6 }
35
+ else if(type === "Graph"){
36
+ return {xs :12,sm:12,md:12,lg:6}
41
37
  }
42
- else if (type === "Button") {
38
+ else if(type === "Button"){
43
39
  return { xs: 4, sm: 2.5, md: 2, lg: 1.5 }
44
40
  }
45
- else {
41
+ else{
46
42
  return { xs: 6, sm: 6, md: 4, lg: 3 }
47
43
  }
48
44
  }
49
- let data: any = {};
45
+ let data: any = { };
50
46
 
51
47
  layout.map((e: any) => {
52
48
  data[e.key || "xs"] =
@@ -27,6 +27,9 @@ export const buildMultiSelect = (config, componentScope) => {
27
27
  if (config.toolTipPosition) {
28
28
  multipleSelect.config.main.toolTipPosition = config.toolTipPosition;
29
29
  }
30
+ if (config.grouping) {
31
+ multipleSelect.config.main.grouping = config.grouping;
32
+ }
30
33
  if (config.style) {
31
34
  multipleSelect.config.style = JSON.parse(config.style);
32
35
  }
@@ -26,6 +26,9 @@ export const buildSelect = (config: any, componentScope: string) => {
26
26
  if (config.toolTipPosition) {
27
27
  selectInputField.config.main.toolTipPosition = config.toolTipPosition;
28
28
  }
29
+ if (config.grouping) {
30
+ selectInputField.config.main.grouping = config.grouping;
31
+ }
29
32
  if (config.style) {
30
33
  selectInputField.config.style = JSON.parse(config.style);
31
34
  }
@@ -34,9 +34,6 @@ const buildStackBarLineGraph = (config:any,componentScope:string) => {
34
34
  if(config.yAxisTickCount){
35
35
  StackBarLineGraph.config.main.yAxisTickCount = config.yAxisTickCount
36
36
  }
37
- if(config.xAxisTickCount){
38
- StackBarLineGraph.config.main.xAxisTickCount = config.xAxisTickCount
39
- }
40
37
  if (config.xAxisValue) {
41
38
  StackBarLineGraph.config.main.xAxisValue = config.xAxisValue;
42
39
  }
@@ -11,9 +11,6 @@ export const buildTable = (config: any, componentScope: string) => {
11
11
  if (config.lazyLoading) {
12
12
  table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
13
13
  }
14
- if (config.lazyLoadTree) {
15
- table.config.main.lazyTree = config.lazyLoadTree === "YES" ? true : false;
16
- }
17
14
  if (config.defaultColumnSize) {
18
15
  table.config.main.defaultColumnSize = config.defaultColumnSize
19
16
  }
@@ -295,6 +295,7 @@ const buildUiSchema = (config: any, store?: any) => {
295
295
  case "PdfViewer":
296
296
  elements = buildPdfViewer(config, componentScope);
297
297
  break;
298
+ break;
298
299
  default:
299
300
  schema = {
300
301
  type: "object",
@@ -403,11 +404,6 @@ const buildUiSchema = (config: any, store?: any) => {
403
404
  });
404
405
  }
405
406
  }
406
- if (config.tabLabelElements) {
407
- elements.tabLabelElements = config.tabLabelElements.map((e: any, elemInd: number) => {
408
- return buildUiSchema(e, store)
409
- });
410
- }
411
407
  return elements;
412
408
  }
413
409
 
@@ -519,7 +519,7 @@ export const buildPropertiesSection = function (type: String) {
519
519
  { label: "Negative", value: "negative" }
520
520
  ]),
521
521
  getInputField("color", "Card Color"),
522
- emptyBox("MetricEmpty1", { xs: 6, sm: 6, md: 4, lg: 3 }),
522
+ emptyBox("MetricEmpty1", { xs: 6, sm: 0, md: 8, lg: 6 }),
523
523
  ];
524
524
  break;
525
525
  case "Button":
@@ -581,13 +581,13 @@ export const buildPropertiesSection = function (type: String) {
581
581
  getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
582
582
  getInputField("leftMargin", "Left Margin"),
583
583
  getInputField("yAxisTickCount", "Y Axis TickCount"),
584
- getInputField("xAxisTickCount", "X Axis TickCount"),
585
584
  getSelectField("xAxisFormatType", "X Axis Format Type", [
586
585
  { label: "Date and Month", value: "Date and Month" },
587
586
  { label: "Month and Year", value: "Month and Year" }
588
587
  ]),
589
588
  getInputField("growthRateKey", "Growth Rate Key"),
590
589
  getInputField("tooltipUnit", "Tooltip Unit"),
590
+ emptyBox("GraphEmpty1", { xs: 6, sm: 6, md: 4, lg: 3 }),
591
591
  getArrayControlMultiField("legendLabels", "key", "value", "Key", "Label", "Configure Bar Labels"),
592
592
  getArrayControlMultiField("pieArcColors", "key", "value", "Key", "Color", "Configure Bar Colors"),
593
593
  ];
@@ -648,7 +648,6 @@ export const buildPropertiesSection = function (type: String) {
648
648
  buildWrapper("Tree Table Properties", [
649
649
  getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
650
650
  getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
651
- getRadioInputField("lazyLoadTree", "Lazy Load Tree", ["YES", "NO"]),
652
651
  // getRadioInputField("enableExpandAll", "Use All Row Expanding", ["YES", "NO"]),
653
652
  getRadioInputField("paginateExpandedRows", "Multi Page Expansion", ["YES", "NO"]),
654
653
  getRadioInputField("treeStructure", "Flat Tree Structure", ["YES", "NO"]),
@@ -690,7 +689,8 @@ export const buildPropertiesSection = function (type: String) {
690
689
  { label: "Right", value: "right" },
691
690
  { label: "Bottom", value: "bottom" }
692
691
  ]),
693
- emptyBox("SelectEmpty", { xs: 6, sm: 6, md: 8, lg: 9 })
692
+ getRadioInputField("grouping", "grouping", ["YES", "NO"]),
693
+ emptyBox("SelectEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
694
694
  ]
695
695
  break;
696
696
  case "MultipleSelect":
@@ -707,7 +707,9 @@ export const buildPropertiesSection = function (type: String) {
707
707
  { label: "Left", value: "left" },
708
708
  { label: "Right", value: "right" },
709
709
  { label: "Bottom", value: "bottom" }
710
- ])
710
+ ]),
711
+ getRadioInputField("grouping", "grouping", ["YES", "NO"]),
712
+ emptyBox("MultipleSelectEmpty", { xs: 6, sm: 6, md: 8, lg: 9 })
711
713
  ]
712
714
  break;
713
715
  case "PdfViewer":
@@ -1,10 +1,10 @@
1
- export const TableSection = (theme,scopeName="elements") => {
1
+ export const TableSection = (theme) => {
2
2
  const uiSchema = {
3
3
  type: "HorizontalLayout",
4
4
  elements: [
5
5
  {
6
6
  type: "Control",
7
- scope: `#/properties/${scopeName}`,
7
+ scope: "#/properties/elements",
8
8
  options: {
9
9
  widget: "Table",
10
10
  },
@@ -15,7 +15,8 @@ export const TableSection = (theme,scopeName="elements") => {
15
15
  {
16
16
  widget: {
17
17
  type: "Control",
18
- scope: `#/properties/${scopeName}_New_Record`,
18
+ scope: "#/properties/New_Record",
19
+
19
20
  options: {
20
21
  widget: "IconButton",
21
22
  },
@@ -42,7 +43,7 @@ export const TableSection = (theme,scopeName="elements") => {
42
43
  {
43
44
  widget: {
44
45
  type: "Control",
45
- scope: scopeName === "elements" ? `#/properties/Paste_Component` : `#/properties/Paste_TabsComponent`,
46
+ scope: "#/properties/Paste_Component",
46
47
  options: {
47
48
  widget: "IconButton",
48
49
  },
@@ -108,7 +109,7 @@ export const TableSection = (theme,scopeName="elements") => {
108
109
  },
109
110
  {
110
111
  type: "Control",
111
- scope: scopeName === "elements" ? `#/properties/Copy_Component` : `#/properties/Copy_TabsComponent`,
112
+ scope: "#/properties/Copy_Component",
112
113
  options: {
113
114
  widget: "Button",
114
115
  },
@@ -49,7 +49,7 @@ export const ComponentSchema: any = {
49
49
  { title: "Upload", const: "UploadFile" },
50
50
  { title: "Tree ", const: "TreeMap" },
51
51
  { title: "Thought of the day", const: "Thought" },
52
- { title: "PDF", const: "PdfViewer" }
52
+ { title: "PDF", const: "PdfViewer"}
53
53
  ],
54
54
  },
55
55
  elementType: {
@@ -103,35 +103,35 @@ export const ComponentSchema: any = {
103
103
  { title: "Standard", const: "standard" },
104
104
  ],
105
105
  },
106
- positionVertical: {
106
+ positionVertical:{
107
107
  oneOf: [
108
108
  { title: "Top", const: "top" },
109
109
  { title: "Center", const: "center" },
110
110
  { title: "Bottom", const: "bottom" }
111
111
  ],
112
112
  },
113
- positionHorizontal: {
113
+ positionHorizontal:{
114
114
  oneOf: [
115
115
  { title: "Left", const: "left" },
116
116
  { title: "Center", const: "center" },
117
117
  { title: "Right", const: "right" }
118
118
  ],
119
119
  },
120
- contentVertical: {
120
+ contentVertical:{
121
121
  oneOf: [
122
122
  { title: "Top", const: "top" },
123
123
  { title: "Center", const: "center" },
124
124
  { title: "Bottom", const: "bottom" }
125
125
  ],
126
126
  },
127
- contentHorizontal: {
127
+ contentHorizontal:{
128
128
  oneOf: [
129
129
  { title: "Left", const: "left" },
130
130
  { title: "Center", const: "center" },
131
131
  { title: "Right", const: "right" }
132
132
  ],
133
133
  },
134
- toolTipPosition: {
134
+ toolTipPosition:{
135
135
  oneOf: [
136
136
  { title: "Top", const: "top" },
137
137
  { title: "Left", const: "left" },
@@ -495,11 +495,6 @@ export const ComponentSchema: any = {
495
495
  { title: "Detail Icon", const: "DetailIcon" },
496
496
  { title: "Report View Icon", const: "ReportViewIcon" },
497
497
  { title: "Payout", const: "Payout" },
498
- { title: "Info Outlined", const: "InfoOutlinedIcon" },
499
- { title: "Territory Add", const: "TerritoryAdd" },
500
- { title: "Territory Edit", const: "TerritoryEdit" },
501
- { title: "Territory Delete", const: "TerritoryDelete" },
502
- { title: "Git Compare", const: "GitCompare" },
503
498
  ],
504
499
  },
505
500
  color: {
@@ -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", "TabTitles", "Properties", "Style", "Validation"],
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"],
@@ -39,7 +39,7 @@ const sectionLabels = {
39
39
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
40
40
  PopUp: ["Core", "Components", "Properties", "Events", "Style"],
41
41
  PopOver: ["Core", "Components", "Properties", "Style"],
42
- PdfViewer: ["Core", "Properties", "Style"],
42
+ PdfViewer: ["Core","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"],
@@ -63,7 +63,6 @@ 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"),
67
66
  Properties: buildPropertiesSection(type),
68
67
  Validation: ValidationSection
69
68
  }
@@ -75,7 +74,7 @@ export function refreshPage(type: string, store: any) {
75
74
  // Get Widget Type of parent
76
75
  const path = store.searchParams?.get("path");
77
76
  const lastDotIndex = path.lastIndexOf('.')
78
- const parentPath = path.slice(0, lastDotIndex)
77
+ const parentPath = path.slice(0,lastDotIndex)
79
78
 
80
79
  const parentObj = _.get(currentConfig, parentPath)
81
80
 
@@ -235,7 +234,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
235
234
  if (sessionStorage.getItem("copiedConfig")) {
236
235
  schema.properties.RemoveItemButton.disabled = false;
237
236
  }
238
-
237
+
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")
@@ -284,12 +283,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
284
283
  const id = store.searchParams?.get("id");
285
284
  saveFormdataInSessionStorage(store.ctx.core.data, path)
286
285
  if (path) {
287
- let finalPath = `${path}`;
288
- if (dynamicData?.path?.startsWith("tabLabel")) {
289
- finalPath = `${finalPath}.tabLabelElements[${rowId}]`
290
- } else {
291
- finalPath = `${finalPath}.elements[${rowId}]`
292
- }
286
+ const path = store.searchParams?.get("path");
287
+ const finalPath = `${path}.elements[${rowId}]`
293
288
  store.searchParams.set("path", finalPath)
294
289
  store.setSearchParams(store.searchParams)
295
290
  this.setPage()
@@ -300,12 +295,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
300
295
  deleteComponents: function (shouldUpdateDialog: boolean = true) {
301
296
  const path = store.searchParams?.get("path");
302
297
  const rowId = sessionStorage.getItem('rowId');
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
- }
298
+ store.formData.elements.splice(rowId, 1);
309
299
  const response = saveFormdataInSessionStorage(store.ctx.core.data, path)
310
300
  const data = path ? _.get(response, path) : response;
311
301
  store.setFormdata(data);
@@ -313,7 +303,6 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
313
303
  store.updateDialog("popUpComponentSection");
314
304
  }
315
305
  sessionStorage.removeItem('rowId');
316
- sessionStorage.removeItem('isTabLabelElements');
317
306
  },
318
307
  deleteEvent: function (shouldUpdateDialog: boolean = true) {
319
308
  const path = store.searchParams?.get("path");
@@ -332,17 +321,9 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
332
321
  if (!Array.isArray(store.formData.elements)) {
333
322
  store.formData.elements = []
334
323
  }
335
- if (!Array.isArray(store.formData.tabLabelElements)) {
336
- store.formData.tabLabelElements = []
337
- }
338
324
  const path = store.searchParams?.get("path");
339
325
  saveFormdataInSessionStorage(store.ctx.core.data, path)
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
- }
326
+ const finalPath = `${path}.elements[${store.formData.elements.length}]`
346
327
  store.searchParams.set("path", finalPath)
347
328
  store.setSearchParams(store.searchParams)
348
329
  this.setPage()
@@ -374,7 +355,6 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
374
355
  deletePopUpComponent: function () {
375
356
  const rowId = dynamicData.path.split(".")[1];
376
357
  sessionStorage.setItem('rowId', rowId);
377
- sessionStorage.setItem('isTabLabelElements', dynamicData.path.startsWith("tabLabel") ? "true" : "false");
378
358
  store.updateDialog("popUpComponentSection");
379
359
  },
380
360
  deletePopUpEvent: function () {
@@ -421,17 +401,9 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
421
401
  if (!Array.isArray(store.formData.events)) {
422
402
  store.formData.events = []
423
403
  }
424
- if (!Array.isArray(store.formData.tabLabelElements)) {
425
- store.formData.tabLabelElements = []
426
- }
427
404
  saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
428
405
  const formData = getFormdataFromSessionStorage(pastedElementParentPath);
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;
406
+ const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
435
407
  const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
436
408
 
437
409
  const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
@@ -468,9 +440,6 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
468
440
  elementPathHandler: function (parentPath: string, rowId: any, elementType: string) {
469
441
  if (elementType === "Component") {
470
442
  return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
471
- }
472
- if(elementType === "TabsComponent"){
473
- return `${parentPath}.tabLabelElements[${rowId}]`
474
443
  }
475
444
  return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
476
445
  },
@@ -190,13 +190,13 @@ export default (funcParams: funcParamsProps) => {
190
190
  { key: "sorting", value: paginationValues.sorting || [] },
191
191
  { key: "filters", value: paginationValues.tableColumnConfig || [] },
192
192
  { key: "globalFilter", value: paginationValues.globalFilter ?? '' },
193
- { key: "parentIds", value: paginationValues.parentIds},
193
+ { key: "expandedRowIds", value: paginationValues.expandedRowIds ?? [] }
194
194
  ]
195
195
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
196
196
  return response?.data;
197
197
  },
198
198
  getSelectOptions: async function (param) {
199
- if (param.serachValue !== "" && param.serachValue !== undefined) {
199
+ if ( param.serachValue !== undefined) {
200
200
  const apiBody = [
201
201
  { key: "searchValue", value: param.serachValue },
202
202
  { key: "currentValue", value: param.currentValue }