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

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" },
@@ -6258,7 +6259,8 @@ const ComponentSchema = {
6258
6259
  { title: "Upload", const: "UploadFile" },
6259
6260
  { title: "Tree ", const: "TreeMap" },
6260
6261
  { title: "Column Group", const: "ColumnGroup" },
6261
- { title: "Thought of the day", const: "Thought" }
6262
+ { title: "Thought of the day", const: "Thought" },
6263
+ { title: "Upload File Icon", const: "UploadFileIcon" }
6262
6264
  ]
6263
6265
  },
6264
6266
  elementType: {
@@ -7898,6 +7900,13 @@ const buildPropertiesSection = function(type) {
7898
7900
  getTextArea("thought", "Today's thought", false)
7899
7901
  ];
7900
7902
  break;
7903
+ case "Image":
7904
+ uiSchema.elements = [
7905
+ getInputField("imageUrl", "Image URL"),
7906
+ getInputField("height", "Image Height"),
7907
+ emptyBox$1("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
7908
+ ];
7909
+ break;
7901
7910
  }
7902
7911
  return uiSchema;
7903
7912
  };
@@ -8379,6 +8388,7 @@ const sectionLabels = {
8379
8388
  SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
8380
8389
  card: ["Core", "Properties", "Events", "Style", "Validation"],
8381
8390
  UploadFile: ["Core", "Events", "Style", "Validation"],
8391
+ UploadFileIcon: ["Core", "Events", "Style", "Validation"],
8382
8392
  Graph: ["Core", "Properties", "Events", "Style", "Validation"],
8383
8393
  DownloadFile: ["Core", "Events", "Style", "Validation"],
8384
8394
  Box: ["Core", "Events", "Style", "Validation"],
@@ -8401,7 +8411,8 @@ const sectionLabels = {
8401
8411
  ColumnGroup: ["Core", "Components"],
8402
8412
  Thought: ["Core", "Properties", "Events", "Style", "Validation"],
8403
8413
  Date: ["Core", "Properties", "Events", "Style", "Validation"],
8404
- DateTime: ["Core", "Properties", "Events", "Style", "Validation"]
8414
+ DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
8415
+ Image: ["Core", "Properties", "Style"]
8405
8416
  };
8406
8417
  function refreshPage(type, store2) {
8407
8418
  var _a, _b;
@@ -10042,7 +10053,7 @@ function executeCustomHandler(params) {
10042
10053
  }
10043
10054
  }
10044
10055
  function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
10045
- var _a, _b, _c;
10056
+ var _a, _b, _c, _d, _e;
10046
10057
  if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
10047
10058
  if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
10048
10059
  store2.setSchema((pre) => {
@@ -10090,10 +10101,15 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
10090
10101
  }
10091
10102
  } else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
10092
10103
  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 };
10104
+ const tableData = Array.isArray((_a = handlerResponse.data) == null ? void 0 : _a.data) ? _(handlerResponse.data.data) : _((_b = handlerResponse.data) == null ? void 0 : _b.data);
10105
+ const rowCount = (_e = (_d = (_c = handlerResponse.data) == null ? void 0 : _c.meta) == null ? void 0 : _d.totalRowCount) != null ? _e : null;
10106
+ const newFormDataHolder = {
10107
+ ...formDataHolder,
10108
+ [componentName]: tableData,
10109
+ [`${componentName}_RowCount`]: rowCount
10110
+ };
10111
+ store2.setFormdata((prev) => {
10112
+ return { ...prev, ...newFormDataHolder };
10097
10113
  });
10098
10114
  }
10099
10115
  } else {
@@ -11184,6 +11200,25 @@ const downloadFile = {
11184
11200
  "widget": "DownloadFile"
11185
11201
  }
11186
11202
  };
11203
+ const uploadFileIcon = {
11204
+ "type": "Control",
11205
+ "scope": "#/properties/uploadFileIcon",
11206
+ "config": {
11207
+ "main": {
11208
+ "label": "AttachmentFile",
11209
+ "onUpload": "onFileUpload",
11210
+ "required": true,
11211
+ "errorMessage": "Attachment File is not uploaded"
11212
+ },
11213
+ "style": {
11214
+ "backgroundColor": "none"
11215
+ },
11216
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 }
11217
+ },
11218
+ "options": {
11219
+ "widget": "UploadFileIcon"
11220
+ }
11221
+ };
11187
11222
  const buildUploadFile = (config2, componentScope2) => {
11188
11223
  const UploadFile = _.cloneDeep(uploadFile);
11189
11224
  UploadFile.scope = componentScope2;
@@ -12182,6 +12217,51 @@ const buildHorizontalLayout = (config2, componentScope2) => {
12182
12217
  }
12183
12218
  return horizontal;
12184
12219
  };
12220
+ const imageUiSchema = {
12221
+ type: "Control",
12222
+ scope: "#/properties/Logo",
12223
+ options: {
12224
+ widget: "Image"
12225
+ },
12226
+ config: {
12227
+ layout: 3,
12228
+ main: {
12229
+ url: ""
12230
+ },
12231
+ style: {}
12232
+ }
12233
+ };
12234
+ const buildImage = (config2, componentScope2) => {
12235
+ const image = _.cloneDeep(imageUiSchema);
12236
+ image.scope = componentScope2;
12237
+ image.config.main.url = config2.imageUrl;
12238
+ if (config2.layout) {
12239
+ image.config.layout = createLayoutFormat(config2.layout);
12240
+ }
12241
+ if (config2.style) {
12242
+ image.config.style = JSON.parse(config2.style);
12243
+ }
12244
+ if (config2.height) {
12245
+ image.config.style.imageStyle = { ...image.config.style.imageStyle, height: config2.height };
12246
+ }
12247
+ return image;
12248
+ };
12249
+ const buildUploadFileIcon = (config2, componentScope2) => {
12250
+ const UploadFileIcon = _.cloneDeep(uploadFileIcon);
12251
+ UploadFileIcon.scope = componentScope2;
12252
+ UploadFileIcon.config.main.label = config2.label;
12253
+ if (config2.layout) {
12254
+ UploadFileIcon.config.layout = createLayoutFormat(config2.layout);
12255
+ }
12256
+ if (config2.style) {
12257
+ UploadFileIcon.config.style = config2.style;
12258
+ }
12259
+ if (config2.required) {
12260
+ UploadFileIcon.config.main.required = true;
12261
+ }
12262
+ UploadFileIcon.config.main.errorMessage = config2.errorMessage;
12263
+ return UploadFileIcon;
12264
+ };
12185
12265
  let schema = {
12186
12266
  type: "object",
12187
12267
  properties: {},
@@ -12439,6 +12519,11 @@ const buildUiSchema = (config2, store2) => {
12439
12519
  case "Thought":
12440
12520
  elements = buildThoughtOfTheDay(config2, componentScope2);
12441
12521
  break;
12522
+ case "Image":
12523
+ elements = buildImage(config2, componentScope2);
12524
+ break;
12525
+ case "UploadFileIcon":
12526
+ elements = buildUploadFileIcon(config2, componentScope2);
12442
12527
  default:
12443
12528
  schema = {
12444
12529
  type: "object",