impaktapps-ui-builder 0.0.409-a → 0.0.409-c

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.
@@ -0,0 +1 @@
1
+ export declare const buildTreeMap: (config: any, componentScope: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.409a",
3
+ "version": "0.0.409c",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -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
+ }
@@ -38,6 +38,7 @@ import { buildStepper } from "./buildStepper";
38
38
  import { buildPopUp } from "./buildPop";
39
39
  import { buildDataGrid } from "./buildDataGrid";
40
40
  import { buildInputSlider } from "./buildInputSlider";
41
+ import { buildTreeMap } from "./buildTreeMap";
41
42
  export let schema = {
42
43
  type: "object",
43
44
  properties: {},
@@ -168,6 +169,8 @@ const buildUiSchema = (config: any) => {
168
169
  let elements: any = {};
169
170
  const componentScope = `#/properties/${config.name}`;
170
171
  switch (config.type) {
172
+ case "TreeMap":
173
+ elements = buildTreeMap(config,componentScope)
171
174
  case "DateTime":
172
175
  elements = buildDateTime(config, componentScope);
173
176
  break;
@@ -235,6 +235,15 @@ const GraphSection = {
235
235
  export const buildPropertiesSection = function (type: String) {
236
236
  let uiSchema = _.cloneDeep(GraphSection);
237
237
  switch (type) {
238
+
239
+ case "TreeMap":
240
+ uiSchema.elements = [
241
+ getSelectField("orientation", "orientation",[]),
242
+ getInputField("linkType", "linkType"),
243
+ getInputField("graphHeight", "Graph Height"),
244
+ getInputField("graphWidth", "Graph Width"),
245
+ getInputField("graphZoomHeight", "Zoom Height"),
246
+ ]
238
247
  case "InputSlider":
239
248
  uiSchema.elements = [
240
249
  getInputField("max", "Max Limit"),
@@ -45,6 +45,7 @@ export const ComponentSchema: any = {
45
45
  { title: "Date Column", const: "date" },
46
46
  { title: "DateTime Column", const: "dateTime" },
47
47
  { title: "Amount Column", const: "amount" },
48
+ { title: "TreeMap", const: "TreeMap" },
48
49
  ]
49
50
  },
50
51
  orientation:{
@@ -37,6 +37,7 @@ const sectionLabels = {
37
37
  Stepper: ["Core", "Components","Properties","Event", "style"],
38
38
  DataGrid: ["Core", "Components","Properties","Event", "style"],
39
39
  InputSlider:["Core","Properties","style", "Event","Validation"],
40
+ TreeMap:["Core", "Components","Properties","style", "Event"],
40
41
  }
41
42
 
42
43
 
@@ -237,7 +237,7 @@ export default (funcParams: funcParamsProps) => {
237
237
  if (eventGroups?.[eventType]?.[path] !== undefined) {
238
238
  for (const eventConfig of eventGroups?.[eventType]?.[path]) {
239
239
  executeEventsParameters.store.functionParameters = functionParameters
240
- await executeEvents({
240
+ executeEvents({
241
241
  ...executeEventsParameters,
242
242
  config: eventConfig,
243
243
  componentName: path