flexdesk 0.15.2 → 0.16.1
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/LICENSE +0 -0
- package/README.md +70 -0
- package/THIRD_PARTY_LICENSES.md +0 -0
- package/css/base.css +0 -0
- package/css/flexdesk.css +153 -0
- package/css/overrides.css +0 -0
- package/css/reset.css +0 -0
- package/css/tokens.css +0 -0
- package/dist/canvas.js +0 -0
- package/dist/canvas.js.map +0 -0
- package/dist/charts.js +0 -0
- package/dist/charts.js.map +0 -0
- package/dist/chunk-3PHCPZHT.js +0 -0
- package/dist/chunk-3PHCPZHT.js.map +0 -0
- package/dist/chunk-6JSOVNID.js +0 -0
- package/dist/chunk-6JSOVNID.js.map +0 -0
- package/dist/chunk-B5Q53LAJ.js +111 -0
- package/dist/chunk-B5Q53LAJ.js.map +7 -0
- package/dist/chunk-FBGP5KN5.js +0 -0
- package/dist/chunk-FBGP5KN5.js.map +0 -0
- package/dist/chunk-FL5KFNQH.js +0 -0
- package/dist/chunk-FL5KFNQH.js.map +0 -0
- package/dist/chunk-FOOS3T5L.js +0 -0
- package/dist/chunk-FOOS3T5L.js.map +0 -0
- package/dist/chunk-JYWURG5T.js +0 -0
- package/dist/chunk-JYWURG5T.js.map +0 -0
- package/dist/chunk-NLTOY57M.js +0 -0
- package/dist/chunk-NLTOY57M.js.map +0 -0
- package/dist/chunk-NNFTETK3.js +0 -0
- package/dist/chunk-NNFTETK3.js.map +0 -0
- package/dist/chunk-O5OHMWBB.js +0 -0
- package/dist/chunk-O5OHMWBB.js.map +0 -0
- package/dist/chunk-RQM5Z2MU.js +0 -0
- package/dist/chunk-RQM5Z2MU.js.map +0 -0
- package/dist/chunk-SN4LSOAR.js +0 -0
- package/dist/chunk-SN4LSOAR.js.map +0 -0
- package/dist/{chunk-CWPMLX67.js → chunk-W6FBJLPW.js} +2 -110
- package/dist/{chunk-CWPMLX67.js.map → chunk-W6FBJLPW.js.map} +3 -3
- package/dist/chunk-WVFGV5FT.js +0 -0
- package/dist/chunk-WVFGV5FT.js.map +0 -0
- package/dist/core.js +0 -0
- package/dist/core.js.map +0 -0
- package/dist/editor.js +0 -0
- package/dist/editor.js.map +0 -0
- package/dist/flexdesk.css +153 -0
- package/dist/flow.js +0 -0
- package/dist/flow.js.map +0 -0
- package/dist/host.js +80 -1
- package/dist/host.js.map +3 -3
- package/dist/reset.css +0 -0
- package/dist/tile_registry-6WZPTUZV.js +0 -0
- package/dist/tile_registry-6WZPTUZV.js.map +0 -0
- package/dist/tiles.js +471 -16
- package/dist/tiles.js.map +4 -4
- package/dist/tokens.css +0 -0
- package/dist/widgets.js +73 -9
- package/dist/widgets.js.map +3 -3
- package/dist/wm.js +4 -2
- package/dist/wm.js.map +1 -1
- package/package.json +1 -1
- package/src/canvas/canvas_adapter.js +0 -0
- package/src/canvas/edge_router.js +0 -0
- package/src/canvas/graph/connector_router.js +0 -0
- package/src/canvas/graph/history_service.js +0 -0
- package/src/canvas/graph/node_platform.js +0 -0
- package/src/canvas/index.js +0 -0
- package/src/charts/chart_types.js +0 -0
- package/src/charts/data_series_plot_window.js +0 -0
- package/src/charts/downsample.js +0 -0
- package/src/charts/plot_config.js +0 -0
- package/src/charts/plot_popout_window.js +0 -0
- package/src/charts/plotly_wrapper.js +0 -0
- package/src/core/event_bus.js +0 -0
- package/src/core/logging.js +0 -0
- package/src/core/settings.js +0 -0
- package/src/core/state_guard.js +0 -0
- package/src/core/state_guard_config.js +0 -0
- package/src/core/state_machine.js +0 -0
- package/src/editor/editor_pane.js +0 -0
- package/src/editor/monaco_editor_factory.js +0 -0
- package/src/editor/monaco_loader.js +0 -0
- package/src/editor/notebook_search.js +0 -0
- package/src/editor/notebook_tab_bar.js +0 -0
- package/src/editor/notebook_undo_manager.js +0 -0
- package/src/editor/split_pane_container.js +0 -0
- package/src/flow/canvas_editor/editor.js +0 -0
- package/src/flow/canvas_editor/index.js +0 -0
- package/src/flow/canvas_editor/layout.js +0 -0
- package/src/flow/canvas_editor/strings.js +0 -0
- package/src/flow/kit/always_before.js +0 -0
- package/src/flow/kit/catalogue.js +0 -0
- package/src/flow/kit/chip_input.js +0 -0
- package/src/flow/kit/dom.js +0 -0
- package/src/flow/kit/findings.js +0 -0
- package/src/flow/kit/history.js +0 -0
- package/src/flow/kit/index.js +0 -0
- package/src/flow/kit/keys.js +0 -0
- package/src/flow/kit/logic_graph.js +0 -0
- package/src/flow/kit/references.js +0 -0
- package/src/flow/kit/settings_panel.js +0 -0
- package/src/flow/kit/settings_schema.js +0 -0
- package/src/flow/kit/step_picker.js +0 -0
- package/src/flow/kit/strings.js +0 -0
- package/src/flow/kit/value_picker.js +0 -0
- package/src/flow/kit/widgets.js +0 -0
- package/src/flow/lanes/editor.js +0 -0
- package/src/flow/lanes/index.js +0 -0
- package/src/flow/lanes/layout.js +0 -0
- package/src/flow/lanes/pipeline.js +0 -0
- package/src/flow/lanes/preview.js +0 -0
- package/src/flow/lanes/strings.js +0 -0
- package/src/flow/outline/editor.js +0 -0
- package/src/flow/outline/index.js +0 -0
- package/src/flow/outline/mapping.js +0 -0
- package/src/flow/outline/menu.js +0 -0
- package/src/flow/outline/operations.js +0 -0
- package/src/flow/outline/recognise.js +0 -0
- package/src/flow/outline/strings.js +0 -0
- package/src/help/help_modal.js +0 -0
- package/src/help/help_registry.js +0 -0
- package/src/host/external_links.js +94 -0
- package/src/host/host.js +4 -1
- package/src/host/photino_host.js +7 -0
- package/src/host/photino_host.md +18 -0
- package/src/host/pywebview_host.js +0 -0
- package/src/tiles/chart_tiles.js +0 -0
- package/src/tiles/config_schema.js +0 -0
- package/src/tiles/layout_persistence.js +0 -0
- package/src/tiles/list_tiles.js +422 -0
- package/src/tiles/scope_picker.js +96 -0
- package/src/tiles/tile_base.js +11 -0
- package/src/tiles/tile_grid.js +36 -1
- package/src/tiles/tile_registry.js +0 -0
- package/src/tiling/bottom_panel_tabs.js +0 -0
- package/src/tiling/command_palette.js +0 -0
- package/src/tiling/content_registry.js +0 -0
- package/src/tiling/desktops.js +0 -0
- package/src/tiling/entity_sources.js +0 -0
- package/src/tiling/keymap.js +0 -0
- package/src/tiling/kind_taxonomy.js +0 -0
- package/src/tiling/landing_table.js +0 -0
- package/src/tiling/loading_overlay.js +0 -0
- package/src/tiling/nav_panel.js +0 -0
- package/src/tiling/page_factory.js +0 -0
- package/src/tiling/panel_keys.js +0 -0
- package/src/tiling/shell.js +0 -0
- package/src/tiling/tab_strip.js +0 -0
- package/src/tiling/tile_breadcrumb.js +0 -0
- package/src/tiling/tile_renderer.js +0 -0
- package/src/tiling/tile_tab_menu.js +0 -0
- package/src/tiling/tile_tree.js +0 -0
- package/src/tiling/wm.js +0 -0
- package/src/tiling/zoom.js +0 -0
- package/src/ui/base/component_base.js +0 -0
- package/src/ui/base/controller_base.js +0 -0
- package/src/ui/base/page_base.js +0 -0
- package/src/ui/components/about_dialog.js +0 -0
- package/src/ui/components/action_dropdown.js +0 -0
- package/src/ui/components/alert_log.js +0 -0
- package/src/ui/components/alerts_pane.js +0 -0
- package/src/ui/components/attribute_list_editor.js +0 -0
- package/src/ui/components/autocomplete_field.js +0 -0
- package/src/ui/components/column_fit.js +0 -0
- package/src/ui/components/computing_status_window.js +0 -0
- package/src/ui/components/confirm_dialog.js +0 -0
- package/src/ui/components/context_menu.js +0 -0
- package/src/ui/components/data_table.js +0 -0
- package/src/ui/components/detail_header.js +0 -0
- package/src/ui/components/drag_reorder.js +0 -0
- package/src/ui/components/fact_table.js +0 -0
- package/src/ui/components/gallery_picker.js +0 -0
- package/src/ui/components/inline_renamer.js +0 -0
- package/src/ui/components/managed_window.js +0 -0
- package/src/ui/components/modal.js +0 -0
- package/src/ui/components/notification_history.js +0 -0
- package/src/ui/components/record_list.js +0 -0
- package/src/ui/components/row_activation.js +0 -0
- package/src/ui/components/slide_out_panel.js +0 -0
- package/src/ui/components/slider_field.js +0 -0
- package/src/ui/components/sortable_list.js +26 -4
- package/src/ui/components/table_filter_chips.js +0 -0
- package/src/ui/components/table_state_store.js +0 -0
- package/src/ui/components/table_values.js +0 -0
- package/src/ui/components/toast.js +0 -0
- package/src/ui/components/tree_view.js +0 -0
- package/src/ui/components/window_taskbar.js +0 -0
- package/src/ui/controllers/panel_state_machine.js +0 -0
- package/src/ui/controllers/window_chrome_controller.js +0 -0
- package/src/ui/notification_center.js +0 -0
- package/src/ui/utils/auto_scrollbars.js +0 -0
- package/src/ui/utils/native_context_menu.js +61 -0
- package/src/ui/utils/overlay_scrollbar.js +0 -0
- package/src/ui/utils/raf_resize_observer.js +0 -0
- package/src/ui/utils/scroll_lock.js +0 -0
- package/src/ui/utils/tooltip_service.js +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
import { DragReorder } from './drag_reorder.js';
|
|
21
21
|
|
|
22
|
+
/** The class every row carries, and therefore what DragReorder must match. */
|
|
23
|
+
const ROW_CLASS = 'twm-sortable-list__row';
|
|
24
|
+
const ROW_SELECTOR = `.${ROW_CLASS}`;
|
|
25
|
+
const HANDLE_CLASS = 'twm-sortable-list__handle';
|
|
26
|
+
const HANDLE_SELECTOR = `.${HANDLE_CLASS}`;
|
|
27
|
+
|
|
22
28
|
export class SortableList {
|
|
23
29
|
/**
|
|
24
30
|
* Create a sortable list.
|
|
@@ -60,6 +66,7 @@ export class SortableList {
|
|
|
60
66
|
this.root = null;
|
|
61
67
|
this.listEl = null;
|
|
62
68
|
this._dragReorder = null;
|
|
69
|
+
this._pressedHandle = false;
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
/**
|
|
@@ -198,15 +205,30 @@ export class SortableList {
|
|
|
198
205
|
// placeholder). Created once, bound to the persistent list
|
|
199
206
|
// element; re-attached after each refresh to wire the rebuilt
|
|
200
207
|
// rows. Drag is restricted to the grip handle.
|
|
208
|
+
//
|
|
209
|
+
// The item selector is ROW_SELECTOR, the class #createRow puts on
|
|
210
|
+
// every row: a selector that matches no row makes nothing draggable.
|
|
211
|
+
//
|
|
212
|
+
// The handle restriction cannot read `dragstart`'s target: a browser
|
|
213
|
+
// fires `dragstart` at the draggable element itself (the row), never
|
|
214
|
+
// at the child the pointer went down on. So the press is recorded on
|
|
215
|
+
// `mousedown` (which does target the handle) and the guard reads that.
|
|
201
216
|
if (this.allowReorder) {
|
|
202
217
|
if (!this._dragReorder) {
|
|
218
|
+
this.listEl.addEventListener('mousedown', (e) => {
|
|
219
|
+
this._pressedHandle = !!e.target.closest?.(HANDLE_SELECTOR);
|
|
220
|
+
});
|
|
203
221
|
this._dragReorder = new DragReorder({
|
|
204
222
|
container: this.listEl,
|
|
205
|
-
itemSelector:
|
|
223
|
+
itemSelector: ROW_SELECTOR,
|
|
206
224
|
keyAttr: 'index',
|
|
207
225
|
axis: 'y',
|
|
208
226
|
indicatorClass: 'twm-sortable-list__drop',
|
|
209
|
-
draggableGuard: (
|
|
227
|
+
draggableGuard: () => {
|
|
228
|
+
const fromHandle = this._pressedHandle;
|
|
229
|
+
this._pressedHandle = false;
|
|
230
|
+
return fromHandle;
|
|
231
|
+
},
|
|
210
232
|
onReorder: (order) => this.#applyReorder(order),
|
|
211
233
|
});
|
|
212
234
|
}
|
|
@@ -229,7 +251,7 @@ export class SortableList {
|
|
|
229
251
|
|
|
230
252
|
#createRow(item, index) {
|
|
231
253
|
const row = document.createElement('div');
|
|
232
|
-
row.className =
|
|
254
|
+
row.className = ROW_CLASS;
|
|
233
255
|
row.dataset.index = index;
|
|
234
256
|
|
|
235
257
|
// Drag handle (if reordering enabled). The drag mechanics are
|
|
@@ -237,7 +259,7 @@ export class SortableList {
|
|
|
237
259
|
// handle is just the grab affordance the drag is restricted to.
|
|
238
260
|
if (this.allowReorder) {
|
|
239
261
|
const handle = document.createElement('div');
|
|
240
|
-
handle.className =
|
|
262
|
+
handle.className = HANDLE_CLASS;
|
|
241
263
|
handle.innerHTML = '<span class="material-symbols-outlined">drag_indicator</span>';
|
|
242
264
|
row.appendChild(handle);
|
|
243
265
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* native_context_menu.js — the browser's own right-click menu, only where it helps.
|
|
3
|
+
*
|
|
4
|
+
* A FlexDesk app draws its own context menus (DataTable rows and headers, tabs,
|
|
5
|
+
* tiles, the top bar). Everywhere else a right-click shows the browser's or the
|
|
6
|
+
* webview's menu: Back, Reload, Save as, Print, Inspect. In a desktop window
|
|
7
|
+
* that makes the app look like a web page and offers moves that break it.
|
|
8
|
+
*
|
|
9
|
+
* This keeps the native menu where it is the useful one, editable text (Paste)
|
|
10
|
+
* and selected text (Copy), and prevents it everywhere nobody else claimed the
|
|
11
|
+
* right-click.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Input types that take typed text, where Paste belongs. */
|
|
15
|
+
const TEXT_INPUTS = new Set(['', 'text', 'search', 'url', 'tel', 'email', 'password', 'number',
|
|
16
|
+
'date', 'datetime-local', 'month', 'week', 'time']);
|
|
17
|
+
|
|
18
|
+
function isEditable(el) {
|
|
19
|
+
if (!el || el.nodeType !== 1) return false;
|
|
20
|
+
const tag = el.tagName;
|
|
21
|
+
if (tag === 'TEXTAREA' || tag === 'SELECT') return true;
|
|
22
|
+
if (tag === 'INPUT') return TEXT_INPUTS.has(String(el.getAttribute('type') || '').toLowerCase());
|
|
23
|
+
return !!el.closest?.('[contenteditable=""],[contenteditable="true"],[contenteditable="plaintext-only"]');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** A non-empty selection that the click landed inside. */
|
|
27
|
+
function onSelection(target, doc) {
|
|
28
|
+
const sel = doc?.getSelection?.();
|
|
29
|
+
if (!sel || sel.isCollapsed || !String(sel).trim()) return false;
|
|
30
|
+
for (let i = 0; i < sel.rangeCount; i += 1) {
|
|
31
|
+
if (sel.getRangeAt(i).intersectsNode?.(target)) return true;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Prevent the native context menu wherever no handler claimed the right-click.
|
|
38
|
+
*
|
|
39
|
+
* Listens in the bubble phase, so every element handler runs first: one that
|
|
40
|
+
* shows its own menu calls `preventDefault()`, and this leaves it alone. A
|
|
41
|
+
* handler that stops propagation never reaches here at all.
|
|
42
|
+
*
|
|
43
|
+
* @param {object} [opts]
|
|
44
|
+
* @param {EventTarget} [opts.root=document]
|
|
45
|
+
* @param {(e: MouseEvent) => boolean} [opts.allow] true keeps the native menu for that event
|
|
46
|
+
* @returns {{ dispose: () => void }}
|
|
47
|
+
*/
|
|
48
|
+
export function suppressNativeContextMenu({ root, allow } = {}) {
|
|
49
|
+
const r = root ?? (typeof document !== 'undefined' ? document : null);
|
|
50
|
+
if (!r) return { dispose() {} };
|
|
51
|
+
const onMenu = (e) => {
|
|
52
|
+
if (e.defaultPrevented) return;
|
|
53
|
+
const t = e.target;
|
|
54
|
+
if (isEditable(t)) return;
|
|
55
|
+
if (onSelection(t, t?.ownerDocument)) return;
|
|
56
|
+
if (allow?.(e)) return;
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
};
|
|
59
|
+
r.addEventListener('contextmenu', onMenu);
|
|
60
|
+
return { dispose() { r.removeEventListener('contextmenu', onMenu); } };
|
|
61
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|