rowvia 0.2.1 → 0.2.3

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.
@@ -157,6 +157,8 @@ export declare class Grid {
157
157
  private onColumnMoved;
158
158
  private onColumnsChanged;
159
159
  private onModelUpdated;
160
+ /** Synchronize an external horizontal scrollbar with body and header immediately. */
161
+ setHorizontalScrollLeft(left: number): void;
160
162
  onGridSizeChanged(): void;
161
163
  private onWindowResize;
162
164
  /** outside clicks (or clicks on the grid chrome) commit the edit and drop focus */
@@ -53,6 +53,17 @@ export interface WorkItemPageConfig {
53
53
  /** Opt in to browser URL hash integration. Disabled for embedded pages. */
54
54
  syncLocationHash?: boolean;
55
55
  onDataChange?: (items: WorkItem[]) => void;
56
+ /** Embedded business applications own their data; do not restore browser demo state. */
57
+ persistence?: "local" | "none";
58
+ showSavedViews?: boolean;
59
+ allowCustomFields?: boolean;
60
+ canCreate?: boolean;
61
+ initialView?: import("./model").ViewState;
62
+ onOpenDetail?: (item: WorkItem) => void;
63
+ onCreate?: () => void;
64
+ onSaveView?: (state: import("./model").ViewState & {
65
+ columns: import("rowvia").ColumnState[];
66
+ }) => void;
56
67
  }
57
68
  /** The table, create form, and detail layout are three independent configurations. */
58
69
  export declare function topicDemoConfig(container: HTMLElement): WorkItemPageConfig;
@@ -19,5 +19,6 @@ export declare function createWorkItemPage(config: WorkItemPageConfig): {
19
19
  showTerminated: boolean;
20
20
  };
21
21
  getItems: () => WorkItem[];
22
+ setItems: (items: WorkItem[]) => void;
22
23
  destroy: () => void;
23
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rowvia",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "零运行时依赖的 TypeScript 数据表格、甘特图与人员排期组件库",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
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",
14
14
  "test:work-items": "node test/work-items.mjs",
15
15
  "build:types": "tsc -p tsconfig.build.json && node scripts/clean-types.mjs",
16
- "prepublishOnly": "npm run typecheck && npm test && npm run build:lib",
16
+ "prepublishOnly": "npm run typecheck && npm test && npm run build:lib && npm run test:pages",
17
17
  "test:pages": "node test/pages.mjs"
18
18
  },
19
19
  "devDependencies": {