rowvia 0.1.0 → 0.2.0
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/dist/rowvia.css +1 -1
- package/dist/rowvia.es.js +2878 -2814
- package/dist/rowvia.umd.cjs +18 -18
- package/dist/types/core/localeText.d.ts +2 -2
- package/dist/types/render/headerView.d.ts +1 -1
- package/dist/types/render/rowRenderer.d.ts +7 -3
- package/package.json +3 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UI text for menus, popups and tool panels. Mirrors ag-grid's `localeText`
|
|
3
|
-
* option: the grid merges user-supplied keys over these
|
|
3
|
+
* option: the grid merges user-supplied keys over these Chinese defaults and
|
|
4
4
|
* every built-in string resolves through `t(key)` / `translate(key, fallback)`.
|
|
5
5
|
*/
|
|
6
6
|
export declare const DEFAULT_LOCALE_TEXT: Record<string, string>;
|
|
7
7
|
/** filter condition value → locale key (same names as ag-grid) */
|
|
8
8
|
export declare const CONDITION_LABELS: Record<string, string>;
|
|
9
|
-
/** resolves UI text: user overrides first, then the
|
|
9
|
+
/** resolves UI text: user overrides first, then the Chinese defaults, then the key itself */
|
|
10
10
|
export declare class LocaleText {
|
|
11
11
|
private overrides;
|
|
12
12
|
constructor(overrides: Record<string, string>);
|
|
@@ -58,7 +58,7 @@ export declare class HeaderView {
|
|
|
58
58
|
updateIndicators(): void;
|
|
59
59
|
private headerColumnIndex;
|
|
60
60
|
private layoutPositions;
|
|
61
|
-
setScrollLeft(left: number): void;
|
|
61
|
+
setScrollLeft(left: number, scrollbarWidth?: number): void;
|
|
62
62
|
getHeaderCell(column: Column): HTMLElement | undefined;
|
|
63
63
|
getHeaderRow(): HTMLElement;
|
|
64
64
|
}
|
|
@@ -6,6 +6,8 @@ export interface RowRendererContext {
|
|
|
6
6
|
options: GridOptions;
|
|
7
7
|
eventService: EventService;
|
|
8
8
|
rowModel: RowModel;
|
|
9
|
+
/** UI text lookup (localeText) */
|
|
10
|
+
t: (key: string) => string;
|
|
9
11
|
getColumns: () => {
|
|
10
12
|
left: Column[];
|
|
11
13
|
center: Column[];
|
|
@@ -68,10 +70,11 @@ export declare class RowRenderer {
|
|
|
68
70
|
private lastRange;
|
|
69
71
|
private firstRendered;
|
|
70
72
|
private heightVersion;
|
|
73
|
+
private scrollFrame;
|
|
71
74
|
constructor(eRoot: HTMLElement, eHeader: HTMLElement, ctx: RowRendererContext);
|
|
72
75
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
76
|
+
* Apply wheel gestures to the shared viewport and pinned transforms in one
|
|
77
|
+
* handler, including gestures originating in the centre columns.
|
|
75
78
|
*/
|
|
76
79
|
private onSectionWheel;
|
|
77
80
|
private onBodyMouseOver;
|
|
@@ -112,6 +115,7 @@ export declare class RowRenderer {
|
|
|
112
115
|
}): void;
|
|
113
116
|
private rowCompKey;
|
|
114
117
|
private findRowIndex;
|
|
118
|
+
private scheduleScrollRender;
|
|
115
119
|
private onScroll;
|
|
116
120
|
/** keep the pinned column sections aligned with the vertical scroll position */
|
|
117
121
|
private syncPinnedScroll;
|
|
@@ -125,6 +129,7 @@ export declare class RowRenderer {
|
|
|
125
129
|
getVerticalScrollTop(): number;
|
|
126
130
|
setVerticalScrollTop(top: number): void;
|
|
127
131
|
getHorizontalScrollLeft(): number;
|
|
132
|
+
getVerticalScrollbarWidth(): number;
|
|
128
133
|
setHorizontalScrollLeft(left: number): void;
|
|
129
134
|
/**
|
|
130
135
|
* Re-renders the group rows that stick to the top of the viewport. A group
|
|
@@ -181,7 +186,6 @@ declare class RowComp {
|
|
|
181
186
|
private updateCellContent;
|
|
182
187
|
refreshCells(columns?: Column[], force?: boolean, flash?: boolean): void;
|
|
183
188
|
appendTo(leftContainer: HTMLElement, centerContainer: HTMLElement, rightContainer: HTMLElement): void;
|
|
184
|
-
ensureVisibleCells(): void;
|
|
185
189
|
setTop(top: number): void;
|
|
186
190
|
getCenterElement(): HTMLElement | null;
|
|
187
191
|
getCellElements(): HTMLElement[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rowvia",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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 && 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",
|
|
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
|
+
"test:work-items": "node test/work-items.mjs",
|
|
14
15
|
"build:types": "tsc -p tsconfig.build.json && node scripts/clean-types.mjs",
|
|
15
16
|
"prepublishOnly": "npm run typecheck && npm test && npm run build:lib"
|
|
16
17
|
},
|