rowvia 0.3.2 → 0.3.4

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.
@@ -15,6 +15,7 @@ export interface FieldServices {
15
15
  searchOptions?: (field: FieldConfig, query: string, signal: AbortSignal) => Promise<FieldOption[]>;
16
16
  upload?: (field: FieldConfig, files: File[], signal: AbortSignal) => Promise<AttachmentValue[]>;
17
17
  vote?: (field: FieldConfig, item: WorkItem, selected: string[], signal: AbortSignal) => Promise<VoteValue>;
18
+ loadVote?: (field: FieldConfig, item: WorkItem, signal: AbortSignal) => Promise<VoteValue>;
18
19
  }
19
20
  export interface FormFieldConfig {
20
21
  field: string;
@@ -37,6 +37,8 @@ export declare class MultiChoiceField extends ChoiceField {
37
37
  }
38
38
  export declare class RadioField extends ChoiceField {
39
39
  protected variant: "radio";
40
+ protected renderDisplay(context: ControlContext): FieldView;
41
+ protected renderEditing(context: ControlContext): ControlEditor;
40
42
  }
41
43
  export declare class PersonField extends ChoiceField {
42
44
  protected variant: "person";
@@ -0,0 +1,3 @@
1
+ import type { ControlContext, ControlEditor } from './types';
2
+ /** Inline, stable-ID radio group shared by forms and standalone fields. */
3
+ export declare function radioEditor(c: ControlContext): ControlEditor;
@@ -23,6 +23,7 @@ export interface FieldServices {
23
23
  searchOptions?: (field: FieldConfig, query: string, signal: AbortSignal) => Promise<FieldOption[]>;
24
24
  upload?: (field: FieldConfig, files: File[], signal: AbortSignal) => Promise<AttachmentValue[]>;
25
25
  vote?: (field: FieldConfig, selected: string[], signal: AbortSignal) => Promise<VoteValue>;
26
+ loadVote?: (field: FieldConfig, signal: AbortSignal) => Promise<VoteValue>;
26
27
  }
27
28
  export type FieldKind = (string & {}) | "richText" | "number" | "dateTime" | "detail" | "title" | "text" | "longText" | "multiSelect" | "select" | "status" | "person" | "date" | "vote" | "relation";
28
29
  export interface FieldConfig {
@@ -35,6 +36,8 @@ export interface FieldConfig {
35
36
  required?: boolean;
36
37
  options?: string[];
37
38
  choices?: FieldOption[];
39
+ /** Boolean radio uses true/false option IDs but preserves boolean/null values. */
40
+ radioValueType?: 'boolean';
38
41
  placeholder?: string;
39
42
  maxLength?: number;
40
43
  numberOptions?: {
@@ -81,6 +81,10 @@ export interface WorkflowDetailOptions {
81
81
  }) => FlowDefinition | void | Promise<FlowDefinition | void>;
82
82
  onError?: (error: unknown, command: WorkflowDetailCommand) => void;
83
83
  onSelectNode?: (nodeId: string) => void;
84
+ /** Host-owned filter UI; its anchor remains stable across controlled updates. */
85
+ onFilter?: (anchor: HTMLElement) => void;
86
+ filterNode?: (node: FlowNode) => boolean;
87
+ filterLabel?: string;
84
88
  renderField?: (container: HTMLElement, field: FormItem | NodeField, context: WorkflowDetailRenderContext) => void | (() => void);
85
89
  renderSystemField?: (container: HTMLElement, field: {
86
90
  key: 'owner' | 'schedule' | 'estimate';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rowvia",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "零运行时依赖的 TypeScript 数据表格、甘特图与人员排期组件库",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -10,7 +10,8 @@
10
10
  "build:lib": "vite build --config vite.lib.config.ts && vite build --config vite.fields.config.ts && npm run build:types",
11
11
  "preview": "vite preview",
12
12
  "typecheck": "tsc --noEmit",
13
- "test": "esbuild src/index.ts --bundle --format=esm --outfile=dist-test/rowvia.mjs --loader:.ts=ts --log-level=error && node test/smoke.mjs && node test/gantt.mjs && node test/personnel.mjs && node test/work-items.mjs && node test/fields.mjs && node test/field-controls.mjs && node test/form-surface.mjs && node test/node-flow.mjs && node test/workflow-detail.mjs && node test/detail-comments.mjs && node test/detail-history.mjs && node test/refactor.mjs",
13
+ "test": "esbuild src/index.ts --bundle --format=esm --outfile=dist-test/rowvia.mjs --loader:.ts=ts --log-level=error && node test/smoke.mjs && node test/gantt.mjs && node test/personnel.mjs && node test/work-items.mjs && node test/fields.mjs && node test/field-controls.mjs && node test/form-surface.mjs && node test/field-interactions.mjs && node test/node-flow.mjs && node test/workflow-detail.mjs && node test/detail-comments.mjs && node test/detail-history.mjs && node test/refactor.mjs && node test/header-context-menu.mjs",
14
+ "test:header-context-menu": "esbuild src/index.ts --bundle --format=esm --outfile=dist-test/rowvia.mjs --loader:.ts=ts --log-level=error && node test/header-context-menu.mjs",
14
15
  "test:work-items": "node test/work-items.mjs",
15
16
  "test:node-flow": "node test/node-flow.mjs",
16
17
  "test:workflow-detail": "node test/workflow-detail.mjs",