impaktapps-ui-builder 1.0.71 → 1.0.72-flickering.1

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.
@@ -6234,6 +6234,7 @@ const ComponentSchema = {
6234
6234
  { title: "Empty Box", const: "EmptyBox" },
6235
6235
  { title: "File Handler", const: "FileInput" },
6236
6236
  { title: "Graph", const: "Graph" },
6237
+ { title: "Image", const: "Image" },
6237
6238
  { title: "Input Slider", const: "InputSlider" },
6238
6239
  { title: "Label", const: "Box" },
6239
6240
  { title: "Leaderboard", const: "LeaderBoard" },
@@ -7898,6 +7899,13 @@ const buildPropertiesSection = function(type) {
7898
7899
  getTextArea("thought", "Today's thought", false)
7899
7900
  ];
7900
7901
  break;
7902
+ case "Image":
7903
+ uiSchema.elements = [
7904
+ getInputField("imageUrl", "Image URL"),
7905
+ getInputField("height", "Image Height"),
7906
+ emptyBox$1("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
7907
+ ];
7908
+ break;
7901
7909
  }
7902
7910
  return uiSchema;
7903
7911
  };
@@ -8401,7 +8409,8 @@ const sectionLabels = {
8401
8409
  ColumnGroup: ["Core", "Components"],
8402
8410
  Thought: ["Core", "Properties", "Events", "Style", "Validation"],
8403
8411
  Date: ["Core", "Properties", "Events", "Style", "Validation"],
8404
- DateTime: ["Core", "Properties", "Events", "Style", "Validation"]
8412
+ DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
8413
+ Image: ["Core", "Properties", "Style"]
8405
8414
  };
8406
8415
  function refreshPage(type, store2) {
8407
8416
  var _a, _b;
@@ -10042,7 +10051,7 @@ function executeCustomHandler(params) {
10042
10051
  }
10043
10052
  }
10044
10053
  function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
10045
- var _a, _b, _c;
10054
+ var _a, _b, _c, _d, _e;
10046
10055
  if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
10047
10056
  if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
10048
10057
  store2.setSchema((pre) => {
@@ -10090,10 +10099,15 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
10090
10099
  }
10091
10100
  } else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
10092
10101
  if (handlerResponse && (handlerResponse == null ? void 0 : handlerResponse.data)) {
10093
- formDataHolder[componentName] = (_a = handlerResponse.data) == null ? void 0 : _a.data;
10094
- formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
10095
- store2.setFormdata((pre) => {
10096
- return { ...pre, ...formDataHolder };
10102
+ const tableData = Array.isArray((_a = handlerResponse.data) == null ? void 0 : _a.data) ? _(handlerResponse.data.data) : _((_b = handlerResponse.data) == null ? void 0 : _b.data);
10103
+ const rowCount = (_e = (_d = (_c = handlerResponse.data) == null ? void 0 : _c.meta) == null ? void 0 : _d.totalRowCount) != null ? _e : null;
10104
+ const newFormDataHolder = {
10105
+ ...formDataHolder,
10106
+ [componentName]: tableData,
10107
+ [`${componentName}_RowCount`]: rowCount
10108
+ };
10109
+ store2.setFormdata((prev) => {
10110
+ return { ...prev, ...newFormDataHolder };
10097
10111
  });
10098
10112
  }
10099
10113
  } else {
@@ -12182,6 +12196,35 @@ const buildHorizontalLayout = (config2, componentScope2) => {
12182
12196
  }
12183
12197
  return horizontal;
12184
12198
  };
12199
+ const imageUiSchema = {
12200
+ type: "Control",
12201
+ scope: "#/properties/Logo",
12202
+ options: {
12203
+ widget: "Image"
12204
+ },
12205
+ config: {
12206
+ layout: 3,
12207
+ main: {
12208
+ url: ""
12209
+ },
12210
+ style: {}
12211
+ }
12212
+ };
12213
+ const buildImage = (config2, componentScope2) => {
12214
+ const image = _.cloneDeep(imageUiSchema);
12215
+ image.scope = componentScope2;
12216
+ image.config.main.url = config2.imageUrl;
12217
+ if (config2.layout) {
12218
+ image.config.layout = createLayoutFormat(config2.layout);
12219
+ }
12220
+ if (config2.style) {
12221
+ image.config.style = JSON.parse(config2.style);
12222
+ }
12223
+ if (config2.height) {
12224
+ image.config.style.imageStyle = { ...image.config.style.imageStyle, height: config2.height };
12225
+ }
12226
+ return image;
12227
+ };
12185
12228
  let schema = {
12186
12229
  type: "object",
12187
12230
  properties: {},
@@ -12439,6 +12482,9 @@ const buildUiSchema = (config2, store2) => {
12439
12482
  case "Thought":
12440
12483
  elements = buildThoughtOfTheDay(config2, componentScope2);
12441
12484
  break;
12485
+ case "Image":
12486
+ elements = buildImage(config2, componentScope2);
12487
+ break;
12442
12488
  default:
12443
12489
  schema = {
12444
12490
  type: "object",