impaktapps-ui-builder 0.0.311 → 0.0.313
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 +59 -0
- 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/buildFileInput.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +35 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +20 -5
|
@@ -5874,6 +5874,7 @@ const ComponentSchema = {
|
|
|
5874
5874
|
{ title: "Date", const: "Date" },
|
|
5875
5875
|
{ title: "Download File", const: "DownloadFile" },
|
|
5876
5876
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
5877
|
+
{ title: "File", const: "FileInput" },
|
|
5877
5878
|
{ title: "Graph", const: "Graph" },
|
|
5878
5879
|
{ title: "Label", const: "Box" },
|
|
5879
5880
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
@@ -7465,6 +7466,8 @@ const EventSchema = {
|
|
|
7465
7466
|
{ title: "Click Event", const: "onClick" },
|
|
7466
7467
|
{ title: "onStart", const: "onStart" },
|
|
7467
7468
|
{ title: "Load Event", const: "onLoad" },
|
|
7469
|
+
{ title: "File Upload Event", const: "onUpload" },
|
|
7470
|
+
{ title: "File Download Event", const: "onDownload" },
|
|
7468
7471
|
{ title: "Change Event", const: "onChange" },
|
|
7469
7472
|
{ title: "Success", const: "Success" },
|
|
7470
7473
|
{ title: "Fail", const: "Fail" }
|
|
@@ -8340,6 +8343,28 @@ var service = (funcParams) => {
|
|
|
8340
8343
|
});
|
|
8341
8344
|
}
|
|
8342
8345
|
},
|
|
8346
|
+
onFileDownload: async () => {
|
|
8347
|
+
var _a;
|
|
8348
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8349
|
+
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onFileDownload[path]) {
|
|
8350
|
+
await executeEvents({
|
|
8351
|
+
...executeEventsParameters,
|
|
8352
|
+
config: eventConfig,
|
|
8353
|
+
componentName: path
|
|
8354
|
+
});
|
|
8355
|
+
}
|
|
8356
|
+
},
|
|
8357
|
+
onFileUpload: async () => {
|
|
8358
|
+
var _a;
|
|
8359
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8360
|
+
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onFileUpload[path]) {
|
|
8361
|
+
await executeEvents({
|
|
8362
|
+
...executeEventsParameters,
|
|
8363
|
+
config: eventConfig,
|
|
8364
|
+
componentName: path
|
|
8365
|
+
});
|
|
8366
|
+
}
|
|
8367
|
+
},
|
|
8343
8368
|
onPaginationChange: async function(paginationValues) {
|
|
8344
8369
|
var _a;
|
|
8345
8370
|
const apiBody = [
|
|
@@ -10083,6 +10108,37 @@ const buildPanField = (config, componentScope) => {
|
|
|
10083
10108
|
inputField.scope = componentScope;
|
|
10084
10109
|
return inputField;
|
|
10085
10110
|
};
|
|
10111
|
+
const FileInput = {
|
|
10112
|
+
type: "Control",
|
|
10113
|
+
scope: "#/properties/docAggrementCopy",
|
|
10114
|
+
options: {
|
|
10115
|
+
widget: "FileInputField"
|
|
10116
|
+
},
|
|
10117
|
+
config: {
|
|
10118
|
+
layout: 11.5,
|
|
10119
|
+
main: {
|
|
10120
|
+
required: false,
|
|
10121
|
+
onUpload: "onFileUpload",
|
|
10122
|
+
onDownload: "onFileDownload",
|
|
10123
|
+
label: "Aggrement Copy"
|
|
10124
|
+
},
|
|
10125
|
+
style: {
|
|
10126
|
+
backgroundColor: "none"
|
|
10127
|
+
}
|
|
10128
|
+
}
|
|
10129
|
+
};
|
|
10130
|
+
const buildFileInput = (config, componentScope) => {
|
|
10131
|
+
const box = _.cloneDeep(FileInput);
|
|
10132
|
+
box.scope = componentScope;
|
|
10133
|
+
box.config.main.heading = config.label;
|
|
10134
|
+
if (config.layout) {
|
|
10135
|
+
box.config.layout = createLayoutFormat(config.layout);
|
|
10136
|
+
}
|
|
10137
|
+
if (config.style) {
|
|
10138
|
+
box.config.style = JSON.parse(config.style);
|
|
10139
|
+
}
|
|
10140
|
+
return box;
|
|
10141
|
+
};
|
|
10086
10142
|
let schema = {
|
|
10087
10143
|
type: "object",
|
|
10088
10144
|
properties: {},
|
|
@@ -10201,6 +10257,9 @@ const buildUiSchema = (config) => {
|
|
|
10201
10257
|
let elements = {};
|
|
10202
10258
|
const componentScope = `#/properties/${config.name}`;
|
|
10203
10259
|
switch (config.type) {
|
|
10260
|
+
case "FileInput":
|
|
10261
|
+
elements = buildFileInput(config, componentScope);
|
|
10262
|
+
break;
|
|
10204
10263
|
case "AadharcardText":
|
|
10205
10264
|
elements = buildAdhaarField(config, componentScope);
|
|
10206
10265
|
break;
|