impaktapps-ui-builder 1.0.75 → 1.0.77-test.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.
- package/dist/impaktapps-ui-builder.es.js +37 -39
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildUploadArray.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +3 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/file.d.ts +0 -19
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildLabel.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -4
- package/src/impaktapps-ui-builder/builder/build/buildUploadArray.ts +23 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +3 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +1 -17
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
- package/dist/src/impaktapps-ui-builder/builder/build/buildDownloadFileIcon.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildDownloadFileIcon.ts +0 -22
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildUploadArray: (config: any, componentScope: string) => any;
|
|
@@ -64,22 +64,3 @@ export declare const uploadFileIcon: {
|
|
|
64
64
|
widget: string;
|
|
65
65
|
};
|
|
66
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
|
@@ -9,6 +9,9 @@ export const buildLabel = (config,componentScope) => {
|
|
|
9
9
|
if(config.layout){
|
|
10
10
|
box.config.layout = createLayoutFormat(config.layout)
|
|
11
11
|
}
|
|
12
|
+
if(config.iconName){
|
|
13
|
+
box.config.main.iconName = config.iconName
|
|
14
|
+
}
|
|
12
15
|
if (config.style) {
|
|
13
16
|
box.config.style = JSON.parse(config.style)
|
|
14
17
|
}
|
|
@@ -43,8 +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
46
|
import { buildDeleteFileIcon } from "./buildDeleteFileIcon"
|
|
47
|
+
import { buildUploadArray } from "./buildUploadArray";
|
|
48
48
|
export let schema = {
|
|
49
49
|
type: "object",
|
|
50
50
|
properties: {},
|
|
@@ -239,6 +239,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
239
239
|
case "Array":
|
|
240
240
|
elements = buildArray(config, componentScope);
|
|
241
241
|
break;
|
|
242
|
+
case "UploadArray":
|
|
243
|
+
elements = buildUploadArray(config, componentScope);
|
|
244
|
+
break;
|
|
242
245
|
case "Box":
|
|
243
246
|
elements = buildLabel(config, componentScope);
|
|
244
247
|
break;
|
|
@@ -321,9 +324,6 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
321
324
|
case "UploadFileIcon":
|
|
322
325
|
elements = buildUploadFileIcon(config, componentScope);
|
|
323
326
|
break;
|
|
324
|
-
case "DownloadFileIcon":
|
|
325
|
-
elements = buildDownloadFileIcon(config, componentScope);
|
|
326
|
-
break;
|
|
327
327
|
case "DeleteFileIcon":
|
|
328
328
|
elements = buildDeleteFileIcon(config, componentScope);
|
|
329
329
|
break;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
|
|
3
|
+
const UploadArrayUiSchema: any = {
|
|
4
|
+
type: "Control",
|
|
5
|
+
scope: "#/properties/uploadArray",
|
|
6
|
+
options: {
|
|
7
|
+
widget: "UploadArray"
|
|
8
|
+
},
|
|
9
|
+
layout: 12,
|
|
10
|
+
elements: [],
|
|
11
|
+
config: {
|
|
12
|
+
main: {}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
export const buildUploadArray = (config: any, componentScope: string) => {
|
|
17
|
+
const array = _.cloneDeep(UploadArrayUiSchema);
|
|
18
|
+
if (config.style) {
|
|
19
|
+
array.config.style = JSON.parse(config.style)
|
|
20
|
+
}
|
|
21
|
+
array.scope = componentScope;
|
|
22
|
+
return array;
|
|
23
|
+
}
|
|
@@ -411,6 +411,12 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
411
411
|
emptyBox("ButtonEmpty1", { xs: 6, sm: 6, md: 4, lg: 4 })
|
|
412
412
|
];
|
|
413
413
|
break;
|
|
414
|
+
case "Box":
|
|
415
|
+
uiSchema.elements = [
|
|
416
|
+
getSelectField("iconName", "Icon Name", []),
|
|
417
|
+
emptyBox("BoxEmpty1", { xs: 6, sm: 6, md: 4, lg: 8 })
|
|
418
|
+
];
|
|
419
|
+
break;
|
|
414
420
|
case "Graph":
|
|
415
421
|
uiSchema.elements = [
|
|
416
422
|
getInputField("height", "Height"),
|
|
@@ -52,20 +52,4 @@ export const uploadFileIcon = {
|
|
|
52
52
|
"options": {
|
|
53
53
|
"widget": "UploadFileIcon"
|
|
54
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
|
-
};
|
|
55
|
+
};
|
|
@@ -45,7 +45,6 @@ export const ComponentSchema: any = {
|
|
|
45
45
|
{ title: "Column Group", const: "ColumnGroup" },
|
|
46
46
|
{ title: "Thought of the day", const: "Thought" },
|
|
47
47
|
{ title: "File Upload Icon", const: "UploadFileIcon" },
|
|
48
|
-
{ title: "File Download Icon", const: "DownloadFileIcon" },
|
|
49
48
|
{ title: "File Delete Icon", const: "DeleteFileIcon" }
|
|
50
49
|
|
|
51
50
|
]
|
|
@@ -21,11 +21,10 @@ const sectionLabels = {
|
|
|
21
21
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
22
22
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
23
23
|
UploadFileIcon: ["Core", "Events", "Style"],
|
|
24
|
-
DownloadFileIcon: ["Core", "Events", "Style"],
|
|
25
24
|
DeleteFileIcon: ["Core", "Events", "Style"],
|
|
26
25
|
Graph: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
27
26
|
DownloadFile: ["Core", "Events", "Style", "Validation"],
|
|
28
|
-
Box: ["Core", "Events", "Style", "Validation"],
|
|
27
|
+
Box: ["Core", "Properties" , "Events", "Style", "Validation"],
|
|
29
28
|
Properties: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
30
29
|
ProgressBarCard: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
31
30
|
RankCard: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -34,6 +33,7 @@ const sectionLabels = {
|
|
|
34
33
|
Rank: ["Core", "Events", "Style", "Validation"],
|
|
35
34
|
Button: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
36
35
|
Array: ["Core", "Components", "Properties","Validation"],
|
|
36
|
+
UploadArray: ["Core", "Components","Validation"],
|
|
37
37
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
38
38
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
39
39
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildDownloadFileIcon: (config: any, componentScope: any) => any;
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|