@simple-table/angular 4.2.3 → 4.2.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.
- package/README.md +34 -4
- package/dist/fesm2022/simple-table-angular.mjs +651 -98
- package/dist/fesm2022/simple-table-angular.mjs.map +1 -1
- package/dist/index.d.ts +126 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Type,
|
|
3
|
-
import { CellValue, CellRenderer, ColumnDef, HeaderRenderer, SimpleTableProps, ColumnEditorConfig, SimpleTableConfig, TableAPI } from 'simple-table-core';
|
|
2
|
+
import { Type, AfterContentInit, OnChanges, OnDestroy, EventEmitter, TemplateRef, EnvironmentProviders, ApplicationRef, EnvironmentInjector, Injector } from '@angular/core';
|
|
3
|
+
import { CellValue, CellRenderer, ColumnDef, HeaderRenderer, SimpleTableProps, ColumnEditorConfig, SimpleTableConfig, TableAPI, CellClickProps, CellChangeProps, SortColumn, TableFilterState, RowSelectionChangeProps, OnRowGroupExpandProps, ColumnVisibilityState, PivotConfig } from 'simple-table-core';
|
|
4
4
|
export { Accessor, AggregationConfig, AggregationType, AnimationsConfig, AutoSizeMode, BooleanFilterOperator, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnDef, ColumnEditorConfig, ColumnEditorCustomRenderer, ColumnEditorCustomRendererProps, ColumnEditorRowRenderer, ColumnEditorRowRendererComponents, ColumnEditorRowRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DateFilterOperator, EmptyStateRenderer, EmptyStateRendererProps, EnumFilterOperator, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FilterOperator, FooterPosition, FooterRendererProps, GetRowClass, GetRowClassParams, GetRowId, GetRowIdParams, HeaderDropdown, HeaderDropdownProps, HeaderRenderer, HeaderRendererComponents, HeaderRendererProps, IconsConfig, LoadingStateRenderer, LoadingStateRendererProps, NumberFilterOperator, OnRowGroupExpandProps, PIVOT_ACCESSOR_PREFIX, PIVOT_BLANK_LABEL, PIVOT_IS_TOTAL_KEY, Pinned, PinnedSectionsState, PivotConfig, PivotResult, PivotValueConfig, QuickFilterConfig, QuickFilterGetter, QuickFilterGetterProps, QuickFilterMode, Row, RowButtonProps, RowId, RowSelectionChangeProps, RowSelectionMode, RowState, SetHeaderRenameProps, ShowWhen, SimpleTableConfig, SimpleTableProps, SortColumn, StringFilterOperator, TableAPI, TableFilterState, TableRow, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, asRows, buildPivotAccessor, buildPivotRowTotalAccessor, pivotRows } from 'simple-table-core';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -119,8 +119,12 @@ type NestedTableAngularConfig = Omit<SimpleTableAngularProps, "rows" | "columns"
|
|
|
119
119
|
* Prefer typed `rows` / `columns` (`AngularColumnDef<MyRow>`). For a typed
|
|
120
120
|
* imperative handle, use `@ViewChild(SimpleTableComponent) table!: SimpleTableComponent<MyRow>`
|
|
121
121
|
* or listen to `(tableReady)`.
|
|
122
|
+
*
|
|
123
|
+
* Page templates (`stCell`, `stEmpty`, …) and `(sortChange)`-style outputs are
|
|
124
|
+
* the native Angular API. Import `SimpleTableImports` on the page. `class` on
|
|
125
|
+
* this host styles the wrapper; `[className]` styles the inner grid root.
|
|
122
126
|
*/
|
|
123
|
-
declare class SimpleTableComponent<TData extends AngularDefaultRowData = AngularDefaultRowData> implements
|
|
127
|
+
declare class SimpleTableComponent<TData extends AngularDefaultRowData = AngularDefaultRowData> implements AfterContentInit, OnChanges, OnDestroy {
|
|
124
128
|
rows: SimpleTableAngularProps<TData>["rows"];
|
|
125
129
|
columns?: SimpleTableAngularProps<TData>["columns"];
|
|
126
130
|
footerRenderer?: SimpleTableAngularProps<TData>["footerRenderer"];
|
|
@@ -200,47 +204,146 @@ declare class SimpleTableComponent<TData extends AngularDefaultRowData = Angular
|
|
|
200
204
|
oddEvenRowBackground?: SimpleTableAngularProps<TData>["oddEvenRowBackground"];
|
|
201
205
|
/** Emits the TableAPI once the table has mounted. */
|
|
202
206
|
tableReady: EventEmitter<TableAPI<TData>>;
|
|
207
|
+
cellClick: EventEmitter<CellClickProps<TData>>;
|
|
208
|
+
cellEdit: EventEmitter<CellChangeProps<TData>>;
|
|
209
|
+
sortChange: EventEmitter<SortColumn | null>;
|
|
210
|
+
filterChange: EventEmitter<TableFilterState<TData>>;
|
|
211
|
+
rowSelectionChange: EventEmitter<RowSelectionChangeProps<TData>>;
|
|
212
|
+
rowGroupExpand: EventEmitter<OnRowGroupExpandProps<TData>>;
|
|
213
|
+
columnOrderChange: EventEmitter<AngularColumnDef<TData, any>[]>;
|
|
214
|
+
columnVisibilityChange: EventEmitter<ColumnVisibilityState>;
|
|
215
|
+
columnWidthChange: EventEmitter<AngularColumnDef<TData, any>[]>;
|
|
216
|
+
pageChange: EventEmitter<number>;
|
|
217
|
+
loadMore: EventEmitter<void>;
|
|
218
|
+
headerEdit: EventEmitter<{
|
|
219
|
+
header: AngularColumnDef<TData, any>;
|
|
220
|
+
newLabel: string;
|
|
221
|
+
}>;
|
|
222
|
+
columnSelect: EventEmitter<AngularColumnDef<TData, any>>;
|
|
223
|
+
pivotChange: EventEmitter<PivotConfig<TData> | null>;
|
|
224
|
+
private cellSlots;
|
|
225
|
+
private headerSlots;
|
|
226
|
+
private emptySlots;
|
|
227
|
+
private footerSlots;
|
|
228
|
+
private loadingSlots;
|
|
229
|
+
private errorSlots;
|
|
203
230
|
private instance;
|
|
204
231
|
private registry;
|
|
205
232
|
private syncedDefaultHeaders;
|
|
206
233
|
private syncedRows;
|
|
234
|
+
private syncedSlotsKey;
|
|
207
235
|
private wasLoading;
|
|
208
236
|
private didInitialAutoSize;
|
|
237
|
+
private slotUnsub;
|
|
209
238
|
private hostEl;
|
|
210
239
|
private appRef;
|
|
211
240
|
private envInjector;
|
|
212
241
|
private elementInjector;
|
|
242
|
+
private ngZone;
|
|
243
|
+
private inZone;
|
|
213
244
|
private maybeRefitAutoSizeColumns;
|
|
214
|
-
|
|
245
|
+
private collectSlots;
|
|
246
|
+
private slotsFingerprint;
|
|
247
|
+
private buildConfig;
|
|
248
|
+
private mountTable;
|
|
249
|
+
private applyConfig;
|
|
250
|
+
ngAfterContentInit(): void;
|
|
215
251
|
ngOnChanges(): void;
|
|
216
252
|
ngOnDestroy(): void;
|
|
217
253
|
/** Returns the full imperative TableAPI. Use via @ViewChild or (tableReady) output. */
|
|
218
254
|
getAPI(): TableAPI<TData> | null;
|
|
219
255
|
private getProps;
|
|
220
256
|
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleTableComponent<any>, never>;
|
|
221
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleTableComponent<any>, "simple-table", never, { "rows": { "alias": "rows"; "required": true; }; "columns": { "alias": "columns"; "required": false; }; "footerRenderer": { "alias": "footerRenderer"; "required": false; }; "loadingStateRenderer": { "alias": "loadingStateRenderer"; "required": false; }; "errorStateRenderer": { "alias": "errorStateRenderer"; "required": false; }; "emptyStateRenderer": { "alias": "emptyStateRenderer"; "required": false; }; "tableEmptyStateRenderer": { "alias": "tableEmptyStateRenderer"; "required": false; }; "headerDropdown": { "alias": "headerDropdown"; "required": false; }; "columnEditorConfig": { "alias": "columnEditorConfig"; "required": false; }; "onCellClick": { "alias": "onCellClick"; "required": false; }; "onCellEdit": { "alias": "onCellEdit"; "required": false; }; "onSortChange": { "alias": "onSortChange"; "required": false; }; "onFilterChange": { "alias": "onFilterChange"; "required": false; }; "onRowSelectionChange": { "alias": "onRowSelectionChange"; "required": false; }; "onRowGroupExpand": { "alias": "onRowGroupExpand"; "required": false; }; "onColumnOrderChange": { "alias": "onColumnOrderChange"; "required": false; }; "onColumnVisibilityChange": { "alias": "onColumnVisibilityChange"; "required": false; }; "onColumnWidthChange": { "alias": "onColumnWidthChange"; "required": false; }; "onPageChange": { "alias": "onPageChange"; "required": false; }; "onNextPage": { "alias": "onNextPage"; "required": false; }; "onLoadMore": { "alias": "onLoadMore"; "required": false; }; "onTableReady": { "alias": "onTableReady"; "required": false; }; "rowGrouping": { "alias": "rowGrouping"; "required": false; }; "canExpandRowGroup": { "alias": "canExpandRowGroup"; "required": false; }; "enableStickyParents": { "alias": "enableStickyParents"; "required": false; }; "pivot": { "alias": "pivot"; "required": false; }; "onPivotChange": { "alias": "onPivotChange"; "required": false; }; "enableRowSelection": { "alias": "enableRowSelection"; "required": false; }; "rowSelectionMode": { "alias": "rowSelectionMode"; "required": false; }; "selectRowOnClick": { "alias": "selectRowOnClick"; "required": false; }; "showRowSelectionColumn": { "alias": "showRowSelectionColumn"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "quickFilter": { "alias": "quickFilter"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "getRowId": { "alias": "getRowId"; "required": false; }; "getRowClass": { "alias": "getRowClass"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "rowsPerPage": { "alias": "rowsPerPage"; "required": false; }; "serverSidePagination": { "alias": "serverSidePagination"; "required": false; }; "totalRowCount": { "alias": "totalRowCount"; "required": false; }; "height": { "alias": "height"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "scrollParent": { "alias": "scrollParent"; "required": false; }; "infiniteScrollThreshold": { "alias": "infiniteScrollThreshold"; "required": false; }; "columnResizing": { "alias": "columnResizing"; "required": false; }; "columnReordering": { "alias": "columnReordering"; "required": false; }; "enableColumnEditor": { "alias": "enableColumnEditor"; "required": false; }; "enableColumnEditorInitOpen": { "alias": "enableColumnEditorInitOpen"; "required": false; }; "enablePivotPanel": { "alias": "enablePivotPanel"; "required": false; }; "selectableCells": { "alias": "selectableCells"; "required": false; }; "selectableColumns": { "alias": "selectableColumns"; "required": false; }; "enableHeaderEditing": { "alias": "enableHeaderEditing"; "required": false; }; "onHeaderEdit": { "alias": "onHeaderEdit"; "required": false; }; "onColumnSelect": { "alias": "onColumnSelect"; "required": false; }; "customTheme": { "alias": "customTheme"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "externalFilterHandling": { "alias": "externalFilterHandling"; "required": false; }; "externalSortHandling": { "alias": "externalSortHandling"; "required": false; }; "columnBorders": { "alias": "columnBorders"; "required": false; }; "rowButtons": { "alias": "rowButtons"; "required": false; }; "hideFooter": { "alias": "hideFooter"; "required": false; }; "hideHeader": { "alias": "hideHeader"; "required": false; }; "footerRenderKey": { "alias": "footerRenderKey"; "required": false; }; "footerPosition": { "alias": "footerPosition"; "required": false; }; "className": { "alias": "className"; "required": false; }; "copyHeadersToClipboard": { "alias": "copyHeadersToClipboard"; "required": false; }; "includeHeadersInCSVExport": { "alias": "includeHeadersInCSVExport"; "required": false; }; "initialSortColumn": { "alias": "initialSortColumn"; "required": false; }; "initialSortDirection": { "alias": "initialSortDirection"; "required": false; }; "expandAll": { "alias": "expandAll"; "required": false; }; "autoExpandColumns": { "alias": "autoExpandColumns"; "required": false; }; "animations": { "alias": "animations"; "required": false; }; "cellUpdateFlash": { "alias": "cellUpdateFlash"; "required": false; }; "enableVirtualization": { "alias": "enableVirtualization"; "required": false; }; "hoverRowBackground": { "alias": "hoverRowBackground"; "required": false; }; "oddColumnBackground": { "alias": "oddColumnBackground"; "required": false; }; "oddEvenRowBackground": { "alias": "oddEvenRowBackground"; "required": false; }; }, { "tableReady": "tableReady"; },
|
|
257
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleTableComponent<any>, "simple-table", never, { "rows": { "alias": "rows"; "required": true; }; "columns": { "alias": "columns"; "required": false; }; "footerRenderer": { "alias": "footerRenderer"; "required": false; }; "loadingStateRenderer": { "alias": "loadingStateRenderer"; "required": false; }; "errorStateRenderer": { "alias": "errorStateRenderer"; "required": false; }; "emptyStateRenderer": { "alias": "emptyStateRenderer"; "required": false; }; "tableEmptyStateRenderer": { "alias": "tableEmptyStateRenderer"; "required": false; }; "headerDropdown": { "alias": "headerDropdown"; "required": false; }; "columnEditorConfig": { "alias": "columnEditorConfig"; "required": false; }; "onCellClick": { "alias": "onCellClick"; "required": false; }; "onCellEdit": { "alias": "onCellEdit"; "required": false; }; "onSortChange": { "alias": "onSortChange"; "required": false; }; "onFilterChange": { "alias": "onFilterChange"; "required": false; }; "onRowSelectionChange": { "alias": "onRowSelectionChange"; "required": false; }; "onRowGroupExpand": { "alias": "onRowGroupExpand"; "required": false; }; "onColumnOrderChange": { "alias": "onColumnOrderChange"; "required": false; }; "onColumnVisibilityChange": { "alias": "onColumnVisibilityChange"; "required": false; }; "onColumnWidthChange": { "alias": "onColumnWidthChange"; "required": false; }; "onPageChange": { "alias": "onPageChange"; "required": false; }; "onNextPage": { "alias": "onNextPage"; "required": false; }; "onLoadMore": { "alias": "onLoadMore"; "required": false; }; "onTableReady": { "alias": "onTableReady"; "required": false; }; "rowGrouping": { "alias": "rowGrouping"; "required": false; }; "canExpandRowGroup": { "alias": "canExpandRowGroup"; "required": false; }; "enableStickyParents": { "alias": "enableStickyParents"; "required": false; }; "pivot": { "alias": "pivot"; "required": false; }; "onPivotChange": { "alias": "onPivotChange"; "required": false; }; "enableRowSelection": { "alias": "enableRowSelection"; "required": false; }; "rowSelectionMode": { "alias": "rowSelectionMode"; "required": false; }; "selectRowOnClick": { "alias": "selectRowOnClick"; "required": false; }; "showRowSelectionColumn": { "alias": "showRowSelectionColumn"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "quickFilter": { "alias": "quickFilter"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "getRowId": { "alias": "getRowId"; "required": false; }; "getRowClass": { "alias": "getRowClass"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "rowsPerPage": { "alias": "rowsPerPage"; "required": false; }; "serverSidePagination": { "alias": "serverSidePagination"; "required": false; }; "totalRowCount": { "alias": "totalRowCount"; "required": false; }; "height": { "alias": "height"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "scrollParent": { "alias": "scrollParent"; "required": false; }; "infiniteScrollThreshold": { "alias": "infiniteScrollThreshold"; "required": false; }; "columnResizing": { "alias": "columnResizing"; "required": false; }; "columnReordering": { "alias": "columnReordering"; "required": false; }; "enableColumnEditor": { "alias": "enableColumnEditor"; "required": false; }; "enableColumnEditorInitOpen": { "alias": "enableColumnEditorInitOpen"; "required": false; }; "enablePivotPanel": { "alias": "enablePivotPanel"; "required": false; }; "selectableCells": { "alias": "selectableCells"; "required": false; }; "selectableColumns": { "alias": "selectableColumns"; "required": false; }; "enableHeaderEditing": { "alias": "enableHeaderEditing"; "required": false; }; "onHeaderEdit": { "alias": "onHeaderEdit"; "required": false; }; "onColumnSelect": { "alias": "onColumnSelect"; "required": false; }; "customTheme": { "alias": "customTheme"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "externalFilterHandling": { "alias": "externalFilterHandling"; "required": false; }; "externalSortHandling": { "alias": "externalSortHandling"; "required": false; }; "columnBorders": { "alias": "columnBorders"; "required": false; }; "rowButtons": { "alias": "rowButtons"; "required": false; }; "hideFooter": { "alias": "hideFooter"; "required": false; }; "hideHeader": { "alias": "hideHeader"; "required": false; }; "footerRenderKey": { "alias": "footerRenderKey"; "required": false; }; "footerPosition": { "alias": "footerPosition"; "required": false; }; "className": { "alias": "className"; "required": false; }; "copyHeadersToClipboard": { "alias": "copyHeadersToClipboard"; "required": false; }; "includeHeadersInCSVExport": { "alias": "includeHeadersInCSVExport"; "required": false; }; "initialSortColumn": { "alias": "initialSortColumn"; "required": false; }; "initialSortDirection": { "alias": "initialSortDirection"; "required": false; }; "expandAll": { "alias": "expandAll"; "required": false; }; "autoExpandColumns": { "alias": "autoExpandColumns"; "required": false; }; "animations": { "alias": "animations"; "required": false; }; "cellUpdateFlash": { "alias": "cellUpdateFlash"; "required": false; }; "enableVirtualization": { "alias": "enableVirtualization"; "required": false; }; "hoverRowBackground": { "alias": "hoverRowBackground"; "required": false; }; "oddColumnBackground": { "alias": "oddColumnBackground"; "required": false; }; "oddEvenRowBackground": { "alias": "oddEvenRowBackground"; "required": false; }; }, { "tableReady": "tableReady"; "cellClick": "cellClick"; "cellEdit": "cellEdit"; "sortChange": "sortChange"; "filterChange": "filterChange"; "rowSelectionChange": "rowSelectionChange"; "rowGroupExpand": "rowGroupExpand"; "columnOrderChange": "columnOrderChange"; "columnVisibilityChange": "columnVisibilityChange"; "columnWidthChange": "columnWidthChange"; "pageChange": "pageChange"; "loadMore": "loadMore"; "headerEdit": "headerEdit"; "columnSelect": "columnSelect"; "pivotChange": "pivotChange"; }, ["cellSlots", "headerSlots", "emptySlots", "footerSlots", "loadingSlots", "errorSlots"], ["*"], true, never>;
|
|
222
258
|
}
|
|
223
259
|
|
|
224
260
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
261
|
+
* Page-template cell for a column, matched by `accessor`.
|
|
262
|
+
* Context: `$implicit` is `row`; also `value`, `formattedValue`, and the rest of
|
|
263
|
+
* the core cell renderer props.
|
|
264
|
+
*/
|
|
265
|
+
declare class StCellDirective {
|
|
266
|
+
stCell: string;
|
|
267
|
+
readonly templateRef: TemplateRef<any>;
|
|
268
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StCellDirective, never>;
|
|
269
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StCellDirective, "ng-template[stCell]", never, { "stCell": { "alias": "stCell"; "required": true; }; }, {}, never, never, true, never>;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Page-template header for a column, matched by `accessor`.
|
|
273
|
+
* Context: `$implicit` is `header`; also `components` (sort/filter icons).
|
|
274
|
+
*/
|
|
275
|
+
declare class StHeaderDirective {
|
|
276
|
+
stHeader: string;
|
|
277
|
+
readonly templateRef: TemplateRef<any>;
|
|
278
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StHeaderDirective, never>;
|
|
279
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StHeaderDirective, "ng-template[stHeader]", never, { "stHeader": { "alias": "stHeader"; "required": true; }; }, {}, never, never, true, never>;
|
|
280
|
+
}
|
|
281
|
+
/** Whole-table empty UI. Shown when there are no rows. */
|
|
282
|
+
declare class StEmptyDirective {
|
|
283
|
+
readonly templateRef: TemplateRef<any>;
|
|
284
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StEmptyDirective, never>;
|
|
285
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StEmptyDirective, "ng-template[stEmpty]", never, {}, {}, never, never, true, never>;
|
|
286
|
+
}
|
|
287
|
+
/** Pagination / custom footer. Context matches core footer renderer props. */
|
|
288
|
+
declare class StFooterDirective {
|
|
289
|
+
readonly templateRef: TemplateRef<any>;
|
|
290
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StFooterDirective, never>;
|
|
291
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StFooterDirective, "ng-template[stFooter]", never, {}, {}, never, never, true, never>;
|
|
292
|
+
}
|
|
293
|
+
/** Nested-group loading row (not the table-level skeleton `isLoading` flag). */
|
|
294
|
+
declare class StLoadingDirective {
|
|
295
|
+
readonly templateRef: TemplateRef<any>;
|
|
296
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StLoadingDirective, never>;
|
|
297
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StLoadingDirective, "ng-template[stLoading]", never, {}, {}, never, never, true, never>;
|
|
298
|
+
}
|
|
299
|
+
/** Nested-group error row. */
|
|
300
|
+
declare class StErrorDirective {
|
|
301
|
+
readonly templateRef: TemplateRef<any>;
|
|
302
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StErrorDirective, never>;
|
|
303
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StErrorDirective, "ng-template[stError]", never, {}, {}, never, never, true, never>;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Opt-in: put a core-built DOM node (sort icon, filter icon, …) into the host.
|
|
307
|
+
* Clones the node so the table can still own the original.
|
|
308
|
+
*/
|
|
309
|
+
declare class StDomSlotDirective implements OnChanges, OnDestroy {
|
|
310
|
+
stDomSlot: string | Node | null | undefined;
|
|
311
|
+
private readonly host;
|
|
312
|
+
ngOnChanges(): void;
|
|
313
|
+
ngOnDestroy(): void;
|
|
314
|
+
private sync;
|
|
315
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StDomSlotDirective, never>;
|
|
316
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StDomSlotDirective, "[stDomSlot]", never, { "stDomSlot": { "alias": "stDomSlot"; "required": false; }; }, {}, never, never, true, never>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* One import for a page that uses `<simple-table>` plus `stCell` / `stEmpty` /
|
|
321
|
+
* `(sortChange)` and the other template directives.
|
|
322
|
+
*
|
|
323
|
+
* ```ts
|
|
324
|
+
* @Component({
|
|
325
|
+
* standalone: true,
|
|
326
|
+
* imports: [SimpleTableImports],
|
|
327
|
+
* })
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
declare class SimpleTableImports {
|
|
331
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleTableImports, never>;
|
|
332
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SimpleTableImports, never, [typeof SimpleTableComponent, typeof StCellDirective, typeof StHeaderDirective, typeof StEmptyDirective, typeof StFooterDirective, typeof StLoadingDirective, typeof StErrorDirective, typeof StDomSlotDirective], [typeof SimpleTableComponent, typeof StCellDirective, typeof StHeaderDirective, typeof StEmptyDirective, typeof StFooterDirective, typeof StLoadingDirective, typeof StErrorDirective, typeof StDomSlotDirective]>;
|
|
333
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SimpleTableImports>;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Optional. Angular already provides `ApplicationRef` and `EnvironmentInjector`.
|
|
338
|
+
* The table does not require this in `bootstrapApplication` / `providers`.
|
|
228
339
|
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* consumers that the adapter has been correctly wired up. If future versions
|
|
232
|
-
* need custom providers they will be added here without breaking the call site.
|
|
340
|
+
* Kept so existing apps that call it keep compiling. Future versions may add
|
|
341
|
+
* real providers here without changing the call site.
|
|
233
342
|
*
|
|
234
343
|
* @example
|
|
235
|
-
* // main.ts
|
|
236
344
|
* bootstrapApplication(AppComponent, {
|
|
237
345
|
* providers: [provideSimpleTable()],
|
|
238
346
|
* });
|
|
239
|
-
*
|
|
240
|
-
* @example
|
|
241
|
-
* // app.module.ts
|
|
242
|
-
* @NgModule({ providers: [provideSimpleTable()] })
|
|
243
|
-
* export class AppModule {}
|
|
244
347
|
*/
|
|
245
348
|
declare function provideSimpleTable(): EnvironmentProviders;
|
|
246
349
|
|
|
@@ -253,6 +356,8 @@ declare class MountRegistry {
|
|
|
253
356
|
private nextId;
|
|
254
357
|
readonly cellRendererCache: Map<string, CachedRendererSlot<unknown>>;
|
|
255
358
|
readonly headerRendererCache: Map<string, CachedRendererSlot<unknown>>;
|
|
359
|
+
readonly cellTemplateCache: Map<string, CachedRendererSlot<unknown>>;
|
|
360
|
+
readonly headerTemplateCache: Map<string, CachedRendererSlot<unknown>>;
|
|
256
361
|
/** One-shot `tableEmptyStateRenderer` component mount, reused across config rebuilds. */
|
|
257
362
|
tableEmptyStateMount: {
|
|
258
363
|
component: unknown;
|
|
@@ -282,12 +387,11 @@ declare class MountRegistry {
|
|
|
282
387
|
* host is discarded. The table adapter always supplies a registry; the public
|
|
283
388
|
* helper used for one-shot static slots may omit it. Pass `elementInjector` so
|
|
284
389
|
* dynamically created components see providers on ancestors of `<simple-table>`.
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* `provideSimpleTable()` in their application providers.
|
|
390
|
+
* `ApplicationRef` and `EnvironmentInjector` come from Angular's injector;
|
|
391
|
+
* `provideSimpleTable()` is optional.
|
|
288
392
|
*/
|
|
289
393
|
declare function wrapAngularRenderer<P extends object>(component: Type<P>, appRef: ApplicationRef, injector: EnvironmentInjector, registry?: MountRegistry, elementInjector?: Injector): (props: Partial<P>) => HTMLElement;
|
|
290
394
|
|
|
291
|
-
export { SimpleTableComponent, provideSimpleTable, wrapAngularRenderer };
|
|
395
|
+
export { SimpleTableComponent, SimpleTableImports, StCellDirective, StDomSlotDirective, StEmptyDirective, StErrorDirective, StFooterDirective, StHeaderDirective, StLoadingDirective, provideSimpleTable, wrapAngularRenderer };
|
|
292
396
|
export type { AngularCellRenderer, AngularColumnDef, AngularColumnEditorConfig, AngularColumnEditorCustomRenderer, AngularColumnEditorRowRenderer, AngularDefaultRowData, AngularEmptyStateRenderer, AngularErrorStateRenderer, AngularFooterRenderer, AngularHeaderDropdown, AngularHeaderRenderer, AngularIconSlot, AngularIconsConfig, AngularLoadingStateRenderer, AngularRowButton, NestedAngularColumnDef, NestedTableAngularConfig, SimpleTableAngularProps, TableInstance };
|
|
293
397
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../src/types.ts","../src/lib/SimpleTableComponent.ts","../src/lib/provideSimpleTable.ts","../src/MountRegistry.ts","../src/utils/wrapAngularRenderer.ts"],"mappings":";;;;;AAqBA;;;;;;;;AAQG;AACH,KAAA,8BAAiC;AAGjC,uBAAiB;;mBAEA,OAAO,CAAC,iBAAiB;;cAE9B,QAAQ;;;AAGnB;AAGD;;;;;;;AAOG;AACH;AACA,KAAA,mBAAY,eACL,6CAAiC,WACtC,SAAS,IAAA,gBACF,YAAW;AACpB,KAAA,qBAAY,eAA2B,qBAAS,GAAA,qBAAwB,IAAA,IAAqB;AAG7F,KAAA,qBAAY,GAAA,IAAqB;AACjC,KAAA,qBAAY,GAAA,IAAqB;AACjC,KAAA,8BAAY,GAAA,IAA8B;AAC1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,sBAAsB;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/types.ts","../src/lib/SimpleTableComponent.ts","../src/lib/stDirectives.ts","../src/lib/simpleTableImports.ts","../src/lib/provideSimpleTable.ts","../src/MountRegistry.ts","../src/utils/wrapAngularRenderer.ts"],"mappings":";;;;;AAqBA;;;;;;;;AAQG;AACH,KAAA,8BAAiC;AAGjC,uBAAiB;;mBAEA,OAAO,CAAC,iBAAiB;;cAE9B,QAAQ;;;AAGnB;AAGD;;;;;;;AAOG;AACH;AACA,KAAA,mBAAY,eACL,6CAAiC,WACtC,SAAS,IAAA,gBACF,YAAW;AACpB,KAAA,qBAAY,eAA2B,qBAAS,GAAA,qBAAwB,IAAA,IAAqB;AAG7F,KAAA,qBAAY,GAAA,IAAqB;AACjC,KAAA,qBAAY,GAAA,IAAqB;AACjC,KAAA,8BAAY,GAAA,IAA8B;AAC1C,KAAA,iCAAY,GAAA,IAAiC;AAC7C,KAAA,2BAAY,GAAA,IAA2B;AACvC,KAAA,yBAAY,GAAA,IAAyB;AACrC,KAAA,yBAAY,GAAA,IAAyB;AAGrC,KAAA,gBAAY,GAAA,IAAgB;AAE5B;AACA,KAAA,eAAY,GAAA,IAAe,YAAQ,aAAW,GAAA,WAAgB;AAE9D,4BAAiB;WACR,eAAe;aACb,eAAe;aACf,eAAe;qBACP,eAAe;mBACjB,eAAe;WACvB,eAAe;WACf,eAAe;eACX,eAAe;aACjB,eAAe;qBACP,eAAe;sBACd,eAAe;AAClC;AAGD,UAAM,yBAAW,SAA0B,IAAA,CAAA;kBAI3B,8BAA8B;qBAC3B,iCAAiC;AACnD;AAGD;;;AAGG;AACH,UAAM,gBAAW,eACV,qBAAS,GAAA,qBAAwB,WACtC,SAAS,UACT,IAAA,CAAA,SACA;mBAGe,mBAAmB;AAClC,qBAAiB,qBAAqB;eAC3B,aAAa,CAAC,gBAAgB;;kBAE3B,wBAAwB;AACvC;AAQD,UAAM,2DACU,GAAA,+BACd,IAAA,CAAA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B,WAAW;AAMnC,wBAAqB,WAAW;AAkBhC;uCAYmC,WAAW;;AAgB/C;;ACED;;;;;;;;;;;;;;;;;AAiBG;AACH,iBAAA,kEAEE,cAAQ,+BACE,aACV,aAAW,oBACX,QAAkB,WAChB,OAAO,QAAQ;;;;","names":["i1.SimpleTableComponent","i2.StCellDirective","i2.StHeaderDirective","i2.StEmptyDirective","i2.StFooterDirective","i2.StLoadingDirective","i2.StErrorDirective","i2.StDomSlotDirective"]}
|