rowvia 0.3.1 → 0.3.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.
@@ -196,6 +196,7 @@ export interface FormPlacement {
196
196
  requiredWhen?: FormCondition;
197
197
  }
198
198
  export interface FormGroupConfig {
199
+ layoutRole?: 'column';
199
200
  id: string;
200
201
  label: string;
201
202
  items: FormLayoutItem[];
@@ -4,6 +4,15 @@ export interface PersonnelScheduleOptions extends InteractionOptions {
4
4
  people: SchedulePerson[];
5
5
  items: ScheduleItem[];
6
6
  today?: string;
7
+ /** Inclusive date range; initialization does not emit onRangeChange. */
8
+ initialRange?: {
9
+ from: string;
10
+ to: string;
11
+ };
12
+ onRangeChange?: (range: {
13
+ from: string;
14
+ to: string;
15
+ }) => void;
7
16
  title?: string;
8
17
  workItemLabel?: string;
9
18
  /** Use distinct keys to isolate saved views by application or workspace. */
@@ -16,6 +25,11 @@ export interface PersonnelScheduleApi extends InteractionSource {
16
25
  getItems(): ScheduleItem[];
17
26
  updateItem(id: string, changes: Partial<Omit<ScheduleItem, 'id'>>): void;
18
27
  setPeople(ids: string[]): void;
28
+ /** Synchronize external query dates without notifying onRangeChange. */
29
+ setRange(range: {
30
+ from: string;
31
+ to: string;
32
+ }): void;
19
33
  destroy(): void;
20
34
  }
21
35
  export declare function createPersonnelSchedule(container: HTMLElement, options: PersonnelScheduleOptions): PersonnelScheduleApi;
@@ -43,6 +43,16 @@ export interface WorkflowDetailCallbackContext {
43
43
  flow: FlowDefinition;
44
44
  signal: AbortSignal;
45
45
  }
46
+ export interface WorkflowTaskColumn {
47
+ key: string;
48
+ label: string;
49
+ /** Optional summary heading in expanded mode; label remains the list/detail label. */
50
+ expandedLabel?: string;
51
+ /** In expanded mode render below the summary, using the same field renderer. */
52
+ expanded?: boolean;
53
+ hideWhenExpanded?: boolean;
54
+ width?: number;
55
+ }
46
56
  export interface WorkflowDetailOptions {
47
57
  flow: FlowDefinition;
48
58
  selectedNodeId?: string;
@@ -59,15 +69,12 @@ export interface WorkflowDetailOptions {
59
69
  onAction?: (nodeId: string, actionId: string, context: WorkflowDetailCallbackContext) => WorkflowDetailResult;
60
70
  onDelete?: (nodeId: string, context: WorkflowDetailCallbackContext) => WorkflowDetailResult;
61
71
  onFlowChange?: (detail: NonNullable<FlowDefinition['detail']>, context: WorkflowDetailCallbackContext) => WorkflowDetailResult;
72
+ renderTaskActions?: (host: HTMLElement, task: SubTask, context: WorkflowDetailRenderContext) => void | (() => void);
62
73
  onCreateTask?: (nodeId: string, context: WorkflowDetailCallbackContext) => WorkflowDetailResult;
63
- taskColumns?: (node: FlowNode) => {
64
- key: string;
65
- label: string;
66
- }[];
67
- renderTaskField?: (host: HTMLElement, task: SubTask, column: {
68
- key: string;
69
- label: string;
70
- }, context: WorkflowDetailRenderContext) => void | (() => void);
74
+ taskColumns?: (node: FlowNode) => WorkflowTaskColumn[];
75
+ taskColumnsMode?: 'append' | 'replace';
76
+ taskCanExpand?: (node: FlowNode) => boolean;
77
+ renderTaskField?: (host: HTMLElement, task: SubTask, column: WorkflowTaskColumn, context: WorkflowDetailRenderContext) => void | (() => void);
71
78
  onCommand?: (command: WorkflowDetailCommand, context: {
72
79
  flow: FlowDefinition;
73
80
  signal: AbortSignal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rowvia",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "零运行时依赖的 TypeScript 数据表格、甘特图与人员排期组件库",
5
5
  "type": "module",
6
6
  "scripts": {