@nova-ui/bits 16.0.5 → 16.0.7

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,5 +1,5 @@
1
1
  import { CdkHeaderCell } from "@angular/cdk/table";
2
- import { AfterViewInit, ElementRef, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
2
+ import { AfterViewInit, ElementRef, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from "@angular/core";
3
3
  import { TableColumnDefDirective } from "./table-column-def.directive";
4
4
  import { IDragEvent } from "../../../common/directives/public-api";
5
5
  import { UtilService } from "../../../services/util.service";
@@ -15,6 +15,7 @@ export declare class TableHeaderCellComponent extends CdkHeaderCell implements O
15
15
  private tableStateHandlerService;
16
16
  private utilService;
17
17
  private zone;
18
+ private renderer;
18
19
  alignment: TableAlignmentOptions;
19
20
  tooltipText: string;
20
21
  isColumnSortingDisabled: boolean;
@@ -45,7 +46,7 @@ export declare class TableHeaderCellComponent extends CdkHeaderCell implements O
45
46
  dragStarted(event: IDragEvent): void;
46
47
  dropped(event: IDragEvent): void;
47
48
  dragEnd(event: IDragEvent): void;
48
- constructor(columnDef: TableColumnDefDirective, elementRef: ElementRef, tableStateHandlerService: TableStateHandlerService, utilService: UtilService, zone: NgZone);
49
+ constructor(columnDef: TableColumnDefDirective, elementRef: ElementRef, tableStateHandlerService: TableStateHandlerService, utilService: UtilService, zone: NgZone, renderer: Renderer2);
49
50
  ngOnInit(): void;
50
51
  ngOnChanges(changes: SimpleChanges): void;
51
52
  ngAfterViewInit(): void;
@@ -36,12 +36,14 @@ export declare class TableComponent<T> extends CdkTable<T> implements OnInit, Af
36
36
  columnsOrderChange: EventEmitter<Array<any>>;
37
37
  sortOrderChanged: EventEmitter<ISortedItem>;
38
38
  selectionChange: EventEmitter<ISelection>;
39
+ columnsWidthChange: EventEmitter<void>;
39
40
  sortDirection: SorterDirection;
40
41
  sortBy: string;
41
42
  private tableColumnsSubscription;
42
43
  private tableSortingSubscription;
43
44
  private selectionChangedSubscription;
44
45
  private stickyChangedSubscription;
46
+ private tableColumnsWidthSubscription;
45
47
  layoutFixed: boolean;
46
48
  virtualFor?: CdkVirtualForOf<unknown>;
47
49
  constructor(_differs: IterableDiffers, _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<any>, role: string, _dir: Directionality, tableStateHandlerService: TableStateHandlerService, document: Document, platform: Platform, viewRepeater: _ViewRepeater<T, RenderRow<T>, RowContext<T>>, coalescedStyleScheduler: _CoalescedStyleScheduler, viewportRuler: ViewportRuler, stickyPositioningListener: StickyPositioningListener);
@@ -56,5 +58,5 @@ export declare class TableComponent<T> extends CdkTable<T> implements OnInit, Af
56
58
  ngOnDestroy(): void;
57
59
  ngAfterContentInit(): void;
58
60
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, [null, null, null, { attribute: "role"; }, null, null, null, null, null, null, null, { optional: true; skipSelf: true; }]>;
59
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "nui-table, table[nui-table]", ["nuiTable"], { "reorderable": { "alias": "reorderable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selectionConfig": { "alias": "selectionConfig"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "sortedColumn": { "alias": "sortedColumn"; "required": false; }; "paginatorUsed": { "alias": "paginatorUsed"; "required": false; }; }, { "columnsOrderChange": "columnsOrderChange"; "sortOrderChanged": "sortOrderChanged"; "selectionChange": "selectionChange"; }, ["virtualFor"], ["caption", "colgroup, col"], false, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "nui-table, table[nui-table]", ["nuiTable"], { "reorderable": { "alias": "reorderable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selectionConfig": { "alias": "selectionConfig"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "sortedColumn": { "alias": "sortedColumn"; "required": false; }; "paginatorUsed": { "alias": "paginatorUsed"; "required": false; }; }, { "columnsOrderChange": "columnsOrderChange"; "sortOrderChanged": "sortOrderChanged"; "selectionChange": "selectionChange"; "columnsWidthChange": "columnsWidthChange"; }, ["virtualFor"], ["caption", "colgroup, col"], false, never>;
60
62
  }
package/package.json CHANGED
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "schematics": "./sdk/schematics/collection.json",
65
65
  "typings": "index.d.ts",
66
- "version": "16.0.5",
66
+ "version": "16.0.7",
67
67
  "packageManager": "yarn@1.22.18",
68
68
  "module": "fesm2022/nova-ui-bits.mjs",
69
69
  "sideEffects": false,
@@ -15,11 +15,29 @@ export declare class UnitConversionService {
15
15
  *
16
16
  * @param value The value to convert
17
17
  * @param base The base to use for the exponential expression when calculating the conversion result
18
+ *
19
+ * @returns {{ [Key in keyof Pick<IUnitConversionResult, "value" | "order">]: number }} The value and order of conversion
20
+ */
21
+ private convertLinear;
22
+ /**
23
+ * Converts a raw value to a larger unit approximation of the value. For example, 1100ms to 1.1s, 66000ms to 1.1m, etc.
24
+ *
25
+ * @param value The value to convert
26
+ * @param factors Array of factors to use for calculating smallest possible not zero result
27
+ *
28
+ * @returns {{ [Key in keyof Pick<IUnitConversionResult, "value" | "order">]: number }} The value and order of conversion
29
+ */
30
+ private convertNonLinear;
31
+ /**
32
+ * Converts a raw value to a larger unit approximation of the value. For example, 1024 B to 1 KB, 12345 Hz to 12.35 kHz, 66000ms to 1.1m, etc.
33
+ *
34
+ * @param value The value to convert
35
+ * @param base The base or array of factors to use for calculating the conversion result
18
36
  * @param scale The number of significant digits to the right of the decimal to include in the resulting converted value
19
37
  *
20
38
  * @returns {IUnitConversionResult} The conversion result
21
39
  */
22
- convert(value: number, base?: number, scale?: number): IUnitConversionResult;
40
+ convert(value: number, base?: number | number[], scale?: number): IUnitConversionResult;
23
41
  /**
24
42
  * Gets the display string of a conversion result
25
43
  *