impaktapps-ui-builder 1.0.72-alpha.20 → 1.0.72-fileUplaod.2
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 -3
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +7 -7
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildUploadFileIcon.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/file.d.ts +21 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/buildUploadFileIcon.ts +21 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +24 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +3 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildUploadFileIcon: (config: any, componentScope: any) => any;
|
|
@@ -44,3 +44,24 @@ 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
|
+
label: string;
|
|
53
|
+
onUpload: string;
|
|
54
|
+
required: boolean;
|
|
55
|
+
errorMessage: string;
|
|
56
|
+
};
|
|
57
|
+
layout: {
|
|
58
|
+
xs: number;
|
|
59
|
+
sm: number;
|
|
60
|
+
md: number;
|
|
61
|
+
lg: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
options: {
|
|
65
|
+
widget: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@ 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";
|
|
45
46
|
export let schema = {
|
|
46
47
|
type: "object",
|
|
47
48
|
properties: {},
|
|
@@ -315,6 +316,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
315
316
|
case "Image":
|
|
316
317
|
elements = buildImage(config, componentScope);
|
|
317
318
|
break;
|
|
319
|
+
case "UploadFileIcon":
|
|
320
|
+
elements = buildUploadFileIcon(config, componentScope);
|
|
321
|
+
break;
|
|
318
322
|
default:
|
|
319
323
|
schema = {
|
|
320
324
|
type: "object",
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
if (config.required) {
|
|
17
|
+
UploadFileIcon.config.main.required = true;
|
|
18
|
+
}
|
|
19
|
+
UploadFileIcon.config.main.errorMessage = config.errorMessage;
|
|
20
|
+
return UploadFileIcon;
|
|
21
|
+
}
|
|
@@ -35,4 +35,27 @@ 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
|
+
"label": "AttachmentFile",
|
|
47
|
+
// "onClick": "onClick",
|
|
48
|
+
"onUpload": "onFileUpload",
|
|
49
|
+
// "onDownload":"onFileDownload",
|
|
50
|
+
"required": true,
|
|
51
|
+
"errorMessage": "Attachment File is not uploaded"
|
|
52
|
+
},
|
|
53
|
+
// "style": {
|
|
54
|
+
// "backgroundColor": "none"
|
|
55
|
+
// },
|
|
56
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 }
|
|
57
|
+
},
|
|
58
|
+
"options": {
|
|
59
|
+
"widget": "UploadFileIcon"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
@@ -43,7 +43,9 @@ 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: "Upload File Icon", const: "UploadFileIcon" }
|
|
48
|
+
|
|
47
49
|
]
|
|
48
50
|
},
|
|
49
51
|
elementType: {
|
|
@@ -18,8 +18,9 @@ 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", "
|
|
21
|
+
card: ["Core", "Properties", "Events", "Validation"],
|
|
22
22
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
23
|
+
UploadFileIcon: ["Core", "Events", "Style", "Validation"],
|
|
23
24
|
Graph: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
24
25
|
DownloadFile: ["Core", "Events", "Style", "Validation"],
|
|
25
26
|
Box: ["Core", "Events", "Style", "Validation"],
|
|
@@ -72,7 +72,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
72
72
|
return {
|
|
73
73
|
setPage: async function () {
|
|
74
74
|
funcParams.store.setAdditionalErrors([]);
|
|
75
|
-
funcParams.store.setFormdata(
|
|
75
|
+
funcParams.store.setFormdata(funcParams?.initFormData() || {});
|
|
76
76
|
funcParams.store.setSchema({ type: "object", properties: {} });
|
|
77
77
|
funcParams.store.newData = {};
|
|
78
78
|
eventGroups = {};
|