impaktapps-ui-builder 0.0.75 → 0.0.76-filteringOption

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.
@@ -84,6 +84,26 @@ export declare const getSelectField: (scope: string, label: string, options: {
84
84
  };
85
85
  };
86
86
  };
87
+ export declare const getMultiSelectField: (scope: string, label: string) => {
88
+ type: string;
89
+ scope: string;
90
+ options: {
91
+ widget: string;
92
+ };
93
+ config: {
94
+ layout: {
95
+ xs: number;
96
+ sm: number;
97
+ md: number;
98
+ lg: number;
99
+ };
100
+ main: {
101
+ multiple: boolean;
102
+ label: string;
103
+ options: any[];
104
+ };
105
+ };
106
+ };
87
107
  export declare const buildPropertiesSection: (type: String) => {
88
108
  type: string;
89
109
  elements: any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.75",
3
+ "version": "0.0.76-filteringOption",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -341,8 +341,8 @@ const buildUiSchema = (config: any, store?: any) => {
341
341
  sizeMap[e.keyName] = e.value
342
342
  });
343
343
  }
344
- if(config.disableColumnFilter){
345
- config.disableColumnFilter.map((e)=>{
344
+ if(config.enableColumnFilter){
345
+ config.enableColumnFilter.map((e)=>{
346
346
  filterMap[e.keyName] = true
347
347
  })
348
348
  }
@@ -355,7 +355,8 @@ const buildUiSchema = (config: any, store?: any) => {
355
355
  type: cellElem.columnFormat,
356
356
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
357
357
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
358
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false
358
+ enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
359
+ columnFilterModeOptions: config.filteringOptions
359
360
  }
360
361
  } else {
361
362
  return {
@@ -363,7 +364,8 @@ const buildUiSchema = (config: any, store?: any) => {
363
364
  type: cellElem.columnFormat,
364
365
  header: cellElem.label || cellElem.name,
365
366
  size: sizeMap[cellElem.name] || 180,
366
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false
367
+ enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
368
+ columnFilterModeOptions: config.filteringOptions
367
369
  }
368
370
  }
369
371
 
@@ -229,6 +229,24 @@ export const getSelectField = (scope: string, label: string, options: { label: s
229
229
  },
230
230
  }
231
231
  }
232
+ export const getMultiSelectField = (scope: string, label: string) => {
233
+ return {
234
+ type: "Control",
235
+ scope: `#/properties/${scope}`,
236
+
237
+ options: {
238
+ widget: "MultipleSelect",
239
+ },
240
+ config: {
241
+ layout: { xs: 11, sm: 5.5, md: 5.5, lg: 5.5 },
242
+ main: {
243
+ multiple: true,
244
+ label: label,
245
+ options: [],
246
+ },
247
+ },
248
+ }
249
+ }
232
250
 
233
251
 
234
252
  const GraphSection = {
@@ -422,7 +440,9 @@ export const buildPropertiesSection = function (type: String) {
422
440
  getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
423
441
  getRadioInputField("disableFilters", "Disable Filter", ["YES", "NO"]),
424
442
  getRadioInputField("disableSorting", "Disable Sorting", ["YES", "NO"]),
425
- getInputField("selectKey", "Selection Key"),emptyBox("LazyLoadingTableEmpty1", {xs: 6, sm: 0, md: 4, lg: 4 }),
443
+ getMultiSelectField("filteringOptions", "Filtering Options"),
444
+ getInputField("selectKey", "Selection Key"),
445
+ // emptyBox("LazyLoadingTableEmpty1", {xs: 6, sm: 0, md: 4, lg: 4 }),
426
446
  buildWrapper("Tree Table Properties", [
427
447
  getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
428
448
  getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
@@ -433,7 +453,7 @@ export const buildPropertiesSection = function (type: String) {
433
453
  ]),
434
454
  getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
435
455
  sizeHolder,
436
- getArrayControl("disableColumnFilter", "keyName", "Component Name"),
456
+ getArrayControl("enableColumnFilter", "keyName", "Component Name"),
437
457
  ]
438
458
  break;
439
459
  case "Radio":
@@ -190,7 +190,7 @@ export const ComponentSchema: any = {
190
190
  },
191
191
  },
192
192
  },
193
- disableColumnFilter:{
193
+ enableColumnFilter:{
194
194
  type: "array",
195
195
  items: {
196
196
  type: "object",
@@ -201,6 +201,25 @@ export const ComponentSchema: any = {
201
201
  },
202
202
  },
203
203
  },
204
+ filteringOptions:{
205
+ type: "array",
206
+ items:{
207
+ oneOf: [
208
+ { const: 'fuzzy', title: 'Fuzzy' },
209
+ { const: 'contains', title: 'Contain' },
210
+ { const: 'startsWith', title: 'Starts with' },
211
+ { const: 'endsWith', title: 'Ends with' },
212
+ { const: 'equals', title: 'Equals' },
213
+ { const: 'notEquals', title: 'Not Equals' },
214
+ { const: 'between', title: 'Between' },
215
+ { const: 'betweenInclusive', title: 'Between inclusive' },
216
+ { const: 'greaterThan', title: 'Greater than' },
217
+ { const: 'greaterThanOrEqualTo', title: 'Greater than or equal to' },
218
+ { const: 'lessThan', title: 'Less than' },
219
+ { const: 'lessThanOrEqualTo', title: 'Less than or equal to' },
220
+ ]
221
+ },
222
+ },
204
223
  legendLabels: {
205
224
  type: "array",
206
225
  items: {