flexdesk 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -1
- package/css/flexdesk.css +106 -9
- package/css/overrides.css +29 -9
- package/dist/charts.js +4 -73
- package/dist/charts.js.map +3 -3
- package/dist/{chunk-5QPGYHBN.js → chunk-CWPMLX67.js} +2 -2
- package/dist/{chunk-2LEJQD4H.js → chunk-IYMNDPWH.js} +109 -2
- package/dist/chunk-IYMNDPWH.js.map +7 -0
- package/dist/{chunk-6EZPPN4E.js → chunk-NNFTETK3.js} +8 -4
- package/dist/chunk-NNFTETK3.js.map +7 -0
- package/dist/flexdesk.css +106 -9
- package/dist/flow.js +1 -1
- package/dist/tiles.js +1752 -1031
- package/dist/tiles.js.map +4 -4
- package/dist/widgets.js +2 -2
- package/dist/wm.js +23 -5
- package/dist/wm.js.map +2 -2
- package/package.json +1 -1
- package/src/charts/chart_types.js +40 -1
- package/src/tiles/chart_tiles.js +827 -0
- package/src/tiles/tile_grid.js +4 -3
- package/src/tiling/content_registry.js +5 -0
- package/src/tiling/tile_renderer.js +45 -3
- package/src/ui/components/modal.js +4 -2
- package/dist/chunk-2LEJQD4H.js.map +0 -7
- package/dist/chunk-6EZPPN4E.js.map +0 -7
- /package/dist/{chunk-5QPGYHBN.js.map → chunk-CWPMLX67.js.map} +0 -0
package/package.json
CHANGED
|
@@ -566,12 +566,17 @@ export function buildLegendLayout(position) {
|
|
|
566
566
|
* `yAxisId` matches an axis id in sp.yAxes[].id; omitted → first axis.
|
|
567
567
|
* @param {Array<{x0:number, x1:number, label?:string, color?:string, opacity?:number, labelY?:number, labelColor?:string}>} [opts.shadedBands]
|
|
568
568
|
* Vertical stripes (rectangles spanning full y range) to mark policy/recession periods.
|
|
569
|
+
* @param {Array<{x:(number|string|Date), label?:string, color?:string, lineStyle?:string, lineWidth?:number, labelY?:number}>} [opts.verticalLines]
|
|
570
|
+
* Vertical markers at one x — a "today" line on a burndown. Drawn full height
|
|
571
|
+
* (`yref: 'paper'`), after the reference lines, so a call without them builds
|
|
572
|
+
* exactly what it built before they existed. `x` is in the x axis's own units:
|
|
573
|
+
* a number, a category, or a date string/Date on a date axis.
|
|
569
574
|
* @param {Object<string,string>} [opts.yRefByAxisId]
|
|
570
575
|
* Mapping from subplot yAxes[i].id → Plotly yref ('y', 'y2', ...).
|
|
571
576
|
* @returns {{shapes: Array, annotations: Array}}
|
|
572
577
|
*/
|
|
573
578
|
export function buildOverlayShapes(opts = {}) {
|
|
574
|
-
const { referenceLines = [], shadedBands = [], yRefByAxisId = {} } = opts;
|
|
579
|
+
const { referenceLines = [], shadedBands = [], verticalLines = [], yRefByAxisId = {} } = opts;
|
|
575
580
|
const shapes = [];
|
|
576
581
|
const annotations = [];
|
|
577
582
|
const dashMap = { solid: 'solid', dashed: 'dash', dotted: 'dot', dashdot: 'dashdot' };
|
|
@@ -643,6 +648,40 @@ export function buildOverlayShapes(opts = {}) {
|
|
|
643
648
|
}
|
|
644
649
|
}
|
|
645
650
|
|
|
651
|
+
for (const mark of verticalLines) {
|
|
652
|
+
// `0` is a real x, so the test is null/undefined/NaN — never truthiness.
|
|
653
|
+
if (mark == null || mark.x == null || (typeof mark.x === 'number' && !Number.isFinite(mark.x))) continue;
|
|
654
|
+
const color = mark.color || 'rgba(255, 200, 0, 0.75)';
|
|
655
|
+
shapes.push({
|
|
656
|
+
type: 'line',
|
|
657
|
+
xref: 'x',
|
|
658
|
+
yref: 'paper',
|
|
659
|
+
x0: mark.x,
|
|
660
|
+
x1: mark.x,
|
|
661
|
+
y0: 0,
|
|
662
|
+
y1: 1,
|
|
663
|
+
line: {
|
|
664
|
+
color,
|
|
665
|
+
width: mark.lineWidth ?? 1.5,
|
|
666
|
+
dash: dashMap[mark.lineStyle || 'dashed'] || 'dash',
|
|
667
|
+
},
|
|
668
|
+
layer: 'above',
|
|
669
|
+
});
|
|
670
|
+
if (mark.label) {
|
|
671
|
+
annotations.push({
|
|
672
|
+
x: mark.x,
|
|
673
|
+
y: mark.labelY ?? 1.0,
|
|
674
|
+
xref: 'x',
|
|
675
|
+
yref: 'paper',
|
|
676
|
+
text: mark.label,
|
|
677
|
+
showarrow: false,
|
|
678
|
+
font: { size: 10, color },
|
|
679
|
+
xanchor: 'left',
|
|
680
|
+
yanchor: 'bottom',
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
646
685
|
return { shapes, annotations };
|
|
647
686
|
}
|
|
648
687
|
|