impaktapps-ui-builder 0.0.410 → 0.0.412

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.
Files changed (57) hide show
  1. package/dist/impaktapps-ui-builder.es.js +697 -872
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +14 -14
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +4 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildDate.d.ts +1 -0
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/buildTreeMap.d.ts +1 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +19 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.d.ts +19 -0
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.d.ts +1 -0
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +1 -1
  14. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +6 -0
  15. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -4
  16. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +5 -3
  17. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +9 -5
  18. package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +8 -5
  19. package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +1 -0
  20. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +9 -7
  21. package/package.json +1 -1
  22. package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +9 -5
  23. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +11 -15
  24. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +11 -1
  25. package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +46 -0
  26. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +8 -6
  27. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +6 -0
  28. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +22 -23
  29. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +9 -2
  30. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +58 -0
  32. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +54 -49
  33. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +16 -11
  34. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +34 -8
  35. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +1 -1
  36. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +19 -0
  37. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +20 -0
  38. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +1 -1
  39. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +1 -2
  40. package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +1 -0
  41. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  42. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +2 -4
  43. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +1 -1
  44. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +32 -17
  45. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +19 -213
  46. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +8 -1
  47. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +67 -274
  48. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -1
  49. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +1 -104
  50. package/src/impaktapps-ui-builder/builder/services/component.ts +59 -74
  51. package/src/impaktapps-ui-builder/builder/services/event.ts +15 -13
  52. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +17 -26
  53. package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
  54. package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +1 -1
  55. package/src/impaktapps-ui-builder/runtime/services/events.ts +141 -95
  56. package/src/impaktapps-ui-builder/runtime/services/interface.ts +2 -1
  57. package/src/impaktapps-ui-builder/runtime/services/service.ts +85 -47
@@ -1,5 +1,8 @@
1
1
  export declare const buildBasicUiSchema: (config: any) => {
2
2
  type: string;
3
- pageName: string;
3
+ pageName: any;
4
+ name: any;
5
+ accessorKey: any;
6
+ header: any;
4
7
  elements: any[];
5
8
  };
@@ -1 +1,2 @@
1
1
  export declare const buildDate: (config: any, componentScope: string) => any;
2
+ export declare const buildDateTime: (config: any, componentScope: string) => any;
@@ -0,0 +1 @@
1
+ export declare const buildInputSlider: (config: any, componentScope: any) => any;
@@ -0,0 +1 @@
1
+ export declare const buildTreeMap: (config: any, componentScope: any) => any;
@@ -1,3 +1,22 @@
1
+ export declare const getRadioInputField: (scope: String, label: String, options: string[]) => {
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
+ label: String;
16
+ options: string[];
17
+ };
18
+ };
19
+ };
1
20
  export declare const getTextArea: (scope: string, heading: string, hideButton: boolean, layout?: any) => {
2
21
  type: string;
3
22
  scope: string;
@@ -18,3 +18,22 @@ declare const _default: {
18
18
  };
19
19
  };
20
20
  export default _default;
21
+ export declare const DateTime: {
22
+ type: string;
23
+ scope: string;
24
+ options: {
25
+ widget: string;
26
+ };
27
+ config: {
28
+ layout: {
29
+ xs: number;
30
+ sm: number;
31
+ md: number;
32
+ lg: number;
33
+ };
34
+ main: {
35
+ label: string;
36
+ type: string;
37
+ };
38
+ };
39
+ };
@@ -7,6 +7,7 @@ declare const _default: {
7
7
  elements: any[];
8
8
  config: {
9
9
  main: {
10
+ onMount: string;
10
11
  columns: {};
11
12
  };
12
13
  };
@@ -7,6 +7,7 @@ declare const _default: {
7
7
  elements: any[];
8
8
  config: {
9
9
  main: {
10
+ onMount: string;
10
11
  allRowData: any[];
11
12
  downloadAllData: boolean;
12
13
  columns: {
@@ -2,7 +2,7 @@ declare const _default: {
2
2
  type: string;
3
3
  config: {
4
4
  main: {
5
- label: string;
5
+ rowSpacing: number;
6
6
  divider: boolean;
7
7
  };
8
8
  defaultStyle: boolean;
@@ -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: {
@@ -8,13 +8,11 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
8
8
  saveHandler: () => Promise<void>;
9
9
  onChange: () => void;
10
10
  editComponents: () => void;
11
- deleteComponents: (shouldUpdateDialog?: boolean) => void;
12
- deleteEvent: (shouldUpdateDialog?: boolean) => void;
11
+ deleteComponents: () => void;
12
+ deleteEvent: () => void;
13
13
  widgetAddClickHandler: () => void;
14
14
  eventEditHandler: () => void;
15
15
  eventAddHandler: () => void;
16
16
  backHandler: () => void;
17
- deletePopUpComponent: () => void;
18
- deletePopUpEvent: () => void;
19
17
  };
20
18
  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;
@@ -81,8 +84,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
81
84
  onChange: () => void;
82
85
  addEvent: () => void;
83
86
  editEvent: () => void;
84
- deleteEvent: () => Promise<void>;
87
+ deleteEvent: () => void;
85
88
  backHandler: () => void;
86
- deletePopUpEvent: () => void;
87
89
  };
88
90
  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: {
@@ -51,11 +57,9 @@ declare const _default: (funcParams: funcParamsProps) => {
51
57
  onAddClickHandler: () => void;
52
58
  saveHandler: () => Promise<void>;
53
59
  Edit_Components: () => void;
54
- Delete_Components: () => Promise<void>;
60
+ Delete_Components: () => void;
55
61
  eventAddHandler: () => void;
56
62
  editEvent: () => void;
57
63
  deleteEvent: () => void;
58
- deletePopUpComponent: () => void;
59
- deletePopUpEvent: () => void;
60
64
  };
61
65
  export default _default;
@@ -1,8 +1,11 @@
1
1
  import { handlersProps } from "./interface";
2
- export declare const executeEvents: (params: handlersProps) => Promise<any>;
3
- export declare function executeRefreshHandler(params: handlersProps): Promise<void>;
4
- export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): Promise<{
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<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 getRefreshElements(eventConfig: any, eventGropus: any): string[];
10
+ };
11
+ export declare function asyncOperation(): Promise<unknown>;
@@ -8,4 +8,5 @@ export interface handlersProps {
8
8
  serviceHolder: any;
9
9
  eventGroups?: any;
10
10
  parentEventOutput?: any;
11
+ functionsProvider?: Record<string, any>;
11
12
  }
@@ -1,18 +1,20 @@
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
- onClick: () => Promise<void>;
14
- onFileDownload: () => Promise<void>;
15
- onFileUpload: () => Promise<void>;
12
+ onCellRenderer: (cellParams: any) => {};
13
+ onClick: () => void;
14
+ onMount: () => void;
15
+ onFileDownload: () => void;
16
+ onFileUpload: () => void;
17
+ backHandler: () => void;
16
18
  onPaginationChange: (paginationValues: any) => Promise<any>;
17
19
  getSelectOptions: (param: any) => Promise<any>;
18
20
  onChange: () => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.410",
3
+ "version": "0.0.412",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -1,6 +1,10 @@
1
- export const buildBasicUiSchema = (config)=>{
2
- return {
1
+ export const buildBasicUiSchema = (config) => {
2
+ return {
3
3
  "type": "HorizontalLayout",
4
- pageName:`${config.name}`,
5
- "elements": []}
6
- }
4
+ pageName: config.name,
5
+ name: config.name,
6
+ accessorKey: config.name,
7
+ header: config.label || config.name,
8
+ "elements": []
9
+ }
10
+ }
@@ -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
- // if (formData?.layout) {
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,7 +27,7 @@ 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
32
  xs: 11,
40
33
  sm: 11,
@@ -43,14 +36,17 @@ export const createLayoutFormat = (config: any[]) => {
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[0].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,4 +1,4 @@
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
 
@@ -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
  }
@@ -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: 12,
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,20 +1,22 @@
1
1
  import leaderBoard from "./uischema/leaderBoard";
2
- import buildUiSchema from "./buildUiSchema";
2
+ import buildUiSchema from "./buildUiSchema";
3
3
  import _ from "lodash";
4
+ import { createLayoutFormat } from "./buildConfig";
4
5
 
5
6
 
6
7
  export const buildLeaderBoard = (config) => {
7
- const LeaderBoard:any = _.cloneDeep(leaderBoard)
8
+ const LeaderBoard: any = _.cloneDeep(leaderBoard)
8
9
  if (config.elements) {
9
10
  const modifyColumns = config.elements.map((e, i) => {
10
11
  if (!e.type) {
11
- return {accessorKey: e.name, header: e.label||e.name, }
12
+ return { accessorKey: e.name, header: e.label || e.name, }
12
13
  }
13
- const widgetSchema = {widget:buildUiSchema(e), accessorKey: e.name,header: e.label||e.name, };
14
- return {...widgetSchema };
14
+ const widgetSchema = { widget: buildUiSchema(e), accessorKey: e.name, header: e.label || e.name, };
15
+ return { ...widgetSchema };
15
16
  })
16
17
  LeaderBoard.elements[9].elements = modifyColumns;
17
18
  }
19
+ LeaderBoard.config.main.label = config.label
18
20
  if (config.name) {
19
21
  LeaderBoard.elements[0].scope = `#/properties/${config.name}/properties/firstImage`;
20
22
  LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`
@@ -34,7 +36,7 @@ export const buildLeaderBoard = (config) => {
34
36
  LeaderBoard.elements[2].config.main.url = config.thirdImage;
35
37
  }
36
38
  if (config.layout) {
37
- LeaderBoard.config.layout = config.layout;
39
+ LeaderBoard.config.layout = createLayoutFormat(config.layout);
38
40
  }
39
41
  return LeaderBoard
40
42
  }
@@ -14,6 +14,12 @@ export const buildLineGraph = (config, componentScope) => {
14
14
  if (config.bottomLabel) {
15
15
  lineGraph.config.main.bottomLabel = config.bottomLabel;
16
16
  }
17
+ if (config.yAxisValue) {
18
+ lineGraph.config.main.yAxisValue = config.yAxisValue;
19
+ }
20
+ if (config.xAxisValue) {
21
+ lineGraph.config.main.xAxisValue = config.xAxisValue;
22
+ }
17
23
  if (config.leftLabel) {
18
24
  lineGraph.config.main.leftLabel = config.leftLabel;
19
25
  }
@@ -1,27 +1,26 @@
1
1
  import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
2
2
  import { PieGraph } from "./uischema/graph";
3
3
  import _ from "lodash";
4
- // flatObjectValueInArray
5
- export const buildPieGraph = (config,componentScope) =>{
6
- const pieGraph: any = _.cloneDeep(PieGraph);
7
- if (config.layout) {
8
- pieGraph.config.layout = createLayoutFormat(config.layout);
9
- }
10
- if (config.height) {
11
- pieGraph.config.style.containerStyle.height = config.height;
12
- }
13
- if (config.legendHide) {
14
- pieGraph.config.main.legendAvailabe = config.legendHide==="YES"?false:true;
15
- }
16
- pieGraph.scope = componentScope;
17
- pieGraph.config.main.header = config.heading;
18
-
19
- if(config.legendLabels){
20
- pieGraph.config.main.tooltipDataKey = flatObjectValueInArray(config.legendLabels);
21
- }
22
-
23
- if(config.pieArcColors){
24
- pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
25
- }
26
- return pieGraph;
4
+ export const buildPieGraph = (config, componentScope) => {
5
+ const pieGraph: any = _.cloneDeep(PieGraph);
6
+ if (config.layout) {
7
+ pieGraph.config.layout = createLayoutFormat(config.layout);
8
+ }
9
+ if (config.height) {
10
+ pieGraph.config.style.containerStyle.height = config.height;
11
+ }
12
+ if (config.legendHide) {
13
+ pieGraph.config.main.legendAvailabe = config.legendHide === "YES" ? false : true;
14
+ }
15
+ pieGraph.scope = componentScope;
16
+ pieGraph.config.main.header = config.heading;
17
+
18
+ if (config.legendLabels) {
19
+ pieGraph.config.main.tooltipDataKey = flatObjectValueInArray(config.legendLabels);
20
+ }
21
+
22
+ if (config.pieArcColors) {
23
+ pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
24
+ }
25
+ return pieGraph;
27
26
  }
@@ -1,9 +1,16 @@
1
1
  import Tabsection from "./uischema/tabsection";
2
2
  import _ from "lodash";
3
- import buildUiSchema from "./buildUiSchema";
4
-
3
+
5
4
  export const buildTabSection = (config:any,componentScope:string) => {
6
5
  const tab: any = _.cloneDeep(Tabsection);
6
+ tab.scope = componentScope;
7
+
8
+ if(config.lazyLoad){
9
+ tab.config.main.lazyLoad = config.lazyLoad === "YES" ?true:false;
10
+ }
11
+ if(config.orientation){
12
+ tab.config.main.orientation = config.orientation === "YES" ?'vertical':'horizontal';
13
+ }
7
14
  if (config.sectionLabels) {
8
15
  tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
9
16
  }
@@ -2,7 +2,7 @@ import Table from "./uischema/table";
2
2
  import _ from "lodash";
3
3
  import buildUiSchema from "./buildUiSchema";
4
4
  import lazyLoadingTable from "./uischema/lazyLoadingTable";
5
-
5
+
6
6
  export const buildTable = (config: any, componentScope: string) => {
7
7
  const table: any = _.cloneDeep(Table);
8
8
  table.scope = componentScope;
@@ -0,0 +1,58 @@
1
+ import { createLayoutFormat } from "./buildConfig";
2
+ import _ from "lodash";
3
+
4
+ const TreeMap = {
5
+ "type": "Control",
6
+ "scope": "#/properties/TreeMap2",
7
+ "config": {
8
+ "main": {
9
+ "layout": "cartsian",
10
+ orientation: "vertical",
11
+ header: "Territory Hierarchy",
12
+ "linkType": "step",
13
+ graphHeight: "500px",
14
+ },
15
+ "style": {
16
+ BoxStyle: {
17
+ borderRadius: "5px",
18
+ }
19
+ }
20
+ },
21
+ "options": {
22
+ "widget": "TreeMap"
23
+ },
24
+ elements: [
25
+
26
+ ]
27
+ }
28
+
29
+
30
+ export const buildTreeMap = (config, componentScope) => {
31
+ const treMap: any = _.cloneDeep(TreeMap);
32
+ treMap.scope = componentScope;
33
+ if (config.label) {
34
+ treMap.config.main.header = config.label;
35
+ }
36
+ if (config.layout) {
37
+ treMap.config.layout = createLayoutFormat(config.layout);
38
+ }
39
+ if (config.orientation) {
40
+ treMap.config.main.orientation = config.orientation;
41
+ }
42
+ if (config.linkType) {
43
+ treMap.config.main.linkType = config.linkType;
44
+ }
45
+ if (config.graphHeight) {
46
+ treMap.config.main.graphHeight = config.graphHeight;
47
+ }
48
+ if (config.graphWidth) {
49
+ treMap.config.main.graphWidth = config.graphWidth;
50
+ }
51
+ if (config.graphZoomHeight) {
52
+ treMap.config.main.graphZoomHeight = config.graphZoomHeight;
53
+ }
54
+ if (config.graphZoomWidth) {
55
+ treMap.config.main.graphZoomWidth = config.graphZoomWidth;
56
+ }
57
+ return treMap;
58
+ }