impaktapps-ui-builder 1.0.81 → 1.0.82

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.
@@ -44,23 +44,3 @@ 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
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.81",
3
+ "version": "1.0.82",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -31,5 +31,8 @@ const FileInput = {
31
31
  if (config.style) {
32
32
  box.config.style = JSON.parse(config.style)
33
33
  }
34
+ if (config.variant) {
35
+ box.config.main.variant = config.variant
36
+ }
34
37
  return box;
35
38
  }
@@ -42,8 +42,6 @@ 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 { buildDeleteFileIcon } from "./buildDeleteFileIcon"
47
45
  export let schema = {
48
46
  type: "object",
49
47
  properties: {},
@@ -317,12 +315,6 @@ const buildUiSchema = (config: any, store?: any) => {
317
315
  case "Image":
318
316
  elements = buildImage(config, componentScope);
319
317
  break;
320
- case "UploadFileIcon":
321
- elements = buildUploadFileIcon(config, componentScope);
322
- break;
323
- case "DeleteFileIcon":
324
- elements = buildDeleteFileIcon(config, componentScope);
325
- break;
326
318
  default:
327
319
  schema = {
328
320
  type: "object",
@@ -552,6 +552,14 @@ export const buildPropertiesSection = function (type: String) {
552
552
  emptyBox("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 }),
553
553
  ]
554
554
  break;
555
+ case "FileInput":
556
+ uiSchema.elements = [
557
+ getRadioInputField("variant", "Variant", ["Input", "Button"]),
558
+ getRadioInputField("disableUpload", "Disable Upload", ["YES", "NO"]),
559
+ getRadioInputField("disableDelete", "Disable Delete", ["YES", "NO"]),
560
+ getRadioInputField("disableDownload", "Disable Download", ["YES", "NO"])
561
+ ]
562
+ break;
555
563
  }
556
564
  return uiSchema;
557
565
  };
@@ -36,20 +36,3 @@ export const downloadFile = {
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
- };
@@ -43,10 +43,7 @@ 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" },
47
- { title: "File Upload Icon", const: "UploadFileIcon" },
48
- { title: "File Delete Icon", const: "DeleteFileIcon" }
49
-
46
+ { title: "Thought of the day", const: "Thought" }
50
47
  ]
51
48
  },
52
49
  elementType: {
@@ -46,7 +46,6 @@ export const EventSchema = {
46
46
  { title: "Start", const: "onStart" },
47
47
  { title: "Cell Render", const: "onCellRenderer" },
48
48
  { title: "Upload", const: "onUpload" },
49
- { title: "FileDelete", const: "onFileDelete" },
50
49
  { title: "Download", const: "onDownload" },
51
50
  { title: "Back", const: "onBack" },
52
51
  { title: "Next", const: "onNext" },
@@ -20,8 +20,6 @@ const sectionLabels = {
20
20
  SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
21
21
  card: ["Core", "Properties", "Events", "Style", "Validation"],
22
22
  UploadFile: ["Core", "Events", "Style", "Validation"],
23
- UploadFileIcon: ["Core", "Events", "Style","Validation"],
24
- DeleteFileIcon: ["Core", "Events", "Style"],
25
23
  Graph: ["Core", "Properties", "Events", "Style", "Validation"],
26
24
  DownloadFile: ["Core", "Events", "Style", "Validation"],
27
25
  Box: ["Core", "Properties" , "Events", "Style", "Validation"],
@@ -46,6 +44,8 @@ const sectionLabels = {
46
44
  Date: ["Core", "Properties", "Events", "Style", "Validation"],
47
45
  DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
48
46
  Image: ["Core", "Properties","Style"],
47
+ FileInput: ["Core","Properties","Events", "Style", "Validation"],
48
+
49
49
  }
50
50
 
51
51
  export function refreshPage(type: string, store: any) {
@@ -1 +0,0 @@
1
- export declare const buildDeleteFileIcon: (config: any, componentScope: any) => any;
@@ -1 +0,0 @@
1
- export declare const buildUploadFileIcon: (config: any, componentScope: any) => any;
@@ -1,19 +0,0 @@
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
- };
@@ -1,17 +0,0 @@
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
- }
@@ -1,18 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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
- };