impaktapps-ui-builder 1.0.621 → 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 +2002 -897
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildAreaGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildCamera.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildGroupButton.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildImage.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildMetricCard.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPopover.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +4 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.d.ts +22 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +173 -171
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +18 -50
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.d.ts +22 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.d.ts +13 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/metricCard.d.ts +17 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +15 -66
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +3 -1
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +5 -2
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +8 -4
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +66 -0
- package/src/impaktapps-ui-builder/builder/build/buildArray.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +50 -0
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +10 -10
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +23 -9
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +35 -13
- package/src/impaktapps-ui-builder/builder/build/buildDownloadFile.ts +7 -0
- package/src/impaktapps-ui-builder/builder/build/buildEmptyBox.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -28
- package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
- package/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.ts +35 -0
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +9 -3
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.ts +15 -0
- package/src/impaktapps-ui-builder/builder/build/buildImage.ts +38 -0
- package/src/impaktapps-ui-builder/builder/build/buildLabel.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +9 -3
- package/src/impaktapps-ui-builder/builder/build/buildMetricCard.tsx +37 -0
- package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +9 -0
- package/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.ts +44 -0
- package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +6 -3
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/buildPopover.ts +40 -0
- package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +31 -21
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +10 -2
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +9 -0
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +9 -3
- package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +5 -0
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +21 -11
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +9 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +144 -124
- package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +4 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +315 -21
- package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +142 -169
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +74 -19
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +30 -54
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +37 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.ts +11 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +34 -60
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +3 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +219 -75
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +61 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +94 -106
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +4 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +31 -55
- package/src/impaktapps-ui-builder/builder/services/component.ts +174 -86
- package/src/impaktapps-ui-builder/builder/services/event.ts +3 -0
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +18 -15
- package/src/impaktapps-ui-builder/builder/services/utils.ts +15 -3
- package/src/impaktapps-ui-builder/lib/index.ts +10 -9
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +42 -22
- package/src/impaktapps-ui-builder/runtime/services/events.ts +9 -11
- package/src/impaktapps-ui-builder/runtime/services/service.ts +118 -158
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
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
|
+
title: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const TableSection: (theme: any) => {
|
|
1
|
+
export declare const TableSection: (theme: any, scopeName?: string) => {
|
|
2
2
|
type: string;
|
|
3
3
|
elements: {
|
|
4
4
|
type: string;
|
|
@@ -41,20 +41,7 @@ export declare const TableSection: (theme: any) => {
|
|
|
41
41
|
disableSelection: boolean;
|
|
42
42
|
enableDrag: boolean;
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
elements: ({
|
|
46
|
-
accessorKey: string;
|
|
47
|
-
header: string;
|
|
48
|
-
type: string;
|
|
49
|
-
size: number;
|
|
50
|
-
field?: undefined;
|
|
51
|
-
widget?: undefined;
|
|
52
|
-
} | {
|
|
53
|
-
header: string;
|
|
54
|
-
field: string;
|
|
55
|
-
size: number;
|
|
56
|
-
type: string;
|
|
57
|
-
widget: {
|
|
44
|
+
action: ({
|
|
58
45
|
type: string;
|
|
59
46
|
scope: string;
|
|
60
47
|
options: {
|
|
@@ -62,28 +49,15 @@ export declare const TableSection: (theme: any) => {
|
|
|
62
49
|
};
|
|
63
50
|
config: {
|
|
64
51
|
main: {
|
|
65
|
-
|
|
52
|
+
startIcon: string;
|
|
66
53
|
size: string;
|
|
67
54
|
onClick: string;
|
|
68
55
|
tooltipMessage: string;
|
|
56
|
+
name: string;
|
|
69
57
|
styleDefault?: undefined;
|
|
70
|
-
disabled?: undefined;
|
|
71
|
-
};
|
|
72
|
-
style: {
|
|
73
|
-
fill: any;
|
|
74
|
-
"& :hover": {
|
|
75
|
-
fill: any;
|
|
76
|
-
};
|
|
77
58
|
};
|
|
78
59
|
};
|
|
79
|
-
}
|
|
80
|
-
accessorKey?: undefined;
|
|
81
|
-
} | {
|
|
82
|
-
header: string;
|
|
83
|
-
field: string;
|
|
84
|
-
size: number;
|
|
85
|
-
type: string;
|
|
86
|
-
widget: {
|
|
60
|
+
} | {
|
|
87
61
|
type: string;
|
|
88
62
|
scope: string;
|
|
89
63
|
options: {
|
|
@@ -91,47 +65,22 @@ export declare const TableSection: (theme: any) => {
|
|
|
91
65
|
};
|
|
92
66
|
config: {
|
|
93
67
|
main: {
|
|
94
|
-
|
|
95
|
-
onClick: string;
|
|
96
|
-
tooltipMessage: string;
|
|
97
|
-
size?: undefined;
|
|
98
|
-
styleDefault?: undefined;
|
|
99
|
-
disabled?: undefined;
|
|
100
|
-
};
|
|
101
|
-
style: {
|
|
102
|
-
fill: any;
|
|
103
|
-
"& :hover": {
|
|
104
|
-
fill: any;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
accessorKey?: undefined;
|
|
110
|
-
} | {
|
|
111
|
-
header: string;
|
|
112
|
-
field: string;
|
|
113
|
-
size: number;
|
|
114
|
-
type: string;
|
|
115
|
-
widget: {
|
|
116
|
-
type: string;
|
|
117
|
-
scope: string;
|
|
118
|
-
options: {
|
|
119
|
-
widget: string;
|
|
120
|
-
};
|
|
121
|
-
config: {
|
|
122
|
-
main: {
|
|
123
|
-
icon: string;
|
|
68
|
+
startIcon: string;
|
|
124
69
|
onClick: string;
|
|
125
70
|
styleDefault: boolean;
|
|
126
|
-
|
|
71
|
+
name: string;
|
|
127
72
|
size?: undefined;
|
|
128
73
|
tooltipMessage?: undefined;
|
|
129
74
|
};
|
|
130
|
-
style?: undefined;
|
|
131
75
|
};
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
|
|
76
|
+
})[];
|
|
77
|
+
};
|
|
78
|
+
elements: {
|
|
79
|
+
accessorKey: string;
|
|
80
|
+
header: string;
|
|
81
|
+
type: string;
|
|
82
|
+
size: number;
|
|
83
|
+
}[];
|
|
135
84
|
}[];
|
|
136
85
|
};
|
|
137
86
|
export declare const TableSectionSchema: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
declare const clearFromSessionStorage: () => void;
|
|
2
2
|
export default clearFromSessionStorage;
|
|
3
|
+
export declare const validateAndShowErrors: (store: any) => boolean;
|
|
3
4
|
export declare const getNavigationHistory: (config: any, path: string | undefined) => {
|
|
4
5
|
pageName: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const saveFormdataInSessionStorage: (formData: any, path?: string) => any;
|
|
7
8
|
export declare const getFormdataFromSessionStorage: (path?: string) => any;
|
|
8
9
|
export declare function saveHandler(store: any, service: any, submitHandler: any): Promise<void>;
|
|
9
|
-
export declare const navigateHandler: (store: any, isSubmitted: any, pageName?: string | boolean) => void;
|
|
10
|
+
export declare const navigateHandler: (store: any, isSubmitted: any, pageName?: string | boolean, errorMessage?: string) => void;
|
|
10
11
|
export declare function okHandler(store: any): void;
|
|
@@ -7,3 +7,4 @@ export { default as buildConfig } from "../builder/build/buildConfig";
|
|
|
7
7
|
export { default as buildUiSchema } from "../builder/build/buildUiSchema";
|
|
8
8
|
export { buildSchema } from "../builder/build/buildUiSchema";
|
|
9
9
|
export { default as clearFromSessionStorage } from "../builder/services/utils";
|
|
10
|
+
export { downloadFile, downloadFileFromUrl } from "../runtime/services/downloadFile";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
1
|
+
export declare function downloadFile({ data, name }: {
|
|
2
|
+
data: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}): void;
|
|
5
|
+
export declare const downloadFileFromUrl: (response: any, service: any) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { downloadFile } from "./downloadFile";
|
|
1
2
|
interface funcParamsProps {
|
|
2
3
|
store: any;
|
|
3
4
|
dynamicData: any;
|
|
@@ -10,24 +11,27 @@ interface funcParamsProps {
|
|
|
10
11
|
export declare const extractEvents: (eventConfig: any) => any;
|
|
11
12
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
12
13
|
setPage: () => Promise<void>;
|
|
14
|
+
getStyle: () => {};
|
|
13
15
|
onCellRenderer: (cellParams: any) => {};
|
|
14
16
|
onClick: () => void;
|
|
15
17
|
onKeyDown: () => void;
|
|
16
18
|
onFileDelete: () => Promise<void>;
|
|
19
|
+
onClose: () => void;
|
|
17
20
|
onMount: () => void;
|
|
18
21
|
onFileDownload: () => void;
|
|
19
22
|
onFileUpload: () => void;
|
|
20
23
|
backHandler: () => void;
|
|
21
24
|
onRowMovement: (paginationValues: any) => Promise<any>;
|
|
22
25
|
onPaginationChange: (paginationValues: any) => Promise<any>;
|
|
26
|
+
onNodeExpandChange: (param: any) => Promise<any>;
|
|
23
27
|
getSelectOptions: (param: any) => Promise<any>;
|
|
24
|
-
onChange: () =>
|
|
28
|
+
onChange: () => void;
|
|
25
29
|
callExecuteEvents: (paramValue: any, apiBody: any, eventType: string) => Promise<any>;
|
|
26
30
|
onBack: (functionParameters: any) => Promise<void>;
|
|
27
31
|
onNext: (functionParameters: any) => Promise<void>;
|
|
28
32
|
onReset: (functionParameters: any) => Promise<void>;
|
|
29
|
-
callHandler: (eventType: string, functionParameters?: any) =>
|
|
30
|
-
downloadFile:
|
|
31
|
-
|
|
33
|
+
callHandler: (eventType: string, functionParameters?: any) => void;
|
|
34
|
+
downloadFile: typeof downloadFile;
|
|
35
|
+
downloadFileFromUrl: (response: any, service: any) => void;
|
|
32
36
|
};
|
|
33
37
|
export default _default;
|
package/package.json
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
|
+
import { AreaBarGraph } from "./uischema/graph";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const buildAreaGraph = (config:any,componentScope:string) => {
|
|
7
|
+
const AreaGraph: any = _.cloneDeep(AreaBarGraph);
|
|
8
|
+
AreaGraph.scope = componentScope;
|
|
9
|
+
if (config.layout) {
|
|
10
|
+
AreaGraph.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11
|
+
}
|
|
12
|
+
AreaGraph.config.main.type = config.graphType;
|
|
13
|
+
AreaGraph.scope = componentScope;
|
|
14
|
+
AreaGraph.config.main.header = config.heading;
|
|
15
|
+
AreaGraph.config.main.subHeader = config.subHeader;
|
|
16
|
+
if (config.legendHide) {
|
|
17
|
+
AreaGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
18
|
+
}
|
|
19
|
+
if (config.bottomAxisAngle) {
|
|
20
|
+
AreaGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
21
|
+
}
|
|
22
|
+
if (config.legendLabels) {
|
|
23
|
+
AreaGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
24
|
+
}
|
|
25
|
+
if(config.legendDirection){
|
|
26
|
+
AreaGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
27
|
+
}
|
|
28
|
+
if (config.height) {
|
|
29
|
+
AreaGraph.config.style.containerStyle.height = config.height;
|
|
30
|
+
}
|
|
31
|
+
if (config.pieArcColors) {
|
|
32
|
+
AreaGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
33
|
+
}
|
|
34
|
+
if(config.xAxisFormatType){
|
|
35
|
+
AreaGraph.config.main.xAxisFormatType = config.xAxisFormatType
|
|
36
|
+
}
|
|
37
|
+
if(config.yAxisTickCount){
|
|
38
|
+
AreaGraph.config.main.yAxisTickCount = config.yAxisTickCount
|
|
39
|
+
}
|
|
40
|
+
if(config.xAxisTickCount){
|
|
41
|
+
AreaGraph.config.main.xAxisTickCount = config.xAxisTickCount
|
|
42
|
+
}
|
|
43
|
+
if (config.xAxisValue) {
|
|
44
|
+
AreaGraph.config.main.xAxisValue = config.xAxisValue;
|
|
45
|
+
}
|
|
46
|
+
if(config.xAxisType) {
|
|
47
|
+
AreaGraph.config.main.xAxisType = config.xAxisType;
|
|
48
|
+
}
|
|
49
|
+
if (config.bottomLabel) {
|
|
50
|
+
AreaGraph.config.main.bottomLabel = config.bottomLabel;
|
|
51
|
+
}
|
|
52
|
+
if (config.leftLabel) {
|
|
53
|
+
AreaGraph.config.main.leftLabel = config.leftLabel;
|
|
54
|
+
}
|
|
55
|
+
if (config.disableLeftLabel) {
|
|
56
|
+
AreaGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
|
|
57
|
+
}
|
|
58
|
+
if (config.leftMargin) {
|
|
59
|
+
AreaGraph.config.style.labelStyle.margin ={
|
|
60
|
+
left: config.leftMargin
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return AreaGraph
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default buildAreaGraph;
|
|
@@ -15,10 +15,23 @@ export const buildArray = (config: any, componentScope: string) => {
|
|
|
15
15
|
if (config.allExpanded) {
|
|
16
16
|
array.config.main.allExpanded = config.allExpanded === "YES" ? true : false
|
|
17
17
|
}
|
|
18
|
+
if (config.disableAddButton) {
|
|
19
|
+
array.config.main.disableAddButton = config.disableAddButton === "YES" ? true : false
|
|
20
|
+
}
|
|
21
|
+
if (config.disableExpandAllButton) {
|
|
22
|
+
array.config.main.disableExpandAllButton = config.disableExpandAllButton === "YES" ? true : false
|
|
23
|
+
}
|
|
24
|
+
if (config.disableRowActions) {
|
|
25
|
+
array.config.main.disableRowActions = config.disableRowActions === "YES" ? true : false
|
|
26
|
+
}
|
|
18
27
|
if (config.style) {
|
|
19
28
|
array.config.style = JSON.parse(config.style)
|
|
20
29
|
}
|
|
30
|
+
array.config.main.rowSpacing = Number(config.rowSpacing);
|
|
31
|
+
array.config.main.columnSpacing = Number(config.columnSpacing);
|
|
32
|
+
array.config.main.spacing = Number(config.spacing);
|
|
21
33
|
array.config.main.childElementLabel = config.childElementLabel;
|
|
34
|
+
array.config.main.showKeyAsLabel = config.showKeyAsLabel;
|
|
22
35
|
array.config.main.label = config.label;
|
|
23
36
|
array.scope = componentScope;
|
|
24
37
|
return array;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
+
|
|
4
|
+
const cameraUiSchema = {
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/camera",
|
|
7
|
+
|
|
8
|
+
options: {
|
|
9
|
+
widget: "Camera",
|
|
10
|
+
},
|
|
11
|
+
config: {
|
|
12
|
+
main: {
|
|
13
|
+
label: "Upload Photo",
|
|
14
|
+
multiUplaod: false,
|
|
15
|
+
onUpload: "onFileUpload",
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const buildCamera = (config: any, componentScope: string) => {
|
|
20
|
+
const camera: any = _.cloneDeep(cameraUiSchema);
|
|
21
|
+
camera.scope = componentScope;
|
|
22
|
+
if (config.iconName) {
|
|
23
|
+
camera.config.main.startIcon = config.iconName;
|
|
24
|
+
}
|
|
25
|
+
if (config.layout) {
|
|
26
|
+
camera.config.layout = createLayoutFormat(config.layout, config.type);
|
|
27
|
+
}
|
|
28
|
+
if (config.tooltipMessage) {
|
|
29
|
+
camera.config.main.tooltipMessage = config.tooltipMessage;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
camera.config.main.multiUplaod = config.multiUplaod === "YES" ? true : false;
|
|
33
|
+
|
|
34
|
+
if (config.style) {
|
|
35
|
+
camera.config.style = JSON.parse(config.style);
|
|
36
|
+
}
|
|
37
|
+
if (config.size) {
|
|
38
|
+
camera.config.main.size = config.size;
|
|
39
|
+
}
|
|
40
|
+
if (config.variant) {
|
|
41
|
+
camera.config.main.variant = config.variant;
|
|
42
|
+
}
|
|
43
|
+
if (config.color) {
|
|
44
|
+
camera.config.main.color = config.color
|
|
45
|
+
}
|
|
46
|
+
if (config.label) {
|
|
47
|
+
camera.config.main.label = config.label;
|
|
48
|
+
}
|
|
49
|
+
return camera;
|
|
50
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import Card from "./uischema/card";
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
export const buildCard = (config,componentScope,store) =>{
|
|
6
6
|
const card: any = _.cloneDeep(Card(store.theme.myTheme));
|
|
7
7
|
if (config.style) {
|
|
8
8
|
card.config.wrapperStyle = JSON.parse(config.style)
|
|
9
|
-
}
|
|
10
|
-
card.elements[0].
|
|
11
|
-
card.elements[1].scope = `#/properties/${config.name}/properties/
|
|
12
|
-
card.elements[
|
|
9
|
+
}
|
|
10
|
+
card.elements[0].scope = `#/properties/${config.name}/properties/url`;
|
|
11
|
+
card.elements[1].scope = `#/properties/${config.name}/properties/label`;
|
|
12
|
+
card.elements[2].scope = `#/properties/${config.name}/properties/value`;
|
|
13
|
+
|
|
14
|
+
card.elements[3].scope = `#/properties/${config.name}/properties/description`;
|
|
13
15
|
if(config.layout){
|
|
14
16
|
card.config.layout = createLayoutFormat(config.layout)
|
|
15
17
|
}
|
|
@@ -18,16 +20,14 @@ export const buildCard = (config,componentScope,store) =>{
|
|
|
18
20
|
card.elements[0].elements[0].elements[0].elements[1].config.style.left = "24px"
|
|
19
21
|
}
|
|
20
22
|
if(config.label){
|
|
21
|
-
card.elements[
|
|
23
|
+
card.elements[1].config.main.heading = config.label;
|
|
22
24
|
}
|
|
23
25
|
if(config.url){
|
|
24
|
-
card.elements[
|
|
26
|
+
card.elements[0].config.main.url = config.url;
|
|
25
27
|
}
|
|
26
28
|
if(config.description){
|
|
27
|
-
card.elements[
|
|
29
|
+
card.elements[3].config.main.heading = config.description;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
32
|
return card;
|
|
33
33
|
}
|
|
@@ -22,31 +22,37 @@ 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
|
+
}
|
|
25
29
|
component = { ...formData, ...component };
|
|
26
30
|
return component;
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
export const createLayoutFormat = (layout: any[], type?: string) => {
|
|
30
34
|
if (_.isEmpty(layout)) {
|
|
31
|
-
const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought"]
|
|
32
|
-
if(fullLayoutComponents.includes(type)){
|
|
35
|
+
const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout", "Table"]
|
|
36
|
+
if (fullLayoutComponents.includes(type)) {
|
|
33
37
|
return { xs: 12, sm: 12, md: 12, lg: 12 }
|
|
34
38
|
}
|
|
35
|
-
else if(type === "Graph"){
|
|
36
|
-
return {xs
|
|
39
|
+
else if (type === "Graph") {
|
|
40
|
+
return { xs: 12, sm: 12, md: 12, lg: 6 }
|
|
37
41
|
}
|
|
38
|
-
else if(type === "Button"){
|
|
42
|
+
else if (type === "Button") {
|
|
39
43
|
return { xs: 4, sm: 2.5, md: 2, lg: 1.5 }
|
|
40
44
|
}
|
|
41
|
-
else{
|
|
45
|
+
else {
|
|
42
46
|
return { xs: 6, sm: 6, md: 4, lg: 3 }
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
|
-
let data: any = {
|
|
49
|
+
let data: any = {};
|
|
46
50
|
|
|
47
51
|
layout.map((e: any) => {
|
|
48
|
-
data[e.key || "xs"] =
|
|
49
|
-
|
|
52
|
+
data[e.key || "xs"] =
|
|
53
|
+
e.value === null || e.value === undefined || e.value === ""
|
|
54
|
+
? 5.5
|
|
55
|
+
: +e.value;
|
|
50
56
|
})
|
|
51
57
|
return data;
|
|
52
58
|
};
|
|
@@ -60,3 +66,11 @@ export const flatObjectValueInArray = (config: any[] = []) => {
|
|
|
60
66
|
})
|
|
61
67
|
return data;
|
|
62
68
|
}
|
|
69
|
+
|
|
70
|
+
export const createKeyValueMap = (config: any[] = []) => {
|
|
71
|
+
return config.reduce((acc, item) => {
|
|
72
|
+
if (!item.key) return acc
|
|
73
|
+
acc[item.key] = item.value
|
|
74
|
+
return acc
|
|
75
|
+
}, {})
|
|
76
|
+
}
|
|
@@ -2,23 +2,45 @@ import DateInputField, { DateTime } from "./uischema/dateInputField";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildDate = (config:any,componentScope:string)=> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
export const buildDate = (config: any, componentScope: string) => {
|
|
6
|
+
const dateInputField: any = _.cloneDeep(DateInputField);
|
|
7
|
+
dateInputField.config.main.label = config.label;
|
|
8
|
+
dateInputField.scope = componentScope;
|
|
9
|
+
if (config.layout) {
|
|
10
|
+
dateInputField.config.layout = createLayoutFormat(config.layout)
|
|
11
|
+
}
|
|
12
|
+
if (config.variant) {
|
|
13
|
+
dateInputField.config.main.variant = config.variant;
|
|
14
|
+
}
|
|
15
|
+
if (config.toolTip) {
|
|
16
|
+
dateInputField.config.main.toolTip = config.toolTip;
|
|
17
|
+
}
|
|
18
|
+
if (config.toolTipPosition) {
|
|
19
|
+
dateInputField.config.main.toolTipPosition = config.toolTipPosition;
|
|
20
|
+
}
|
|
21
|
+
if (config.style) {
|
|
22
|
+
dateInputField.config.style = JSON.parse(config.style)
|
|
23
|
+
}
|
|
24
|
+
return dateInputField;
|
|
14
25
|
}
|
|
15
|
-
export const buildDateTime = (config:any,componentScope:string)=>{
|
|
26
|
+
export const buildDateTime = (config: any, componentScope: string) => {
|
|
16
27
|
const dateTimeInputField: any = _.cloneDeep(DateTime);
|
|
17
28
|
dateTimeInputField.config.main.label = config.label;
|
|
18
|
-
dateTimeInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
19
29
|
dateTimeInputField.scope = componentScope;
|
|
20
|
-
if(config.layout){
|
|
30
|
+
if (config.layout) {
|
|
21
31
|
dateTimeInputField.config.layout = createLayoutFormat(config.layout)
|
|
22
|
-
|
|
32
|
+
}
|
|
33
|
+
if (config.variant) {
|
|
34
|
+
dateTimeInputField.config.main.variant = config.variant;
|
|
35
|
+
}
|
|
36
|
+
if (config.toolTip) {
|
|
37
|
+
dateTimeInputField.config.main.toolTip = config.toolTip;
|
|
38
|
+
}
|
|
39
|
+
if (config.toolTipPosition) {
|
|
40
|
+
dateTimeInputField.config.main.toolTipPosition = config.toolTipPosition;
|
|
41
|
+
}
|
|
42
|
+
if (config.style) {
|
|
43
|
+
dateTimeInputField.config.style = JSON.parse(config.style)
|
|
44
|
+
}
|
|
23
45
|
return dateTimeInputField;
|
|
24
46
|
}
|
|
@@ -5,6 +5,7 @@ import { createLayoutFormat } from "./buildConfig";
|
|
|
5
5
|
export const buildDownloadFile = (config,componentScope) => {
|
|
6
6
|
const DownloadFile: any = _.cloneDeep(downloadFile);
|
|
7
7
|
DownloadFile.scope = componentScope;
|
|
8
|
+
DownloadFile.config.main.label = config.label;
|
|
8
9
|
if (config.layout) {
|
|
9
10
|
DownloadFile.config.layout = config.layout;
|
|
10
11
|
}
|
|
@@ -20,5 +21,11 @@ export const buildDownloadFile = (config,componentScope) => {
|
|
|
20
21
|
if (config.errorMessage) {
|
|
21
22
|
DownloadFile.config.main.errorMessage = config.errorMessage;
|
|
22
23
|
}
|
|
24
|
+
if (config.toolTip) {
|
|
25
|
+
DownloadFile.config.main.toolTip = config.toolTip;
|
|
26
|
+
}
|
|
27
|
+
if (config.toolTipPosition) {
|
|
28
|
+
DownloadFile.config.main.toolTipPosition = config.toolTipPosition;
|
|
29
|
+
}
|
|
23
30
|
return DownloadFile;
|
|
24
31
|
}
|
|
@@ -4,8 +4,12 @@ import emptyBox from "./uischema/emptyBox";
|
|
|
4
4
|
|
|
5
5
|
export const buildEmptyBox = (config,componentScope) =>{
|
|
6
6
|
const EmptyBox: any = _.cloneDeep(emptyBox);
|
|
7
|
+
EmptyBox.scope = componentScope;
|
|
7
8
|
if (config.layout) {
|
|
8
9
|
EmptyBox.config.layout = createLayoutFormat(config.layout);
|
|
9
10
|
}
|
|
11
|
+
if (config.style) {
|
|
12
|
+
EmptyBox.config.style = JSON.parse(config.style)
|
|
13
|
+
}
|
|
10
14
|
return EmptyBox;
|
|
11
15
|
}
|