@unovis/ts 1.3.0-beta.2 → 1.3.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.
Files changed (113) hide show
  1. package/components/axis/config.d.ts +1 -1
  2. package/components/axis/config.js.map +1 -1
  3. package/components/axis/index.js +1 -1
  4. package/components/axis/index.js.map +1 -1
  5. package/components/chord-diagram/config.js +2 -2
  6. package/components/chord-diagram/config.js.map +1 -1
  7. package/components/chord-diagram/index.js +1 -1
  8. package/components/chord-diagram/index.js.map +1 -1
  9. package/components/donut/config.d.ts +1 -1
  10. package/components/donut/config.js +1 -3
  11. package/components/donut/config.js.map +1 -1
  12. package/components/free-brush/index.js +9 -9
  13. package/components/free-brush/index.js.map +1 -1
  14. package/components/graph/config.js +3 -3
  15. package/components/graph/config.js.map +1 -1
  16. package/components/graph/index.js +3 -2
  17. package/components/graph/index.js.map +1 -1
  18. package/components/graph/modules/layout.js +7 -2
  19. package/components/graph/modules/layout.js.map +1 -1
  20. package/components/graph/modules/link/index.js.map +1 -1
  21. package/components/graph/modules/node/helper.d.ts +1 -1
  22. package/components/graph/modules/node/helper.js.map +1 -1
  23. package/components/graph/modules/node/index.d.ts +3 -0
  24. package/components/graph/modules/node/index.js +5 -7
  25. package/components/graph/modules/node/index.js.map +1 -1
  26. package/components/graph/modules/shape.js +2 -2
  27. package/components/graph/modules/shape.js.map +1 -1
  28. package/components/grouped-bar/config.js +1 -3
  29. package/components/grouped-bar/config.js.map +1 -1
  30. package/components/grouped-bar/index.d.ts +1 -6
  31. package/components/grouped-bar/index.js +1 -12
  32. package/components/grouped-bar/index.js.map +1 -1
  33. package/components/leaflet-flow-map/config.js +1 -1
  34. package/components/leaflet-flow-map/config.js.map +1 -1
  35. package/components/leaflet-map/config.js +2 -2
  36. package/components/leaflet-map/config.js.map +1 -1
  37. package/components/leaflet-map/index.d.ts +1 -1
  38. package/components/leaflet-map/index.js.map +1 -1
  39. package/components/leaflet-map/modules/clusterBackground.d.ts +4 -2
  40. package/components/leaflet-map/modules/clusterBackground.js.map +1 -1
  41. package/components/leaflet-map/modules/map.d.ts +1 -1
  42. package/components/leaflet-map/modules/map.js +6 -6
  43. package/components/leaflet-map/modules/map.js.map +1 -1
  44. package/components/leaflet-map/modules/node.d.ts +3 -0
  45. package/components/leaflet-map/modules/node.js +8 -12
  46. package/components/leaflet-map/modules/node.js.map +1 -1
  47. package/components/leaflet-map/modules/utils.js.map +1 -1
  48. package/components/leaflet-map/renderer/mapboxgl-layer.js.map +1 -1
  49. package/components/leaflet-map/renderer/mapboxgl-utils.d.ts +5 -1
  50. package/components/leaflet-map/renderer/mapboxgl-utils.js +3 -3
  51. package/components/leaflet-map/renderer/mapboxgl-utils.js.map +1 -1
  52. package/components/leaflet-map/style.js.map +1 -1
  53. package/components/leaflet-map/types.d.ts +5 -1
  54. package/components/leaflet-map/types.js.map +1 -1
  55. package/components/line/index.d.ts +2 -2
  56. package/components/line/index.js +2 -2
  57. package/components/line/index.js.map +1 -1
  58. package/components/nested-donut/index.js +14 -5
  59. package/components/nested-donut/index.js.map +1 -1
  60. package/components/nested-donut/style.js.map +1 -1
  61. package/components/sankey/config.d.ts +1 -1
  62. package/components/sankey/config.js +2 -2
  63. package/components/sankey/config.js.map +1 -1
  64. package/components/sankey/index.js.map +1 -1
  65. package/components/sankey/modules/link.d.ts +10 -0
  66. package/components/sankey/modules/link.js +4 -8
  67. package/components/sankey/modules/link.js.map +1 -1
  68. package/components/scatter/config.d.ts +1 -1
  69. package/components/scatter/config.js +1 -3
  70. package/components/scatter/config.js.map +1 -1
  71. package/components/scatter/index.js +3 -3
  72. package/components/scatter/index.js.map +1 -1
  73. package/components/scatter/modules/point.js.map +1 -1
  74. package/components/stacked-bar/config.js +1 -3
  75. package/components/stacked-bar/config.js.map +1 -1
  76. package/components/timeline/config.js +1 -7
  77. package/components/timeline/config.js.map +1 -1
  78. package/components/tooltip/index.d.ts +2 -1
  79. package/components/tooltip/index.js +10 -3
  80. package/components/tooltip/index.js.map +1 -1
  81. package/components/tooltip/style.d.ts +6 -0
  82. package/components/tooltip/style.js +13 -14
  83. package/components/tooltip/style.js.map +1 -1
  84. package/components/topojson-map/config.js +1 -1
  85. package/components/topojson-map/config.js.map +1 -1
  86. package/components/topojson-map/index.js +0 -1
  87. package/components/topojson-map/index.js.map +1 -1
  88. package/components/xy-labels/config.js +1 -3
  89. package/components/xy-labels/config.js.map +1 -1
  90. package/containers/xy-container/config.js.map +1 -1
  91. package/containers/xy-container/index.js +7 -6
  92. package/containers/xy-container/index.js.map +1 -1
  93. package/core/component/index.js +6 -2
  94. package/core/component/index.js.map +1 -1
  95. package/core/xy-component/config.js +1 -5
  96. package/core/xy-component/config.js.map +1 -1
  97. package/data-models/map-graph.js +3 -6
  98. package/data-models/map-graph.js.map +1 -1
  99. package/package.json +3 -1
  100. package/styles/colors.d.ts +2 -2
  101. package/styles/index.d.ts +1 -1
  102. package/styles/patterns.js +2 -1
  103. package/styles/patterns.js.map +1 -1
  104. package/types/accessor.d.ts +5 -5
  105. package/types/component.js +2 -0
  106. package/types/component.js.map +1 -1
  107. package/utils/d3.d.ts +10 -1
  108. package/utils/d3.js.map +1 -1
  109. package/utils/data.d.ts +6 -6
  110. package/utils/data.js +2 -1
  111. package/utils/data.js.map +1 -1
  112. package/utils/text.js +2 -2
  113. package/utils/text.js.map +1 -1
@@ -33,8 +33,8 @@ function appendShape(selection, shapeAccessor, shapeSelector, customShapeSelecto
33
33
  shapeElement = element.insert('circle', insertSelector);
34
34
  }
35
35
  }
36
- return shapeElement.attr('class', shapeSelector)
37
- .classed(customShapeSelector, isCustomXmlShape);
36
+ shapeElement.classed(customShapeSelector, isCustomXmlShape);
37
+ return shapeElement.attr('class', shapeSelector);
38
38
  });
39
39
  }
40
40
  function updateShape(selection, shape, size, index) {
@@ -1 +1 @@
1
- {"version":3,"file":"shape.js","sources":["../../../../src/components/graph/modules/shape.ts"],"sourcesContent":["import { Selection, select } from 'd3-selection'\n\n// Types\nimport { NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Utils\nimport { polygon } from 'utils/path'\nimport { getString } from 'utils/data'\n\n// Types\n\n// Local Types\nimport { GraphNodeShape } from '../types'\n\n// Helpers\nimport { getNodeSize } from './node/helper'\n\nexport function isCustomXml (shape: GraphNodeShape): boolean {\n return /<[a-z][\\s\\S]*>/i.test(shape)\n}\n\nexport function appendShape<T> (\n selection: Selection<SVGGElement, T, SVGGElement, unknown>,\n shapeAccessor: StringAccessor<T>,\n shapeSelector: string,\n customShapeSelector: string,\n index?: number,\n insertSelector = ':last-child'\n): void {\n selection.each((d, i, elements) => {\n const element = select(elements[i])\n const shape = getString(d, shapeAccessor, index) as GraphNodeShape\n\n let shapeElement\n const isCustomXmlShape = isCustomXml(shape)\n if (isCustomXmlShape) {\n shapeElement = element.insert('g', insertSelector)\n .html(shape)\n } else {\n switch (shape) {\n case GraphNodeShape.Square:\n shapeElement = element.insert('rect', insertSelector)\n .attr('rx', 5)\n .attr('ry', 5)\n break\n case GraphNodeShape.Hexagon:\n case GraphNodeShape.Triangle:\n shapeElement = element.insert('path', insertSelector)\n break\n case GraphNodeShape.Circle:\n default:\n shapeElement = element.insert('circle', insertSelector)\n }\n }\n\n return shapeElement.attr('class', shapeSelector)\n .classed(customShapeSelector, isCustomXmlShape)\n })\n}\n\nexport function updateShape<T> (\n selection: Selection<SVGGElement, T, SVGGElement, unknown>,\n shape: StringAccessor<T>,\n size: NumericAccessor<T>,\n index: number\n): void {\n if (selection.size() === 0) return\n\n const d: T = selection.datum()\n const nodeSize = getNodeSize(d, size, index)\n selection.filter('circle')\n .attr('r', nodeSize / 2)\n\n selection.filter('rect')\n .attr('width', nodeSize)\n .attr('height', nodeSize)\n .attr('x', -nodeSize / 2)\n .attr('y', -nodeSize / 2)\n\n selection.filter('path')\n .attr('d', () => {\n let n: number\n switch (getString(d, shape, index)) {\n case GraphNodeShape.Square:\n n = 4\n break\n case GraphNodeShape.Triangle:\n n = 3\n break\n case GraphNodeShape.Hexagon:\n default:\n n = 6\n }\n\n return polygon(nodeSize, n)\n })\n\n selection.filter('g')\n .filter(() => !isCustomXml(getString(d, shape, index) as GraphNodeShape))\n .html(getString(d, shape, index))\n\n selection.filter('g')\n .each((d, i, elements) => {\n const el = select(elements[i])\n const bBox = el.node().getBBox()\n el.attr('transform', `translate(${-bBox.width / 2},${-bBox.height / 2})`)\n })\n}\n"],"names":[],"mappings":";;;;;;AAiBM,SAAU,WAAW,CAAE,KAAqB,EAAA;AAChD,IAAA,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACtC,CAAC;AAEe,SAAA,WAAW,CACzB,SAA0D,EAC1D,aAAgC,EAChC,aAAqB,EACrB,mBAA2B,EAC3B,KAAc,EACd,cAAc,GAAG,aAAa,EAAA;IAE9B,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,KAAI;QAChC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACnC,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAmB,CAAA;AAElE,QAAA,IAAI,YAAY,CAAA;AAChB,QAAA,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;AAC3C,QAAA,IAAI,gBAAgB,EAAE;YACpB,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,cAAc,CAAC;iBAC/C,IAAI,CAAC,KAAK,CAAC,CAAA;AACf,SAAA;AAAM,aAAA;AACL,YAAA,QAAQ,KAAK;gBACX,KAAK,cAAc,CAAC,MAAM;oBACxB,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;AAClD,yBAAA,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AACb,yBAAA,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;oBAChB,MAAK;gBACP,KAAK,cAA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,QAAA,IAAI,CAAS,CAAA;QACb,QAAQ,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;YAChC,KAAK,cAAc,CAAC,MAAM;gBACxB,CAAC,GAAG,CAAC,CAAA;gBACL,MAAK;YACP,KAAK,cAAc,CAAC,QAAQ;gBAC1B,CAAC,GAAG,CAAC,CAAA;gBACL,MAAK;YACP,KAAK,cAAc,CAAC,OAAO,CAAC;AAC5B,YAAA;gBACE,CAAC,GAAG,CAAC,CAAA;AACR,SAAA;AAED,QAAA,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;AAEJ,IAAA,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;AAClB,SAAA,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAmB,CAAC,CAAC;SACxE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA;AAEnC,IAAA,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;SAClB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,KAAI;QACvB,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;QAChC,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAa,UAAA,EAAA,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA,CAAA,EAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAG,CAAA,CAAA,CAAC,CAAA;AAC3E,KAAC,CAAC,CAAA;AACN;;;;"}
1
+ {"version":3,"file":"shape.js","sources":["../../../../src/components/graph/modules/shape.ts"],"sourcesContent":["import { Selection, select } from 'd3-selection'\n\n// Types\nimport { NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Utils\nimport { polygon } from 'utils/path'\nimport { getString } from 'utils/data'\n\n// Types\n\n// Local Types\nimport { GraphNodeShape } from '../types'\n\n// Helpers\nimport { getNodeSize } from './node/helper'\n\nexport function isCustomXml (shape: GraphNodeShape): boolean {\n return /<[a-z][\\s\\S]*>/i.test(shape)\n}\n\nexport function appendShape<T> (\n selection: Selection<SVGGElement, T, SVGGElement, unknown>,\n shapeAccessor: StringAccessor<T>,\n shapeSelector: string,\n customShapeSelector: string,\n index?: number,\n insertSelector = ':last-child'\n): void {\n selection.each((d, i, elements) => {\n const element = select(elements[i])\n const shape = getString(d, shapeAccessor, index) as GraphNodeShape\n\n let shapeElement: Selection<SVGPathElement, unknown, null, undefined>\n | Selection<SVGRectElement, unknown, null, undefined>\n | Selection<SVGGElement, unknown, null, undefined>\n | Selection<SVGCircleElement, unknown, null, undefined>\n const isCustomXmlShape = isCustomXml(shape)\n if (isCustomXmlShape) {\n shapeElement = element.insert('g', insertSelector)\n .html(shape)\n } else {\n switch (shape) {\n case GraphNodeShape.Square:\n shapeElement = element.insert('rect', insertSelector)\n .attr('rx', 5)\n .attr('ry', 5)\n break\n case GraphNodeShape.Hexagon:\n case GraphNodeShape.Triangle:\n shapeElement = element.insert('path', insertSelector)\n break\n case GraphNodeShape.Circle:\n default:\n shapeElement = element.insert('circle', insertSelector)\n }\n }\n\n shapeElement.classed(customShapeSelector, isCustomXmlShape)\n return shapeElement.attr('class', shapeSelector)\n })\n}\n\nexport function updateShape<T> (\n selection: Selection<SVGGElement, T, SVGGElement, unknown>,\n shape: StringAccessor<T>,\n size: NumericAccessor<T>,\n index: number\n): void {\n if (selection.size() === 0) return\n\n const d: T = selection.datum()\n const nodeSize = getNodeSize(d, size, index)\n selection.filter('circle')\n .attr('r', nodeSize / 2)\n\n selection.filter('rect')\n .attr('width', nodeSize)\n .attr('height', nodeSize)\n .attr('x', -nodeSize / 2)\n .attr('y', -nodeSize / 2)\n\n selection.filter('path')\n .attr('d', () => {\n let n: number\n switch (getString(d, shape, index)) {\n case GraphNodeShape.Square:\n n = 4\n break\n case GraphNodeShape.Triangle:\n n = 3\n break\n case GraphNodeShape.Hexagon:\n default:\n n = 6\n }\n\n return polygon(nodeSize, n)\n })\n\n selection.filter('g')\n .filter(() => !isCustomXml(getString(d, shape, index) as GraphNodeShape))\n .html(getString(d, shape, index))\n\n selection.filter('g')\n .each((d, i, elements) => {\n const el = select(elements[i])\n const bBox = el.node().getBBox()\n el.attr('transform', `translate(${-bBox.width / 2},${-bBox.height / 2})`)\n })\n}\n"],"names":[],"mappings":";;;;;;AAiBM,SAAU,WAAW,CAAE,KAAqB,EAAA;AAChD,IAAA,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACtC,CAAC;AAEe,SAAA,WAAW,CACzB,SAA0D,EAC1D,aAAgC,EAChC,aAAqB,EACrB,mBAA2B,EAC3B,KAAc,EACd,cAAc,GAAG,aAAa,EAAA;IAE9B,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,KAAI;QAChC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACnC,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAmB,CAAA;AAElE,QAAA,IAAI,YAGmD,CAAA;AACvD,QAAA,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;AAC3C,QAAA,IAAI,gBAAgB,EAAE;YACpB,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,cAAc,CAAC;iBAC/C,IAAI,CAAC,KAAK,CAAC,CAAA;AACf,SAAA;AAAM,aAAA;AACL,YAAA,QAAQ,KAAK;gBACX,KAAK,cAAc,CAAC,MAAM;oBACxB,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;AAClD,yBAAA,IAAI,CAAC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;;;;"}
@@ -1,9 +1,7 @@
1
1
  import { XYComponentDefaultConfig } from '../../core/xy-component/config.js';
2
2
  import { Orientation } from '../../types/position.js';
3
3
 
4
- const GroupedBarDefaultConfig = Object.assign(Object.assign({}, XYComponentDefaultConfig), {
5
- // eslint-disable-next-line dot-notation
6
- color: (d) => d['color'], groupMaxWidth: undefined, groupWidth: undefined, dataStep: undefined, groupPadding: 0.05, barPadding: 0.0, roundedCorners: 2, barMinHeight: 2, cursor: null, orientation: Orientation.Vertical });
4
+ const GroupedBarDefaultConfig = Object.assign(Object.assign({}, XYComponentDefaultConfig), { color: undefined, groupMaxWidth: undefined, groupWidth: undefined, dataStep: undefined, groupPadding: 0.05, barPadding: 0.0, roundedCorners: 2, barMinHeight: 2, cursor: null, orientation: Orientation.Vertical });
7
5
 
8
6
  export { GroupedBarDefaultConfig };
9
7
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/grouped-bar/config.ts"],"sourcesContent":["import { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\n\n// Types\nimport { ColorAccessor, StringAccessor } from 'types/accessor'\nimport { Orientation } from 'types/position'\n\nexport interface GroupedBarConfigInterface<Datum> extends XYComponentConfigInterface<Datum> {\n /** Bar color accessor function. Default: `d => d.color` */\n color?: ColorAccessor<Datum>;\n /** Force set the group width in pixels. Default: `undefined` */\n groupWidth?: number;\n /** Maximum group width for dynamic sizing. Limits the groupWidth property from the top. Default: `undefined` */\n groupMaxWidth?: number;\n /** Expected step between the bar groups in the X axis units.\n * Needed to correctly calculate the width of the bar groups when there are gaps in the data.\n * Default: `undefined` */\n dataStep?: number;\n /** Fractional padding between the groups in the range of [0,1). Default: `0.05` */\n groupPadding?: number;\n /** Fractional padding between the bars in the range of [0,1). Default: `0` */\n barPadding?: number;\n /** Rounded bar corners. Boolean or number (to set the radius in pixels explicitly). Default: `2` */\n roundedCorners?: number | boolean;\n /** Sets the minimum bar height for better visibility of small values. Default: `1` */\n barMinHeight?: number;\n /** Configurable bar cursor when hovering over. Default: `null` */\n cursor?: StringAccessor<Datum>;\n /** Chart orientation: `Orientation.Vertical` or `Orientation.Horizontal`. Default `Orientation.Vertical` */\n orientation?: Orientation | string;\n}\n\nexport const GroupedBarDefaultConfig: GroupedBarConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n // eslint-disable-next-line dot-notation\n color: (d: unknown): string => d['color'],\n groupMaxWidth: undefined,\n groupWidth: undefined,\n dataStep: undefined,\n groupPadding: 0.05,\n barPadding: 0.0,\n roundedCorners: 2,\n barMinHeight: 2,\n cursor: null,\n orientation: Orientation.Vertical,\n}\n"],"names":[],"mappings":";;;AA+BO,MAAM,uBAAuB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC/B,wBAAwB,CAAA,EAAA;;IAE3B,KAAK,EAAE,CAAC,CAAU,KAAa,CAAC,CAAC,OAAO,CAAC,EACzC,aAAa,EAAE,SAAS,EACxB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,SAAS,EACnB,YAAY,EAAE,IAAI,EAClB,UAAU,EAAE,GAAG,EACf,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,CAAC,EACf,MAAM,EAAE,IAAI,EACZ,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAA;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/grouped-bar/config.ts"],"sourcesContent":["import { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\n\n// Types\nimport { ColorAccessor, StringAccessor } from 'types/accessor'\nimport { Orientation } from 'types/position'\n\nexport interface GroupedBarConfigInterface<Datum> extends XYComponentConfigInterface<Datum> {\n /** Bar color accessor function. Default: `d => d.color` */\n color?: ColorAccessor<Datum>;\n /** Force set the group width in pixels. Default: `undefined` */\n groupWidth?: number;\n /** Maximum group width for dynamic sizing. Limits the groupWidth property from the top. Default: `undefined` */\n groupMaxWidth?: number;\n /** Expected step between the bar groups in the X axis units.\n * Needed to correctly calculate the width of the bar groups when there are gaps in the data.\n * Default: `undefined` */\n dataStep?: number;\n /** Fractional padding between the groups in the range of [0,1). Default: `0.05` */\n groupPadding?: number;\n /** Fractional padding between the bars in the range of [0,1). Default: `0` */\n barPadding?: number;\n /** Rounded bar corners. Boolean or number (to set the radius in pixels explicitly). Default: `2` */\n roundedCorners?: number | boolean;\n /** Sets the minimum bar height for better visibility of small values. Default: `1` */\n barMinHeight?: number;\n /** Configurable bar cursor when hovering over. Default: `null` */\n cursor?: StringAccessor<Datum>;\n /** Chart orientation: `Orientation.Vertical` or `Orientation.Horizontal`. Default `Orientation.Vertical` */\n orientation?: Orientation | string;\n}\n\nexport const GroupedBarDefaultConfig: GroupedBarConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n color: undefined,\n groupMaxWidth: undefined,\n groupWidth: undefined,\n dataStep: undefined,\n groupPadding: 0.05,\n barPadding: 0.0,\n roundedCorners: 2,\n barMinHeight: 2,\n cursor: null,\n orientation: Orientation.Vertical,\n}\n"],"names":[],"mappings":";;;MA+Ba,uBAAuB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC/B,wBAAwB,CAC3B,EAAA,EAAA,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,SAAS,EACxB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,SAAS,EACnB,YAAY,EAAE,IAAI,EAClB,UAAU,EAAE,GAAG,EACf,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,CAAC,EACf,MAAM,EAAE,IAAI,EACZ,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAA;;;;"}
@@ -9,11 +9,7 @@ export declare class GroupedBar<Datum> extends XYComponentCore<Datum, GroupedBar
9
9
  protected _defaultConfig: GroupedBarConfigInterface<Datum>;
10
10
  config: GroupedBarConfigInterface<Datum>;
11
11
  getAccessors: () => NumericAccessor<Datum>[];
12
- events: {
13
- [x: string]: {
14
- mouseover: (d: any, i: any, els: any) => void;
15
- };
16
- };
12
+ protected events: {};
17
13
  private _barData;
18
14
  constructor(config?: GroupedBarConfigInterface<Datum>);
19
15
  get bleed(): Spacing;
@@ -26,7 +22,6 @@ export declare class GroupedBar<Datum> extends XYComponentCore<Datum, GroupedBar
26
22
  _getBarPath(x: number, y: number, width: number, height: number, isNegative: boolean, direction: Direction.North | Direction.South): string;
27
23
  _getGroupWidth(): number;
28
24
  getValueScaleExtent(scaleByVisibleData: boolean): number[];
29
- _raiseSelection(d: any, i: any, els: any): void;
30
25
  getDataScaleExtent(): number[];
31
26
  getYDataExtent(scaleByVisibleData: boolean): number[];
32
27
  getXDataExtent(): number[];
@@ -1,6 +1,5 @@
1
1
  import { scaleBand } from 'd3-scale';
2
2
  import { min, max, range } from 'd3-array';
3
- import { select } from 'd3';
4
3
  import { XYComponentCore } from '../../core/xy-component/index.js';
5
4
  import { isArray, getNumber, isNumber, getString, clamp, isEmpty, getMin, getMax, getExtent } from '../../utils/data.js';
6
5
  import { roundedRectPath } from '../../utils/path.js';
@@ -18,14 +17,7 @@ class GroupedBar extends XYComponentCore {
18
17
  this._defaultConfig = GroupedBarDefaultConfig;
19
18
  this.config = this._defaultConfig;
20
19
  this.getAccessors = () => isArray(this.config.y) ? this.config.y : [this.config.y];
21
- this.events = {
22
- [GroupedBar.selectors.barGroup]: {
23
- mouseover: this._raiseSelection,
24
- },
25
- [GroupedBar.selectors.bar]: {
26
- mouseover: this._raiseSelection,
27
- },
28
- };
20
+ this.events = {};
29
21
  this._barData = [];
30
22
  if (config)
31
23
  this.setConfig(config);
@@ -226,9 +218,6 @@ class GroupedBar extends XYComponentCore {
226
218
  const max = getMax(data, ...yAccessors);
227
219
  return [min > 0 ? 0 : min, max < 0 ? 0 : max];
228
220
  }
229
- _raiseSelection(d, i, els) {
230
- select(els[i]).raise();
231
- }
232
221
  getDataScaleExtent() {
233
222
  const { config, datamodel } = this;
234
223
  return getExtent(datamodel.data, config.x);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/grouped-bar/index.ts"],"sourcesContent":["import { scaleBand } from 'd3-scale'\nimport { min, max, range } from 'd3-array'\nimport { select } from 'd3'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\n\n// Utils\nimport { clamp, getExtent, getMax, getMin, getNumber, getString, isArray, isEmpty, isNumber } from 'utils/data'\nimport { roundedRectPath } from 'utils/path'\nimport { smartTransition } from 'utils/d3'\nimport { getColor } from 'utils/color'\n\n// Types\nimport { NumericAccessor } from 'types/accessor'\nimport { Spacing } from 'types/spacing'\nimport { Direction } from 'types/direction'\nimport { Orientation } from 'types/position'\nimport { ContinuousScale } from 'types/scale'\n\n// Config\nimport { GroupedBarDefaultConfig, GroupedBarConfigInterface } from './config'\n\n// Styles\nimport * as s from './style'\n\nexport class GroupedBar<Datum> extends XYComponentCore<Datum, GroupedBarConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig = GroupedBarDefaultConfig as GroupedBarConfigInterface<Datum>\n public config: GroupedBarConfigInterface<Datum> = this._defaultConfig\n\n getAccessors = (): NumericAccessor<Datum>[] =>\n isArray(this.config.y) ? this.config.y : [this.config.y]\n\n events = {\n [GroupedBar.selectors.barGroup]: {\n mouseover: this._raiseSelection,\n },\n [GroupedBar.selectors.bar]: {\n mouseover: this._raiseSelection,\n },\n }\n\n private _barData: Datum[] = []\n\n constructor (config?: GroupedBarConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n }\n\n get bleed (): Spacing {\n this._barData = this._getVisibleData()\n if (this._barData.length === 0) return { top: 0, bottom: 0, left: 0, right: 0 }\n\n // By default, horizontal orientation is \"flipped\", i.e. the `yDirection` of `XYContainer` is set to `Direction.North`\n const isHorizontalAndFlipped = !this.isVertical() && (this.dataScale.range()[0] > this.dataScale.range()[1])\n const dataDomain = this.dataScale.domain()\n const halfGroupWidth = this._getGroupWidth() / 2\n\n const dataScaleValues = this._barData.map((d, i) => getNumber(d, this.config.x, i))\n const firstDataValue = min(dataScaleValues)\n const lastDataValue = max(dataScaleValues)\n const firstValuePx = this.dataScale(firstDataValue)\n const lastValuePx = this.dataScale(lastDataValue)\n\n const dataDomainRequiredStart = this.dataScale.invert(firstValuePx + (isHorizontalAndFlipped ? halfGroupWidth : -halfGroupWidth))\n const dataDomainRequiredEnd = this.dataScale.invert(lastValuePx + (isHorizontalAndFlipped ? -halfGroupWidth : halfGroupWidth))\n const bleedPxStart = dataDomainRequiredStart <= dataDomain[0] ? this.dataScale(dataDomain[0]) - this.dataScale(dataDomainRequiredStart) : 0\n const bleedPxEnd = dataDomainRequiredEnd > dataDomain[1] ? this.dataScale(dataDomainRequiredEnd) - this.dataScale(dataDomain[1]) : 0\n\n return {\n top: this.isVertical() ? 0 : (isHorizontalAndFlipped ? -bleedPxEnd : bleedPxStart),\n bottom: this.isVertical() ? 0 : (isHorizontalAndFlipped ? -bleedPxStart : bleedPxEnd),\n left: this.isVertical() ? bleedPxStart : 0,\n right: this.isVertical() ? bleedPxEnd : 0,\n }\n }\n\n private get dataScale (): ContinuousScale {\n return this.isVertical() ? this.xScale : this.yScale\n }\n\n private get valueScale (): ContinuousScale {\n return this.isVertical() ? this.yScale : this.xScale\n }\n\n private isVertical (): boolean {\n return this.config.orientation === Orientation.Vertical\n }\n\n _render (customDuration?: number): void {\n const { config } = this\n const duration = isNumber(customDuration)\n ? customDuration\n : config.duration\n const groupWidth = this._getGroupWidth()\n\n const yAccessors = this.getAccessors()\n const innerBandScaleRange = [-groupWidth / 2, groupWidth / 2] as [\n number,\n number,\n ]\n const innerBandScale = scaleBand<number>()\n .domain(range(yAccessors.length))\n .range(innerBandScaleRange)\n .paddingInner(config.barPadding)\n .paddingOuter(config.barPadding)\n\n const barGroups = this.g\n .selectAll<SVGGElement, Datum>(`.${s.barGroup}`)\n .data(this._barData, (d, i) => `${getString(d, config.id, i) ?? i}`)\n\n const getBarGroupsTransform = (d: Datum, i: number): string => {\n const v = this.dataScale(getNumber(d, config.x, i))\n const x = this.isVertical() ? v : 0\n const y = this.isVertical() ? 0 : v\n return `translate(${x},${y})`\n }\n\n const barGroupsEnter = barGroups\n .enter()\n .append('g')\n .attr('class', s.barGroup)\n .attr('transform', getBarGroupsTransform)\n .style('opacity', 1)\n\n const barGroupsMerged = barGroupsEnter.merge(barGroups)\n smartTransition(barGroupsMerged, duration)\n .attr('transform', getBarGroupsTransform)\n .style('opacity', 1)\n\n const barGroupExit = barGroups.exit().attr('class', s.barGroupExit)\n smartTransition(barGroupExit, duration).style('opacity', 0).remove()\n\n // Animate exiting bars going down\n smartTransition(barGroupExit.selectAll<SVGPathElement, Datum>(`.${s.bar}`), duration)\n .attr('transform', (d, i, e) => {\n return this.isVertical()\n ? `translate(0,${this.yScale(0)}) scale(1,0)`\n : `translate(${this.xScale(0)},0) scale(0,1)`\n })\n\n const barWidth = innerBandScale.bandwidth()\n const bars = barGroupsMerged\n .selectAll<SVGPathElement, Datum>(`.${s.bar}`)\n .data((d) => yAccessors.map(() => d))\n\n const valueAxisDirection = this._getValueAxisDirection()\n const barsEnter = bars\n .enter()\n .append('path')\n .attr('class', s.bar)\n .attr('d', (d, i) => {\n const x = innerBandScale(i)\n const y = this.valueScale(0)\n const width = barWidth\n const height = 0\n return this._getBarPath(x, y, width, height, false, valueAxisDirection)\n })\n .style('fill', (d, i) => getColor(d, config.color, i))\n\n const barsMerged = barsEnter.merge(bars)\n smartTransition(barsMerged, duration)\n .attr('d', (d, j) => {\n const x = innerBandScale(j)\n const width = barWidth\n\n // Todo: Find a way to pass the datum index to `getNumber` below\n const value = getNumber(d, yAccessors[j])\n const isNegative = value < 0\n let y = isNegative ? this.valueScale(0) : this.valueScale(value || 0)\n let height = Math.abs(this.valueScale(0) - this.valueScale(value)) || 0\n\n // Optionally set minimum bar height\n if (height < config.barMinHeight) {\n const dir = valueAxisDirection === Direction.North ? -1 : 1\n y = this.valueScale(0) + dir * config.barMinHeight\n height = config.barMinHeight\n }\n return this._getBarPath(x, y, width, height, isNegative, valueAxisDirection)\n })\n .style('fill', (d, i) => getColor(d, config.color, i))\n .style('cursor', (d, i) => getString(d, config.cursor, i))\n\n smartTransition(bars.exit(), duration).remove()\n }\n\n _getValueAxisDirection (): Direction.North | Direction.South {\n return this.valueScale.range()[0] > this.valueScale.range()[1]\n ? Direction.North\n : Direction.South\n }\n\n _getVisibleData (): Datum[] {\n const {\n config,\n datamodel: { data },\n } = this\n const groupWidth = this._getGroupWidth()\n const halfGroupWidth = data.length < 2 ? 0 : groupWidth / 2\n\n const dataScale = this.dataScale\n const xHalfGroupWidth = Math.abs(\n (dataScale.invert(halfGroupWidth) as number) -\n (dataScale.invert(0) as number)\n )\n const filtered = data?.filter((d, i) => {\n const v = getNumber(d, config.x, i)\n const domain: number[] | Date[] = dataScale.domain()\n const domainMin = +domain[0]\n const domainMax = +domain[1]\n return (\n v >= domainMin - xHalfGroupWidth && v <= domainMax + xHalfGroupWidth\n )\n })\n\n return filtered\n }\n\n _getBarPath (\n x: number,\n y: number,\n width: number,\n height: number,\n isNegative: boolean,\n direction: Direction.North | Direction.South\n ): string {\n const { config } = this\n\n const cornerRadius = config.roundedCorners\n ? isNumber(config.roundedCorners)\n ? +config.roundedCorners\n : width / 2\n : 0\n const cornerRadiusClamped = clamp(\n cornerRadius,\n 0,\n Math.min(height, width) / 2\n )\n\n const isNorthDirected = direction === Direction.North\n const roundedTop = this.isVertical() && isNegative !== isNorthDirected\n const roundedBottom = this.isVertical() && isNegative === isNorthDirected\n const roundedLeft = !this.isVertical() && isNegative\n const roundedRight = !this.isVertical() && !isNegative\n\n return roundedRectPath({\n x: this.isVertical() ? x : y + (isNorthDirected ? 0 : -height),\n y: this.isVertical() ? y + (isNorthDirected ? 0 : -height) : x,\n w: this.isVertical() ? width : height,\n h: this.isVertical() ? height : width,\n tl: roundedTop || roundedLeft,\n tr: roundedTop || roundedRight,\n bl: roundedBottom || roundedLeft,\n br: roundedBottom || roundedRight,\n r: cornerRadiusClamped,\n })\n }\n\n _getGroupWidth (): number {\n const {\n config,\n datamodel: { data },\n } = this\n if (isEmpty(data)) return 0\n if (config.groupWidth) { return min([config.groupWidth, config.groupMaxWidth]) }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const isOrdinal = this.dataScale.bandwidth\n const domain = (\n this.dataScale.domain ? this.dataScale.domain() : []\n ) as number[]\n const domainLength = isOrdinal ? domain.length : domain[1] - domain[0]\n\n // If the dataStep property is provided the amount of data elements is calculates as domainLength / dataStep\n // otherwise we get the number of data elements within the domain range\n // Or if the scale is ordinal we use data.length\n let dataSize =\n 1 + domainLength / config.dataStep ||\n (!isOrdinal &&\n data.filter((d, i) => {\n const value = getNumber(d, config.x, i)\n return value >= domain[0] && value <= domain[1]\n }).length) ||\n data.length\n\n // We increase the dataSize by 1 to take into account possible additional domain space\n if (!isOrdinal && dataSize >= 2) dataSize += 1\n\n const c = dataSize < 2 ? 1 : 1 - config.groupPadding\n const groupWidth =\n (c * (this.isVertical() ? this._width : this._height)) / dataSize\n return min([groupWidth, config.groupMaxWidth])\n }\n\n getValueScaleExtent (scaleByVisibleData: boolean): number[] {\n const { datamodel } = this\n const yAccessors = this.getAccessors()\n\n const data = scaleByVisibleData ? this._getVisibleData() : datamodel.data\n const min = getMin(data, ...yAccessors)\n const max = getMax(data, ...yAccessors)\n return [min > 0 ? 0 : min, max < 0 ? 0 : max]\n }\n\n _raiseSelection (d, i, els): void {\n select(els[i]).raise()\n }\n\n getDataScaleExtent (): number[] {\n const { config, datamodel } = this\n return getExtent(datamodel.data, config.x)\n }\n\n getYDataExtent (scaleByVisibleData: boolean): number[] {\n return this.isVertical()\n ? this.getValueScaleExtent(scaleByVisibleData)\n : this.getDataScaleExtent()\n }\n\n getXDataExtent (): number[] {\n return this.isVertical()\n ? this.getDataScaleExtent()\n : this.getValueScaleExtent(false)\n }\n}\n"],"names":["s.barGroup","barGroupExit","s.barGroupExit","s.bar","s"],"mappings":";;;;;;;;;;;;;;AA0BM,MAAO,U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,IAAI,CAAC,UAAU,EAAE;AACtB,cAAE,IAAI,CAAC,kBAAkB,EAAE;AAC3B,cAAE,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;KACpC;;AA1SM,UAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/grouped-bar/index.ts"],"sourcesContent":["import { scaleBand } from 'd3-scale'\nimport { min, max, range } from 'd3-array'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\n\n// Utils\nimport { clamp, getExtent, getMax, getMin, getNumber, getString, isArray, isEmpty, isNumber } from 'utils/data'\nimport { roundedRectPath } from 'utils/path'\nimport { smartTransition } from 'utils/d3'\nimport { getColor } from 'utils/color'\n\n// Types\nimport { NumericAccessor } from 'types/accessor'\nimport { Spacing } from 'types/spacing'\nimport { Direction } from 'types/direction'\nimport { Orientation } from 'types/position'\nimport { ContinuousScale } from 'types/scale'\n\n// Config\nimport { GroupedBarDefaultConfig, GroupedBarConfigInterface } from './config'\n\n// Styles\nimport * as s from './style'\n\nexport class GroupedBar<Datum> extends XYComponentCore<Datum, GroupedBarConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig = GroupedBarDefaultConfig as GroupedBarConfigInterface<Datum>\n public config: GroupedBarConfigInterface<Datum> = this._defaultConfig\n\n getAccessors = (): NumericAccessor<Datum>[] =>\n isArray(this.config.y) ? this.config.y : [this.config.y]\n\n protected events = {\n }\n\n private _barData: Datum[] = []\n\n constructor (config?: GroupedBarConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n }\n\n get bleed (): Spacing {\n this._barData = this._getVisibleData()\n if (this._barData.length === 0) return { top: 0, bottom: 0, left: 0, right: 0 }\n\n // By default, horizontal orientation is \"flipped\", i.e. the `yDirection` of `XYContainer` is set to `Direction.North`\n const isHorizontalAndFlipped = !this.isVertical() && (this.dataScale.range()[0] > this.dataScale.range()[1])\n const dataDomain = this.dataScale.domain()\n const halfGroupWidth = this._getGroupWidth() / 2\n\n const dataScaleValues = this._barData.map((d, i) => getNumber(d, this.config.x, i))\n const firstDataValue = min(dataScaleValues)\n const lastDataValue = max(dataScaleValues)\n const firstValuePx = this.dataScale(firstDataValue)\n const lastValuePx = this.dataScale(lastDataValue)\n\n const dataDomainRequiredStart = this.dataScale.invert(firstValuePx + (isHorizontalAndFlipped ? halfGroupWidth : -halfGroupWidth))\n const dataDomainRequiredEnd = this.dataScale.invert(lastValuePx + (isHorizontalAndFlipped ? -halfGroupWidth : halfGroupWidth))\n const bleedPxStart = dataDomainRequiredStart <= dataDomain[0] ? this.dataScale(dataDomain[0]) - this.dataScale(dataDomainRequiredStart) : 0\n const bleedPxEnd = dataDomainRequiredEnd > dataDomain[1] ? this.dataScale(dataDomainRequiredEnd) - this.dataScale(dataDomain[1]) : 0\n\n return {\n top: this.isVertical() ? 0 : (isHorizontalAndFlipped ? -bleedPxEnd : bleedPxStart),\n bottom: this.isVertical() ? 0 : (isHorizontalAndFlipped ? -bleedPxStart : bleedPxEnd),\n left: this.isVertical() ? bleedPxStart : 0,\n right: this.isVertical() ? bleedPxEnd : 0,\n }\n }\n\n private get dataScale (): ContinuousScale {\n return this.isVertical() ? this.xScale : this.yScale\n }\n\n private get valueScale (): ContinuousScale {\n return this.isVertical() ? this.yScale : this.xScale\n }\n\n private isVertical (): boolean {\n return this.config.orientation === Orientation.Vertical\n }\n\n _render (customDuration?: number): void {\n const { config } = this\n const duration = isNumber(customDuration)\n ? customDuration\n : config.duration\n const groupWidth = this._getGroupWidth()\n\n const yAccessors = this.getAccessors()\n const innerBandScaleRange = [-groupWidth / 2, groupWidth / 2] as [\n number,\n number,\n ]\n const innerBandScale = scaleBand<number>()\n .domain(range(yAccessors.length))\n .range(innerBandScaleRange)\n .paddingInner(config.barPadding)\n .paddingOuter(config.barPadding)\n\n const barGroups = this.g\n .selectAll<SVGGElement, Datum>(`.${s.barGroup}`)\n .data(this._barData, (d, i) => `${getString(d, config.id, i) ?? i}`)\n\n const getBarGroupsTransform = (d: Datum, i: number): string => {\n const v = this.dataScale(getNumber(d, config.x, i))\n const x = this.isVertical() ? v : 0\n const y = this.isVertical() ? 0 : v\n return `translate(${x},${y})`\n }\n\n const barGroupsEnter = barGroups\n .enter()\n .append('g')\n .attr('class', s.barGroup)\n .attr('transform', getBarGroupsTransform)\n .style('opacity', 1)\n\n const barGroupsMerged = barGroupsEnter.merge(barGroups)\n smartTransition(barGroupsMerged, duration)\n .attr('transform', getBarGroupsTransform)\n .style('opacity', 1)\n\n const barGroupExit = barGroups.exit().attr('class', s.barGroupExit)\n smartTransition(barGroupExit, duration).style('opacity', 0).remove()\n\n // Animate exiting bars going down\n smartTransition(barGroupExit.selectAll<SVGPathElement, Datum>(`.${s.bar}`), duration)\n .attr('transform', (d, i, e) => {\n return this.isVertical()\n ? `translate(0,${this.yScale(0)}) scale(1,0)`\n : `translate(${this.xScale(0)},0) scale(0,1)`\n })\n\n const barWidth = innerBandScale.bandwidth()\n const bars = barGroupsMerged\n .selectAll<SVGPathElement, Datum>(`.${s.bar}`)\n .data((d) => yAccessors.map(() => d))\n\n const valueAxisDirection = this._getValueAxisDirection()\n const barsEnter = bars\n .enter()\n .append('path')\n .attr('class', s.bar)\n .attr('d', (d, i) => {\n const x = innerBandScale(i)\n const y = this.valueScale(0)\n const width = barWidth\n const height = 0\n return this._getBarPath(x, y, width, height, false, valueAxisDirection)\n })\n .style('fill', (d, i) => getColor(d, config.color, i))\n\n const barsMerged = barsEnter.merge(bars)\n smartTransition(barsMerged, duration)\n .attr('d', (d, j) => {\n const x = innerBandScale(j)\n const width = barWidth\n\n // Todo: Find a way to pass the datum index to `getNumber` below\n const value = getNumber(d, yAccessors[j])\n const isNegative = value < 0\n let y = isNegative ? this.valueScale(0) : this.valueScale(value || 0)\n let height = Math.abs(this.valueScale(0) - this.valueScale(value)) || 0\n\n // Optionally set minimum bar height\n if (height < config.barMinHeight) {\n const dir = valueAxisDirection === Direction.North ? -1 : 1\n y = this.valueScale(0) + dir * config.barMinHeight\n height = config.barMinHeight\n }\n return this._getBarPath(x, y, width, height, isNegative, valueAxisDirection)\n })\n .style('fill', (d, i) => getColor(d, config.color, i))\n .style('cursor', (d, i) => getString(d, config.cursor, i))\n\n smartTransition(bars.exit(), duration).remove()\n }\n\n _getValueAxisDirection (): Direction.North | Direction.South {\n return this.valueScale.range()[0] > this.valueScale.range()[1]\n ? Direction.North\n : Direction.South\n }\n\n _getVisibleData (): Datum[] {\n const {\n config,\n datamodel: { data },\n } = this\n const groupWidth = this._getGroupWidth()\n const halfGroupWidth = data.length < 2 ? 0 : groupWidth / 2\n\n const dataScale = this.dataScale\n const xHalfGroupWidth = Math.abs(\n (dataScale.invert(halfGroupWidth) as number) -\n (dataScale.invert(0) as number)\n )\n const filtered = data?.filter((d, i) => {\n const v = getNumber(d, config.x, i)\n const domain: number[] | Date[] = dataScale.domain()\n const domainMin = +domain[0]\n const domainMax = +domain[1]\n return (\n v >= domainMin - xHalfGroupWidth && v <= domainMax + xHalfGroupWidth\n )\n })\n\n return filtered\n }\n\n _getBarPath (\n x: number,\n y: number,\n width: number,\n height: number,\n isNegative: boolean,\n direction: Direction.North | Direction.South\n ): string {\n const { config } = this\n\n const cornerRadius = config.roundedCorners\n ? isNumber(config.roundedCorners)\n ? +config.roundedCorners\n : width / 2\n : 0\n const cornerRadiusClamped = clamp(\n cornerRadius,\n 0,\n Math.min(height, width) / 2\n )\n\n const isNorthDirected = direction === Direction.North\n const roundedTop = this.isVertical() && isNegative !== isNorthDirected\n const roundedBottom = this.isVertical() && isNegative === isNorthDirected\n const roundedLeft = !this.isVertical() && isNegative\n const roundedRight = !this.isVertical() && !isNegative\n\n return roundedRectPath({\n x: this.isVertical() ? x : y + (isNorthDirected ? 0 : -height),\n y: this.isVertical() ? y + (isNorthDirected ? 0 : -height) : x,\n w: this.isVertical() ? width : height,\n h: this.isVertical() ? height : width,\n tl: roundedTop || roundedLeft,\n tr: roundedTop || roundedRight,\n bl: roundedBottom || roundedLeft,\n br: roundedBottom || roundedRight,\n r: cornerRadiusClamped,\n })\n }\n\n _getGroupWidth (): number {\n const {\n config,\n datamodel: { data },\n } = this\n if (isEmpty(data)) return 0\n if (config.groupWidth) { return min([config.groupWidth, config.groupMaxWidth]) }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const isOrdinal = this.dataScale.bandwidth\n const domain = (\n this.dataScale.domain ? this.dataScale.domain() : []\n ) as number[]\n const domainLength = isOrdinal ? domain.length : domain[1] - domain[0]\n\n // If the dataStep property is provided the amount of data elements is calculates as domainLength / dataStep\n // otherwise we get the number of data elements within the domain range\n // Or if the scale is ordinal we use data.length\n let dataSize =\n 1 + domainLength / config.dataStep ||\n (!isOrdinal &&\n data.filter((d, i) => {\n const value = getNumber(d, config.x, i)\n return value >= domain[0] && value <= domain[1]\n }).length) ||\n data.length\n\n // We increase the dataSize by 1 to take into account possible additional domain space\n if (!isOrdinal && dataSize >= 2) dataSize += 1\n\n const c = dataSize < 2 ? 1 : 1 - config.groupPadding\n const groupWidth =\n (c * (this.isVertical() ? this._width : this._height)) / dataSize\n return min([groupWidth, config.groupMaxWidth])\n }\n\n getValueScaleExtent (scaleByVisibleData: boolean): number[] {\n const { datamodel } = this\n const yAccessors = this.getAccessors()\n\n const data = scaleByVisibleData ? this._getVisibleData() : datamodel.data\n const min = getMin(data, ...yAccessors)\n const max = getMax(data, ...yAccessors)\n return [min > 0 ? 0 : min, max < 0 ? 0 : max]\n }\n\n\n getDataScaleExtent (): number[] {\n const { config, datamodel } = this\n return getExtent(datamodel.data, config.x)\n }\n\n getYDataExtent (scaleByVisibleData: boolean): number[] {\n return this.isVertical()\n ? this.getValueScaleExtent(scaleByVisibleData)\n : this.getDataScaleExtent()\n }\n\n getXDataExtent (): number[] {\n return this.isVertical()\n ? this.getDataScaleExtent()\n : this.getValueScaleExtent(false)\n }\n}\n"],"names":["s.barGroup","barGroupExit","s.barGroupExit","s.bar","s"],"mappings":";;;;;;;;;;;;;AAy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mB,CAAE,kBAA2B,EAAA;AAC9C,QAAA,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;AAC1B,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,CAAA;AAEtC,QAAA,MAAM,IAAI,GAAG,kBAAkB,GAAG,IAAI,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC,IAAI,CAAA;QACzE,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,CAAC,CAAA;QACvC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,CAAC,CAAA;QACvC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;KAC9C;IAGD,kBAAkB,GAAA;AAChB,QAAA,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;QAClC,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KAC3C;AAED,IAAA,cAAc,CAAE,kBAA2B,EAAA;QACzC,OAAO,IAAI,CAAC,UAAU,EAAE;AACtB,cAAE,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAAC;AAC9C,cAAE,IAAI,CAAC,kBAAkB,EAAE,CAAA;KAC9B;IAED,cAAc,GAAA;QACZ,OAAO,IAAI,CAAC,UAAU,EAAE;AACtB,cAAE,IAAI,CAAC,kBAAkB,EAAE;AAC3B,cAAE,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;KACpC;;AAjSM,UAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { LeafletMapDefaultConfig } from '../leaflet-map/config.js';
2
2
 
3
3
  /* eslint-disable dot-notation */
4
- const LeafletFlowMapDefaultConfig = Object.assign(Object.assign({}, LeafletMapDefaultConfig), { sourceLongitude: (f) => f['sourceLongitude'], sourceLatitude: (f) => f['sourceLatitude'], targetLongitude: (f) => f['targetLongitude'], targetLatitude: (f) => f['targetLatitude'], sourcePointRadius: 3, sourcePointColor: '#88919f', flowParticleColor: '#949dad', flowParticleRadius: 1.1, flowParticleSpeed: 0.07, flowParticleDensity: 0.6, onSourcePointClick: undefined, onSourcePointMouseEnter: undefined, onSourcePointMouseLeave: undefined });
4
+ const LeafletFlowMapDefaultConfig = Object.assign(Object.assign({}, LeafletMapDefaultConfig), { sourceLongitude: (f) => f.sourceLongitude, sourceLatitude: (f) => f.sourceLatitude, targetLongitude: (f) => f.targetLongitude, targetLatitude: (f) => f.targetLatitude, sourcePointRadius: 3, sourcePointColor: '#88919f', flowParticleColor: '#949dad', flowParticleRadius: 1.1, flowParticleSpeed: 0.07, flowParticleDensity: 0.6, onSourcePointClick: undefined, onSourcePointMouseEnter: undefined, onSourcePointMouseLeave: undefined });
5
5
 
6
6
  export { LeafletFlowMapDefaultConfig };
7
7
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/leaflet-flow-map/config.ts"],"sourcesContent":["/* eslint-disable dot-notation */\n\n// Config\nimport { LeafletMapDefaultConfig, LeafletMapConfigInterface } from 'components/leaflet-map/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor } from 'types/accessor'\nimport { GenericDataRecord } from 'types/data'\n\nexport interface LeafletFlowMapConfigInterface<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> extends LeafletMapConfigInterface<PointDatum> {\n /** Flow source point longitude accessor function or value. Default:.`f => f.sourceLongitude` */\n sourceLongitude?: NumericAccessor<FlowDatum>;\n /** Flow source point latitude accessor function or value. Default: `f => f.sourceLatitude` */\n sourceLatitude?: NumericAccessor<FlowDatum>;\n /** Flow target point longitude accessor function or value. Default: `f => f.targetLongitude` */\n targetLongitude?: NumericAccessor<FlowDatum>;\n /** Flow target point latitude accessor function or value. Default: `f => f.targetLatitude` */\n targetLatitude?: NumericAccessor<FlowDatum>;\n /** Flow source point radius accessor function or value. Default: `3` */\n sourcePointRadius?: NumericAccessor<FlowDatum>;\n /** Source point color accessor function or value. Default: `'#88919f'` */\n sourcePointColor?: ColorAccessor<FlowDatum>;\n /** Flow particle color accessor function or value. Default: `'#949dad'` */\n flowParticleColor?: ColorAccessor<FlowDatum>;\n /** Flow particle radius accessor function or value. Default: `1.1` */\n flowParticleRadius?: NumericAccessor<FlowDatum>;\n /** Flow particle speed accessor function or value. The unit is arbitrary, recommended range is 0 – 0.2. Default: `0.07` */\n flowParticleSpeed?: NumericAccessor<FlowDatum>;\n /** Flow particle density accessor function or value on the range of [0, 1]. Default: `0.6` */\n flowParticleDensity?: NumericAccessor<FlowDatum>;\n\n // Events\n /** Flow source point click callback function. Default: `undefined` */\n onSourcePointClick?: (f: FlowDatum, x: number, y: number, event: MouseEvent) => void;\n /** Flow source point mouse over callback function. Default: `undefined` */\n onSourcePointMouseEnter?: (f: FlowDatum, x: number, y: number, event: MouseEvent) => void;\n /** Flow source point mouse leave callback function. Default: `undefined` */\n onSourcePointMouseLeave?: (f: FlowDatum, event: MouseEvent) => void;\n}\n\nexport const LeafletFlowMapDefaultConfig: LeafletFlowMapConfigInterface<GenericDataRecord, GenericDataRecord> = {\n ...LeafletMapDefaultConfig,\n sourceLongitude: <FlowDatum>(f: FlowDatum): number => f['sourceLongitude'] as number,\n sourceLatitude: <FlowDatum>(f: FlowDatum): number => f['sourceLatitude'] as number,\n targetLongitude: <FlowDatum>(f: FlowDatum): number => f['targetLongitude'] as number,\n targetLatitude: <FlowDatum>(f: FlowDatum): number => f['targetLatitude'] as number,\n sourcePointRadius: 3,\n sourcePointColor: '#88919f',\n flowParticleColor: '#949dad',\n flowParticleRadius: 1.1,\n flowParticleSpeed: 0.07,\n flowParticleDensity: 0.6,\n onSourcePointClick: undefined,\n onSourcePointMouseEnter: undefined,\n onSourcePointMouseLeave: undefined,\n}\n"],"names":[],"mappings":";;AAAA;AAwCa,MAAA,2BAA2B,mCACnC,uBAAuB,CAAA,EAAA,EAC1B,eAAe,EAAE,CAAY,CAAY,KAAa,CAAC,CAAC,iBAAiB,CAAW,EACpF,cAAc,EAAE,CAAY,CAAY,KAAa,CAAC,CAAC,gBAAgB,CAAW,EAClF,eAAe,EAAE,CAAY,CAAY,KAAa,CAAC,CAAC,iBAAiB,CAAW,EACpF,cAAc,EAAE,CAAY,CAAY,KAAa,CAAC,CAAC,gBAAgB,CAAW,EAClF,iBAAiB,EAAE,CAAC,EACpB,gBAAgB,EAAE,SAAS,EAC3B,iBAAiB,EAAE,SAAS,EAC5B,kBAAkB,EAAE,GAAG,EACvB,iBAAiB,EAAE,IAAI,EACvB,mBAAmB,EAAE,GAAG,EACxB,kBAAkB,EAAE,SAAS,EAC7B,uBAAuB,EAAE,SAAS,EAClC,uBAAuB,EAAE,SAAS;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/leaflet-flow-map/config.ts"],"sourcesContent":["/* eslint-disable dot-notation */\n\n// Config\nimport { LeafletMapDefaultConfig, LeafletMapConfigInterface } from 'components/leaflet-map/config'\n\n// Types\nimport { ColorAccessor, NumericAccessor } from 'types/accessor'\nimport { GenericDataRecord } from 'types/data'\n\nexport interface LeafletFlowMapConfigInterface<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> extends LeafletMapConfigInterface<PointDatum> {\n /** Flow source point longitude accessor function or value. Default:.`f => f.sourceLongitude` */\n sourceLongitude?: NumericAccessor<FlowDatum>;\n /** Flow source point latitude accessor function or value. Default: `f => f.sourceLatitude` */\n sourceLatitude?: NumericAccessor<FlowDatum>;\n /** Flow target point longitude accessor function or value. Default: `f => f.targetLongitude` */\n targetLongitude?: NumericAccessor<FlowDatum>;\n /** Flow target point latitude accessor function or value. Default: `f => f.targetLatitude` */\n targetLatitude?: NumericAccessor<FlowDatum>;\n /** Flow source point radius accessor function or value. Default: `3` */\n sourcePointRadius?: NumericAccessor<FlowDatum>;\n /** Source point color accessor function or value. Default: `'#88919f'` */\n sourcePointColor?: ColorAccessor<FlowDatum>;\n /** Flow particle color accessor function or value. Default: `'#949dad'` */\n flowParticleColor?: ColorAccessor<FlowDatum>;\n /** Flow particle radius accessor function or value. Default: `1.1` */\n flowParticleRadius?: NumericAccessor<FlowDatum>;\n /** Flow particle speed accessor function or value. The unit is arbitrary, recommended range is 0 – 0.2. Default: `0.07` */\n flowParticleSpeed?: NumericAccessor<FlowDatum>;\n /** Flow particle density accessor function or value on the range of [0, 1]. Default: `0.6` */\n flowParticleDensity?: NumericAccessor<FlowDatum>;\n\n // Events\n /** Flow source point click callback function. Default: `undefined` */\n onSourcePointClick?: (f: FlowDatum, x: number, y: number, event: MouseEvent) => void;\n /** Flow source point mouse over callback function. Default: `undefined` */\n onSourcePointMouseEnter?: (f: FlowDatum, x: number, y: number, event: MouseEvent) => void;\n /** Flow source point mouse leave callback function. Default: `undefined` */\n onSourcePointMouseLeave?: (f: FlowDatum, event: MouseEvent) => void;\n}\n\nexport const LeafletFlowMapDefaultConfig: LeafletFlowMapConfigInterface<GenericDataRecord, GenericDataRecord> = {\n ...LeafletMapDefaultConfig,\n sourceLongitude: (f: unknown): number => (f as { sourceLongitude: number }).sourceLongitude as number,\n sourceLatitude: (f: unknown): number => (f as { sourceLatitude: number }).sourceLatitude as number,\n targetLongitude: (f: unknown): number => (f as { targetLongitude: number }).targetLongitude as number,\n targetLatitude: (f: unknown): number => (f as { targetLatitude: number }).targetLatitude as number,\n sourcePointRadius: 3,\n sourcePointColor: '#88919f',\n flowParticleColor: '#949dad',\n flowParticleRadius: 1.1,\n flowParticleSpeed: 0.07,\n flowParticleDensity: 0.6,\n onSourcePointClick: undefined,\n onSourcePointMouseEnter: undefined,\n onSourcePointMouseLeave: undefined,\n}\n"],"names":[],"mappings":";;AAAA;AAwCa,MAAA,2BAA2B,mCACnC,uBAAuB,CAAA,EAAA,EAC1B,eAAe,EAAE,CAAC,CAAU,KAAc,CAAiC,CAAC,eAAyB,EACrG,cAAc,EAAE,CAAC,CAAU,KAAc,CAAgC,CAAC,cAAwB,EAClG,eAAe,EAAE,CAAC,CAAU,KAAc,CAAiC,CAAC,eAAyB,EACrG,cAAc,EAAE,CAAC,CAAU,KAAc,CAAgC,CAAC,cAAwB,EAClG,iBAAiB,EAAE,CAAC,EACpB,gBAAgB,EAAE,SAAS,EAC3B,iBAAiB,EAAE,SAAS,EAC5B,kBAAkB,EAAE,GAAG,EACvB,iBAAiB,EAAE,IAAI,EACvB,mBAAmB,EAAE,GAAG,EACxB,kBAAkB,EAAE,SAAS,EAC7B,uBAAuB,EAAE,SAAS,EAClC,uBAAuB,EAAE,SAAS;;;;"}
@@ -1,14 +1,14 @@
1
1
  import { ComponentDefaultConfig } from '../../core/component/config.js';
2
2
  import { LeafletMapRenderer } from './types.js';
3
3
 
4
- /* eslint-disable dot-notation, no-irregular-whitespace */
4
+ /* eslint-disable no-irregular-whitespace */
5
5
  const LeafletMapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), {
6
6
  // General
7
7
  width: undefined, height: undefined, flyToDuration: 1500, fitViewPadding: [150, 150], zoomDuration: 800, initialBounds: undefined, fitBoundsOnUpdate: undefined, fitViewOnInit: true, fitViewOnUpdate: false, attribution: ['<a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap contributors</a>'], accessToken: '', style: undefined, styleDarkTheme: undefined, renderer: LeafletMapRenderer.MapLibre,
8
8
  // Map events
9
9
  onMapInitialized: undefined, onMapMoveZoom: undefined, onMapMoveStart: undefined, onMapMoveEnd: undefined, onMapZoomStart: undefined, onMapZoomEnd: undefined, onMapClick: undefined,
10
10
  // Point
11
- pointLongitude: (d) => d['longitude'], pointLatitude: (d) => d['latitude'], pointId: (d) => d['id'], pointShape: (d) => d['shape'], pointColor: (d) => d['color'], pointRadius: undefined, pointLabel: undefined, pointLabelColor: undefined, pointBottomLabel: '', pointCursor: null, pointRingWidth: 1.25, selectedPointId: undefined,
11
+ pointLongitude: (d) => d.longitude, pointLatitude: (d) => d.latitude, pointId: (d) => d.id, pointShape: (d) => d.shape, pointColor: (d) => d.color, pointRadius: undefined, pointLabel: undefined, pointLabelColor: undefined, pointBottomLabel: '', pointCursor: null, pointRingWidth: 1.25, selectedPointId: undefined,
12
12
  // Cluster
13
13
  clusterColor: undefined, clusterRadius: undefined, clusterLabel: (d) => `${d.point_count}`, clusterLabelColor: undefined, clusterBottomLabel: '', clusterRingWidth: 1.25, clusterBackground: true, clusterExpandOnClick: true, clusteringDistance: 55, colorMap: {},
14
14
  // TopoJSON Overlay
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/leaflet-map/config.ts"],"sourcesContent":["/* eslint-disable dot-notation, no-irregular-whitespace */\n\n// Core\nimport { ComponentDefaultConfig, ComponentConfigInterface } from 'core/component/config'\nimport { Tooltip } from 'components/tooltip'\n\n// Types\nimport { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { GenericDataRecord } from 'types/data'\n\n// Local Types\nimport {\n Bounds,\n LeafletMapPointStyles,\n MapZoomState,\n LeafletMapPointDatum,\n LeafletMapPointShape,\n LeafletMapClusterDatum,\n LeafletMapRenderer,\n} from './types'\n\n// Renderer settings\nimport { MapLibreStyleSpecs } from './renderer/map-style'\n\nexport interface LeafletMapConfigInterface<Datum extends GenericDataRecord> extends ComponentConfigInterface {\n // General\n /** Width in pixels or in CSS units. By default, the map will automatically fit to the size of the parent element. Default: `undefined`. */\n width?: number | string;\n /** Height in pixels or in CSS units. By default, the map will automatically fit to the size of the parent element. Default: `undefined`. */\n height?: number | string;\n /** Animation duration when the map is automatically panning or zooming to a point or area. Default: `1500` ms */\n flyToDuration?: number;\n /** Padding to be used when the `fitView` function has been called. The value is in pixels, [topLeft, bottomRight]. Default: `[150, 150]` */\n fitViewPadding?: [number, number];\n /** Animation duration for the `setZoom` function. Default: `800` ms */\n zoomDuration?: number;\n /** Default bounds that will be applied on the first map render if the bounds property is not set. Default: `undefined` */\n initialBounds?: Bounds;\n /** Force set map bounds on config and data updates. Default: `undefined` */\n fitBoundsOnUpdate?: Bounds;\n /** Fit the view to contain the data points on map initialization. Default: `true` */\n fitViewOnInit?: boolean;\n /** Fit the view to contain the data points on map config and data updates. Default: `false` */\n fitViewOnUpdate?: boolean;\n /** MapLibre `StyleSpecification` settings, or a URL to it. When renderer is set to`LeafletMapRenderer.Raster`, provide a template URL. Default: `undefined` */\n style: MapLibreStyleSpecs | string | undefined;\n /** MapLibre `StyleSpecification` settings or URL for dark theme. Default: `undefined` */\n styleDarkTheme?: MapLibreStyleSpecs | string | undefined;\n /** Tile server access token or API key. Default: `''` */\n accessToken?: string;\n /** Array of attribution labels. Default: `['<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap contributors</a>']` */\n attribution?: string[];\n /** Rendering mode for map's tile layer. For raster files, use `LeafletMapRenderer.Raster`. Default: `LeafletMapRenderer.MapLibre` */\n renderer?: LeafletMapRenderer | string;\n\n // Map events\n /** Function to be called after the map's async initialization is done. Default: `undefined` */\n onMapInitialized?: (() => void);\n /** Map Move / Zoom unified callback function. Default: `undefined` */\n onMapMoveZoom?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Move Start callback function. Default: `undefined` */\n onMapMoveStart?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Move End callback function. Default: `undefined` */\n onMapMoveEnd?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Zoom Start callback function. Default: `undefined` */\n onMapZoomStart?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Zoom End callback function. Default: `undefined` */\n onMapZoomEnd?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Zoom Click callback function. Default: `undefined` */\n onMapClick?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n\n // Point\n /** Point longitude accessor function. Default: `d => d.longitude` */\n pointLongitude?: NumericAccessor<Datum>;\n /** Point latitude accessor function. Default: `d => d.latitude` */\n pointLatitude?: NumericAccessor<Datum>;\n /** Point id accessor function or constant value. Default: `d => d.id` */\n pointId?: StringAccessor<Datum>;\n /** Point shape accessor function or constant value. Default: `d => d.shape` */\n pointShape?: GenericAccessor<LeafletMapPointShape | string, Datum>;\n /** Point color accessor function or constant value. Default: `d => d.color` */\n pointColor?: ColorAccessor<LeafletMapPointDatum<Datum>>;\n /** Point radius accessor function or constant value. Default: `undefined` */\n pointRadius?: NumericAccessor<LeafletMapPointDatum<Datum>>;\n /** Point inner label accessor function. Default: `undefined` */\n pointLabel?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** Point inner label color accessor function or constant value.\n * By default, the label color will be set, depending on the point brightness, either to\n * `--vis-map-point-inner-label-text-color-light` or to `--vis-map-point-inner-label-text-color-dark` CSS variable.\n * Default: `undefined`\n */\n pointLabelColor?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** Point bottom label accessor function. Default: `''` */\n pointBottomLabel?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** Point cursor value or accessor function. Default: `null` */\n pointCursor?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** The width of the ring when a point has a `LeafletMapPointShape.Ring` shape. Default: `1.25` */\n pointRingWidth?: number;\n /** Set selected point by its unique id. Default: `undefined` */\n selectedPointId?: string;\n\n // Cluster\n /** Cluster color accessor function or constant value. Default: `undefined` */\n clusterColor?: ColorAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster radius accessor function or constant value. Default: `undefined` */\n clusterRadius?: NumericAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster inner label accessor function. Default: `d => d.point_count` */\n clusterLabel?: StringAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster inner label color accessor function or constant value.\n * By default, the label color will be set, depending on the point brightness, either to\n * `--vis-map-cluster-inner-label-text-color-light` or to `--vis-map-cluster-inner-label-text-color-dark` CSS variable.\n * Default: `undefined`\n */\n clusterLabelColor?: StringAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster bottom label accessor function. Default: `''` */\n clusterBottomLabel?: StringAccessor<LeafletMapClusterDatum<Datum>>;\n /** The width of the cluster point ring. Default: `1.25` */\n clusterRingWidth?: number;\n /** When cluster is expanded, show a background circle to better separate points from the base map. Default: `true` */\n clusterBackground?: boolean;\n /** Defines whether the cluster should expand on click or not. Default: `true` */\n clusterExpandOnClick?: boolean;\n /** Clustering distance in pixels. This value will be passed to Supercluster as the `radius` property https://github.com/mapbox/supercluster. Default: `55` */\n clusteringDistance?: number;\n /** A single map point can have multiple properties displayed as a small pie chart (or a donut chart for a cluster of points).\n * By setting the colorMap configuration you can specify data properties that should be mapped to various pie / donut segments.\n *\n * ```\n * {\n *  [key in keyof Datum]?: { color: string, className?: string }\n * }\n * ```\n * e.g.:\n * ```\n * {\n *  healthy: { color: 'green' },\n *  warning: { color: 'orange' },\n *  danger: { color: 'red' }\n * }\n * ```\n * where every data point has the `healthy`, `warning` and `danger` numerical or boolean property.\n */\n colorMap?: LeafletMapPointStyles<Datum>;\n\n // TopoJSON overlay\n /** A TopoJSON Geometry layer to be displayed on top of the map. Supports fill and stroke */\n topoJSONLayer?: {\n /** The TopoJSON.Topology object. Default: `undefined` */\n sources: any;\n /** Name of the geometry feature to be displayed. Default: `undefined` */\n featureName?: string;\n /** Name of the property to be used for defining the fill color of the geometry. Default: `undefined` */\n fillProperty?: string;\n /** Name of the property to be used for defining the stroke color of the geometry. Default: `undefined` */\n strokeProperty?: string;\n /** Geometry fill opacity value. Default: `0.6` */\n fillOpacity?: number;\n /** Geometry stroke opacity value. Default: `0.8` */\n strokeOpacity?: number;\n /** Geometry stroke width. Default: `2` */\n strokeWidth?: number;\n };\n\n // Misc\n /** Tooltip component. Default: `undefined` */\n tooltip?: Tooltip;\n\n /** Alternative text description of the chart for accessibility purposes. It will be applied as an\n * `aria-label` attribute to the div element containing your chart. Default: `undefined`.\n */\n ariaLabel?: string | null | undefined;\n}\n\nexport const LeafletMapDefaultConfig: LeafletMapConfigInterface<GenericDataRecord> = {\n ...ComponentDefaultConfig,\n // General\n width: undefined,\n height: undefined,\n flyToDuration: 1500,\n fitViewPadding: [150, 150],\n zoomDuration: 800,\n initialBounds: undefined,\n fitBoundsOnUpdate: undefined,\n fitViewOnInit: true,\n fitViewOnUpdate: false,\n attribution: ['<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap contributors</a>'],\n accessToken: '',\n style: undefined,\n styleDarkTheme: undefined,\n renderer: LeafletMapRenderer.MapLibre,\n\n // Map events\n onMapInitialized: undefined,\n onMapMoveZoom: undefined,\n onMapMoveStart: undefined,\n onMapMoveEnd: undefined,\n onMapZoomStart: undefined,\n onMapZoomEnd: undefined,\n onMapClick: undefined,\n\n // Point\n pointLongitude: <Datum>(d: Datum): number => d['longitude'] as number,\n pointLatitude: <Datum>(d: Datum): number => d['latitude'] as number,\n pointId: <Datum>(d: Datum): string => d['id'] as string,\n pointShape: <Datum>(d: Datum): string => d['shape'] as string,\n pointColor: <Datum>(d: Datum): string => d['color'] as string,\n pointRadius: undefined,\n pointLabel: undefined,\n pointLabelColor: undefined,\n pointBottomLabel: '',\n pointCursor: null,\n pointRingWidth: 1.25,\n selectedPointId: undefined,\n\n // Cluster\n clusterColor: undefined,\n clusterRadius: undefined,\n clusterLabel: <Datum extends GenericDataRecord>(d: LeafletMapClusterDatum<Datum>): string => `${d.point_count}`,\n clusterLabelColor: undefined,\n clusterBottomLabel: '',\n clusterRingWidth: 1.25,\n clusterBackground: true,\n clusterExpandOnClick: true,\n clusteringDistance: 55,\n colorMap: {},\n\n // TopoJSON Overlay\n topoJSONLayer: {\n sources: undefined,\n fillOpacity: 0.6,\n strokeOpacity: 0.8,\n strokeWidth: 1,\n featureName: undefined,\n fillProperty: undefined,\n strokeProperty: undefined,\n },\n\n // Misc\n tooltip: undefined,\n ariaLabel: undefined,\n}\n"],"names":[],"mappings":";;;AAAA;AA6KO,MAAM,uBAAuB,GAAA,MAAA,CAAA,MAA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AG,EAAA,CAAC,CAAC,WAAW,CAAA,CAAE,EAC/G,iBAAiB,EAAE,SAAS,EAC5B,kBAAkB,EAAE,EAAE,EACtB,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,oBAAoB,EAAE,IAAI,EAC1B,kBAAkB,EAAE,EAAE,EACtB,QAAQ,EAAE,EAAE;;AAGZ,IAAA,aAAa,EAAE;AACb,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,WAAW,EAAE,GAAG;AAChB,QAAA,aAAa,EAAE,GAAG;AAClB,QAAA,WAAW,EAAE,CAAC;AACd,QAAA,WAAW,EAAE,SAAS;AACtB,QAAA,YAAY,EAAE,SAAS;AACvB,QAAA,cAAc,EAAE,SAAS;AAC1B,KAAA;;AAGD,IAAA,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,SAAS;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/leaflet-map/config.ts"],"sourcesContent":["/* eslint-disable no-irregular-whitespace */\n\n// Core\nimport { ComponentDefaultConfig, ComponentConfigInterface } from 'core/component/config'\nimport { Tooltip } from 'components/tooltip'\n\n// Types\nimport { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { GenericDataRecord } from 'types/data'\n\n// Local Types\nimport {\n Bounds,\n LeafletMapPointStyles,\n MapZoomState,\n LeafletMapPointDatum,\n LeafletMapPointShape,\n LeafletMapClusterDatum,\n LeafletMapRenderer,\n} from './types'\n\n// Renderer settings\nimport { MapLibreStyleSpecs } from './renderer/map-style'\n\nexport interface LeafletMapConfigInterface<Datum extends GenericDataRecord> extends ComponentConfigInterface {\n // General\n /** Width in pixels or in CSS units. By default, the map will automatically fit to the size of the parent element. Default: `undefined`. */\n width?: number | string;\n /** Height in pixels or in CSS units. By default, the map will automatically fit to the size of the parent element. Default: `undefined`. */\n height?: number | string;\n /** Animation duration when the map is automatically panning or zooming to a point or area. Default: `1500` ms */\n flyToDuration?: number;\n /** Padding to be used when the `fitView` function has been called. The value is in pixels, [topLeft, bottomRight]. Default: `[150, 150]` */\n fitViewPadding?: [number, number];\n /** Animation duration for the `setZoom` function. Default: `800` ms */\n zoomDuration?: number;\n /** Default bounds that will be applied on the first map render if the bounds property is not set. Default: `undefined` */\n initialBounds?: Bounds;\n /** Force set map bounds on config and data updates. Default: `undefined` */\n fitBoundsOnUpdate?: Bounds;\n /** Fit the view to contain the data points on map initialization. Default: `true` */\n fitViewOnInit?: boolean;\n /** Fit the view to contain the data points on map config and data updates. Default: `false` */\n fitViewOnUpdate?: boolean;\n /** MapLibre `StyleSpecification` settings, or a URL to it. When renderer is set to`LeafletMapRenderer.Raster`, provide a template URL. Default: `undefined` */\n style: MapLibreStyleSpecs | string | undefined;\n /** MapLibre `StyleSpecification` settings or URL for dark theme. Default: `undefined` */\n styleDarkTheme?: MapLibreStyleSpecs | string | undefined;\n /** Tile server access token or API key. Default: `''` */\n accessToken?: string;\n /** Array of attribution labels. Default: `['<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap contributors</a>']` */\n attribution?: string[];\n /** Rendering mode for map's tile layer. For raster files, use `LeafletMapRenderer.Raster`. Default: `LeafletMapRenderer.MapLibre` */\n renderer?: LeafletMapRenderer | string;\n\n // Map events\n /** Function to be called after the map's async initialization is done. Default: `undefined` */\n onMapInitialized?: (() => void);\n /** Map Move / Zoom unified callback function. Default: `undefined` */\n onMapMoveZoom?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Move Start callback function. Default: `undefined` */\n onMapMoveStart?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Move End callback function. Default: `undefined` */\n onMapMoveEnd?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Zoom Start callback function. Default: `undefined` */\n onMapZoomStart?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Zoom End callback function. Default: `undefined` */\n onMapZoomEnd?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n /** Map Zoom Click callback function. Default: `undefined` */\n onMapClick?: (({ mapCenter, zoomLevel, bounds }: MapZoomState) => void);\n\n // Point\n /** Point longitude accessor function. Default: `d => d.longitude` */\n pointLongitude?: NumericAccessor<Datum>;\n /** Point latitude accessor function. Default: `d => d.latitude` */\n pointLatitude?: NumericAccessor<Datum>;\n /** Point id accessor function or constant value. Default: `d => d.id` */\n pointId?: StringAccessor<Datum>;\n /** Point shape accessor function or constant value. Default: `d => d.shape` */\n pointShape?: GenericAccessor<LeafletMapPointShape | string, Datum>;\n /** Point color accessor function or constant value. Default: `d => d.color` */\n pointColor?: ColorAccessor<LeafletMapPointDatum<Datum>>;\n /** Point radius accessor function or constant value. Default: `undefined` */\n pointRadius?: NumericAccessor<LeafletMapPointDatum<Datum>>;\n /** Point inner label accessor function. Default: `undefined` */\n pointLabel?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** Point inner label color accessor function or constant value.\n * By default, the label color will be set, depending on the point brightness, either to\n * `--vis-map-point-inner-label-text-color-light` or to `--vis-map-point-inner-label-text-color-dark` CSS variable.\n * Default: `undefined`\n */\n pointLabelColor?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** Point bottom label accessor function. Default: `''` */\n pointBottomLabel?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** Point cursor value or accessor function. Default: `null` */\n pointCursor?: StringAccessor<LeafletMapPointDatum<Datum>>;\n /** The width of the ring when a point has a `LeafletMapPointShape.Ring` shape. Default: `1.25` */\n pointRingWidth?: number;\n /** Set selected point by its unique id. Default: `undefined` */\n selectedPointId?: string;\n\n // Cluster\n /** Cluster color accessor function or constant value. Default: `undefined` */\n clusterColor?: ColorAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster radius accessor function or constant value. Default: `undefined` */\n clusterRadius?: NumericAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster inner label accessor function. Default: `d => d.point_count` */\n clusterLabel?: StringAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster inner label color accessor function or constant value.\n * By default, the label color will be set, depending on the point brightness, either to\n * `--vis-map-cluster-inner-label-text-color-light` or to `--vis-map-cluster-inner-label-text-color-dark` CSS variable.\n * Default: `undefined`\n */\n clusterLabelColor?: StringAccessor<LeafletMapClusterDatum<Datum>>;\n /** Cluster bottom label accessor function. Default: `''` */\n clusterBottomLabel?: StringAccessor<LeafletMapClusterDatum<Datum>>;\n /** The width of the cluster point ring. Default: `1.25` */\n clusterRingWidth?: number;\n /** When cluster is expanded, show a background circle to better separate points from the base map. Default: `true` */\n clusterBackground?: boolean;\n /** Defines whether the cluster should expand on click or not. Default: `true` */\n clusterExpandOnClick?: boolean;\n /** Clustering distance in pixels. This value will be passed to Supercluster as the `radius` property https://github.com/mapbox/supercluster. Default: `55` */\n clusteringDistance?: number;\n /** A single map point can have multiple properties displayed as a small pie chart (or a donut chart for a cluster of points).\n * By setting the colorMap configuration you can specify data properties that should be mapped to various pie / donut segments.\n *\n * ```\n * {\n *  [key in keyof Datum]?: { color: string, className?: string }\n * }\n * ```\n * e.g.:\n * ```\n * {\n *  healthy: { color: 'green' },\n *  warning: { color: 'orange' },\n *  danger: { color: 'red' }\n * }\n * ```\n * where every data point has the `healthy`, `warning` and `danger` numerical or boolean property.\n */\n colorMap?: LeafletMapPointStyles<Datum>;\n\n // TopoJSON overlay\n /** A TopoJSON Geometry layer to be displayed on top of the map. Supports fill and stroke */\n topoJSONLayer?: {\n /** The TopoJSON.Topology object. Default: `undefined` */\n sources: any;\n /** Name of the geometry feature to be displayed. Default: `undefined` */\n featureName?: string;\n /** Name of the property to be used for defining the fill color of the geometry. Default: `undefined` */\n fillProperty?: string;\n /** Name of the property to be used for defining the stroke color of the geometry. Default: `undefined` */\n strokeProperty?: string;\n /** Geometry fill opacity value. Default: `0.6` */\n fillOpacity?: number;\n /** Geometry stroke opacity value. Default: `0.8` */\n strokeOpacity?: number;\n /** Geometry stroke width. Default: `2` */\n strokeWidth?: number;\n };\n\n // Misc\n /** Tooltip component. Default: `undefined` */\n tooltip?: Tooltip;\n\n /** Alternative text description of the chart for accessibility purposes. It will be applied as an\n * `aria-label` attribute to the div element containing your chart. Default: `undefined`.\n */\n ariaLabel?: string | null | undefined;\n}\n\nexport const LeafletMapDefaultConfig: LeafletMapConfigInterface<GenericDataRecord> = {\n ...ComponentDefaultConfig,\n // General\n width: undefined,\n height: undefined,\n flyToDuration: 1500,\n fitViewPadding: [150, 150],\n zoomDuration: 800,\n initialBounds: undefined,\n fitBoundsOnUpdate: undefined,\n fitViewOnInit: true,\n fitViewOnUpdate: false,\n attribution: ['<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap contributors</a>'],\n accessToken: '',\n style: undefined,\n styleDarkTheme: undefined,\n renderer: LeafletMapRenderer.MapLibre,\n\n // Map events\n onMapInitialized: undefined,\n onMapMoveZoom: undefined,\n onMapMoveStart: undefined,\n onMapMoveEnd: undefined,\n onMapZoomStart: undefined,\n onMapZoomEnd: undefined,\n onMapClick: undefined,\n\n // Point\n pointLongitude: (d: unknown): number => (d as { longitude: number }).longitude,\n pointLatitude: (d: unknown): number => (d as { latitude: number }).latitude,\n pointId: (d: unknown): string => (d as { id: string }).id,\n pointShape: (d: unknown): string => (d as { shape: string }).shape,\n pointColor: (d: unknown): string => (d as { color: string }).color,\n pointRadius: undefined,\n pointLabel: undefined,\n pointLabelColor: undefined,\n pointBottomLabel: '',\n pointCursor: null,\n pointRingWidth: 1.25,\n selectedPointId: undefined,\n\n // Cluster\n clusterColor: undefined,\n clusterRadius: undefined,\n clusterLabel: <Datum extends GenericDataRecord>(d: LeafletMapClusterDatum<Datum>): string => `${d.point_count}`,\n clusterLabelColor: undefined,\n clusterBottomLabel: '',\n clusterRingWidth: 1.25,\n clusterBackground: true,\n clusterExpandOnClick: true,\n clusteringDistance: 55,\n colorMap: {},\n\n // TopoJSON Overlay\n topoJSONLayer: {\n sources: undefined,\n fillOpacity: 0.6,\n strokeOpacity: 0.8,\n strokeWidth: 1,\n featureName: undefined,\n fillProperty: undefined,\n strokeProperty: undefined,\n },\n\n // Misc\n tooltip: undefined,\n ariaLabel: undefined,\n}\n"],"names":[],"mappings":";;;AAAA;AA6KO,MAAM,uBAAuB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC/B,sBAAsB,CAAA,EAAA;;AAEzB,IAAA,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,IAAI,EACnB,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAC1B,YAAY,EAAE,GAAG,EACjB,aAAa,EAAE,SAAS,EACxB,iBAAiB,EAAE,SAAS,EAC5B,aAAa,EAAE,IAAI,EACnB,eAAe,EAAE,KAAK,EACtB,WAAW,EAAE,CAAC,kGAAkG,CAAC,EACjH,WAAW,EAAE,EAAE,EACf,KAAK,EAAE,SAAS,EAChB,cAAc,EAAE,SAAS,EACzB,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;;IAGrC,gBAAgB,EAAE,SAAS,EAC3B,aAAa,EAAE,SAAS,EACxB,cAAc,EAAE,SAAS,EACzB,YAAY,EAAE,SAAS,EACvB,cAAc,EAAE,SAAS,EACzB,YAAY,EAAE,SAAS,EACvB,UAAU,EAAE,SAAS;;AAGrB,IAAA,cAAc,EAAE,CAAC,CAAU,KAAc,CAA2B,CAAC,SAAS,EAC9E,aAAa,EAAE,CAAC,CAAU,KAAc,CAA0B,CAAC,QAAQ,EAC3E,OAAO,EAAE,CAAC,CAAU,KAAc,CAAoB,CAAC,EAAE,EACzD,UAAU,EAAE,CAAC,CAAU,KAAc,CAAuB,CAAC,KAAK,EAClE,UAAU,EAAE,CAAC,CAAU,KAAc,CAAuB,CAAC,KAAK,EAClE,WAAW,EAAE,SAAS,EACtB,UAAU,EAAE,SAAS,EACrB,eAAe,EAAE,SAAS,EAC1B,gBAAgB,EAAE,EAAE,EACpB,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE,IAAI,EACpB,eAAe,EAAE,SAAS;;IAG1B,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,SAAS,EACxB,YAAY,EAAE,CAAkC,CAAgC,KAAa,CAAG,EAAA,CAAC,CAAC,WAAW,CAAA,CAAE,EAC/G,iBAAiB,EAAE,SAAS,EAC5B,kBAAkB,EAAE,EAAE,EACtB,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,oBAAoB,EAAE,IAAI,EAC1B,kBAAkB,EAAE,EAAE,EACtB,QAAQ,EAAE,EAAE;;AAGZ,IAAA,aAAa,EAAE;AACb,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,WAAW,EAAE,GAAG;AAChB,QAAA,aAAa,EAAE,GAAG;AAClB,QAAA,WAAW,EAAE,CAAC;AACd,QAAA,WAAW,EAAE,SAAS;AACtB,QAAA,YAAY,EAAE,SAAS;AACvB,QAAA,cAAc,EAAE,SAAS;AAC1B,KAAA;;AAGD,IAAA,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,SAAS;;;;"}
@@ -79,7 +79,7 @@ export declare class LeafletMap<Datum extends GenericDataRecord> extends Compone
79
79
  private _flyToBoundsAnimationFrameId;
80
80
  readonly _leafletInitializationPromise: Promise<L.Map>;
81
81
  static DEFAULT_CONTAINER_HEIGHT: number;
82
- events: {
82
+ protected events: {
83
83
  [x: string]: {
84
84
  mouseup: (d: LeafletMapPoint<Datum>, event: MouseEvent) => void;
85
85
  mousedown: (d: LeafletMapPoint<Datum>, event: MouseEvent) => void;