impaktapps-ui-builder 1.0.321 → 1.0.330

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.
@@ -0,0 +1 @@
1
+ export declare const buildHierarchyChart: (config: any, componentScope: any, store: any) => any;
@@ -0,0 +1,22 @@
1
+ export declare const HierarchyChart: {
2
+ type: string;
3
+ scope: string;
4
+ options: {
5
+ widget: string;
6
+ };
7
+ config: {
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
14
+ main: {};
15
+ style: {
16
+ containerStyle: {};
17
+ labelStyle: {
18
+ margin: {};
19
+ };
20
+ };
21
+ };
22
+ };
@@ -23,6 +23,7 @@ declare const _default: (funcParams: funcParamsProps) => {
23
23
  backHandler: () => void;
24
24
  onRowMovement: (paginationValues: any) => Promise<any>;
25
25
  onPaginationChange: (paginationValues: any) => Promise<any>;
26
+ onNodeExpandChange: (param: any) => Promise<any>;
26
27
  getSelectOptions: (param: any) => Promise<any>;
27
28
  onChange: () => void;
28
29
  callExecuteEvents: (paramValue: any, apiBody: any, eventType: string) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.321",
3
+ "version": "1.0.330",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -8,5 +8,8 @@ export const buildEmptyBox = (config,componentScope) =>{
8
8
  if (config.layout) {
9
9
  EmptyBox.config.layout = createLayoutFormat(config.layout);
10
10
  }
11
+ if (config.style) {
12
+ EmptyBox.config.style = JSON.parse(config.style)
13
+ }
11
14
  return EmptyBox;
12
15
  }
@@ -0,0 +1,35 @@
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
+ return hierarchyChart;
34
+ }
35
+
@@ -30,9 +30,6 @@ export const buildTable = (config: any, componentScope: string) => {
30
30
  if (config.paginateExpandedRows) {
31
31
  table.config.main.paginateExpandedRows = config.paginateExpandedRows === "YES" ? true : false;
32
32
  }
33
- if (config.treeStructure) {
34
- table.config.main.treeStructure = config.treeStructure === "YES" ? "flatTreeMap" : false;
35
- }
36
33
  if (config.SelectionAvailable) {
37
34
  table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
38
35
  };
@@ -75,6 +72,12 @@ export const buildTable = (config: any, componentScope: string) => {
75
72
  if (config.selectKey) {
76
73
  table.config.main.selectKey = config.selectKey
77
74
  }
75
+ if (config.rowIdKey) {
76
+ table.config.main.rowIdKey = config.rowIdKey
77
+ }
78
+ if (config.parentIdKey) {
79
+ table.config.main.parentIdKey = config.parentIdKey
80
+ }
78
81
  if (config.maxPageSize) {
79
82
  table.config.main.maxPageSize = config.maxPageSize
80
83
  }
@@ -32,6 +32,9 @@ export const buildTextField = (config: any, componentScope: string) => {
32
32
  if (config.toolTipPosition) {
33
33
  inputField.config.main.toolTipPosition = config.toolTipPosition;
34
34
  }
35
+ if(config.iconName){
36
+ inputField.config.main.startIcon = config.iconName;
37
+ }
35
38
  inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
36
39
  inputField.scope = componentScope;
37
40
  return inputField;
@@ -48,6 +48,7 @@ import { buildButtonGroup } from "./buildGroupButton";
48
48
  import { buildPopOver } from "./buildPopover";
49
49
  import { buildOTP_Input } from "./buildOTP_inputs";
50
50
  import { buildPdfViewer } from "./buildPdfViewer";
51
+ import { buildHierarchyChart } from "./buildHierarchyChart";
51
52
  export let schema = {
52
53
  type: "object",
53
54
  properties: {},
@@ -222,6 +223,9 @@ const buildUiSchema = (config: any, store?: any) => {
222
223
  case "MetricCard":
223
224
  elements = buildMetricCard(config, componentScope, store);
224
225
  break;
226
+ case "HierarchyChart":
227
+ elements = buildHierarchyChart(config, componentScope, store);
228
+ break;
225
229
  case "Graph":
226
230
  switch (config.graphType) {
227
231
  case "BarGraph":
@@ -13,6 +13,7 @@ export const buildWrapperSection = (config, componentScope) => {
13
13
  wrapper.config.main.rowSpacing = Number(config.rowSpacing);
14
14
  wrapper.config.main.columnSpacing = Number(config.columnSpacing);
15
15
  wrapper.config.main.spacing = Number(config.spacing);
16
+ wrapper.config.main.wrapperId = config.wrapperId;
16
17
  if (config.defaultStyle) {
17
18
  wrapper.config.defaultStyle = config.defaultStyle === "YES" ? true : false;
18
19
  }
@@ -440,7 +440,8 @@ export const buildPropertiesSection = function (type: String) {
440
440
  { label: "Right", value: "right" },
441
441
  { label: "Bottom", value: "bottom" }
442
442
  ]),
443
- emptyBox("Radio", { xs: 6, sm: 6, md: 8, lg: 9 }),
443
+ getSelectField("iconName", "Start Icon", []),
444
+ emptyBox("Radio", { xs: 0, sm: 0, md: 0, lg: 6 }),
444
445
  getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element"),
445
446
  getInputField("keyName", "Event Key Name"),
446
447
  ]
@@ -508,6 +509,21 @@ export const buildPropertiesSection = function (type: String) {
508
509
  emptyBox("cardEmpty", { xs: 0, sm: 0, md: 8, lg: 8 })
509
510
  ];
510
511
  break;
512
+ case "HierarchyChart":
513
+ uiSchema.elements = [
514
+ getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
515
+ getSelectField("linkType", "Link Type", [
516
+ { label: "Step", value: "step" },
517
+ { label: "Diagonal", value: "diagonal" },
518
+ { label: "Line", value: "line" },
519
+ ]),
520
+ getInputField("nodeWidth", "Node Width"),
521
+ getInputField("nodeHeight", "Node Height"),
522
+ getInputField("chartHeight", "Chart Height"),
523
+ getInputField("stepPercent", "Link Bend Position"),
524
+ emptyBox("HierarchyChart", { xs: 0, sm: 0, md: 4, lg: 6 }),
525
+ ];
526
+ break;
511
527
  case "MetricCard":
512
528
  uiSchema.elements = [
513
529
  getInputField("url", "Image Url"),
@@ -602,7 +618,8 @@ export const buildPropertiesSection = function (type: String) {
602
618
  getInputField("columnSpacing", "Column Spacing"),
603
619
  getInputField("spacing", "Spacing"),
604
620
  getInputField("iconUrl", "Icon Url"),
605
- emptyBox("WrapperSectionEmpty1", { xs: 0, sm: 0, md: 4, lg: 6 }), emptyBox("WrapperSectionEmpty2")
621
+ getInputField("wrapperId", "Wrapper Id"),
622
+ emptyBox("WrapperSectionEmpty1", { xs: 6, sm: 6, md: 8, lg: 9 }), emptyBox("WrapperSectionEmpty2")
606
623
  ]
607
624
  break;
608
625
 
@@ -645,12 +662,14 @@ export const buildPropertiesSection = function (type: String) {
645
662
  { label: "Comfortable", value: "comfortable" },
646
663
  { label: "Spacious", value: "spacious" }
647
664
  ]),
665
+ getInputField("rowIdKey", "Row ID Key"),
666
+ getInputField("parentIdKey", "Parent ID Key"),
667
+ emptyBox("TreeEmpty1", { xs: 6, sm: 6, md: 4, lg: 3 }),
648
668
  buildWrapper("Tree Table Properties", [
649
669
  getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
650
670
  getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
651
671
  // getRadioInputField("enableExpandAll", "Use All Row Expanding", ["YES", "NO"]),
652
672
  getRadioInputField("paginateExpandedRows", "Multi Page Expansion", ["YES", "NO"]),
653
- getRadioInputField("treeStructure", "Flat Tree Structure", ["YES", "NO"]),
654
673
  getRadioInputField("filterFromLeafRows", "Filter from tree rows", ["YES", "NO"]),
655
674
  getInputField("defaultColumnSize", "Default Column Size"), , emptyBox("LazyLoadingTableEmpty3")
656
675
  ]),
@@ -0,0 +1,13 @@
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
+ };
@@ -40,7 +40,8 @@ export const ComponentSchema: any = {
40
40
  { title: "Rank", const: "Rank" },
41
41
  { title: "Rank Card", const: "RankCard" },
42
42
  { title: "Metric Card", const: "MetricCard" },
43
- { title: "Bow and Arrow", const: "RunnerBoyProgressBar" },
43
+ { title: "Hierarchy Chart", const: "HierarchyChart" },
44
+ { title: "Runner Boy", const: "RunnerBoyProgressBar" },
44
45
  { title: "Table", const: "Table" },
45
46
  { title: "Tabs", const: "TabSection" },
46
47
  { title: "Text", const: "Text" },
@@ -103,7 +104,14 @@ export const ComponentSchema: any = {
103
104
  { title: "Standard", const: "standard" },
104
105
  ],
105
106
  },
106
- positionVertical: {
107
+ linkType:{
108
+ oneOf:[
109
+ { title: "Step", const: "step" },
110
+ { title: "Diagonal", const: "diagonal" },
111
+ { title: "Line", const: "line" },
112
+ ]
113
+ },
114
+ positionVertical:{
107
115
  oneOf: [
108
116
  { title: "Top", const: "top" },
109
117
  { title: "Center", const: "center" },
@@ -56,7 +56,7 @@ export const EventSchema = {
56
56
  { title: "onClose", const: "onClose" },
57
57
  { title: "Key Down", const: "onKeyDown" },
58
58
  { title: "Set Style", const: "setStyle" },
59
-
59
+ { title: "Expand Node", const: "onNodeExpandChange" },
60
60
  ]
61
61
  },
62
62
  Handler: {
@@ -28,6 +28,7 @@ const sectionLabels = {
28
28
  ProgressBar: ["Core", "Properties", "Events", "Style",],
29
29
  RankCard: ["Core", "Properties", "Events", "Style",],
30
30
  MetricCard: ["Core", "Properties", "Events", "Style", "Validation"],
31
+ HierarchyChart: ["Core","Components","Properties", "Events", "Style", "Validation"],
31
32
  Slider: ["Core", "Components", "Events", "Style", "Validation"],
32
33
  Timer: ["Core", "Events", "Style",],
33
34
  Rank: ["Core", "Events", "Style",],
@@ -190,11 +190,19 @@ 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: "expandedRowIds", value: paginationValues.expandedRowIds ?? [] }
193
+ { key: "parentIds", value: paginationValues.parentIds},
194
+ { key: "isExpandAll", value: paginationValues.isExpandAll},
194
195
  ]
195
196
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
196
197
  return response?.data;
197
198
  },
199
+ onNodeExpandChange: async function (param) {
200
+ const apiBody = [
201
+ { key: "expandedNodeId", value: param.expandedNodeId }
202
+ ]
203
+ const response = await this.callExecuteEvents(param, apiBody, "onNodeExpandChange");
204
+ return response?.data;
205
+ },
198
206
  getSelectOptions: async function (param) {
199
207
  if (param.serachValue !== "" && param.serachValue !== undefined) {
200
208
  const apiBody = [