billboard.js 3.17.2 → 3.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +33 -15
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +12 -12
- package/dist/billboard.pkgd.js +2143 -1618
- package/dist/billboard.pkgd.min.js +20 -18
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +24 -4
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-stanford.js +24 -4
- package/dist/plugin/billboardjs-plugin-stanford.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-tableview.js +26 -8
- package/dist/plugin/billboardjs-plugin-tableview.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-textoverlap.js +24 -4
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -4
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2168 -1661
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -6
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2186 -1659
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -8
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2195 -1668
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -10
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2190 -1665
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -9
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2189 -1662
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +10 -8
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/billboard.js +37 -16
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +37 -6
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +3 -3
- package/src/ChartInternal/internals/color.ts +4 -6
- package/src/ChartInternal/internals/legend.ts +2 -1
- package/src/ChartInternal/internals/tooltip.ts +2 -2
- package/src/ChartInternal/shape/point.common.ts +4 -4
- package/src/Plugin/tableview/index.ts +2 -5
- package/src/module/util.ts +35 -6
package/dist/theme/dark.css
CHANGED
package/dist/theme/dark.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#4a7fff;#b02c2c;#1ca46c;#b47300;#49baf3;#ed7e13;#cfaa00;#a6cd19;#dccb52;#f5d194;)}.bb svg{font-size:12px;font-family:Helvetica,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#8d9cab}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#8d9cab;font-size:11px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid,.bb-line{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#8d9cab}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.bb-axis-y text,.bb-axis-y2 text{fill:#8d9cab}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:#27c9030d}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#5c666e}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ccd9e6}.bb-text.bb-empty{fill:#8d9cab}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:2px;stroke:8d9cab}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.selection{stroke:none;fill:#ccd9e6}.bb-selected-circle{fill:#ccd9e6;stroke-width:2px}.bb-bar{stroke-width:.5px}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.5!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.5}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush{fill-opacity:.25;fill:#ccd9e6}.bb-brush .extent{fill-opacity:.5}.bb-legend-item{user-select:none}.bb-legend-item line{stroke-width:10px;stroke-dasharray:3px}.bb-legend-item text{transform:translateY(-1px)}.bb-legend-item-hidden{opacity:.5}.bb-legend-background{opacity:.75;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#8d9cab;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:Helvetica,Arial,sans-serif,nanumgothic,Dotum;user-select:none;transform:translateZ(0)}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #828181;border-radius:5px;background-color:#000;text-align:left;font-size:11px;color:#fff;white-space:nowrap}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:left;border-bottom:solid 1px #828181}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:7px;height:7px;margin:-1px 6px 0 0;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.bb-area{stroke-width:0;opacity:.5}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#3f3f3f;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#828181;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:16px!important;fill:#b6c2ce;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#b6c2ce}.bb-chart-arc rect{stroke:#8d9cab;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#000;color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
package/dist/theme/datalab.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-size:11px;font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-font-smoothing:antialiased;user-select:none;fill:#555;font-size:11px}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{stroke-width:.7px}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:#27c9030d}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:.7px}.bb-circle{fill:#fff!important}.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:1px}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;stroke-width:8px;transform:translate(7px,1px);stroke-dasharray:1 20}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none;transform:translateZ(0)}.bb-tooltip{border-collapse:separate;border-spacing:0;border-radius:2px;empty-cells:show;border:1px solid #999;background-color:#fff;text-align:left;font-size:11px;-webkit-font-smoothing:antialiased;white-space:nowrap}.bb-tooltip th{font-size:13px;padding:2px 8px;text-align:left;border-bottom:solid 2px #ff2d2d;background-color:#0b00b1;color:#fffdfd}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:8px;height:8px;margin-right:6px;border:solid 1px #000;border-radius:3px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:11px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:18px!important;fill:#000;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-line{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
package/dist/theme/graph.css
CHANGED
package/dist/theme/graph.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-size:12px;font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#8c8c8c}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:12px;letter-spacing:-.3px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:#27c9030d}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:2px}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1px}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;transform:translateZ(0)}.bb-tooltip{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;border-radius:2px;background-color:#fff;text-align:left;font-size:12px;box-shadow:.5px .5px 1px #999;white-space:nowrap}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:center;border-bottom:dotted 1px #000;background-color:#efefef;color:#000}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{padding:3px 6px;background-color:#fff;border-bottom:solid 1px #eee}.bb-tooltip td:first-child{padding-left:5px;border-right:solid 1px #eee}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:5px;height:12px;margin-right:6px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:16px!important;fill:#8c8c8c;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;font-weight:700;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer;opacity:.8;box-shadow:1px 1px 2px #ccc}
|
package/dist/theme/insight.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-size:12px;font-family:sans-serif,Arial,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#c4c4c4}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:11px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:#27c9030d}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;transform:translateZ(0)}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;background-color:#fff;text-align:left;font-size:11px;white-space:nowrap}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:left;border-bottom:solid 1px #eee}.bb-tooltip td{padding:4px 6px;background-color:#fff}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:5px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:16px!important;fill:#000;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
package/dist/theme/modern.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#7ea9fa;#ffcd1e;#d33043;#41c464;#c86b74;#006bc2;#2a7e41;#f27c00;#c159ff;#bed017;)}.bb svg{font-size:12px;font-family:-apple-system,"system-ui",Noto Sans,Malgun Gothic,\b9d1\c740 \ace0\b515,helvetica,Apple SD Gothic Neo,sans-serif;line-height:1}.bb path,.bb line{fill:none;stroke:#cecece}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:10.5px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:#27c9030d}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#d2bad8}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#71808d}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush{fill-opacity:.1;fill:#838181}.bb-brush .extent{fill-opacity:.1}.bb-brush .selection{fill:#838181;fill-opacity:.2}.bb-brush path{stroke:#838181}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;transform:translate(7px,1px);stroke-dasharray:1 20}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:.5px}.bb-tooltip-container{z-index:10;font-family:-apple-system,"system-ui",Noto Sans,Malgun Gothic,\b9d1\c740 \ace0\b515,helvetica,Apple SD Gothic Neo,sans-serif;user-select:none;transform:translateZ(0)}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;color:#fff;border-radius:5px;background-color:#404244;text-align:left;font-size:11px;white-space:nowrap;opacity:.9}.bb-tooltip th{font-size:11px;padding:3px 6px 0;text-align:left}.bb-tooltip td{padding:3px}.bb-tooltip td:first-child{padding-left:7px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:5px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#ccc}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:1.8em;fill:#000;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#cecece;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:11px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#cecece;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#cecece;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:1px solid #999;background-color:#404244;color:#fff;opacity:.9;padding:5px;border-radius:5px;cursor:pointer}
|
package/dist-esm/billboard.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
*/
|
|
10
10
|
import { pointer, select, namespaces, selectAll } from 'd3-selection';
|
|
11
11
|
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
|
|
@@ -2423,16 +2423,37 @@ function endall(transition, cb) {
|
|
|
2423
2423
|
transition.call(end);
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
2426
|
+
// Sanitize patterns (blacklist approach with repeated application)
|
|
2427
|
+
var DANGEROUS_TAGS = "script|iframe|object|embed|form|input|button|textarea|select|style|link|meta|base|math|isindex";
|
|
2428
|
+
var sanitizeRx = {
|
|
2429
|
+
tags: new RegExp("<(".concat(DANGEROUS_TAGS, ")\\b[\\s\\S]*?>([\\s\\S]*?<\\/(").concat(DANGEROUS_TAGS, ")\\s*>)?"), "gi"),
|
|
2430
|
+
// Handles: whitespace, slash, quotes before event handlers (e.g., <img/onerror=...>, <img src="x"onerror=...>)
|
|
2431
|
+
eventHandlers: /[\s/"']+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,
|
|
2432
|
+
// Handles: javascript/data/vbscript URIs with optional whitespace/newlines between protocol and colon
|
|
2433
|
+
dangerousURIs: /(href|src|action|xlink:href)\s*=\s*["']?\s*(javascript|data|vbscript)\s*:/gi
|
|
2434
|
+
};
|
|
2426
2435
|
/**
|
|
2427
|
-
*
|
|
2436
|
+
* Sanitize HTML string to prevent XSS attacks
|
|
2437
|
+
* Uses blacklist approach with repeated application to prevent nested tag bypass
|
|
2428
2438
|
* @param {string} str Target string value
|
|
2429
|
-
* @returns {string}
|
|
2439
|
+
* @returns {string} Sanitized string with dangerous elements removed
|
|
2430
2440
|
* @private
|
|
2431
2441
|
*/
|
|
2432
2442
|
function sanitize(str) {
|
|
2433
|
-
|
|
2434
|
-
str
|
|
2435
|
-
|
|
2443
|
+
if (!isString(str) || !str || str.indexOf("<") === -1) {
|
|
2444
|
+
return str;
|
|
2445
|
+
}
|
|
2446
|
+
var result = str;
|
|
2447
|
+
var prev;
|
|
2448
|
+
// Repeat until no more changes (prevents nested tag attacks like <scri<script>pt>)
|
|
2449
|
+
do {
|
|
2450
|
+
prev = result;
|
|
2451
|
+
result = result
|
|
2452
|
+
.replace(sanitizeRx.tags, "")
|
|
2453
|
+
.replace(sanitizeRx.eventHandlers, "")
|
|
2454
|
+
.replace(sanitizeRx.dangerousURIs, "$1=\"\"");
|
|
2455
|
+
} while (result !== prev);
|
|
2456
|
+
return result;
|
|
2436
2457
|
}
|
|
2437
2458
|
/**
|
|
2438
2459
|
* Set text value. If there's multiline add nodes.
|
|
@@ -2986,7 +3007,7 @@ function tplProcess(tpl, data) {
|
|
|
2986
3007
|
for (var x in data) {
|
|
2987
3008
|
res = res.replace(new RegExp("{=".concat(x, "}"), "g"), data[x]);
|
|
2988
3009
|
}
|
|
2989
|
-
return res;
|
|
3010
|
+
return sanitize(res);
|
|
2990
3011
|
}
|
|
2991
3012
|
/**
|
|
2992
3013
|
* Get parsed date value
|
|
@@ -5786,7 +5807,7 @@ var color = {
|
|
|
5786
5807
|
}
|
|
5787
5808
|
ids.forEach(function (v) {
|
|
5788
5809
|
var id = "".concat(state.datetimeId, "-labels-bg").concat($$.getTargetSelectorSuffix(v)).concat(isString(color) ? $$.getTargetSelectorSuffix(color) : "");
|
|
5789
|
-
var colorValue = v === "" ? color : (color === null || color === void 0 ? void 0 : color[v]) || "";
|
|
5810
|
+
var colorValue = sanitize(v === "" ? color : (color === null || color === void 0 ? void 0 : color[v]) || "");
|
|
5790
5811
|
if (defs.select("#".concat(id)).empty()) {
|
|
5791
5812
|
defs.append("filter")
|
|
5792
5813
|
.attr("x", attr.x)
|
|
@@ -6474,7 +6495,7 @@ var legend$1 = {
|
|
|
6474
6495
|
var html_1 = "";
|
|
6475
6496
|
targets.forEach(function (v) {
|
|
6476
6497
|
var content = isFunction(template) ?
|
|
6477
|
-
template.
|
|
6498
|
+
sanitize(template.call($$.api, v, $$.color(v), $$.api.data(v)[0].values)) :
|
|
6478
6499
|
tplProcess(template, {
|
|
6479
6500
|
COLOR: $$.color(v),
|
|
6480
6501
|
TITLE: v
|
|
@@ -9194,11 +9215,11 @@ var tooltip$1 = {
|
|
|
9194
9215
|
callFn(config.tooltip_onshow, $$.api, selectedData);
|
|
9195
9216
|
// set tooltip content
|
|
9196
9217
|
tooltip
|
|
9197
|
-
.html($$.getTooltipHTML(selectedData, // data
|
|
9218
|
+
.html(sanitize($$.getTooltipHTML(selectedData, // data
|
|
9198
9219
|
$$.axis ? $$.axis.getXAxisTickFormat() : $$.categoryName.bind($$), // defaultTitleFormat
|
|
9199
9220
|
$$.getDefaultValueFormat(), // defaultValueFormat
|
|
9200
9221
|
$$.color // color
|
|
9201
|
-
))
|
|
9222
|
+
)))
|
|
9202
9223
|
.style("display", null)
|
|
9203
9224
|
.style("visibility", null) // for IE9
|
|
9204
9225
|
.datum(datum = {
|
|
@@ -21442,7 +21463,7 @@ function insertPointInfoDefs(point, id) {
|
|
|
21442
21463
|
target.setAttribute(name_1, from.getAttribute(name_1));
|
|
21443
21464
|
}
|
|
21444
21465
|
};
|
|
21445
|
-
var doc$1 = new DOMParser().parseFromString(point, "image/svg+xml");
|
|
21466
|
+
var doc$1 = new DOMParser().parseFromString(sanitize(point), "image/svg+xml");
|
|
21446
21467
|
var node = doc$1.documentElement;
|
|
21447
21468
|
var clone = doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase());
|
|
21448
21469
|
clone.id = id;
|
|
@@ -21452,7 +21473,7 @@ function insertPointInfoDefs(point, id) {
|
|
|
21452
21473
|
if ((_a = node.childNodes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
21453
21474
|
var parent_1 = select(clone);
|
|
21454
21475
|
if ("innerHTML" in clone) {
|
|
21455
|
-
parent_1.html(node.innerHTML);
|
|
21476
|
+
parent_1.html(sanitize(node.innerHTML));
|
|
21456
21477
|
}
|
|
21457
21478
|
else {
|
|
21458
21479
|
toArray(node.childNodes).forEach(function (v) {
|
|
@@ -21514,7 +21535,7 @@ var shapePointCommon = {
|
|
|
21514
21535
|
var pointId = $$.getDefsPointId(id);
|
|
21515
21536
|
var defsPoint = $el.defs.select("#".concat(pointId));
|
|
21516
21537
|
if (defsPoint.size() < 1) {
|
|
21517
|
-
insertPointInfoDefs.
|
|
21538
|
+
insertPointInfoDefs.call($$, point, pointId);
|
|
21518
21539
|
}
|
|
21519
21540
|
if (method === "create") {
|
|
21520
21541
|
return (_b = $$.custom) === null || _b === void 0 ? void 0 : _b.create.bind(context).apply(void 0, __spreadArray([element, pointId], args, false));
|
|
@@ -25595,7 +25616,7 @@ var zoomModule = function () {
|
|
|
25595
25616
|
var defaults = Object.create(null);
|
|
25596
25617
|
/**
|
|
25597
25618
|
* @namespace bb
|
|
25598
|
-
* @version 3.17.
|
|
25619
|
+
* @version 3.17.4
|
|
25599
25620
|
*/
|
|
25600
25621
|
var bb = {
|
|
25601
25622
|
/**
|
|
@@ -25605,7 +25626,7 @@ var bb = {
|
|
|
25605
25626
|
* bb.version; // "1.0.0"
|
|
25606
25627
|
* @memberof bb
|
|
25607
25628
|
*/
|
|
25608
|
-
version: "3.17.
|
|
25629
|
+
version: "3.17.4",
|
|
25609
25630
|
/**
|
|
25610
25631
|
* Generate chart
|
|
25611
25632
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -100,7 +100,7 @@ var Plugin = /** @class */ (function () {
|
|
|
100
100
|
delete _this[key];
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
Plugin.version = "3.17.
|
|
103
|
+
Plugin.version = "3.17.4";
|
|
104
104
|
return Plugin;
|
|
105
105
|
}());
|
|
106
106
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -376,7 +376,7 @@ var Plugin = /** @class */ (function () {
|
|
|
376
376
|
delete _this[key];
|
|
377
377
|
});
|
|
378
378
|
};
|
|
379
|
-
Plugin.version = "3.17.
|
|
379
|
+
Plugin.version = "3.17.4";
|
|
380
380
|
return Plugin;
|
|
381
381
|
}());
|
|
382
382
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -440,7 +440,7 @@ var Plugin = /** @class */ (function () {
|
|
|
440
440
|
delete _this[key];
|
|
441
441
|
});
|
|
442
442
|
};
|
|
443
|
-
Plugin.version = "3.17.
|
|
443
|
+
Plugin.version = "3.17.4";
|
|
444
444
|
return Plugin;
|
|
445
445
|
}());
|
|
446
446
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -75,9 +75,42 @@ function getGlobal() {
|
|
|
75
75
|
var win = getGlobal();
|
|
76
76
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
77
77
|
|
|
78
|
+
var isString = function (v) { return typeof v === "string"; };
|
|
78
79
|
var isNumber = function (v) { return typeof v === "number"; };
|
|
79
80
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
80
81
|
var isObjectType = function (v) { return typeof v === "object"; };
|
|
82
|
+
// Sanitize patterns (blacklist approach with repeated application)
|
|
83
|
+
var DANGEROUS_TAGS = "script|iframe|object|embed|form|input|button|textarea|select|style|link|meta|base|math|isindex";
|
|
84
|
+
var sanitizeRx = {
|
|
85
|
+
tags: new RegExp("<(".concat(DANGEROUS_TAGS, ")\\b[\\s\\S]*?>([\\s\\S]*?<\\/(").concat(DANGEROUS_TAGS, ")\\s*>)?"), "gi"),
|
|
86
|
+
// Handles: whitespace, slash, quotes before event handlers (e.g., <img/onerror=...>, <img src="x"onerror=...>)
|
|
87
|
+
eventHandlers: /[\s/"']+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,
|
|
88
|
+
// Handles: javascript/data/vbscript URIs with optional whitespace/newlines between protocol and colon
|
|
89
|
+
dangerousURIs: /(href|src|action|xlink:href)\s*=\s*["']?\s*(javascript|data|vbscript)\s*:/gi
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Sanitize HTML string to prevent XSS attacks
|
|
93
|
+
* Uses blacklist approach with repeated application to prevent nested tag bypass
|
|
94
|
+
* @param {string} str Target string value
|
|
95
|
+
* @returns {string} Sanitized string with dangerous elements removed
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
function sanitize(str) {
|
|
99
|
+
if (!isString(str) || !str || str.indexOf("<") === -1) {
|
|
100
|
+
return str;
|
|
101
|
+
}
|
|
102
|
+
var result = str;
|
|
103
|
+
var prev;
|
|
104
|
+
// Repeat until no more changes (prevents nested tag attacks like <scri<script>pt>)
|
|
105
|
+
do {
|
|
106
|
+
prev = result;
|
|
107
|
+
result = result
|
|
108
|
+
.replace(sanitizeRx.tags, "")
|
|
109
|
+
.replace(sanitizeRx.eventHandlers, "")
|
|
110
|
+
.replace(sanitizeRx.dangerousURIs, "$1=\"\"");
|
|
111
|
+
} while (result !== prev);
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
81
114
|
// emulate event
|
|
82
115
|
({
|
|
83
116
|
mouse: (function () {
|
|
@@ -121,7 +154,7 @@ function tplProcess(tpl, data) {
|
|
|
121
154
|
for (var x in data) {
|
|
122
155
|
res = res.replace(new RegExp("{=".concat(x, "}"), "g"), data[x]);
|
|
123
156
|
}
|
|
124
|
-
return res;
|
|
157
|
+
return sanitize(res);
|
|
125
158
|
}
|
|
126
159
|
|
|
127
160
|
/**
|
|
@@ -217,7 +250,7 @@ var Plugin = /** @class */ (function () {
|
|
|
217
250
|
delete _this[key];
|
|
218
251
|
});
|
|
219
252
|
};
|
|
220
|
-
Plugin.version = "3.17.
|
|
253
|
+
Plugin.version = "3.17.4";
|
|
221
254
|
return Plugin;
|
|
222
255
|
}());
|
|
223
256
|
|
|
@@ -465,9 +498,7 @@ var TableView = /** @class */ (function (_super) {
|
|
|
465
498
|
});
|
|
466
499
|
}).join(""), "</tr>");
|
|
467
500
|
});
|
|
468
|
-
|
|
469
|
-
var r = tplProcess(tpl.body, __assign(__assign({}, config), { title: config.title || $$.config.title_text || "", thead: thead, tbody: tbody })).replace(rx, "");
|
|
470
|
-
element.innerHTML = r;
|
|
501
|
+
element.innerHTML = tplProcess(tpl.body, __assign(__assign({}, config), { title: config.title || $$.config.title_text || "", thead: thead, tbody: tbody }));
|
|
471
502
|
};
|
|
472
503
|
TableView.prototype.$redraw = function () {
|
|
473
504
|
var state = this.$$.state;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.17.
|
|
8
|
+
* @version 3.17.4
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -204,7 +204,7 @@ var Plugin = /** @class */ (function () {
|
|
|
204
204
|
delete _this[key];
|
|
205
205
|
});
|
|
206
206
|
};
|
|
207
|
-
Plugin.version = "3.17.
|
|
207
|
+
Plugin.version = "3.17.4";
|
|
208
208
|
return Plugin;
|
|
209
209
|
}());
|
|
210
210
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.4",
|
|
4
4
|
"description": "Re-usable easy interface JavaScript chart library, based on D3 v4+",
|
|
5
5
|
"homepage": "https://naver.github.io/billboard.js/",
|
|
6
6
|
"main": "dist/billboard.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"jsdoc": "node ./config/jsdoc.js",
|
|
47
47
|
"jsdoc:cmd": "jsdoc -c jsdoc.json",
|
|
48
48
|
"lint-staged": "lint-staged --config ./config/.lintstagedrc.json",
|
|
49
|
-
"prepare": "husky
|
|
49
|
+
"prepare": "husky"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": [
|
|
52
52
|
"dist/**/*.css",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
],
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|
|
57
|
-
"url": "https://github.com/naver/billboard.js"
|
|
57
|
+
"url": "git+https://github.com/naver/billboard.js.git"
|
|
58
58
|
},
|
|
59
59
|
"bugs": {
|
|
60
60
|
"url": "https://github.com/naver/billboard.js/issues"
|
|
@@ -8,7 +8,7 @@ import {d3Selection} from "../../../types";
|
|
|
8
8
|
import {$ARC, $COLOR, $SHAPE} from "../../config/classes";
|
|
9
9
|
import {document} from "../../module/browser";
|
|
10
10
|
import {KEY} from "../../module/Cache";
|
|
11
|
-
import {isFunction, isObject, isString, notEmpty} from "../../module/util";
|
|
11
|
+
import {isFunction, isObject, isString, notEmpty, sanitize} from "../../module/util";
|
|
12
12
|
import type {IArcData, IDataRow} from "../data/IData";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
206
206
|
const id = `${state.datetimeId}-labels-bg${$$.getTargetSelectorSuffix(v)}${
|
|
207
207
|
isString(color) ? $$.getTargetSelectorSuffix(color) : ""
|
|
208
208
|
}`;
|
|
209
|
-
const colorValue = v === "" ? color : color?.[v] || "";
|
|
209
|
+
const colorValue = sanitize(v === "" ? color : color?.[v] || "");
|
|
210
210
|
|
|
211
211
|
if (defs.select(`#${id}`).empty()) {
|
|
212
212
|
defs.append("filter")
|
|
@@ -215,10 +215,8 @@ export default {
|
|
|
215
215
|
.attr("width", attr.width)
|
|
216
216
|
.attr("height", attr.height)
|
|
217
217
|
.attr("id", id)
|
|
218
|
-
.html(
|
|
219
|
-
|
|
220
|
-
<feComposite in="SourceGraphic" />`
|
|
221
|
-
);
|
|
218
|
+
.html(`<feFlood flood-color="${colorValue}" />
|
|
219
|
+
<feComposite in="SourceGraphic" />`);
|
|
222
220
|
}
|
|
223
221
|
});
|
|
224
222
|
}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
isEmpty,
|
|
14
14
|
isFunction,
|
|
15
15
|
notEmpty,
|
|
16
|
+
sanitize,
|
|
16
17
|
tplProcess
|
|
17
18
|
} from "../../module/util";
|
|
18
19
|
|
|
@@ -143,7 +144,7 @@ export default {
|
|
|
143
144
|
|
|
144
145
|
targets.forEach(v => {
|
|
145
146
|
const content = isFunction(template) ?
|
|
146
|
-
template.
|
|
147
|
+
sanitize(template.call($$.api, v, $$.color(v), $$.api.data(v)[0].values)) :
|
|
147
148
|
tplProcess(template, {
|
|
148
149
|
COLOR: $$.color(v),
|
|
149
150
|
TITLE: v
|
|
@@ -524,12 +524,12 @@ export default {
|
|
|
524
524
|
|
|
525
525
|
// set tooltip content
|
|
526
526
|
tooltip
|
|
527
|
-
.html($$.getTooltipHTML(
|
|
527
|
+
.html(sanitize($$.getTooltipHTML(
|
|
528
528
|
selectedData, // data
|
|
529
529
|
$$.axis ? $$.axis.getXAxisTickFormat() : $$.categoryName.bind($$), // defaultTitleFormat
|
|
530
530
|
$$.getDefaultValueFormat(), // defaultValueFormat
|
|
531
531
|
$$.color // color
|
|
532
|
-
))
|
|
532
|
+
)))
|
|
533
533
|
.style("display", null)
|
|
534
534
|
.style("visibility", null) // for IE9
|
|
535
535
|
.datum(datum = {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import {namespaces as d3Namespaces, select as d3Select} from "d3-selection";
|
|
6
6
|
import {document} from "../../module/browser";
|
|
7
|
-
import {isFunction, isObjectType, notEmpty, toArray} from "../../module/util";
|
|
7
|
+
import {isFunction, isObjectType, notEmpty, sanitize, toArray} from "../../module/util";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Check if point draw methods are valid
|
|
@@ -34,7 +34,7 @@ function insertPointInfoDefs(point: string, id: string): void {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const doc = new DOMParser().parseFromString(point, "image/svg+xml");
|
|
37
|
+
const doc = new DOMParser().parseFromString(sanitize(point), "image/svg+xml");
|
|
38
38
|
const node = doc.documentElement;
|
|
39
39
|
const clone = document.createElementNS(d3Namespaces.svg, node.nodeName.toLowerCase());
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ function insertPointInfoDefs(point: string, id: string): void {
|
|
|
48
48
|
const parent = d3Select(clone);
|
|
49
49
|
|
|
50
50
|
if ("innerHTML" in clone) {
|
|
51
|
-
parent.html(node.innerHTML);
|
|
51
|
+
parent.html(sanitize(node.innerHTML));
|
|
52
52
|
} else {
|
|
53
53
|
toArray(node.childNodes).forEach(v => {
|
|
54
54
|
copyAttr(v, parent.append(v.tagName).node());
|
|
@@ -114,7 +114,7 @@ export default {
|
|
|
114
114
|
const defsPoint = $el.defs.select(`#${pointId}`);
|
|
115
115
|
|
|
116
116
|
if (defsPoint.size() < 1) {
|
|
117
|
-
insertPointInfoDefs.
|
|
117
|
+
insertPointInfoDefs.call($$, point, pointId);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
if (method === "create") {
|
|
@@ -142,15 +142,12 @@ export default class TableView extends Plugin {
|
|
|
142
142
|
}</tr>`;
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
const r = tplProcess(tpl.body, {
|
|
145
|
+
element.innerHTML = tplProcess(tpl.body, {
|
|
147
146
|
...config,
|
|
148
147
|
title: config.title || $$.config.title_text || "",
|
|
149
148
|
thead,
|
|
150
149
|
tbody
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
element.innerHTML = r;
|
|
150
|
+
});
|
|
154
151
|
}
|
|
155
152
|
|
|
156
153
|
$redraw(): void {
|
package/src/module/util.ts
CHANGED
|
@@ -175,16 +175,45 @@ function endall(transition, cb: Function): void {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
// Sanitize patterns (blacklist approach with repeated application)
|
|
179
|
+
const DANGEROUS_TAGS =
|
|
180
|
+
"script|iframe|object|embed|form|input|button|textarea|select|style|link|meta|base|math|isindex";
|
|
181
|
+
const sanitizeRx = {
|
|
182
|
+
tags: new RegExp(
|
|
183
|
+
`<(${DANGEROUS_TAGS})\\b[\\s\\S]*?>([\\s\\S]*?<\\/(${DANGEROUS_TAGS})\\s*>)?`,
|
|
184
|
+
"gi"
|
|
185
|
+
),
|
|
186
|
+
// Handles: whitespace, slash, quotes before event handlers (e.g., <img/onerror=...>, <img src="x"onerror=...>)
|
|
187
|
+
eventHandlers: /[\s/"']+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,
|
|
188
|
+
// Handles: javascript/data/vbscript URIs with optional whitespace/newlines between protocol and colon
|
|
189
|
+
dangerousURIs: /(href|src|action|xlink:href)\s*=\s*["']?\s*(javascript|data|vbscript)\s*:/gi
|
|
190
|
+
};
|
|
191
|
+
|
|
178
192
|
/**
|
|
179
|
-
*
|
|
193
|
+
* Sanitize HTML string to prevent XSS attacks
|
|
194
|
+
* Uses blacklist approach with repeated application to prevent nested tag bypass
|
|
180
195
|
* @param {string} str Target string value
|
|
181
|
-
* @returns {string}
|
|
196
|
+
* @returns {string} Sanitized string with dangerous elements removed
|
|
182
197
|
* @private
|
|
183
198
|
*/
|
|
184
199
|
function sanitize(str: string): string {
|
|
185
|
-
|
|
186
|
-
str
|
|
187
|
-
|
|
200
|
+
if (!isString(str) || !str || str.indexOf("<") === -1) {
|
|
201
|
+
return str;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
let result = str;
|
|
205
|
+
let prev: string;
|
|
206
|
+
|
|
207
|
+
// Repeat until no more changes (prevents nested tag attacks like <scri<script>pt>)
|
|
208
|
+
do {
|
|
209
|
+
prev = result;
|
|
210
|
+
result = result
|
|
211
|
+
.replace(sanitizeRx.tags, "")
|
|
212
|
+
.replace(sanitizeRx.eventHandlers, "")
|
|
213
|
+
.replace(sanitizeRx.dangerousURIs, "$1=\"\"");
|
|
214
|
+
} while (result !== prev);
|
|
215
|
+
|
|
216
|
+
return result;
|
|
188
217
|
}
|
|
189
218
|
|
|
190
219
|
/**
|
|
@@ -817,7 +846,7 @@ function tplProcess(tpl: string, data: object): string {
|
|
|
817
846
|
res = res.replace(new RegExp(`{=${x}}`, "g"), data[x]);
|
|
818
847
|
}
|
|
819
848
|
|
|
820
|
-
return res;
|
|
849
|
+
return sanitize(res);
|
|
821
850
|
}
|
|
822
851
|
|
|
823
852
|
/**
|