@vuu-ui/vuu-table-types 0.13.2 → 0.13.3

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.
Files changed (2) hide show
  1. package/index.d.ts +30 -1
  2. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -361,6 +361,19 @@ export interface ColumnSettingsProps {
361
361
  vuuTable: VuuTable;
362
362
  }
363
363
 
364
+ export interface ColumnListPermissions {
365
+ allowReorderColumns?: boolean;
366
+ allowRemoveColumns?: boolean;
367
+ allowHideColumns?: boolean;
368
+ }
369
+
370
+ export interface TableSettingsPermissions extends ColumnListPermissions {
371
+ allowColumnLabelCase?: boolean;
372
+ allowColumnDefaultWidth?: boolean;
373
+ allowGridSeparators?: boolean;
374
+ allowCalculatedColumns?: boolean;
375
+ }
376
+
364
377
  /**
365
378
  * Describes the props for a Table Configuration Editor, for which
366
379
  * an implementation is provided in vuu-table-extras
@@ -375,8 +388,24 @@ export interface TableSettingsProps {
375
388
  onDataSourceConfigChange: (dataSourceConfig: DataSourceConfig) => void;
376
389
  onNavigateToColumn?: (columnName: string) => void;
377
390
  tableConfig: TableConfig;
391
+ permissions?: TableSettingsPermissions;
378
392
  }
379
393
 
394
+ export interface SettingsPermissions {
395
+ allowColumnSettings: boolean;
396
+ allowTableSettings: boolean | TableSettingsPermissions;
397
+ }
398
+
399
+ export interface ColumnMenuPermissions extends SettingsPermissions {
400
+ allowSort?: boolean;
401
+ allowGroup?: boolean;
402
+ allowAggregation?: boolean;
403
+ allowHide?: boolean;
404
+ allowPin: boolean;
405
+ }
406
+
407
+ export declare type ShowColumnHeaderMenus = boolean | ColumnMenuPermissions;
408
+
380
409
  export declare type DefaultColumnConfiguration = <T extends string = string>(
381
410
  tableName: T,
382
411
  columnName: string,
@@ -429,7 +458,7 @@ export interface HeaderCellProps
429
458
  column: RuntimeColumnDescriptor;
430
459
  onClick?: (evt: React.MouseEvent | React.KeyboardEvent) => void;
431
460
  onResize?: TableColumnResizeHandler;
432
- showMenu?: boolean;
461
+ showColumnHeaderMenus?: ShowColumnHeaderNMenus;
433
462
  }
434
463
 
435
464
  export declare type TableConfigChangeHandler = (config: TableConfig) => void;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-table-types",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "devDependencies": {
5
- "@vuu-ui/vuu-data-types": "0.13.2",
6
- "@vuu-ui/vuu-filter-types": "0.13.2",
7
- "@vuu-ui/vuu-protocol-types": "0.13.2"
5
+ "@vuu-ui/vuu-data-types": "0.13.3",
6
+ "@vuu-ui/vuu-filter-types": "0.13.3",
7
+ "@vuu-ui/vuu-protocol-types": "0.13.3"
8
8
  },
9
9
  "author": "heswell",
10
10
  "license": "Apache-2.0",