impaktapps-ui-builder 1.0.485 → 1.0.487

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.485",
3
+ "version": "1.0.487",
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
+
@@ -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":
@@ -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"),
@@ -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,6 +40,7 @@ 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: "Hierarchy Chart", const: "HierarchyChart" },
43
44
  { title: "Runner Boy", const: "RunnerBoyProgressBar" },
44
45
  { title: "Table", const: "Table" },
45
46
  { title: "Tabs", const: "TabSection" },
@@ -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",],
@@ -196,6 +196,13 @@ export default (funcParams: funcParamsProps) => {
196
196
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
197
197
  return response?.data;
198
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
+ },
199
206
  getSelectOptions: async function (param) {
200
207
  if (param.serachValue !== "" && param.serachValue !== undefined) {
201
208
  const apiBody = [