@opendata-ai/openchart-vanilla 6.4.1 → 6.5.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/index.d.ts +9 -2
- package/dist/index.js +327 -174
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -764
- package/package.json +3 -3
- package/src/__tests__/animation.test.ts +358 -0
- package/src/__tests__/edit-events.test.ts +35 -35
- package/src/__tests__/events.test.ts +7 -7
- package/src/__tests__/export.test.ts +1 -1
- package/src/__tests__/mount.test.ts +10 -10
- package/src/__tests__/selection-events.test.ts +14 -14
- package/src/__tests__/svg-renderer.test.ts +67 -67
- package/src/__tests__/table-keyboard.test.ts +18 -18
- package/src/__tests__/table-mount.test.ts +138 -17
- package/src/__tests__/tooltip.test.ts +12 -12
- package/src/animation.ts +75 -0
- package/src/graph/__tests__/graph-mount.test.ts +16 -16
- package/src/graph-mount.ts +18 -18
- package/src/mount.ts +71 -37
- package/src/renderers/table-cells.ts +11 -9
- package/src/svg-renderer.ts +161 -54
- package/src/table-keyboard.ts +5 -5
- package/src/table-mount.ts +34 -11
- package/src/table-renderer.ts +70 -39
- package/src/tooltip.ts +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -259,7 +259,9 @@ declare function registerMarkRenderer<T extends Mark>(type: T['type'], renderer:
|
|
|
259
259
|
* @param container - DOM element to mount the SVG into.
|
|
260
260
|
* @returns The created SVG element.
|
|
261
261
|
*/
|
|
262
|
-
declare function renderChartSVG(layout: ChartLayout, container: HTMLElement
|
|
262
|
+
declare function renderChartSVG(layout: ChartLayout, container: HTMLElement, opts?: {
|
|
263
|
+
animate?: boolean;
|
|
264
|
+
}): SVGElement;
|
|
263
265
|
|
|
264
266
|
/**
|
|
265
267
|
* Table keyboard navigation: arrow-key cell navigation, Enter to sort,
|
|
@@ -340,6 +342,11 @@ declare function createTable(container: HTMLElement, spec: TableSpec, options?:
|
|
|
340
342
|
* The returned element replaces or appends to the given container.
|
|
341
343
|
*/
|
|
342
344
|
|
|
345
|
+
/** Options for renderTable(). */
|
|
346
|
+
interface TableRenderOptions {
|
|
347
|
+
/** Whether to apply entrance animation on this render. */
|
|
348
|
+
animate?: boolean;
|
|
349
|
+
}
|
|
343
350
|
/**
|
|
344
351
|
* Render a TableLayout into a full DOM structure.
|
|
345
352
|
*
|
|
@@ -347,7 +354,7 @@ declare function createTable(container: HTMLElement, spec: TableSpec, options?:
|
|
|
347
354
|
* @param container - The container element to render into.
|
|
348
355
|
* @returns The wrapper element that was created.
|
|
349
356
|
*/
|
|
350
|
-
declare function renderTable(layout: TableLayout, container: HTMLElement): HTMLElement;
|
|
357
|
+
declare function renderTable(layout: TableLayout, container: HTMLElement, opts?: TableRenderOptions): HTMLElement;
|
|
351
358
|
|
|
352
359
|
/**
|
|
353
360
|
* Text edit overlay: creates a positioned textarea over an SVG text element
|