impaktapps-ui-builder 0.0.1052 → 0.0.1055

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.1052",
3
+ "version": "0.0.1055",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -1,18 +1,32 @@
1
1
  import _ from "lodash";
2
2
 
3
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
- }
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
+ options: {
19
+ detail: {
20
+ type: "HorizontalLayout",
21
+ elements: []
22
+ }
23
+ }
24
+ }
25
+ export const buildArray = (config: any, componentScope: string) => {
26
+ let array = _.cloneDeep(ArrayUiSchema);
27
+ if (config.detailView === "Yes") {
28
+ array = _.cloneDeep(ArrayDetailUiSchema)
29
+ };
30
+ array.scope = componentScope;
31
+ return array;
18
32
  }
@@ -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", []),
@@ -70,7 +70,7 @@ export const ComponentSchema: any = {
70
70
  type: "array",
71
71
  items: {
72
72
  type: "object",
73
- properties: {
73
+ properties: {
74
74
  key: {
75
75
  type: "string",
76
76
  oneOf: [
@@ -191,7 +191,7 @@ export const ComponentSchema: any = {
191
191
  },
192
192
  },
193
193
  },
194
- enableColumnFilter:{
194
+ enableColumnFilter: {
195
195
  type: "array",
196
196
  items: {
197
197
  type: "object",
@@ -202,25 +202,23 @@ export const ComponentSchema: any = {
202
202
  },
203
203
  },
204
204
  },
205
- filteringOptions:{
206
- type: "array",
207
- items:{
208
- oneOf: [
209
- { const: 'fuzzy', title: 'Fuzzy' },
210
- { const: 'contains', title: 'Contain' },
211
- { const: 'startsWith', title: 'Starts with' },
212
- { const: 'endsWith', title: 'Ends with' },
213
- { const: 'equals', title: 'Equals' },
214
- { const: 'notEquals', title: 'Not Equals' },
215
- { const: 'between', title: 'Between' },
216
- { const: 'betweenInclusive', title: 'Between inclusive' },
217
- { const: 'greaterThan', title: 'Greater than' },
218
- { const: 'greaterThanOrEqualTo', title: 'Greater than or equal to' },
219
- { const: 'lessThan', title: 'Less than' },
220
- { const: 'lessThanOrEqualTo', title: 'Less than or equal to' },
221
- ]
222
- },
205
+ filteringOptions: {
206
+ oneOf: [
207
+ { const: 'fuzzy', title: 'Fuzzy' },
208
+ { const: 'contains', title: 'Contain' },
209
+ { const: 'startsWith', title: 'Starts with' },
210
+ { const: 'endsWith', title: 'Ends with' },
211
+ { const: 'equals', title: 'Equals' },
212
+ { const: 'notEquals', title: 'Not Equals' },
213
+ { const: 'between', title: 'Between' },
214
+ { const: 'betweenInclusive', title: 'Between inclusive' },
215
+ { const: 'greaterThan', title: 'Greater than' },
216
+ { const: 'greaterThanOrEqualTo', title: 'Greater than or equal to' },
217
+ { const: 'lessThan', title: 'Less than' },
218
+ { const: 'lessThanOrEqualTo', title: 'Less than or equal to' },
219
+ ]
223
220
  },
221
+
224
222
  legendLabels: {
225
223
  type: "array",
226
224
  items: {
@@ -343,7 +341,7 @@ export const ComponentSchema: any = {
343
341
  type: "string",
344
342
  },
345
343
  label: { type: 'string' },
346
- RemoveItemButton:{
344
+ RemoveItemButton: {
347
345
  disabled: true,
348
346
  },
349
347
  },
@@ -75,7 +75,7 @@ export function refreshPage(type: string, store: any) {
75
75
  widget: "SelectInputField",
76
76
  },
77
77
  config: {
78
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
78
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
79
79
  main: {
80
80
  label: "Column Format",
81
81
 
@@ -90,7 +90,7 @@ export function refreshPage(type: string, store: any) {
90
90
  widget: "RadioInputField",
91
91
  },
92
92
  config: {
93
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
93
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
94
94
  main: {
95
95
  label: "Enable Filter",
96
96
  options: ["Yes", "No"],
@@ -105,7 +105,7 @@ export function refreshPage(type: string, store: any) {
105
105
  widget: "SelectInputField",
106
106
  },
107
107
  config: {
108
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
108
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
109
109
  main: {
110
110
  label: "Filter Mode",
111
111
  multiple: true
@@ -121,7 +121,7 @@ export function refreshPage(type: string, store: any) {
121
121
  widget: "RadioInputField",
122
122
  },
123
123
  config: {
124
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
124
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
125
125
  main: {
126
126
  label: "Enable Sorting",
127
127
  options: ["Yes", "No"],