@unovis/ts 1.4.5-beta.0 → 1.4.5
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/core/container/index.js
CHANGED
|
@@ -26,9 +26,15 @@ class ContainerCore {
|
|
|
26
26
|
this.element = this.svg.node();
|
|
27
27
|
}
|
|
28
28
|
updateContainer(config) {
|
|
29
|
+
var _a;
|
|
29
30
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
30
31
|
this.prevConfig = this.config;
|
|
31
32
|
this.config = merge(this._defaultConfig, config);
|
|
33
|
+
// Add `svgDefs` if provided in the config
|
|
34
|
+
if ((config === null || config === void 0 ? void 0 : config.svgDefs) !== ((_a = this.prevConfig) === null || _a === void 0 ? void 0 : _a.svgDefs)) {
|
|
35
|
+
this._svgDefsExternal.selectAll('*').remove();
|
|
36
|
+
this._svgDefsExternal.html(config.svgDefs);
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
39
|
// The `_preRender` step should be used to perform some actions before rendering.
|
|
34
40
|
// For example, calculating scales, setting component sizes, etc ...
|
|
@@ -36,12 +42,7 @@ class ContainerCore {
|
|
|
36
42
|
_preRender() { }
|
|
37
43
|
// The `_render` step should be used to perform the actual rendering
|
|
38
44
|
_render(duration) {
|
|
39
|
-
const { config
|
|
40
|
-
// Add `svgDefs` if provided in the config
|
|
41
|
-
if ((config === null || config === void 0 ? void 0 : config.svgDefs) !== (prevConfig === null || prevConfig === void 0 ? void 0 : prevConfig.svgDefs)) {
|
|
42
|
-
this._svgDefsExternal.selectAll('*').remove();
|
|
43
|
-
this._svgDefsExternal.html(config.svgDefs);
|
|
44
|
-
}
|
|
45
|
+
const { config } = this;
|
|
45
46
|
// Apply the `aria-label` attribute
|
|
46
47
|
select(this._container)
|
|
47
48
|
.attr('aria-label', config.ariaLabel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/core/container/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\n\n// Types\nimport { Sizing } from 'types/component'\n\n// Utils\nimport { isEqual, clamp, merge } from 'utils/data'\nimport { ResizeObserver } from 'utils/resize-observer'\n\n// Config\nimport { ContainerDefaultConfig, ContainerConfigInterface } from './config'\n\nexport class ContainerCore {\n public svg: Selection<SVGSVGElement, unknown, null, undefined>\n public element: SVGSVGElement\n public prevConfig: ContainerConfigInterface\n public config: ContainerConfigInterface\n\n protected _defaultConfig: ContainerConfigInterface = ContainerDefaultConfig\n protected _container: HTMLElement\n protected _requestedAnimationFrame: number\n protected _isFirstRender = true\n protected _resizeObserver: ResizeObserver | undefined\n protected _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n protected _svgDefsExternal: Selection<SVGDefsElement, unknown, null, undefined>\n private _containerSize: { width: number; height: number }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static DEFAULT_CONTAINER_HEIGHT = 300\n\n constructor (element: HTMLElement) {\n this._requestedAnimationFrame = null\n this._container = element\n\n // Setting `role` attribute to `image` to make the container accessible\n const container = select(this._container)\n container.attr('role', 'figure')\n\n // Create SVG element for visualizations\n this.svg = container.append('svg')\n // We set `display` to `block` because inline elements have an invisible\n // inline space that adds 4px to the height of the container\n .style('display', 'block')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .attr('height', ContainerCore.DEFAULT_CONTAINER_HEIGHT) // Overriding default SVG height of 150\n .attr('aria-hidden', true)\n\n this._svgDefs = this.svg.append('defs')\n this._svgDefsExternal = this.svg.append('defs')\n this.element = this.svg.node()\n }\n\n public updateContainer<T extends ContainerConfigInterface> (config: T): void {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n this.prevConfig = this.config\n this.config = merge(this._defaultConfig, config)\n }\n\n // The `_preRender` step should be used to perform some actions before rendering.\n // For example, calculating scales, setting component sizes, etc ...\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n protected _preRender (): void {}\n\n // The `_render` step should be used to perform the actual rendering\n protected _render (duration?: number): void {\n const { config, prevConfig } = this\n\n // Add `svgDefs` if provided in the config\n if (config?.svgDefs !== prevConfig?.svgDefs) {\n this._svgDefsExternal.selectAll('*').remove()\n this._svgDefsExternal.html(config.svgDefs)\n }\n\n // Apply the `aria-label` attribute\n select(this._container)\n .attr('aria-label', config.ariaLabel)\n\n this._isFirstRender = false\n }\n\n // Warning: Some Containers (i.e. Single Container) may override this method, so if you introduce any changes here,\n // make sure to check that other containers didn't break after them.\n public render (duration = this.config.duration): void {\n const width = this.config.width || this.containerWidth\n const height = this.config.height || this.containerHeight\n\n // We set SVG size in `render()` instead of `_render()`, because the size values in pixels will become\n // available only in the next animation when being accessed via `element.clientWidth` and `element.clientHeight`,\n // and we rely on those values when setting width and size of the components.\n this.svg\n .attr('width', width)\n .attr('height', height)\n\n // Set up Resize Observer. We do it in `render()` to capture container size change if it happened\n // in the next animation frame after the initial `render` was called.\n if (!this._resizeObserver) this._setUpResizeObserver()\n\n // Schedule the actual rendering in the next frame\n cancelAnimationFrame(this._requestedAnimationFrame)\n this._requestedAnimationFrame = requestAnimationFrame(() => {\n this._preRender()\n this._render(duration)\n })\n }\n\n get containerWidth (): number {\n return this.config.width\n ? this.element.clientWidth\n : (this._container.clientWidth || this._container.getBoundingClientRect().width)\n }\n\n get containerHeight (): number {\n return this.config.height\n ? this.element.clientHeight\n : (this._container.clientHeight || this._container.getBoundingClientRect().height || ContainerCore.DEFAULT_CONTAINER_HEIGHT)\n }\n\n get width (): number {\n return clamp(this.containerWidth - this.config.margin.left - this.config.margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n get height (): number {\n return clamp(this.containerHeight - this.config.margin.top - this.config.margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n protected _removeAllChildren (): void {\n while (this.element.firstChild) {\n this.element.removeChild(this.element.firstChild)\n }\n }\n\n protected _onResize (): void {\n const { config } = this\n const redrawOnResize = config.sizing === Sizing.Fit || config.sizing === Sizing.FitWidth\n if (redrawOnResize) this.render(0)\n }\n\n protected _setUpResizeObserver (): void {\n if (this._resizeObserver) return\n const containerRect = this._container.getBoundingClientRect()\n this._containerSize = { width: containerRect.width, height: containerRect.height }\n\n this._resizeObserver = new ResizeObserver((entries, observer) => {\n const resizedContainerRect = this._container.getBoundingClientRect()\n const resizedContainerSize = { width: resizedContainerRect.width, height: resizedContainerRect.height }\n const hasSizeChanged = !isEqual(this._containerSize, resizedContainerSize)\n // Do resize only if element is attached to the DOM\n // will come in useful when some ancestor of container becomes detached\n if (hasSizeChanged && resizedContainerSize.width && resizedContainerSize.height) {\n this._containerSize = resizedContainerSize\n this._onResize()\n }\n })\n this._resizeObserver.observe(this._container)\n }\n\n public destroy (): void {\n cancelAnimationFrame(this._requestedAnimationFrame)\n this._resizeObserver?.disconnect()\n this.svg.remove()\n }\n}\n"],"names":[],"mappings":";;;;;;MAYa,aAAa,CAAA;AAkBxB,IAAA,WAAA,CAAa,OAAoB,EAAA;QAZvB,IAAc,CAAA,cAAA,GAA6B,sBAAsB,CAAA;QAGjE,IAAc,CAAA,cAAA,GAAG,IAAI,CAAA;AAU7B,QAAA,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAA;AACpC,QAAA,IAAI,CAAC,UAAU,GAAG,OAAO,CAAA;;QAGzB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACzC,QAAA,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;;QAGhC,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;;;AAG/B,aAAA,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;AACzB,aAAA,IAAI,CAAC,OAAO,EAAE,4BAA4B,CAAC;aAC3C,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,wBAAwB,CAAC;AACtD,aAAA,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;QAE5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CA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,EAAE,CAAA;YACvG,MAAM,cAAc,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAA;;;YAG1E,IAAI,cAAc,IAAI,oBAAoB,CAAC,KAAK,IAAI,oBAAoB,CAAC,MAAM,EAAE;AAC/E,gBAAA,IAAI,CAAC,cAAc,GAAG,oBAAoB,CAAA;gBAC1C,IAAI,CAAC,SAAS,EAAE,CAAA;AACjB,aAAA;AACH,SAAC,CAAC,CAAA;QACF,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;KAC9C;IAEM,OAAO,GAAA;;AACZ,QAAA,oBAAoB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AACnD,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAU,EAAE,CAAA;AAClC,QAAA,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAA;KAClB;;AArID;AACO,aAAwB,CAAA,wBAAA,GAAG,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/core/container/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\n\n// Types\nimport { Sizing } from 'types/component'\n\n// Utils\nimport { isEqual, clamp, merge } from 'utils/data'\nimport { ResizeObserver } from 'utils/resize-observer'\n\n// Config\nimport { ContainerDefaultConfig, ContainerConfigInterface } from './config'\n\nexport class ContainerCore {\n public svg: Selection<SVGSVGElement, unknown, null, undefined>\n public element: SVGSVGElement\n public prevConfig: ContainerConfigInterface\n public config: ContainerConfigInterface\n\n protected _defaultConfig: ContainerConfigInterface = ContainerDefaultConfig\n protected _container: HTMLElement\n protected _requestedAnimationFrame: number\n protected _isFirstRender = true\n protected _resizeObserver: ResizeObserver | undefined\n protected _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n protected _svgDefsExternal: Selection<SVGDefsElement, unknown, null, undefined>\n private _containerSize: { width: number; height: number }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static DEFAULT_CONTAINER_HEIGHT = 300\n\n constructor (element: HTMLElement) {\n this._requestedAnimationFrame = null\n this._container = element\n\n // Setting `role` attribute to `image` to make the container accessible\n const container = select(this._container)\n container.attr('role', 'figure')\n\n // Create SVG element for visualizations\n this.svg = container.append('svg')\n // We set `display` to `block` because inline elements have an invisible\n // inline space that adds 4px to the height of the container\n .style('display', 'block')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .attr('height', ContainerCore.DEFAULT_CONTAINER_HEIGHT) // Overriding default SVG height of 150\n .attr('aria-hidden', true)\n\n this._svgDefs = this.svg.append('defs')\n this._svgDefsExternal = this.svg.append('defs')\n this.element = this.svg.node()\n }\n\n public updateContainer<T extends ContainerConfigInterface> (config: T): void {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n this.prevConfig = this.config\n this.config = merge(this._defaultConfig, config)\n\n // Add `svgDefs` if provided in the config\n if (config?.svgDefs !== this.prevConfig?.svgDefs) {\n this._svgDefsExternal.selectAll('*').remove()\n this._svgDefsExternal.html(config.svgDefs)\n }\n }\n\n // The `_preRender` step should be used to perform some actions before rendering.\n // For example, calculating scales, setting component sizes, etc ...\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n protected _preRender (): void {}\n\n // The `_render` step should be used to perform the actual rendering\n protected _render (duration?: number): void {\n const { config } = this\n\n // Apply the `aria-label` attribute\n select(this._container)\n .attr('aria-label', config.ariaLabel)\n\n this._isFirstRender = false\n }\n\n // Warning: Some Containers (i.e. Single Container) may override this method, so if you introduce any changes here,\n // make sure to check that other containers didn't break after them.\n public render (duration = this.config.duration): void {\n const width = this.config.width || this.containerWidth\n const height = this.config.height || this.containerHeight\n\n // We set SVG size in `render()` instead of `_render()`, because the size values in pixels will become\n // available only in the next animation when being accessed via `element.clientWidth` and `element.clientHeight`,\n // and we rely on those values when setting width and size of the components.\n this.svg\n .attr('width', width)\n .attr('height', height)\n\n // Set up Resize Observer. We do it in `render()` to capture container size change if it happened\n // in the next animation frame after the initial `render` was called.\n if (!this._resizeObserver) this._setUpResizeObserver()\n\n // Schedule the actual rendering in the next frame\n cancelAnimationFrame(this._requestedAnimationFrame)\n this._requestedAnimationFrame = requestAnimationFrame(() => {\n this._preRender()\n this._render(duration)\n })\n }\n\n get containerWidth (): number {\n return this.config.width\n ? this.element.clientWidth\n : (this._container.clientWidth || this._container.getBoundingClientRect().width)\n }\n\n get containerHeight (): number {\n return this.config.height\n ? this.element.clientHeight\n : (this._container.clientHeight || this._container.getBoundingClientRect().height || ContainerCore.DEFAULT_CONTAINER_HEIGHT)\n }\n\n get width (): number {\n return clamp(this.containerWidth - this.config.margin.left - this.config.margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n get height (): number {\n return clamp(this.containerHeight - this.config.margin.top - this.config.margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n protected _removeAllChildren (): void {\n while (this.element.firstChild) {\n this.element.removeChild(this.element.firstChild)\n }\n }\n\n protected _onResize (): void {\n const { config } = this\n const redrawOnResize = config.sizing === Sizing.Fit || config.sizing === Sizing.FitWidth\n if (redrawOnResize) this.render(0)\n }\n\n protected _setUpResizeObserver (): void {\n if (this._resizeObserver) return\n const containerRect = this._container.getBoundingClientRect()\n this._containerSize = { width: containerRect.width, height: containerRect.height }\n\n this._resizeObserver = new ResizeObserver((entries, observer) => {\n const resizedContainerRect = this._container.getBoundingClientRect()\n const resizedContainerSize = { width: resizedContainerRect.width, height: resizedContainerRect.height }\n const hasSizeChanged = !isEqual(this._containerSize, resizedContainerSize)\n // Do resize only if element is attached to the DOM\n // will come in useful when some ancestor of container becomes detached\n if (hasSizeChanged && resizedContainerSize.width && resizedContainerSize.height) {\n this._containerSize = resizedContainerSize\n this._onResize()\n }\n })\n this._resizeObserver.observe(this._container)\n }\n\n public destroy (): void {\n cancelAnimationFrame(this._requestedAnimationFrame)\n this._resizeOb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,oBAAoB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AACnD,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAU,EAAE,CAAA;AAClC,QAAA,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAA;KAClB;;AArID;AACO,aAAwB,CAAA,wBAAA,GAAG,GAAG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/ts",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.4.5
|
|
4
|
+
"version": "1.4.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|