@masterteam/data-grid 0.0.1 → 0.0.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": "@masterteam/data-grid",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Independent Angular data grid. Full reference parity is under development.",
5
5
  "publishConfig": {
6
6
  "directory": "../../../dist/masterteam/data-grid",
@@ -545,6 +545,38 @@ interface MtFiltersToolPanelDef {
545
545
  type MtColumnFilterModel = MtSimpleFilterModel | MtCombinedFilterModel | MtSetFilterModel | MtMultiFilterModel;
546
546
  /** `getFilterModel()`: the active column filters by column id (the quick filter is not part of it). */
547
547
  type MtFilterModel = Readonly<Record<string, MtColumnFilterModel>>;
548
+ /** One option of a remote set filter: the key the model keeps and the text the list shows. */
549
+ interface MtSetFilterOption {
550
+ readonly value: string;
551
+ readonly label: string;
552
+ }
553
+ /** An observable-like search result (an RxJS `Observable` fits); a stale search is unsubscribed. */
554
+ interface MtSetFilterSubscribable<V> {
555
+ subscribe(observer: {
556
+ next: (value: V) => void;
557
+ error: (error: unknown) => void;
558
+ complete: () => void;
559
+ }): {
560
+ unsubscribe(): void;
561
+ };
562
+ }
563
+ type MtSetFilterSearchResult = PromiseLike<readonly MtSetFilterOption[]> | MtSetFilterSubscribable<readonly MtSetFilterOption[]>;
564
+ /**
565
+ * A set filter whose options come from a search (usually a server) instead of the column's
566
+ * values. The popup searches as the user types, lists the matches in the order returned and
567
+ * keeps the chosen option values in the model; choosing nothing is no filter. Chosen values
568
+ * stay listed (with their remembered labels) when a later search does not return them.
569
+ */
570
+ interface MtSetFilterRemoteSearch {
571
+ /** The options matching the trimmed search text (`''` when the popup opens). */
572
+ readonly search: (text: string) => MtSetFilterSearchResult;
573
+ /** One value at a time, for a server that filters by one key (default false). */
574
+ readonly single?: boolean;
575
+ /** Delay between typing and searching (default 300ms). */
576
+ readonly debounceMs?: number;
577
+ /** Shorter texts do not search; the popup asks the user to type (default 0). */
578
+ readonly minLength?: number;
579
+ }
548
580
  interface MtFilterParams {
549
581
  /** Delay between typing and applying the filter (observed default 500ms for text, number and date). */
550
582
  readonly debounceMs?: number;
@@ -613,6 +645,8 @@ interface MtFilterParams {
613
645
  readonly suppressMiniFilter?: boolean;
614
646
  /** Set filter: hides the "(Select All)" row. */
615
647
  readonly suppressSelectAll?: boolean;
648
+ /** Set filter: search the options remotely as the user types (no "(Select All)"). */
649
+ readonly remoteSearch?: MtSetFilterRemoteSearch;
616
650
  }
617
651
  type MtFilterChangedSource = 'api' | 'quickFilter' | 'columnFilter';
618
652
  interface MtFilterChangedEvent {
@@ -2168,8 +2202,8 @@ declare class MtDataGridComponent<T extends object> {
2168
2202
  /** -1 opens every group, n the groups above level n, 0 (default) none. */
2169
2203
  readonly groupDefaultExpanded: _angular_core.InputSignal<number>;
2170
2204
  readonly autoGroupColumnDef: _angular_core.InputSignal<MtAutoGroupColumnDef<T> | undefined>;
2171
- readonly groupTotalRow: _angular_core.InputSignal<"top" | "bottom" | undefined>;
2172
- readonly grandTotalRow: _angular_core.InputSignal<"top" | "bottom" | undefined>;
2205
+ readonly groupTotalRow: _angular_core.InputSignal<"bottom" | "top" | undefined>;
2206
+ readonly grandTotalRow: _angular_core.InputSignal<"bottom" | "top" | undefined>;
2173
2207
  /** Custom aggregation functions by name, for `aggFunc`. */
2174
2208
  readonly aggFuncs: _angular_core.InputSignal<Readonly<Record<string, MtAggFunc<T>>> | undefined>;
2175
2209
  /** Grouping from the UI hides the grouped column unless suppressed (observed). */
@@ -3385,4 +3419,4 @@ declare class ChartDialogHandle {
3385
3419
  }
3386
3420
 
3387
3421
  export { AUTO_GROUP_COLUMN_ID, CHART_MENU_GROUPS, CHART_MISSING_CATEGORY_ID, CHART_RECORD_COUNT_ID, CHART_TYPES, DETAIL_ROW_ID_PREFIX, MT_GRID_COLUMNS_TOOL_PANEL_DEFAULTS, MT_GRID_EMPTY_OVERLAY, MT_GRID_ICONS, MtDataGridComponent, MtGridChartScope, ROW_NUMBERS_COLUMN_ID, SELECTION_COLUMN_ID, applyGridViewState, buildRowLayout, captureGridViewState, chartDistinctMeasureId, chartMeasure, chartNonEmptyMeasureId, chartTypeLabel, createExcelWorkbook, editorKindFor, fillValues, parseClipboardText, parseEditedValue, parseGridViewState, queryClientRows, rowWindowFor, sparklineGeometry, sparklineValues, stableCategoryColors };
3388
- export type { GridIconName, MtAddCellRangeParams, MtAggFunc, MtAggFuncName, MtAggFuncParams, MtApplyColumnStateParams, MtAutoGroupColumnDef, MtAvgResult, MtBuiltInCellRenderer, MtCellClass, MtCellClassParams, MtCellClassRules, MtCellEditingStartedEvent, MtCellEditingStoppedEvent, MtCellEditorKind, MtCellEditorParams, MtCellFocusedEvent, MtCellRange, MtCellRenderer, MtCellRendererComponent, MtCellRendererFn, MtCellRendererParams, MtCellSelectionChangedEvent, MtCellSelectionOptions, MtCellStyle, MtCellValueChangedEvent, MtCellValueChangedSource, MtChartCategoryDef, MtChartCategoryParams, MtChartCategoryValue, MtChartCellRange, MtChartCreatedEvent, MtChartDataType, MtChartDestroyedEvent, MtChartImageParams, MtChartMeasureKind, MtChartModel, MtChartOptionsChangedEvent, MtChartRangeSelectionChangedEvent, MtChartRef, MtChartTheme, MtChartThemeOverrides, MtChartToolPanel, MtChartToolPanelsDef, MtChartToolbarItem, MtChartType, MtClientQuery, MtClipboardCellParams, MtClipboardGroupHeaderParams, MtClipboardHeaderParams, MtColDef, MtColumnDef, MtColumnEventSource, MtColumnFilter, MtColumnFilterModel, MtColumnGroupDef, MtColumnGroupOpenedEvent, MtColumnGroupRef, MtColumnGroupShow, MtColumnGroupState, MtColumnMovedEvent, MtColumnPinned, MtColumnPinnedEvent, MtColumnPivotChangedEvent, MtColumnPivotModeChangedEvent, MtColumnResizedEvent, MtColumnRowGroupChangedEvent, MtColumnState, MtColumnStateUpdate, MtColumnType, MtColumnValueChangedEvent, MtColumnVisibleEvent, MtColumnWidth, MtColumnsToolPanelInstance, MtColumnsToolPanelParams, MtCombinedFilterModel, MtContextMenuItem, MtContextMenuVisibleChangedEvent, MtCopyParams, MtCreatePivotChartParams, MtCreateRangeChartParams, MtCsvExportParams, MtDateFilterModel, MtDefaultMainMenuItem, MtDefaultMenuItem, MtDetailCellRendererParams, MtDetailGridOptions, MtDisplayedColumnsChangedEvent, MtEditingCell, MtExcelCellValue, MtExcelExportParams, MtExcelStyle, MtExcelWorkbookSheet, MtExpandOrCollapseAllEvent, MtExportCell, MtExportCellParams, MtExportContent, MtExportParams, MtExportRow, MtFillEvent, MtFilterChangedEvent, MtFilterChangedSource, MtFilterModel, MtFilterModifiedEvent, MtFilterOpenedEvent, MtFilterOption, MtFilterParams, MtFiltersToolPanelDef, MtFiltersToolPanelInstance, MtGetContextMenuItemsParams, MtGetDetailRowDataParams, MtGetMainMenuItemsParams, MtGridApi, MtGridEmptyOverlayParams, MtGridLocaleParams, MtGridLocaleText, MtGridLocaleTextResolver, MtGridReadyEvent, MtGridViewState, MtGroupDisplayType, MtHeaderRendererComponent, MtHeaderRendererParams, MtMainMenuItem, MtMenuActionParams, MtMenuItemDef, MtMultiFilterDef, MtMultiFilterModel, MtNumberFilterModel, MtPaginationChangedEvent, MtPasteEvent, MtPdfExportParams, MtPivotMaxColumnsExceededEvent, MtRangeChartUpdateParams, MtRowClickedEvent, MtRowDragEvent, MtRowGroupOpenedEvent, MtRowGroupPanelShow, MtRowNode, MtRowNumbersOptions, MtRowSelectedEvent, MtRowSelectionMode, MtRowSelectionOptions, MtScalarFilterType, MtSelectAllMode, MtSelectionChangedEvent, MtSelectionColumnDef, MtSelectionSource, MtSeriesChartType, MtSetNodesSelectedParams, MtShowContextMenuParams, MtSideBar, MtSideBarDef, MtSimpleFilterModel, MtSortModel, MtSparklineOptions, MtSparklineType, MtStartEditingCellParams, MtStatusBarOptions, MtStatusBarPanel, MtTextFilterModel, MtTextFilterType, MtToolPanelDef, MtToolPanelKind, MtToolPanelSizeChangedEvent, MtToolPanelVisibleChangedEvent, MtToolPanelVisibleSource, MtValueParams, MtValueParserParams, MtValueSetterParams, RowLayout, SparklineBar, SparklineGeometry, SparklinePoint };
3422
+ export type { GridIconName, MtAddCellRangeParams, MtAggFunc, MtAggFuncName, MtAggFuncParams, MtApplyColumnStateParams, MtAutoGroupColumnDef, MtAvgResult, MtBuiltInCellRenderer, MtCellClass, MtCellClassParams, MtCellClassRules, MtCellEditingStartedEvent, MtCellEditingStoppedEvent, MtCellEditorKind, MtCellEditorParams, MtCellFocusedEvent, MtCellRange, MtCellRenderer, MtCellRendererComponent, MtCellRendererFn, MtCellRendererParams, MtCellSelectionChangedEvent, MtCellSelectionOptions, MtCellStyle, MtCellValueChangedEvent, MtCellValueChangedSource, MtChartCategoryDef, MtChartCategoryParams, MtChartCategoryValue, MtChartCellRange, MtChartCreatedEvent, MtChartDataType, MtChartDestroyedEvent, MtChartImageParams, MtChartMeasureKind, MtChartModel, MtChartOptionsChangedEvent, MtChartRangeSelectionChangedEvent, MtChartRef, MtChartTheme, MtChartThemeOverrides, MtChartToolPanel, MtChartToolPanelsDef, MtChartToolbarItem, MtChartType, MtClientQuery, MtClipboardCellParams, MtClipboardGroupHeaderParams, MtClipboardHeaderParams, MtColDef, MtColumnDef, MtColumnEventSource, MtColumnFilter, MtColumnFilterModel, MtColumnGroupDef, MtColumnGroupOpenedEvent, MtColumnGroupRef, MtColumnGroupShow, MtColumnGroupState, MtColumnMovedEvent, MtColumnPinned, MtColumnPinnedEvent, MtColumnPivotChangedEvent, MtColumnPivotModeChangedEvent, MtColumnResizedEvent, MtColumnRowGroupChangedEvent, MtColumnState, MtColumnStateUpdate, MtColumnType, MtColumnValueChangedEvent, MtColumnVisibleEvent, MtColumnWidth, MtColumnsToolPanelInstance, MtColumnsToolPanelParams, MtCombinedFilterModel, MtContextMenuItem, MtContextMenuVisibleChangedEvent, MtCopyParams, MtCreatePivotChartParams, MtCreateRangeChartParams, MtCsvExportParams, MtDateFilterModel, MtDefaultMainMenuItem, MtDefaultMenuItem, MtDetailCellRendererParams, MtDetailGridOptions, MtDisplayedColumnsChangedEvent, MtEditingCell, MtExcelCellValue, MtExcelExportParams, MtExcelStyle, MtExcelWorkbookSheet, MtExpandOrCollapseAllEvent, MtExportCell, MtExportCellParams, MtExportContent, MtExportParams, MtExportRow, MtFillEvent, MtFilterChangedEvent, MtFilterChangedSource, MtFilterModel, MtFilterModifiedEvent, MtFilterOpenedEvent, MtFilterOption, MtFilterParams, MtFiltersToolPanelDef, MtFiltersToolPanelInstance, MtGetContextMenuItemsParams, MtGetDetailRowDataParams, MtGetMainMenuItemsParams, MtGridApi, MtGridEmptyOverlayParams, MtGridLocaleParams, MtGridLocaleText, MtGridLocaleTextResolver, MtGridReadyEvent, MtGridViewState, MtGroupDisplayType, MtHeaderRendererComponent, MtHeaderRendererParams, MtMainMenuItem, MtMenuActionParams, MtMenuItemDef, MtMultiFilterDef, MtMultiFilterModel, MtNumberFilterModel, MtPaginationChangedEvent, MtPasteEvent, MtPdfExportParams, MtPivotMaxColumnsExceededEvent, MtRangeChartUpdateParams, MtRowClickedEvent, MtRowDragEvent, MtRowGroupOpenedEvent, MtRowGroupPanelShow, MtRowNode, MtRowNumbersOptions, MtRowSelectedEvent, MtRowSelectionMode, MtRowSelectionOptions, MtScalarFilterType, MtSelectAllMode, MtSelectionChangedEvent, MtSelectionColumnDef, MtSelectionSource, MtSeriesChartType, MtSetFilterOption, MtSetFilterRemoteSearch, MtSetFilterSearchResult, MtSetFilterSubscribable, MtSetNodesSelectedParams, MtShowContextMenuParams, MtSideBar, MtSideBarDef, MtSimpleFilterModel, MtSortModel, MtSparklineOptions, MtSparklineType, MtStartEditingCellParams, MtStatusBarOptions, MtStatusBarPanel, MtTextFilterModel, MtTextFilterType, MtToolPanelDef, MtToolPanelKind, MtToolPanelSizeChangedEvent, MtToolPanelVisibleChangedEvent, MtToolPanelVisibleSource, MtValueParams, MtValueParserParams, MtValueSetterParams, RowLayout, SparklineBar, SparklineGeometry, SparklinePoint };