impaktapps-ui-builder 1.0.486 → 1.0.622
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 +92 -21
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- 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/buildEmptyBox.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.ts +35 -0
- package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +0 -3
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +0 -3
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +17 -5
- 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/downloadFile.ts +12 -7
- package/src/impaktapps-ui-builder/runtime/services/service.ts +8 -1
|
@@ -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
|
+
|
|
@@ -27,9 +27,6 @@ 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
|
-
}
|
|
33
30
|
if (config.style) {
|
|
34
31
|
multipleSelect.config.style = JSON.parse(config.style);
|
|
35
32
|
}
|
|
@@ -26,9 +26,6 @@ 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
|
-
}
|
|
32
29
|
if (config.style) {
|
|
33
30
|
selectInputField.config.style = JSON.parse(config.style);
|
|
34
31
|
}
|
|
@@ -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":
|
|
@@ -509,6 +509,21 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
509
509
|
emptyBox("cardEmpty", { xs: 0, sm: 0, md: 8, lg: 8 })
|
|
510
510
|
];
|
|
511
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;
|
|
512
527
|
case "MetricCard":
|
|
513
528
|
uiSchema.elements = [
|
|
514
529
|
getInputField("url", "Image Url"),
|
|
@@ -689,8 +704,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
689
704
|
{ label: "Right", value: "right" },
|
|
690
705
|
{ label: "Bottom", value: "bottom" }
|
|
691
706
|
]),
|
|
692
|
-
|
|
693
|
-
emptyBox("SelectEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
|
|
707
|
+
emptyBox("SelectEmpty", { xs: 6, sm: 6, md: 8, lg: 9 })
|
|
694
708
|
]
|
|
695
709
|
break;
|
|
696
710
|
case "MultipleSelect":
|
|
@@ -707,9 +721,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
707
721
|
{ label: "Left", value: "left" },
|
|
708
722
|
{ label: "Right", value: "right" },
|
|
709
723
|
{ label: "Bottom", value: "bottom" }
|
|
710
|
-
])
|
|
711
|
-
getRadioInputField("grouping", "Grouping", ["YES", "NO"]),
|
|
712
|
-
emptyBox("MultipleSelectEmpty", { xs: 6, sm: 6, md: 8, lg: 9 })
|
|
724
|
+
])
|
|
713
725
|
]
|
|
714
726
|
break;
|
|
715
727
|
case "PdfViewer":
|
|
@@ -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",],
|
|
@@ -30,15 +30,20 @@ export function downloadFile({ data, name }: { data: string; name: string }) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export const downloadFileFromUrl = (response: any, service) => {
|
|
33
|
-
|
|
33
|
+
const url = new URL(response.path, service.defaults.baseURL);
|
|
34
34
|
if (response?.params) {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
for (const [key, value] of Object.entries(response.params)) {
|
|
36
|
+
if (value == null) continue;
|
|
37
|
+
|
|
38
|
+
url.searchParams.append(
|
|
39
|
+
key,
|
|
40
|
+
Array.isArray(value) ? value.join(",") : String(value),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
40
44
|
const link = document.createElement('a');
|
|
41
|
-
link.href = url;
|
|
45
|
+
link.href = url.toString();
|
|
46
|
+
link.download = "";
|
|
42
47
|
document.body.appendChild(link);
|
|
43
48
|
link.click();
|
|
44
49
|
link.parentNode.removeChild(link);
|
|
@@ -66,7 +66,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
66
66
|
let executeEventsParameters: handlersProps = {
|
|
67
67
|
config: {}, componentName: "",
|
|
68
68
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
69
|
-
serviceHolder: { downloadFile,
|
|
69
|
+
serviceHolder: { downloadFile, downloadFileFromUrl: downloadFileFromUrl, ...funcParams.functionsProvider }, eventGroups,
|
|
70
70
|
functionsProvider: funcParams.functionsProvider, formDataHolder
|
|
71
71
|
};
|
|
72
72
|
return {
|
|
@@ -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 = [
|