flexdesk 0.12.1 → 0.14.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 +86 -1
- package/css/flexdesk.css +176 -0
- package/dist/charts.js +4 -73
- package/dist/charts.js.map +3 -3
- package/dist/{chunk-2LEJQD4H.js → chunk-IYMNDPWH.js} +109 -2
- package/dist/chunk-IYMNDPWH.js.map +7 -0
- package/dist/flexdesk.css +176 -0
- package/dist/flow.js +3 -0
- package/dist/flow.js.map +2 -2
- package/dist/host.js +138 -0
- package/dist/host.js.map +3 -3
- package/dist/tiles.js +1752 -1031
- package/dist/tiles.js.map +4 -4
- package/dist/widgets.js +563 -5
- package/dist/widgets.js.map +3 -3
- package/dist/wm.js +146 -0
- package/dist/wm.js.map +3 -3
- package/package.json +1 -1
- package/src/charts/chart_types.js +40 -1
- package/src/flow/kit/dom.js +6 -0
- package/src/host/photino_host.js +176 -0
- package/src/host/photino_host.md +98 -0
- package/src/tiles/chart_tiles.js +827 -0
- package/src/tiles/tile_grid.js +4 -3
- package/src/tiling/bottom_panel_tabs.js +201 -0
- package/src/ui/components/alert_log.js +274 -0
- package/src/ui/components/alerts_pane.js +294 -0
- package/src/ui/components/notification_history.js +54 -4
- package/src/ui/utils/auto_scrollbars.js +30 -0
- package/dist/chunk-2LEJQD4H.js.map +0 -7
package/dist/flexdesk.css
CHANGED
|
@@ -394,6 +394,12 @@
|
|
|
394
394
|
padding: 0 3px;
|
|
395
395
|
line-height: 1;
|
|
396
396
|
}
|
|
397
|
+
/* On an alert log (STORY-0020): the worst unread level's colour, and the bell
|
|
398
|
+
* itself brighter while anything is unread. */
|
|
399
|
+
.twm-notification-history__badge--info { background: var(--color-info); }
|
|
400
|
+
.twm-notification-history__badge--warning { background: var(--color-warning); color: #1e1e1e; }
|
|
401
|
+
.twm-notification-history__badge--alert { background: var(--color-danger); }
|
|
402
|
+
.twm-notification-history__trigger--unread { color: var(--text-bright); }
|
|
397
403
|
.twm-notification-history__panel {
|
|
398
404
|
position: fixed;
|
|
399
405
|
z-index: 9999;
|
|
@@ -3448,6 +3454,83 @@ body.twm-window-maximized .twm-resize-handle {
|
|
|
3448
3454
|
.twm-tile-error .material-symbols-outlined {
|
|
3449
3455
|
font-size: 32px;
|
|
3450
3456
|
}
|
|
3457
|
+
|
|
3458
|
+
/* ── the chart and KPI tiles (0.13.0, src/tiles/chart_tiles.js) ──────── */
|
|
3459
|
+
/* The figure flexes into what `.tile-content`'s column leaves; the note takes
|
|
3460
|
+
its own line BELOW it, so the height chain above is untouched. */
|
|
3461
|
+
.fd-chart-tile {
|
|
3462
|
+
display: flex;
|
|
3463
|
+
flex-direction: column;
|
|
3464
|
+
flex: 1 1 auto;
|
|
3465
|
+
min-width: 0;
|
|
3466
|
+
min-height: 0;
|
|
3467
|
+
position: relative;
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3470
|
+
/* Plotly puts `.js-plotly-plot` on the figure itself, and the rule above makes
|
|
3471
|
+
that `height: 100% !important` — which, beside a note, pushes the note out of
|
|
3472
|
+
the tile. Here the flex column sizes the figure instead. */
|
|
3473
|
+
.tile-content .fd-chart-tile.js-plotly-plot {
|
|
3474
|
+
height: auto !important;
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
.fd-chart-tile__note {
|
|
3478
|
+
flex: 0 0 auto;
|
|
3479
|
+
padding: 2px 8px 0;
|
|
3480
|
+
font-size: var(--font-size-xs);
|
|
3481
|
+
line-height: 1.35;
|
|
3482
|
+
color: var(--text-muted);
|
|
3483
|
+
white-space: nowrap;
|
|
3484
|
+
overflow: hidden;
|
|
3485
|
+
text-overflow: ellipsis;
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
.fd-kpi {
|
|
3489
|
+
--fd-kpi-value: 30px;
|
|
3490
|
+
flex: 1 1 auto;
|
|
3491
|
+
display: flex;
|
|
3492
|
+
flex-direction: column;
|
|
3493
|
+
align-items: flex-start;
|
|
3494
|
+
justify-content: center;
|
|
3495
|
+
gap: 2px;
|
|
3496
|
+
min-height: 0;
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3499
|
+
.fd-kpi__label {
|
|
3500
|
+
color: var(--text-secondary);
|
|
3501
|
+
font-size: var(--font-size-xs);
|
|
3502
|
+
text-transform: uppercase;
|
|
3503
|
+
letter-spacing: 0.06em;
|
|
3504
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
.fd-kpi__value {
|
|
3508
|
+
font-size: var(--fd-kpi-value);
|
|
3509
|
+
font-weight: 700;
|
|
3510
|
+
color: var(--text-bright);
|
|
3511
|
+
line-height: 1.1;
|
|
3512
|
+
font-variant-numeric: tabular-nums;
|
|
3513
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
/* AN ARROW AND A SIGN, not a colour alone: the modifiers change the colour,
|
|
3517
|
+
the character in front of the number survives a monochrome display. */
|
|
3518
|
+
.fd-kpi__delta {
|
|
3519
|
+
display: inline-flex;
|
|
3520
|
+
align-items: center;
|
|
3521
|
+
gap: 3px;
|
|
3522
|
+
font-size: var(--font-size-sm);
|
|
3523
|
+
font-variant-numeric: tabular-nums;
|
|
3524
|
+
color: var(--text-secondary);
|
|
3525
|
+
}
|
|
3526
|
+
.fd-kpi__delta--up { color: var(--color-success); }
|
|
3527
|
+
.fd-kpi__delta--down { color: var(--color-danger); }
|
|
3528
|
+
|
|
3529
|
+
.fd-kpi__foot {
|
|
3530
|
+
color: var(--text-muted);
|
|
3531
|
+
font-size: var(--font-size-xs);
|
|
3532
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
|
|
3533
|
+
}
|
|
3451
3534
|
/* ===================================================================
|
|
3452
3535
|
REUSABLE ACTION DROPDOWN COMPONENT
|
|
3453
3536
|
Used by Add Scenario, Add Widget, and other action dropdowns
|
|
@@ -7660,6 +7743,28 @@ tr:hover .twm-row-action { opacity: 1; }
|
|
|
7660
7743
|
color: var(--text-bright);
|
|
7661
7744
|
border-bottom-color: #fff;
|
|
7662
7745
|
}
|
|
7746
|
+
/* A tab's count (createBottomPanelTabs' setBadge): Alerts' unread in the
|
|
7747
|
+
* worst unread level's colour, a Changes count in the neutral one. */
|
|
7748
|
+
.twm-bp__badge {
|
|
7749
|
+
display: inline-flex;
|
|
7750
|
+
align-items: center;
|
|
7751
|
+
justify-content: center;
|
|
7752
|
+
min-width: 16px;
|
|
7753
|
+
height: 16px;
|
|
7754
|
+
margin-left: 6px;
|
|
7755
|
+
padding: 0 4px;
|
|
7756
|
+
box-sizing: border-box;
|
|
7757
|
+
border-radius: 8px;
|
|
7758
|
+
background: var(--accent);
|
|
7759
|
+
color: #fff;
|
|
7760
|
+
font-size: 10.5px;
|
|
7761
|
+
line-height: 16px;
|
|
7762
|
+
text-transform: none;
|
|
7763
|
+
}
|
|
7764
|
+
.twm-bp__badge[hidden] { display: none; }
|
|
7765
|
+
.twm-bp__badge--info { background: color-mix(in srgb, var(--color-info) 35%, var(--surface-0)); }
|
|
7766
|
+
.twm-bp__badge--warning { background: color-mix(in srgb, var(--color-warning) 35%, var(--surface-0)); }
|
|
7767
|
+
.twm-bp__badge--alert { background: color-mix(in srgb, var(--color-danger) 45%, var(--surface-0)); }
|
|
7663
7768
|
.twm-bp__body {
|
|
7664
7769
|
flex: 1 1 auto;
|
|
7665
7770
|
min-height: 0;
|
|
@@ -7705,6 +7810,77 @@ tr:hover .twm-row-action { opacity: 1; }
|
|
|
7705
7810
|
.twm-bp-log__row--error .twm-bp-log__level,
|
|
7706
7811
|
.twm-bp-log__row--error .twm-bp-log__msg { color: var(--color-danger); }
|
|
7707
7812
|
.twm-bp-log__msg { color: var(--text-body); white-space: pre-wrap; word-break: break-word; }
|
|
7813
|
+
|
|
7814
|
+
/* ── The Alerts pane (alerts_pane.js, STORY-0019) ─────────────────────────
|
|
7815
|
+
* bugdesk's Alerts tab, on tokens: rules on the left when the embedder has
|
|
7816
|
+
* them, the log on the right, newest first, grouped by day. */
|
|
7817
|
+
.twm-alerts { display: flex; height: 100%; min-height: 0; font-size: var(--font-size-xs); color: var(--text-body); }
|
|
7818
|
+
/* In the bottom panel the pane fills the body, so the log scrolls and the
|
|
7819
|
+
* status line sits at the foot. Only a pane holding the Alerts pane: other
|
|
7820
|
+
* panes keep their padding and their own height. */
|
|
7821
|
+
.twm-bp-pane:has(> .twm-alerts) { height: 100%; padding: 0; box-sizing: border-box; }
|
|
7822
|
+
.twm-alerts .material-symbols-outlined { font-size: 15px; }
|
|
7823
|
+
.twm-alerts__spacer { flex: 1 1 auto; }
|
|
7824
|
+
.twm-alerts__rules { flex: 0 0 280px; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border-subtle); }
|
|
7825
|
+
.twm-alerts__head, .twm-alerts__bar { flex: none; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-bottom: 1px solid var(--border-subtle); }
|
|
7826
|
+
.twm-alerts__bar { flex-wrap: wrap; }
|
|
7827
|
+
.twm-alerts__caps { color: var(--text-muted); font-size: 10.5px; letter-spacing: .08em; }
|
|
7828
|
+
.twm-alerts__link { padding: 0; border: 0; background: none; color: var(--accent-bright); font: inherit; cursor: pointer; }
|
|
7829
|
+
.twm-alerts__link:hover { text-decoration: underline; }
|
|
7830
|
+
.twm-alerts__rulelist { flex: 1 1 auto; overflow-y: auto; padding: 4px 0; }
|
|
7831
|
+
.twm-alerts__rulebtn { width: 100%; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px; border: 0; background: none; color: var(--text-body); font: inherit; cursor: pointer; }
|
|
7832
|
+
.twm-alerts__rulebtn:hover { background: var(--state-hover); }
|
|
7833
|
+
.twm-alerts__rulebtn--on { background: var(--state-selected); box-shadow: inset 2px 0 0 var(--accent-bright); }
|
|
7834
|
+
.twm-alerts__rulebtn--off { color: var(--text-dim); }
|
|
7835
|
+
.twm-alerts__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
|
|
7836
|
+
.twm-alerts__dot--alert { background: var(--color-danger); }
|
|
7837
|
+
.twm-alerts__dot--warning { background: var(--color-warning); }
|
|
7838
|
+
.twm-alerts__dot--info { background: var(--color-info); }
|
|
7839
|
+
.twm-alerts__rulename { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
7840
|
+
.twm-alerts__meta { flex: none; color: var(--text-muted); font-size: 11px; }
|
|
7841
|
+
.twm-alerts__foot { padding: 6px 12px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 11px; line-height: 1.4; }
|
|
7842
|
+
.twm-alerts__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
|
|
7843
|
+
.twm-alerts__chips { display: flex; gap: 4px; }
|
|
7844
|
+
.twm-alerts__chip { height: 24px; padding: 0 10px; border: 1px solid var(--surface-3); border-radius: 12px; background: none; color: var(--text-secondary); font: inherit; cursor: pointer; }
|
|
7845
|
+
.twm-alerts__chip:hover { color: var(--text-bright); }
|
|
7846
|
+
.twm-alerts__count { color: var(--text-muted); }
|
|
7847
|
+
.twm-alerts__chip--on { border-color: var(--accent-bright); background: var(--state-selected); color: var(--text-bright); }
|
|
7848
|
+
.twm-alerts__q { width: 220px; height: 24px; box-sizing: border-box; padding: 0 8px; border: 1px solid var(--surface-3); border-radius: 3px; background: var(--surface-1); color: var(--text-body); font: inherit; }
|
|
7849
|
+
.twm-alerts__q:focus { outline: none; border-color: var(--accent-bright); }
|
|
7850
|
+
.twm-alerts__btn { height: 24px; }
|
|
7851
|
+
.twm-alerts__btn[hidden] { display: none; }
|
|
7852
|
+
.twm-alerts__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
|
|
7853
|
+
.twm-alerts__day { padding: 8px 12px 4px 34px; color: var(--text-muted); font-size: 10.5px; letter-spacing: .08em; }
|
|
7854
|
+
.twm-alerts__row { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px; }
|
|
7855
|
+
.twm-alerts__row:hover { background: var(--state-hover); }
|
|
7856
|
+
.twm-alerts__unread { flex: 0 0 7px; height: 7px; border-radius: 50%; }
|
|
7857
|
+
.twm-alerts__row--unread .twm-alerts__unread { background: var(--accent-bright); }
|
|
7858
|
+
.twm-alerts__icon { flex: 0 0 18px; }
|
|
7859
|
+
.twm-alerts__row--info .twm-alerts__icon { color: var(--color-info); }
|
|
7860
|
+
.twm-alerts__row--warning .twm-alerts__icon { color: var(--color-warning); }
|
|
7861
|
+
.twm-alerts__row--alert .twm-alerts__icon { color: var(--color-danger); }
|
|
7862
|
+
.twm-alerts__time { flex: 0 0 78px; color: var(--text-muted); white-space: nowrap; }
|
|
7863
|
+
.twm-alerts__rule { flex: 0 0 170px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
|
|
7864
|
+
.twm-alerts__tag { flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; background: var(--surface-2); color: var(--text-secondary); font-size: 10.5px; }
|
|
7865
|
+
.twm-alerts__tag--none { display: none; }
|
|
7866
|
+
.twm-alerts__ref { flex: 0 0 auto; max-width: 140px; padding: 0; border: 0; background: none; font-family: var(--font-family-mono); font-size: 11.5px; color: var(--accent-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
|
|
7867
|
+
button.twm-alerts__ref { cursor: pointer; }
|
|
7868
|
+
button.twm-alerts__ref:hover { text-decoration: underline; }
|
|
7869
|
+
.twm-alerts__ref:empty { display: none; }
|
|
7870
|
+
.twm-alerts__text { flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; overflow: hidden; white-space: nowrap; }
|
|
7871
|
+
.twm-alerts__title { overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
|
|
7872
|
+
.twm-alerts__row--unread .twm-alerts__title { color: var(--text-primary); font-weight: 500; }
|
|
7873
|
+
.twm-alerts__body { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
|
|
7874
|
+
.twm-alerts__state { flex: 0 0 128px; font-size: 11px; color: var(--text-muted); }
|
|
7875
|
+
.twm-alerts__state--gone { color: var(--text-dim); font-style: italic; }
|
|
7876
|
+
.twm-alerts__acts { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 2px; }
|
|
7877
|
+
.twm-alerts__icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--text-muted); cursor: pointer; }
|
|
7878
|
+
.twm-alerts__icon-btn:hover { background: var(--surface-2); color: var(--text-bright); }
|
|
7879
|
+
.twm-alerts__icon-btn .material-symbols-outlined { font-size: 14px; }
|
|
7880
|
+
.twm-alerts__none { padding: 28px 16px; text-align: center; color: var(--text-muted); }
|
|
7881
|
+
.twm-alerts__more { display: block; margin: 8px auto; height: 24px; }
|
|
7882
|
+
.twm-alerts__status { flex: none; display: flex; align-items: center; height: 26px; padding: 0 12px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 11px; }
|
|
7883
|
+
.twm-alerts__status[hidden] { display: none; }
|
|
7708
7884
|
/* Context menu — override main_new.css's .twm-context-menu to the tighter,
|
|
7709
7885
|
* grid-style look (icon | label) with a flat surface-1 background and
|
|
7710
7886
|
* square corners. All callers (sidebars, tile chrome, desktop bar, …)
|
package/dist/flow.js
CHANGED
|
@@ -199,6 +199,7 @@ function openPopover({ anchor, content, label, className = "", onClose = null, f
|
|
|
199
199
|
handle.close("escape");
|
|
200
200
|
};
|
|
201
201
|
const onResize = () => place();
|
|
202
|
+
const sized = typeof ResizeObserver === "function" ? new ResizeObserver(() => place()) : null;
|
|
202
203
|
const handle = {
|
|
203
204
|
el: pop,
|
|
204
205
|
anchor,
|
|
@@ -212,6 +213,7 @@ function openPopover({ anchor, content, label, className = "", onClose = null, f
|
|
|
212
213
|
document.removeEventListener("mousedown", onPress, true);
|
|
213
214
|
pop.removeEventListener("keydown", onKey);
|
|
214
215
|
window.removeEventListener("resize", onResize);
|
|
216
|
+
sized?.disconnect();
|
|
215
217
|
pop.remove();
|
|
216
218
|
if (ACTIVE === handle) ACTIVE = null;
|
|
217
219
|
if (held && reason !== "blur" && anchor?.isConnected) anchor.focus?.({ preventScroll: true });
|
|
@@ -226,6 +228,7 @@ function openPopover({ anchor, content, label, className = "", onClose = null, f
|
|
|
226
228
|
}, 0);
|
|
227
229
|
pop.addEventListener("keydown", onKey);
|
|
228
230
|
window.addEventListener("resize", onResize);
|
|
231
|
+
sized?.observe(pop);
|
|
229
232
|
place();
|
|
230
233
|
(focus || pop).focus?.({ preventScroll: true });
|
|
231
234
|
return handle;
|