impaktapps-ui-builder 1.0.93 → 1.0.95

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -2,46 +2,47 @@ import _ from "lodash";
2
2
  import { createLayoutFormat } from "./buildConfig";
3
3
 
4
4
  const FileInput = {
5
- type: "Control",
6
- scope: "#/properties/docAggrementCopy",
7
- options: {
8
- widget: "FileInputField",
9
- },
10
- config: {
11
- layout: { xs: 12, sm: 6, md: 4, lg: 3 },
12
- main: {
13
- required: false,
14
- onUpload: "onFileUpload",
5
+ type: "Control",
6
+ scope: "#/properties/docAggrementCopy",
7
+ options: {
8
+ widget: "FileInputField",
9
+ },
10
+ config: {
11
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
12
+ main: {
13
+ required: false,
14
+ onUpload: "onFileUpload",
15
15
  onDownload:"onFileDownload",
16
16
  label:"Aggrement Copy"
17
- // iconStyleDefault:true,
18
- },
19
- style: {
20
- backgroundColor: "none",
21
- },
17
+ // iconStyleDefault:true,
18
+ },
19
+ style: {
20
+ backgroundColor: "none",
22
21
  },
23
- };
22
+ },
23
+ };
24
24
  export const buildFileInput = (config,componentScope) => {
25
- const box: any = _.cloneDeep(FileInput);
26
- box.scope = componentScope;
27
- box.config.main.label = config.label
25
+ const box: any = _.cloneDeep(FileInput);
26
+ box.scope = componentScope;
27
+ box.config.main.label = config.label
28
28
  if(config.layout){
29
- box.config.layout = createLayoutFormat(config.layout)
30
- }
31
- if (config.style) {
32
- box.config.style = JSON.parse(config.style)
33
- }
34
- if (config.variant) {
35
- box.config.main.variant = config.variant
36
- }
37
- if(config.hideUpload){
38
- box.config.main.hideUpload = config.hideUpload === "YES" ? true : false;
39
- }
40
- if(config.hideDownload){
41
- box.config.main.hideDownload = config.hideDownload === "YES" ? true : false;
42
- }
43
- if(config.hideDelete){
44
- box.config.main.hideDelete = config.hideDelete === "YES" ? true : false;
45
- }
46
- return box;
29
+ box.config.layout = createLayoutFormat(config.layout)
30
+ }
31
+ if (config.style) {
32
+ box.config.style = JSON.parse(config.style)
33
+ }
34
+ if (config.variant) {
35
+ box.config.main.variant = config.variant
36
+ }
37
+ if (config.disableUpload) {
38
+ box.config.main.disableUpload = config.disableUpload === "YES" ? true : false;
39
+ }
40
+ if (config.disableDownload) {
41
+ box.config.main.disableDownload = config.disableDownload === "YES" ? true : false;
42
+ }
43
+ if (config.disableDelete) {
44
+ box.config.main.disableDelete = config.disableDelete === "YES" ? true : false;
45
+ }
46
+
47
+ return box;
47
48
  }
@@ -556,7 +556,10 @@ export const buildPropertiesSection = function (type: String) {
556
556
  break;
557
557
  case "FileInput":
558
558
  uiSchema.elements = [
559
- getRadioInputField("variant", "Variant", ["Outlined", "Standard"])
559
+ getRadioInputField("variant", "Variant", ["Outlined", "Standard"]),
560
+ getRadioInputField("disableUpload", "Disable Upload", ["YES", "NO"]),
561
+ getRadioInputField("disableDelete", "Disable Delete", ["YES", "NO"]),
562
+ getRadioInputField("disableDownload", "Disable Download", ["YES", "NO"])
560
563
  ]
561
564
  break;
562
565
  }