impaktapps-ui-builder 1.0.457 → 1.0.470
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.
- package/dist/impaktapps-ui-builder.es.js +73 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +2 -2
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.d.ts +22 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.ts +35 -0
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +15 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.ts +13 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +9 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +7 -0
|
@@ -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
|
@@ -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
|
+
|
|
@@ -10,7 +10,6 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
10
10
|
}
|
|
11
11
|
if (config.lazyLoading) {
|
|
12
12
|
table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
13
|
-
table.config.main.lazyTree = config.lazyLoading === "YES" ? true : false;
|
|
14
13
|
}
|
|
15
14
|
if (config.defaultColumnSize) {
|
|
16
15
|
table.config.main.defaultColumnSize = config.defaultColumnSize
|
|
@@ -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":
|
|
@@ -508,6 +508,21 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
508
508
|
emptyBox("cardEmpty", { xs: 0, sm: 0, md: 8, lg: 8 })
|
|
509
509
|
];
|
|
510
510
|
break;
|
|
511
|
+
case "HierarchyChart":
|
|
512
|
+
uiSchema.elements = [
|
|
513
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
514
|
+
getSelectField("linkType", "Link Type", [
|
|
515
|
+
{ label: "Step", value: "step" },
|
|
516
|
+
{ label: "Diagonal", value: "diagonal" },
|
|
517
|
+
{ label: "Line", value: "line" },
|
|
518
|
+
]),
|
|
519
|
+
getInputField("nodeWidth", "Node Width"),
|
|
520
|
+
getInputField("nodeHeight", "Node Height"),
|
|
521
|
+
getInputField("chartHeight", "Chart Height"),
|
|
522
|
+
getInputField("stepPercent", "Link Bend Position"),
|
|
523
|
+
emptyBox("HierarchyChart", { xs: 0, sm: 0, md: 4, lg: 6 }),
|
|
524
|
+
];
|
|
525
|
+
break;
|
|
511
526
|
case "MetricCard":
|
|
512
527
|
uiSchema.elements = [
|
|
513
528
|
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
|
-
|
|
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" },
|
|
@@ -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 = [
|