impaktapps-ui-builder 1.0.77 → 1.0.78
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 +40 -1
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildUploadArray.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +19 -0
- package/src/impaktapps-ui-builder/builder/build/buildUploadArray.ts +23 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
|
@@ -6222,6 +6222,7 @@ const ComponentSchema = {
|
|
|
6222
6222
|
oneOf: [
|
|
6223
6223
|
{ title: "Masked Aadhar Card", const: "AadharcardText" },
|
|
6224
6224
|
{ title: "Array", const: "Array" },
|
|
6225
|
+
{ title: "Upload Array", const: "UploadArray" },
|
|
6225
6226
|
{ title: "Button", const: "Button" },
|
|
6226
6227
|
{ title: "Data Card", const: "card" },
|
|
6227
6228
|
{ title: "Check Box", const: "CheckBox" },
|
|
@@ -8396,7 +8397,7 @@ const sectionLabels = {
|
|
|
8396
8397
|
SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8397
8398
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8398
8399
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
8399
|
-
UploadFileIcon: ["Core", "Events", "Style"],
|
|
8400
|
+
UploadFileIcon: ["Core", "Events", "Style", "Validation"],
|
|
8400
8401
|
DeleteFileIcon: ["Core", "Events", "Style"],
|
|
8401
8402
|
Graph: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8402
8403
|
DownloadFile: ["Core", "Events", "Style", "Validation"],
|
|
@@ -8409,6 +8410,7 @@ const sectionLabels = {
|
|
|
8409
8410
|
Rank: ["Core", "Events", "Style", "Validation"],
|
|
8410
8411
|
Button: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8411
8412
|
Array: ["Core", "Components", "Properties", "Validation"],
|
|
8413
|
+
UploadArray: ["Core", "Components", "Validation"],
|
|
8412
8414
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8413
8415
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8414
8416
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -12290,6 +12292,26 @@ const buildDeleteFileIcon = (config2, componentScope2) => {
|
|
|
12290
12292
|
}
|
|
12291
12293
|
return DeleteFileIcon;
|
|
12292
12294
|
};
|
|
12295
|
+
const UploadArrayUiSchema = {
|
|
12296
|
+
type: "Control",
|
|
12297
|
+
scope: "#/properties/uploadArray",
|
|
12298
|
+
options: {
|
|
12299
|
+
widget: "UploadArray"
|
|
12300
|
+
},
|
|
12301
|
+
layout: 12,
|
|
12302
|
+
elements: [],
|
|
12303
|
+
config: {
|
|
12304
|
+
main: {}
|
|
12305
|
+
}
|
|
12306
|
+
};
|
|
12307
|
+
const buildUploadArray = (config2, componentScope2) => {
|
|
12308
|
+
const array = _.cloneDeep(UploadArrayUiSchema);
|
|
12309
|
+
if (config2.style) {
|
|
12310
|
+
array.config.style = JSON.parse(config2.style);
|
|
12311
|
+
}
|
|
12312
|
+
array.scope = componentScope2;
|
|
12313
|
+
return array;
|
|
12314
|
+
};
|
|
12293
12315
|
let schema = {
|
|
12294
12316
|
type: "object",
|
|
12295
12317
|
properties: {},
|
|
@@ -12396,6 +12418,20 @@ const buildSchema = (config2, tableName, isArrayType) => {
|
|
|
12396
12418
|
config2.elements.map((e, elemInd) => {
|
|
12397
12419
|
buildSchema(e, config2.name, config2.type === "Array" ? true : false);
|
|
12398
12420
|
});
|
|
12421
|
+
} else if (config2.type == "UploadArray") {
|
|
12422
|
+
if (!schema.properties[config2.name]) {
|
|
12423
|
+
schema.properties[config2.name] = {
|
|
12424
|
+
type: "array",
|
|
12425
|
+
items: {
|
|
12426
|
+
type: "object",
|
|
12427
|
+
properties: {},
|
|
12428
|
+
required: []
|
|
12429
|
+
}
|
|
12430
|
+
};
|
|
12431
|
+
}
|
|
12432
|
+
config2.elements.map((e, elemInd) => {
|
|
12433
|
+
buildSchema(e, config2.name, config2.type === "UploadArray" ? true : false);
|
|
12434
|
+
});
|
|
12399
12435
|
} else {
|
|
12400
12436
|
config2.elements.map((e, elemInd) => {
|
|
12401
12437
|
buildSchema(e);
|
|
@@ -12471,6 +12507,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12471
12507
|
case "Array":
|
|
12472
12508
|
elements = buildArray(config2, componentScope2);
|
|
12473
12509
|
break;
|
|
12510
|
+
case "UploadArray":
|
|
12511
|
+
elements = buildUploadArray(config2, componentScope2);
|
|
12512
|
+
break;
|
|
12474
12513
|
case "Box":
|
|
12475
12514
|
elements = buildLabel(config2, componentScope2);
|
|
12476
12515
|
break;
|