impaktapps-ui-builder 1.0.70 → 1.0.71-alpha.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.
@@ -0,0 +1 @@
1
+ export declare const buildImage: (config: any, componentScope: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.70",
3
+ "version": "1.0.71-alpha.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -0,0 +1,41 @@
1
+ import _ from "lodash";
2
+ import { createLayoutFormat } from "./buildConfig";
3
+
4
+ const imageUiSchema = {
5
+ type: "Control",
6
+ scope: "#/properties/Logo",
7
+ layout: 3,
8
+
9
+ options: {
10
+ widget: "Image",
11
+ },
12
+ config: {
13
+ main: {
14
+ url: "",
15
+ },
16
+ style: {
17
+ // imageStyle: { width: 300 },
18
+
19
+ // containerStyle: {
20
+ // display: "flex",
21
+ // justifyContent: "center",
22
+ // alignItems: "center",
23
+ // marginLeft: "32px",
24
+ // marginTop: 2,
25
+ // },
26
+ },
27
+ },
28
+ };
29
+
30
+ export const buildImage = (config, componentScope) => {
31
+ const image: any = _.cloneDeep(imageUiSchema);
32
+ image.scope = componentScope;
33
+ image.config.main.url = config.imageUrl;
34
+ if (config.layout) {
35
+ image.config.layout = createLayoutFormat(config.layout);
36
+ }
37
+ if (config.style) {
38
+ image.config.style = JSON.parse(config.style);
39
+ }
40
+ return image;
41
+ };
@@ -41,6 +41,7 @@ import { buildInputSlider } from "./buildInputSlider";
41
41
  import { buildTreeMap } from "./buildTreeMap";
42
42
  import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
43
43
  import { buildHorizontalLayout } from "./buildHorizontalLayout";
44
+ import { buildImage } from "./buildImage";
44
45
  export let schema = {
45
46
  type: "object",
46
47
  properties: {},
@@ -311,6 +312,8 @@ const buildUiSchema = (config: any, store?: any) => {
311
312
  case "Thought":
312
313
  elements = buildThoughtOfTheDay(config, componentScope);
313
314
  break;
315
+ case "Image":
316
+ elements = buildImage(config, componentScope);
314
317
  break;
315
318
  default:
316
319
  schema = {
@@ -18,6 +18,7 @@ export const ComponentSchema: any = {
18
18
  { title: "Empty Box", const: "EmptyBox" },
19
19
  { title: "File Handler", const: "FileInput" },
20
20
  { title: "Graph", const: "Graph" },
21
+ { title: "Image", const: "Image" },
21
22
  { title: "Input Slider", const: "InputSlider" },
22
23
  { title: "Label", const: "Box" },
23
24
  { title: "Leaderboard", const: "LeaderBoard" },
@@ -162,7 +162,8 @@ export default (funcParams: funcParamsProps) => {
162
162
  { key: "pageIndex", value: paginationValues.pagination.pageIndex },
163
163
  { key: "sorting", value: paginationValues.sorting || [] },
164
164
  { key: "filters", value: paginationValues.tableColumnConfig || [] },
165
- { key: "globalFilter", value: paginationValues.globalFilter ?? '' }
165
+ { key: "globalFilter", value: paginationValues.globalFilter ?? '' },
166
+ { key: "expandedRowIds", value: paginationValues.expandedRowIds ?? []}
166
167
  ]
167
168
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
168
169
  return response?.data;