impaktapps-ui-builder 1.0.77 → 1.0.78-ActionBar.0
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 +45 -3
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +6 -6
- 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/buildArray.ts +3 -0
- 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/build/uischema/buildPropertiesSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildUploadArray: (config: any, componentScope: string) => any;
|
package/package.json
CHANGED
|
@@ -15,6 +15,9 @@ export const buildArray = (config: any, componentScope: string) => {
|
|
|
15
15
|
if (config.allExpanded) {
|
|
16
16
|
array.config.main.allExpanded = config.allExpanded === "YES" ? true : false
|
|
17
17
|
}
|
|
18
|
+
if(config.disableActionBar){
|
|
19
|
+
array.config.main.disableActionBar = config.disableActionBar === "YES" ? true : false
|
|
20
|
+
}
|
|
18
21
|
if (config.style) {
|
|
19
22
|
array.config.style = JSON.parse(config.style)
|
|
20
23
|
}
|
|
@@ -44,6 +44,7 @@ import { buildHorizontalLayout } from "./buildHorizontalLayout";
|
|
|
44
44
|
import { buildImage } from "./buildImage";
|
|
45
45
|
import { buildUploadFileIcon } from "./buildUploadFileIcon";
|
|
46
46
|
import { buildDeleteFileIcon } from "./buildDeleteFileIcon"
|
|
47
|
+
import { buildUploadArray } from "./buildUploadArray";
|
|
47
48
|
export let schema = {
|
|
48
49
|
type: "object",
|
|
49
50
|
properties: {},
|
|
@@ -160,6 +161,21 @@ export const buildSchema = (config: any, tableName?: string, isArrayType?: boole
|
|
|
160
161
|
buildSchema(e, config.name, config.type === "Array" ? true : false)
|
|
161
162
|
})
|
|
162
163
|
}
|
|
164
|
+
else if(( config.type == "UploadArray")){
|
|
165
|
+
if (!schema.properties[config.name]) {
|
|
166
|
+
schema.properties[config.name] = {
|
|
167
|
+
type: "array",
|
|
168
|
+
items: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {},
|
|
171
|
+
required: []
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
config.elements.map((e, elemInd) => {
|
|
176
|
+
buildSchema(e, config.name, config.type === "UploadArray" ? true : false)
|
|
177
|
+
})
|
|
178
|
+
}
|
|
163
179
|
else {
|
|
164
180
|
config.elements.map((e, elemInd) => {
|
|
165
181
|
buildSchema(e)
|
|
@@ -238,6 +254,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
238
254
|
case "Array":
|
|
239
255
|
elements = buildArray(config, componentScope);
|
|
240
256
|
break;
|
|
257
|
+
case "UploadArray":
|
|
258
|
+
elements = buildUploadArray(config, componentScope);
|
|
259
|
+
break;
|
|
241
260
|
case "Box":
|
|
242
261
|
elements = buildLabel(config, componentScope);
|
|
243
262
|
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
|
+
}
|
|
@@ -264,9 +264,9 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
264
264
|
case "Array": // // allExpanded childElementLabel label
|
|
265
265
|
uiSchema.elements = [
|
|
266
266
|
getRadioInputField("allExpanded", "Initial Expand", ["YES", "NO"]),
|
|
267
|
+
getRadioInputField("disableActionBar", "Disable Action Bar", ["YES", "NO"]),
|
|
267
268
|
getInputField("childElementLabel", "Child Element Label"),
|
|
268
269
|
emptyBox("empty1", { xs: 12, sm: 6, md: 4, lg: 3 }),
|
|
269
|
-
emptyBox("empty2", { xs: 0, sm: 0, md: 4, lg: 3 }),
|
|
270
270
|
|
|
271
271
|
]
|
|
272
272
|
break;
|
|
@@ -6,6 +6,7 @@ export const ComponentSchema: any = {
|
|
|
6
6
|
oneOf: [
|
|
7
7
|
{ title: "Masked Aadhar Card", const: "AadharcardText" },
|
|
8
8
|
{ title: "Array", const: "Array" },
|
|
9
|
+
{ title: "Upload Array", const: "UploadArray" },
|
|
9
10
|
{ title: "Button", const: "Button" },
|
|
10
11
|
{ title: "Data Card", const: "card" },
|
|
11
12
|
{ title: "Check Box", const: "CheckBox" },
|
|
@@ -20,7 +20,7 @@ const sectionLabels = {
|
|
|
20
20
|
SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
21
21
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
22
22
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
23
|
-
UploadFileIcon: ["Core", "Events", "Style"],
|
|
23
|
+
UploadFileIcon: ["Core", "Events", "Style","Validation"],
|
|
24
24
|
DeleteFileIcon: ["Core", "Events", "Style"],
|
|
25
25
|
Graph: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
26
26
|
DownloadFile: ["Core", "Events", "Style", "Validation"],
|
|
@@ -33,6 +33,7 @@ const sectionLabels = {
|
|
|
33
33
|
Rank: ["Core", "Events", "Style", "Validation"],
|
|
34
34
|
Button: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
35
35
|
Array: ["Core", "Components", "Properties","Validation"],
|
|
36
|
+
UploadArray: ["Core", "Components","Validation"],
|
|
36
37
|
Radio: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
37
38
|
Text: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
38
39
|
TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
|