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.
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.1054",
3
+ "version": "0.0.1056",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -1,18 +1,30 @@
1
1
  import _ from "lodash";
2
2
 
3
- const ArrayUiSchema = {
4
- type: "Control",
5
- scope: "#/properties/adjustments",
6
- layout: 11.5,
7
- options: {
8
- detail: {
9
- type: "HorizontalLayout",
10
- elements: []
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
- export const buildArray = (config:any,componentScope:string)=>{
15
- const array = _.cloneDeep(ArrayUiSchema);
16
- array.scope = componentScope;
17
- return array;
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
- elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
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", []),