impaktapps-ui-builder 0.0.382457 → 0.0.382460
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 +4233 -2669
- 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/buildBasicUiSchema.d.ts +4 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildCard.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDate.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildTable.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildTreeMap.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +36 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +2 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +60 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +1 -7
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +172 -86
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +15 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.d.ts +19 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +121 -119
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/file.d.ts +6 -6
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +42 -115
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +10 -288
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/progressBar.d.ts +6 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +119 -96
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/{lazyLoadingTable.d.ts → thoughtOfTheDay.d.ts} +6 -3
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/timer.d.ts +1 -14
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +17 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +17 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +9 -0
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +12 -4
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +11 -2
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +16 -3
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +8 -5
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +11 -8
- package/package.json +5 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +9 -5
- package/src/impaktapps-ui-builder/builder/build/buildButton.ts +0 -2
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +11 -7
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +15 -19
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +12 -2
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +22 -9
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +46 -0
- package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +26 -19
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +16 -2
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +24 -23
- package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildRankCard.ts +4 -10
- package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +1 -2
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +19 -8
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +9 -2
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +39 -29
- package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +22 -0
- package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +61 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +77 -57
- package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +16 -19
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +16 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +50 -27
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +3 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +174 -80
- package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +171 -75
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +43 -41
- package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +17 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +78 -56
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -12
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +13 -141
- package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +10 -357
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/progressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/rankCard.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +15 -11
- package/src/impaktapps-ui-builder/builder/build/uischema/runnerBoyProgressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +5 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +125 -97
- package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/thoughtOfTheDay.ts +14 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/timer.ts +2 -16
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +12 -12
- package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +13 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +2 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +67 -19
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +525 -166
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +12 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +757 -321
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +7 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +516 -269
- package/src/impaktapps-ui-builder/builder/services/component.ts +165 -73
- package/src/impaktapps-ui-builder/builder/services/event.ts +74 -13
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +61 -20
- package/src/impaktapps-ui-builder/builder/services/utils.ts +13 -14
- package/src/impaktapps-ui-builder/lib/index.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +154 -96
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +3 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +211 -49
- package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -14
|
@@ -22,6 +22,12 @@ export declare const PageMasterSchema: {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
template: {
|
|
26
|
+
oneOf: {
|
|
27
|
+
const: string;
|
|
28
|
+
title: string;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
25
31
|
sectionLabels: {
|
|
26
32
|
type: string;
|
|
27
33
|
items: {
|
|
@@ -33,6 +39,9 @@ export declare const PageMasterSchema: {
|
|
|
33
39
|
};
|
|
34
40
|
};
|
|
35
41
|
};
|
|
42
|
+
RemoveItemButton: {
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
};
|
|
36
45
|
};
|
|
37
46
|
required: string[];
|
|
38
47
|
};
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function refreshPage(type: string, store: any): void;
|
|
2
2
|
declare const _default: (store: any, dynamicData: any, submitHandler: any, service: any) => {
|
|
3
3
|
setPage: () => Promise<void>;
|
|
4
|
-
refreshPage:
|
|
4
|
+
refreshPage: typeof refreshPage;
|
|
5
5
|
getFormdata: () => any;
|
|
6
6
|
getSchema: () => any;
|
|
7
7
|
okHandler: () => void;
|
|
8
8
|
saveHandler: () => Promise<void>;
|
|
9
9
|
onChange: () => void;
|
|
10
10
|
editComponents: () => void;
|
|
11
|
-
deleteComponents: () => void;
|
|
12
|
-
deleteEvent: () => void;
|
|
11
|
+
deleteComponents: (shouldUpdateDialog?: boolean) => void;
|
|
12
|
+
deleteEvent: (shouldUpdateDialog?: boolean) => void;
|
|
13
13
|
widgetAddClickHandler: () => void;
|
|
14
14
|
eventEditHandler: () => void;
|
|
15
15
|
eventAddHandler: () => void;
|
|
16
16
|
backHandler: () => void;
|
|
17
|
+
deletePopUpComponent: () => void;
|
|
18
|
+
deletePopUpEvent: () => void;
|
|
19
|
+
copyPasteElement: (paramStore: any, setPage?: any) => void;
|
|
20
|
+
CopyElement: (paramStore: any, elementType: string) => void;
|
|
21
|
+
PasteElement: (setPage: any, elementType: string) => void;
|
|
22
|
+
RemoveItemButton: (paramStore?: any) => void;
|
|
23
|
+
elementPathHandler: (parentPath: string, rowId: any, elementType: string) => string;
|
|
24
|
+
ElementPathSetter: (uiSchema: any, copiedFormData?: any) => void;
|
|
17
25
|
};
|
|
18
26
|
export default _default;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
declare const _default: (store: any, dynamicData: any, submitHandler: any, service: any
|
|
1
|
+
declare const _default: (store: any, dynamicData: any, submitHandler: any, service: any, functionsName?: {
|
|
2
|
+
const: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}[]) => {
|
|
2
5
|
setPage: () => Promise<void>;
|
|
3
6
|
refreshPage: (handlerType: any, store: any) => void;
|
|
4
7
|
getFormData: () => any;
|
|
@@ -73,6 +76,9 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
73
76
|
};
|
|
74
77
|
};
|
|
75
78
|
};
|
|
79
|
+
RemoveItemButton: {
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
};
|
|
76
82
|
};
|
|
77
83
|
required: string[];
|
|
78
84
|
};
|
|
@@ -81,7 +87,10 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
81
87
|
onChange: () => void;
|
|
82
88
|
addEvent: () => void;
|
|
83
89
|
editEvent: () => void;
|
|
84
|
-
deleteEvent: () => void
|
|
90
|
+
deleteEvent: () => Promise<void>;
|
|
85
91
|
backHandler: () => void;
|
|
92
|
+
deletePopUpEvent: () => void;
|
|
93
|
+
copyPasteElement: () => void;
|
|
94
|
+
RemoveItemButton: () => void;
|
|
86
95
|
};
|
|
87
96
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
interface funcParamsProps {
|
|
2
2
|
store: any;
|
|
3
3
|
dynamicData: any;
|
|
4
|
+
pageConfigProvider: any;
|
|
4
5
|
submitHandler: any;
|
|
5
6
|
service: any;
|
|
6
|
-
config?: any;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
9
9
|
setPage: () => Promise<void>;
|
|
10
|
-
getFormdata: () => any
|
|
10
|
+
getFormdata: () => Promise<any>;
|
|
11
11
|
getUiSchema: () => any;
|
|
12
12
|
getSchema: () => {
|
|
13
13
|
type: string;
|
|
@@ -33,6 +33,12 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
+
template: {
|
|
37
|
+
oneOf: {
|
|
38
|
+
const: string;
|
|
39
|
+
title: string;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
36
42
|
sectionLabels: {
|
|
37
43
|
type: string;
|
|
38
44
|
items: {
|
|
@@ -44,6 +50,9 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
44
50
|
};
|
|
45
51
|
};
|
|
46
52
|
};
|
|
53
|
+
RemoveItemButton: {
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
};
|
|
47
56
|
};
|
|
48
57
|
required: string[];
|
|
49
58
|
};
|
|
@@ -51,9 +60,13 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
51
60
|
onAddClickHandler: () => void;
|
|
52
61
|
saveHandler: () => Promise<void>;
|
|
53
62
|
Edit_Components: () => void;
|
|
54
|
-
Delete_Components: () => void
|
|
63
|
+
Delete_Components: () => Promise<void>;
|
|
55
64
|
eventAddHandler: () => void;
|
|
56
65
|
editEvent: () => void;
|
|
57
66
|
deleteEvent: () => void;
|
|
67
|
+
deletePopUpComponent: () => void;
|
|
68
|
+
deletePopUpEvent: () => void;
|
|
69
|
+
copyPasteElement: () => void;
|
|
70
|
+
RemoveItemButton: () => void;
|
|
58
71
|
};
|
|
59
72
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const clearFromSessionStorage: () => void;
|
|
2
|
+
export default clearFromSessionStorage;
|
|
3
3
|
export declare const getNavigationHistory: (config: any, path: string | undefined) => {
|
|
4
4
|
pageName: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const saveFormdataInSessionStorage: (formData: any, path?: string) => any;
|
|
7
|
+
export declare const getFormdataFromSessionStorage: (path?: string) => any;
|
|
8
8
|
export declare function saveHandler(store: any, service: any, submitHandler: any, pageName?: string): Promise<void>;
|
|
9
9
|
export declare const navigateHandler: (store: any, isSubmitted: any, pageName?: string | boolean) => void;
|
|
10
10
|
export declare function okHandler(store: any): void;
|
|
@@ -6,4 +6,4 @@ export { schema } from "../builder/build/buildUiSchema";
|
|
|
6
6
|
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
|
-
export { default as
|
|
9
|
+
export { default as clearFromSessionStorage } from "../builder/services/utils";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { handlersProps } from "./interface";
|
|
2
|
-
export declare const executeEvents: (params: handlersProps) =>
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
2
|
+
export declare const executeEvents: (params: handlersProps) => any;
|
|
3
|
+
export declare function getRefreshElements(eventConfig: any, eventGropus: any): string[];
|
|
4
|
+
export declare function executeRefreshHandler(params: handlersProps): Promise<PromiseSettledResult<void | PromiseSettledResult<any>[]>[]>;
|
|
5
|
+
export declare function executeApiRequest(params: any): any;
|
|
6
|
+
export declare function shouldEventExecute(params: handlersProps): any;
|
|
7
|
+
export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): {
|
|
5
8
|
body: any;
|
|
6
9
|
headers: any;
|
|
7
|
-
}
|
|
8
|
-
export declare function
|
|
10
|
+
};
|
|
11
|
+
export declare function asyncOperation(): Promise<unknown>;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
export declare const extractEvents: (eventConfig: any) => any;
|
|
2
1
|
interface funcParamsProps {
|
|
3
2
|
store: any;
|
|
4
3
|
dynamicData: any;
|
|
5
|
-
config: any;
|
|
6
|
-
uiSchema: any;
|
|
7
|
-
schema: any;
|
|
8
4
|
service: any;
|
|
9
5
|
userValue: any;
|
|
6
|
+
pageDataProvider: any;
|
|
7
|
+
functionsProvider?: Record<string, any>;
|
|
10
8
|
}
|
|
9
|
+
export declare const extractEvents: (eventConfig: any) => any;
|
|
11
10
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
12
11
|
setPage: () => Promise<void>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
onCellRenderer: (cellParams: any) => {};
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
onMount: () => void;
|
|
15
|
+
onFileDownload: () => void;
|
|
16
|
+
onFileUpload: () => void;
|
|
17
|
+
backHandler: () => void;
|
|
18
|
+
onRowMovement: (paginationValues: any) => Promise<any>;
|
|
16
19
|
onPaginationChange: (paginationValues: any) => Promise<any>;
|
|
17
20
|
getSelectOptions: (param: any) => Promise<any>;
|
|
18
21
|
onChange: () => Promise<void>;
|
|
19
|
-
|
|
22
|
+
callExecuteEvents: (paramValue: any, apiBody: any, eventType: string) => Promise<any>;
|
|
20
23
|
onBack: (functionParameters: any) => Promise<void>;
|
|
21
24
|
onNext: (functionParameters: any) => Promise<void>;
|
|
22
25
|
onReset: (functionParameters: any) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impaktapps-ui-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.382460",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite",
|
|
6
6
|
"build": "tsc && vite build",
|
|
7
7
|
"preview": "vite preview"
|
|
8
8
|
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"tag": "alpha"
|
|
11
|
+
},
|
|
12
|
+
|
|
9
13
|
"dependencies": {
|
|
10
14
|
"@babel/core": "^7.16.12",
|
|
11
15
|
"@insertcoinab/gwen-react-components": "^1.2.65",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export const buildBasicUiSchema = (config)=>{
|
|
2
|
-
return
|
|
1
|
+
export const buildBasicUiSchema = (config) => {
|
|
2
|
+
return {
|
|
3
3
|
"type": "HorizontalLayout",
|
|
4
|
-
pageName
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
pageName: config.name,
|
|
5
|
+
name: config.name,
|
|
6
|
+
accessorKey: config.name,
|
|
7
|
+
heading: config.label || config.name,
|
|
8
|
+
"elements": []
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -3,8 +3,6 @@ import _ from "lodash";
|
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
5
|
export const buildButton = (config:any,componentScope:string) =>{
|
|
6
|
-
console.log("config : " , config);
|
|
7
|
-
console.log("componentScope : ", componentScope);
|
|
8
6
|
const button:any = _.cloneDeep(Button);
|
|
9
7
|
if (config.buttonType) {
|
|
10
8
|
button.options.widget = config.buttonType === "IconButton" ? "IconButton" : "Button";
|
|
@@ -2,25 +2,29 @@ import Card from "./uischema/card";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildCard = (config,componentScope) =>{
|
|
6
|
-
const card: any = _.cloneDeep(Card);
|
|
5
|
+
export const buildCard = (config,componentScope,store) =>{
|
|
6
|
+
const card: any = _.cloneDeep(Card(store.theme.myTheme));
|
|
7
7
|
if (config.style) {
|
|
8
|
-
card.config.
|
|
8
|
+
card.config.wrapperStyle = JSON.parse(config.style)
|
|
9
9
|
}
|
|
10
|
-
card.elements[0].scope = `#/properties/${config.name}/properties/value`
|
|
10
|
+
card.elements[0].elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/value`
|
|
11
11
|
card.elements[1].scope = `#/properties/${config.name}/properties/url`
|
|
12
|
-
card.elements[
|
|
12
|
+
card.elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/description`
|
|
13
13
|
if(config.layout){
|
|
14
14
|
card.config.layout = createLayoutFormat(config.layout)
|
|
15
15
|
}
|
|
16
|
+
if(config?.titleIcon){
|
|
17
|
+
card.elements[0].elements[0].elements[0].elements[0].config.main.heading = eval(`'\\${config.titleIcon}'`);
|
|
18
|
+
card.elements[0].elements[0].elements[0].elements[1].config.style.left = "24px"
|
|
19
|
+
}
|
|
16
20
|
if(config.label){
|
|
17
|
-
card.elements[0].config.main.heading = config.label;
|
|
21
|
+
card.elements[0].elements[0].elements[0].elements[1].config.main.heading = config.label;
|
|
18
22
|
}
|
|
19
23
|
if(config.url){
|
|
20
24
|
card.elements[1].config.main.url = config.url;
|
|
21
25
|
}
|
|
22
26
|
if(config.description){
|
|
23
|
-
card.elements[
|
|
27
|
+
card.elements[0].elements[0].elements[1].config.main.heading = config.description;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
|
|
@@ -3,17 +3,10 @@ import _ from "lodash";
|
|
|
3
3
|
export default (FormData: any) => {
|
|
4
4
|
const formData = _.cloneDeep(FormData)
|
|
5
5
|
let component: any = {};
|
|
6
|
-
|
|
7
|
-
// component.layout = createData(FormData?.layout, "layout");
|
|
8
|
-
// delete formData.layout
|
|
9
|
-
// }
|
|
10
|
-
// if(!formData.type ){
|
|
11
|
-
// component.type = "page";
|
|
12
|
-
// }
|
|
13
|
-
if(formData.pageName){
|
|
6
|
+
if (formData.pageName) {
|
|
14
7
|
delete formData.pageName
|
|
15
8
|
}
|
|
16
|
-
if(formData.eventsSelected){
|
|
9
|
+
if (formData.eventsSelected) {
|
|
17
10
|
delete formData.eventsSelected
|
|
18
11
|
}
|
|
19
12
|
if (formData.type === "Table" ||
|
|
@@ -25,7 +18,7 @@ export default (FormData: any) => {
|
|
|
25
18
|
delete formData.elements
|
|
26
19
|
}
|
|
27
20
|
}
|
|
28
|
-
component.events = formData.events||[];
|
|
21
|
+
component.events = formData.events || [];
|
|
29
22
|
if (formData.events) {
|
|
30
23
|
delete formData.events
|
|
31
24
|
}
|
|
@@ -34,23 +27,26 @@ export default (FormData: any) => {
|
|
|
34
27
|
};
|
|
35
28
|
|
|
36
29
|
export const createLayoutFormat = (config: any[]) => {
|
|
37
|
-
if(_.isEmpty(config)){
|
|
30
|
+
if (_.isEmpty(config)) {
|
|
38
31
|
return {
|
|
39
|
-
xs:
|
|
40
|
-
sm:
|
|
41
|
-
md:
|
|
42
|
-
lg:
|
|
32
|
+
xs: 12,
|
|
33
|
+
sm: 12,
|
|
34
|
+
md: 12,
|
|
35
|
+
lg: 12,
|
|
43
36
|
}
|
|
44
37
|
}
|
|
45
38
|
let data: any = {};
|
|
46
|
-
config.map((e:any)=>{
|
|
47
|
-
data[e.key||"xs"] = +e.value||5.5
|
|
39
|
+
config.map((e: any) => {
|
|
40
|
+
data[e.key || "xs"] = +e.value || 5.5
|
|
48
41
|
})
|
|
49
42
|
return data;
|
|
50
43
|
};
|
|
51
|
-
export const flatObjectValueInArray = (config:any[])=>{
|
|
44
|
+
export const flatObjectValueInArray = (config: any[]=[]) => {
|
|
45
|
+
if (config.length < 1) {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
52
48
|
const keyName = Object.keys(config[0])[0]
|
|
53
|
-
const data = config.map((e)=>{
|
|
49
|
+
const data = config.map((e) => {
|
|
54
50
|
return e[keyName]
|
|
55
51
|
})
|
|
56
52
|
return data;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import DateInputField from "./uischema/dateInputField";
|
|
1
|
+
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)=>{
|
|
5
|
+
export const buildDate = (config:any,componentScope:string)=> {
|
|
6
6
|
const dateInputField: any = _.cloneDeep(DateInputField);
|
|
7
7
|
dateInputField.config.main.label = config.label;
|
|
8
8
|
dateInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
@@ -11,4 +11,14 @@ export const buildDate = (config:any,componentScope:string)=>{
|
|
|
11
11
|
dateInputField.config.layout = createLayoutFormat(config.layout)
|
|
12
12
|
}
|
|
13
13
|
return dateInputField;
|
|
14
|
+
}
|
|
15
|
+
export const buildDateTime = (config:any,componentScope:string)=>{
|
|
16
|
+
const dateTimeInputField: any = _.cloneDeep(DateTime);
|
|
17
|
+
dateTimeInputField.config.main.label = config.label;
|
|
18
|
+
dateTimeInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
19
|
+
dateTimeInputField.scope = componentScope;
|
|
20
|
+
if(config.layout){
|
|
21
|
+
dateTimeInputField.config.layout = createLayoutFormat(config.layout)
|
|
22
|
+
}
|
|
23
|
+
return dateTimeInputField;
|
|
14
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
1
|
+
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
2
2
|
import { HorizontalBarGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
@@ -9,18 +9,31 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
|
|
|
9
9
|
if (config.layout) {
|
|
10
10
|
horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
|
|
11
11
|
}
|
|
12
|
+
horizontalBarGraph.config.main.type = config.graphType;
|
|
12
13
|
horizontalBarGraph.scope = componentScope;
|
|
13
14
|
horizontalBarGraph.config.main.header = config.heading;
|
|
14
|
-
if (config.
|
|
15
|
-
horizontalBarGraph.config.
|
|
15
|
+
if (config.legendHide) {
|
|
16
|
+
horizontalBarGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
16
17
|
}
|
|
17
|
-
if (config.
|
|
18
|
-
horizontalBarGraph.config.
|
|
19
|
-
|
|
18
|
+
if (config.bottomAxisAngle) {
|
|
19
|
+
horizontalBarGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
20
|
+
}
|
|
21
|
+
if (config.legendLabels) {
|
|
22
|
+
horizontalBarGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
23
|
+
}
|
|
24
|
+
if (config.pieArcColors) {
|
|
25
|
+
horizontalBarGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
26
|
+
}
|
|
27
|
+
if (config.xAxisValue) {
|
|
28
|
+
horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
|
|
20
29
|
}
|
|
21
30
|
if (config.height) {
|
|
22
|
-
horizontalBarGraph.config.style.containerStyle.height =
|
|
23
|
-
|
|
31
|
+
horizontalBarGraph.config.style.containerStyle.height = config.height;
|
|
32
|
+
}
|
|
33
|
+
if (config.leftMargin) {
|
|
34
|
+
horizontalBarGraph.config.style.labelStyle.margin ={
|
|
35
|
+
left: config.leftMargin
|
|
36
|
+
}
|
|
24
37
|
}
|
|
25
38
|
if (config.bottomLabel) {
|
|
26
39
|
horizontalBarGraph.config.main.bottomLabel =
|
|
@@ -32,4 +45,4 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
|
|
|
32
45
|
return horizontalBarGraph
|
|
33
46
|
}
|
|
34
47
|
|
|
35
|
-
export default buildHorizontalBarGraph
|
|
48
|
+
export default buildHorizontalBarGraph;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
const InputSlider = {
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/inputSlider",
|
|
7
|
+
options: {
|
|
8
|
+
widget: "InputSlider",
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
config: {
|
|
12
|
+
layout: { xs: 12, sm: 12, md: 6, lg: 6 },
|
|
13
|
+
main: {
|
|
14
|
+
limitToMax: false,
|
|
15
|
+
max: 10000,
|
|
16
|
+
step: 1000,
|
|
17
|
+
min: 0,
|
|
18
|
+
label: "Slider"
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export const buildInputSlider = (config, componentScope) => {
|
|
24
|
+
const inputSlider: any = _.cloneDeep(InputSlider);
|
|
25
|
+
inputSlider.scope = componentScope;
|
|
26
|
+
inputSlider.config.main.label = config.label
|
|
27
|
+
if (config.layout) {
|
|
28
|
+
inputSlider.config.layout = createLayoutFormat(config.layout)
|
|
29
|
+
}
|
|
30
|
+
if (config.limitToMax) {
|
|
31
|
+
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
32
|
+
}
|
|
33
|
+
if (config.max) {
|
|
34
|
+
inputSlider.config.main.max = config.max
|
|
35
|
+
}
|
|
36
|
+
if (config.step) {
|
|
37
|
+
inputSlider.config.main.step = config.step;
|
|
38
|
+
}
|
|
39
|
+
if (config.min) {
|
|
40
|
+
inputSlider.config.main.min = config.min;
|
|
41
|
+
}
|
|
42
|
+
if (config.style) {
|
|
43
|
+
inputSlider.config.main.defaultStyle = JSON.parse(config.style)
|
|
44
|
+
}
|
|
45
|
+
return inputSlider;
|
|
46
|
+
}
|
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
import leaderBoard from "./uischema/leaderBoard";
|
|
2
|
-
import
|
|
2
|
+
import buildUiSchema from "./buildUiSchema";
|
|
3
3
|
import _ from "lodash";
|
|
4
|
-
|
|
4
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
5
5
|
|
|
6
6
|
export const buildLeaderBoard = (config) => {
|
|
7
|
-
const LeaderBoard:any = _.cloneDeep(leaderBoard)
|
|
7
|
+
const LeaderBoard: any = _.cloneDeep(leaderBoard)
|
|
8
8
|
if (config.elements) {
|
|
9
9
|
const modifyColumns = config.elements.map((e, i) => {
|
|
10
10
|
if (!e.type) {
|
|
11
|
-
return {accessorKey: e.name, header: e.label||e.name, }
|
|
11
|
+
return { accessorKey: e.name, header: e.label || e.name, }
|
|
12
12
|
}
|
|
13
|
-
const widgetSchema = {widget:buildUiSchema(e), accessorKey: e.name,header: e.label||e.name, };
|
|
14
|
-
return {...widgetSchema };
|
|
13
|
+
const widgetSchema = { widget: buildUiSchema(e), accessorKey: e.name, header: e.label || e.name, };
|
|
14
|
+
return { ...widgetSchema };
|
|
15
15
|
})
|
|
16
|
-
LeaderBoard.elements
|
|
16
|
+
LeaderBoard.elements = modifyColumns;
|
|
17
17
|
}
|
|
18
|
+
LeaderBoard.config.main.label = config.label
|
|
18
19
|
if (config.name) {
|
|
19
|
-
LeaderBoard.
|
|
20
|
-
LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`
|
|
21
|
-
LeaderBoard.elements[1].scope = `#/properties/${config.name}/properties/secondImage`;
|
|
22
|
-
LeaderBoard.elements[4].scope = `#/properties/${config.name}/properties/secondName`
|
|
23
|
-
LeaderBoard.elements[2].scope = `#/properties/${config.name}/properties/thirdImage`;
|
|
24
|
-
LeaderBoard.elements[5].scope = `#/properties/${config.name}/properties/thirdName`
|
|
25
|
-
LeaderBoard.elements[9].scope = `#/properties/${config.name}/properties/table`
|
|
20
|
+
LeaderBoard.scope=`#/properties/${config.name}`
|
|
26
21
|
}
|
|
27
22
|
if (config.firstImage) {
|
|
28
|
-
LeaderBoard.
|
|
23
|
+
LeaderBoard.config.main.firstImage = config.firstImage;
|
|
29
24
|
}
|
|
30
25
|
if (config.secondImage) {
|
|
31
|
-
LeaderBoard.
|
|
26
|
+
LeaderBoard.config.main.secondImage = config.secondImage;
|
|
32
27
|
}
|
|
33
|
-
if (config.
|
|
34
|
-
LeaderBoard.
|
|
28
|
+
if (config.thirdImage) {
|
|
29
|
+
LeaderBoard.config.main.thirdImage = config.thirdImage;
|
|
30
|
+
}
|
|
31
|
+
if (config.nameKey) {
|
|
32
|
+
LeaderBoard.config.main.nameKey = config.nameKey;
|
|
33
|
+
}
|
|
34
|
+
if (config.imageKey) {
|
|
35
|
+
LeaderBoard.config.main.imageKey = config.imageKey;
|
|
36
|
+
}
|
|
37
|
+
if (config.scoreKey) {
|
|
38
|
+
LeaderBoard.config.main.scoreKey = config.scoreKey;
|
|
35
39
|
}
|
|
36
40
|
if (config.layout) {
|
|
37
|
-
LeaderBoard.config.layout = config.layout;
|
|
41
|
+
LeaderBoard.config.layout = createLayoutFormat(config.layout);
|
|
42
|
+
}
|
|
43
|
+
if (config.style) {
|
|
44
|
+
LeaderBoard.config.style = JSON.parse(config.style)
|
|
38
45
|
}
|
|
39
46
|
return LeaderBoard
|
|
40
47
|
}
|
|
@@ -11,17 +11,31 @@ export const buildLineGraph = (config, componentScope) => {
|
|
|
11
11
|
if (config.height) {
|
|
12
12
|
lineGraph.config.style.containerStyle.height = config.height;
|
|
13
13
|
}
|
|
14
|
+
if (config.leftMargin) {
|
|
15
|
+
lineGraph.config.style.labelStyle.margin ={
|
|
16
|
+
left: config.leftMargin
|
|
17
|
+
}
|
|
18
|
+
}
|
|
14
19
|
if (config.bottomLabel) {
|
|
15
20
|
lineGraph.config.main.bottomLabel = config.bottomLabel;
|
|
16
21
|
}
|
|
22
|
+
if (config.yAxisValue) {
|
|
23
|
+
lineGraph.config.main.yAxisValue = config.yAxisValue;
|
|
24
|
+
}
|
|
25
|
+
if (config.xAxisValue) {
|
|
26
|
+
lineGraph.config.main.xAxisValue = config.xAxisValue;
|
|
27
|
+
}
|
|
17
28
|
if (config.leftLabel) {
|
|
18
29
|
lineGraph.config.main.leftLabel = config.leftLabel;
|
|
19
30
|
}
|
|
20
31
|
if (config.legendHide) {
|
|
21
|
-
lineGraph.config.main.
|
|
32
|
+
lineGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
33
|
+
}
|
|
34
|
+
if (config.bottomAxisAngle) {
|
|
35
|
+
lineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
22
36
|
}
|
|
23
37
|
if (config.legendLabels) {
|
|
24
|
-
lineGraph.config.main.
|
|
38
|
+
lineGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
25
39
|
}
|
|
26
40
|
|
|
27
41
|
if (config.pieArcColors) {
|