impaktapps-ui-builder 1.0.72 → 1.0.74

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 buildDeleteFileIcon: (config: any, componentScope: any) => any;
@@ -0,0 +1 @@
1
+ export declare const buildDownloadFileIcon: (config: any, componentScope: any) => any;
@@ -0,0 +1 @@
1
+ export declare const buildUploadFileIcon: (config: any, componentScope: any) => any;
@@ -0,0 +1,19 @@
1
+ export declare const deleteFileIcon: {
2
+ type: string;
3
+ scope: string;
4
+ config: {
5
+ main: {
6
+ onFileDelete: string;
7
+ };
8
+ style: {};
9
+ layout: {
10
+ xs: number;
11
+ sm: number;
12
+ md: number;
13
+ lg: number;
14
+ };
15
+ };
16
+ options: {
17
+ widget: string;
18
+ };
19
+ };
@@ -44,3 +44,42 @@ export declare const downloadFile: {
44
44
  widget: string;
45
45
  };
46
46
  };
47
+ export declare const uploadFileIcon: {
48
+ type: string;
49
+ scope: string;
50
+ config: {
51
+ main: {
52
+ onUpload: string;
53
+ errorMessage: string;
54
+ };
55
+ style: {};
56
+ layout: {
57
+ xs: number;
58
+ sm: number;
59
+ md: number;
60
+ lg: number;
61
+ };
62
+ };
63
+ options: {
64
+ widget: string;
65
+ };
66
+ };
67
+ export declare const downloadFileIcon: {
68
+ type: string;
69
+ scope: string;
70
+ config: {
71
+ main: {
72
+ onDownload: string;
73
+ };
74
+ style: {};
75
+ layout: {
76
+ xs: number;
77
+ sm: number;
78
+ md: number;
79
+ lg: number;
80
+ };
81
+ };
82
+ options: {
83
+ widget: string;
84
+ };
85
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -0,0 +1,17 @@
1
+ import { deleteFileIcon } from "./uischema/DeleteFileIcon";
2
+ import _ from "lodash";
3
+ import { createLayoutFormat } from "./buildConfig";
4
+
5
+ export const buildDeleteFileIcon = (config, componentScope) => {
6
+ const DeleteFileIcon: any = _.cloneDeep(deleteFileIcon);
7
+
8
+ DeleteFileIcon.scope = componentScope;
9
+ DeleteFileIcon.config.main.label = config.label;
10
+ if (config.layout) {
11
+ DeleteFileIcon.config.layout = createLayoutFormat(config.layout)
12
+ }
13
+ if (config.style) {
14
+ DeleteFileIcon.config.style = JSON.parse(config.style);
15
+ }
16
+ return DeleteFileIcon;
17
+ }
@@ -0,0 +1,22 @@
1
+ import _ from "lodash";
2
+ import { downloadFileIcon } from "./uischema/file";
3
+ import { createLayoutFormat } from "./buildConfig";
4
+
5
+ export const buildDownloadFileIcon = (config,componentScope) => {
6
+ const DownloadFile: any = _.cloneDeep(downloadFileIcon);
7
+ DownloadFile.scope = componentScope;
8
+ DownloadFile.config.main.label = config.label;
9
+ if (config.layout) {
10
+ DownloadFile.config.layout = config.layout;
11
+ }
12
+ if (config.style) {
13
+ DownloadFile.config.style = config.style;
14
+ }
15
+ if(config.layout){
16
+ DownloadFile.config.layout = createLayoutFormat(config.layout)
17
+ }
18
+ if (config.errorMessage) {
19
+ DownloadFile.config.main.errorMessage = config.errorMessage;
20
+ }
21
+ return DownloadFile;
22
+ }
@@ -14,15 +14,6 @@ const imageUiSchema = {
14
14
  url: "",
15
15
  },
16
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
17
  },
27
18
  },
28
19
  };
@@ -42,6 +42,9 @@ import { buildTreeMap } from "./buildTreeMap";
42
42
  import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
43
43
  import { buildHorizontalLayout } from "./buildHorizontalLayout";
44
44
  import { buildImage } from "./buildImage";
45
+ import { buildUploadFileIcon } from "./buildUploadFileIcon";
46
+ import { buildDownloadFileIcon } from "./buildDownloadFileIcon"
47
+ import { buildDeleteFileIcon } from "./buildDeleteFileIcon"
45
48
  export let schema = {
46
49
  type: "object",
47
50
  properties: {},
@@ -315,6 +318,15 @@ const buildUiSchema = (config: any, store?: any) => {
315
318
  case "Image":
316
319
  elements = buildImage(config, componentScope);
317
320
  break;
321
+ case "UploadFileIcon":
322
+ elements = buildUploadFileIcon(config, componentScope);
323
+ break;
324
+ case "DownloadFileIcon":
325
+ elements = buildDownloadFileIcon(config, componentScope);
326
+ break;
327
+ case "DeleteFileIcon":
328
+ elements = buildDeleteFileIcon(config, componentScope);
329
+ break;
318
330
  default:
319
331
  schema = {
320
332
  type: "object",
@@ -0,0 +1,18 @@
1
+ import { uploadFileIcon } from "./uischema/file";
2
+ import _ from "lodash";
3
+ import { createLayoutFormat } from "./buildConfig";
4
+
5
+ export const buildUploadFileIcon = (config, componentScope) => {
6
+ const UploadFileIcon: any = _.cloneDeep(uploadFileIcon);
7
+
8
+ UploadFileIcon.scope = componentScope;
9
+ UploadFileIcon.config.main.label = config.label;
10
+ if (config.layout) {
11
+ UploadFileIcon.config.layout = createLayoutFormat(config.layout)
12
+ }
13
+ if (config.style) {
14
+ UploadFileIcon.config.style = JSON.parse(config.style);
15
+ }
16
+ UploadFileIcon.config.main.errorMessage = config.errorMessage;
17
+ return UploadFileIcon;
18
+ }
@@ -0,0 +1,14 @@
1
+ export const deleteFileIcon = {
2
+ "type": "Control",
3
+ "scope": "#/properties/deleteFileIcon",
4
+ "config": {
5
+ "main": {
6
+ "onFileDelete": "onFileDelete",
7
+ },
8
+ "style": {},
9
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 }
10
+ },
11
+ "options": {
12
+ "widget": "DeleteFileIcon"
13
+ }
14
+ };
@@ -35,4 +35,37 @@ export const downloadFile = {
35
35
  "options": {
36
36
  "widget": "DownloadFile"
37
37
  }
38
- };
38
+ };
39
+
40
+
41
+ export const uploadFileIcon = {
42
+ "type": "Control",
43
+ "scope": "#/properties/uploadFileIcon",
44
+ "config": {
45
+ "main": {
46
+ "onUpload": "onFileUpload",
47
+ "errorMessage": "Attachment File is not uploaded"
48
+ },
49
+ "style": {},
50
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 }
51
+ },
52
+ "options": {
53
+ "widget": "UploadFileIcon"
54
+ }
55
+ };
56
+
57
+
58
+ export const downloadFileIcon = {
59
+ "type": "Control",
60
+ "scope": "#/properties/downloadAttachment",
61
+ "config": {
62
+ "main": {
63
+ "onDownload":"onFileDownload"
64
+ },
65
+ "style": {},
66
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 }
67
+ },
68
+ "options": {
69
+ "widget": "DownloadFileIcon"
70
+ }
71
+ };
@@ -43,7 +43,11 @@ export const ComponentSchema: any = {
43
43
  { title: "Upload", const: "UploadFile" },
44
44
  { title: "Tree ", const: "TreeMap" },
45
45
  { title: "Column Group", const: "ColumnGroup" },
46
- { title: "Thought of the day", const: "Thought" }
46
+ { title: "Thought of the day", const: "Thought" },
47
+ { title: "File Upload Icon", const: "UploadFileIcon" },
48
+ { title: "File Download Icon", const: "DownloadFileIcon" },
49
+ { title: "File Delete Icon", const: "DeleteFileIcon" }
50
+
47
51
  ]
48
52
  },
49
53
  elementType: {
@@ -18,8 +18,11 @@ const sectionLabels = {
18
18
  HorizontalLayout: ["Core", "Components", "Properties", "Style", "Validation"],
19
19
  TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
20
20
  SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
21
- card: ["Core", "Properties", "Events", "Style", "Validation"],
21
+ card: ["Core", "Properties", "Events", "Validation"],
22
22
  UploadFile: ["Core", "Events", "Style", "Validation"],
23
+ UploadFileIcon: ["Core", "Events", "Style"],
24
+ DownloadFileIcon: ["Core", "Events", "Style"],
25
+ DeleteFileIcon: ["Core", "Events", "Style"],
23
26
  Graph: ["Core", "Properties", "Events", "Style", "Validation"],
24
27
  DownloadFile: ["Core", "Events", "Style", "Validation"],
25
28
  Box: ["Core", "Events", "Style", "Validation"],