impaktapps-ui-builder 1.0.213-test.4 → 1.0.214

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.
@@ -7756,7 +7756,7 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
7756
7756
  ]
7757
7757
  };
7758
7758
  };
7759
- const getArrayControlSecond = (parentScope, childScopeOne, childScopeSecond, childLabelOne, childLabelSecond) => {
7759
+ const getArrayControlMultiField = (parentScope, firstFieldScope, secondFieldScope, firstFieldLabel, secondFieldLabel) => {
7760
7760
  return {
7761
7761
  type: "Control",
7762
7762
  scope: `#/properties/${parentScope}`,
@@ -7765,10 +7765,7 @@ const getArrayControlSecond = (parentScope, childScopeOne, childScopeSecond, chi
7765
7765
  },
7766
7766
  config: {
7767
7767
  layout: 12,
7768
- main: {
7769
- label: childLabelSecond,
7770
- childElementLabel: childLabelOne
7771
- },
7768
+ main: {},
7772
7769
  style: {
7773
7770
  marginLeft: "-24px",
7774
7771
  marginBottom: "24px !important",
@@ -7783,27 +7780,27 @@ const getArrayControlSecond = (parentScope, childScopeOne, childScopeSecond, chi
7783
7780
  elements: [
7784
7781
  {
7785
7782
  type: "Control",
7786
- scope: `#/properties/${childScopeOne}`,
7783
+ scope: `#/properties/${firstFieldScope}`,
7787
7784
  options: {
7788
7785
  widget: "InputField"
7789
7786
  },
7790
7787
  config: {
7791
7788
  layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7792
7789
  main: {
7793
- label: childLabelOne || "Labels for Tab"
7790
+ label: firstFieldLabel || "Labels for Tab"
7794
7791
  }
7795
7792
  }
7796
7793
  },
7797
7794
  {
7798
7795
  type: "Control",
7799
- scope: `#/properties/${childScopeSecond}`,
7796
+ scope: `#/properties/${secondFieldScope}`,
7800
7797
  options: {
7801
7798
  widget: "InputField"
7802
7799
  },
7803
7800
  config: {
7804
7801
  layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7805
7802
  main: {
7806
- label: childLabelSecond || "Labels for Tab"
7803
+ label: secondFieldLabel || "Labels for Tab"
7807
7804
  }
7808
7805
  }
7809
7806
  },
@@ -8117,8 +8114,8 @@ const buildPropertiesSection = function(type) {
8117
8114
  getInputField("yAxisTickCount", "Y Axis TickCount"),
8118
8115
  getSelectField("xAxisFormatType", "X Axis Format Type"),
8119
8116
  emptyBox$1("GraphEmpty1", { xs: 0, sm: 0, md: 4, lg: 6 }),
8120
- getArrayControlSecond("legendLabels", "key", "label", "Key", "Label"),
8121
- getArrayControlSecond("pieArcColors", "key2", "color", "Key", "Color")
8117
+ getArrayControlMultiField("legendLabels", "key", "value", "Key", "Label"),
8118
+ getArrayControlMultiField("pieArcColors", "key", "value", "Key", "Color")
8122
8119
  ];
8123
8120
  break;
8124
8121
  case "WrapperSection":
@@ -8622,19 +8619,11 @@ const flatObjectValueInArray = (config2 = []) => {
8622
8619
  });
8623
8620
  return data;
8624
8621
  };
8625
- const createValueLegendMap = (config2 = []) => {
8622
+ const createKeyValueMap = (config2 = []) => {
8626
8623
  return config2.reduce((acc, item) => {
8627
8624
  if (!item.key)
8628
8625
  return acc;
8629
- acc[item.key] = item.label;
8630
- return acc;
8631
- }, {});
8632
- };
8633
- const createValueColorMap = (config2 = []) => {
8634
- return config2.reduce((acc, item) => {
8635
- if (!item.key2)
8636
- return acc;
8637
- acc[item.key2] = item.color;
8626
+ acc[item.key] = item.value;
8638
8627
  return acc;
8639
8628
  }, {});
8640
8629
  };
@@ -11139,13 +11128,13 @@ const buildHorizontalBarGraph = (config2, componentScope2) => {
11139
11128
  horizontalBarGraph.config.main.bottomAxisAngle = config2.bottomAxisAngle === "YES" ? true : false;
11140
11129
  }
11141
11130
  if (config2.legendLabels) {
11142
- horizontalBarGraph.config.main.legendLabels = flatObjectValueInArray(config2.legendLabels);
11131
+ horizontalBarGraph.config.main.legendLabels = createKeyValueMap(config2.legendLabels);
11143
11132
  }
11144
11133
  if (config2.legendDirection) {
11145
11134
  horizontalBarGraph.config.main.legendDirection = config2.legendDirection === "Row" ? "row" : "column";
11146
11135
  }
11147
11136
  if (config2.pieArcColors) {
11148
- horizontalBarGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config2.pieArcColors);
11137
+ horizontalBarGraph.config.style.barStyle.colorRange = createKeyValueMap(config2.pieArcColors);
11149
11138
  }
11150
11139
  if (config2.xAxisValue) {
11151
11140
  horizontalBarGraph.config.main.xAxisValue = config2.xAxisValue;
@@ -11279,13 +11268,13 @@ const buildPieGraph = (config2, componentScope2) => {
11279
11268
  pieGraph.scope = componentScope2;
11280
11269
  pieGraph.config.main.header = config2.heading;
11281
11270
  if (config2.legendLabels) {
11282
- pieGraph.config.main.legendLabels = flatObjectValueInArray(config2.legendLabels);
11271
+ pieGraph.config.main.legendLabels = createKeyValueMap(config2.legendLabels);
11283
11272
  }
11284
11273
  if (config2.xAxisValue) {
11285
11274
  pieGraph.config.main.xAxisValue = config2.xAxisValue;
11286
11275
  }
11287
11276
  if (config2.pieArcColors) {
11288
- pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config2.pieArcColors);
11277
+ pieGraph.config.style.pieStyle.colorRange = createKeyValueMap(config2.pieArcColors);
11289
11278
  }
11290
11279
  return pieGraph;
11291
11280
  };
@@ -11308,10 +11297,10 @@ const buildStackbarGraph = (config2, componentScope2) => {
11308
11297
  barGraph.config.main.type = (_a = config2 == null ? void 0 : config2.graphType) != null ? _a : "BarGraph";
11309
11298
  barGraph.config.main.header = config2.heading;
11310
11299
  if (config2.legendLabels) {
11311
- barGraph.config.main.legendLabels = flatObjectValueInArray(config2.legendLabels);
11300
+ barGraph.config.main.legendLabels = createKeyValueMap(config2.legendLabels);
11312
11301
  }
11313
11302
  if (config2.pieArcColors) {
11314
- barGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config2.pieArcColors);
11303
+ barGraph.config.style.barStyle.colorRange = createKeyValueMap(config2.pieArcColors);
11315
11304
  }
11316
11305
  if (config2.xAxisValue) {
11317
11306
  barGraph.config.main.xAxisValue = config2.xAxisValue;
@@ -12339,10 +12328,10 @@ const buildLineGraph = (config2, componentScope2) => {
12339
12328
  lineGraph.config.main.bottomAxisAngle = config2.bottomAxisAngle === "YES" ? true : false;
12340
12329
  }
12341
12330
  if (config2.legendLabels) {
12342
- lineGraph.config.main.legendLabels = flatObjectValueInArray(config2.legendLabels);
12331
+ lineGraph.config.main.legendLabels = createKeyValueMap(config2.legendLabels);
12343
12332
  }
12344
12333
  if (config2.pieArcColors) {
12345
- lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(config2.pieArcColors);
12334
+ lineGraph.config.style.lineStyle.colorRange = createKeyValueMap(config2.pieArcColors);
12346
12335
  }
12347
12336
  lineGraph.scope = componentScope2;
12348
12337
  return lineGraph;
@@ -12860,7 +12849,7 @@ const buildAreaGraph = (config2, componentScope2) => {
12860
12849
  AreaGraph.config.main.bottomAxisAngle = config2.bottomAxisAngle === "YES" ? true : false;
12861
12850
  }
12862
12851
  if (config2.legendLabels) {
12863
- AreaGraph.config.main.legendLabels = createValueLegendMap(config2.legendLabels);
12852
+ AreaGraph.config.main.legendLabels = createKeyValueMap(config2.legendLabels);
12864
12853
  }
12865
12854
  if (config2.legendDirection) {
12866
12855
  AreaGraph.config.main.legendDirection = config2.legendDirection === "Row" ? "row" : "column";
@@ -12869,7 +12858,7 @@ const buildAreaGraph = (config2, componentScope2) => {
12869
12858
  AreaGraph.config.style.containerStyle.height = config2.height;
12870
12859
  }
12871
12860
  if (config2.pieArcColors) {
12872
- AreaGraph.config.style.areaStyle.colorRange = createValueColorMap(config2.pieArcColors);
12861
+ AreaGraph.config.style.areaStyle.colorRange = createKeyValueMap(config2.pieArcColors);
12873
12862
  }
12874
12863
  if (config2.xAxisFormatType) {
12875
12864
  AreaGraph.config.main.xAxisFormatType = config2.xAxisFormatType;