rowvia 0.2.4 → 0.3.1
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 +24 -8
- package/dist/fields.css +1 -0
- package/dist/fields.es.js +1913 -0
- package/dist/fields.umd.cjs +1 -0
- package/dist/rowvia.css +1 -1
- package/dist/rowvia.es.js +12167 -11319
- package/dist/rowvia.umd.cjs +93 -104
- package/dist/types/api.d.ts +1 -1
- package/dist/types/components/cells.d.ts +25 -0
- package/dist/types/components/detailDialog.d.ts +7 -1
- package/dist/types/components/scrollbars.d.ts +10 -0
- package/dist/types/contracts/work-item.d.ts +339 -0
- package/dist/types/core/clientSideRowModel.d.ts +1 -2
- package/dist/types/core/columnModel.d.ts +2 -2
- package/dist/types/core/gridHost.d.ts +365 -0
- package/dist/types/core/remoteRowModels.d.ts +2 -10
- package/dist/types/core/rowNode.d.ts +1 -2
- package/dist/types/core/valueService.d.ts +1 -1
- package/dist/types/createGrid.d.ts +10 -0
- package/dist/types/features/chartService.d.ts +2 -11
- package/dist/types/features/columnMenu.d.ts +1 -1
- package/dist/types/features/contextMenu.d.ts +2 -13
- package/dist/types/features/editService.d.ts +3 -8
- package/dist/types/features/exportService.d.ts +3 -2
- package/dist/types/features/filterGui.d.ts +1 -1
- package/dist/types/features/filterService.d.ts +2 -14
- package/dist/types/features/findService.d.ts +1 -1
- package/dist/types/features/formulaEditor.d.ts +1 -1
- package/dist/types/features/notesService.d.ts +1 -5
- package/dist/types/features/overlays.d.ts +1 -1
- package/dist/types/features/paginationService.d.ts +1 -2
- package/dist/types/features/popupService.d.ts +1 -1
- package/dist/types/features/rangeSelection.d.ts +1 -8
- package/dist/types/features/rowDragService.d.ts +1 -1
- package/dist/types/features/rowGroupPanel.d.ts +1 -1
- package/dist/types/features/selectionService.d.ts +1 -1
- package/dist/types/features/sideBar.d.ts +2 -5
- package/dist/types/features/sortService.d.ts +1 -1
- package/dist/types/features/statusBar.d.ts +2 -3
- package/dist/types/features/undoRedoService.d.ts +2 -9
- package/dist/types/fields/attachment-control.d.ts +2 -0
- package/dist/types/fields/base-field.d.ts +62 -0
- package/dist/types/{pages/work-items → fields}/cascade-control.d.ts +1 -1
- package/dist/types/{pages/work-items → fields}/choice-control.d.ts +2 -3
- package/dist/types/fields/composite-control.d.ts +3 -0
- package/dist/types/fields/controls.d.ts +19 -0
- package/dist/types/{pages/work-items → fields}/date-control.d.ts +1 -1
- package/dist/types/fields/field-types.d.ts +114 -0
- package/dist/types/fields/index.d.ts +8 -0
- package/dist/types/fields/internal/dom.d.ts +1 -0
- package/dist/types/fields/internal/focus-boundary.d.ts +7 -0
- package/dist/types/fields/internal/interaction.d.ts +23 -0
- package/dist/types/fields/internal/lifecycle.d.ts +12 -0
- package/dist/types/fields/internal/textarea.d.ts +1 -0
- package/dist/types/fields/location-control.d.ts +3 -0
- package/dist/types/fields/popup.d.ts +38 -0
- package/dist/types/{pages/work-items → fields}/rich-control.d.ts +1 -1
- package/dist/types/fields/text-control.d.ts +3 -0
- package/dist/types/fields/types.d.ts +185 -0
- package/dist/types/fields/value-control.d.ts +12 -0
- package/dist/types/fields/vote-control.d.ts +2 -0
- package/dist/types/forms/form-conditions.d.ts +29 -0
- package/dist/types/forms/form-surface.d.ts +13 -0
- package/dist/types/gantt/component.d.ts +5 -4
- package/dist/types/gantt/ganttChart.d.ts +7 -7
- package/dist/types/gantt/index.d.ts +3 -3
- package/dist/types/gantt/scale.d.ts +18 -0
- package/dist/types/grid.d.ts +21 -17
- package/dist/types/index.d.ts +21 -20
- package/dist/types/node-flow/canvas.d.ts +26 -0
- package/dist/types/node-flow/card.d.ts +23 -0
- package/dist/types/node-flow/cardSections.d.ts +14 -0
- package/dist/types/node-flow/component.d.ts +9 -0
- package/dist/types/node-flow/contextBar.d.ts +20 -0
- package/dist/types/node-flow/demo.d.ts +6 -0
- package/dist/types/node-flow/index.d.ts +13 -0
- package/dist/types/node-flow/model.d.ts +48 -0
- package/dist/types/node-flow/timeline.d.ts +16 -0
- package/dist/types/node-flow/types.d.ts +220 -0
- package/dist/types/personnel/component.d.ts +3 -2
- package/dist/types/personnel/index.d.ts +1 -1
- package/dist/types/personnel/render.d.ts +22 -0
- package/dist/types/render/headerView.d.ts +1 -1
- package/dist/types/render/rowComponent.d.ts +29 -0
- package/dist/types/render/rowContext.d.ts +39 -0
- package/dist/types/render/rowRenderer.d.ts +6 -73
- package/dist/types/shared/dom.d.ts +1 -0
- package/dist/types/shared/interaction.d.ts +1 -0
- package/dist/types/shared/lifecycle.d.ts +1 -0
- package/dist/types/shared/markup.d.ts +5 -0
- package/dist/types/shared/state.d.ts +5 -0
- package/dist/types/types.d.ts +3 -2
- package/dist/types/work-items/action-surface.d.ts +17 -0
- package/dist/types/work-items/detail/detail-comments.d.ts +44 -0
- package/dist/types/work-items/detail/detail-header.d.ts +23 -0
- package/dist/types/work-items/detail/detail-history.d.ts +38 -0
- package/dist/types/work-items/detail/history-model.d.ts +48 -0
- package/dist/types/work-items/fields/control-base.d.ts +17 -0
- package/dist/types/{pages/work-items → work-items/fields}/focus-editor.d.ts +1 -1
- package/dist/types/work-items/fields/registry.d.ts +5 -0
- package/dist/types/work-items/index.d.ts +27 -0
- package/dist/types/work-items/layers.d.ts +19 -0
- package/dist/types/work-items/model.d.ts +10 -0
- package/dist/types/work-items/selection-bar.d.ts +7 -0
- package/dist/types/work-items/style-scope.d.ts +1 -0
- package/dist/types/work-items/table/column-panels.d.ts +39 -0
- package/dist/types/work-items/table/columns.d.ts +28 -0
- package/dist/types/work-items/table/headers.d.ts +10 -0
- package/dist/types/work-items/table/table.d.ts +10 -0
- package/dist/types/work-items/tabs.d.ts +14 -0
- package/dist/types/work-items/toolbar.d.ts +11 -0
- package/dist/types/work-items/views/rule-panels.d.ts +28 -0
- package/dist/types/work-items/workflow-detail-model.d.ts +51 -0
- package/dist/types/work-items/workflow-detail-types.d.ts +95 -0
- package/dist/types/work-items/workflow-detail.d.ts +3 -0
- package/package.json +24 -6
- package/dist/types/pages/finance/component.d.ts +0 -2
- package/dist/types/pages/finance/data.d.ts +0 -14
- package/dist/types/pages/hr/component.d.ts +0 -2
- package/dist/types/pages/hr/data.d.ts +0 -21
- package/dist/types/pages/index.d.ts +0 -13
- package/dist/types/pages/inventory/component.d.ts +0 -2
- package/dist/types/pages/inventory/data.d.ts +0 -26
- package/dist/types/pages/lifecycle.d.ts +0 -24
- package/dist/types/pages/performance/component.d.ts +0 -2
- package/dist/types/pages/performance/data.d.ts +0 -33
- package/dist/types/pages/server-side/component.d.ts +0 -2
- package/dist/types/pages/work-items/config.d.ts +0 -118
- package/dist/types/pages/work-items/controls.d.ts +0 -50
- package/dist/types/pages/work-items/field-controls.d.ts +0 -4
- package/dist/types/pages/work-items/model.d.ts +0 -72
- package/dist/types/pages/work-items/page.d.ts +0 -24
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Column, RowNode } from '../types';
|
|
2
|
+
import type { RowRendererContext } from './rowContext';
|
|
3
|
+
export declare class RowComp {
|
|
4
|
+
private ctx;
|
|
5
|
+
private node;
|
|
6
|
+
private rowHeight;
|
|
7
|
+
private eLeft;
|
|
8
|
+
private eCenter;
|
|
9
|
+
private eRight;
|
|
10
|
+
private cellComps;
|
|
11
|
+
private pinned;
|
|
12
|
+
constructor(ctx: RowRendererContext, node: RowNode, leftColumns: Column[], centerColumns: Column[], rightColumns: Column[], rowHeight: number, _heightVersion: number);
|
|
13
|
+
isPinned(): boolean;
|
|
14
|
+
/** marks the row as a sticky group row (rendered in the sticky overlay) */
|
|
15
|
+
setSticky(sticky: boolean): void;
|
|
16
|
+
/** hover highlight spans every section of the row */
|
|
17
|
+
setHovered(hovered: boolean): void;
|
|
18
|
+
getNode(): RowNode;
|
|
19
|
+
private createRowElement;
|
|
20
|
+
private cellColumnIndex;
|
|
21
|
+
private createCell;
|
|
22
|
+
private updateCellContent;
|
|
23
|
+
refreshCells(columns?: Column[], force?: boolean, flash?: boolean): void;
|
|
24
|
+
appendTo(leftContainer: HTMLElement, centerContainer: HTMLElement, rightContainer: HTMLElement): void;
|
|
25
|
+
setTop(top: number): void;
|
|
26
|
+
getCenterElement(): HTMLElement | null;
|
|
27
|
+
getCellElements(): HTMLElement[];
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RowModel } from '../core/clientSideRowModel';
|
|
2
|
+
import type { EventService } from '../core/eventService';
|
|
3
|
+
import type { Column, GridOptions, RowNode } from '../types';
|
|
4
|
+
export interface RowRendererContext {
|
|
5
|
+
options: GridOptions;
|
|
6
|
+
eventService: EventService;
|
|
7
|
+
rowModel: RowModel;
|
|
8
|
+
/** UI text lookup (localeText) */
|
|
9
|
+
t: (key: string) => string;
|
|
10
|
+
getColumns: () => {
|
|
11
|
+
left: Column[];
|
|
12
|
+
center: Column[];
|
|
13
|
+
right: Column[];
|
|
14
|
+
};
|
|
15
|
+
getRowHeight: (node: RowNode) => number;
|
|
16
|
+
isNodeSelected: (node: RowNode) => boolean;
|
|
17
|
+
isRowSelectable: (node: RowNode) => boolean;
|
|
18
|
+
getRowClass: (node: RowNode) => string;
|
|
19
|
+
getRowStyle: (node: RowNode) => Record<string, any>;
|
|
20
|
+
onCellClicked: (params: any) => void;
|
|
21
|
+
onCellDoubleClicked: (params: any) => void;
|
|
22
|
+
onCellMouseDown: (params: any) => void;
|
|
23
|
+
onCellContextMenu: (params: any) => void;
|
|
24
|
+
onRowClicked: (params: any) => void;
|
|
25
|
+
onRowDoubleClicked: (params: any) => void;
|
|
26
|
+
onRowGroupClicked?: (node: RowNode) => void;
|
|
27
|
+
onViewportKeyDown: (event: KeyboardEvent) => void;
|
|
28
|
+
onViewportScroll?: () => void;
|
|
29
|
+
getCellText: (column: Column, node: RowNode) => string;
|
|
30
|
+
renderDetailRow?: (node: RowNode, eRow: HTMLElement) => {
|
|
31
|
+
eDetail: HTMLElement;
|
|
32
|
+
height: number;
|
|
33
|
+
} | null;
|
|
34
|
+
rowDragEnabled: () => boolean;
|
|
35
|
+
onRowDragStart?: (node: RowNode, eGui: HTMLElement, event: MouseEvent) => void;
|
|
36
|
+
getNote?: (rowNodeId: string, colId: string, colDefNote: any, params: any) => string | undefined;
|
|
37
|
+
onNoteClick?: (rowNodeId: string, colId: string, anchor: HTMLElement) => void;
|
|
38
|
+
rowNumberOffset?: () => number;
|
|
39
|
+
}
|
|
@@ -1,43 +1,8 @@
|
|
|
1
|
-
import type { Column,
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
options: GridOptions;
|
|
7
|
-
eventService: EventService;
|
|
8
|
-
rowModel: RowModel;
|
|
9
|
-
/** UI text lookup (localeText) */
|
|
10
|
-
t: (key: string) => string;
|
|
11
|
-
getColumns: () => {
|
|
12
|
-
left: Column[];
|
|
13
|
-
center: Column[];
|
|
14
|
-
right: Column[];
|
|
15
|
-
};
|
|
16
|
-
getRowHeight: (node: RowNode) => number;
|
|
17
|
-
isNodeSelected: (node: RowNode) => boolean;
|
|
18
|
-
isRowSelectable: (node: RowNode) => boolean;
|
|
19
|
-
getRowClass: (node: RowNode) => string;
|
|
20
|
-
getRowStyle: (node: RowNode) => Record<string, any>;
|
|
21
|
-
onCellClicked: (params: any) => void;
|
|
22
|
-
onCellDoubleClicked: (params: any) => void;
|
|
23
|
-
onCellMouseDown: (params: any) => void;
|
|
24
|
-
onCellContextMenu: (params: any) => void;
|
|
25
|
-
onRowClicked: (params: any) => void;
|
|
26
|
-
onRowDoubleClicked: (params: any) => void;
|
|
27
|
-
onRowGroupClicked?: (node: RowNode) => void;
|
|
28
|
-
onViewportKeyDown: (event: KeyboardEvent) => void;
|
|
29
|
-
onViewportScroll?: () => void;
|
|
30
|
-
getCellText: (column: Column, node: RowNode) => string;
|
|
31
|
-
renderDetailRow?: (node: RowNode, eRow: HTMLElement) => {
|
|
32
|
-
eDetail: HTMLElement;
|
|
33
|
-
height: number;
|
|
34
|
-
} | null;
|
|
35
|
-
rowDragEnabled: () => boolean;
|
|
36
|
-
onRowDragStart?: (node: RowNode, eGui: HTMLElement, event: MouseEvent) => void;
|
|
37
|
-
getNote?: (rowNodeId: string, colId: string, colDefNote: any, params: any) => string | undefined;
|
|
38
|
-
onNoteClick?: (rowNodeId: string, colId: string, anchor: HTMLElement) => void;
|
|
39
|
-
rowNumberOffset?: () => number;
|
|
40
|
-
}
|
|
1
|
+
import type { Column, RowNode } from '../types';
|
|
2
|
+
import { RowComp } from './rowComponent';
|
|
3
|
+
import type { RowRendererContext } from './rowContext';
|
|
4
|
+
export { escapeHtml } from '../core/utils';
|
|
5
|
+
export type { RowRendererContext } from './rowContext';
|
|
41
6
|
export declare class RowRenderer {
|
|
42
7
|
private ctx;
|
|
43
8
|
private eRoot;
|
|
@@ -59,16 +24,15 @@ export declare class RowRenderer {
|
|
|
59
24
|
private eStickyLeft;
|
|
60
25
|
private eStickyCenter;
|
|
61
26
|
private eStickyRight;
|
|
62
|
-
private eRangeOverlay;
|
|
63
27
|
private rowComps;
|
|
64
28
|
private stickyComps;
|
|
65
29
|
private hoveredRowId;
|
|
66
30
|
private rowOffsets;
|
|
31
|
+
private rowIndices;
|
|
67
32
|
private rowInfos;
|
|
68
33
|
private totalHeight;
|
|
69
34
|
private lastScrollTop;
|
|
70
35
|
private lastRange;
|
|
71
|
-
private firstRendered;
|
|
72
36
|
private heightVersion;
|
|
73
37
|
private scrollFrame;
|
|
74
38
|
constructor(eRoot: HTMLElement, eHeader: HTMLElement, ctx: RowRendererContext);
|
|
@@ -84,7 +48,6 @@ export declare class RowRenderer {
|
|
|
84
48
|
getBody(): HTMLElement;
|
|
85
49
|
getContainer(): HTMLElement;
|
|
86
50
|
getRowComps(): Map<string, RowComp>;
|
|
87
|
-
setRangeOverlay(eOverlay: HTMLElement | null): void;
|
|
88
51
|
getHeaderElement(): HTMLElement;
|
|
89
52
|
/** recompute row offsets (variable heights) */
|
|
90
53
|
private recomputeOffsets;
|
|
@@ -156,39 +119,9 @@ export declare class RowRenderer {
|
|
|
156
119
|
getRowOffsets(): number[];
|
|
157
120
|
getTotalHeight(): number;
|
|
158
121
|
private findCellFromEvent;
|
|
159
|
-
private getRowIndexForNode;
|
|
160
122
|
private onClick;
|
|
161
123
|
private onDoubleClick;
|
|
162
124
|
private onMouseDown;
|
|
163
125
|
private onContextMenu;
|
|
164
126
|
destroy(): void;
|
|
165
127
|
}
|
|
166
|
-
declare class RowComp {
|
|
167
|
-
private ctx;
|
|
168
|
-
private node;
|
|
169
|
-
private rowHeight;
|
|
170
|
-
private heightVersion;
|
|
171
|
-
private eLeft;
|
|
172
|
-
private eCenter;
|
|
173
|
-
private eRight;
|
|
174
|
-
private cellComps;
|
|
175
|
-
private pinned;
|
|
176
|
-
constructor(ctx: RowRendererContext, node: RowNode, leftColumns: Column[], centerColumns: Column[], rightColumns: Column[], rowHeight: number, heightVersion: number);
|
|
177
|
-
isPinned(): boolean;
|
|
178
|
-
/** marks the row as a sticky group row (rendered in the sticky overlay) */
|
|
179
|
-
setSticky(sticky: boolean): void;
|
|
180
|
-
/** hover highlight spans every section of the row */
|
|
181
|
-
setHovered(hovered: boolean): void;
|
|
182
|
-
getNode(): RowNode;
|
|
183
|
-
private createRowElement;
|
|
184
|
-
private cellColumnIndex;
|
|
185
|
-
private createCell;
|
|
186
|
-
private updateCellContent;
|
|
187
|
-
refreshCells(columns?: Column[], force?: boolean, flash?: boolean): void;
|
|
188
|
-
appendTo(leftContainer: HTMLElement, centerContainer: HTMLElement, rightContainer: HTMLElement): void;
|
|
189
|
-
setTop(top: number): void;
|
|
190
|
-
getCenterElement(): HTMLElement | null;
|
|
191
|
-
getCellElements(): HTMLElement[];
|
|
192
|
-
destroy(): void;
|
|
193
|
-
}
|
|
194
|
-
export { escapeHtml };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../fields/internal/dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../fields/internal/interaction';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../fields/internal/lifecycle';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { escapeHtml as esc } from '../core/utils';
|
|
2
|
+
export declare const icon: (name: string) => string;
|
|
3
|
+
export declare const button: (action: string, label: string, glyph?: string, cls?: string) => string;
|
|
4
|
+
export declare const person: (value: string) => string;
|
|
5
|
+
export declare const selectHtml: (values: [string, string][], value: string, attr?: string) => string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InteractionOptions, InteractionSource } from './shared/interaction';
|
|
1
2
|
/**
|
|
2
3
|
* rowvia public types — API mirrors ag-grid Community/Enterprise.
|
|
3
4
|
*/
|
|
@@ -390,7 +391,7 @@ export interface FilterModelItem {
|
|
|
390
391
|
condition2?: any;
|
|
391
392
|
filterModels?: FilterModelItem[];
|
|
392
393
|
}
|
|
393
|
-
export interface GridApi {
|
|
394
|
+
export interface GridApi extends InteractionSource {
|
|
394
395
|
setRowData(rowData: any[]): void;
|
|
395
396
|
applyTransaction(transaction: RowDataTransaction): RowNodeTransactionResult | null;
|
|
396
397
|
getRowNode(id: string): RowNode | undefined;
|
|
@@ -650,7 +651,7 @@ export interface RowDataUpdatedEvent {
|
|
|
650
651
|
api: GridApi;
|
|
651
652
|
}
|
|
652
653
|
export type GridEventType = 'gridReady' | 'gridSizeChanged' | 'firstDataRendered' | 'modelUpdated' | 'rowDataUpdated' | 'cellValueChanged' | 'cellEditRequest' | 'rowValueChanged' | 'selectionChanged' | 'cellClicked' | 'cellDoubleClicked' | 'cellFocused' | 'rowClicked' | 'rowDoubleClicked' | 'cellEditingStarted' | 'cellEditingStopped' | 'cellKeyDown' | 'sortChanged' | 'filterChanged' | 'columnVisible' | 'columnPinned' | 'columnResized' | 'columnMoved' | 'columnEverythingChanged' | 'columnRowGroupChanged' | 'columnValueChanged' | 'columnPivotModeChanged' | 'displayedColumnsChanged' | 'virtualColumnsChanged' | 'columnHeaderClicked' | 'columnHeaderContextMenu' | 'componentStateChanged' | 'dragStopped' | 'rowDragEnter' | 'rowDragMove' | 'rowDragLeave' | 'rowDragEnd' | 'rowGroupOpened' | 'expandOrCollapseAll' | 'paginationChanged' | 'bodyScroll' | 'bodyScrollEnd' | 'rangeSelectionChanged' | 'rangeSelectionDeleted' | 'cutStart' | 'cutEnd' | 'pasteStart' | 'pasteEnd' | 'fillStart' | 'fillEnd' | 'cellContextMenu' | 'rowEditingStarted' | 'rowEditingStopped' | 'filterModified' | 'filterUiChanged' | 'filterOpened' | 'floatingFilterUiChanged' | 'advancedFilterBuilderVisibleChanged' | 'toolPanelVisibleChanged' | 'toolPanelSizeChanged' | 'sideBarUpdated' | 'chartCreated' | 'chartRangeSelectionChanged' | 'chartOptionsChanged' | 'chartDestroyed' | 'cellFocusCleared' | 'fullWidthCellKeyDown' | 'rowResize?' | 'itemsAdded' | 'itemsRemoved' | 'storeRefreshed' | 'asyncTransactionsFlushed' | 'newColumnsLoaded' | 'rowCountReady' | 'storeUpdated' | 'keyShortcutChangedCell' | 'cellShiftDown?';
|
|
653
|
-
export interface GridOptions {
|
|
654
|
+
export interface GridOptions extends InteractionOptions {
|
|
654
655
|
columnDefs?: ColDef[];
|
|
655
656
|
rowData?: any[];
|
|
656
657
|
defaultColDef?: DefaultColDef;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Lifecycle } from '../shared/lifecycle';
|
|
2
|
+
import { type InteractionOptions } from '../shared/interaction';
|
|
3
|
+
export interface WorkItemAction {
|
|
4
|
+
action: string;
|
|
5
|
+
anchor: HTMLElement;
|
|
6
|
+
originalEvent: MouseEvent;
|
|
7
|
+
}
|
|
8
|
+
export interface ActionSurfaceOptions extends InteractionOptions {
|
|
9
|
+
onAction?: (event: WorkItemAction) => void;
|
|
10
|
+
}
|
|
11
|
+
/** Mounts one surface; commands are reported to its owner, never executed here. */
|
|
12
|
+
export declare function createActionSurface(container: HTMLElement, className: string, markup: string, options: ActionSurfaceOptions): {
|
|
13
|
+
element: HTMLDivElement;
|
|
14
|
+
lifecycle: Lifecycle;
|
|
15
|
+
onInteraction: (listener: (event: import("..").ComponentInteraction) => void) => import("../shared/lifecycle").Dispose;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { WorkItem } from '../../contracts/work-item';
|
|
2
|
+
import type { FieldServices, FieldOption } from '../../fields/types';
|
|
3
|
+
export type DetailComment = Exclude<WorkItem['comments'][number], string> & {
|
|
4
|
+
authorId?: string;
|
|
5
|
+
replyTo?: string;
|
|
6
|
+
};
|
|
7
|
+
export interface DetailCommentSave {
|
|
8
|
+
action: 'create' | 'edit' | 'reply';
|
|
9
|
+
id?: string;
|
|
10
|
+
replyTo?: string;
|
|
11
|
+
html: string;
|
|
12
|
+
content: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DetailCommentsPermissions {
|
|
15
|
+
create?: boolean;
|
|
16
|
+
reply?: boolean | ((comment: DetailComment) => boolean);
|
|
17
|
+
edit?: boolean | ((comment: DetailComment) => boolean);
|
|
18
|
+
}
|
|
19
|
+
export interface DetailCommentsOptions {
|
|
20
|
+
comments?: Array<string | DetailComment>;
|
|
21
|
+
data?: Array<string | DetailComment>;
|
|
22
|
+
author: string | {
|
|
23
|
+
id: string;
|
|
24
|
+
display: string;
|
|
25
|
+
};
|
|
26
|
+
permissions?: DetailCommentsPermissions;
|
|
27
|
+
people?: FieldOption[];
|
|
28
|
+
services?: Pick<FieldServices, 'searchOptions'>;
|
|
29
|
+
onSave?: (command: DetailCommentSave, signal: AbortSignal) => WorkItem['comments'] | Promise<WorkItem['comments']>;
|
|
30
|
+
onPublish?: (payload: DetailCommentSave, signal: AbortSignal) => boolean | Promise<boolean>;
|
|
31
|
+
onEdit?: (id: string, payload: DetailCommentSave, signal: AbortSignal) => boolean | Promise<boolean>;
|
|
32
|
+
hasMore?: boolean;
|
|
33
|
+
onLoadMore?: (signal: AbortSignal) => void | Promise<void>;
|
|
34
|
+
renderActions?: (container: HTMLElement, comment: DetailComment) => void | (() => void);
|
|
35
|
+
renderAttachments?: (container: HTMLElement, comment: DetailComment) => void | (() => void);
|
|
36
|
+
}
|
|
37
|
+
export declare function createDetailComments(initial: DetailCommentsOptions): {
|
|
38
|
+
element: HTMLElement;
|
|
39
|
+
composer: HTMLDivElement;
|
|
40
|
+
decorateTab: (surface: HTMLElement) => void;
|
|
41
|
+
update: (patch: Partial<Pick<DetailCommentsOptions, "comments" | "data" | "permissions" | "hasMore">>) => void;
|
|
42
|
+
deactivate: () => void;
|
|
43
|
+
destroy: () => void;
|
|
44
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type InteractionOptions } from '../../shared/interaction';
|
|
2
|
+
export interface DetailStage {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
state?: 'done' | 'active' | 'pending';
|
|
6
|
+
}
|
|
7
|
+
export interface DetailHeaderConfig extends InteractionOptions {
|
|
8
|
+
tags?: string[];
|
|
9
|
+
signals?: {
|
|
10
|
+
label: string;
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
stages?: DetailStage[];
|
|
14
|
+
activeStage?: string;
|
|
15
|
+
owner?: string;
|
|
16
|
+
onAction?: (action: string) => void;
|
|
17
|
+
}
|
|
18
|
+
/** Mountable process header with semantic action and interaction subscriptions. */
|
|
19
|
+
export declare function createWorkItemDetailHeader(config?: DetailHeaderConfig): {
|
|
20
|
+
element: HTMLElement;
|
|
21
|
+
onInteraction: (listener: (event: import("../..").ComponentInteraction) => void) => import("../../shared/lifecycle").Dispose;
|
|
22
|
+
destroy(): void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { WorkItem } from '../../contracts/work-item';
|
|
2
|
+
import { type HistoryQuery, type HistoryEntry, type HistoryModule } from './history-model';
|
|
3
|
+
export interface DetailHistoryPage {
|
|
4
|
+
rows: HistoryEntry[];
|
|
5
|
+
total?: number;
|
|
6
|
+
matching?: number;
|
|
7
|
+
nextCursor?: string | null;
|
|
8
|
+
previousCursor?: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface DetailHistoryQuery extends HistoryQuery {
|
|
11
|
+
cursor?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DetailHistoryOptions {
|
|
14
|
+
records?: WorkItem['history'];
|
|
15
|
+
rows?: HistoryEntry[];
|
|
16
|
+
query?: Partial<DetailHistoryQuery>;
|
|
17
|
+
nextCursor?: string | null;
|
|
18
|
+
previousCursor?: string | null;
|
|
19
|
+
actor?: string;
|
|
20
|
+
nodeFlow?: boolean;
|
|
21
|
+
mode?: 'server' | 'local';
|
|
22
|
+
page?: DetailHistoryPage;
|
|
23
|
+
modules?: HistoryModule[];
|
|
24
|
+
operators?: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}>;
|
|
28
|
+
onQuery?: (query: DetailHistoryQuery, signal: AbortSignal) => DetailHistoryPage | void | Promise<DetailHistoryPage | void>;
|
|
29
|
+
onLoadMore?: (cursor: string, query: DetailHistoryQuery, signal: AbortSignal) => DetailHistoryPage | void | Promise<DetailHistoryPage | void>;
|
|
30
|
+
renderDetail?: (container: HTMLElement, entry: HistoryEntry) => void | (() => void);
|
|
31
|
+
}
|
|
32
|
+
export declare function createDetailHistory(initial: DetailHistoryOptions): {
|
|
33
|
+
element: HTMLElement;
|
|
34
|
+
refresh: (loadMore?: boolean) => void;
|
|
35
|
+
deactivate: () => void;
|
|
36
|
+
update: (patch: Partial<Pick<DetailHistoryOptions, "records" | "rows" | "page" | "query" | "nextCursor" | "previousCursor" | "modules" | "operators">>) => void;
|
|
37
|
+
destroy: () => void;
|
|
38
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { WorkItem } from '../../contracts/work-item';
|
|
2
|
+
export type HistoryEntry = Exclude<WorkItem['history'][number], string>;
|
|
3
|
+
export interface HistoryModule {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface HistoryQuery {
|
|
8
|
+
keyword: string;
|
|
9
|
+
keywordFilter: boolean;
|
|
10
|
+
operatorKinds: Set<string>;
|
|
11
|
+
operators: Set<string>;
|
|
12
|
+
modules: Set<string>;
|
|
13
|
+
start: string;
|
|
14
|
+
end: string;
|
|
15
|
+
page: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const historyModules: HistoryModule[];
|
|
18
|
+
export declare function normalizeHistory(item: Pick<WorkItem, 'history'>, actor: string): HistoryEntry[];
|
|
19
|
+
/** The log endpoint already supplies localized display content; origin_content is not HTML. */
|
|
20
|
+
export declare function adaptOperationRecords(records: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
operator?: {
|
|
23
|
+
user_key: string;
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
operator_type: number;
|
|
27
|
+
op_record_type_key: string;
|
|
28
|
+
op_record_type_name: string;
|
|
29
|
+
content: string;
|
|
30
|
+
created_at: number;
|
|
31
|
+
}>): HistoryEntry[];
|
|
32
|
+
export declare function queryHistory(logs: HistoryEntry[], query: HistoryQuery): {
|
|
33
|
+
rows: {
|
|
34
|
+
id?: string;
|
|
35
|
+
actor: string;
|
|
36
|
+
actorId?: string;
|
|
37
|
+
actorKind?: "user" | "computed" | "automation" | "system";
|
|
38
|
+
module: string;
|
|
39
|
+
moduleKey?: string;
|
|
40
|
+
detail: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
}[];
|
|
43
|
+
total: number;
|
|
44
|
+
matching: number;
|
|
45
|
+
filteredTotal: number;
|
|
46
|
+
page: number;
|
|
47
|
+
pageCount: number;
|
|
48
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ControlContext, ControlPage, FieldControl } from '../../contracts/work-item';
|
|
2
|
+
/**
|
|
3
|
+
* Shared shell for all field controls. Controls provide the content for a
|
|
4
|
+
* state; the shell owns page/state metadata and keeps host styling consistent.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BaseFieldControl: {
|
|
7
|
+
page(context: ControlContext): ControlPage;
|
|
8
|
+
render(context: ControlContext, content: HTMLElement): HTMLElement;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Feishu field boxes come in three geometries: single-line text, multi-line
|
|
12
|
+
* text and tag/select style rows. Hosts and the focus shell label every box
|
|
13
|
+
* with this kind so display and edit states can share one set of metrics.
|
|
14
|
+
*/
|
|
15
|
+
export type FieldBoxKind = 'text' | 'rich' | 'select';
|
|
16
|
+
export declare function fieldBoxKind(control: Pick<FieldControl, 'id'>): FieldBoxKind;
|
|
17
|
+
export { autosizeTextarea } from '../../fields/internal/textarea';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ControlContext, ControlEditor, FieldControl } from '
|
|
1
|
+
import type { ControlContext, ControlEditor, FieldControl } from '../../contracts/work-item';
|
|
2
2
|
/** One focus boundary for every registered editor, including custom controls. */
|
|
3
3
|
export declare function focusEditor(control: FieldControl, context: ControlContext, editor: ControlEditor): ControlEditor;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FieldControl, ControlRegistry } from '../../contracts/work-item';
|
|
2
|
+
export { BaseFieldControl, fieldBoxKind, autosizeTextarea } from './control-base';
|
|
3
|
+
export { sanitizeRichText } from '../../fields/rich-control';
|
|
4
|
+
export type { ControlContext, ControlEditor, ControlMode, ControlPage, ControlSurface, FieldControl } from '../../contracts/work-item';
|
|
5
|
+
export declare function createControlRegistry(custom?: FieldControl[]): ControlRegistry;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type * from '../contracts/work-item';
|
|
2
|
+
export { createWorkflowDetail } from './workflow-detail';
|
|
3
|
+
export type * from './workflow-detail-types';
|
|
4
|
+
export { createDetailComments } from './detail/detail-comments';
|
|
5
|
+
export type { DetailComment, DetailCommentSave, DetailCommentsPermissions, DetailCommentsOptions } from './detail/detail-comments';
|
|
6
|
+
export { createDetailHistory } from './detail/detail-history';
|
|
7
|
+
export type { DetailHistoryPage, DetailHistoryQuery, DetailHistoryOptions } from './detail/detail-history';
|
|
8
|
+
export { historyModules, normalizeHistory, queryHistory, adaptOperationRecords } from './detail/history-model';
|
|
9
|
+
export type { HistoryEntry, HistoryModule, HistoryQuery } from './detail/history-model';
|
|
10
|
+
export type { FormCondition, FormConditionOp, FormScope, FormSurfaceContext } from '../forms/form-conditions';
|
|
11
|
+
export { emptyView, matches } from './model';
|
|
12
|
+
export { createWorkItemTabs } from './tabs';
|
|
13
|
+
export type { WorkItemTabsOptions } from './tabs';
|
|
14
|
+
export { createWorkItemToolbar } from './toolbar';
|
|
15
|
+
export type { WorkItemToolbarOptions, WorkItemRuleCounts } from './toolbar';
|
|
16
|
+
export { createWorkItemSelectionBar } from './selection-bar';
|
|
17
|
+
export type { ActionSurfaceOptions, WorkItemAction } from './action-surface';
|
|
18
|
+
export { createWorkItemTable } from './table/table';
|
|
19
|
+
export { createColumns as createWorkItemColumns } from './table/columns';
|
|
20
|
+
export type { ColumnsDeps as WorkItemColumnsOptions } from './table/columns';
|
|
21
|
+
export { createColumnPanels as createWorkItemColumnPanels } from './table/column-panels';
|
|
22
|
+
export { createHeaderDecorator as createWorkItemHeaderDecorator } from './table/headers';
|
|
23
|
+
export { createRulePanels as createWorkItemRulePanels } from './views/rule-panels';
|
|
24
|
+
export { createWorkItemDetailHeader } from './detail/detail-header';
|
|
25
|
+
export type { DetailHeaderConfig, DetailStage } from './detail/detail-header';
|
|
26
|
+
export { createWorkItemLayers } from './layers';
|
|
27
|
+
export type { WorkItemLayersOptions, WorkItemLayerKind } from './layers';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type InteractionOptions } from '../shared/interaction';
|
|
2
|
+
export type WorkItemLayerKind = 'popup' | 'overlay';
|
|
3
|
+
export interface WorkItemLayersOptions extends InteractionOptions {
|
|
4
|
+
/** A host can validate or save an editor before calling closePopup/closeOverlay. */
|
|
5
|
+
onCloseRequest?: (kind: WorkItemLayerKind) => void;
|
|
6
|
+
onOpen?: (kind: WorkItemLayerKind, element: HTMLElement) => void;
|
|
7
|
+
onClose?: (kind: WorkItemLayerKind) => void;
|
|
8
|
+
}
|
|
9
|
+
/** Scoped layer DOM and resource ownership; persistence and validation stay with the caller. */
|
|
10
|
+
export declare function createWorkItemLayers(container: HTMLElement, options?: WorkItemLayersOptions): {
|
|
11
|
+
element: HTMLDivElement;
|
|
12
|
+
onInteraction: (listener: (event: import("..").ComponentInteraction) => void) => import("../shared/lifecycle").Dispose;
|
|
13
|
+
closePopup: () => void;
|
|
14
|
+
closeOverlay: () => void;
|
|
15
|
+
showPopup(anchor: HTMLElement, title: string, content: string, width?: number, className?: string): HTMLElement;
|
|
16
|
+
showOverlay(content: string | HTMLElement, className?: string): HTMLElement;
|
|
17
|
+
toast(message: string): void;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FieldConfig, Rule, SavedView, ViewState, WorkItem } from '../contracts/work-item';
|
|
2
|
+
export type { ColorRule, Field, Rule, SavedView, ViewState, WorkItem } from '../contracts/work-item';
|
|
3
|
+
export declare const emptyView: () => ViewState;
|
|
4
|
+
export declare function matches(item: WorkItem, rules: Rule[]): boolean;
|
|
5
|
+
export declare function loadData(key: string, initialItems?: WorkItem[]): {
|
|
6
|
+
items: WorkItem[];
|
|
7
|
+
views: SavedView[];
|
|
8
|
+
drafts: WorkItem[];
|
|
9
|
+
customFields: FieldConfig[];
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ActionSurfaceOptions } from './action-surface';
|
|
2
|
+
export declare function createWorkItemSelectionBar(container: HTMLElement, options?: ActionSurfaceOptions): {
|
|
3
|
+
element: HTMLDivElement;
|
|
4
|
+
onInteraction: (listener: (event: import("..").ComponentInteraction) => void) => import("../shared/lifecycle").Dispose;
|
|
5
|
+
destroy: () => void;
|
|
6
|
+
setCount(count: number): void;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function acquireWorkItemScope(container: HTMLElement): () => void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createGrid } from "../../createGrid";
|
|
2
|
+
import { type ColDef } from '../../types';
|
|
3
|
+
import type { FieldConfig } from '../../contracts/work-item';
|
|
4
|
+
import { createControlRegistry } from "../fields/registry";
|
|
5
|
+
import { loadData, type Field, type ViewState } from "../model";
|
|
6
|
+
/** Services and state accessors the column panels borrow from the page host. */
|
|
7
|
+
export interface ColumnPanelDeps {
|
|
8
|
+
config: {
|
|
9
|
+
container: HTMLElement;
|
|
10
|
+
fields: FieldConfig[];
|
|
11
|
+
};
|
|
12
|
+
data: ReturnType<typeof loadData>;
|
|
13
|
+
fields: [string, string][];
|
|
14
|
+
fieldConfig: (key: string) => FieldConfig | undefined;
|
|
15
|
+
options: Record<string, string[]>;
|
|
16
|
+
controls: ReturnType<typeof createControlRegistry>;
|
|
17
|
+
instance: () => ReturnType<typeof createGrid>;
|
|
18
|
+
view: () => ViewState;
|
|
19
|
+
$: <T extends HTMLElement = HTMLElement>(selector: string, root?: ParentNode) => T;
|
|
20
|
+
showPopup: (anchor: HTMLElement, title: string, content: string, width?: number, className?: string) => HTMLElement;
|
|
21
|
+
closePopup: (saveChanges?: boolean) => void;
|
|
22
|
+
applyView: () => void;
|
|
23
|
+
save: () => void;
|
|
24
|
+
resizeGrid: () => void;
|
|
25
|
+
decorateHeaders: () => void;
|
|
26
|
+
columnDefs: () => ColDef[];
|
|
27
|
+
textDialog: (title: string, value: string, submit: (value: string) => void) => void;
|
|
28
|
+
rulePanel: (kind: string, anchor: HTMLElement) => void;
|
|
29
|
+
}
|
|
30
|
+
/** Field picker, column display settings, insert-field and header context menus. */
|
|
31
|
+
export declare function createColumnPanels(deps: ColumnPanelDeps): {
|
|
32
|
+
fieldPicker: (anchor: HTMLElement, onSelect: (field: Field) => void, settings?: {
|
|
33
|
+
available?: (field: Field) => boolean;
|
|
34
|
+
onCreate?: () => void;
|
|
35
|
+
}) => void;
|
|
36
|
+
showColumns: (anchor: HTMLElement) => void;
|
|
37
|
+
showInsertField: (anchor: HTMLElement, field: string, after: boolean) => void;
|
|
38
|
+
showColumnMenu: (anchor: HTMLElement, field: string) => void;
|
|
39
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CellRendererParams, ColDef } from '../../types';
|
|
2
|
+
import type { ColorRule, FieldConfig, ViewState, WorkItem } from '../../contracts/work-item';
|
|
3
|
+
import { createControlRegistry, type ControlContext } from "../fields/registry";
|
|
4
|
+
import type { StateRef } from '../../shared/state';
|
|
5
|
+
/** Services and state accessors the cell renderer and column defs borrow from the page host. */
|
|
6
|
+
export interface ColumnsDeps {
|
|
7
|
+
config: {
|
|
8
|
+
fields: FieldConfig[];
|
|
9
|
+
allowCustomFields?: boolean;
|
|
10
|
+
};
|
|
11
|
+
controls: ReturnType<typeof createControlRegistry>;
|
|
12
|
+
fieldConfig: (key: string) => FieldConfig | undefined;
|
|
13
|
+
options: Record<string, string[]>;
|
|
14
|
+
view: () => ViewState;
|
|
15
|
+
$: <T extends HTMLElement = HTMLElement>(selector: string, root?: ParentNode) => T;
|
|
16
|
+
tag: (value: string, field: string) => string;
|
|
17
|
+
activateCell: (anchor: HTMLElement, field: string, item: WorkItem, rowIndex: number) => void;
|
|
18
|
+
controlContext: (def: FieldConfig, item: WorkItem, surface: ControlContext["surface"]) => ControlContext;
|
|
19
|
+
openDetail: (item: WorkItem, tab?: string) => void;
|
|
20
|
+
colorRuleMatches: (item: WorkItem, rule: ColorRule) => boolean;
|
|
21
|
+
customColumns: () => ColDef[];
|
|
22
|
+
detailClickTimer: StateRef<number>;
|
|
23
|
+
}
|
|
24
|
+
/** Grid cell renderer and column definitions, extracted from the page factory. */
|
|
25
|
+
export declare function createColumns(deps: ColumnsDeps): {
|
|
26
|
+
cell: (params: CellRendererParams) => HTMLElement | string;
|
|
27
|
+
columnDefs: () => ColDef[];
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FieldConfig, ViewState } from '../../contracts/work-item';
|
|
2
|
+
export interface HeaderActions {
|
|
3
|
+
root: HTMLElement;
|
|
4
|
+
view: () => ViewState;
|
|
5
|
+
fieldConfig: (key: string) => FieldConfig | undefined;
|
|
6
|
+
showInsertField: (anchor: HTMLElement, field: string, after: boolean) => void;
|
|
7
|
+
showColumnMenu: (anchor: HTMLElement, field: string) => void;
|
|
8
|
+
applyView: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createHeaderDecorator(actions: HeaderActions): () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GridOptions } from '../../types';
|
|
2
|
+
import type { InteractionOptions } from '../../shared/interaction';
|
|
3
|
+
/** A standalone editable table. Its owner supplies fields, data and commands. */
|
|
4
|
+
export declare function createWorkItemTable(container: HTMLElement, options: GridOptions & InteractionOptions): {
|
|
5
|
+
onInteraction: (listener: (event: import("../..").ComponentInteraction) => void) => import("../../shared/lifecycle").Dispose;
|
|
6
|
+
destroy(): void;
|
|
7
|
+
api: import("../..").GridApi;
|
|
8
|
+
columnApi: import("../..").ColumnApi;
|
|
9
|
+
grid: import("../..").Grid;
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ActionSurfaceOptions } from './action-surface';
|
|
2
|
+
export interface WorkItemTabsOptions extends ActionSurfaceOptions {
|
|
3
|
+
tabs: readonly string[];
|
|
4
|
+
value?: string;
|
|
5
|
+
canCreate?: boolean;
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function createWorkItemTabs(container: HTMLElement, options: WorkItemTabsOptions): {
|
|
9
|
+
element: HTMLDivElement;
|
|
10
|
+
onInteraction: (listener: (event: import("..").ComponentInteraction) => void) => import("../shared/lifecycle").Dispose;
|
|
11
|
+
setValue: (next: string) => void;
|
|
12
|
+
getValue: () => string;
|
|
13
|
+
destroy: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ActionSurfaceOptions } from './action-surface';
|
|
2
|
+
export interface WorkItemToolbarOptions extends ActionSurfaceOptions {
|
|
3
|
+
onSearch?: (query: string, filter: boolean) => void;
|
|
4
|
+
}
|
|
5
|
+
export type WorkItemRuleCounts = Record<'filter' | 'sort' | 'group' | 'color', number>;
|
|
6
|
+
export declare function createWorkItemToolbar(container: HTMLElement, options?: WorkItemToolbarOptions): {
|
|
7
|
+
element: HTMLDivElement;
|
|
8
|
+
onInteraction: (listener: (event: import("..").ComponentInteraction) => void) => import("../shared/lifecycle").Dispose;
|
|
9
|
+
destroy: () => void;
|
|
10
|
+
setRuleCounts(counts: WorkItemRuleCounts): void;
|
|
11
|
+
};
|