impaktapps-ui-builder 1.0.72-flickering.4 → 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,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
+ };
@@ -49,11 +49,29 @@ export declare const uploadFileIcon: {
49
49
  scope: string;
50
50
  config: {
51
51
  main: {
52
- label: string;
53
52
  onUpload: string;
54
- required: boolean;
55
53
  errorMessage: string;
56
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: {};
57
75
  layout: {
58
76
  xs: number;
59
77
  sm: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.72-flickering.4",
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
+ }
@@ -43,6 +43,8 @@ import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
43
43
  import { buildHorizontalLayout } from "./buildHorizontalLayout";
44
44
  import { buildImage } from "./buildImage";
45
45
  import { buildUploadFileIcon } from "./buildUploadFileIcon";
46
+ import { buildDownloadFileIcon } from "./buildDownloadFileIcon"
47
+ import { buildDeleteFileIcon } from "./buildDeleteFileIcon"
46
48
  export let schema = {
47
49
  type: "object",
48
50
  properties: {},
@@ -318,6 +320,13 @@ const buildUiSchema = (config: any, store?: any) => {
318
320
  break;
319
321
  case "UploadFileIcon":
320
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;
321
330
  default:
322
331
  schema = {
323
332
  type: "object",
@@ -10,11 +10,8 @@ export const buildUploadFileIcon = (config, componentScope) => {
10
10
  if (config.layout) {
11
11
  UploadFileIcon.config.layout = createLayoutFormat(config.layout)
12
12
  }
13
- // if (config.style) {
14
- // UploadFileIcon.config.style = JSON.parse(config.style);
15
- // }
16
- if (config.required) {
17
- UploadFileIcon.config.main.required = true;
13
+ if (config.style) {
14
+ UploadFileIcon.config.style = JSON.parse(config.style);
18
15
  }
19
16
  UploadFileIcon.config.main.errorMessage = config.errorMessage;
20
17
  return UploadFileIcon;
@@ -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
+ };
@@ -43,19 +43,29 @@ export const uploadFileIcon = {
43
43
  "scope": "#/properties/uploadFileIcon",
44
44
  "config": {
45
45
  "main": {
46
- "label": "AttachmentFile",
47
- // "onClick": "onClick",
48
46
  "onUpload": "onFileUpload",
49
- // "onDownload":"onFileDownload",
50
- "required": true,
51
47
  "errorMessage": "Attachment File is not uploaded"
52
48
  },
53
- // "style": {
54
- // "backgroundColor": "none"
55
- // },
49
+ "style": {},
56
50
  layout: { xs: 6, sm: 6, md: 4, lg: 3 }
57
51
  },
58
52
  "options": {
59
53
  "widget": "UploadFileIcon"
60
54
  }
61
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
+ };
@@ -44,7 +44,9 @@ export const ComponentSchema: any = {
44
44
  { title: "Tree ", const: "TreeMap" },
45
45
  { title: "Column Group", const: "ColumnGroup" },
46
46
  { title: "Thought of the day", const: "Thought" },
47
- { title: "Upload File Icon", const: "UploadFileIcon" }
47
+ { title: "File Upload Icon", const: "UploadFileIcon" },
48
+ { title: "File Download Icon", const: "DownloadFileIcon" },
49
+ { title: "File Delete Icon", const: "DeleteFileIcon" }
48
50
 
49
51
  ]
50
52
  },
@@ -20,7 +20,9 @@ const sectionLabels = {
20
20
  SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
21
21
  card: ["Core", "Properties", "Events", "Validation"],
22
22
  UploadFile: ["Core", "Events", "Style", "Validation"],
23
- UploadFileIcon: ["Core", "Events", "Style", "Validation"],
23
+ UploadFileIcon: ["Core", "Events", "Style"],
24
+ DownloadFileIcon: ["Core", "Events", "Style"],
25
+ DeleteFileIcon: ["Core", "Events", "Style"],
24
26
  Graph: ["Core", "Properties", "Events", "Style", "Validation"],
25
27
  DownloadFile: ["Core", "Events", "Style", "Validation"],
26
28
  Box: ["Core", "Events", "Style", "Validation"],