impaktapps-ui-builder 0.0.1054 → 0.0.1056
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 +24 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +4 -4
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildArray.ts +26 -14
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +7 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +8 -1
|
@@ -1,11 +1 @@
|
|
|
1
|
-
export declare const buildArray: (config: any, componentScope: string) =>
|
|
2
|
-
type: string;
|
|
3
|
-
scope: string;
|
|
4
|
-
layout: number;
|
|
5
|
-
options: {
|
|
6
|
-
detail: {
|
|
7
|
-
type: string;
|
|
8
|
-
elements: any[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
1
|
+
export declare const buildArray: (config: any, componentScope: string) => any;
|
package/package.json
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
2
|
|
|
3
|
-
const ArrayUiSchema = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
}
|
|
3
|
+
const ArrayUiSchema: any = {
|
|
4
|
+
type: "Control",
|
|
5
|
+
scope: "#/properties/adjustments",
|
|
6
|
+
layout: 11.5,
|
|
7
|
+
options: {
|
|
8
|
+
detail: {
|
|
9
|
+
type: "HorizontalLayout",
|
|
10
|
+
elements: []
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const ArrayDetailUiSchema = {
|
|
15
|
+
type: "Control",
|
|
16
|
+
scope: "#/properties/adjustments",
|
|
17
|
+
layout: 11.5,
|
|
18
|
+
|
|
19
|
+
elements: []
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
export const buildArray = (config: any, componentScope: string) => {
|
|
24
|
+
let array = _.cloneDeep(ArrayUiSchema);
|
|
25
|
+
if (config.detailView === "Yes") {
|
|
26
|
+
array = _.cloneDeep(ArrayDetailUiSchema)
|
|
27
|
+
};
|
|
28
|
+
array.scope = componentScope;
|
|
29
|
+
return array;
|
|
18
30
|
}
|
|
@@ -40,6 +40,7 @@ import { buildDataGrid } from "./buildDataGrid";
|
|
|
40
40
|
import { buildInputSlider } from "./buildInputSlider";
|
|
41
41
|
import { buildTreeMap } from "./buildTreeMap";
|
|
42
42
|
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
43
|
+
import { arrayBuffer } from "stream/consumers";
|
|
43
44
|
export let schema = {
|
|
44
45
|
type: "object",
|
|
45
46
|
properties: {},
|
|
@@ -375,9 +376,14 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
375
376
|
})
|
|
376
377
|
}
|
|
377
378
|
else if (config.type == "Array") {
|
|
378
|
-
|
|
379
|
+
const ArrayElements = config.elements.map((e: any, elemInd: number) => {
|
|
379
380
|
return buildUiSchema(e, store)
|
|
380
381
|
});
|
|
382
|
+
if (config.detailView === "Yes") {
|
|
383
|
+
elements.elements = ArrayElements;
|
|
384
|
+
} else {
|
|
385
|
+
elements.options.detail.elements = ArrayElements;
|
|
386
|
+
}
|
|
381
387
|
}
|
|
382
388
|
else {
|
|
383
389
|
elements.elements = config.elements.map((e: any, elemInd: number) => {
|
|
@@ -258,7 +258,14 @@ const GraphSection = {
|
|
|
258
258
|
export const buildPropertiesSection = function (type: String) {
|
|
259
259
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
260
260
|
switch (type) {
|
|
261
|
-
|
|
261
|
+
case "Array":
|
|
262
|
+
uiSchema.elements = [
|
|
263
|
+
getRadioInputField("detailView", "Deatil View", ["Yes", "No"]),
|
|
264
|
+
emptyBox("DataGridEmpty1", {xs: 6, sm: 0, md: 4, lg: 4 }),
|
|
265
|
+
emptyBox("DataGridEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
|
|
266
|
+
cardLayout,
|
|
267
|
+
]
|
|
268
|
+
break;
|
|
262
269
|
case "TreeMap":
|
|
263
270
|
uiSchema.elements = [
|
|
264
271
|
getSelectField("orientation", "orientation", []),
|