impaktapps-ui-builder 0.0.104 → 0.0.105-4.alpha-2

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.104",
3
+ "version": "0.0.1054.alpha-2",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -14,7 +14,7 @@ import { buildWrapperSection } from "./buildWrapperSection";
14
14
  import { buildTextField } from "./buildText";
15
15
  import { buildSelect } from "./buildSelect";
16
16
  import { buildButton } from "./buildButton";
17
- import { buildTable } from "./buildTable";
17
+ import { buildTable } from "./buildTable";
18
18
  import { buildLabel } from "./buildLabel";
19
19
  import { buildUploadFile } from "./buildUplaodFile";
20
20
  import { buildDownloadFile } from "./buildDownloadFile";
@@ -345,44 +345,43 @@ const buildUiSchema = (config: any, store?: any) => {
345
345
  sizeMap[e.keyName] = e.value
346
346
  });
347
347
  }
348
- if(config.enableColumnFilter){
349
- config.enableColumnFilter.map((e)=>{
348
+ if (config.enableColumnFilter) {
349
+ config.enableColumnFilter.map((e) => {
350
350
  filterMap[e.keyName] = true
351
351
  })
352
352
  }
353
353
  elements.elements = config.elements.map((cellElem, elemInd) => {
354
+ const commonProperties = {
355
+ accessorKey: cellElem.name,
356
+ type: cellElem.columnFormat,
357
+ header: cellElem.label || cellElem.name,
358
+ size: sizeMap[cellElem.name] || 180,
359
+ enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
360
+ columnFilterModeOptions: config.filteringOptions,
361
+ enableSorting: config.enableSorting === "No" ? false : true,
362
+ columnKey: config.columnKey
363
+ }
354
364
  if (cellElem.type) {
355
365
  return {
356
- accessorKey: cellElem.name,
357
- header: cellElem.label || cellElem.name,
358
- size: sizeMap[cellElem.name] || 180,
359
- type: cellElem.columnFormat,
360
366
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
361
367
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
362
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
363
- columnFilterModeOptions: config.filteringOptions
368
+ ...commonProperties
369
+
364
370
  }
365
371
  } else {
366
- return {
367
- accessorKey: cellElem.name,
368
- type: cellElem.columnFormat,
369
- header: cellElem.label || cellElem.name,
370
- size: sizeMap[cellElem.name] || 180,
371
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
372
- columnFilterModeOptions: config.filteringOptions
373
- }
372
+ return commonProperties
374
373
  }
375
374
 
376
375
  })
377
376
  }
378
377
  else if (config.type == "Array") {
379
378
  elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
380
- return buildUiSchema(e,store)
379
+ return buildUiSchema(e, store)
381
380
  });
382
381
  }
383
382
  else {
384
383
  elements.elements = config.elements.map((e: any, elemInd: number) => {
385
- return buildUiSchema(e,store)
384
+ return buildUiSchema(e, store)
386
385
  });
387
386
  }
388
387
  }
@@ -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
  },