Title: A Directed Acyclic Graph Extension for 'blockr'
Version: 0.1.0
Description: Building on the docking layout manager provided by 'blockr.dock', this provides an extension that allows for visualizing and manipulating a 'blockr' board using a DAG-based user interface powered by the 'g6R' graph visualisation HTML widget.
License: GPL (≥ 3)
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: blockr.core (≥ 0.1.1), blockr.dock, shiny, g6R (≥ 0.5.0), jsonlite, htmltools
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), roxy.shinylive, webshot2, quarto, cyclocomp, shinytest2, colorspace
Config/testthat/edition: 3
URL: https://bristolmyerssquibb.github.io/blockr.dag/
VignetteBuilder: quarto
NeedsCompilation: no
Packaged: 2025-12-12 08:55:54 UTC; davidgranjon
Author: David Granjon [aut, cre], Nicolas Bennett [aut], Christoph Sax [aut], Bristol Myers Squibb [fnd]
Maintainer: David Granjon <david@cynkra.com>
Repository: CRAN
Date/Publication: 2025-12-18 13:50:02 UTC

Description

Create network data from board

Usage

g6_edges_from_links(links)

g6_nodes_from_blocks(blocks, stacks)

g6_combos_data_from_stacks(stacks)

g6_data_from_board(board)

Arguments

links

Board links.

blocks

Board blocks.

stacks

Board stacks.

board

Board object.


Context menu functions

Description

Functions for creating and working with context menu entries.

Usage

new_context_menu_entry(
  name,
  js,
  action = NULL,
  condition = TRUE,
  id = tolower(gsub(" +", "_", name))
)

is_context_menu_entry(x)

context_menu_items(x)

Arguments

name

Name of the context menu entry.

js

JavaScript code to execute when the entry is selected.

action

Action to perform when the entry is selected.

condition

Condition to determine if the entry should be shown.

id

Unique identifier for the context menu entry. Inferred from name if not provided

x

Object

Details

new_context_menu_entry()

Creates a new context menu entry with the specified name, JavaScript code, action function, and display condition.

is_context_menu_entry()

Tests whether an object is a valid context menu entry.

context_menu_items()

Generic function to extract context menu items from various objects like dock extensions, boards, or lists.

The context_menu_items.dag_extension() method provides the following actions:

Value

new_context_menu_entry()

A context menu entry object of class "context_menu_entry" containing condition, action, and js functions, with name and id attributes.

is_context_menu_entry()

TRUE if x is a context menu entry, FALSE otherwise.

context_menu_items()

A list of context menu items for the given object.


DAG extension

Description

Visualizes the DAG (directed acyclic graph) underlying a board and provides UI elements to manipulate the board.

Usage

new_dag_extension(graph = NULL, ...)

Arguments

graph

A graph object (or NULL).

...

Forwarded to blockr.dock::new_dock_extension().

Value

A dag_extension object that extends the dock extension system for visualizing and manipulating DAG workflows.


Graph object

Description

R list-based representation of a g6 graph object.

Usage

new_graph(nodes = list(), edges = list(), combos = list())

is_graph(x)

graph_nodes(x)

graph_edges(x)

graph_combos(x)

as_graph(x, ...)

## S3 method for class 'graph'
as_graph(x, ...)

## S3 method for class 'list'
as_graph(x, ...)

Arguments

nodes

Graph nodes (i.e. board blocks).

edges

Graph edges (i.e. board links).

combos

Node groups (i.e. board stacks).

x

Object to test or convert.

...

Generic consistency.

Details

new_graph()

Creates a new graph object with the specified nodes, edges, and combos.

is_graph()

Tests whether an object is a valid graph object.

graph_nodes()

Extracts the nodes component from a graph object.

graph_edges()

Extracts the edges component from a graph object.

graph_combos()

Extracts the combos component from a graph object.

as_graph()

Generic function to convert objects to graph format.

Value

new_graph()

A graph object of class "graph" containing nodes, edges, and combos lists.

is_graph()

TRUE if x is a graph object, FALSE otherwise.

graph_nodes()

A list of graph nodes.

graph_edges()

A list of graph edges.

graph_combos()

A list of graph combos (node groups).

as_graph()

A graph object converted from the input.


Toolbar item functions

Description

Functions for creating and working with toolbar items for the DAG interface.

Usage

new_toolbar_item(id, icon, js, action = NULL, tooltip = NULL)

is_toolbar_item(x)

toolbar_items(x)

Arguments

id

Unique identifier for the toolbar item.

icon

Name of an icon to show in the toolbar.

js

JavaScript code to execute when the entry is selected.

action

Action to perform when the entry is selected.

tooltip

Optional tooltip text for the entry.

x

Object

Details

new_toolbar_item()

Creates a new toolbar item with the specified id, icon, JavaScript code, action function, and tooltip text.

is_toolbar_item()

Tests whether an object is a valid toolbar item.

toolbar_items()

Generic function to extract toolbar items from various objects like dock extensions, boards, or lists.

The toolbar_items.dag_extension() method provides the following actions:

Value

new_toolbar_item()

A toolbar item object of class "toolbar_item" containing action and js functions, with id, icon, and tooltip attributes.

is_toolbar_item()

TRUE if x is a toolbar item, FALSE otherwise.

toolbar_items()

A list of toolbar items for the given object.