@datarails-ai/dr-appspace-cli 0.11.3 → 0.11.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/cli.js +321 -53
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import { fileURLToPath as fileURLToPath6 } from "url";
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
15
|
name: "@datarails-ai/dr-appspace-cli",
|
|
16
|
-
version: "0.11.
|
|
16
|
+
version: "0.11.4",
|
|
17
17
|
description: "Datarails App Space CLI \u2014 build, try, push and publish App Space apps",
|
|
18
18
|
type: "module",
|
|
19
19
|
engines: {
|
|
@@ -57,7 +57,7 @@ var package_default = {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
// src/buildInfo.ts
|
|
60
|
-
var BUILD_TIME = "2026-10-
|
|
60
|
+
var BUILD_TIME = "2026-10-07T16:55:45.981Z";
|
|
61
61
|
function formatBuildTime(iso) {
|
|
62
62
|
if (iso === "") return "";
|
|
63
63
|
const d = new Date(iso);
|
|
@@ -5940,23 +5940,23 @@ __export(components_gen_exports, {
|
|
|
5940
5940
|
WIDGET_KINDS: () => WIDGET_KINDS
|
|
5941
5941
|
});
|
|
5942
5942
|
var REGISTRY_VERSION = Object.freeze(11);
|
|
5943
|
-
var ELEMENT_TYPES = Object.freeze(["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
5944
|
-
var COMPONENT_TYPES = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
5945
|
-
var APP_TYPES = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
5943
|
+
var ELEMENT_TYPES = Object.freeze(["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
5944
|
+
var COMPONENT_TYPES = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
5945
|
+
var APP_TYPES = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
5946
5946
|
var DASHBOARD_TYPES = Object.freeze(["region", "grid", "control", "nav", "tab", "slot"]);
|
|
5947
|
-
var COMPONENT_ATTRIBUTES = Object.freeze(["data-dr-component", "data-dr-entity", "data-dr-action", "data-dr-source", "data-dr-field", "data-dr-param", "data-dr-role", "data-dr-filter", "data-dr-id", "data-dr-label", "data-dr-measure", "data-dr-tone", "data-dr-kind", "data-dr-x", "data-dr-y", "data-dr-series", "data-dr-format", "data-dr-negative", "data-dr-module", "data-dr-args", "data-dr-props", "data-dr-declares", "data-dr-when"]);
|
|
5948
|
-
var COMPONENT_PROPS = Object.freeze([["data-dr-entity", "entity"], ["data-dr-action", "action"], ["data-dr-source", "source"], ["data-dr-field", "field"], ["data-dr-param", "param"], ["data-dr-role", "role"], ["data-dr-id", "id"], ["data-dr-label", "label"], ["data-dr-measure", "measure"], ["data-dr-tone", "tone"], ["data-dr-kind", "kind"], ["data-dr-x", "x"], ["data-dr-y", "y"], ["data-dr-series", "series"], ["data-dr-format", "format"], ["data-dr-negative", "negative"], ["data-dr-module", "module"]]);
|
|
5949
|
-
var STRUCTURED_ATTRIBUTES = Object.freeze([["data-dr-filter", "filter"], ["data-dr-args", "args"], ["data-dr-props", "props"], ["data-dr-declares", "declares"], ["data-dr-when", "when"]]);
|
|
5947
|
+
var COMPONENT_ATTRIBUTES = Object.freeze(["data-dr-component", "data-dr-entity", "data-dr-action", "data-dr-source", "data-dr-field", "data-dr-param", "data-dr-role", "data-dr-filter", "data-dr-id", "data-dr-label", "data-dr-measure", "data-dr-tone", "data-dr-kind", "data-dr-x", "data-dr-y", "data-dr-series", "data-dr-format", "data-dr-negative", "data-dr-module", "data-dr-args", "data-dr-props", "data-dr-declares", "data-dr-when", "data-dr-bind", "data-dr-status-map", "data-dr-badge-map", "data-dr-badge-labels"]);
|
|
5948
|
+
var COMPONENT_PROPS = Object.freeze([["data-dr-entity", "entity"], ["data-dr-action", "action"], ["data-dr-source", "source"], ["data-dr-field", "field"], ["data-dr-param", "param"], ["data-dr-role", "role"], ["data-dr-id", "id"], ["data-dr-label", "label"], ["data-dr-measure", "measure"], ["data-dr-tone", "tone"], ["data-dr-kind", "kind"], ["data-dr-x", "x"], ["data-dr-y", "y"], ["data-dr-series", "series"], ["data-dr-format", "format"], ["data-dr-negative", "negative"], ["data-dr-module", "module"], ["data-dr-bind", "bind"]]);
|
|
5949
|
+
var STRUCTURED_ATTRIBUTES = Object.freeze([["data-dr-filter", "filter"], ["data-dr-args", "args"], ["data-dr-props", "props"], ["data-dr-declares", "declares"], ["data-dr-when", "when"], ["data-dr-status-map", "status_map"], ["data-dr-badge-map", "badge_map"], ["data-dr-badge-labels", "badge_labels"]]);
|
|
5950
5950
|
var HANDLER_ROLES = Object.freeze(["list", "save", "remove", "submit", "inbox", "decide", "summary", "history", "custom"]);
|
|
5951
5951
|
var CHART_KINDS = Object.freeze(["line", "bar", "area"]);
|
|
5952
5952
|
var CHART_FORMATS = Object.freeze(["currency", "number", "percent"]);
|
|
5953
5953
|
var PLATFORM_FORMAT = Object.freeze({ "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$" });
|
|
5954
5954
|
var NEGATIVE_MODES = Object.freeze(["minus", "red_minus", "absolute", "red_absolute"]);
|
|
5955
5955
|
var FORMAT_PATTERNS = Object.freeze({ "currency": "$#,###", "number": "#,###", "percent": '#,###.#"%"' });
|
|
5956
|
-
var PLATFORM_NUMBERS = Object.freeze({ "dr-app-runtime": "1.
|
|
5956
|
+
var PLATFORM_NUMBERS = Object.freeze({ "dr-app-runtime": "1.10.0", "dr-app-widgets": "1.2.0", "dr-components": "1.2.0", "dr-components-controls": "1.1.0" });
|
|
5957
5957
|
var ROW_ACTION_WHEN = Object.freeze({ "dr-components": "1.2.0" });
|
|
5958
5958
|
var PROPS_SINCE = Object.freeze({ "select": { "multiple": "1.3.0", "searchable": "1.3.0", "group_by": "1.3.0", "values": "1.3.0", "options[].group": "1.3.0" }, "data_grid": { "theme": "1.3.0", "hierarchy": "1.3.0", "totals": "1.3.0", "pin": "1.3.0", "csv_params": "1.3.0", "columns[].cell": "1.3.0", "columns[].badge_map": "1.3.0", "columns[].status_map": "1.3.0", "columns[].link_field": "1.3.0", "columns[].call": "1.3.0", "selection": "1.4.0", "sticky_header": "1.4.0", "search": "1.4.0", "row_detail": "1.4.0", "columns[].weight": "1.4.0", "columns[].currency_field": "1.4.0", "columns[].cell_secondary": "1.4.0", "columns[].badge_labels": "1.4.0", "detail_fields": "1.4.0", "columns[].compact": "1.5.0", "columns[].truncate": "1.5.0", "columns[].max_width": "1.5.0" }, "filter_bar": { "layout": "1.4.0", "filters[].kind=text": "1.4.0", "filters[].kind=number-range": "1.4.0", "filters[].param_min": "1.4.0", "filters[].param_max": "1.4.0", "filters[].mode": "1.4.0", "filters[].placeholder": "1.4.0", "filters[].placeholder_min": "1.4.0", "filters[].placeholder_max": "1.4.0" } });
|
|
5959
|
-
var MODULE_OF = Object.freeze({ "widget": "dr-app-widgets", "form": "dr-app-runtime", "list": "dr-app-runtime", "detail": "dr-app-runtime", "queue": "dr-app-runtime", "action": "dr-app-runtime", "filter": "dr-app-runtime", "stat": "dr-app-runtime", "chart": "dr-app-runtime", "custom": "dr-app-runtime", "field": "dr-app-runtime", "number_input": "dr-components", "tabs": "dr-components", "tab_panel": "dr-components", "select": "dr-components", "date_picker": "dr-components", "data_grid": "dr-components", "dialog": "dr-components", "variance_table": "dr-components", "toggle": "dr-components", "control_group": "dr-components", "callout": "dr-components", "scenario_columns": "dr-components", "slider": "dr-components-controls", "button": "dr-components", "status": "dr-components", "badge": "dr-components", "tag": "dr-components", "empty_state": "dr-components", "stepper": "dr-components", "alert": "dr-components", "checkbox": "dr-components", "radio_group": "dr-components", "file_upload": "dr-components", "skeleton": "dr-components", "progress": "dr-components", "accordion": "dr-components", "tooltip_info": "dr-components", "filter_bar": "dr-components", "filter_chip": "dr-components", "date_range": "dr-components", "fiscal_month": "dr-components", "search_input": "dr-components" });
|
|
5959
|
+
var MODULE_OF = Object.freeze({ "widget": "dr-app-widgets", "form": "dr-app-runtime", "list": "dr-app-runtime", "detail": "dr-app-runtime", "queue": "dr-app-runtime", "action": "dr-app-runtime", "filter": "dr-app-runtime", "stat": "dr-app-runtime", "chart": "dr-app-runtime", "custom": "dr-app-runtime", "field": "dr-app-runtime", "number_input": "dr-components", "tabs": "dr-components", "tab_panel": "dr-components", "select": "dr-components", "date_picker": "dr-components", "data_grid": "dr-components", "dialog": "dr-components", "variance_table": "dr-components", "toggle": "dr-components", "control_group": "dr-components", "callout": "dr-components", "scenario_columns": "dr-components", "slider": "dr-components-controls", "button": "dr-components", "status": "dr-components", "badge": "dr-components", "tag": "dr-components", "empty_state": "dr-components", "stepper": "dr-components", "alert": "dr-components", "checkbox": "dr-components", "radio_group": "dr-components", "file_upload": "dr-components", "skeleton": "dr-components", "progress": "dr-components", "accordion": "dr-components", "tooltip_info": "dr-components", "filter_bar": "dr-components", "filter_chip": "dr-components", "date_range": "dr-components", "fiscal_month": "dr-components", "search_input": "dr-components", "split_pane": "dr-components", "file_viewer": "dr-components", "line_grid": "dr-components", "document": "dr-components", "panel": "dr-app-runtime" });
|
|
5960
5960
|
var STAT_TONES = Object.freeze(["default", "positive", "warning", "negative"]);
|
|
5961
5961
|
var WIDGET_KINDS = Object.freeze(["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative"]);
|
|
5962
5962
|
var KIND_READS = Object.freeze({ "line": ["series"], "area": ["series"], "bar": ["series", "breakdown"], "stacked": ["series"], "pie": ["breakdown"], "donut": ["breakdown"], "kpi": ["kpi"], "candle": ["ohlc"], "bubble": ["scatter"], "table": ["table"], "narrative": ["narrative"] });
|
|
@@ -5964,14 +5964,14 @@ var APP_WIDGET_KINDS = Object.freeze(["waterfall", "waterfall-breakdown", "water
|
|
|
5964
5964
|
var APP_KIND_READS = Object.freeze({ "waterfall": ["breakdown", "series"], "waterfall-breakdown": ["breakdown", "series"], "waterfall-walkthrough": ["breakdown", "series"], "line-forecast": ["series"], "heatmap": ["series"], "combo": ["series"], "stacked-percent": ["series"], "gauge": ["kpi"] });
|
|
5965
5965
|
var SMART_COMPARES = Object.freeze(["BvA", "AvF", "vs_prev_period"]);
|
|
5966
5966
|
var PLATFORM_FINANCE = Object.freeze({ "dr-app-widgets": "1.2.0" });
|
|
5967
|
-
var STRICT_TYPES = Object.freeze(["number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
5968
|
-
var PROPS_SCHEMAS = Object.freeze({ "region": { "type": "object", "properties": {} }, "grid": { "type": "object", "properties": {} }, "widget": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the card's title on an app page" }, "role": { "type": "string", "description": "data-dr-role: the app role this card is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "kind": { "enum": ["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative", "waterfall", "waterfall-breakdown", "waterfall-walkthrough", "line-forecast", "heatmap", "combo", "stacked-percent", "gauge"], "description": "data-dr-kind on an app page, the widget kind on a dashboard. The last eight (the finance kinds: waterfall ... gauge) are app pages only, from dr-app-widgets 1.2.0; a dashboard card takes one of the first eleven" }, "source": { "type": "string", "description": "the handler whose payload an app card draws (data-dr-source), or the SPEC key a dashboard card draws" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the card's numbers read" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "props": { "type": "object", "additionalProperties": false, "properties": { "variant": { "enum": ["smart"], "description": "a kpi card's variant: smart is the platform's smart KPI, one comparison pill (compare) in the platform's status colours; app pages, dr-app-widgets 1.2.0 on" }, "compare": { "enum": ["BvA", "AvF", "vs_prev_period"], "description": "a smart kpi's comparison: BvA / AvF read the kpi source's compare (budget / forecast), vs_prev_period its delta; default BvA when the source compares, else vs_prev_period" }, "color_rule": { "enum": ["higher_is_better", "lower_is_better"], "description": "which way is good for a smart kpi's delta and a gauge's goal: lower_is_better for a cost; default higher_is_better" }, "goal": { "type": "number", "description": "a gauge's goal, in the figure's units; absent, the kpi source's compare value" }, "total": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall's closing bar: {label}, default Total" }, "variance": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall-breakdown's unexplained bar: {label}, default Variance" }, "forecast_from": { "type": "string", "description": "a line-forecast over ONE series: the period on the x axis the forecast starts at" }, "dual_axis": { "type": "boolean", "description": "a combo: false keeps the line on the columns' axis; default true (a second axis)" } }, "description": "data-dr-props: an APP card's typed props (dr-app-widgets 1.2.0 on), sorted JSON on the page, read back by the extractor: a smart kpi's variant, compare and color_rule; a gauge's goal and color_rule; a waterfall's total and variance; a line-forecast's forecast_from; a combo's dual_axis" }, "title": { "type": "string", "description": "a dashboard card's title" }, "subtitle": { "type": "string", "description": "the line under a dashboard card's title" }, "description": { "type": "string", "description": "what a dashboard card shows, in words" }, "params": { "type": "array", "description": "the params a dashboard card honours" } } }, "control": { "type": "object", "properties": { "param": { "type": "string", "description": "the param it moves" }, "control_kind": { "type": "string", "description": "the control's kind" }, "type": { "type": "string", "description": "the input type" }, "min": { "type": "string", "description": "the lowest value" }, "max": { "type": "string", "description": "the highest value" }, "step": { "type": "string", "description": "the step" }, "value": { "type": "string", "description": "the starting value" }, "label": { "type": "string", "description": "the label" } } }, "nav": { "type": "object", "properties": { "aria_label": { "type": "string", "description": "the nav's accessible name" } } }, "tab": { "type": "object", "properties": { "current": { "type": "boolean", "description": "true on the page it names" }, "href": { "type": "string", "description": "the page it links to" }, "label": { "type": "string", "description": "the text it shows" } } }, "slot": { "type": "object", "properties": {} }, "form": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the form writes" }, "action": { "type": "string", "description": "data-dr-action: the handler that saves it" } } }, "list": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table listed" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers the rows" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "detail": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the row is from" }, "action": { "type": "string", "description": "data-dr-action: the handler it acts through" } } }, "queue": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table queued" }, "source": { "type": "string", "description": "data-dr-source: the inbox handler" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "action": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "action": { "type": "string", "description": "data-dr-action: the handler it runs" }, "param": { "type": "string", "description": "data-dr-param: the argument it passes" }, "entity": { "type": "string", "description": "data-dr-entity: the table the handler acts on" }, "when": { "type": "object", "description": 'data-dr-when: the states a ROW ACTION is drawn in, one JSON object of column to the values the row may hold ({"status": ["open", "in_progress"]}), every column matched; a row without the column keeps the action. It hides a button and refuses nothing: the handler still has to (dr-app-runtime 1.7.1 on an action in a list or a queue; dr-components 1.2.0 on a data_grid row action)' } } }, "filter": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "field": { "type": "string", "description": "data-dr-field: the column filtered" }, "entity": { "type": "string", "description": "data-dr-entity: the table filtered" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" } } }, "stat": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the summary handler" }, "measure": { "type": "string", "description": "data-dr-measure: the key of the number shown" }, "tone": { "type": "string", "description": "data-dr-tone: default | positive | warning | negative" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the figure reads: a word or a platform format string" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "chart": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows it draws" }, "kind": { "enum": ["line", "bar", "area"], "description": "data-dr-kind: what it draws" }, "x": { "type": "string", "description": "data-dr-x: the column on the category axis" }, "y": { "type": "string", "description": "data-dr-y: the one numeric column drawn" }, "series": { "type": "string", "description": "data-dr-series: the column whose distinct values are one line each" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how a number reads; percent is a value already in percent units" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "custom": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose answer the module receives" }, "module": { "type": "string", "pattern": "^components/[a-z][a-z0-9_-]*\\.js$", "description": "data-dr-module: the file that draws it" }, "args": { "type": "object", "description": "data-dr-args: one JSON object handed to the module as ui.args; absent means {}" }, "declares": { "type": "object", "description": "data-dr-declares: what the module does, stated for graders and app-space test \u2014 nothing draws from it and the runtime never reads it. Every key is optional; a name it lists must be one the contract declares (custom_declares)", "additionalProperties": false, "properties": { "reads": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the data.sources entries and handlers whose answers it draws" }, "calls": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the handlers it calls through ui.call; app-space test reports a call to any other (custom-undeclared-call)" }, "produces": { "type": "object", "description": `per called handler, the payload keys it sends \u2014 {"project": ["growth", "hires"]}; for a handler it does not list, app-space test reads the keys off the module's ui.call object literal`, "additionalProperties": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "shows": { "type": "array", "description": "the numbers it displays; the module projects each one on the element that shows it (data-dr-field, data-dr-value, data-dr-format), which app-space test harvests into the element's values", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the field the number is, as its data-dr-field names it" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how it reads, as its data-dr-format says" }, "scale": { "enum": ["fraction"], "description": "fraction: the value is a share (0.04) shown as a percent (4%)" } } } } } } } }, "field": { "type": "object", "properties": { "entity": { "type": "string", "description": "data-dr-entity: the table the column is in" }, "field": { "type": "string", "description": "data-dr-field: the column" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers its choices" }, "label": { "type": "string", "description": "the field's label" }, "required": { "type": "boolean", "description": "true when the form cannot be saved without it" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" } } }, "number_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["format"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "what the number is: the unit shown beside the input" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "min": { "type": "number", "description": "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, "max": { "type": "number", "description": "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, "step": { "type": "number", "description": "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, "decimals": { "type": "integer", "minimum": 0, "description": "the decimals the STORED value is rounded to, after scaling; default as typed" }, "value": { "type": "number", "description": "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the input's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "the hint shown while the input is empty" } }, "description": "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } }, "tabs": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tabs"], "properties": { "tabs": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the tab's id, which a tab_panel's tab names" }, "label": { "type": "string", "minLength": 1, "description": "the text on the tab" } } }, "description": "the tabs, in order" }, "default": { "type": "string", "description": "the id of the tab open first; default the first tab" } }, "description": "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } }, "tab_panel": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tab"], "properties": { "tab": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the id of the tab (in the enclosing tabs) this panel belongs to" } }, "description": "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } }, "select": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: optional; the handler whose rows are the options when props.options is absent" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this select writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this select reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group"); dr-components 1.3.0' } } }, "description": "the options; when absent they are the page param's values (param mode), else the source rows" }, "option_value": { "type": "string", "description": "with a source: the row column that is stored; default id" }, "option_label": { "type": "string", "description": "with a source: the row column the reader sees; default the value column" }, "value": { "type": "string", "description": "field mode: the option chosen first; default none. Param mode reads ctx.params instead" }, "values": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "field mode with multiple: the options chosen first; default none (dr-components 1.3.0)" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a choice; default Choose\u2026" }, "multiple": { "type": "boolean", "description": "many values: field mode writes them as one list (a dialog posts the list), param mode moves a multi param; default false, one value (dr-components 1.3.0)" }, "searchable": { "type": "boolean", "description": "a search box over the list, filtering by label; default false (dr-components 1.3.0)" }, "group_by": { "type": "string", "minLength": 1, "description": "the key the list is grouped under: a source row's column, or group on a stated option; default none (dr-components 1.3.0)" } }, "description": "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } }, "date_picker": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this picker reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over a month param is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the date or month the picker starts on; default none. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Pick a date / Pick a month" } }, "description": "data-dr-props: the date_picker part's typed props, handed to it as PartProps.props" } } }, "data_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows the grid shows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row key the column shows" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent", "text", "date"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads; default text" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "align": { "enum": ["start", "end"], "description": "default end for currency, number and percent, start otherwise" }, "sortable": { "type": "boolean", "description": "whether the header sorts; default true" }, "cell": { "enum": ["badge", "status", "chip", "link", "toggle"], "description": "how the value draws instead of text (dr-components 1.3.0, the dr-grid cell renderers): badge (a dr-badge, its colour from badge_map), status (a dr-status, its type from status_map), chip (the value, or each value of a list, as a chip), link (the value as a link: to link_field's URL, else opening the row through on_row), toggle (a switch over a boolean; call flips it, without it the switch is read-only)" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "a dr-badge colour" }, "description": "cell badge: value \u2192 dr-badge colour; an unmapped value is stone (dr-components 1.3.0)" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "a dr-status type" }, "description": "cell status: value \u2192 dr-status type; an unmapped value is default (dr-components 1.3.0)" }, "link_field": { "type": "string", "minLength": 1, "description": "cell link: the row column holding the link's URL (same-origin path, #hash, or http(s)); default none: the link opens the row (on_row) (dr-components 1.3.0)" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "cell toggle: a handler called with {id, row, field, value} when the reader flips the switch; the page re-reads after. Without it the switch is read-only (dr-components 1.3.0)" }, "weight": { "enum": ["strong"], "description": "strong draws the cell's text bold (the row's lead column: a vendor, an account) (dr-components 1.4.0)" }, "currency_field": { "type": "string", "minLength": 1, "description": "format currency only: the row column holding each row's ISO currency code (EUR, ILS, GBP, USD\u2026), so the symbol is the row's own; a row without it falls back to currency, else USD (dr-components 1.4.0)" }, "cell_secondary": { "type": "string", "minLength": 1, "description": `cell badge only: the row column whose text the badge shows, while badge_map still colours it by the cell's own value (a PO state coloured by matched / difference, reading "\u2713 matched") (dr-components 1.4.0)` }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "cell badge only: value \u2192 the text the badge shows (true \u2192 Paid, false \u2192 Unpaid); an unlisted value shows itself. The projection keeps the raw value (dr-components 1.4.0)" }, "compact": { "type": "boolean", "description": "currency and number: false draws the exact figure (\u20AC1,315.08), where the runtime abbreviates from 1,000 (\u20AC1.3K); default the runtime's (dr-components 1.5.0)" }, "truncate": { "type": "boolean", "description": "one line, cut with an ellipsis at max_width (default 240px), the whole value on hover (dr-components 1.5.0)" }, "max_width": { "type": "integer", "minimum": 40, "description": "the column's widest, in px: longer values wrap, or with truncate are cut (dr-components 1.5.0)" } } }, "description": "the columns, in order" }, "key": { "type": "string", "description": "the column whose value is each row's data-dr-row, and the id a row action posts; default id. A row without it projects its position as data-dr-row and draws no row actions (1.1.1); with row_actions the compiler requires it stated and a column the source's rows carry, and, where a row action writes through a remove, save or decide handler, that table's primary key (part_row_key)" }, "theme": { "enum": ["default", "borderless", "editable", "inside-card"], "description": "the dr-grid theme (dr-components 1.3.0): default (rows and header 56px), borderless (40px, no row lines), editable (40px, a focus ring on the cell), inside-card (rows 56px, a 32px header, for a grid inside a card); default default" }, "hierarchy": { "type": "object", "additionalProperties": false, "required": ["parent", "label"], "properties": { "parent": { "type": "string", "minLength": 1, "description": "the column holding each row's parent row key (the key column's value); empty for a top row" }, "label": { "type": "string", "minLength": 1, "description": "the column drawn as the tree: indented by depth, with expand / collapse on a parent" }, "expanded": { "type": "boolean", "description": "whether parents start open; default true" } }, "description": "tree rows (dr-components 1.3.0): a P&L's accounts under their parents, each parent's number columns the sum of its children's unless the source answers the parent's own; sorting orders siblings" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row, summing the top rows' number columns (currency, number, a platform format string; a percent is left blank), pinned above or below the rows (dr-components 1.3.0); default none" }, "pin": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "the leading columns (fields) that stay in view while the grid scrolls sideways, in column order (dr-components 1.3.0)" }, "csv_params": { "type": "object", "additionalProperties": false, "properties": { "file_name": { "type": "string", "minLength": 1, "description": "the downloaded file's name; default the element id, .csv" } }, "description": "draws an Export CSV button (dr-grid-toolbar csvParams, dr-components 1.3.0): every row in the grid's order, parents and totals included, numbers raw, headers as shown" }, "selection": { "type": "object", "additionalProperties": false, "required": ["bulk_actions"], "properties": { "bulk_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens once over the selection, and its Confirm posts ids (the selected rows' keys) with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {ids} (the selected rows' keys); the selection clears and the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel), the selection's size in it; default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }] }, "description": "the bulk bar's buttons, shown while rows are ticked: open a row dialog over the selection, or call a handler with {ids}" } }, "description": "a checkbox column (a header box ticks or clears the page's rows) and, while any row is ticked, a bar above the grid: N selected, the bulk actions, Clear selection. Only keyed rows can be ticked; ticks a search hides are dropped. A dialog action's on_confirm, like a call, is a custom handler that reads ids (dr-components 1.4.0)" }, "sticky_header": { "type": "boolean", "description": "the header row stays in view while the grid scrolls (thead sticky inside the grid's own scroll box, which is capped at the viewport's height); default false (dr-components 1.4.0)" }, "search": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "an inline search box above the grid that narrows the loaded rows to those whose named fields hold the typed text (case-insensitive); it is the grid's own, not a page param (dr-components 1.4.0)" }, "row_detail": { "enum": ["drawer"], "description": "drawer: clicking a row opens a side panel listing the row's columns (or detail_fields), field by field (on_row still runs when stated) (dr-components 1.4.0)" }, "detail_fields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "row_detail only: the row fields the drawer lists, in order; default the grid's columns. A field that is no column is drawn as text (dr-components 1.4.0)" }, "page_size": { "type": "integer", "minimum": 5, "description": "rows per page; default 10" }, "sort": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the column sorted first" }, "dir": { "enum": ["asc", "desc"], "description": "default asc" } }, "description": "the order the rows start in; default the order the handler answered" }, "on_row": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {row} when a reader opens a row; the page re-reads after it" }, "row_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens over the row, its inputs prefilled, and posts id with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {id, row} (id: the row's key column); the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel); default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }] }, "description": "a button per row for each action, after the columns: open a dialog over the row, or call a handler with it" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the data_grid part's typed props, handed to it as PartProps.props" } } }, "dialog": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "trigger": { "type": "string", "minLength": 1, "description": "the text on the button that opens it; default the element's label, else its title \u2014 the compiler writes it into the page (foldDialogTriggers). A dialog with none of the three and no values_from row is refused (part_mode); a row dialog (values_from row) takes none, a row action opens it" }, "title": { "type": "string", "description": "the dialog's title; default the element's label" }, "description": { "type": "string", "description": "one line under the title" }, "confirm": { "type": "string", "description": "the text on the confirm button; default Confirm" }, "on_confirm": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Confirm calls with the fields of the inputs inside; without one, Confirm only closes" }, "values_from": { "enum": ["row"], "description": "row: a data_grid row action opens it over one row \u2014 the inputs inside start from that row's values, and Confirm posts id (the row's key) with their fields, to a save handler" }, "key": { "type": "string", "minLength": 1, "description": "with values_from row: the row column posted as id; default the grid's key, else id" } }, "description": "data-dr-props: the dialog part's typed props, handed to it as PartProps.props" } } }, "variance_table": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows are the lines" }, "props": { "type": "object", "additionalProperties": false, "required": ["row", "actual", "plan"], "properties": { "row": { "type": "string", "minLength": 1, "description": "the column naming each line; its value is the line's data-dr-row" }, "actual": { "type": "string", "minLength": 1, "description": "the column holding the actual figure" }, "plan": { "type": "string", "minLength": 1, "description": "the column holding the plan (budget) figure" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how actual, plan and variance read; default currency" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how actual, plan and variance read below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good: higher (the default) for revenue, lower for cost" }, "threshold": { "type": "object", "additionalProperties": false, "required": [], "properties": { "abs": { "type": "number", "minimum": 0, "description": "a variance smaller than this, in the figures' units, is neutral" }, "pct": { "type": "number", "minimum": 0, "description": "a variance share smaller than this fraction (0.05 is 5%) is neutral" } }, "description": "below both limits a variance is neutral rather than toned; default none" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the variance_table part's typed props, handed to it as PartProps.props" } } }, "toggle": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this switch writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this switch reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts on; default off. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the switch's label; default the page param's label (param mode), else the element's label" }, "description": { "type": "string", "description": "one line under the label" } }, "description": "data-dr-props: the toggle part's typed props, handed to it as PartProps.props" } } }, "control_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "columns": { "enum": [1, 2, 3, 4], "description": "how many controls sit side by side; default 1 (under 640px always 1)" }, "label_position": { "enum": ["top", "start"], "description": "top (the default): each label above its control; start: every label in one column before its control" }, "description": { "type": "string", "description": "one line above the controls" } }, "description": "data-dr-props: the control_group part's typed props, handed to it as PartProps.props" } } }, "callout": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer the rules read \u2014 a summary's measures, a KPI, or rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["rules"], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["when", "tone", "text"], "properties": { "when": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["path", "gte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "gte": { "type": "number", "description": "matches when the value is at least this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "lte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "lte": { "type": "number", "description": "matches when the value is at most this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "eq"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "eq": { "type": ["string", "number", "boolean"], "description": "matches when the value is exactly this" } } }], "description": "the condition: one path and one of gte, lte, eq" }, "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } } }, "description": "tried in order; the first whose when holds is the sentence" }, "default": { "type": "object", "additionalProperties": false, "required": ["tone", "text"], "properties": { "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } }, "description": "what it says when no rule holds; default nothing" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } }, "description": "data-dr-props: the callout part's typed props, handed to it as PartProps.props" } } }, "scenario_columns": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose rows are the scenarios" }, "props": { "type": "object", "additionalProperties": false, "required": ["key", "label_field", "metrics"], "properties": { "key": { "type": "string", "minLength": 1, "description": "the column naming each row uniquely; its value is the column's data-dr-row" }, "label_field": { "type": "string", "minLength": 1, "description": "the column whose value heads each scenario's column" }, "metrics": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row column the line shows" }, "label": { "type": "string", "description": "the line's name; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good for the delta's tone: higher (the default) or lower" } } }, "description": "the lines, in order" }, "max": { "type": "integer", "minimum": 1, "description": "how many rows may be ticked at once; default 3 (at most 6)" }, "baseline": { "type": "string", "minLength": 1, "description": "the key value of the row every delta is against; default the first row" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the scenario_columns part's typed props, handed to it as PartProps.props" } } }, "slider": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this slider writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this slider reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "min": { "type": "number", "description": "the track's low end, in stored units; default the page param's min (param mode), else 0" }, "max": { "type": "number", "description": "the track's high end, in stored units; default the page param's max (param mode). Required one way or the other: a slider with neither draws its 'slider needs a max' panel (1.0.1) and the compiler refuses it (part_bounds)" }, "step": { "type": "number", "description": "the increment the value moves by, in stored units; every value set is a multiple of it from min; default the page param's step, else 1" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value beside the track reads; default number" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value beside the track shows a figure below zero: the platform's negative-number mode: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components-controls 1.1.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "show_value": { "type": "boolean", "description": "whether the formatted value is drawn beside the track; default true" }, "marks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "number", "description": "where the mark sits, in stored units" }, "label": { "type": "string", "description": "what the mark says; default the value, formatted" } } }, "description": "labelled ticks under the track" }, "value": { "type": "number", "description": "field mode: the value it starts on; default min. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the slider's label; default the page param's label (param mode), else the element's label" } }, "description": "data-dr-props: the slider part's typed props, handed to it as PartProps.props" } } }, "button": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words on the button" }, "theme": { "enum": ["primary", "secondary", "ghost", "danger", "positive", "negative", "link"], "description": "the dr-button theme; default primary. danger and negative always ask before the call" }, "size": { "enum": ["regular", "small"], "description": "regular (32px, the platform pill) or small (28px); default regular" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph before the label" }, "icon_after": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph after the label" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler a click calls with {} (and reason, when asked); the page re-reads after it. Without one the button draws disabled" }, "confirm": { "type": "string", "minLength": 1, "description": 'the question asked first (Confirm / Cancel); default none, and "<label>?" on a danger or negative button, which always asks' }, "reason": { "enum": ["required", "optional"], "description": "a reason box in the confirm dialog, posted as reason; required keeps Confirm disabled until it holds text" }, "split": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label", "on_click"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the menu entry" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler it calls with {}" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked first" } } }, "description": "more calls behind the button's arrow (dr-split-button)" }, "disabled": { "type": "boolean", "description": "drawn disabled; default false" } }, "description": "data-dr-props: the button part's typed props, handed to it as PartProps.props" } } }, "status": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the dr-status type (its colour); default default. A map entry that matches wins" }, "label": { "type": "string", "description": "the words; default the value at path" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph in place of the dot" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "type"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the type it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 type and words, tried in order" } }, "description": "data-dr-props: the status part's typed props, handed to it as PartProps.props" } } }, "badge": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "the words; default the value at path" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the dr-badge colour; default stone" }, "size": { "enum": ["medium", "small"], "description": "default medium" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "color"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the colour it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 colour and words, tried in order" } }, "description": "data-dr-props: the badge part's typed props, handed to it as PartProps.props" } } }, "tag": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["month", "quarter", "year", "forecast"], "description": "what the value is" }, "value": { "type": ["string", "number"], "description": "the period: 2026-03, 2026-Q1, 2026, 3 (a forecast's closed months) or 3+9" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "fiscal": { "type": "boolean", "description": "year only: prefix FY; default true" } }, "description": "data-dr-props: the tag part's typed props, handed to it as PartProps.props" } } }, "empty_state": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["noData", "noPermissions", "noResults", "noNotifications", "custom"], "description": "the platform's empty-state type: its icon and default words; default custom" }, "title": { "type": "string", "description": "the title; default the type's" }, "description": { "type": "string", "description": "the line under it; default the type's" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; with on_action" }, "on_action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler the button calls with {}; the page re-reads after it" } }, "description": "data-dr-props: the empty_state part's typed props, handed to it as PartProps.props" } } }, "stepper": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": { "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "description": "the value current (or the value at path) names this step by" }, "label": { "type": "string", "minLength": 1, "description": "the step's name" }, "description": { "type": "string", "description": "one line under the name" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler that moves the flow on from this step, called with {step: <id>} when it is current; every step but the last needs one (A3.29)" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; default Continue" } } }, "description": "the steps, in order" }, "current": { "type": "string", "minLength": 1, "description": "the id of the step the flow is at; default the value at path, else the first step" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "vertical": { "type": "boolean", "description": "steps top to bottom; default left to right" } }, "description": "data-dr-props: the stepper part's typed props, handed to it as PartProps.props" } } }, "alert": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "theme": { "enum": ["success", "error", "bold-error", "warning", "info", "tip"], "description": "the dr-alert type; default info" }, "title": { "type": "string", "description": "the bold first line" }, "text": { "type": "string", "minLength": 1, "description": "the notice" } }, "description": "data-dr-props: the alert part's typed props, handed to it as PartProps.props" } } }, "checkbox": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this box writes (true / false); exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the toggle page param it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts ticked; default false. Param mode reads ctx.params" }, "label": { "type": "string", "description": "the words beside the box; default the page param's label, else the element's label" }, "description": { "type": "string", "description": "a line under it" } }, "description": "data-dr-props: the checkbox part's typed props, handed to it as PartProps.props" } } }, "radio_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this choice writes; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the select (or period / month) page param it moves; exactly one of field and param" }, "options": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees; default the value" } } }, "description": "the options, in order; param mode: default the page param's values" }, "value": { "type": "string", "description": "field mode: the option it starts on; default none" }, "label": { "type": "string", "description": "the group's label; default the page param's label, else the element's label" }, "direction": { "enum": ["vertical", "horizontal"], "description": "default vertical" } }, "description": "data-dr-props: the radio_group part's typed props, handed to it as PartProps.props" } } }, "file_upload": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "the payload key the stored file is written under, as {upload, filename, mime_type, size}" }, "accept": { "type": "string", "description": "the file types the picker offers, as an input accept list: .pdf,.xlsx; default any" }, "max_size_mb": { "type": "number", "minimum": 0, "description": "a larger file is refused before it is sent (client-side only: the platform's own limit still answers 413); 0 or less is no limit of its own; default the platform's own limit" }, "label": { "type": "string", "description": "the label above the zone; default the element's label" }, "dropzone_text": { "type": "string", "description": "the zone's first line; default Drop a file here, or browse" }, "dropzone_subtext": { "type": "string", "description": "the zone's second line; default the accepted types" }, "on_upload": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler called with {<field>: {upload, filename, mime_type, size}} once the file is stored (the parser hand-off); the page re-reads after it. Without one the value waits for the dialog around it" } }, "description": "data-dr-props: the file_upload part's typed props, handed to it as PartProps.props" } } }, "skeleton": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "appearance": { "enum": ["rectangle", "title-line", "text-line", "chip", "avatar"], "description": "the shape; default rectangle" }, "count": { "type": "integer", "minimum": 1, "description": "how many, one under the other; default 1 (at most 12)" }, "width": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|%|rem)$", "description": "a CSS length: 100%, 240px, 12rem; default the appearance's" }, "height": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|rem)$", "description": "a CSS length; default the appearance's" } }, "description": "data-dr-props: the skeleton part's typed props, handed to it as PartProps.props" } } }, "progress": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "progress": { "type": "number", "minimum": 0, "description": "how much is done; default the value at path" }, "total": { "type": "number", "minimum": 0, "description": "what done means; default the value at total_path, else 100" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "total_path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path to the total in the source's answer" }, "show_value": { "type": "boolean", "description": "the percent beside the bar; default true" }, "type": { "enum": ["light", "dark"], "description": "the dr-progress-bar type; default light" }, "label": { "type": "string", "description": "the words above the bar; default the element's label" } }, "description": "data-dr-props: the progress part's typed props, handed to it as PartProps.props" } } }, "accordion": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "description": "the section's header" }, "open": { "type": "boolean", "description": "whether it starts open; default false" } } }, "description": "the sections, in order: child i of the element fills item i" }, "multi": { "type": "boolean", "description": "several may be open at once; default false" }, "theme": { "enum": ["regular", "borderless"], "description": "the dr-accordion theme; default regular" } }, "description": "data-dr-props: the accordion part's typed props, handed to it as PartProps.props" } } }, "tooltip_info": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1, "description": "the explanation" }, "label": { "type": "string", "description": "words before the mark; default none" }, "position": { "enum": ["top", "bottom", "left", "right"], "description": "where the explanation opens; default top" } }, "description": "data-dr-props: the tooltip_info part's typed props, handed to it as PartProps.props" } } }, "filter_bar": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["filters"], "properties": { "filters": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month", "text", "number-range"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param); dr-components 1.4.0, layout inline only: text (a text box over a text param), number-range (Min / Max over param_min and param_max). Every kind but number-range needs param" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused; a text param for text (dr-components 1.4.0); a date param for a date-range with mode day" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param; date with mode day)" }, "param_min": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Min box moves (dr-components 1.4.0)" }, "param_max": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Max box moves (dr-components 1.4.0)" }, "mode": { "enum": ["day"], "description": "date-range only, layout inline: day picks two days (YYYY-MM-DD) over two date params, drawn as two date boxes; without it the range is months or periods, by its params' kind (dr-components 1.4.0)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "placeholder": { "type": "string", "description": "text only: the box's placeholder; default the label (dr-components 1.4.0)" }, "placeholder_min": { "type": "string", "description": "number-range only: the Min box's placeholder; default Min (dr-components 1.4.0)" }, "placeholder_max": { "type": "string", "description": "number-range only: the Max box's placeholder; default Max (dr-components 1.4.0)" }, "mandatory": { "type": "boolean", "description": "always shown, never under More, no remove (\xD7); default false. A filter is also shown when it starts active" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } } }, "description": "the filters, in order: each a chip over a page param" }, "layout": { "enum": ["chips", "inline"], "description": "chips (the default): a chip per filter, its editor in a popover, optional ones under More; inline: every filter drawn open in one row \u2014 dr-input boxes, dr-select lists, two date or number boxes for a range \u2014 with a Clear filters button at the end that resets the filters that narrow (with clearable); More, mandatory and the chips' remove do not apply (dr-components 1.4.0)" }, "filters_label": { "type": "string", "description": "words before the chips (Filters:); default none" }, "more_label": { "type": "string", "description": "the button that adds an optional filter that is not shown; default More" }, "add_filters_title": { "type": "string", "description": "the title of More's list; default Add Filters" }, "clear_tooltip": { "type": "string", "description": "the clear-all button's name; default Clear filters" }, "clearable": { "type": "boolean", "description": "draws the clear-all button while any filter narrows; default true" } }, "description": "data-dr-props: the filter_bar part's typed props, handed to it as PartProps.props" } } }, "filter_chip": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind", "param"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "removable": { "type": "boolean", "description": "draws a remove (\xD7) that clears the filter; default false" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, "description": "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } }, "date_range": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, "field_to": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the To date is written under; required with field" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, "param_to": { "type": "string", "minLength": 1, "description": "param mode: the page param the To date moves, the same kind as param; required with param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the From date it starts on; default none" }, "value_to": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the To date it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the From param's label (param mode), else the element's label" }, "label_from": { "type": "string", "description": "the From picker's label; default From" }, "label_to": { "type": "string", "description": "the To picker's label; default To" }, "placeholder_from": { "type": "string", "description": "what From says before a pick; default Select\u2026" }, "placeholder_to": { "type": "string", "description": "what To says before a pick; default Select\u2026" }, "column": { "type": "boolean", "description": "From above To instead of side by side; default false" } }, "description": "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } }, "fiscal_month": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, "fiscal_year_back": { "type": "boolean", "description": "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "description": "field mode: the calendar month it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Select\u2026" } }, "description": "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } }, "search_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["on_submit"], "properties": { "placeholder": { "type": "string", "description": "the box's placeholder; default Search\u2026" }, "button": { "type": "string", "minLength": 1, "description": "the words on the filled dr-button after the box; default Search" }, "on_submit": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, "param": { "type": "string", "minLength": 1, "description": "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, "description": "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } } });
|
|
5967
|
+
var STRICT_TYPES = Object.freeze(["number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
5968
|
+
var PROPS_SCHEMAS = Object.freeze({ "region": { "type": "object", "properties": {} }, "grid": { "type": "object", "properties": {} }, "widget": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the card's title on an app page" }, "role": { "type": "string", "description": "data-dr-role: the app role this card is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "kind": { "enum": ["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative", "waterfall", "waterfall-breakdown", "waterfall-walkthrough", "line-forecast", "heatmap", "combo", "stacked-percent", "gauge"], "description": "data-dr-kind on an app page, the widget kind on a dashboard. The last eight (the finance kinds: waterfall ... gauge) are app pages only, from dr-app-widgets 1.2.0; a dashboard card takes one of the first eleven" }, "source": { "type": "string", "description": "the handler whose payload an app card draws (data-dr-source), or the SPEC key a dashboard card draws" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the card's numbers read" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "props": { "type": "object", "additionalProperties": false, "properties": { "variant": { "enum": ["smart"], "description": "a kpi card's variant: smart is the platform's smart KPI, one comparison pill (compare) in the platform's status colours; app pages, dr-app-widgets 1.2.0 on" }, "compare": { "enum": ["BvA", "AvF", "vs_prev_period"], "description": "a smart kpi's comparison: BvA / AvF read the kpi source's compare (budget / forecast), vs_prev_period its delta; default BvA when the source compares, else vs_prev_period" }, "color_rule": { "enum": ["higher_is_better", "lower_is_better"], "description": "which way is good for a smart kpi's delta and a gauge's goal: lower_is_better for a cost; default higher_is_better" }, "goal": { "type": "number", "description": "a gauge's goal, in the figure's units; absent, the kpi source's compare value" }, "total": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall's closing bar: {label}, default Total" }, "variance": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall-breakdown's unexplained bar: {label}, default Variance" }, "forecast_from": { "type": "string", "description": "a line-forecast over ONE series: the period on the x axis the forecast starts at" }, "dual_axis": { "type": "boolean", "description": "a combo: false keeps the line on the columns' axis; default true (a second axis)" } }, "description": "data-dr-props: an APP card's typed props (dr-app-widgets 1.2.0 on), sorted JSON on the page, read back by the extractor: a smart kpi's variant, compare and color_rule; a gauge's goal and color_rule; a waterfall's total and variance; a line-forecast's forecast_from; a combo's dual_axis" }, "title": { "type": "string", "description": "a dashboard card's title" }, "subtitle": { "type": "string", "description": "the line under a dashboard card's title" }, "description": { "type": "string", "description": "what a dashboard card shows, in words" }, "params": { "type": "array", "description": "the params a dashboard card honours" } } }, "control": { "type": "object", "properties": { "param": { "type": "string", "description": "the param it moves" }, "control_kind": { "type": "string", "description": "the control's kind" }, "type": { "type": "string", "description": "the input type" }, "min": { "type": "string", "description": "the lowest value" }, "max": { "type": "string", "description": "the highest value" }, "step": { "type": "string", "description": "the step" }, "value": { "type": "string", "description": "the starting value" }, "label": { "type": "string", "description": "the label" } } }, "nav": { "type": "object", "properties": { "aria_label": { "type": "string", "description": "the nav's accessible name" } } }, "tab": { "type": "object", "properties": { "current": { "type": "boolean", "description": "true on the page it names" }, "href": { "type": "string", "description": "the page it links to" }, "label": { "type": "string", "description": "the text it shows" } } }, "slot": { "type": "object", "properties": {} }, "form": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the form writes" }, "action": { "type": "string", "description": "data-dr-action: the handler that saves it" }, "source": { "type": "string", "description": "data-dr-source: with bind, the reader the bound row is read from" }, "bind": { "enum": ["selected"], "description": "data-dr-bind (dr-app-runtime 1.9.0): selected \u2014 the page's selected row, read from source by its key: a generated reader read whole and the row picked out by id, or a custom handler whose backend.handlers verbs are all reads, called with {id}. Only on a form or detail at the page root or a child of a root panel or split_pane; a list, queue or data_grid (one with no on_row) on the page picks the row" } } }, "list": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table listed" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers the rows" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "detail": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the row is from" }, "action": { "type": "string", "description": "data-dr-action: the handler it acts through" }, "source": { "type": "string", "description": "data-dr-source: with bind, the reader the bound row is read from" }, "bind": { "enum": ["selected"], "description": "data-dr-bind (dr-app-runtime 1.9.0): selected \u2014 the page's selected row, read from source by its key: a generated reader read whole and the row picked out by id, or a custom handler whose backend.handlers verbs are all reads, called with {id}. Only on a form or detail at the page root or a child of a root panel or split_pane; a list, queue or data_grid (one with no on_row) on the page picks the row" } } }, "queue": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table queued" }, "source": { "type": "string", "description": "data-dr-source: the inbox handler" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "action": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "action": { "type": "string", "description": "data-dr-action: the handler it runs" }, "param": { "type": "string", "description": "data-dr-param: the argument it passes" }, "entity": { "type": "string", "description": "data-dr-entity: the table the handler acts on" }, "when": { "type": "object", "description": 'data-dr-when: the states a ROW ACTION is drawn in, one JSON object of column to the values the row may hold ({"status": ["open", "in_progress"]}), every column matched; a row without the column keeps the action. It hides a button and refuses nothing: the handler still has to (dr-app-runtime 1.7.1 on an action in a list or a queue; dr-components 1.2.0 on a data_grid row action)' } } }, "filter": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "field": { "type": "string", "description": "data-dr-field: the column filtered" }, "entity": { "type": "string", "description": "data-dr-entity: the table filtered" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" } } }, "stat": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the summary handler" }, "measure": { "type": "string", "description": "data-dr-measure: the key of the number shown" }, "tone": { "type": "string", "description": "data-dr-tone: default | positive | warning | negative" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the figure reads: a word or a platform format string" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "chart": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows it draws" }, "kind": { "enum": ["line", "bar", "area"], "description": "data-dr-kind: what it draws" }, "x": { "type": "string", "description": "data-dr-x: the column on the category axis" }, "y": { "type": "string", "description": "data-dr-y: the one numeric column drawn" }, "series": { "type": "string", "description": "data-dr-series: the column whose distinct values are one line each" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how a number reads; percent is a value already in percent units" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "custom": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose answer the module receives" }, "module": { "type": "string", "pattern": "^components/[a-z][a-z0-9_-]*\\.js$", "description": "data-dr-module: the file that draws it" }, "args": { "type": "object", "description": "data-dr-args: one JSON object handed to the module as ui.args; absent means {}" }, "declares": { "type": "object", "description": "data-dr-declares: what the module does, stated for graders and app-space test \u2014 nothing draws from it and the runtime never reads it. Every key is optional; a name it lists must be one the contract declares (custom_declares)", "additionalProperties": false, "properties": { "reads": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the data.sources entries and handlers whose answers it draws" }, "calls": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the handlers it calls through ui.call; app-space test reports a call to any other (custom-undeclared-call)" }, "produces": { "type": "object", "description": `per called handler, the payload keys it sends \u2014 {"project": ["growth", "hires"]}; for a handler it does not list, app-space test reads the keys off the module's ui.call object literal`, "additionalProperties": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "shows": { "type": "array", "description": "the numbers it displays; the module projects each one on the element that shows it (data-dr-field, data-dr-value, data-dr-format), which app-space test harvests into the element's values", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the field the number is, as its data-dr-field names it" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how it reads, as its data-dr-format says" }, "scale": { "enum": ["fraction"], "description": "fraction: the value is a share (0.04) shown as a percent (4%)" } } } } } } } }, "field": { "type": "object", "properties": { "entity": { "type": "string", "description": "data-dr-entity: the table the column is in" }, "field": { "type": "string", "description": "data-dr-field: the column" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers its choices" }, "label": { "type": "string", "description": "the field's label" }, "required": { "type": "boolean", "description": "true when the form cannot be saved without it" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"] }, "description": "data-dr-status-map (dr-app-runtime 1.9.0), a list or queue column only: value \u2192 dr-status type, the value drawn as a status pill; an unmapped value is default" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"] }, "description": "data-dr-badge-map (dr-app-runtime 1.9.0), a list or queue column only: value \u2192 dr-badge colour, the value drawn as a badge; an unmapped value is stone" }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "data-dr-badge-labels (dr-app-runtime 1.9.0), a list or queue column with status_map or badge_map: value \u2192 the words the pill shows (true \u2192 Paid); an unlisted value shows itself" } } }, "number_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["format"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "what the number is: the unit shown beside the input" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "min": { "type": "number", "description": "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, "max": { "type": "number", "description": "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, "step": { "type": "number", "description": "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, "decimals": { "type": "integer", "minimum": 0, "description": "the decimals the STORED value is rounded to, after scaling; default as typed" }, "value": { "type": "number", "description": "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the input's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "the hint shown while the input is empty" } }, "description": "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } }, "tabs": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tabs"], "properties": { "tabs": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the tab's id, which a tab_panel's tab names" }, "label": { "type": "string", "minLength": 1, "description": "the text on the tab" } } }, "description": "the tabs, in order" }, "default": { "type": "string", "description": "the id of the tab open first; default the first tab" } }, "description": "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } }, "tab_panel": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tab"], "properties": { "tab": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the id of the tab (in the enclosing tabs) this panel belongs to" } }, "description": "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } }, "select": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: optional; the handler whose rows are the options when props.options is absent" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this select writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this select reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group"); dr-components 1.3.0' } } }, "description": "the options; when absent they are the page param's values (param mode), else the source rows" }, "option_value": { "type": "string", "description": "with a source: the row column that is stored; default id" }, "option_label": { "type": "string", "description": "with a source: the row column the reader sees; default the value column" }, "value": { "type": "string", "description": "field mode: the option chosen first; default none. Param mode reads ctx.params instead" }, "values": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "field mode with multiple: the options chosen first; default none (dr-components 1.3.0)" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a choice; default Choose\u2026" }, "multiple": { "type": "boolean", "description": "many values: field mode writes them as one list (a dialog posts the list), param mode moves a multi param; default false, one value (dr-components 1.3.0)" }, "searchable": { "type": "boolean", "description": "a search box over the list, filtering by label; default false (dr-components 1.3.0)" }, "group_by": { "type": "string", "minLength": 1, "description": "the key the list is grouped under: a source row's column, or group on a stated option; default none (dr-components 1.3.0)" } }, "description": "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } }, "date_picker": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this picker reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over a month param is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the date or month the picker starts on; default none. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Pick a date / Pick a month" } }, "description": "data-dr-props: the date_picker part's typed props, handed to it as PartProps.props" } } }, "data_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows the grid shows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row key the column shows" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent", "text", "date"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads; default text" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "align": { "enum": ["start", "end"], "description": "default end for currency, number and percent, start otherwise" }, "sortable": { "type": "boolean", "description": "whether the header sorts; default true" }, "cell": { "enum": ["badge", "status", "chip", "link", "toggle"], "description": "how the value draws instead of text (dr-components 1.3.0, the dr-grid cell renderers): badge (a dr-badge, its colour from badge_map), status (a dr-status, its type from status_map), chip (the value, or each value of a list, as a chip), link (the value as a link: to link_field's URL, else opening the row through on_row), toggle (a switch over a boolean; call flips it, without it the switch is read-only)" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "a dr-badge colour" }, "description": "cell badge: value \u2192 dr-badge colour; an unmapped value is stone (dr-components 1.3.0)" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "a dr-status type" }, "description": "cell status: value \u2192 dr-status type; an unmapped value is default (dr-components 1.3.0)" }, "link_field": { "type": "string", "minLength": 1, "description": "cell link: the row column holding the link's URL (same-origin path, #hash, or http(s)); default none: the link opens the row (on_row) (dr-components 1.3.0)" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "cell toggle: a handler called with {id, row, field, value} when the reader flips the switch; the page re-reads after. Without it the switch is read-only (dr-components 1.3.0)" }, "weight": { "enum": ["strong"], "description": "strong draws the cell's text bold (the row's lead column: a vendor, an account) (dr-components 1.4.0)" }, "currency_field": { "type": "string", "minLength": 1, "description": "format currency only: the row column holding each row's ISO currency code (EUR, ILS, GBP, USD\u2026), so the symbol is the row's own; a row without it falls back to currency, else USD (dr-components 1.4.0)" }, "cell_secondary": { "type": "string", "minLength": 1, "description": `cell badge only: the row column whose text the badge shows, while badge_map still colours it by the cell's own value (a PO state coloured by matched / difference, reading "\u2713 matched") (dr-components 1.4.0)` }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "cell badge only: value \u2192 the text the badge shows (true \u2192 Paid, false \u2192 Unpaid); an unlisted value shows itself. The projection keeps the raw value (dr-components 1.4.0)" }, "compact": { "type": "boolean", "description": "currency and number: false draws the exact figure (\u20AC1,315.08), where the runtime abbreviates from 1,000 (\u20AC1.3K); default the runtime's (dr-components 1.5.0)" }, "truncate": { "type": "boolean", "description": "one line, cut with an ellipsis at max_width (default 240px), the whole value on hover (dr-components 1.5.0)" }, "max_width": { "type": "integer", "minimum": 40, "description": "the column's widest, in px: longer values wrap, or with truncate are cut (dr-components 1.5.0)" } } }, "description": "the columns, in order" }, "key": { "type": "string", "description": "the column whose value is each row's data-dr-row, and the id a row action posts; default id. A row without it projects its position as data-dr-row and draws no row actions (1.1.1); with row_actions the compiler requires it stated and a column the source's rows carry, and, where a row action writes through a remove, save or decide handler, that table's primary key (part_row_key)" }, "theme": { "enum": ["default", "borderless", "editable", "inside-card"], "description": "the dr-grid theme (dr-components 1.3.0): default (rows and header 56px), borderless (40px, no row lines), editable (40px, a focus ring on the cell), inside-card (rows 56px, a 32px header, for a grid inside a card); default default" }, "hierarchy": { "type": "object", "additionalProperties": false, "required": ["parent", "label"], "properties": { "parent": { "type": "string", "minLength": 1, "description": "the column holding each row's parent row key (the key column's value); empty for a top row" }, "label": { "type": "string", "minLength": 1, "description": "the column drawn as the tree: indented by depth, with expand / collapse on a parent" }, "expanded": { "type": "boolean", "description": "whether parents start open; default true" } }, "description": "tree rows (dr-components 1.3.0): a P&L's accounts under their parents, each parent's number columns the sum of its children's unless the source answers the parent's own; sorting orders siblings" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row, summing the top rows' number columns (currency, number, a platform format string; a percent is left blank), pinned above or below the rows (dr-components 1.3.0); default none" }, "pin": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "the leading columns (fields) that stay in view while the grid scrolls sideways, in column order (dr-components 1.3.0)" }, "csv_params": { "type": "object", "additionalProperties": false, "properties": { "file_name": { "type": "string", "minLength": 1, "description": "the downloaded file's name; default the element id, .csv" } }, "description": "draws an Export CSV button (dr-grid-toolbar csvParams, dr-components 1.3.0): every row in the grid's order, parents and totals included, numbers raw, headers as shown" }, "selection": { "type": "object", "additionalProperties": false, "required": ["bulk_actions"], "properties": { "bulk_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens once over the selection, and its Confirm posts ids (the selected rows' keys) with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {ids} (the selected rows' keys); the selection clears and the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel), the selection's size in it; default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }] }, "description": "the bulk bar's buttons, shown while rows are ticked: open a row dialog over the selection, or call a handler with {ids}" } }, "description": "a checkbox column (a header box ticks or clears the page's rows) and, while any row is ticked, a bar above the grid: N selected, the bulk actions, Clear selection. Only keyed rows can be ticked; ticks a search hides are dropped. A dialog action's on_confirm, like a call, is a custom handler that reads ids (dr-components 1.4.0)" }, "sticky_header": { "type": "boolean", "description": "the header row stays in view while the grid scrolls (thead sticky inside the grid's own scroll box, which is capped at the viewport's height); default false (dr-components 1.4.0)" }, "search": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "an inline search box above the grid that narrows the loaded rows to those whose named fields hold the typed text (case-insensitive); it is the grid's own, not a page param (dr-components 1.4.0)" }, "row_detail": { "enum": ["drawer"], "description": "drawer: clicking a row opens a side panel listing the row's columns (or detail_fields), field by field (on_row still runs when stated) (dr-components 1.4.0)" }, "detail_fields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "row_detail only: the row fields the drawer lists, in order; default the grid's columns. A field that is no column is drawn as text (dr-components 1.4.0)" }, "page_size": { "type": "integer", "minimum": 5, "description": "rows per page; default 10" }, "sort": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the column sorted first" }, "dir": { "enum": ["asc", "desc"], "description": "default asc" } }, "description": "the order the rows start in; default the order the handler answered" }, "on_row": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {row} when a reader opens a row; the page re-reads after it" }, "row_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens over the row, its inputs prefilled, and posts id with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {id, row} (id: the row's key column); the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel); default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }] }, "description": "a button per row for each action, after the columns: open a dialog over the row, or call a handler with it" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the data_grid part's typed props, handed to it as PartProps.props" } } }, "dialog": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "trigger": { "type": "string", "minLength": 1, "description": "the text on the button that opens it; default the element's label, else its title \u2014 the compiler writes it into the page (foldDialogTriggers). A dialog with none of the three and no values_from row is refused (part_mode); a row dialog (values_from row) takes none, a row action opens it" }, "title": { "type": "string", "description": "the dialog's title; default the element's label" }, "description": { "type": "string", "description": "one line under the title" }, "confirm": { "type": "string", "description": "the text on the confirm button; default Confirm" }, "on_confirm": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Confirm calls with the fields of the inputs inside; without one, Confirm only closes" }, "values_from": { "enum": ["row"], "description": "row: a data_grid row action opens it over one row \u2014 the inputs inside start from that row's values, and Confirm posts id (the row's key) with their fields, to a save handler" }, "key": { "type": "string", "minLength": 1, "description": "with values_from row: the row column posted as id; default the grid's key, else id" } }, "description": "data-dr-props: the dialog part's typed props, handed to it as PartProps.props" } } }, "variance_table": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows are the lines" }, "props": { "type": "object", "additionalProperties": false, "required": ["row", "actual", "plan"], "properties": { "row": { "type": "string", "minLength": 1, "description": "the column naming each line; its value is the line's data-dr-row" }, "actual": { "type": "string", "minLength": 1, "description": "the column holding the actual figure" }, "plan": { "type": "string", "minLength": 1, "description": "the column holding the plan (budget) figure" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how actual, plan and variance read; default currency" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how actual, plan and variance read below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good: higher (the default) for revenue, lower for cost" }, "threshold": { "type": "object", "additionalProperties": false, "required": [], "properties": { "abs": { "type": "number", "minimum": 0, "description": "a variance smaller than this, in the figures' units, is neutral" }, "pct": { "type": "number", "minimum": 0, "description": "a variance share smaller than this fraction (0.05 is 5%) is neutral" } }, "description": "below both limits a variance is neutral rather than toned; default none" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the variance_table part's typed props, handed to it as PartProps.props" } } }, "toggle": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this switch writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this switch reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts on; default off. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the switch's label; default the page param's label (param mode), else the element's label" }, "description": { "type": "string", "description": "one line under the label" } }, "description": "data-dr-props: the toggle part's typed props, handed to it as PartProps.props" } } }, "control_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "columns": { "enum": [1, 2, 3, 4], "description": "how many controls sit side by side; default 1 (under 640px always 1)" }, "label_position": { "enum": ["top", "start"], "description": "top (the default): each label above its control; start: every label in one column before its control" }, "description": { "type": "string", "description": "one line above the controls" } }, "description": "data-dr-props: the control_group part's typed props, handed to it as PartProps.props" } } }, "callout": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer the rules read \u2014 a summary's measures, a KPI, or rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["rules"], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["when", "tone", "text"], "properties": { "when": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["path", "gte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "gte": { "type": "number", "description": "matches when the value is at least this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "lte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "lte": { "type": "number", "description": "matches when the value is at most this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "eq"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "eq": { "type": ["string", "number", "boolean"], "description": "matches when the value is exactly this" } } }], "description": "the condition: one path and one of gte, lte, eq" }, "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } } }, "description": "tried in order; the first whose when holds is the sentence" }, "default": { "type": "object", "additionalProperties": false, "required": ["tone", "text"], "properties": { "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } }, "description": "what it says when no rule holds; default nothing" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } }, "description": "data-dr-props: the callout part's typed props, handed to it as PartProps.props" } } }, "scenario_columns": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose rows are the scenarios" }, "props": { "type": "object", "additionalProperties": false, "required": ["key", "label_field", "metrics"], "properties": { "key": { "type": "string", "minLength": 1, "description": "the column naming each row uniquely; its value is the column's data-dr-row" }, "label_field": { "type": "string", "minLength": 1, "description": "the column whose value heads each scenario's column" }, "metrics": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row column the line shows" }, "label": { "type": "string", "description": "the line's name; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good for the delta's tone: higher (the default) or lower" } } }, "description": "the lines, in order" }, "max": { "type": "integer", "minimum": 1, "description": "how many rows may be ticked at once; default 3 (at most 6)" }, "baseline": { "type": "string", "minLength": 1, "description": "the key value of the row every delta is against; default the first row" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the scenario_columns part's typed props, handed to it as PartProps.props" } } }, "slider": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this slider writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this slider reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "min": { "type": "number", "description": "the track's low end, in stored units; default the page param's min (param mode), else 0" }, "max": { "type": "number", "description": "the track's high end, in stored units; default the page param's max (param mode). Required one way or the other: a slider with neither draws its 'slider needs a max' panel (1.0.1) and the compiler refuses it (part_bounds)" }, "step": { "type": "number", "description": "the increment the value moves by, in stored units; every value set is a multiple of it from min; default the page param's step, else 1" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value beside the track reads; default number" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value beside the track shows a figure below zero: the platform's negative-number mode: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components-controls 1.1.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "show_value": { "type": "boolean", "description": "whether the formatted value is drawn beside the track; default true" }, "marks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "number", "description": "where the mark sits, in stored units" }, "label": { "type": "string", "description": "what the mark says; default the value, formatted" } } }, "description": "labelled ticks under the track" }, "value": { "type": "number", "description": "field mode: the value it starts on; default min. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the slider's label; default the page param's label (param mode), else the element's label" } }, "description": "data-dr-props: the slider part's typed props, handed to it as PartProps.props" } } }, "button": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words on the button" }, "theme": { "enum": ["primary", "secondary", "ghost", "danger", "positive", "negative", "link"], "description": "the dr-button theme; default primary. danger and negative always ask before the call" }, "size": { "enum": ["regular", "small"], "description": "regular (32px, the platform pill) or small (28px); default regular" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph before the label" }, "icon_after": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph after the label" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler a click calls with {} (and reason, when asked); the page re-reads after it. Without one the button draws disabled" }, "confirm": { "type": "string", "minLength": 1, "description": 'the question asked first (Confirm / Cancel); default none, and "<label>?" on a danger or negative button, which always asks' }, "reason": { "enum": ["required", "optional"], "description": "a reason box in the confirm dialog, posted as reason; required keeps Confirm disabled until it holds text" }, "split": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label", "on_click"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the menu entry" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler it calls with {}" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked first" } } }, "description": "more calls behind the button's arrow (dr-split-button)" }, "disabled": { "type": "boolean", "description": "drawn disabled; default false" } }, "description": "data-dr-props: the button part's typed props, handed to it as PartProps.props" } } }, "status": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the dr-status type (its colour); default default. A map entry that matches wins" }, "label": { "type": "string", "description": "the words; default the value at path" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph in place of the dot" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "type"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the type it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 type and words, tried in order" } }, "description": "data-dr-props: the status part's typed props, handed to it as PartProps.props" } } }, "badge": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "the words; default the value at path" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the dr-badge colour; default stone" }, "size": { "enum": ["medium", "small"], "description": "default medium" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "color"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the colour it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 colour and words, tried in order" } }, "description": "data-dr-props: the badge part's typed props, handed to it as PartProps.props" } } }, "tag": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["month", "quarter", "year", "forecast"], "description": "what the value is" }, "value": { "type": ["string", "number"], "description": "the period: 2026-03, 2026-Q1, 2026, 3 (a forecast's closed months) or 3+9" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "fiscal": { "type": "boolean", "description": "year only: prefix FY; default true" } }, "description": "data-dr-props: the tag part's typed props, handed to it as PartProps.props" } } }, "empty_state": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["noData", "noPermissions", "noResults", "noNotifications", "custom"], "description": "the platform's empty-state type: its icon and default words; default custom" }, "title": { "type": "string", "description": "the title; default the type's" }, "description": { "type": "string", "description": "the line under it; default the type's" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; with on_action" }, "on_action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler the button calls with {}; the page re-reads after it" } }, "description": "data-dr-props: the empty_state part's typed props, handed to it as PartProps.props" } } }, "stepper": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": { "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "description": "the value current (or the value at path) names this step by" }, "label": { "type": "string", "minLength": 1, "description": "the step's name" }, "description": { "type": "string", "description": "one line under the name" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler that moves the flow on from this step, called with {step: <id>} when it is current; every step but the last needs one (A3.29)" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; default Continue" } } }, "description": "the steps, in order" }, "current": { "type": "string", "minLength": 1, "description": "the id of the step the flow is at; default the value at path, else the first step" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "vertical": { "type": "boolean", "description": "steps top to bottom; default left to right" } }, "description": "data-dr-props: the stepper part's typed props, handed to it as PartProps.props" } } }, "alert": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "theme": { "enum": ["success", "error", "bold-error", "warning", "info", "tip"], "description": "the dr-alert type; default info" }, "title": { "type": "string", "description": "the bold first line" }, "text": { "type": "string", "minLength": 1, "description": "the notice" } }, "description": "data-dr-props: the alert part's typed props, handed to it as PartProps.props" } } }, "checkbox": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this box writes (true / false); exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the toggle page param it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts ticked; default false. Param mode reads ctx.params" }, "label": { "type": "string", "description": "the words beside the box; default the page param's label, else the element's label" }, "description": { "type": "string", "description": "a line under it" } }, "description": "data-dr-props: the checkbox part's typed props, handed to it as PartProps.props" } } }, "radio_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this choice writes; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the select (or period / month) page param it moves; exactly one of field and param" }, "options": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees; default the value" } } }, "description": "the options, in order; param mode: default the page param's values" }, "value": { "type": "string", "description": "field mode: the option it starts on; default none" }, "label": { "type": "string", "description": "the group's label; default the page param's label, else the element's label" }, "direction": { "enum": ["vertical", "horizontal"], "description": "default vertical" } }, "description": "data-dr-props: the radio_group part's typed props, handed to it as PartProps.props" } } }, "file_upload": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "the payload key the stored file is written under, as {upload, filename, mime_type, size}" }, "accept": { "type": "string", "description": "the file types the picker offers, as an input accept list: .pdf,.xlsx; default any" }, "max_size_mb": { "type": "number", "minimum": 0, "description": "a larger file is refused before it is sent (client-side only: the platform's own limit still answers 413); 0 or less is no limit of its own; default the platform's own limit" }, "label": { "type": "string", "description": "the label above the zone; default the element's label" }, "dropzone_text": { "type": "string", "description": "the zone's first line; default Drop a file here, or browse" }, "dropzone_subtext": { "type": "string", "description": "the zone's second line; default the accepted types" }, "on_upload": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler called with {<field>: {upload, filename, mime_type, size}} once the file is stored (the parser hand-off); the page re-reads after it. Without one the value waits for the dialog around it" } }, "description": "data-dr-props: the file_upload part's typed props, handed to it as PartProps.props" } } }, "skeleton": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "appearance": { "enum": ["rectangle", "title-line", "text-line", "chip", "avatar"], "description": "the shape; default rectangle" }, "count": { "type": "integer", "minimum": 1, "description": "how many, one under the other; default 1 (at most 12)" }, "width": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|%|rem)$", "description": "a CSS length: 100%, 240px, 12rem; default the appearance's" }, "height": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|rem)$", "description": "a CSS length; default the appearance's" } }, "description": "data-dr-props: the skeleton part's typed props, handed to it as PartProps.props" } } }, "progress": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "progress": { "type": "number", "minimum": 0, "description": "how much is done; default the value at path" }, "total": { "type": "number", "minimum": 0, "description": "what done means; default the value at total_path, else 100" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "total_path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path to the total in the source's answer" }, "show_value": { "type": "boolean", "description": "the percent beside the bar; default true" }, "type": { "enum": ["light", "dark"], "description": "the dr-progress-bar type; default light" }, "label": { "type": "string", "description": "the words above the bar; default the element's label" } }, "description": "data-dr-props: the progress part's typed props, handed to it as PartProps.props" } } }, "accordion": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "description": "the section's header" }, "open": { "type": "boolean", "description": "whether it starts open; default false" } } }, "description": "the sections, in order: child i of the element fills item i" }, "multi": { "type": "boolean", "description": "several may be open at once; default false" }, "theme": { "enum": ["regular", "borderless"], "description": "the dr-accordion theme; default regular" } }, "description": "data-dr-props: the accordion part's typed props, handed to it as PartProps.props" } } }, "tooltip_info": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1, "description": "the explanation" }, "label": { "type": "string", "description": "words before the mark; default none" }, "position": { "enum": ["top", "bottom", "left", "right"], "description": "where the explanation opens; default top" } }, "description": "data-dr-props: the tooltip_info part's typed props, handed to it as PartProps.props" } } }, "filter_bar": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["filters"], "properties": { "filters": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month", "text", "number-range"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param); dr-components 1.4.0, layout inline only: text (a text box over a text param), number-range (Min / Max over param_min and param_max). Every kind but number-range needs param" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused; a text param for text (dr-components 1.4.0); a date param for a date-range with mode day" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param; date with mode day)" }, "param_min": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Min box moves (dr-components 1.4.0)" }, "param_max": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Max box moves (dr-components 1.4.0)" }, "mode": { "enum": ["day"], "description": "date-range only, layout inline: day picks two days (YYYY-MM-DD) over two date params, drawn as two date boxes; without it the range is months or periods, by its params' kind (dr-components 1.4.0)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "placeholder": { "type": "string", "description": "text only: the box's placeholder; default the label (dr-components 1.4.0)" }, "placeholder_min": { "type": "string", "description": "number-range only: the Min box's placeholder; default Min (dr-components 1.4.0)" }, "placeholder_max": { "type": "string", "description": "number-range only: the Max box's placeholder; default Max (dr-components 1.4.0)" }, "mandatory": { "type": "boolean", "description": "always shown, never under More, no remove (\xD7); default false. A filter is also shown when it starts active" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } } }, "description": "the filters, in order: each a chip over a page param" }, "layout": { "enum": ["chips", "inline"], "description": "chips (the default): a chip per filter, its editor in a popover, optional ones under More; inline: every filter drawn open in one row \u2014 dr-input boxes, dr-select lists, two date or number boxes for a range \u2014 with a Clear filters button at the end that resets the filters that narrow (with clearable); More, mandatory and the chips' remove do not apply (dr-components 1.4.0)" }, "filters_label": { "type": "string", "description": "words before the chips (Filters:); default none" }, "more_label": { "type": "string", "description": "the button that adds an optional filter that is not shown; default More" }, "add_filters_title": { "type": "string", "description": "the title of More's list; default Add Filters" }, "clear_tooltip": { "type": "string", "description": "the clear-all button's name; default Clear filters" }, "clearable": { "type": "boolean", "description": "draws the clear-all button while any filter narrows; default true" } }, "description": "data-dr-props: the filter_bar part's typed props, handed to it as PartProps.props" } } }, "filter_chip": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind", "param"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "removable": { "type": "boolean", "description": "draws a remove (\xD7) that clears the filter; default false" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, "description": "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } }, "date_range": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, "field_to": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the To date is written under; required with field" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, "param_to": { "type": "string", "minLength": 1, "description": "param mode: the page param the To date moves, the same kind as param; required with param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the From date it starts on; default none" }, "value_to": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the To date it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the From param's label (param mode), else the element's label" }, "label_from": { "type": "string", "description": "the From picker's label; default From" }, "label_to": { "type": "string", "description": "the To picker's label; default To" }, "placeholder_from": { "type": "string", "description": "what From says before a pick; default Select\u2026" }, "placeholder_to": { "type": "string", "description": "what To says before a pick; default Select\u2026" }, "column": { "type": "boolean", "description": "From above To instead of side by side; default false" } }, "description": "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } }, "fiscal_month": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, "fiscal_year_back": { "type": "boolean", "description": "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "description": "field mode: the calendar month it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Select\u2026" } }, "description": "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } }, "search_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["on_submit"], "properties": { "placeholder": { "type": "string", "description": "the box's placeholder; default Search\u2026" }, "button": { "type": "string", "minLength": 1, "description": "the words on the filled dr-button after the box; default Search" }, "on_submit": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, "param": { "type": "string", "minLength": 1, "description": "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, "description": "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } }, "split_pane": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "ratio": { "type": "array", "minItems": 2, "items": { "type": "number", "minimum": 1 }, "description": "the two panes' shares of the width, left then right ([55, 45]); exactly two; default [50, 50]" }, "resizable": { "type": "boolean", "description": "draw a divider the reader drags, or moves with the arrow keys (role=separator); default false" }, "remember": { "type": "boolean", "description": "keep the width the reader set, per page, in their browser (localStorage); default false" }, "min": { "type": "array", "minItems": 2, "items": { "type": "integer", "minimum": 0 }, "description": "each pane's narrowest width in px, left then right; default [240, 240]" } }, "description": "data-dr-props: the split_pane part's typed props, handed to it as PartProps.props" } } }, "file_viewer": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader whose row holds the file" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's file column: {url, filename, mime_type, size} as the platform reads a file column back, or the stored reference" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "height": { "type": "integer", "minimum": 120, "description": "the viewer's height in px; default 640" }, "toolbar": { "type": "boolean", "description": "the bar over the file: its name and a download link; default true" } }, "description": "data-dr-props: the file_viewer part's typed props, handed to it as PartProps.props" } } }, "line_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the child table the rows belong to" }, "source": { "type": "string", "description": "data-dr-source: the reader of the child rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns", "action"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the child row's key the column edits" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" }, "editable": { "type": "boolean", "description": "whether the reader types in it; default true" }, "options": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "the values a select cell offers; default a typed cell" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } } }] }, "description": "the columns, in order: a field name, or {field, label, format, editable, options, currency}" }, "key": { "type": "string", "minLength": 1, "description": "the child row's identity column, posted with a kept row; default id" }, "add_row": { "type": "boolean", "description": "draw Add a line, which adds a blank row at the bottom; default false" }, "remove_row": { "anyOf": [{ "type": "boolean" }, { "enum": ["confirm"] }], "description": "draw a \xD7 on each row; confirm asks first; default false" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row over the number and currency columns, above or below the rows; default none" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the custom handler Save calls with {id: <the parent row's key>, rows: [...]}; the lines re-read after it" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "empty_text": { "type": "string", "description": "the sentence while there are no rows; default No lines yet." } }, "description": "data-dr-props: the line_grid part's typed props, handed to it as PartProps.props" } } }, "document": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader of the document's row" }, "props": { "type": "object", "additionalProperties": false, "required": ["sections"], "properties": { "title": { "type": "string", "description": "the words on the Print bar, left of the button; default none (the card's title is the element's label)" }, "page_size": { "enum": ["A4", "Letter"], "description": "the paper it prints on; default A4" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "the ISO code its currency figures read in; default USD" }, "sections": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["header", "table", "text", "totals", "terms"], "description": "what the section is" }, "title": { "type": "string", "description": "header: the big title; table, text, terms: the section's heading" }, "title_field": { "type": "string", "minLength": 1, "description": "header: the row's key whose value is the title" }, "label": { "type": "string", "description": "header: the word on the right (Purchase order)" }, "fields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "header: the row's values listed under the title" }, "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "table: its columns" }, "source": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "table: the reader of the child rows, called with {<its by>: key}" }, "field": { "type": "string", "minLength": 1, "description": "table: the row's array of child rows; text, terms: the row's key holding the words" }, "text": { "type": "string", "description": "text, terms: the words" }, "lines": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words" }, "field": { "type": "string", "minLength": 1, "description": "the row's key holding the figure" }, "sum": { "type": "string", "minLength": 1, "description": "a table column whose figures it adds" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "totals: its lines, each one figure" }, "page_break": { "type": "boolean", "description": "printed, start this section on a new page" } } }, "description": "the document, top to bottom" } }, "description": "data-dr-props: the document part's typed props, handed to it as PartProps.props" } } }, "panel": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "minLength": 1, "description": "data-dr-label: the card's title (required: a panel is one titled card)" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" } } } });
|
|
5969
5969
|
var LIBRARY_TYPES = Object.freeze(["number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document"]);
|
|
5970
5970
|
var LIBRARY_PROPS_SCHEMAS = Object.freeze({ "number_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["format"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "what the number is: the unit shown beside the input" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "min": { "type": "number", "description": "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, "max": { "type": "number", "description": "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, "step": { "type": "number", "description": "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, "decimals": { "type": "integer", "minimum": 0, "description": "the decimals the STORED value is rounded to, after scaling; default as typed" }, "value": { "type": "number", "description": "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the input's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "the hint shown while the input is empty" } }, "description": "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } }, "tabs": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tabs"], "properties": { "tabs": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the tab's id, which a tab_panel's tab names" }, "label": { "type": "string", "minLength": 1, "description": "the text on the tab" } } }, "description": "the tabs, in order" }, "default": { "type": "string", "description": "the id of the tab open first; default the first tab" } }, "description": "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } }, "tab_panel": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tab"], "properties": { "tab": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the id of the tab (in the enclosing tabs) this panel belongs to" } }, "description": "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } }, "select": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: optional; the handler whose rows are the options when props.options is absent" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this select writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this select reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group"); dr-components 1.3.0' } } }, "description": "the options; when absent they are the page param's values (param mode), else the source rows" }, "option_value": { "type": "string", "description": "with a source: the row column that is stored; default id" }, "option_label": { "type": "string", "description": "with a source: the row column the reader sees; default the value column" }, "value": { "type": "string", "description": "field mode: the option chosen first; default none. Param mode reads ctx.params instead" }, "values": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "field mode with multiple: the options chosen first; default none (dr-components 1.3.0)" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a choice; default Choose\u2026" }, "multiple": { "type": "boolean", "description": "many values: field mode writes them as one list (a dialog posts the list), param mode moves a multi param; default false, one value (dr-components 1.3.0)" }, "searchable": { "type": "boolean", "description": "a search box over the list, filtering by label; default false (dr-components 1.3.0)" }, "group_by": { "type": "string", "minLength": 1, "description": "the key the list is grouped under: a source row's column, or group on a stated option; default none (dr-components 1.3.0)" } }, "description": "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } }, "date_picker": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this picker reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over a month param is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the date or month the picker starts on; default none. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Pick a date / Pick a month" } }, "description": "data-dr-props: the date_picker part's typed props, handed to it as PartProps.props" } } }, "data_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows the grid shows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row key the column shows" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent", "text", "date"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads; default text" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "align": { "enum": ["start", "end"], "description": "default end for currency, number and percent, start otherwise" }, "sortable": { "type": "boolean", "description": "whether the header sorts; default true" }, "cell": { "enum": ["badge", "status", "chip", "link", "toggle"], "description": "how the value draws instead of text (dr-components 1.3.0, the dr-grid cell renderers): badge (a dr-badge, its colour from badge_map), status (a dr-status, its type from status_map), chip (the value, or each value of a list, as a chip), link (the value as a link: to link_field's URL, else opening the row through on_row), toggle (a switch over a boolean; call flips it, without it the switch is read-only)" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "a dr-badge colour" }, "description": "cell badge: value \u2192 dr-badge colour; an unmapped value is stone (dr-components 1.3.0)" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "a dr-status type" }, "description": "cell status: value \u2192 dr-status type; an unmapped value is default (dr-components 1.3.0)" }, "link_field": { "type": "string", "minLength": 1, "description": "cell link: the row column holding the link's URL (same-origin path, #hash, or http(s)); default none: the link opens the row (on_row) (dr-components 1.3.0)" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "cell toggle: a handler called with {id, row, field, value} when the reader flips the switch; the page re-reads after. Without it the switch is read-only (dr-components 1.3.0)" }, "weight": { "enum": ["strong"], "description": "strong draws the cell's text bold (the row's lead column: a vendor, an account) (dr-components 1.4.0)" }, "currency_field": { "type": "string", "minLength": 1, "description": "format currency only: the row column holding each row's ISO currency code (EUR, ILS, GBP, USD\u2026), so the symbol is the row's own; a row without it falls back to currency, else USD (dr-components 1.4.0)" }, "cell_secondary": { "type": "string", "minLength": 1, "description": `cell badge only: the row column whose text the badge shows, while badge_map still colours it by the cell's own value (a PO state coloured by matched / difference, reading "\u2713 matched") (dr-components 1.4.0)` }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "cell badge only: value \u2192 the text the badge shows (true \u2192 Paid, false \u2192 Unpaid); an unlisted value shows itself. The projection keeps the raw value (dr-components 1.4.0)" }, "compact": { "type": "boolean", "description": "currency and number: false draws the exact figure (\u20AC1,315.08), where the runtime abbreviates from 1,000 (\u20AC1.3K); default the runtime's (dr-components 1.5.0)" }, "truncate": { "type": "boolean", "description": "one line, cut with an ellipsis at max_width (default 240px), the whole value on hover (dr-components 1.5.0)" }, "max_width": { "type": "integer", "minimum": 40, "description": "the column's widest, in px: longer values wrap, or with truncate are cut (dr-components 1.5.0)" } } }, "description": "the columns, in order" }, "key": { "type": "string", "description": "the column whose value is each row's data-dr-row, and the id a row action posts; default id. A row without it projects its position as data-dr-row and draws no row actions (1.1.1); with row_actions the compiler requires it stated and a column the source's rows carry, and, where a row action writes through a remove, save or decide handler, that table's primary key (part_row_key)" }, "theme": { "enum": ["default", "borderless", "editable", "inside-card"], "description": "the dr-grid theme (dr-components 1.3.0): default (rows and header 56px), borderless (40px, no row lines), editable (40px, a focus ring on the cell), inside-card (rows 56px, a 32px header, for a grid inside a card); default default" }, "hierarchy": { "type": "object", "additionalProperties": false, "required": ["parent", "label"], "properties": { "parent": { "type": "string", "minLength": 1, "description": "the column holding each row's parent row key (the key column's value); empty for a top row" }, "label": { "type": "string", "minLength": 1, "description": "the column drawn as the tree: indented by depth, with expand / collapse on a parent" }, "expanded": { "type": "boolean", "description": "whether parents start open; default true" } }, "description": "tree rows (dr-components 1.3.0): a P&L's accounts under their parents, each parent's number columns the sum of its children's unless the source answers the parent's own; sorting orders siblings" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row, summing the top rows' number columns (currency, number, a platform format string; a percent is left blank), pinned above or below the rows (dr-components 1.3.0); default none" }, "pin": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "the leading columns (fields) that stay in view while the grid scrolls sideways, in column order (dr-components 1.3.0)" }, "csv_params": { "type": "object", "additionalProperties": false, "properties": { "file_name": { "type": "string", "minLength": 1, "description": "the downloaded file's name; default the element id, .csv" } }, "description": "draws an Export CSV button (dr-grid-toolbar csvParams, dr-components 1.3.0): every row in the grid's order, parents and totals included, numbers raw, headers as shown" }, "selection": { "type": "object", "additionalProperties": false, "required": ["bulk_actions"], "properties": { "bulk_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens once over the selection, and its Confirm posts ids (the selected rows' keys) with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {ids} (the selected rows' keys); the selection clears and the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel), the selection's size in it; default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }] }, "description": "the bulk bar's buttons, shown while rows are ticked: open a row dialog over the selection, or call a handler with {ids}" } }, "description": "a checkbox column (a header box ticks or clears the page's rows) and, while any row is ticked, a bar above the grid: N selected, the bulk actions, Clear selection. Only keyed rows can be ticked; ticks a search hides are dropped. A dialog action's on_confirm, like a call, is a custom handler that reads ids (dr-components 1.4.0)" }, "sticky_header": { "type": "boolean", "description": "the header row stays in view while the grid scrolls (thead sticky inside the grid's own scroll box, which is capped at the viewport's height); default false (dr-components 1.4.0)" }, "search": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "an inline search box above the grid that narrows the loaded rows to those whose named fields hold the typed text (case-insensitive); it is the grid's own, not a page param (dr-components 1.4.0)" }, "row_detail": { "enum": ["drawer"], "description": "drawer: clicking a row opens a side panel listing the row's columns (or detail_fields), field by field (on_row still runs when stated) (dr-components 1.4.0)" }, "detail_fields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "row_detail only: the row fields the drawer lists, in order; default the grid's columns. A field that is no column is drawn as text (dr-components 1.4.0)" }, "page_size": { "type": "integer", "minimum": 5, "description": "rows per page; default 10" }, "sort": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the column sorted first" }, "dir": { "enum": ["asc", "desc"], "description": "default asc" } }, "description": "the order the rows start in; default the order the handler answered" }, "on_row": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {row} when a reader opens a row; the page re-reads after it" }, "row_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens over the row, its inputs prefilled, and posts id with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {id, row} (id: the row's key column); the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel); default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }] }, "description": "a button per row for each action, after the columns: open a dialog over the row, or call a handler with it" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the data_grid part's typed props, handed to it as PartProps.props" } } }, "dialog": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "trigger": { "type": "string", "minLength": 1, "description": "the text on the button that opens it; default the element's label, else its title \u2014 the compiler writes it into the page (foldDialogTriggers). A dialog with none of the three and no values_from row is refused (part_mode); a row dialog (values_from row) takes none, a row action opens it" }, "title": { "type": "string", "description": "the dialog's title; default the element's label" }, "description": { "type": "string", "description": "one line under the title" }, "confirm": { "type": "string", "description": "the text on the confirm button; default Confirm" }, "on_confirm": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Confirm calls with the fields of the inputs inside; without one, Confirm only closes" }, "values_from": { "enum": ["row"], "description": "row: a data_grid row action opens it over one row \u2014 the inputs inside start from that row's values, and Confirm posts id (the row's key) with their fields, to a save handler" }, "key": { "type": "string", "minLength": 1, "description": "with values_from row: the row column posted as id; default the grid's key, else id" } }, "description": "data-dr-props: the dialog part's typed props, handed to it as PartProps.props" } } }, "variance_table": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows are the lines" }, "props": { "type": "object", "additionalProperties": false, "required": ["row", "actual", "plan"], "properties": { "row": { "type": "string", "minLength": 1, "description": "the column naming each line; its value is the line's data-dr-row" }, "actual": { "type": "string", "minLength": 1, "description": "the column holding the actual figure" }, "plan": { "type": "string", "minLength": 1, "description": "the column holding the plan (budget) figure" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how actual, plan and variance read; default currency" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how actual, plan and variance read below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good: higher (the default) for revenue, lower for cost" }, "threshold": { "type": "object", "additionalProperties": false, "required": [], "properties": { "abs": { "type": "number", "minimum": 0, "description": "a variance smaller than this, in the figures' units, is neutral" }, "pct": { "type": "number", "minimum": 0, "description": "a variance share smaller than this fraction (0.05 is 5%) is neutral" } }, "description": "below both limits a variance is neutral rather than toned; default none" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the variance_table part's typed props, handed to it as PartProps.props" } } }, "toggle": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this switch writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this switch reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts on; default off. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the switch's label; default the page param's label (param mode), else the element's label" }, "description": { "type": "string", "description": "one line under the label" } }, "description": "data-dr-props: the toggle part's typed props, handed to it as PartProps.props" } } }, "control_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "columns": { "enum": [1, 2, 3, 4], "description": "how many controls sit side by side; default 1 (under 640px always 1)" }, "label_position": { "enum": ["top", "start"], "description": "top (the default): each label above its control; start: every label in one column before its control" }, "description": { "type": "string", "description": "one line above the controls" } }, "description": "data-dr-props: the control_group part's typed props, handed to it as PartProps.props" } } }, "callout": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer the rules read \u2014 a summary's measures, a KPI, or rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["rules"], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["when", "tone", "text"], "properties": { "when": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["path", "gte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "gte": { "type": "number", "description": "matches when the value is at least this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "lte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "lte": { "type": "number", "description": "matches when the value is at most this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "eq"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "eq": { "type": ["string", "number", "boolean"], "description": "matches when the value is exactly this" } } }], "description": "the condition: one path and one of gte, lte, eq" }, "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } } }, "description": "tried in order; the first whose when holds is the sentence" }, "default": { "type": "object", "additionalProperties": false, "required": ["tone", "text"], "properties": { "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } }, "description": "what it says when no rule holds; default nothing" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } }, "description": "data-dr-props: the callout part's typed props, handed to it as PartProps.props" } } }, "scenario_columns": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose rows are the scenarios" }, "props": { "type": "object", "additionalProperties": false, "required": ["key", "label_field", "metrics"], "properties": { "key": { "type": "string", "minLength": 1, "description": "the column naming each row uniquely; its value is the column's data-dr-row" }, "label_field": { "type": "string", "minLength": 1, "description": "the column whose value heads each scenario's column" }, "metrics": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row column the line shows" }, "label": { "type": "string", "description": "the line's name; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good for the delta's tone: higher (the default) or lower" } } }, "description": "the lines, in order" }, "max": { "type": "integer", "minimum": 1, "description": "how many rows may be ticked at once; default 3 (at most 6)" }, "baseline": { "type": "string", "minLength": 1, "description": "the key value of the row every delta is against; default the first row" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the scenario_columns part's typed props, handed to it as PartProps.props" } } }, "button": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words on the button" }, "theme": { "enum": ["primary", "secondary", "ghost", "danger", "positive", "negative", "link"], "description": "the dr-button theme; default primary. danger and negative always ask before the call" }, "size": { "enum": ["regular", "small"], "description": "regular (32px, the platform pill) or small (28px); default regular" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph before the label" }, "icon_after": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph after the label" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler a click calls with {} (and reason, when asked); the page re-reads after it. Without one the button draws disabled" }, "confirm": { "type": "string", "minLength": 1, "description": 'the question asked first (Confirm / Cancel); default none, and "<label>?" on a danger or negative button, which always asks' }, "reason": { "enum": ["required", "optional"], "description": "a reason box in the confirm dialog, posted as reason; required keeps Confirm disabled until it holds text" }, "split": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label", "on_click"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the menu entry" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler it calls with {}" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked first" } } }, "description": "more calls behind the button's arrow (dr-split-button)" }, "disabled": { "type": "boolean", "description": "drawn disabled; default false" } }, "description": "data-dr-props: the button part's typed props, handed to it as PartProps.props" } } }, "status": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the dr-status type (its colour); default default. A map entry that matches wins" }, "label": { "type": "string", "description": "the words; default the value at path" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph in place of the dot" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "type"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the type it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 type and words, tried in order" } }, "description": "data-dr-props: the status part's typed props, handed to it as PartProps.props" } } }, "badge": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "the words; default the value at path" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the dr-badge colour; default stone" }, "size": { "enum": ["medium", "small"], "description": "default medium" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "color"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the colour it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 colour and words, tried in order" } }, "description": "data-dr-props: the badge part's typed props, handed to it as PartProps.props" } } }, "tag": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["month", "quarter", "year", "forecast"], "description": "what the value is" }, "value": { "type": ["string", "number"], "description": "the period: 2026-03, 2026-Q1, 2026, 3 (a forecast's closed months) or 3+9" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "fiscal": { "type": "boolean", "description": "year only: prefix FY; default true" } }, "description": "data-dr-props: the tag part's typed props, handed to it as PartProps.props" } } }, "empty_state": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["noData", "noPermissions", "noResults", "noNotifications", "custom"], "description": "the platform's empty-state type: its icon and default words; default custom" }, "title": { "type": "string", "description": "the title; default the type's" }, "description": { "type": "string", "description": "the line under it; default the type's" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; with on_action" }, "on_action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler the button calls with {}; the page re-reads after it" } }, "description": "data-dr-props: the empty_state part's typed props, handed to it as PartProps.props" } } }, "stepper": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": { "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "description": "the value current (or the value at path) names this step by" }, "label": { "type": "string", "minLength": 1, "description": "the step's name" }, "description": { "type": "string", "description": "one line under the name" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler that moves the flow on from this step, called with {step: <id>} when it is current; every step but the last needs one (A3.29)" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; default Continue" } } }, "description": "the steps, in order" }, "current": { "type": "string", "minLength": 1, "description": "the id of the step the flow is at; default the value at path, else the first step" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "vertical": { "type": "boolean", "description": "steps top to bottom; default left to right" } }, "description": "data-dr-props: the stepper part's typed props, handed to it as PartProps.props" } } }, "alert": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "theme": { "enum": ["success", "error", "bold-error", "warning", "info", "tip"], "description": "the dr-alert type; default info" }, "title": { "type": "string", "description": "the bold first line" }, "text": { "type": "string", "minLength": 1, "description": "the notice" } }, "description": "data-dr-props: the alert part's typed props, handed to it as PartProps.props" } } }, "checkbox": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this box writes (true / false); exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the toggle page param it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts ticked; default false. Param mode reads ctx.params" }, "label": { "type": "string", "description": "the words beside the box; default the page param's label, else the element's label" }, "description": { "type": "string", "description": "a line under it" } }, "description": "data-dr-props: the checkbox part's typed props, handed to it as PartProps.props" } } }, "radio_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this choice writes; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the select (or period / month) page param it moves; exactly one of field and param" }, "options": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees; default the value" } } }, "description": "the options, in order; param mode: default the page param's values" }, "value": { "type": "string", "description": "field mode: the option it starts on; default none" }, "label": { "type": "string", "description": "the group's label; default the page param's label, else the element's label" }, "direction": { "enum": ["vertical", "horizontal"], "description": "default vertical" } }, "description": "data-dr-props: the radio_group part's typed props, handed to it as PartProps.props" } } }, "file_upload": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "the payload key the stored file is written under, as {upload, filename, mime_type, size}" }, "accept": { "type": "string", "description": "the file types the picker offers, as an input accept list: .pdf,.xlsx; default any" }, "max_size_mb": { "type": "number", "minimum": 0, "description": "a larger file is refused before it is sent (client-side only: the platform's own limit still answers 413); 0 or less is no limit of its own; default the platform's own limit" }, "label": { "type": "string", "description": "the label above the zone; default the element's label" }, "dropzone_text": { "type": "string", "description": "the zone's first line; default Drop a file here, or browse" }, "dropzone_subtext": { "type": "string", "description": "the zone's second line; default the accepted types" }, "on_upload": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler called with {<field>: {upload, filename, mime_type, size}} once the file is stored (the parser hand-off); the page re-reads after it. Without one the value waits for the dialog around it" } }, "description": "data-dr-props: the file_upload part's typed props, handed to it as PartProps.props" } } }, "skeleton": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "appearance": { "enum": ["rectangle", "title-line", "text-line", "chip", "avatar"], "description": "the shape; default rectangle" }, "count": { "type": "integer", "minimum": 1, "description": "how many, one under the other; default 1 (at most 12)" }, "width": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|%|rem)$", "description": "a CSS length: 100%, 240px, 12rem; default the appearance's" }, "height": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|rem)$", "description": "a CSS length; default the appearance's" } }, "description": "data-dr-props: the skeleton part's typed props, handed to it as PartProps.props" } } }, "progress": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "progress": { "type": "number", "minimum": 0, "description": "how much is done; default the value at path" }, "total": { "type": "number", "minimum": 0, "description": "what done means; default the value at total_path, else 100" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "total_path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path to the total in the source's answer" }, "show_value": { "type": "boolean", "description": "the percent beside the bar; default true" }, "type": { "enum": ["light", "dark"], "description": "the dr-progress-bar type; default light" }, "label": { "type": "string", "description": "the words above the bar; default the element's label" } }, "description": "data-dr-props: the progress part's typed props, handed to it as PartProps.props" } } }, "accordion": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "description": "the section's header" }, "open": { "type": "boolean", "description": "whether it starts open; default false" } } }, "description": "the sections, in order: child i of the element fills item i" }, "multi": { "type": "boolean", "description": "several may be open at once; default false" }, "theme": { "enum": ["regular", "borderless"], "description": "the dr-accordion theme; default regular" } }, "description": "data-dr-props: the accordion part's typed props, handed to it as PartProps.props" } } }, "tooltip_info": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1, "description": "the explanation" }, "label": { "type": "string", "description": "words before the mark; default none" }, "position": { "enum": ["top", "bottom", "left", "right"], "description": "where the explanation opens; default top" } }, "description": "data-dr-props: the tooltip_info part's typed props, handed to it as PartProps.props" } } }, "filter_bar": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["filters"], "properties": { "filters": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month", "text", "number-range"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param); dr-components 1.4.0, layout inline only: text (a text box over a text param), number-range (Min / Max over param_min and param_max). Every kind but number-range needs param" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused; a text param for text (dr-components 1.4.0); a date param for a date-range with mode day" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param; date with mode day)" }, "param_min": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Min box moves (dr-components 1.4.0)" }, "param_max": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Max box moves (dr-components 1.4.0)" }, "mode": { "enum": ["day"], "description": "date-range only, layout inline: day picks two days (YYYY-MM-DD) over two date params, drawn as two date boxes; without it the range is months or periods, by its params' kind (dr-components 1.4.0)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "placeholder": { "type": "string", "description": "text only: the box's placeholder; default the label (dr-components 1.4.0)" }, "placeholder_min": { "type": "string", "description": "number-range only: the Min box's placeholder; default Min (dr-components 1.4.0)" }, "placeholder_max": { "type": "string", "description": "number-range only: the Max box's placeholder; default Max (dr-components 1.4.0)" }, "mandatory": { "type": "boolean", "description": "always shown, never under More, no remove (\xD7); default false. A filter is also shown when it starts active" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } } }, "description": "the filters, in order: each a chip over a page param" }, "layout": { "enum": ["chips", "inline"], "description": "chips (the default): a chip per filter, its editor in a popover, optional ones under More; inline: every filter drawn open in one row \u2014 dr-input boxes, dr-select lists, two date or number boxes for a range \u2014 with a Clear filters button at the end that resets the filters that narrow (with clearable); More, mandatory and the chips' remove do not apply (dr-components 1.4.0)" }, "filters_label": { "type": "string", "description": "words before the chips (Filters:); default none" }, "more_label": { "type": "string", "description": "the button that adds an optional filter that is not shown; default More" }, "add_filters_title": { "type": "string", "description": "the title of More's list; default Add Filters" }, "clear_tooltip": { "type": "string", "description": "the clear-all button's name; default Clear filters" }, "clearable": { "type": "boolean", "description": "draws the clear-all button while any filter narrows; default true" } }, "description": "data-dr-props: the filter_bar part's typed props, handed to it as PartProps.props" } } }, "filter_chip": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind", "param"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "removable": { "type": "boolean", "description": "draws a remove (\xD7) that clears the filter; default false" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, "description": "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } }, "date_range": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, "field_to": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the To date is written under; required with field" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, "param_to": { "type": "string", "minLength": 1, "description": "param mode: the page param the To date moves, the same kind as param; required with param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the From date it starts on; default none" }, "value_to": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the To date it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the From param's label (param mode), else the element's label" }, "label_from": { "type": "string", "description": "the From picker's label; default From" }, "label_to": { "type": "string", "description": "the To picker's label; default To" }, "placeholder_from": { "type": "string", "description": "what From says before a pick; default Select\u2026" }, "placeholder_to": { "type": "string", "description": "what To says before a pick; default Select\u2026" }, "column": { "type": "boolean", "description": "From above To instead of side by side; default false" } }, "description": "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } }, "fiscal_month": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, "fiscal_year_back": { "type": "boolean", "description": "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "description": "field mode: the calendar month it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Select\u2026" } }, "description": "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } }, "search_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["on_submit"], "properties": { "placeholder": { "type": "string", "description": "the box's placeholder; default Search\u2026" }, "button": { "type": "string", "minLength": 1, "description": "the words on the filled dr-button after the box; default Search" }, "on_submit": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, "param": { "type": "string", "minLength": 1, "description": "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, "description": "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } }, "split_pane": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "ratio": { "type": "array", "minItems": 2, "items": { "type": "number", "minimum": 1 }, "description": "the two panes' shares of the width, left then right ([55, 45]); exactly two; default [50, 50]" }, "resizable": { "type": "boolean", "description": "draw a divider the reader drags, or moves with the arrow keys (role=separator); default false" }, "remember": { "type": "boolean", "description": "keep the width the reader set, per page, in their browser (localStorage); default false" }, "min": { "type": "array", "minItems": 2, "items": { "type": "integer", "minimum": 0 }, "description": "each pane's narrowest width in px, left then right; default [240, 240]" } }, "description": "data-dr-props: the split_pane part's typed props, handed to it as PartProps.props" } } }, "file_viewer": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader whose row holds the file" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's file column: {url, filename, mime_type, size} as the platform reads a file column back, or the stored reference" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "height": { "type": "integer", "minimum": 120, "description": "the viewer's height in px; default 640" }, "toolbar": { "type": "boolean", "description": "the bar over the file: its name and a download link; default true" } }, "description": "data-dr-props: the file_viewer part's typed props, handed to it as PartProps.props" } } }, "line_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the child table the rows belong to" }, "source": { "type": "string", "description": "data-dr-source: the reader of the child rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns", "action"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the child row's key the column edits" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" }, "editable": { "type": "boolean", "description": "whether the reader types in it; default true" }, "options": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "the values a select cell offers; default a typed cell" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } } }] }, "description": "the columns, in order: a field name, or {field, label, format, editable, options, currency}" }, "key": { "type": "string", "minLength": 1, "description": "the child row's identity column, posted with a kept row; default id" }, "add_row": { "type": "boolean", "description": "draw Add a line, which adds a blank row at the bottom; default false" }, "remove_row": { "anyOf": [{ "type": "boolean" }, { "enum": ["confirm"] }], "description": "draw a \xD7 on each row; confirm asks first; default false" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row over the number and currency columns, above or below the rows; default none" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the custom handler Save calls with {id: <the parent row's key>, rows: [...]}; the lines re-read after it" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "empty_text": { "type": "string", "description": "the sentence while there are no rows; default No lines yet." } }, "description": "data-dr-props: the line_grid part's typed props, handed to it as PartProps.props" } } }, "document": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader of the document's row" }, "props": { "type": "object", "additionalProperties": false, "required": ["sections"], "properties": { "title": { "type": "string", "description": "the words on the Print bar, left of the button; default none (the card's title is the element's label)" }, "page_size": { "enum": ["A4", "Letter"], "description": "the paper it prints on; default A4" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "the ISO code its currency figures read in; default USD" }, "sections": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["header", "table", "text", "totals", "terms"], "description": "what the section is" }, "title": { "type": "string", "description": "header: the big title; table, text, terms: the section's heading" }, "title_field": { "type": "string", "minLength": 1, "description": "header: the row's key whose value is the title" }, "label": { "type": "string", "description": "header: the word on the right (Purchase order)" }, "fields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "header: the row's values listed under the title" }, "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "table: its columns" }, "source": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "table: the reader of the child rows, called with {<its by>: key}" }, "field": { "type": "string", "minLength": 1, "description": "table: the row's array of child rows; text, terms: the row's key holding the words" }, "text": { "type": "string", "description": "text, terms: the words" }, "lines": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words" }, "field": { "type": "string", "minLength": 1, "description": "the row's key holding the figure" }, "sum": { "type": "string", "minLength": 1, "description": "a table column whose figures it adds" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "totals: its lines, each one figure" }, "page_break": { "type": "boolean", "description": "printed, start this section on a new page" } } }, "description": "the document, top to bottom" } }, "description": "data-dr-props: the document part's typed props, handed to it as PartProps.props" } } } });
|
|
5971
5971
|
var CONTROLS_TYPES = Object.freeze(["slider"]);
|
|
5972
|
-
var PARTS = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "tabs": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": ["tab_panel"], "events": {}, "empty": null }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": {}, "empty": null }, "select": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": null }, "date_picker": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "data_grid": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "inbox", "custom"], "as": "rows" }, "children": "none", "events": { "on_row": ["custom", "decide"], "on_row_action": ["remove", "decide", "custom", "submit", "save"] }, "empty": "Nothing to show." }, "dialog": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": { "on_confirm": ["custom", "save", "submit", "decide"] }, "empty": null }, "variance_table": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "toggle": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": "none", "events": {}, "empty": null }, "control_group": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": ["number_input", "select", "date_picker", "toggle", "slider", "checkbox", "radio_group", "date_range", "fiscal_month"], "events": {}, "empty": null }, "callout": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "button": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_click": ["custom", "submit"] }, "empty": null }, "status": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "badge": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "tag": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "empty_state": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_action": ["custom", "submit"] }, "empty": null }, "stepper": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": { "on_step": ["custom", "submit"] }, "empty": null }, "alert": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "checkbox": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "radio_group": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "file_upload": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_upload": ["custom", "save", "submit"] }, "empty": null }, "skeleton": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "progress": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "accordion": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "any", "events": {}, "empty": null }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "date_range": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "search_input": { "module": "dr-components", "since": "1.4.0", "reads": null, "children": "none", "events": { "on_submit": ["custom"] }, "empty": null } });
|
|
5973
|
-
var LIBRARY_PARTS = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tabs": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "select": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "date_picker": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "data_grid": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "dialog": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "variance_table": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "toggle": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "control_group": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "callout": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "stage": "contract" }, "button": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "status": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "badge": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tag": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "empty_state": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "stepper": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "alert": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "checkbox": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "radio_group": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "file_upload": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "skeleton": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "progress": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "accordion": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "date_range": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "search_input": { "module": "dr-components", "since": "1.4.0", "stage": "contract" }, "split_pane": { "module": "dr-components", "since": "1.5.0", "stage": "
|
|
5974
|
-
var TITLED_TYPES = Object.freeze(["widget", "form", "list", "queue", "stat", "chart", "custom", "number_input", "select", "date_picker", "dialog", "date_range", "fiscal_month"]);
|
|
5972
|
+
var PARTS = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "tabs": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": ["tab_panel"], "events": {}, "empty": null }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": {}, "empty": null }, "select": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": null }, "date_picker": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "data_grid": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "inbox", "custom"], "as": "rows" }, "children": "none", "events": { "on_row": ["custom", "decide"], "on_row_action": ["remove", "decide", "custom", "submit", "save"] }, "empty": "Nothing to show." }, "dialog": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": { "on_confirm": ["custom", "save", "submit", "decide"] }, "empty": null }, "variance_table": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "toggle": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": "none", "events": {}, "empty": null }, "control_group": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": ["number_input", "select", "date_picker", "toggle", "slider", "checkbox", "radio_group", "date_range", "fiscal_month"], "events": {}, "empty": null }, "callout": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "button": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_click": ["custom", "submit"] }, "empty": null }, "status": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "badge": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "tag": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "empty_state": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_action": ["custom", "submit"] }, "empty": null }, "stepper": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": { "on_step": ["custom", "submit"] }, "empty": null }, "alert": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "checkbox": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "radio_group": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "file_upload": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_upload": ["custom", "save", "submit"] }, "empty": null }, "skeleton": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "progress": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "accordion": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "any", "events": {}, "empty": null }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "date_range": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "search_input": { "module": "dr-components", "since": "1.4.0", "reads": null, "children": "none", "events": { "on_submit": ["custom"] }, "empty": null }, "split_pane": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "any", "events": {}, "empty": null }, "file_viewer": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "none", "events": {}, "empty": null }, "line_grid": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "none", "events": { "on_save": ["custom"] }, "empty": null }, "document": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "none", "events": {}, "empty": null } });
|
|
5973
|
+
var LIBRARY_PARTS = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tabs": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "select": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "date_picker": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "data_grid": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "dialog": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "variance_table": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "toggle": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "control_group": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "callout": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "stage": "contract" }, "button": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "status": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "badge": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tag": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "empty_state": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "stepper": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "alert": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "checkbox": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "radio_group": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "file_upload": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "skeleton": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "progress": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "accordion": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "date_range": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "search_input": { "module": "dr-components", "since": "1.4.0", "stage": "contract" }, "split_pane": { "module": "dr-components", "since": "1.5.0", "stage": "contract" }, "file_viewer": { "module": "dr-components", "since": "1.5.0", "stage": "contract" }, "line_grid": { "module": "dr-components", "since": "1.5.0", "stage": "contract" }, "document": { "module": "dr-components", "since": "1.5.0", "stage": "contract" } });
|
|
5974
|
+
var TITLED_TYPES = Object.freeze(["widget", "form", "list", "queue", "stat", "chart", "custom", "number_input", "select", "date_picker", "dialog", "date_range", "fiscal_month", "panel"]);
|
|
5975
5975
|
var CONTROL_PARTS = Object.freeze(["number_input", "select", "date_picker", "toggle", "control_group", "slider", "checkbox", "radio_group", "date_range", "fiscal_month"]);
|
|
5976
5976
|
|
|
5977
5977
|
// ../flows/insights-builder/kit/contract/bundleScan.mjs
|
|
@@ -6608,8 +6608,14 @@ function partCalls(element) {
|
|
|
6608
6608
|
for (const column of Array.isArray(typed.columns) ? typed.columns : []) {
|
|
6609
6609
|
if (column && typeof column === "object" && column.cell === "toggle" && named(column.call)) out.push(column.call);
|
|
6610
6610
|
}
|
|
6611
|
+
if (element.type === "line_grid" && named(typed.action)) out.push(typed.action);
|
|
6611
6612
|
return out;
|
|
6612
6613
|
}
|
|
6614
|
+
function partReads(element) {
|
|
6615
|
+
const typed = element.props?.props ?? {};
|
|
6616
|
+
if (element.type !== "document") return [];
|
|
6617
|
+
return (Array.isArray(typed.sections) ? typed.sections : []).filter((section) => section && typeof section === "object" && named(section.source)).map((section) => section.source);
|
|
6618
|
+
}
|
|
6613
6619
|
function isPart(element) {
|
|
6614
6620
|
return typeof element?.type === "string" && Object.prototype.hasOwnProperty.call(PARTS, element.type);
|
|
6615
6621
|
}
|
|
@@ -6966,6 +6972,7 @@ function bindComponents(elements, { backend = null, model = null } = {}) {
|
|
|
6966
6972
|
if (named(props.action)) actionRow(props.action).components.push(uid);
|
|
6967
6973
|
if (named(props.source)) actionRow(props.source).reads.push(uid);
|
|
6968
6974
|
if (isPart(element)) for (const name of partCalls(element)) actionRow(name).components.push(uid);
|
|
6975
|
+
if (isPart(element)) for (const name of partReads(element)) actionRow(name).reads.push(uid);
|
|
6969
6976
|
if (entity !== null && element.type !== "field") entityRow(entity).components.push(uid);
|
|
6970
6977
|
if (!named(props.field)) continue;
|
|
6971
6978
|
const column = entity === null ? null : (tables[entity]?.columns ?? {})[props.field] ?? null;
|
|
@@ -7292,7 +7299,7 @@ function backendSection(app, manifest, pages, elements) {
|
|
|
7292
7299
|
attributed.add(name);
|
|
7293
7300
|
}
|
|
7294
7301
|
if (!isPart(element)) continue;
|
|
7295
|
-
for (const name of partCalls(element)) {
|
|
7302
|
+
for (const name of [...partCalls(element), ...partReads(element)]) {
|
|
7296
7303
|
record2(name, "attribute");
|
|
7297
7304
|
attributed.add(name);
|
|
7298
7305
|
}
|
|
@@ -9680,6 +9687,13 @@ var COMPONENT_PROPS3 = /* @__PURE__ */ new Set([
|
|
|
9680
9687
|
"declares",
|
|
9681
9688
|
// A row action's states (`data-dr-when`, dr-app-runtime 1.6.3), one JSON object.
|
|
9682
9689
|
"when",
|
|
9690
|
+
// dr-app-runtime 1.9.0 (PR-8): a form's or a detail's selected row (`data-dr-bind`), and a list
|
|
9691
|
+
// or queue column's status / badge maps and badge words (`data-dr-status-map`, `-badge-map`,
|
|
9692
|
+
// `-badge-labels`), one JSON object each.
|
|
9693
|
+
"bind",
|
|
9694
|
+
"status_map",
|
|
9695
|
+
"badge_map",
|
|
9696
|
+
"badge_labels",
|
|
9683
9697
|
"input_type",
|
|
9684
9698
|
"required",
|
|
9685
9699
|
"options"
|
|
@@ -10028,13 +10042,18 @@ var contract_schema_default = {
|
|
|
10028
10042
|
{ properties: { type: { const: "date_range" }, props: { $ref: "#/$defs/props_date_range" } } },
|
|
10029
10043
|
{ properties: { type: { const: "fiscal_month" }, props: { $ref: "#/$defs/props_fiscal_month" } } },
|
|
10030
10044
|
{ properties: { type: { const: "search_input" }, props: { $ref: "#/$defs/props_search_input" } } },
|
|
10045
|
+
{ properties: { type: { const: "split_pane" }, props: { $ref: "#/$defs/props_split_pane" } } },
|
|
10046
|
+
{ properties: { type: { const: "file_viewer" }, props: { $ref: "#/$defs/props_file_viewer" } } },
|
|
10047
|
+
{ properties: { type: { const: "line_grid" }, props: { $ref: "#/$defs/props_line_grid" } } },
|
|
10048
|
+
{ properties: { type: { const: "document" }, props: { $ref: "#/$defs/props_document" } } },
|
|
10049
|
+
{ properties: { type: { const: "panel" }, props: { $ref: "#/$defs/props_panel" } } },
|
|
10031
10050
|
{ properties: { type: { enum: ["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field"] }, props: { type: "object" } } }
|
|
10032
10051
|
],
|
|
10033
10052
|
properties: {
|
|
10034
10053
|
uid: { type: "string" },
|
|
10035
10054
|
page: { type: "string" },
|
|
10036
10055
|
type: {
|
|
10037
|
-
enum: ["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"],
|
|
10056
|
+
enum: ["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"],
|
|
10038
10057
|
description: "the dashboard vocabulary (region, grid, widget, control, nav, tab, slot) and the App Builder's component vocabulary (form, list, detail, queue, action, filter, the stat tile that reads one measure out of a summary handler, the chart that draws the rows one list, inbox or custom handler answers, the custom component a module under ui/components draws, and the field that sits inside one). widget is shared: on an app page it is a dashboard card too, drawn by dr-app-widgets in the kind data-dr-kind names, over the one widget payload the handler data-dr-source names answers"
|
|
10039
10058
|
},
|
|
10040
10059
|
role: { type: ["string", "null"], description: "a region's data-dr-kit (header, asof, refresh, nav, filters, controls), a widget's kind, a control's kind, a slot's name. Null for a component: its kind IS its type, and the role it is meant for is props.role." },
|
|
@@ -10331,7 +10350,7 @@ var contract_schema_default = {
|
|
|
10331
10350
|
additionalProperties: false,
|
|
10332
10351
|
properties: {
|
|
10333
10352
|
page: { type: "string" },
|
|
10334
|
-
component: { enum: ["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"] },
|
|
10353
|
+
component: { enum: ["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"] },
|
|
10335
10354
|
id: { type: ["string", "null"] },
|
|
10336
10355
|
entity: { type: ["string", "null"] },
|
|
10337
10356
|
handler: { type: ["string", "null"] }
|
|
@@ -10529,16 +10548,16 @@ var contract_schema_default = {
|
|
|
10529
10548
|
props_nav: { type: "object", properties: { aria_label: { type: "string", description: "the nav's accessible name" } } },
|
|
10530
10549
|
props_tab: { type: "object", properties: { current: { type: "boolean", description: "true on the page it names" }, href: { type: "string", description: "the page it links to" }, label: { type: "string", description: "the text it shows" } } },
|
|
10531
10550
|
props_slot: { type: "object", properties: {} },
|
|
10532
|
-
props_form: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the table the form writes" }, action: { type: "string", description: "data-dr-action: the handler that saves it" } } },
|
|
10551
|
+
props_form: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the table the form writes" }, action: { type: "string", description: "data-dr-action: the handler that saves it" }, source: { type: "string", description: "data-dr-source: with bind, the reader the bound row is read from" }, bind: { enum: ["selected"], description: "data-dr-bind (dr-app-runtime 1.9.0): selected \u2014 the page's selected row, read from source by its key: a generated reader read whole and the row picked out by id, or a custom handler whose backend.handlers verbs are all reads, called with {id}. Only on a form or detail at the page root or a child of a root panel or split_pane; a list, queue or data_grid (one with no on_row) on the page picks the row" } } },
|
|
10533
10552
|
props_list: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the table listed" }, source: { type: "string", description: "data-dr-source: the handler that answers the rows" }, filter: { description: "data-dr-filter, parsed from `col=value` into an object" } } },
|
|
10534
|
-
props_detail: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the table the row is from" }, action: { type: "string", description: "data-dr-action: the handler it acts through" } } },
|
|
10553
|
+
props_detail: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the table the row is from" }, action: { type: "string", description: "data-dr-action: the handler it acts through" }, source: { type: "string", description: "data-dr-source: with bind, the reader the bound row is read from" }, bind: { enum: ["selected"], description: "data-dr-bind (dr-app-runtime 1.9.0): selected \u2014 the page's selected row, read from source by its key: a generated reader read whole and the row picked out by id, or a custom handler whose backend.handlers verbs are all reads, called with {id}. Only on a form or detail at the page root or a child of a root panel or split_pane; a list, queue or data_grid (one with no on_row) on the page picks the row" } } },
|
|
10535
10554
|
props_queue: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the table queued" }, source: { type: "string", description: "data-dr-source: the inbox handler" }, filter: { description: "data-dr-filter, parsed from `col=value` into an object" } } },
|
|
10536
10555
|
props_action: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, action: { type: "string", description: "data-dr-action: the handler it runs" }, param: { type: "string", description: "data-dr-param: the argument it passes" }, entity: { type: "string", description: "data-dr-entity: the table the handler acts on" }, when: { type: "object", description: 'data-dr-when: the states a ROW ACTION is drawn in, one JSON object of column to the values the row may hold ({"status": ["open", "in_progress"]}), every column matched; a row without the column keeps the action. It hides a button and refuses nothing: the handler still has to (dr-app-runtime 1.7.1 on an action in a list or a queue; dr-components 1.2.0 on a data_grid row action)' } } },
|
|
10537
10556
|
props_filter: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, field: { type: "string", description: "data-dr-field: the column filtered" }, entity: { type: "string", description: "data-dr-entity: the table filtered" }, input_type: { type: "string", description: "the input's type" }, options: { type: "array", description: "the choices offered" } } },
|
|
10538
10557
|
props_stat: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, source: { type: "string", description: "data-dr-source: the summary handler" }, measure: { type: "string", description: "data-dr-measure: the key of the number shown" }, tone: { type: "string", description: "data-dr-tone: default | positive | warning | negative" }, format: { anyOf: [{ enum: ["currency", "number", "percent"] }, { type: "string", maxLength: 64, pattern: "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", description: "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], description: "data-dr-format: how the figure reads: a word or a platform format string" }, negative: { enum: ["minus", "red_minus", "absolute", "red_absolute"], description: "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } },
|
|
10539
10558
|
props_chart: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, source: { type: "string", description: "data-dr-source: the handler whose rows it draws" }, kind: { enum: ["line", "bar", "area"], description: "data-dr-kind: what it draws" }, x: { type: "string", description: "data-dr-x: the column on the category axis" }, y: { type: "string", description: "data-dr-y: the one numeric column drawn" }, series: { type: "string", description: "data-dr-series: the column whose distinct values are one line each" }, format: { anyOf: [{ enum: ["currency", "number", "percent"] }, { type: "string", maxLength: 64, pattern: "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", description: "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], description: "data-dr-format: how a number reads; percent is a value already in percent units" }, negative: { enum: ["minus", "red_minus", "absolute", "red_absolute"], description: "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } },
|
|
10540
10559
|
props_custom: { type: "object", properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, source: { type: "string", description: "data-dr-source: the handler whose answer the module receives" }, module: { type: "string", pattern: "^components/[a-z][a-z0-9_-]*\\.js$", description: "data-dr-module: the file that draws it" }, args: { type: "object", description: "data-dr-args: one JSON object handed to the module as ui.args; absent means {}" }, declares: { type: "object", description: "data-dr-declares: what the module does, stated for graders and app-space test \u2014 nothing draws from it and the runtime never reads it. Every key is optional; a name it lists must be one the contract declares (custom_declares)", additionalProperties: false, properties: { reads: { type: "array", items: { type: "string", minLength: 1 }, description: "the data.sources entries and handlers whose answers it draws" }, calls: { type: "array", items: { type: "string", minLength: 1 }, description: "the handlers it calls through ui.call; app-space test reports a call to any other (custom-undeclared-call)" }, produces: { type: "object", description: `per called handler, the payload keys it sends \u2014 {"project": ["growth", "hires"]}; for a handler it does not list, app-space test reads the keys off the module's ui.call object literal`, additionalProperties: { type: "array", items: { type: "string", minLength: 1 } } }, shows: { type: "array", description: "the numbers it displays; the module projects each one on the element that shows it (data-dr-field, data-dr-value, data-dr-format), which app-space test harvests into the element's values", items: { type: "object", additionalProperties: false, required: ["field"], properties: { field: { type: "string", minLength: 1, description: "the field the number is, as its data-dr-field names it" }, format: { anyOf: [{ enum: ["currency", "number", "percent"] }, { type: "string", maxLength: 64, pattern: "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", description: "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], description: "how it reads, as its data-dr-format says" }, scale: { enum: ["fraction"], description: "fraction: the value is a share (0.04) shown as a percent (4%)" } } } } } } } },
|
|
10541
|
-
props_field: { type: "object", properties: { entity: { type: "string", description: "data-dr-entity: the table the column is in" }, field: { type: "string", description: "data-dr-field: the column" }, source: { type: "string", description: "data-dr-source: the handler that answers its choices" }, label: { type: "string", description: "the field's label" }, required: { type: "boolean", description: "true when the form cannot be saved without it" }, input_type: { type: "string", description: "the input's type" }, options: { type: "array", description: "the choices offered" } } },
|
|
10560
|
+
props_field: { type: "object", properties: { entity: { type: "string", description: "data-dr-entity: the table the column is in" }, field: { type: "string", description: "data-dr-field: the column" }, source: { type: "string", description: "data-dr-source: the handler that answers its choices" }, label: { type: "string", description: "the field's label" }, required: { type: "boolean", description: "true when the form cannot be saved without it" }, input_type: { type: "string", description: "the input's type" }, options: { type: "array", description: "the choices offered" }, status_map: { type: "object", additionalProperties: { enum: ["info", "progress", "error", "warning", "success", "default"] }, description: "data-dr-status-map (dr-app-runtime 1.9.0), a list or queue column only: value \u2192 dr-status type, the value drawn as a status pill; an unmapped value is default" }, badge_map: { type: "object", additionalProperties: { enum: ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"] }, description: "data-dr-badge-map (dr-app-runtime 1.9.0), a list or queue column only: value \u2192 dr-badge colour, the value drawn as a badge; an unmapped value is stone" }, badge_labels: { type: "object", additionalProperties: { type: "string", minLength: 1 }, description: "data-dr-badge-labels (dr-app-runtime 1.9.0), a list or queue column with status_map or badge_map: value \u2192 the words the pill shows (true \u2192 Paid); an unlisted value shows itself" } } },
|
|
10542
10561
|
props_number_input: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, required: ["format"], properties: { field: { type: "string", pattern: "^[a-z][a-z0-9_]*$", description: "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, param: { type: "string", minLength: 1, description: "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, format: { anyOf: [{ enum: ["currency", "number", "percent"] }, { type: "string", maxLength: 64, pattern: "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", description: "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], description: "what the number is: the unit shown beside the input" }, negative: { enum: ["minus", "red_minus", "absolute", "red_absolute"], description: "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, scale: { enum: ["units", "fraction"], description: "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, currency: { type: "string", pattern: "^[A-Z]{3}$", description: "currency only: the ISO code; default USD" }, min: { type: "number", description: "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, max: { type: "number", description: "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, step: { type: "number", description: "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, decimals: { type: "integer", minimum: 0, description: "the decimals the STORED value is rounded to, after scaling; default as typed" }, value: { type: "number", description: "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, label: { type: "string", description: "the input's label; default the page param's label (param mode), else the element's label" }, placeholder: { type: "string", description: "the hint shown while the input is empty" } }, description: "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } },
|
|
10543
10562
|
props_tabs: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, required: ["tabs"], properties: { tabs: { type: "array", minItems: 1, items: { type: "object", additionalProperties: false, required: ["id", "label"], properties: { id: { type: "string", pattern: "^[a-z0-9][a-z0-9_-]*$", description: "the tab's id, which a tab_panel's tab names" }, label: { type: "string", minLength: 1, description: "the text on the tab" } } }, description: "the tabs, in order" }, default: { type: "string", description: "the id of the tab open first; default the first tab" } }, description: "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } },
|
|
10544
10563
|
props_tab_panel: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, required: ["tab"], properties: { tab: { type: "string", pattern: "^[a-z0-9][a-z0-9_-]*$", description: "the id of the tab (in the enclosing tabs) this panel belongs to" } }, description: "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } },
|
|
@@ -10570,7 +10589,12 @@ var contract_schema_default = {
|
|
|
10570
10589
|
props_filter_chip: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, required: ["kind", "param"], properties: { kind: { enum: ["option", "date-range", "fiscal-month"], description: "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, param: { type: "string", minLength: 1, description: "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, param_to: { type: "string", minLength: 1, description: "date-range only: the To param (period or month, the same kind as param)" }, label: { type: "string", description: "the chip's label (Label: value); default the page param's label, else its name" }, removable: { type: "boolean", description: "draws a remove (\xD7) that clears the filter; default false" }, disabled: { type: "boolean", description: "drawn but not interactive; default false" }, multiple: { type: "boolean", description: "option only: many values (a multi param), default false: one value" }, searchable: { type: "boolean", description: "option only: a search box above the list; default false" }, group_by: { type: "string", minLength: 1, description: "option only: the key each option is grouped under (group, on a stated option)" }, options: { type: "array", items: { type: "object", additionalProperties: false, required: ["value", "label"], properties: { value: { type: "string", minLength: 1, description: "what is stored" }, label: { type: "string", description: "what the reader sees" }, group: { type: "string", description: 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, description: "option only: the options; default the page param's declared values" }, label_from: { type: "string", description: "date-range only: the From picker's label; default From" }, label_to: { type: "string", description: "date-range only: the To picker's label; default To" }, fiscal_year_months_modifier: { type: "integer", minimum: 0, description: "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, fiscal_year_back: { type: "boolean", description: "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, description: "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } },
|
|
10571
10590
|
props_date_range: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, properties: { field: { type: "string", pattern: "^[a-z][a-z0-9_]*$", description: "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, field_to: { type: "string", pattern: "^[a-z][a-z0-9_]*$", description: "field mode: the payload key the To date is written under; required with field" }, param: { type: "string", minLength: 1, description: "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, param_to: { type: "string", minLength: 1, description: "param mode: the page param the To date moves, the same kind as param; required with param" }, mode: { enum: ["date", "month"], description: "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, value: { type: "string", pattern: "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", description: "field mode: the From date it starts on; default none" }, value_to: { type: "string", pattern: "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", description: "field mode: the To date it starts on; default none" }, label: { type: "string", description: "the control's label; default the From param's label (param mode), else the element's label" }, label_from: { type: "string", description: "the From picker's label; default From" }, label_to: { type: "string", description: "the To picker's label; default To" }, placeholder_from: { type: "string", description: "what From says before a pick; default Select\u2026" }, placeholder_to: { type: "string", description: "what To says before a pick; default Select\u2026" }, column: { type: "boolean", description: "From above To instead of side by side; default false" } }, description: "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } },
|
|
10572
10591
|
props_fiscal_month: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, properties: { field: { type: "string", pattern: "^[a-z][a-z0-9_]*$", description: "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, param: { type: "string", minLength: 1, description: "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, fiscal_year_months_modifier: { type: "integer", minimum: 0, description: "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, fiscal_year_back: { type: "boolean", description: "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, value: { type: "string", pattern: "^[0-9]{4}-[0-9]{2}$", description: "field mode: the calendar month it starts on; default none" }, label: { type: "string", description: "the control's label; default the page param's label (param mode), else the element's label" }, placeholder: { type: "string", description: "what the control says before a pick; default Select\u2026" } }, description: "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } },
|
|
10573
|
-
props_search_input: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, required: ["on_submit"], properties: { placeholder: { type: "string", description: "the box's placeholder; default Search\u2026" }, button: { type: "string", minLength: 1, description: "the words on the filled dr-button after the box; default Search" }, on_submit: { type: "string", pattern: "^[A-Za-z_][A-Za-z0-9_]*$", description: "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, param: { type: "string", minLength: 1, description: "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, description: "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } }
|
|
10592
|
+
props_search_input: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, required: ["on_submit"], properties: { placeholder: { type: "string", description: "the box's placeholder; default Search\u2026" }, button: { type: "string", minLength: 1, description: "the words on the filled dr-button after the box; default Search" }, on_submit: { type: "string", pattern: "^[A-Za-z_][A-Za-z0-9_]*$", description: "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, param: { type: "string", minLength: 1, description: "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, description: "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } },
|
|
10593
|
+
props_split_pane: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, props: { type: "object", additionalProperties: false, properties: { ratio: { type: "array", minItems: 2, items: { type: "number", minimum: 1 }, description: "the two panes' shares of the width, left then right ([55, 45]); exactly two; default [50, 50]" }, resizable: { type: "boolean", description: "draw a divider the reader drags, or moves with the arrow keys (role=separator); default false" }, remember: { type: "boolean", description: "keep the width the reader set, per page, in their browser (localStorage); default false" }, min: { type: "array", minItems: 2, items: { type: "integer", minimum: 0 }, description: "each pane's narrowest width in px, left then right; default [240, 240]" } }, description: "data-dr-props: the split_pane part's typed props, handed to it as PartProps.props" } } },
|
|
10594
|
+
props_file_viewer: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, source: { type: "string", description: "data-dr-source: the reader whose row holds the file" }, props: { type: "object", additionalProperties: false, required: ["field"], properties: { field: { type: "string", minLength: 1, description: "the row's file column: {url, filename, mime_type, size} as the platform reads a file column back, or the stored reference" }, bind: { enum: ["selected"], description: `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, height: { type: "integer", minimum: 120, description: "the viewer's height in px; default 640" }, toolbar: { type: "boolean", description: "the bar over the file: its name and a download link; default true" } }, description: "data-dr-props: the file_viewer part's typed props, handed to it as PartProps.props" } } },
|
|
10595
|
+
props_line_grid: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, entity: { type: "string", description: "data-dr-entity: the child table the rows belong to" }, source: { type: "string", description: "data-dr-source: the reader of the child rows" }, props: { type: "object", additionalProperties: false, required: ["columns", "action"], properties: { columns: { type: "array", minItems: 1, items: { anyOf: [{ type: "string", minLength: 1 }, { type: "object", additionalProperties: false, required: ["field"], properties: { field: { type: "string", minLength: 1, description: "the child row's key the column edits" }, label: { type: "string", description: "the header; default the field, humanised" }, format: { enum: ["currency", "number", "percent", "text", "date"], description: "how the value reads; default text" }, editable: { type: "boolean", description: "whether the reader types in it; default true" }, options: { type: "array", minItems: 1, items: { type: "string" }, description: "the values a select cell offers; default a typed cell" }, currency: { type: "string", pattern: "^[A-Z]{3}$", description: "currency only: the ISO code; default USD" } } }] }, description: "the columns, in order: a field name, or {field, label, format, editable, options, currency}" }, key: { type: "string", minLength: 1, description: "the child row's identity column, posted with a kept row; default id" }, add_row: { type: "boolean", description: "draw Add a line, which adds a blank row at the bottom; default false" }, remove_row: { anyOf: [{ type: "boolean" }, { enum: ["confirm"] }], description: "draw a \xD7 on each row; confirm asks first; default false" }, totals: { enum: ["top", "bottom", "none"], description: "a totals row over the number and currency columns, above or below the rows; default none" }, action: { type: "string", pattern: "^[A-Za-z_][A-Za-z0-9_]*$", description: "the custom handler Save calls with {id: <the parent row's key>, rows: [...]}; the lines re-read after it" }, bind: { enum: ["selected"], description: `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, empty_text: { type: "string", description: "the sentence while there are no rows; default No lines yet." } }, description: "data-dr-props: the line_grid part's typed props, handed to it as PartProps.props" } } },
|
|
10596
|
+
props_document: { type: "object", additionalProperties: false, required: ["props"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", description: "data-dr-label: the title a reader sees" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" }, source: { type: "string", description: "data-dr-source: the reader of the document's row" }, props: { type: "object", additionalProperties: false, required: ["sections"], properties: { title: { type: "string", description: "the words on the Print bar, left of the button; default none (the card's title is the element's label)" }, page_size: { enum: ["A4", "Letter"], description: "the paper it prints on; default A4" }, bind: { enum: ["selected"], description: `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, currency: { type: "string", pattern: "^[A-Z]{3}$", description: "the ISO code its currency figures read in; default USD" }, sections: { type: "array", minItems: 1, items: { type: "object", additionalProperties: false, required: ["kind"], properties: { kind: { enum: ["header", "table", "text", "totals", "terms"], description: "what the section is" }, title: { type: "string", description: "header: the big title; table, text, terms: the section's heading" }, title_field: { type: "string", minLength: 1, description: "header: the row's key whose value is the title" }, label: { type: "string", description: "header: the word on the right (Purchase order)" }, fields: { type: "array", items: { type: "object", additionalProperties: false, required: ["field"], properties: { field: { type: "string", minLength: 1, description: "the row's key" }, label: { type: "string", description: "the words before it; default the field, humanised" }, format: { enum: ["currency", "number", "percent", "text", "date"], description: "how the value reads; default text" } } }, description: "header: the row's values listed under the title" }, columns: { type: "array", minItems: 1, items: { type: "object", additionalProperties: false, required: ["field"], properties: { field: { type: "string", minLength: 1, description: "the row's key" }, label: { type: "string", description: "the words before it; default the field, humanised" }, format: { enum: ["currency", "number", "percent", "text", "date"], description: "how the value reads; default text" } } }, description: "table: its columns" }, source: { type: "string", pattern: "^[A-Za-z_][A-Za-z0-9_]*$", description: "table: the reader of the child rows, called with {<its by>: key}" }, field: { type: "string", minLength: 1, description: "table: the row's array of child rows; text, terms: the row's key holding the words" }, text: { type: "string", description: "text, terms: the words" }, lines: { type: "array", minItems: 1, items: { type: "object", additionalProperties: false, required: ["label"], properties: { label: { type: "string", minLength: 1, description: "the words" }, field: { type: "string", minLength: 1, description: "the row's key holding the figure" }, sum: { type: "string", minLength: 1, description: "a table column whose figures it adds" }, format: { enum: ["currency", "number", "percent", "text", "date"], description: "how the value reads; default text" } } }, description: "totals: its lines, each one figure" }, page_break: { type: "boolean", description: "printed, start this section on a new page" } } }, description: "the document, top to bottom" } }, description: "data-dr-props: the document part's typed props, handed to it as PartProps.props" } } },
|
|
10597
|
+
props_panel: { type: "object", additionalProperties: false, required: ["label"], properties: { id: { type: "string", description: "data-dr-id: the element's stable id, unique on its page" }, label: { type: "string", minLength: 1, description: "data-dr-label: the card's title (required: a panel is one titled card)" }, role: { type: "string", description: "data-dr-role: the app role this element is meant for; absent means every role" }, span: { type: "integer", description: "data-dr-span: columns of the kit's twelve" }, section: { type: "string", description: "the page section the element sits in (the nearest data-dr-section)" } } }
|
|
10574
10598
|
}
|
|
10575
10599
|
};
|
|
10576
10600
|
|
|
@@ -12511,13 +12535,13 @@ function badgesCss() {
|
|
|
12511
12535
|
}
|
|
12512
12536
|
|
|
12513
12537
|
// ../flows/insights-builder/kit/contract/compileApp.mjs
|
|
12514
|
-
var RUNTIME = "dr-app-runtime@1.
|
|
12538
|
+
var RUNTIME = "dr-app-runtime@1.9.1";
|
|
12515
12539
|
var UI_KIT2 = "ui-kit/v4";
|
|
12516
12540
|
var CHARTS = "echarts@5.6.0";
|
|
12517
12541
|
var FMT = "dr-fmt@2.0.1";
|
|
12518
12542
|
var TOKENS = "dr-tokens@1.0.0";
|
|
12519
12543
|
var WIDGETS = "dr-app-widgets@1.2.0";
|
|
12520
|
-
var COMPONENTS = "dr-components@1.
|
|
12544
|
+
var COMPONENTS = "dr-components@1.5.0";
|
|
12521
12545
|
var CONTROLS = "dr-components-controls@1.2.0";
|
|
12522
12546
|
var PART_FILES = {
|
|
12523
12547
|
"dr-components": { css: "components.css", js: "components.js" },
|
|
@@ -12624,11 +12648,12 @@ var HANDLER_KEYS = [
|
|
|
12624
12648
|
"requiresRole"
|
|
12625
12649
|
];
|
|
12626
12650
|
var ATTR_ORDER = Object.freeze([
|
|
12627
|
-
...["component", "id", "entity", "action", "source", "field", "filter", "param", "measure", "kind", "x", "y", "series", "format", "negative", "module", "args", "props", "declares"],
|
|
12651
|
+
...["component", "id", "entity", "action", "source", "bind", "field", "filter", "param", "measure", "kind", "x", "y", "series", "format", "negative", "module", "args", "props", "declares"],
|
|
12628
12652
|
...ARGS_RULE_ATTRIBUTES.map(([, prop]) => prop),
|
|
12629
12653
|
...["role", "label", "tone"]
|
|
12630
12654
|
]);
|
|
12631
12655
|
var ARGS_RULE_PROPS = new Set(ARGS_RULE_ATTRIBUTES.map(([, prop]) => prop));
|
|
12656
|
+
var ATTR_NAME = new Map([...COMPONENT_PROPS2, ...STRUCTURED_ATTRIBUTES2].map(([name, prop]) => [prop, name]));
|
|
12632
12657
|
var ENTITY_WRITERS = /* @__PURE__ */ new Set(["form", "list", "queue", "detail", "filter"]);
|
|
12633
12658
|
var DECIMAL_TYPES = /* @__PURE__ */ new Set(["decimal", "numeric", "money"]);
|
|
12634
12659
|
var NUMBER_TYPES = /* @__PURE__ */ new Set(["decimal", "numeric", "money", "int", "integer", "bigint", "float"]);
|
|
@@ -13599,11 +13624,15 @@ function compileApp(contract, { kit = null, runtime = RUNTIME, extra = {} } = {}
|
|
|
13599
13624
|
problems.push(...whenPinProblems(declared, { "dr-components": appComponents }));
|
|
13600
13625
|
problems.push(...propsPinProblems(declared, { "dr-components": appComponents, "dr-components-controls": appControls }));
|
|
13601
13626
|
problems.push(...partPinProblems(declared, { "dr-components": appComponents, "dr-components-controls": appControls }));
|
|
13627
|
+
problems.push(...runtimePinProblems(declared, runtime));
|
|
13602
13628
|
const widgetFindings = tree.problems.length === 0 ? widgetProblems(declared, tree, handlers, contract?.data?.sources, appWidgets) : [];
|
|
13603
13629
|
const warnings = [...sourceFindings, ...widgetFindings].filter((one) => one.advisory).map(({ advisory: _advisory, ...one }) => one);
|
|
13604
13630
|
problems.push(...widgetFindings.filter((one) => !one.advisory));
|
|
13605
13631
|
if (tree.problems.length === 0) problems.push(...partProblems(declared, tree, handlers, sources, contract?.pages, model, { "dr-components": appComponents }));
|
|
13606
|
-
if (tree.problems.length === 0) problems.push(...workflowProblems(declared, tree, handlers, sources, contract?.backend?.handlers));
|
|
13632
|
+
if (tree.problems.length === 0) problems.push(...workflowProblems(declared, tree, handlers, sources, contract?.backend?.handlers, model));
|
|
13633
|
+
const selectedFindings = tree.problems.length === 0 ? selectedProblems(declared, tree, handlers, sources, contract?.backend?.handlers, contract?.pages) : [];
|
|
13634
|
+
problems.push(...selectedFindings.filter((one) => !one.advisory));
|
|
13635
|
+
warnings.push(...selectedFindings.filter((one) => one.advisory).map(({ advisory: _advisory, ...one }) => one));
|
|
13607
13636
|
if (problems.length > 0) return { files: {}, problems, contract, warnings };
|
|
13608
13637
|
if (sources !== stated2) contract = { ...contract, data: { ...contract.data, sources } };
|
|
13609
13638
|
const parented = dropEmptyArgs(fillChartFormats(fillParents(declared, tree), handlers, model));
|
|
@@ -13694,6 +13723,8 @@ function writtenChildren(uid, elements, tree) {
|
|
|
13694
13723
|
const kids = childrenOf(uid, elements, tree);
|
|
13695
13724
|
if (isPart2(elements[uid])) return kids.map((child) => ({ uid: child, nested: true }));
|
|
13696
13725
|
switch (elements[uid]?.type) {
|
|
13726
|
+
case "panel":
|
|
13727
|
+
return kids.map((child) => ({ uid: child, nested: true }));
|
|
13697
13728
|
case "region":
|
|
13698
13729
|
return (elements[uid].role ?? "header") === "header" ? kids.map((child) => ({ uid: child, nested: true })) : [];
|
|
13699
13730
|
case "form":
|
|
@@ -13735,6 +13766,7 @@ function insideDetail(uid, elements, tree) {
|
|
|
13735
13766
|
}
|
|
13736
13767
|
var HOLDS = {
|
|
13737
13768
|
form: "a form writes its children as its inputs",
|
|
13769
|
+
panel: "a panel writes its children inside its own section",
|
|
13738
13770
|
detail: "a detail writes field children as its terms, then list and form children under them, and nothing else",
|
|
13739
13771
|
list: "a list writes filter, field, detail and action children, and nothing else",
|
|
13740
13772
|
queue: "a queue writes filter, field, detail and action children, and nothing else"
|
|
@@ -14378,6 +14410,10 @@ function byProblems(elements, tree, handlers, model) {
|
|
|
14378
14410
|
reached.add(name);
|
|
14379
14411
|
continue;
|
|
14380
14412
|
}
|
|
14413
|
+
if (element.type === "line_grid" && key === "source" && element.props?.props?.bind === "selected") {
|
|
14414
|
+
reached.add(name);
|
|
14415
|
+
continue;
|
|
14416
|
+
}
|
|
14381
14417
|
const parent = parentOf(tree, uid);
|
|
14382
14418
|
const holder = parent === null ? null : elements[parent];
|
|
14383
14419
|
const pointer2 = `/elements/${escapePointer3(uid)}/props/${key}`;
|
|
@@ -14401,6 +14437,11 @@ function byProblems(elements, tree, handlers, model) {
|
|
|
14401
14437
|
reached.add(name);
|
|
14402
14438
|
}
|
|
14403
14439
|
}
|
|
14440
|
+
for (const uid of Object.keys(elements).sort(natural3)) {
|
|
14441
|
+
const element = elements[uid] ?? {};
|
|
14442
|
+
if (element.type !== "document" || !Array.isArray(element.props?.props?.sections)) continue;
|
|
14443
|
+
for (const section of element.props.props.sections) if (isPlainObject6(section) && named5(section.source) && linked.has(section.source)) reached.add(section.source);
|
|
14444
|
+
}
|
|
14404
14445
|
for (const [name, target] of linked) {
|
|
14405
14446
|
if (reached.has(name)) continue;
|
|
14406
14447
|
problems.push({
|
|
@@ -14617,19 +14658,12 @@ function partPinProblems(elements, pins) {
|
|
|
14617
14658
|
}
|
|
14618
14659
|
var WORKFLOW_READERS = ["list", "inbox", "history", "summary", "custom"];
|
|
14619
14660
|
var DOCUMENT_KINDS = ["header", "table", "text", "totals", "terms"];
|
|
14620
|
-
function workflowProblems(elements, tree, handlers = {}, sources = {}, backendHandlers = {}) {
|
|
14661
|
+
function workflowProblems(elements, tree, handlers = {}, sources = {}, backendHandlers = {}, model = null) {
|
|
14621
14662
|
const problems = [];
|
|
14622
14663
|
const declared = isPlainObject6(sources) ? sources : {};
|
|
14623
14664
|
const roleOf = (name) => Object.prototype.hasOwnProperty.call(handlers, name) ? handlers[name]?.role : void 0;
|
|
14624
14665
|
const verbsOf = (name) => isPlainObject6(backendHandlers) && isPlainObject6(backendHandlers[name]) ? backendHandlers[name].verbs : void 0;
|
|
14625
|
-
const reader = (name) =>
|
|
14626
|
-
const role = roleOf(name);
|
|
14627
|
-
if (["list", "inbox", "history", "summary"].includes(role)) return true;
|
|
14628
|
-
if (role !== void 0 && role !== "custom") return false;
|
|
14629
|
-
if (Object.prototype.hasOwnProperty.call(declared, name)) return true;
|
|
14630
|
-
const verbs = verbsOf(name);
|
|
14631
|
-
return Array.isArray(verbs) && verbs.length > 0 && verbs.every((verb) => ["query", "get", "aggregate"].includes(verb));
|
|
14632
|
-
};
|
|
14666
|
+
const reader = (name) => boundReadOf(name, handlers, declared, backendHandlers) !== null;
|
|
14633
14667
|
const parentOf2 = (uid) => elements[uid]?.parent ?? tree?.parent?.get?.(uid) ?? Object.keys(elements).find((other) => Array.isArray(elements[other]?.children) && elements[other].children.includes(uid)) ?? null;
|
|
14634
14668
|
const bindReaches = (uid) => {
|
|
14635
14669
|
const up = parentOf2(uid);
|
|
@@ -14663,6 +14697,34 @@ function workflowProblems(elements, tree, handlers = {}, sources = {}, backendHa
|
|
|
14663
14697
|
}
|
|
14664
14698
|
}
|
|
14665
14699
|
if (type === "file_viewer") readsFrom(props.source, `${at}/props/source`, "the row whose file it shows");
|
|
14700
|
+
const columnsOf2 = (table) => named5(table) && isPlainObject6(model?.tables?.[table]?.columns) ? model.tables[table].columns : null;
|
|
14701
|
+
const known = (columns, field) => Object.prototype.hasOwnProperty.call(columns, field) || INJECTED_COLUMNS.includes(field);
|
|
14702
|
+
if (type === "file_viewer" && named5(typed.field)) {
|
|
14703
|
+
const sibling = Object.keys(elements).find((other) => elements[other]?.page === element.page && ["form", "detail"].includes(elements[other]?.type) && elements[other]?.props?.source === props.source && named5(elements[other]?.props?.entity));
|
|
14704
|
+
const table = tableOfSource(props.source, handlers, declared) ?? (sibling ? elements[sibling].props.entity : null);
|
|
14705
|
+
const columns = columnsOf2(table);
|
|
14706
|
+
if (columns && !known(columns, typed.field)) say("part_field", `${at}/props/props/field`, `shows the file in "${typed.field}", which is no column of "${table}"; name its file column`);
|
|
14707
|
+
else if (columns && columns[typed.field]?.type !== "file") say("part_field", `${at}/props/props/field`, `shows the file in "${typed.field}", a ${columns[typed.field]?.type ?? "platform"} column of "${table}"; a file_viewer shows a file column's stored upload`);
|
|
14708
|
+
}
|
|
14709
|
+
if (type === "line_grid" && Array.isArray(typed.columns)) {
|
|
14710
|
+
const table = tableOfSource(props.source, handlers, declared);
|
|
14711
|
+
const columns = columnsOf2(table);
|
|
14712
|
+
if (columns) {
|
|
14713
|
+
typed.columns.forEach((column, index) => {
|
|
14714
|
+
const field = typeof column === "string" ? column : column?.field;
|
|
14715
|
+
if (named5(field) && !known(columns, field)) say("part_field", `${at}/props/props/columns/${index}`, `edits "${field}", which is no column of "${table}" (the rows "${props.source}" answers)`);
|
|
14716
|
+
});
|
|
14717
|
+
}
|
|
14718
|
+
}
|
|
14719
|
+
if (type === "document" && Array.isArray(typed.sections)) {
|
|
14720
|
+
typed.sections.forEach((section, index) => {
|
|
14721
|
+
const columns = isPlainObject6(section) && named5(section.source) ? columnsOf2(tableOfSource(section.source, handlers, declared)) : null;
|
|
14722
|
+
if (!columns || !Array.isArray(section.columns)) return;
|
|
14723
|
+
section.columns.forEach((column, n) => {
|
|
14724
|
+
if (isPlainObject6(column) && named5(column.field) && !known(columns, column.field)) say("part_field", `${at}/props/props/sections/${index}/columns/${n}/field`, `section ${index} (table) shows "${column.field}", which is no column of "${tableOfSource(section.source, handlers, declared)}" (the rows "${section.source}" answers)`);
|
|
14725
|
+
});
|
|
14726
|
+
});
|
|
14727
|
+
}
|
|
14666
14728
|
if (type === "document") readsFrom(props.source, `${at}/props/source`, "the row it prints");
|
|
14667
14729
|
if (type === "line_grid") {
|
|
14668
14730
|
readsFrom(props.source, `${at}/props/source`, "its lines");
|
|
@@ -14704,6 +14766,188 @@ function workflowProblems(elements, tree, handlers = {}, sources = {}, backendHa
|
|
|
14704
14766
|
}
|
|
14705
14767
|
return problems;
|
|
14706
14768
|
}
|
|
14769
|
+
var ROW_READERS = ["list", "inbox", "history", "summary"];
|
|
14770
|
+
var READ_VERBS = ["query", "get", "aggregate"];
|
|
14771
|
+
var ROOT_HOLDERS = ["panel", "split_pane"];
|
|
14772
|
+
var BOUND_TYPES = ["form", "detail"];
|
|
14773
|
+
var STATUS_TYPES = Object.freeze(PROPS_SCHEMAS.field?.properties?.status_map?.additionalProperties?.enum ?? []);
|
|
14774
|
+
var BADGE_COLORS = Object.freeze(PROPS_SCHEMAS.field?.properties?.badge_map?.additionalProperties?.enum ?? []);
|
|
14775
|
+
function boundReadOf(name, handlers = {}, sources = {}, backendHandlers = {}) {
|
|
14776
|
+
const role = Object.prototype.hasOwnProperty.call(handlers, name) ? handlers[name]?.role : void 0;
|
|
14777
|
+
if (ROW_READERS.includes(role)) return "rows";
|
|
14778
|
+
if (role !== void 0 && role !== "custom") return null;
|
|
14779
|
+
if (isPlainObject6(sources) && Object.prototype.hasOwnProperty.call(sources, name)) return "rows";
|
|
14780
|
+
const verbs = isPlainObject6(backendHandlers) && isPlainObject6(backendHandlers[name]) ? backendHandlers[name].verbs : void 0;
|
|
14781
|
+
return Array.isArray(verbs) && verbs.length > 0 && verbs.every((verb) => READ_VERBS.includes(verb)) ? "id" : null;
|
|
14782
|
+
}
|
|
14783
|
+
function tableOfSource(name, handlers = {}, sources = {}) {
|
|
14784
|
+
const row = Object.prototype.hasOwnProperty.call(handlers, name) ? handlers[name] : null;
|
|
14785
|
+
if (row && row.role !== "custom" && named5(row.table)) return row.table;
|
|
14786
|
+
const source = isPlainObject6(sources) && Object.prototype.hasOwnProperty.call(sources, name) ? sources[name] : null;
|
|
14787
|
+
return named5(source?.from?.table) ? source.from.table : null;
|
|
14788
|
+
}
|
|
14789
|
+
var RUNTIME_SINCE = Object.freeze({ panel: "1.9.0", bind: "1.9.0", field_map: "1.9.0", part_bind: "1.9.1", split_bind: "1.9.1", workflow_part: "1.9.1" });
|
|
14790
|
+
function runtimePinProblems(elements, runtime) {
|
|
14791
|
+
const problems = [];
|
|
14792
|
+
if (typeof runtime !== "string" || !runtime.startsWith("dr-app-runtime@")) return problems;
|
|
14793
|
+
const pin = runtime.slice(runtime.lastIndexOf("@") + 1);
|
|
14794
|
+
const say = (uid, tail, what, first) => {
|
|
14795
|
+
if (pinAtLeast(runtime, first)) return;
|
|
14796
|
+
problems.push({ code: "runtime_unsupported", pointer: `/elements/${escapePointer3(uid)}${tail}`, message: `${what} \u2014 dr-app-runtime@${first} is the first release that draws it, and the pinned runtime is ${pin}; pin ${first} or later, or drop it` });
|
|
14797
|
+
};
|
|
14798
|
+
for (const uid of Object.keys(elements).sort(natural3)) {
|
|
14799
|
+
const element = elements[uid] ?? {};
|
|
14800
|
+
const props = isPlainObject6(element.props) ? element.props : {};
|
|
14801
|
+
const name = `${element.type} "${props.id ?? uid}"`;
|
|
14802
|
+
if (element.type === "panel") say(uid, "/type", `${name} is a panel`, RUNTIME_SINCE.panel);
|
|
14803
|
+
if (["split_pane", "file_viewer", "line_grid", "document"].includes(element.type)) say(uid, "/type", `${name} is a dr-components 1.5.0 workflow part, which reads the page's selected row`, RUNTIME_SINCE.workflow_part);
|
|
14804
|
+
if (props.bind !== void 0 && props.bind !== null) {
|
|
14805
|
+
const up = elements[element.parent]?.type;
|
|
14806
|
+
say(uid, "/props/bind", up === "split_pane" ? `${name} binds the selected row inside a split_pane` : `${name} binds the selected row`, up === "split_pane" ? RUNTIME_SINCE.split_bind : RUNTIME_SINCE.bind);
|
|
14807
|
+
}
|
|
14808
|
+
if (isPlainObject6(props.props) && props.props.bind === "selected") say(uid, "/props/props/bind", `${name} binds the selected row in its typed props`, RUNTIME_SINCE.part_bind);
|
|
14809
|
+
if (element.type === "field") {
|
|
14810
|
+
for (const key of ["status_map", "badge_map", "badge_labels"]) if (props[key] !== void 0 && props[key] !== null) say(uid, `/props/${key}`, `field "${props.field ?? uid}" states ${key}`, RUNTIME_SINCE.field_map);
|
|
14811
|
+
}
|
|
14812
|
+
}
|
|
14813
|
+
return problems;
|
|
14814
|
+
}
|
|
14815
|
+
function selectedProblems(elements, tree, handlers = {}, sources = {}, backendHandlers = {}, pages = []) {
|
|
14816
|
+
const problems = [];
|
|
14817
|
+
const parentOf2 = (uid) => tree?.parent?.get?.(uid) ?? elements[uid]?.parent ?? null;
|
|
14818
|
+
const isRoot = (uid) => parentOf2(uid) === null;
|
|
14819
|
+
const rootHeld = (uid) => {
|
|
14820
|
+
const up = parentOf2(uid);
|
|
14821
|
+
return up === null || ROOT_HOLDERS.includes(elements[up]?.type) && isRoot(up);
|
|
14822
|
+
};
|
|
14823
|
+
const nameOf5 = (uid) => elements[uid]?.props?.id ?? uid;
|
|
14824
|
+
const say = (code, uid, tail, message) => problems.push({ code, pointer: `/elements/${escapePointer3(uid)}${tail}`, message });
|
|
14825
|
+
const boundPages = /* @__PURE__ */ new Map();
|
|
14826
|
+
const markBound = (uid) => {
|
|
14827
|
+
const page = elements[uid]?.page;
|
|
14828
|
+
if (!boundPages.has(page)) boundPages.set(page, uid);
|
|
14829
|
+
};
|
|
14830
|
+
for (const uid of Object.keys(elements).sort(natural3)) {
|
|
14831
|
+
const element = elements[uid] ?? {};
|
|
14832
|
+
const props = isPlainObject6(element.props) ? element.props : {};
|
|
14833
|
+
const typed = isPlainObject6(props.props) ? props.props : {};
|
|
14834
|
+
if (props.bind !== void 0 && props.bind !== null) {
|
|
14835
|
+
if (!BOUND_TYPES.includes(element.type)) {
|
|
14836
|
+
say("bind_value", uid, "/props/bind", `${element.type} "${nameOf5(uid)}" states bind; only a form or a detail binds the selected row by its own bind \u2014 a file_viewer, line_grid or document states bind: "selected" in its typed props (props.props.bind)`);
|
|
14837
|
+
continue;
|
|
14838
|
+
}
|
|
14839
|
+
if (props.bind !== "selected") {
|
|
14840
|
+
say("bind_value", uid, "/props/bind", `${element.type} "${nameOf5(uid)}" states bind ${JSON.stringify(props.bind)}; the one row a page can bind is "selected", the row a list, queue or data_grid picked`);
|
|
14841
|
+
continue;
|
|
14842
|
+
}
|
|
14843
|
+
markBound(uid);
|
|
14844
|
+
if (element.type === "form" && !stated(props.action)) {
|
|
14845
|
+
say("bind_action", uid, "/props/action", `form "${nameOf5(uid)}" binds the selected row and names no action, so its Save posts nowhere; name the save handler that writes the row, or bind a detail to show it read-only`);
|
|
14846
|
+
}
|
|
14847
|
+
if (!rootHeld(uid)) {
|
|
14848
|
+
say("bind_place", uid, "/props/bind", `${element.type} "${nameOf5(uid)}" binds the selected row inside "${parentOf2(uid)}" (a ${elements[parentOf2(uid)]?.type ?? "element"}), where the runtime reads no bind and picks nothing; put it at the page root, or in a root panel or split_pane`);
|
|
14849
|
+
}
|
|
14850
|
+
const source = props.source;
|
|
14851
|
+
if (!stated(source)) {
|
|
14852
|
+
say("bind_source", uid, "/props/source", `${element.type} "${nameOf5(uid)}" binds the selected row and names no source to read it from; name a reader \u2014 a list, inbox, history or summary handler, a data.sources entry, or a custom handler whose verbs are all query, get or aggregate (called with {id})`);
|
|
14853
|
+
} else {
|
|
14854
|
+
const how = boundReadOf(source, handlers, sources, backendHandlers);
|
|
14855
|
+
if (how === null) {
|
|
14856
|
+
const role = Object.prototype.hasOwnProperty.call(handlers, source) ? handlers[source]?.role : void 0;
|
|
14857
|
+
say(
|
|
14858
|
+
"bind_source",
|
|
14859
|
+
uid,
|
|
14860
|
+
"/props/source",
|
|
14861
|
+
`${element.type} "${nameOf5(uid)}" binds the selected row and reads it from "${source}", ${role !== void 0 && role !== "custom" ? `a ${role} handler` : "a custom handler whose backend.handlers verbs are not all reads"}; a pick would call a writer, so the runtime never calls it and draws an error \u2014 read through a list, inbox, history or summary handler, a data.sources entry, or a custom handler whose verbs are all query, get or aggregate`
|
|
14862
|
+
);
|
|
14863
|
+
} else if (named5(props.entity) && named5(tableOfSource(source, handlers, sources)) && tableOfSource(source, handlers, sources) !== props.entity) {
|
|
14864
|
+
say("bind_source", uid, "/props/source", `${element.type} "${nameOf5(uid)}" is over "${props.entity}" and reads the selected row from "${source}", whose rows are "${tableOfSource(source, handlers, sources)}"; it would show (and a Save would post) another table's row \u2014 read the row from a reader over "${props.entity}"`);
|
|
14865
|
+
} else if (how === "rows") {
|
|
14866
|
+
problems.push({
|
|
14867
|
+
code: "bind_reads_whole",
|
|
14868
|
+
advisory: true,
|
|
14869
|
+
pointer: `/elements/${escapePointer3(uid)}/props/source`,
|
|
14870
|
+
message: `${element.type} "${nameOf5(uid)}" reads the selected row from "${source}", which answers rows: every pick reads them all and picks one out by id, so a row past its limit reads "Not found" \u2014 a custom handler whose verbs are all reads is called with {id} instead`
|
|
14871
|
+
});
|
|
14872
|
+
}
|
|
14873
|
+
}
|
|
14874
|
+
}
|
|
14875
|
+
if (isPart2(element) && typed.bind === "selected") {
|
|
14876
|
+
markBound(uid);
|
|
14877
|
+
if (["file_viewer", "document"].includes(element.type) && stated(props.source) && boundReadOf(props.source, handlers, sources, backendHandlers) === "rows") {
|
|
14878
|
+
problems.push({
|
|
14879
|
+
code: "bind_reads_whole",
|
|
14880
|
+
advisory: true,
|
|
14881
|
+
pointer: `/elements/${escapePointer3(uid)}/props/source`,
|
|
14882
|
+
message: `${element.type} "${nameOf5(uid)}" reads the selected row from "${props.source}", which answers rows: every pick reads them all and picks one out by id, so a row past its limit reads "Not found" \u2014 a custom handler whose verbs are all reads is called with {id} instead`
|
|
14883
|
+
});
|
|
14884
|
+
}
|
|
14885
|
+
}
|
|
14886
|
+
if (element.type === "panel") {
|
|
14887
|
+
if (!stated(props.label)) say("panel_label", uid, "/props/label", `panel "${nameOf5(uid)}" names no label; a panel is one titled card and draws its label as the title \u2014 give it one`);
|
|
14888
|
+
if (!rootHeld(uid)) say("panel_place", uid, "", `panel "${nameOf5(uid)}" sits inside "${parentOf2(uid)}" (a ${elements[parentOf2(uid)]?.type ?? "element"}); a panel draws its children as roots, so it sits where a root is drawn \u2014 at the page root, or as a pane of a root split_pane`);
|
|
14889
|
+
}
|
|
14890
|
+
if (element.type === "field") {
|
|
14891
|
+
const maps = ["status_map", "badge_map", "badge_labels"].filter((key) => props[key] !== void 0 && props[key] !== null);
|
|
14892
|
+
if (maps.length === 0) continue;
|
|
14893
|
+
const holder = elements[parentOf2(uid)]?.type;
|
|
14894
|
+
const field = `field "${props.field ?? uid}"`;
|
|
14895
|
+
if (!["list", "queue"].includes(holder)) {
|
|
14896
|
+
say("field_map", uid, `/props/${maps[0]}`, `${field} states ${maps.join(", ")} in a ${holder ?? "page"}; the maps draw a pill in a list or queue column (dr-app-runtime 1.9.0) and nothing reads them anywhere else \u2014 drop them, or use a data_grid column's cell: badge / status`);
|
|
14897
|
+
continue;
|
|
14898
|
+
}
|
|
14899
|
+
for (const key of maps) {
|
|
14900
|
+
const map = props[key];
|
|
14901
|
+
if (!isPlainObject6(map)) {
|
|
14902
|
+
say("field_map", uid, `/props/${key}`, `${field} states ${key} as ${JSON.stringify(map)}; it is one object of value \u2192 ${key === "badge_labels" ? "words" : key === "status_map" ? "dr-status type" : "dr-badge colour"}`);
|
|
14903
|
+
continue;
|
|
14904
|
+
}
|
|
14905
|
+
const allowed = key === "status_map" ? STATUS_TYPES : key === "badge_map" ? BADGE_COLORS : null;
|
|
14906
|
+
for (const [value, to] of Object.entries(map)) {
|
|
14907
|
+
if (allowed ? !allowed.includes(to) : !(typeof to === "string" && to !== "")) {
|
|
14908
|
+
say("field_map", uid, `/props/${key}/${escapePointer3(value)}`, `${field} maps ${JSON.stringify(value)} to ${JSON.stringify(to)} in ${key}; ${allowed ? `a ${key === "status_map" ? "dr-status type" : "dr-badge colour"} is ${either3(allowed)}` : "a badge label is non-empty words"}`);
|
|
14909
|
+
}
|
|
14910
|
+
}
|
|
14911
|
+
}
|
|
14912
|
+
if (maps.includes("status_map") && maps.includes("badge_map")) say("field_map", uid, "/props/badge_map", `${field} states both status_map and badge_map; a column draws one pill \u2014 the status wins and the badge colours are never drawn \u2014 keep one`);
|
|
14913
|
+
if (maps.includes("badge_labels") && !maps.includes("status_map") && !maps.includes("badge_map")) say("field_map", uid, "/props/badge_labels", `${field} states badge_labels and no status_map or badge_map, so no pill is drawn for the words to label; add the map, or drop badge_labels`);
|
|
14914
|
+
}
|
|
14915
|
+
}
|
|
14916
|
+
for (const [page, first] of boundPages) {
|
|
14917
|
+
const mine = Object.keys(elements).sort(natural3).filter((uid) => elements[uid]?.page === page);
|
|
14918
|
+
const kidsOf = (uid) => Object.keys(elements).filter((one) => (tree?.parent?.get?.(one) ?? elements[one]?.parent ?? null) === uid);
|
|
14919
|
+
const openable = (uid) => elements[parentOf2(uid)]?.type !== "detail" && kidsOf(uid).some((kid) => ["detail", "form"].includes(elements[kid]?.type));
|
|
14920
|
+
const pickers = mine.filter((uid) => ["list", "queue"].includes(elements[uid]?.type) && !openable(uid) || elements[uid]?.type === "data_grid" && !stated(elements[uid]?.props?.props?.on_row));
|
|
14921
|
+
const keeps = mine.filter((uid) => ["list", "queue"].includes(elements[uid]?.type) && openable(uid));
|
|
14922
|
+
if (pickers.length === 0) {
|
|
14923
|
+
say(
|
|
14924
|
+
"bind_picker",
|
|
14925
|
+
first,
|
|
14926
|
+
"",
|
|
14927
|
+
`"${nameOf5(first)}" binds the selected row on ${page}, and nothing on that page picks one: add a data_grid with no on_row, or a list or queue with no detail or form child (a row click writes the selected row), or drop the bind` + (keeps.length > 0 ? `; ${keeps.map((uid) => `"${nameOf5(uid)}"`).join(", ")} keeps its click for its own drawer (it holds a detail or form), so it picks nothing` : "")
|
|
14928
|
+
);
|
|
14929
|
+
}
|
|
14930
|
+
for (const extra of pickers.slice(1)) {
|
|
14931
|
+
say("bind_picker", extra, "", `${elements[extra].type} "${nameOf5(extra)}" picks the selected row on ${page} as well as "${nameOf5(pickers[0])}": on a page that binds, every data_grid without on_row and every list or queue without its own drawer writes its row's id into the one selected row, so a click here makes the bound element read the wrong row \u2014 show lines with a line_grid, give this grid an on_row, or move it to another page`);
|
|
14932
|
+
}
|
|
14933
|
+
for (const uid of pickers) {
|
|
14934
|
+
const key = elements[uid]?.props?.props?.key;
|
|
14935
|
+
if (elements[uid]?.type === "data_grid" && stated(key) && key !== "id") {
|
|
14936
|
+
say("bind_picker", uid, "/props/props/key", `data_grid "${nameOf5(uid)}" picks the selected row by "${key}", and the bound readers on ${page} find the row by id (a custom reader is called with {id: <the picked key>}); pick by id \u2014 key: "id" \u2014 so the row the reader finds is the row clicked`);
|
|
14937
|
+
}
|
|
14938
|
+
}
|
|
14939
|
+
const declared = (Array.isArray(pages) ? pages : []).find((one) => one?.path === page);
|
|
14940
|
+
(Array.isArray(declared?.params) ? declared.params : []).forEach((param, index) => {
|
|
14941
|
+
if (param?.name !== "selected" && param?.name !== "_selected") return;
|
|
14942
|
+
problems.push({
|
|
14943
|
+
code: "bind_param",
|
|
14944
|
+
pointer: `/pages/${(pages ?? []).indexOf(declared)}/params/${index}/name`,
|
|
14945
|
+
message: `${page} binds the selected row and declares a param named "${param.name}"; the runtime holds the picked row under the reserved _selected and "selected" is the bind's word, so a param of that name reads as the row and is not \u2014 rename the param`
|
|
14946
|
+
});
|
|
14947
|
+
});
|
|
14948
|
+
}
|
|
14949
|
+
return problems;
|
|
14950
|
+
}
|
|
14707
14951
|
function pinAtLeast(pin, first) {
|
|
14708
14952
|
const semver3 = (v) => String(v).split(".").map((n) => Number.parseInt(n, 10) || 0);
|
|
14709
14953
|
const [a, b] = [semver3(pin.slice(pin.lastIndexOf("@") + 1)), semver3(first)];
|
|
@@ -17134,6 +17378,13 @@ function nodeLines(uid, contract, page, elements, tree, model, depth) {
|
|
|
17134
17378
|
lines.push(`${pad}</section>`);
|
|
17135
17379
|
return lines;
|
|
17136
17380
|
}
|
|
17381
|
+
case "panel": {
|
|
17382
|
+
if (kids.length === 0) return [`${pad}<section${attrsOf(element)}></section>`];
|
|
17383
|
+
const lines = [`${pad}<section${attrsOf(element)}>`];
|
|
17384
|
+
for (const child of kids) lines.push(...nodeLines(child, contract, page, elements, tree, model, depth + 1));
|
|
17385
|
+
lines.push(`${pad}</section>`);
|
|
17386
|
+
return lines;
|
|
17387
|
+
}
|
|
17137
17388
|
case "filter":
|
|
17138
17389
|
return [`${pad}<select${attrsOf(element)}></select>`];
|
|
17139
17390
|
case "action":
|
|
@@ -17226,7 +17477,7 @@ function attrsOf(element) {
|
|
|
17226
17477
|
const card = writeArgs(element.card);
|
|
17227
17478
|
if (card !== "") out.push(["card", card]);
|
|
17228
17479
|
if (named5(element.emphasis)) out.push(["emphasis", element.emphasis]);
|
|
17229
|
-
return gridAttrs(element) + out.map(([key, value]) => ` data-dr-${key}="${attr(value)}"`).join("");
|
|
17480
|
+
return gridAttrs(element) + out.map(([key, value]) => ` ${ATTR_NAME.get(key) ?? `data-dr-${key}`}="${attr(value)}"`).join("");
|
|
17230
17481
|
}
|
|
17231
17482
|
function gridAttrs(element) {
|
|
17232
17483
|
const grid = isPlainObject6(element.grid) ? element.grid : {};
|
|
@@ -20993,23 +21244,23 @@ function parseAttrs2(raw) {
|
|
|
20993
21244
|
|
|
20994
21245
|
// ../flows/appspace-builder/kit/contract/components.gen.mjs
|
|
20995
21246
|
var REGISTRY_VERSION2 = Object.freeze(11);
|
|
20996
|
-
var ELEMENT_TYPES3 = Object.freeze(["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
20997
|
-
var COMPONENT_TYPES4 = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
20998
|
-
var APP_TYPES2 = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
21247
|
+
var ELEMENT_TYPES3 = Object.freeze(["region", "grid", "widget", "control", "nav", "tab", "slot", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
21248
|
+
var COMPONENT_TYPES4 = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
21249
|
+
var APP_TYPES2 = Object.freeze(["widget", "form", "list", "detail", "queue", "action", "filter", "stat", "chart", "custom", "field", "number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
20999
21250
|
var DASHBOARD_TYPES2 = Object.freeze(["region", "grid", "control", "nav", "tab", "slot"]);
|
|
21000
|
-
var COMPONENT_ATTRIBUTES3 = Object.freeze(["data-dr-component", "data-dr-entity", "data-dr-action", "data-dr-source", "data-dr-field", "data-dr-param", "data-dr-role", "data-dr-filter", "data-dr-id", "data-dr-label", "data-dr-measure", "data-dr-tone", "data-dr-kind", "data-dr-x", "data-dr-y", "data-dr-series", "data-dr-format", "data-dr-negative", "data-dr-module", "data-dr-args", "data-dr-props", "data-dr-declares", "data-dr-when"]);
|
|
21001
|
-
var COMPONENT_PROPS4 = Object.freeze([["data-dr-entity", "entity"], ["data-dr-action", "action"], ["data-dr-source", "source"], ["data-dr-field", "field"], ["data-dr-param", "param"], ["data-dr-role", "role"], ["data-dr-id", "id"], ["data-dr-label", "label"], ["data-dr-measure", "measure"], ["data-dr-tone", "tone"], ["data-dr-kind", "kind"], ["data-dr-x", "x"], ["data-dr-y", "y"], ["data-dr-series", "series"], ["data-dr-format", "format"], ["data-dr-negative", "negative"], ["data-dr-module", "module"]]);
|
|
21002
|
-
var STRUCTURED_ATTRIBUTES3 = Object.freeze([["data-dr-filter", "filter"], ["data-dr-args", "args"], ["data-dr-props", "props"], ["data-dr-declares", "declares"], ["data-dr-when", "when"]]);
|
|
21251
|
+
var COMPONENT_ATTRIBUTES3 = Object.freeze(["data-dr-component", "data-dr-entity", "data-dr-action", "data-dr-source", "data-dr-field", "data-dr-param", "data-dr-role", "data-dr-filter", "data-dr-id", "data-dr-label", "data-dr-measure", "data-dr-tone", "data-dr-kind", "data-dr-x", "data-dr-y", "data-dr-series", "data-dr-format", "data-dr-negative", "data-dr-module", "data-dr-args", "data-dr-props", "data-dr-declares", "data-dr-when", "data-dr-bind", "data-dr-status-map", "data-dr-badge-map", "data-dr-badge-labels"]);
|
|
21252
|
+
var COMPONENT_PROPS4 = Object.freeze([["data-dr-entity", "entity"], ["data-dr-action", "action"], ["data-dr-source", "source"], ["data-dr-field", "field"], ["data-dr-param", "param"], ["data-dr-role", "role"], ["data-dr-id", "id"], ["data-dr-label", "label"], ["data-dr-measure", "measure"], ["data-dr-tone", "tone"], ["data-dr-kind", "kind"], ["data-dr-x", "x"], ["data-dr-y", "y"], ["data-dr-series", "series"], ["data-dr-format", "format"], ["data-dr-negative", "negative"], ["data-dr-module", "module"], ["data-dr-bind", "bind"]]);
|
|
21253
|
+
var STRUCTURED_ATTRIBUTES3 = Object.freeze([["data-dr-filter", "filter"], ["data-dr-args", "args"], ["data-dr-props", "props"], ["data-dr-declares", "declares"], ["data-dr-when", "when"], ["data-dr-status-map", "status_map"], ["data-dr-badge-map", "badge_map"], ["data-dr-badge-labels", "badge_labels"]]);
|
|
21003
21254
|
var HANDLER_ROLES3 = Object.freeze(["list", "save", "remove", "submit", "inbox", "decide", "summary", "history", "custom"]);
|
|
21004
21255
|
var CHART_KINDS5 = Object.freeze(["line", "bar", "area"]);
|
|
21005
21256
|
var CHART_FORMATS4 = Object.freeze(["currency", "number", "percent"]);
|
|
21006
21257
|
var PLATFORM_FORMAT2 = Object.freeze({ "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$" });
|
|
21007
21258
|
var NEGATIVE_MODES3 = Object.freeze(["minus", "red_minus", "absolute", "red_absolute"]);
|
|
21008
21259
|
var FORMAT_PATTERNS3 = Object.freeze({ "currency": "$#,###", "number": "#,###", "percent": '#,###.#"%"' });
|
|
21009
|
-
var PLATFORM_NUMBERS3 = Object.freeze({ "dr-app-runtime": "1.
|
|
21260
|
+
var PLATFORM_NUMBERS3 = Object.freeze({ "dr-app-runtime": "1.10.0", "dr-app-widgets": "1.2.0", "dr-components": "1.2.0", "dr-components-controls": "1.1.0" });
|
|
21010
21261
|
var ROW_ACTION_WHEN3 = Object.freeze({ "dr-components": "1.2.0" });
|
|
21011
21262
|
var PROPS_SINCE3 = Object.freeze({ "select": { "multiple": "1.3.0", "searchable": "1.3.0", "group_by": "1.3.0", "values": "1.3.0", "options[].group": "1.3.0" }, "data_grid": { "theme": "1.3.0", "hierarchy": "1.3.0", "totals": "1.3.0", "pin": "1.3.0", "csv_params": "1.3.0", "columns[].cell": "1.3.0", "columns[].badge_map": "1.3.0", "columns[].status_map": "1.3.0", "columns[].link_field": "1.3.0", "columns[].call": "1.3.0", "selection": "1.4.0", "sticky_header": "1.4.0", "search": "1.4.0", "row_detail": "1.4.0", "columns[].weight": "1.4.0", "columns[].currency_field": "1.4.0", "columns[].cell_secondary": "1.4.0", "columns[].badge_labels": "1.4.0", "detail_fields": "1.4.0", "columns[].compact": "1.5.0", "columns[].truncate": "1.5.0", "columns[].max_width": "1.5.0" }, "filter_bar": { "layout": "1.4.0", "filters[].kind=text": "1.4.0", "filters[].kind=number-range": "1.4.0", "filters[].param_min": "1.4.0", "filters[].param_max": "1.4.0", "filters[].mode": "1.4.0", "filters[].placeholder": "1.4.0", "filters[].placeholder_min": "1.4.0", "filters[].placeholder_max": "1.4.0" } });
|
|
21012
|
-
var MODULE_OF3 = Object.freeze({ "widget": "dr-app-widgets", "form": "dr-app-runtime", "list": "dr-app-runtime", "detail": "dr-app-runtime", "queue": "dr-app-runtime", "action": "dr-app-runtime", "filter": "dr-app-runtime", "stat": "dr-app-runtime", "chart": "dr-app-runtime", "custom": "dr-app-runtime", "field": "dr-app-runtime", "number_input": "dr-components", "tabs": "dr-components", "tab_panel": "dr-components", "select": "dr-components", "date_picker": "dr-components", "data_grid": "dr-components", "dialog": "dr-components", "variance_table": "dr-components", "toggle": "dr-components", "control_group": "dr-components", "callout": "dr-components", "scenario_columns": "dr-components", "slider": "dr-components-controls", "button": "dr-components", "status": "dr-components", "badge": "dr-components", "tag": "dr-components", "empty_state": "dr-components", "stepper": "dr-components", "alert": "dr-components", "checkbox": "dr-components", "radio_group": "dr-components", "file_upload": "dr-components", "skeleton": "dr-components", "progress": "dr-components", "accordion": "dr-components", "tooltip_info": "dr-components", "filter_bar": "dr-components", "filter_chip": "dr-components", "date_range": "dr-components", "fiscal_month": "dr-components", "search_input": "dr-components" });
|
|
21263
|
+
var MODULE_OF3 = Object.freeze({ "widget": "dr-app-widgets", "form": "dr-app-runtime", "list": "dr-app-runtime", "detail": "dr-app-runtime", "queue": "dr-app-runtime", "action": "dr-app-runtime", "filter": "dr-app-runtime", "stat": "dr-app-runtime", "chart": "dr-app-runtime", "custom": "dr-app-runtime", "field": "dr-app-runtime", "number_input": "dr-components", "tabs": "dr-components", "tab_panel": "dr-components", "select": "dr-components", "date_picker": "dr-components", "data_grid": "dr-components", "dialog": "dr-components", "variance_table": "dr-components", "toggle": "dr-components", "control_group": "dr-components", "callout": "dr-components", "scenario_columns": "dr-components", "slider": "dr-components-controls", "button": "dr-components", "status": "dr-components", "badge": "dr-components", "tag": "dr-components", "empty_state": "dr-components", "stepper": "dr-components", "alert": "dr-components", "checkbox": "dr-components", "radio_group": "dr-components", "file_upload": "dr-components", "skeleton": "dr-components", "progress": "dr-components", "accordion": "dr-components", "tooltip_info": "dr-components", "filter_bar": "dr-components", "filter_chip": "dr-components", "date_range": "dr-components", "fiscal_month": "dr-components", "search_input": "dr-components", "split_pane": "dr-components", "file_viewer": "dr-components", "line_grid": "dr-components", "document": "dr-components", "panel": "dr-app-runtime" });
|
|
21013
21264
|
var STAT_TONES3 = Object.freeze(["default", "positive", "warning", "negative"]);
|
|
21014
21265
|
var WIDGET_KINDS4 = Object.freeze(["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative"]);
|
|
21015
21266
|
var KIND_READS4 = Object.freeze({ "line": ["series"], "area": ["series"], "bar": ["series", "breakdown"], "stacked": ["series"], "pie": ["breakdown"], "donut": ["breakdown"], "kpi": ["kpi"], "candle": ["ohlc"], "bubble": ["scatter"], "table": ["table"], "narrative": ["narrative"] });
|
|
@@ -21017,14 +21268,14 @@ var APP_WIDGET_KINDS4 = Object.freeze(["waterfall", "waterfall-breakdown", "wate
|
|
|
21017
21268
|
var APP_KIND_READS4 = Object.freeze({ "waterfall": ["breakdown", "series"], "waterfall-breakdown": ["breakdown", "series"], "waterfall-walkthrough": ["breakdown", "series"], "line-forecast": ["series"], "heatmap": ["series"], "combo": ["series"], "stacked-percent": ["series"], "gauge": ["kpi"] });
|
|
21018
21269
|
var SMART_COMPARES3 = Object.freeze(["BvA", "AvF", "vs_prev_period"]);
|
|
21019
21270
|
var PLATFORM_FINANCE3 = Object.freeze({ "dr-app-widgets": "1.2.0" });
|
|
21020
|
-
var STRICT_TYPES3 = Object.freeze(["number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input"]);
|
|
21021
|
-
var PROPS_SCHEMAS3 = Object.freeze({ "region": { "type": "object", "properties": {} }, "grid": { "type": "object", "properties": {} }, "widget": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the card's title on an app page" }, "role": { "type": "string", "description": "data-dr-role: the app role this card is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "kind": { "enum": ["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative", "waterfall", "waterfall-breakdown", "waterfall-walkthrough", "line-forecast", "heatmap", "combo", "stacked-percent", "gauge"], "description": "data-dr-kind on an app page, the widget kind on a dashboard. The last eight (the finance kinds: waterfall ... gauge) are app pages only, from dr-app-widgets 1.2.0; a dashboard card takes one of the first eleven" }, "source": { "type": "string", "description": "the handler whose payload an app card draws (data-dr-source), or the SPEC key a dashboard card draws" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the card's numbers read" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "props": { "type": "object", "additionalProperties": false, "properties": { "variant": { "enum": ["smart"], "description": "a kpi card's variant: smart is the platform's smart KPI, one comparison pill (compare) in the platform's status colours; app pages, dr-app-widgets 1.2.0 on" }, "compare": { "enum": ["BvA", "AvF", "vs_prev_period"], "description": "a smart kpi's comparison: BvA / AvF read the kpi source's compare (budget / forecast), vs_prev_period its delta; default BvA when the source compares, else vs_prev_period" }, "color_rule": { "enum": ["higher_is_better", "lower_is_better"], "description": "which way is good for a smart kpi's delta and a gauge's goal: lower_is_better for a cost; default higher_is_better" }, "goal": { "type": "number", "description": "a gauge's goal, in the figure's units; absent, the kpi source's compare value" }, "total": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall's closing bar: {label}, default Total" }, "variance": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall-breakdown's unexplained bar: {label}, default Variance" }, "forecast_from": { "type": "string", "description": "a line-forecast over ONE series: the period on the x axis the forecast starts at" }, "dual_axis": { "type": "boolean", "description": "a combo: false keeps the line on the columns' axis; default true (a second axis)" } }, "description": "data-dr-props: an APP card's typed props (dr-app-widgets 1.2.0 on), sorted JSON on the page, read back by the extractor: a smart kpi's variant, compare and color_rule; a gauge's goal and color_rule; a waterfall's total and variance; a line-forecast's forecast_from; a combo's dual_axis" }, "title": { "type": "string", "description": "a dashboard card's title" }, "subtitle": { "type": "string", "description": "the line under a dashboard card's title" }, "description": { "type": "string", "description": "what a dashboard card shows, in words" }, "params": { "type": "array", "description": "the params a dashboard card honours" } } }, "control": { "type": "object", "properties": { "param": { "type": "string", "description": "the param it moves" }, "control_kind": { "type": "string", "description": "the control's kind" }, "type": { "type": "string", "description": "the input type" }, "min": { "type": "string", "description": "the lowest value" }, "max": { "type": "string", "description": "the highest value" }, "step": { "type": "string", "description": "the step" }, "value": { "type": "string", "description": "the starting value" }, "label": { "type": "string", "description": "the label" } } }, "nav": { "type": "object", "properties": { "aria_label": { "type": "string", "description": "the nav's accessible name" } } }, "tab": { "type": "object", "properties": { "current": { "type": "boolean", "description": "true on the page it names" }, "href": { "type": "string", "description": "the page it links to" }, "label": { "type": "string", "description": "the text it shows" } } }, "slot": { "type": "object", "properties": {} }, "form": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the form writes" }, "action": { "type": "string", "description": "data-dr-action: the handler that saves it" } } }, "list": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table listed" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers the rows" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "detail": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the row is from" }, "action": { "type": "string", "description": "data-dr-action: the handler it acts through" } } }, "queue": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table queued" }, "source": { "type": "string", "description": "data-dr-source: the inbox handler" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "action": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "action": { "type": "string", "description": "data-dr-action: the handler it runs" }, "param": { "type": "string", "description": "data-dr-param: the argument it passes" }, "entity": { "type": "string", "description": "data-dr-entity: the table the handler acts on" }, "when": { "type": "object", "description": 'data-dr-when: the states a ROW ACTION is drawn in, one JSON object of column to the values the row may hold ({"status": ["open", "in_progress"]}), every column matched; a row without the column keeps the action. It hides a button and refuses nothing: the handler still has to (dr-app-runtime 1.7.1 on an action in a list or a queue; dr-components 1.2.0 on a data_grid row action)' } } }, "filter": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "field": { "type": "string", "description": "data-dr-field: the column filtered" }, "entity": { "type": "string", "description": "data-dr-entity: the table filtered" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" } } }, "stat": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the summary handler" }, "measure": { "type": "string", "description": "data-dr-measure: the key of the number shown" }, "tone": { "type": "string", "description": "data-dr-tone: default | positive | warning | negative" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the figure reads: a word or a platform format string" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "chart": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows it draws" }, "kind": { "enum": ["line", "bar", "area"], "description": "data-dr-kind: what it draws" }, "x": { "type": "string", "description": "data-dr-x: the column on the category axis" }, "y": { "type": "string", "description": "data-dr-y: the one numeric column drawn" }, "series": { "type": "string", "description": "data-dr-series: the column whose distinct values are one line each" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how a number reads; percent is a value already in percent units" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "custom": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose answer the module receives" }, "module": { "type": "string", "pattern": "^components/[a-z][a-z0-9_-]*\\.js$", "description": "data-dr-module: the file that draws it" }, "args": { "type": "object", "description": "data-dr-args: one JSON object handed to the module as ui.args; absent means {}" }, "declares": { "type": "object", "description": "data-dr-declares: what the module does, stated for graders and app-space test \u2014 nothing draws from it and the runtime never reads it. Every key is optional; a name it lists must be one the contract declares (custom_declares)", "additionalProperties": false, "properties": { "reads": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the data.sources entries and handlers whose answers it draws" }, "calls": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the handlers it calls through ui.call; app-space test reports a call to any other (custom-undeclared-call)" }, "produces": { "type": "object", "description": `per called handler, the payload keys it sends \u2014 {"project": ["growth", "hires"]}; for a handler it does not list, app-space test reads the keys off the module's ui.call object literal`, "additionalProperties": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "shows": { "type": "array", "description": "the numbers it displays; the module projects each one on the element that shows it (data-dr-field, data-dr-value, data-dr-format), which app-space test harvests into the element's values", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the field the number is, as its data-dr-field names it" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how it reads, as its data-dr-format says" }, "scale": { "enum": ["fraction"], "description": "fraction: the value is a share (0.04) shown as a percent (4%)" } } } } } } } }, "field": { "type": "object", "properties": { "entity": { "type": "string", "description": "data-dr-entity: the table the column is in" }, "field": { "type": "string", "description": "data-dr-field: the column" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers its choices" }, "label": { "type": "string", "description": "the field's label" }, "required": { "type": "boolean", "description": "true when the form cannot be saved without it" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" } } }, "number_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["format"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "what the number is: the unit shown beside the input" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "min": { "type": "number", "description": "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, "max": { "type": "number", "description": "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, "step": { "type": "number", "description": "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, "decimals": { "type": "integer", "minimum": 0, "description": "the decimals the STORED value is rounded to, after scaling; default as typed" }, "value": { "type": "number", "description": "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the input's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "the hint shown while the input is empty" } }, "description": "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } }, "tabs": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tabs"], "properties": { "tabs": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the tab's id, which a tab_panel's tab names" }, "label": { "type": "string", "minLength": 1, "description": "the text on the tab" } } }, "description": "the tabs, in order" }, "default": { "type": "string", "description": "the id of the tab open first; default the first tab" } }, "description": "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } }, "tab_panel": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tab"], "properties": { "tab": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the id of the tab (in the enclosing tabs) this panel belongs to" } }, "description": "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } }, "select": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: optional; the handler whose rows are the options when props.options is absent" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this select writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this select reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group"); dr-components 1.3.0' } } }, "description": "the options; when absent they are the page param's values (param mode), else the source rows" }, "option_value": { "type": "string", "description": "with a source: the row column that is stored; default id" }, "option_label": { "type": "string", "description": "with a source: the row column the reader sees; default the value column" }, "value": { "type": "string", "description": "field mode: the option chosen first; default none. Param mode reads ctx.params instead" }, "values": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "field mode with multiple: the options chosen first; default none (dr-components 1.3.0)" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a choice; default Choose\u2026" }, "multiple": { "type": "boolean", "description": "many values: field mode writes them as one list (a dialog posts the list), param mode moves a multi param; default false, one value (dr-components 1.3.0)" }, "searchable": { "type": "boolean", "description": "a search box over the list, filtering by label; default false (dr-components 1.3.0)" }, "group_by": { "type": "string", "minLength": 1, "description": "the key the list is grouped under: a source row's column, or group on a stated option; default none (dr-components 1.3.0)" } }, "description": "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } }, "date_picker": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this picker reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over a month param is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the date or month the picker starts on; default none. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Pick a date / Pick a month" } }, "description": "data-dr-props: the date_picker part's typed props, handed to it as PartProps.props" } } }, "data_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows the grid shows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row key the column shows" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent", "text", "date"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads; default text" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "align": { "enum": ["start", "end"], "description": "default end for currency, number and percent, start otherwise" }, "sortable": { "type": "boolean", "description": "whether the header sorts; default true" }, "cell": { "enum": ["badge", "status", "chip", "link", "toggle"], "description": "how the value draws instead of text (dr-components 1.3.0, the dr-grid cell renderers): badge (a dr-badge, its colour from badge_map), status (a dr-status, its type from status_map), chip (the value, or each value of a list, as a chip), link (the value as a link: to link_field's URL, else opening the row through on_row), toggle (a switch over a boolean; call flips it, without it the switch is read-only)" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "a dr-badge colour" }, "description": "cell badge: value \u2192 dr-badge colour; an unmapped value is stone (dr-components 1.3.0)" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "a dr-status type" }, "description": "cell status: value \u2192 dr-status type; an unmapped value is default (dr-components 1.3.0)" }, "link_field": { "type": "string", "minLength": 1, "description": "cell link: the row column holding the link's URL (same-origin path, #hash, or http(s)); default none: the link opens the row (on_row) (dr-components 1.3.0)" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "cell toggle: a handler called with {id, row, field, value} when the reader flips the switch; the page re-reads after. Without it the switch is read-only (dr-components 1.3.0)" }, "weight": { "enum": ["strong"], "description": "strong draws the cell's text bold (the row's lead column: a vendor, an account) (dr-components 1.4.0)" }, "currency_field": { "type": "string", "minLength": 1, "description": "format currency only: the row column holding each row's ISO currency code (EUR, ILS, GBP, USD\u2026), so the symbol is the row's own; a row without it falls back to currency, else USD (dr-components 1.4.0)" }, "cell_secondary": { "type": "string", "minLength": 1, "description": `cell badge only: the row column whose text the badge shows, while badge_map still colours it by the cell's own value (a PO state coloured by matched / difference, reading "\u2713 matched") (dr-components 1.4.0)` }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "cell badge only: value \u2192 the text the badge shows (true \u2192 Paid, false \u2192 Unpaid); an unlisted value shows itself. The projection keeps the raw value (dr-components 1.4.0)" }, "compact": { "type": "boolean", "description": "currency and number: false draws the exact figure (\u20AC1,315.08), where the runtime abbreviates from 1,000 (\u20AC1.3K); default the runtime's (dr-components 1.5.0)" }, "truncate": { "type": "boolean", "description": "one line, cut with an ellipsis at max_width (default 240px), the whole value on hover (dr-components 1.5.0)" }, "max_width": { "type": "integer", "minimum": 40, "description": "the column's widest, in px: longer values wrap, or with truncate are cut (dr-components 1.5.0)" } } }, "description": "the columns, in order" }, "key": { "type": "string", "description": "the column whose value is each row's data-dr-row, and the id a row action posts; default id. A row without it projects its position as data-dr-row and draws no row actions (1.1.1); with row_actions the compiler requires it stated and a column the source's rows carry, and, where a row action writes through a remove, save or decide handler, that table's primary key (part_row_key)" }, "theme": { "enum": ["default", "borderless", "editable", "inside-card"], "description": "the dr-grid theme (dr-components 1.3.0): default (rows and header 56px), borderless (40px, no row lines), editable (40px, a focus ring on the cell), inside-card (rows 56px, a 32px header, for a grid inside a card); default default" }, "hierarchy": { "type": "object", "additionalProperties": false, "required": ["parent", "label"], "properties": { "parent": { "type": "string", "minLength": 1, "description": "the column holding each row's parent row key (the key column's value); empty for a top row" }, "label": { "type": "string", "minLength": 1, "description": "the column drawn as the tree: indented by depth, with expand / collapse on a parent" }, "expanded": { "type": "boolean", "description": "whether parents start open; default true" } }, "description": "tree rows (dr-components 1.3.0): a P&L's accounts under their parents, each parent's number columns the sum of its children's unless the source answers the parent's own; sorting orders siblings" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row, summing the top rows' number columns (currency, number, a platform format string; a percent is left blank), pinned above or below the rows (dr-components 1.3.0); default none" }, "pin": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "the leading columns (fields) that stay in view while the grid scrolls sideways, in column order (dr-components 1.3.0)" }, "csv_params": { "type": "object", "additionalProperties": false, "properties": { "file_name": { "type": "string", "minLength": 1, "description": "the downloaded file's name; default the element id, .csv" } }, "description": "draws an Export CSV button (dr-grid-toolbar csvParams, dr-components 1.3.0): every row in the grid's order, parents and totals included, numbers raw, headers as shown" }, "selection": { "type": "object", "additionalProperties": false, "required": ["bulk_actions"], "properties": { "bulk_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens once over the selection, and its Confirm posts ids (the selected rows' keys) with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {ids} (the selected rows' keys); the selection clears and the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel), the selection's size in it; default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }] }, "description": "the bulk bar's buttons, shown while rows are ticked: open a row dialog over the selection, or call a handler with {ids}" } }, "description": "a checkbox column (a header box ticks or clears the page's rows) and, while any row is ticked, a bar above the grid: N selected, the bulk actions, Clear selection. Only keyed rows can be ticked; ticks a search hides are dropped. A dialog action's on_confirm, like a call, is a custom handler that reads ids (dr-components 1.4.0)" }, "sticky_header": { "type": "boolean", "description": "the header row stays in view while the grid scrolls (thead sticky inside the grid's own scroll box, which is capped at the viewport's height); default false (dr-components 1.4.0)" }, "search": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "an inline search box above the grid that narrows the loaded rows to those whose named fields hold the typed text (case-insensitive); it is the grid's own, not a page param (dr-components 1.4.0)" }, "row_detail": { "enum": ["drawer"], "description": "drawer: clicking a row opens a side panel listing the row's columns (or detail_fields), field by field (on_row still runs when stated) (dr-components 1.4.0)" }, "detail_fields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "row_detail only: the row fields the drawer lists, in order; default the grid's columns. A field that is no column is drawn as text (dr-components 1.4.0)" }, "page_size": { "type": "integer", "minimum": 5, "description": "rows per page; default 10" }, "sort": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the column sorted first" }, "dir": { "enum": ["asc", "desc"], "description": "default asc" } }, "description": "the order the rows start in; default the order the handler answered" }, "on_row": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {row} when a reader opens a row; the page re-reads after it" }, "row_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens over the row, its inputs prefilled, and posts id with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {id, row} (id: the row's key column); the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel); default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }] }, "description": "a button per row for each action, after the columns: open a dialog over the row, or call a handler with it" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the data_grid part's typed props, handed to it as PartProps.props" } } }, "dialog": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "trigger": { "type": "string", "minLength": 1, "description": "the text on the button that opens it; default the element's label, else its title \u2014 the compiler writes it into the page (foldDialogTriggers). A dialog with none of the three and no values_from row is refused (part_mode); a row dialog (values_from row) takes none, a row action opens it" }, "title": { "type": "string", "description": "the dialog's title; default the element's label" }, "description": { "type": "string", "description": "one line under the title" }, "confirm": { "type": "string", "description": "the text on the confirm button; default Confirm" }, "on_confirm": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Confirm calls with the fields of the inputs inside; without one, Confirm only closes" }, "values_from": { "enum": ["row"], "description": "row: a data_grid row action opens it over one row \u2014 the inputs inside start from that row's values, and Confirm posts id (the row's key) with their fields, to a save handler" }, "key": { "type": "string", "minLength": 1, "description": "with values_from row: the row column posted as id; default the grid's key, else id" } }, "description": "data-dr-props: the dialog part's typed props, handed to it as PartProps.props" } } }, "variance_table": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows are the lines" }, "props": { "type": "object", "additionalProperties": false, "required": ["row", "actual", "plan"], "properties": { "row": { "type": "string", "minLength": 1, "description": "the column naming each line; its value is the line's data-dr-row" }, "actual": { "type": "string", "minLength": 1, "description": "the column holding the actual figure" }, "plan": { "type": "string", "minLength": 1, "description": "the column holding the plan (budget) figure" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how actual, plan and variance read; default currency" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how actual, plan and variance read below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good: higher (the default) for revenue, lower for cost" }, "threshold": { "type": "object", "additionalProperties": false, "required": [], "properties": { "abs": { "type": "number", "minimum": 0, "description": "a variance smaller than this, in the figures' units, is neutral" }, "pct": { "type": "number", "minimum": 0, "description": "a variance share smaller than this fraction (0.05 is 5%) is neutral" } }, "description": "below both limits a variance is neutral rather than toned; default none" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the variance_table part's typed props, handed to it as PartProps.props" } } }, "toggle": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this switch writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this switch reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts on; default off. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the switch's label; default the page param's label (param mode), else the element's label" }, "description": { "type": "string", "description": "one line under the label" } }, "description": "data-dr-props: the toggle part's typed props, handed to it as PartProps.props" } } }, "control_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "columns": { "enum": [1, 2, 3, 4], "description": "how many controls sit side by side; default 1 (under 640px always 1)" }, "label_position": { "enum": ["top", "start"], "description": "top (the default): each label above its control; start: every label in one column before its control" }, "description": { "type": "string", "description": "one line above the controls" } }, "description": "data-dr-props: the control_group part's typed props, handed to it as PartProps.props" } } }, "callout": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer the rules read \u2014 a summary's measures, a KPI, or rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["rules"], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["when", "tone", "text"], "properties": { "when": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["path", "gte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "gte": { "type": "number", "description": "matches when the value is at least this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "lte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "lte": { "type": "number", "description": "matches when the value is at most this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "eq"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "eq": { "type": ["string", "number", "boolean"], "description": "matches when the value is exactly this" } } }], "description": "the condition: one path and one of gte, lte, eq" }, "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } } }, "description": "tried in order; the first whose when holds is the sentence" }, "default": { "type": "object", "additionalProperties": false, "required": ["tone", "text"], "properties": { "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } }, "description": "what it says when no rule holds; default nothing" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } }, "description": "data-dr-props: the callout part's typed props, handed to it as PartProps.props" } } }, "scenario_columns": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose rows are the scenarios" }, "props": { "type": "object", "additionalProperties": false, "required": ["key", "label_field", "metrics"], "properties": { "key": { "type": "string", "minLength": 1, "description": "the column naming each row uniquely; its value is the column's data-dr-row" }, "label_field": { "type": "string", "minLength": 1, "description": "the column whose value heads each scenario's column" }, "metrics": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row column the line shows" }, "label": { "type": "string", "description": "the line's name; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good for the delta's tone: higher (the default) or lower" } } }, "description": "the lines, in order" }, "max": { "type": "integer", "minimum": 1, "description": "how many rows may be ticked at once; default 3 (at most 6)" }, "baseline": { "type": "string", "minLength": 1, "description": "the key value of the row every delta is against; default the first row" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the scenario_columns part's typed props, handed to it as PartProps.props" } } }, "slider": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this slider writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this slider reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "min": { "type": "number", "description": "the track's low end, in stored units; default the page param's min (param mode), else 0" }, "max": { "type": "number", "description": "the track's high end, in stored units; default the page param's max (param mode). Required one way or the other: a slider with neither draws its 'slider needs a max' panel (1.0.1) and the compiler refuses it (part_bounds)" }, "step": { "type": "number", "description": "the increment the value moves by, in stored units; every value set is a multiple of it from min; default the page param's step, else 1" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value beside the track reads; default number" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value beside the track shows a figure below zero: the platform's negative-number mode: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components-controls 1.1.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "show_value": { "type": "boolean", "description": "whether the formatted value is drawn beside the track; default true" }, "marks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "number", "description": "where the mark sits, in stored units" }, "label": { "type": "string", "description": "what the mark says; default the value, formatted" } } }, "description": "labelled ticks under the track" }, "value": { "type": "number", "description": "field mode: the value it starts on; default min. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the slider's label; default the page param's label (param mode), else the element's label" } }, "description": "data-dr-props: the slider part's typed props, handed to it as PartProps.props" } } }, "button": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words on the button" }, "theme": { "enum": ["primary", "secondary", "ghost", "danger", "positive", "negative", "link"], "description": "the dr-button theme; default primary. danger and negative always ask before the call" }, "size": { "enum": ["regular", "small"], "description": "regular (32px, the platform pill) or small (28px); default regular" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph before the label" }, "icon_after": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph after the label" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler a click calls with {} (and reason, when asked); the page re-reads after it. Without one the button draws disabled" }, "confirm": { "type": "string", "minLength": 1, "description": 'the question asked first (Confirm / Cancel); default none, and "<label>?" on a danger or negative button, which always asks' }, "reason": { "enum": ["required", "optional"], "description": "a reason box in the confirm dialog, posted as reason; required keeps Confirm disabled until it holds text" }, "split": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label", "on_click"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the menu entry" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler it calls with {}" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked first" } } }, "description": "more calls behind the button's arrow (dr-split-button)" }, "disabled": { "type": "boolean", "description": "drawn disabled; default false" } }, "description": "data-dr-props: the button part's typed props, handed to it as PartProps.props" } } }, "status": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the dr-status type (its colour); default default. A map entry that matches wins" }, "label": { "type": "string", "description": "the words; default the value at path" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph in place of the dot" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "type"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the type it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 type and words, tried in order" } }, "description": "data-dr-props: the status part's typed props, handed to it as PartProps.props" } } }, "badge": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "the words; default the value at path" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the dr-badge colour; default stone" }, "size": { "enum": ["medium", "small"], "description": "default medium" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "color"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the colour it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 colour and words, tried in order" } }, "description": "data-dr-props: the badge part's typed props, handed to it as PartProps.props" } } }, "tag": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["month", "quarter", "year", "forecast"], "description": "what the value is" }, "value": { "type": ["string", "number"], "description": "the period: 2026-03, 2026-Q1, 2026, 3 (a forecast's closed months) or 3+9" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "fiscal": { "type": "boolean", "description": "year only: prefix FY; default true" } }, "description": "data-dr-props: the tag part's typed props, handed to it as PartProps.props" } } }, "empty_state": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["noData", "noPermissions", "noResults", "noNotifications", "custom"], "description": "the platform's empty-state type: its icon and default words; default custom" }, "title": { "type": "string", "description": "the title; default the type's" }, "description": { "type": "string", "description": "the line under it; default the type's" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; with on_action" }, "on_action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler the button calls with {}; the page re-reads after it" } }, "description": "data-dr-props: the empty_state part's typed props, handed to it as PartProps.props" } } }, "stepper": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": { "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "description": "the value current (or the value at path) names this step by" }, "label": { "type": "string", "minLength": 1, "description": "the step's name" }, "description": { "type": "string", "description": "one line under the name" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler that moves the flow on from this step, called with {step: <id>} when it is current; every step but the last needs one (A3.29)" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; default Continue" } } }, "description": "the steps, in order" }, "current": { "type": "string", "minLength": 1, "description": "the id of the step the flow is at; default the value at path, else the first step" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "vertical": { "type": "boolean", "description": "steps top to bottom; default left to right" } }, "description": "data-dr-props: the stepper part's typed props, handed to it as PartProps.props" } } }, "alert": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "theme": { "enum": ["success", "error", "bold-error", "warning", "info", "tip"], "description": "the dr-alert type; default info" }, "title": { "type": "string", "description": "the bold first line" }, "text": { "type": "string", "minLength": 1, "description": "the notice" } }, "description": "data-dr-props: the alert part's typed props, handed to it as PartProps.props" } } }, "checkbox": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this box writes (true / false); exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the toggle page param it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts ticked; default false. Param mode reads ctx.params" }, "label": { "type": "string", "description": "the words beside the box; default the page param's label, else the element's label" }, "description": { "type": "string", "description": "a line under it" } }, "description": "data-dr-props: the checkbox part's typed props, handed to it as PartProps.props" } } }, "radio_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this choice writes; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the select (or period / month) page param it moves; exactly one of field and param" }, "options": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees; default the value" } } }, "description": "the options, in order; param mode: default the page param's values" }, "value": { "type": "string", "description": "field mode: the option it starts on; default none" }, "label": { "type": "string", "description": "the group's label; default the page param's label, else the element's label" }, "direction": { "enum": ["vertical", "horizontal"], "description": "default vertical" } }, "description": "data-dr-props: the radio_group part's typed props, handed to it as PartProps.props" } } }, "file_upload": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "the payload key the stored file is written under, as {upload, filename, mime_type, size}" }, "accept": { "type": "string", "description": "the file types the picker offers, as an input accept list: .pdf,.xlsx; default any" }, "max_size_mb": { "type": "number", "minimum": 0, "description": "a larger file is refused before it is sent (client-side only: the platform's own limit still answers 413); 0 or less is no limit of its own; default the platform's own limit" }, "label": { "type": "string", "description": "the label above the zone; default the element's label" }, "dropzone_text": { "type": "string", "description": "the zone's first line; default Drop a file here, or browse" }, "dropzone_subtext": { "type": "string", "description": "the zone's second line; default the accepted types" }, "on_upload": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler called with {<field>: {upload, filename, mime_type, size}} once the file is stored (the parser hand-off); the page re-reads after it. Without one the value waits for the dialog around it" } }, "description": "data-dr-props: the file_upload part's typed props, handed to it as PartProps.props" } } }, "skeleton": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "appearance": { "enum": ["rectangle", "title-line", "text-line", "chip", "avatar"], "description": "the shape; default rectangle" }, "count": { "type": "integer", "minimum": 1, "description": "how many, one under the other; default 1 (at most 12)" }, "width": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|%|rem)$", "description": "a CSS length: 100%, 240px, 12rem; default the appearance's" }, "height": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|rem)$", "description": "a CSS length; default the appearance's" } }, "description": "data-dr-props: the skeleton part's typed props, handed to it as PartProps.props" } } }, "progress": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "progress": { "type": "number", "minimum": 0, "description": "how much is done; default the value at path" }, "total": { "type": "number", "minimum": 0, "description": "what done means; default the value at total_path, else 100" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "total_path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path to the total in the source's answer" }, "show_value": { "type": "boolean", "description": "the percent beside the bar; default true" }, "type": { "enum": ["light", "dark"], "description": "the dr-progress-bar type; default light" }, "label": { "type": "string", "description": "the words above the bar; default the element's label" } }, "description": "data-dr-props: the progress part's typed props, handed to it as PartProps.props" } } }, "accordion": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "description": "the section's header" }, "open": { "type": "boolean", "description": "whether it starts open; default false" } } }, "description": "the sections, in order: child i of the element fills item i" }, "multi": { "type": "boolean", "description": "several may be open at once; default false" }, "theme": { "enum": ["regular", "borderless"], "description": "the dr-accordion theme; default regular" } }, "description": "data-dr-props: the accordion part's typed props, handed to it as PartProps.props" } } }, "tooltip_info": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1, "description": "the explanation" }, "label": { "type": "string", "description": "words before the mark; default none" }, "position": { "enum": ["top", "bottom", "left", "right"], "description": "where the explanation opens; default top" } }, "description": "data-dr-props: the tooltip_info part's typed props, handed to it as PartProps.props" } } }, "filter_bar": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["filters"], "properties": { "filters": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month", "text", "number-range"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param); dr-components 1.4.0, layout inline only: text (a text box over a text param), number-range (Min / Max over param_min and param_max). Every kind but number-range needs param" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused; a text param for text (dr-components 1.4.0); a date param for a date-range with mode day" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param; date with mode day)" }, "param_min": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Min box moves (dr-components 1.4.0)" }, "param_max": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Max box moves (dr-components 1.4.0)" }, "mode": { "enum": ["day"], "description": "date-range only, layout inline: day picks two days (YYYY-MM-DD) over two date params, drawn as two date boxes; without it the range is months or periods, by its params' kind (dr-components 1.4.0)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "placeholder": { "type": "string", "description": "text only: the box's placeholder; default the label (dr-components 1.4.0)" }, "placeholder_min": { "type": "string", "description": "number-range only: the Min box's placeholder; default Min (dr-components 1.4.0)" }, "placeholder_max": { "type": "string", "description": "number-range only: the Max box's placeholder; default Max (dr-components 1.4.0)" }, "mandatory": { "type": "boolean", "description": "always shown, never under More, no remove (\xD7); default false. A filter is also shown when it starts active" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } } }, "description": "the filters, in order: each a chip over a page param" }, "layout": { "enum": ["chips", "inline"], "description": "chips (the default): a chip per filter, its editor in a popover, optional ones under More; inline: every filter drawn open in one row \u2014 dr-input boxes, dr-select lists, two date or number boxes for a range \u2014 with a Clear filters button at the end that resets the filters that narrow (with clearable); More, mandatory and the chips' remove do not apply (dr-components 1.4.0)" }, "filters_label": { "type": "string", "description": "words before the chips (Filters:); default none" }, "more_label": { "type": "string", "description": "the button that adds an optional filter that is not shown; default More" }, "add_filters_title": { "type": "string", "description": "the title of More's list; default Add Filters" }, "clear_tooltip": { "type": "string", "description": "the clear-all button's name; default Clear filters" }, "clearable": { "type": "boolean", "description": "draws the clear-all button while any filter narrows; default true" } }, "description": "data-dr-props: the filter_bar part's typed props, handed to it as PartProps.props" } } }, "filter_chip": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind", "param"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "removable": { "type": "boolean", "description": "draws a remove (\xD7) that clears the filter; default false" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, "description": "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } }, "date_range": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, "field_to": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the To date is written under; required with field" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, "param_to": { "type": "string", "minLength": 1, "description": "param mode: the page param the To date moves, the same kind as param; required with param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the From date it starts on; default none" }, "value_to": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the To date it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the From param's label (param mode), else the element's label" }, "label_from": { "type": "string", "description": "the From picker's label; default From" }, "label_to": { "type": "string", "description": "the To picker's label; default To" }, "placeholder_from": { "type": "string", "description": "what From says before a pick; default Select\u2026" }, "placeholder_to": { "type": "string", "description": "what To says before a pick; default Select\u2026" }, "column": { "type": "boolean", "description": "From above To instead of side by side; default false" } }, "description": "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } }, "fiscal_month": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, "fiscal_year_back": { "type": "boolean", "description": "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "description": "field mode: the calendar month it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Select\u2026" } }, "description": "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } }, "search_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["on_submit"], "properties": { "placeholder": { "type": "string", "description": "the box's placeholder; default Search\u2026" }, "button": { "type": "string", "minLength": 1, "description": "the words on the filled dr-button after the box; default Search" }, "on_submit": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, "param": { "type": "string", "minLength": 1, "description": "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, "description": "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } } });
|
|
21271
|
+
var STRICT_TYPES3 = Object.freeze(["number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "slider", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document", "panel"]);
|
|
21272
|
+
var PROPS_SCHEMAS3 = Object.freeze({ "region": { "type": "object", "properties": {} }, "grid": { "type": "object", "properties": {} }, "widget": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the card's title on an app page" }, "role": { "type": "string", "description": "data-dr-role: the app role this card is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "kind": { "enum": ["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative", "waterfall", "waterfall-breakdown", "waterfall-walkthrough", "line-forecast", "heatmap", "combo", "stacked-percent", "gauge"], "description": "data-dr-kind on an app page, the widget kind on a dashboard. The last eight (the finance kinds: waterfall ... gauge) are app pages only, from dr-app-widgets 1.2.0; a dashboard card takes one of the first eleven" }, "source": { "type": "string", "description": "the handler whose payload an app card draws (data-dr-source), or the SPEC key a dashboard card draws" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the card's numbers read" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "props": { "type": "object", "additionalProperties": false, "properties": { "variant": { "enum": ["smart"], "description": "a kpi card's variant: smart is the platform's smart KPI, one comparison pill (compare) in the platform's status colours; app pages, dr-app-widgets 1.2.0 on" }, "compare": { "enum": ["BvA", "AvF", "vs_prev_period"], "description": "a smart kpi's comparison: BvA / AvF read the kpi source's compare (budget / forecast), vs_prev_period its delta; default BvA when the source compares, else vs_prev_period" }, "color_rule": { "enum": ["higher_is_better", "lower_is_better"], "description": "which way is good for a smart kpi's delta and a gauge's goal: lower_is_better for a cost; default higher_is_better" }, "goal": { "type": "number", "description": "a gauge's goal, in the figure's units; absent, the kpi source's compare value" }, "total": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall's closing bar: {label}, default Total" }, "variance": { "type": "object", "properties": { "label": { "type": "string" } }, "description": "a waterfall-breakdown's unexplained bar: {label}, default Variance" }, "forecast_from": { "type": "string", "description": "a line-forecast over ONE series: the period on the x axis the forecast starts at" }, "dual_axis": { "type": "boolean", "description": "a combo: false keeps the line on the columns' axis; default true (a second axis)" } }, "description": "data-dr-props: an APP card's typed props (dr-app-widgets 1.2.0 on), sorted JSON on the page, read back by the extractor: a smart kpi's variant, compare and color_rule; a gauge's goal and color_rule; a waterfall's total and variance; a line-forecast's forecast_from; a combo's dual_axis" }, "title": { "type": "string", "description": "a dashboard card's title" }, "subtitle": { "type": "string", "description": "the line under a dashboard card's title" }, "description": { "type": "string", "description": "what a dashboard card shows, in words" }, "params": { "type": "array", "description": "the params a dashboard card honours" } } }, "control": { "type": "object", "properties": { "param": { "type": "string", "description": "the param it moves" }, "control_kind": { "type": "string", "description": "the control's kind" }, "type": { "type": "string", "description": "the input type" }, "min": { "type": "string", "description": "the lowest value" }, "max": { "type": "string", "description": "the highest value" }, "step": { "type": "string", "description": "the step" }, "value": { "type": "string", "description": "the starting value" }, "label": { "type": "string", "description": "the label" } } }, "nav": { "type": "object", "properties": { "aria_label": { "type": "string", "description": "the nav's accessible name" } } }, "tab": { "type": "object", "properties": { "current": { "type": "boolean", "description": "true on the page it names" }, "href": { "type": "string", "description": "the page it links to" }, "label": { "type": "string", "description": "the text it shows" } } }, "slot": { "type": "object", "properties": {} }, "form": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the form writes" }, "action": { "type": "string", "description": "data-dr-action: the handler that saves it" }, "source": { "type": "string", "description": "data-dr-source: with bind, the reader the bound row is read from" }, "bind": { "enum": ["selected"], "description": "data-dr-bind (dr-app-runtime 1.9.0): selected \u2014 the page's selected row, read from source by its key: a generated reader read whole and the row picked out by id, or a custom handler whose backend.handlers verbs are all reads, called with {id}. Only on a form or detail at the page root or a child of a root panel or split_pane; a list, queue or data_grid (one with no on_row) on the page picks the row" } } }, "list": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table listed" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers the rows" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "detail": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table the row is from" }, "action": { "type": "string", "description": "data-dr-action: the handler it acts through" }, "source": { "type": "string", "description": "data-dr-source: with bind, the reader the bound row is read from" }, "bind": { "enum": ["selected"], "description": "data-dr-bind (dr-app-runtime 1.9.0): selected \u2014 the page's selected row, read from source by its key: a generated reader read whole and the row picked out by id, or a custom handler whose backend.handlers verbs are all reads, called with {id}. Only on a form or detail at the page root or a child of a root panel or split_pane; a list, queue or data_grid (one with no on_row) on the page picks the row" } } }, "queue": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the table queued" }, "source": { "type": "string", "description": "data-dr-source: the inbox handler" }, "filter": { "description": "data-dr-filter, parsed from `col=value` into an object" } } }, "action": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "action": { "type": "string", "description": "data-dr-action: the handler it runs" }, "param": { "type": "string", "description": "data-dr-param: the argument it passes" }, "entity": { "type": "string", "description": "data-dr-entity: the table the handler acts on" }, "when": { "type": "object", "description": 'data-dr-when: the states a ROW ACTION is drawn in, one JSON object of column to the values the row may hold ({"status": ["open", "in_progress"]}), every column matched; a row without the column keeps the action. It hides a button and refuses nothing: the handler still has to (dr-app-runtime 1.7.1 on an action in a list or a queue; dr-components 1.2.0 on a data_grid row action)' } } }, "filter": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "field": { "type": "string", "description": "data-dr-field: the column filtered" }, "entity": { "type": "string", "description": "data-dr-entity: the table filtered" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" } } }, "stat": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the summary handler" }, "measure": { "type": "string", "description": "data-dr-measure: the key of the number shown" }, "tone": { "type": "string", "description": "data-dr-tone: default | positive | warning | negative" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how the figure reads: a word or a platform format string" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "chart": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows it draws" }, "kind": { "enum": ["line", "bar", "area"], "description": "data-dr-kind: what it draws" }, "x": { "type": "string", "description": "data-dr-x: the column on the category axis" }, "y": { "type": "string", "description": "data-dr-y: the one numeric column drawn" }, "series": { "type": "string", "description": "data-dr-series: the column whose distinct values are one line each" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "data-dr-format: how a number reads; percent is a value already in percent units" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "data-dr-negative: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" } } }, "custom": { "type": "object", "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose answer the module receives" }, "module": { "type": "string", "pattern": "^components/[a-z][a-z0-9_-]*\\.js$", "description": "data-dr-module: the file that draws it" }, "args": { "type": "object", "description": "data-dr-args: one JSON object handed to the module as ui.args; absent means {}" }, "declares": { "type": "object", "description": "data-dr-declares: what the module does, stated for graders and app-space test \u2014 nothing draws from it and the runtime never reads it. Every key is optional; a name it lists must be one the contract declares (custom_declares)", "additionalProperties": false, "properties": { "reads": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the data.sources entries and handlers whose answers it draws" }, "calls": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "the handlers it calls through ui.call; app-space test reports a call to any other (custom-undeclared-call)" }, "produces": { "type": "object", "description": `per called handler, the payload keys it sends \u2014 {"project": ["growth", "hires"]}; for a handler it does not list, app-space test reads the keys off the module's ui.call object literal`, "additionalProperties": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "shows": { "type": "array", "description": "the numbers it displays; the module projects each one on the element that shows it (data-dr-field, data-dr-value, data-dr-format), which app-space test harvests into the element's values", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the field the number is, as its data-dr-field names it" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how it reads, as its data-dr-format says" }, "scale": { "enum": ["fraction"], "description": "fraction: the value is a share (0.04) shown as a percent (4%)" } } } } } } } }, "field": { "type": "object", "properties": { "entity": { "type": "string", "description": "data-dr-entity: the table the column is in" }, "field": { "type": "string", "description": "data-dr-field: the column" }, "source": { "type": "string", "description": "data-dr-source: the handler that answers its choices" }, "label": { "type": "string", "description": "the field's label" }, "required": { "type": "boolean", "description": "true when the form cannot be saved without it" }, "input_type": { "type": "string", "description": "the input's type" }, "options": { "type": "array", "description": "the choices offered" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"] }, "description": "data-dr-status-map (dr-app-runtime 1.9.0), a list or queue column only: value \u2192 dr-status type, the value drawn as a status pill; an unmapped value is default" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"] }, "description": "data-dr-badge-map (dr-app-runtime 1.9.0), a list or queue column only: value \u2192 dr-badge colour, the value drawn as a badge; an unmapped value is stone" }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "data-dr-badge-labels (dr-app-runtime 1.9.0), a list or queue column with status_map or badge_map: value \u2192 the words the pill shows (true \u2192 Paid); an unlisted value shows itself" } } }, "number_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["format"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "what the number is: the unit shown beside the input" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "min": { "type": "number", "description": "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, "max": { "type": "number", "description": "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, "step": { "type": "number", "description": "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, "decimals": { "type": "integer", "minimum": 0, "description": "the decimals the STORED value is rounded to, after scaling; default as typed" }, "value": { "type": "number", "description": "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the input's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "the hint shown while the input is empty" } }, "description": "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } }, "tabs": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tabs"], "properties": { "tabs": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the tab's id, which a tab_panel's tab names" }, "label": { "type": "string", "minLength": 1, "description": "the text on the tab" } } }, "description": "the tabs, in order" }, "default": { "type": "string", "description": "the id of the tab open first; default the first tab" } }, "description": "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } }, "tab_panel": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tab"], "properties": { "tab": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the id of the tab (in the enclosing tabs) this panel belongs to" } }, "description": "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } }, "select": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: optional; the handler whose rows are the options when props.options is absent" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this select writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this select reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group"); dr-components 1.3.0' } } }, "description": "the options; when absent they are the page param's values (param mode), else the source rows" }, "option_value": { "type": "string", "description": "with a source: the row column that is stored; default id" }, "option_label": { "type": "string", "description": "with a source: the row column the reader sees; default the value column" }, "value": { "type": "string", "description": "field mode: the option chosen first; default none. Param mode reads ctx.params instead" }, "values": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "field mode with multiple: the options chosen first; default none (dr-components 1.3.0)" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a choice; default Choose\u2026" }, "multiple": { "type": "boolean", "description": "many values: field mode writes them as one list (a dialog posts the list), param mode moves a multi param; default false, one value (dr-components 1.3.0)" }, "searchable": { "type": "boolean", "description": "a search box over the list, filtering by label; default false (dr-components 1.3.0)" }, "group_by": { "type": "string", "minLength": 1, "description": "the key the list is grouped under: a source row's column, or group on a stated option; default none (dr-components 1.3.0)" } }, "description": "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } }, "date_picker": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this picker reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over a month param is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the date or month the picker starts on; default none. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Pick a date / Pick a month" } }, "description": "data-dr-props: the date_picker part's typed props, handed to it as PartProps.props" } } }, "data_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows the grid shows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row key the column shows" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent", "text", "date"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads; default text" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "align": { "enum": ["start", "end"], "description": "default end for currency, number and percent, start otherwise" }, "sortable": { "type": "boolean", "description": "whether the header sorts; default true" }, "cell": { "enum": ["badge", "status", "chip", "link", "toggle"], "description": "how the value draws instead of text (dr-components 1.3.0, the dr-grid cell renderers): badge (a dr-badge, its colour from badge_map), status (a dr-status, its type from status_map), chip (the value, or each value of a list, as a chip), link (the value as a link: to link_field's URL, else opening the row through on_row), toggle (a switch over a boolean; call flips it, without it the switch is read-only)" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "a dr-badge colour" }, "description": "cell badge: value \u2192 dr-badge colour; an unmapped value is stone (dr-components 1.3.0)" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "a dr-status type" }, "description": "cell status: value \u2192 dr-status type; an unmapped value is default (dr-components 1.3.0)" }, "link_field": { "type": "string", "minLength": 1, "description": "cell link: the row column holding the link's URL (same-origin path, #hash, or http(s)); default none: the link opens the row (on_row) (dr-components 1.3.0)" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "cell toggle: a handler called with {id, row, field, value} when the reader flips the switch; the page re-reads after. Without it the switch is read-only (dr-components 1.3.0)" }, "weight": { "enum": ["strong"], "description": "strong draws the cell's text bold (the row's lead column: a vendor, an account) (dr-components 1.4.0)" }, "currency_field": { "type": "string", "minLength": 1, "description": "format currency only: the row column holding each row's ISO currency code (EUR, ILS, GBP, USD\u2026), so the symbol is the row's own; a row without it falls back to currency, else USD (dr-components 1.4.0)" }, "cell_secondary": { "type": "string", "minLength": 1, "description": `cell badge only: the row column whose text the badge shows, while badge_map still colours it by the cell's own value (a PO state coloured by matched / difference, reading "\u2713 matched") (dr-components 1.4.0)` }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "cell badge only: value \u2192 the text the badge shows (true \u2192 Paid, false \u2192 Unpaid); an unlisted value shows itself. The projection keeps the raw value (dr-components 1.4.0)" }, "compact": { "type": "boolean", "description": "currency and number: false draws the exact figure (\u20AC1,315.08), where the runtime abbreviates from 1,000 (\u20AC1.3K); default the runtime's (dr-components 1.5.0)" }, "truncate": { "type": "boolean", "description": "one line, cut with an ellipsis at max_width (default 240px), the whole value on hover (dr-components 1.5.0)" }, "max_width": { "type": "integer", "minimum": 40, "description": "the column's widest, in px: longer values wrap, or with truncate are cut (dr-components 1.5.0)" } } }, "description": "the columns, in order" }, "key": { "type": "string", "description": "the column whose value is each row's data-dr-row, and the id a row action posts; default id. A row without it projects its position as data-dr-row and draws no row actions (1.1.1); with row_actions the compiler requires it stated and a column the source's rows carry, and, where a row action writes through a remove, save or decide handler, that table's primary key (part_row_key)" }, "theme": { "enum": ["default", "borderless", "editable", "inside-card"], "description": "the dr-grid theme (dr-components 1.3.0): default (rows and header 56px), borderless (40px, no row lines), editable (40px, a focus ring on the cell), inside-card (rows 56px, a 32px header, for a grid inside a card); default default" }, "hierarchy": { "type": "object", "additionalProperties": false, "required": ["parent", "label"], "properties": { "parent": { "type": "string", "minLength": 1, "description": "the column holding each row's parent row key (the key column's value); empty for a top row" }, "label": { "type": "string", "minLength": 1, "description": "the column drawn as the tree: indented by depth, with expand / collapse on a parent" }, "expanded": { "type": "boolean", "description": "whether parents start open; default true" } }, "description": "tree rows (dr-components 1.3.0): a P&L's accounts under their parents, each parent's number columns the sum of its children's unless the source answers the parent's own; sorting orders siblings" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row, summing the top rows' number columns (currency, number, a platform format string; a percent is left blank), pinned above or below the rows (dr-components 1.3.0); default none" }, "pin": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "the leading columns (fields) that stay in view while the grid scrolls sideways, in column order (dr-components 1.3.0)" }, "csv_params": { "type": "object", "additionalProperties": false, "properties": { "file_name": { "type": "string", "minLength": 1, "description": "the downloaded file's name; default the element id, .csv" } }, "description": "draws an Export CSV button (dr-grid-toolbar csvParams, dr-components 1.3.0): every row in the grid's order, parents and totals included, numbers raw, headers as shown" }, "selection": { "type": "object", "additionalProperties": false, "required": ["bulk_actions"], "properties": { "bulk_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens once over the selection, and its Confirm posts ids (the selected rows' keys) with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {ids} (the selected rows' keys); the selection clears and the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel), the selection's size in it; default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }] }, "description": "the bulk bar's buttons, shown while rows are ticked: open a row dialog over the selection, or call a handler with {ids}" } }, "description": "a checkbox column (a header box ticks or clears the page's rows) and, while any row is ticked, a bar above the grid: N selected, the bulk actions, Clear selection. Only keyed rows can be ticked; ticks a search hides are dropped. A dialog action's on_confirm, like a call, is a custom handler that reads ids (dr-components 1.4.0)" }, "sticky_header": { "type": "boolean", "description": "the header row stays in view while the grid scrolls (thead sticky inside the grid's own scroll box, which is capped at the viewport's height); default false (dr-components 1.4.0)" }, "search": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "an inline search box above the grid that narrows the loaded rows to those whose named fields hold the typed text (case-insensitive); it is the grid's own, not a page param (dr-components 1.4.0)" }, "row_detail": { "enum": ["drawer"], "description": "drawer: clicking a row opens a side panel listing the row's columns (or detail_fields), field by field (on_row still runs when stated) (dr-components 1.4.0)" }, "detail_fields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "row_detail only: the row fields the drawer lists, in order; default the grid's columns. A field that is no column is drawn as text (dr-components 1.4.0)" }, "page_size": { "type": "integer", "minimum": 5, "description": "rows per page; default 10" }, "sort": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the column sorted first" }, "dir": { "enum": ["asc", "desc"], "description": "default asc" } }, "description": "the order the rows start in; default the order the handler answered" }, "on_row": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {row} when a reader opens a row; the page re-reads after it" }, "row_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens over the row, its inputs prefilled, and posts id with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {id, row} (id: the row's key column); the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel); default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }] }, "description": "a button per row for each action, after the columns: open a dialog over the row, or call a handler with it" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the data_grid part's typed props, handed to it as PartProps.props" } } }, "dialog": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "trigger": { "type": "string", "minLength": 1, "description": "the text on the button that opens it; default the element's label, else its title \u2014 the compiler writes it into the page (foldDialogTriggers). A dialog with none of the three and no values_from row is refused (part_mode); a row dialog (values_from row) takes none, a row action opens it" }, "title": { "type": "string", "description": "the dialog's title; default the element's label" }, "description": { "type": "string", "description": "one line under the title" }, "confirm": { "type": "string", "description": "the text on the confirm button; default Confirm" }, "on_confirm": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Confirm calls with the fields of the inputs inside; without one, Confirm only closes" }, "values_from": { "enum": ["row"], "description": "row: a data_grid row action opens it over one row \u2014 the inputs inside start from that row's values, and Confirm posts id (the row's key) with their fields, to a save handler" }, "key": { "type": "string", "minLength": 1, "description": "with values_from row: the row column posted as id; default the grid's key, else id" } }, "description": "data-dr-props: the dialog part's typed props, handed to it as PartProps.props" } } }, "variance_table": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows are the lines" }, "props": { "type": "object", "additionalProperties": false, "required": ["row", "actual", "plan"], "properties": { "row": { "type": "string", "minLength": 1, "description": "the column naming each line; its value is the line's data-dr-row" }, "actual": { "type": "string", "minLength": 1, "description": "the column holding the actual figure" }, "plan": { "type": "string", "minLength": 1, "description": "the column holding the plan (budget) figure" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how actual, plan and variance read; default currency" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how actual, plan and variance read below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good: higher (the default) for revenue, lower for cost" }, "threshold": { "type": "object", "additionalProperties": false, "required": [], "properties": { "abs": { "type": "number", "minimum": 0, "description": "a variance smaller than this, in the figures' units, is neutral" }, "pct": { "type": "number", "minimum": 0, "description": "a variance share smaller than this fraction (0.05 is 5%) is neutral" } }, "description": "below both limits a variance is neutral rather than toned; default none" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the variance_table part's typed props, handed to it as PartProps.props" } } }, "toggle": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this switch writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this switch reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts on; default off. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the switch's label; default the page param's label (param mode), else the element's label" }, "description": { "type": "string", "description": "one line under the label" } }, "description": "data-dr-props: the toggle part's typed props, handed to it as PartProps.props" } } }, "control_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "columns": { "enum": [1, 2, 3, 4], "description": "how many controls sit side by side; default 1 (under 640px always 1)" }, "label_position": { "enum": ["top", "start"], "description": "top (the default): each label above its control; start: every label in one column before its control" }, "description": { "type": "string", "description": "one line above the controls" } }, "description": "data-dr-props: the control_group part's typed props, handed to it as PartProps.props" } } }, "callout": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer the rules read \u2014 a summary's measures, a KPI, or rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["rules"], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["when", "tone", "text"], "properties": { "when": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["path", "gte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "gte": { "type": "number", "description": "matches when the value is at least this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "lte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "lte": { "type": "number", "description": "matches when the value is at most this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "eq"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "eq": { "type": ["string", "number", "boolean"], "description": "matches when the value is exactly this" } } }], "description": "the condition: one path and one of gte, lte, eq" }, "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } } }, "description": "tried in order; the first whose when holds is the sentence" }, "default": { "type": "object", "additionalProperties": false, "required": ["tone", "text"], "properties": { "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } }, "description": "what it says when no rule holds; default nothing" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } }, "description": "data-dr-props: the callout part's typed props, handed to it as PartProps.props" } } }, "scenario_columns": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose rows are the scenarios" }, "props": { "type": "object", "additionalProperties": false, "required": ["key", "label_field", "metrics"], "properties": { "key": { "type": "string", "minLength": 1, "description": "the column naming each row uniquely; its value is the column's data-dr-row" }, "label_field": { "type": "string", "minLength": 1, "description": "the column whose value heads each scenario's column" }, "metrics": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row column the line shows" }, "label": { "type": "string", "description": "the line's name; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good for the delta's tone: higher (the default) or lower" } } }, "description": "the lines, in order" }, "max": { "type": "integer", "minimum": 1, "description": "how many rows may be ticked at once; default 3 (at most 6)" }, "baseline": { "type": "string", "minLength": 1, "description": "the key value of the row every delta is against; default the first row" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the scenario_columns part's typed props, handed to it as PartProps.props" } } }, "slider": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this slider writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this slider reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "min": { "type": "number", "description": "the track's low end, in stored units; default the page param's min (param mode), else 0" }, "max": { "type": "number", "description": "the track's high end, in stored units; default the page param's max (param mode). Required one way or the other: a slider with neither draws its 'slider needs a max' panel (1.0.1) and the compiler refuses it (part_bounds)" }, "step": { "type": "number", "description": "the increment the value moves by, in stored units; every value set is a multiple of it from min; default the page param's step, else 1" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value beside the track reads; default number" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value beside the track shows a figure below zero: the platform's negative-number mode: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components-controls 1.1.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "show_value": { "type": "boolean", "description": "whether the formatted value is drawn beside the track; default true" }, "marks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "number", "description": "where the mark sits, in stored units" }, "label": { "type": "string", "description": "what the mark says; default the value, formatted" } } }, "description": "labelled ticks under the track" }, "value": { "type": "number", "description": "field mode: the value it starts on; default min. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the slider's label; default the page param's label (param mode), else the element's label" } }, "description": "data-dr-props: the slider part's typed props, handed to it as PartProps.props" } } }, "button": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words on the button" }, "theme": { "enum": ["primary", "secondary", "ghost", "danger", "positive", "negative", "link"], "description": "the dr-button theme; default primary. danger and negative always ask before the call" }, "size": { "enum": ["regular", "small"], "description": "regular (32px, the platform pill) or small (28px); default regular" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph before the label" }, "icon_after": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph after the label" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler a click calls with {} (and reason, when asked); the page re-reads after it. Without one the button draws disabled" }, "confirm": { "type": "string", "minLength": 1, "description": 'the question asked first (Confirm / Cancel); default none, and "<label>?" on a danger or negative button, which always asks' }, "reason": { "enum": ["required", "optional"], "description": "a reason box in the confirm dialog, posted as reason; required keeps Confirm disabled until it holds text" }, "split": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label", "on_click"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the menu entry" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler it calls with {}" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked first" } } }, "description": "more calls behind the button's arrow (dr-split-button)" }, "disabled": { "type": "boolean", "description": "drawn disabled; default false" } }, "description": "data-dr-props: the button part's typed props, handed to it as PartProps.props" } } }, "status": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the dr-status type (its colour); default default. A map entry that matches wins" }, "label": { "type": "string", "description": "the words; default the value at path" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph in place of the dot" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "type"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the type it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 type and words, tried in order" } }, "description": "data-dr-props: the status part's typed props, handed to it as PartProps.props" } } }, "badge": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "the words; default the value at path" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the dr-badge colour; default stone" }, "size": { "enum": ["medium", "small"], "description": "default medium" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "color"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the colour it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 colour and words, tried in order" } }, "description": "data-dr-props: the badge part's typed props, handed to it as PartProps.props" } } }, "tag": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["month", "quarter", "year", "forecast"], "description": "what the value is" }, "value": { "type": ["string", "number"], "description": "the period: 2026-03, 2026-Q1, 2026, 3 (a forecast's closed months) or 3+9" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "fiscal": { "type": "boolean", "description": "year only: prefix FY; default true" } }, "description": "data-dr-props: the tag part's typed props, handed to it as PartProps.props" } } }, "empty_state": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["noData", "noPermissions", "noResults", "noNotifications", "custom"], "description": "the platform's empty-state type: its icon and default words; default custom" }, "title": { "type": "string", "description": "the title; default the type's" }, "description": { "type": "string", "description": "the line under it; default the type's" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; with on_action" }, "on_action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler the button calls with {}; the page re-reads after it" } }, "description": "data-dr-props: the empty_state part's typed props, handed to it as PartProps.props" } } }, "stepper": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": { "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "description": "the value current (or the value at path) names this step by" }, "label": { "type": "string", "minLength": 1, "description": "the step's name" }, "description": { "type": "string", "description": "one line under the name" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler that moves the flow on from this step, called with {step: <id>} when it is current; every step but the last needs one (A3.29)" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; default Continue" } } }, "description": "the steps, in order" }, "current": { "type": "string", "minLength": 1, "description": "the id of the step the flow is at; default the value at path, else the first step" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "vertical": { "type": "boolean", "description": "steps top to bottom; default left to right" } }, "description": "data-dr-props: the stepper part's typed props, handed to it as PartProps.props" } } }, "alert": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "theme": { "enum": ["success", "error", "bold-error", "warning", "info", "tip"], "description": "the dr-alert type; default info" }, "title": { "type": "string", "description": "the bold first line" }, "text": { "type": "string", "minLength": 1, "description": "the notice" } }, "description": "data-dr-props: the alert part's typed props, handed to it as PartProps.props" } } }, "checkbox": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this box writes (true / false); exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the toggle page param it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts ticked; default false. Param mode reads ctx.params" }, "label": { "type": "string", "description": "the words beside the box; default the page param's label, else the element's label" }, "description": { "type": "string", "description": "a line under it" } }, "description": "data-dr-props: the checkbox part's typed props, handed to it as PartProps.props" } } }, "radio_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this choice writes; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the select (or period / month) page param it moves; exactly one of field and param" }, "options": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees; default the value" } } }, "description": "the options, in order; param mode: default the page param's values" }, "value": { "type": "string", "description": "field mode: the option it starts on; default none" }, "label": { "type": "string", "description": "the group's label; default the page param's label, else the element's label" }, "direction": { "enum": ["vertical", "horizontal"], "description": "default vertical" } }, "description": "data-dr-props: the radio_group part's typed props, handed to it as PartProps.props" } } }, "file_upload": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "the payload key the stored file is written under, as {upload, filename, mime_type, size}" }, "accept": { "type": "string", "description": "the file types the picker offers, as an input accept list: .pdf,.xlsx; default any" }, "max_size_mb": { "type": "number", "minimum": 0, "description": "a larger file is refused before it is sent (client-side only: the platform's own limit still answers 413); 0 or less is no limit of its own; default the platform's own limit" }, "label": { "type": "string", "description": "the label above the zone; default the element's label" }, "dropzone_text": { "type": "string", "description": "the zone's first line; default Drop a file here, or browse" }, "dropzone_subtext": { "type": "string", "description": "the zone's second line; default the accepted types" }, "on_upload": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler called with {<field>: {upload, filename, mime_type, size}} once the file is stored (the parser hand-off); the page re-reads after it. Without one the value waits for the dialog around it" } }, "description": "data-dr-props: the file_upload part's typed props, handed to it as PartProps.props" } } }, "skeleton": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "appearance": { "enum": ["rectangle", "title-line", "text-line", "chip", "avatar"], "description": "the shape; default rectangle" }, "count": { "type": "integer", "minimum": 1, "description": "how many, one under the other; default 1 (at most 12)" }, "width": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|%|rem)$", "description": "a CSS length: 100%, 240px, 12rem; default the appearance's" }, "height": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|rem)$", "description": "a CSS length; default the appearance's" } }, "description": "data-dr-props: the skeleton part's typed props, handed to it as PartProps.props" } } }, "progress": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "progress": { "type": "number", "minimum": 0, "description": "how much is done; default the value at path" }, "total": { "type": "number", "minimum": 0, "description": "what done means; default the value at total_path, else 100" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "total_path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path to the total in the source's answer" }, "show_value": { "type": "boolean", "description": "the percent beside the bar; default true" }, "type": { "enum": ["light", "dark"], "description": "the dr-progress-bar type; default light" }, "label": { "type": "string", "description": "the words above the bar; default the element's label" } }, "description": "data-dr-props: the progress part's typed props, handed to it as PartProps.props" } } }, "accordion": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "description": "the section's header" }, "open": { "type": "boolean", "description": "whether it starts open; default false" } } }, "description": "the sections, in order: child i of the element fills item i" }, "multi": { "type": "boolean", "description": "several may be open at once; default false" }, "theme": { "enum": ["regular", "borderless"], "description": "the dr-accordion theme; default regular" } }, "description": "data-dr-props: the accordion part's typed props, handed to it as PartProps.props" } } }, "tooltip_info": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1, "description": "the explanation" }, "label": { "type": "string", "description": "words before the mark; default none" }, "position": { "enum": ["top", "bottom", "left", "right"], "description": "where the explanation opens; default top" } }, "description": "data-dr-props: the tooltip_info part's typed props, handed to it as PartProps.props" } } }, "filter_bar": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["filters"], "properties": { "filters": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month", "text", "number-range"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param); dr-components 1.4.0, layout inline only: text (a text box over a text param), number-range (Min / Max over param_min and param_max). Every kind but number-range needs param" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused; a text param for text (dr-components 1.4.0); a date param for a date-range with mode day" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param; date with mode day)" }, "param_min": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Min box moves (dr-components 1.4.0)" }, "param_max": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Max box moves (dr-components 1.4.0)" }, "mode": { "enum": ["day"], "description": "date-range only, layout inline: day picks two days (YYYY-MM-DD) over two date params, drawn as two date boxes; without it the range is months or periods, by its params' kind (dr-components 1.4.0)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "placeholder": { "type": "string", "description": "text only: the box's placeholder; default the label (dr-components 1.4.0)" }, "placeholder_min": { "type": "string", "description": "number-range only: the Min box's placeholder; default Min (dr-components 1.4.0)" }, "placeholder_max": { "type": "string", "description": "number-range only: the Max box's placeholder; default Max (dr-components 1.4.0)" }, "mandatory": { "type": "boolean", "description": "always shown, never under More, no remove (\xD7); default false. A filter is also shown when it starts active" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } } }, "description": "the filters, in order: each a chip over a page param" }, "layout": { "enum": ["chips", "inline"], "description": "chips (the default): a chip per filter, its editor in a popover, optional ones under More; inline: every filter drawn open in one row \u2014 dr-input boxes, dr-select lists, two date or number boxes for a range \u2014 with a Clear filters button at the end that resets the filters that narrow (with clearable); More, mandatory and the chips' remove do not apply (dr-components 1.4.0)" }, "filters_label": { "type": "string", "description": "words before the chips (Filters:); default none" }, "more_label": { "type": "string", "description": "the button that adds an optional filter that is not shown; default More" }, "add_filters_title": { "type": "string", "description": "the title of More's list; default Add Filters" }, "clear_tooltip": { "type": "string", "description": "the clear-all button's name; default Clear filters" }, "clearable": { "type": "boolean", "description": "draws the clear-all button while any filter narrows; default true" } }, "description": "data-dr-props: the filter_bar part's typed props, handed to it as PartProps.props" } } }, "filter_chip": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind", "param"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "removable": { "type": "boolean", "description": "draws a remove (\xD7) that clears the filter; default false" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, "description": "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } }, "date_range": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, "field_to": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the To date is written under; required with field" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, "param_to": { "type": "string", "minLength": 1, "description": "param mode: the page param the To date moves, the same kind as param; required with param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the From date it starts on; default none" }, "value_to": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the To date it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the From param's label (param mode), else the element's label" }, "label_from": { "type": "string", "description": "the From picker's label; default From" }, "label_to": { "type": "string", "description": "the To picker's label; default To" }, "placeholder_from": { "type": "string", "description": "what From says before a pick; default Select\u2026" }, "placeholder_to": { "type": "string", "description": "what To says before a pick; default Select\u2026" }, "column": { "type": "boolean", "description": "From above To instead of side by side; default false" } }, "description": "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } }, "fiscal_month": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, "fiscal_year_back": { "type": "boolean", "description": "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "description": "field mode: the calendar month it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Select\u2026" } }, "description": "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } }, "search_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["on_submit"], "properties": { "placeholder": { "type": "string", "description": "the box's placeholder; default Search\u2026" }, "button": { "type": "string", "minLength": 1, "description": "the words on the filled dr-button after the box; default Search" }, "on_submit": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, "param": { "type": "string", "minLength": 1, "description": "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, "description": "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } }, "split_pane": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "ratio": { "type": "array", "minItems": 2, "items": { "type": "number", "minimum": 1 }, "description": "the two panes' shares of the width, left then right ([55, 45]); exactly two; default [50, 50]" }, "resizable": { "type": "boolean", "description": "draw a divider the reader drags, or moves with the arrow keys (role=separator); default false" }, "remember": { "type": "boolean", "description": "keep the width the reader set, per page, in their browser (localStorage); default false" }, "min": { "type": "array", "minItems": 2, "items": { "type": "integer", "minimum": 0 }, "description": "each pane's narrowest width in px, left then right; default [240, 240]" } }, "description": "data-dr-props: the split_pane part's typed props, handed to it as PartProps.props" } } }, "file_viewer": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader whose row holds the file" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's file column: {url, filename, mime_type, size} as the platform reads a file column back, or the stored reference" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "height": { "type": "integer", "minimum": 120, "description": "the viewer's height in px; default 640" }, "toolbar": { "type": "boolean", "description": "the bar over the file: its name and a download link; default true" } }, "description": "data-dr-props: the file_viewer part's typed props, handed to it as PartProps.props" } } }, "line_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the child table the rows belong to" }, "source": { "type": "string", "description": "data-dr-source: the reader of the child rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns", "action"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the child row's key the column edits" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" }, "editable": { "type": "boolean", "description": "whether the reader types in it; default true" }, "options": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "the values a select cell offers; default a typed cell" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } } }] }, "description": "the columns, in order: a field name, or {field, label, format, editable, options, currency}" }, "key": { "type": "string", "minLength": 1, "description": "the child row's identity column, posted with a kept row; default id" }, "add_row": { "type": "boolean", "description": "draw Add a line, which adds a blank row at the bottom; default false" }, "remove_row": { "anyOf": [{ "type": "boolean" }, { "enum": ["confirm"] }], "description": "draw a \xD7 on each row; confirm asks first; default false" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row over the number and currency columns, above or below the rows; default none" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the custom handler Save calls with {id: <the parent row's key>, rows: [...]}; the lines re-read after it" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "empty_text": { "type": "string", "description": "the sentence while there are no rows; default No lines yet." } }, "description": "data-dr-props: the line_grid part's typed props, handed to it as PartProps.props" } } }, "document": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader of the document's row" }, "props": { "type": "object", "additionalProperties": false, "required": ["sections"], "properties": { "title": { "type": "string", "description": "the words on the Print bar, left of the button; default none (the card's title is the element's label)" }, "page_size": { "enum": ["A4", "Letter"], "description": "the paper it prints on; default A4" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "the ISO code its currency figures read in; default USD" }, "sections": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["header", "table", "text", "totals", "terms"], "description": "what the section is" }, "title": { "type": "string", "description": "header: the big title; table, text, terms: the section's heading" }, "title_field": { "type": "string", "minLength": 1, "description": "header: the row's key whose value is the title" }, "label": { "type": "string", "description": "header: the word on the right (Purchase order)" }, "fields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "header: the row's values listed under the title" }, "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "table: its columns" }, "source": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "table: the reader of the child rows, called with {<its by>: key}" }, "field": { "type": "string", "minLength": 1, "description": "table: the row's array of child rows; text, terms: the row's key holding the words" }, "text": { "type": "string", "description": "text, terms: the words" }, "lines": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words" }, "field": { "type": "string", "minLength": 1, "description": "the row's key holding the figure" }, "sum": { "type": "string", "minLength": 1, "description": "a table column whose figures it adds" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "totals: its lines, each one figure" }, "page_break": { "type": "boolean", "description": "printed, start this section on a new page" } } }, "description": "the document, top to bottom" } }, "description": "data-dr-props: the document part's typed props, handed to it as PartProps.props" } } }, "panel": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "minLength": 1, "description": "data-dr-label: the card's title (required: a panel is one titled card)" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" } } } });
|
|
21022
21273
|
var LIBRARY_TYPES2 = Object.freeze(["number_input", "tabs", "tab_panel", "select", "date_picker", "data_grid", "dialog", "variance_table", "toggle", "control_group", "callout", "scenario_columns", "button", "status", "badge", "tag", "empty_state", "stepper", "alert", "checkbox", "radio_group", "file_upload", "skeleton", "progress", "accordion", "tooltip_info", "filter_bar", "filter_chip", "date_range", "fiscal_month", "search_input", "split_pane", "file_viewer", "line_grid", "document"]);
|
|
21023
21274
|
var LIBRARY_PROPS_SCHEMAS2 = Object.freeze({ "number_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["format"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this input writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this input reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "what the number is: the unit shown beside the input" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the reading beside the input shows a figure below zero: the platform's negative-number mode (NegativeNumbersFormat): minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus (dr-components 1.2.0)" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "min": { "type": "number", "description": "the lowest number a reader may type, in the units they type it in; param mode: default the page param's min" }, "max": { "type": "number", "description": "the highest number a reader may type, in the units they type it in; param mode: default the page param's max" }, "step": { "type": "number", "description": "the increment the arrow keys move by, in the units typed; default 1 (param mode: the page param's step). In param mode a typed value is rounded to it before it is set" }, "decimals": { "type": "integer", "minimum": 0, "description": "the decimals the STORED value is rounded to, after scaling; default as typed" }, "value": { "type": "number", "description": "field mode: the stored value the input starts from (0.04, not 4, under fraction); default empty. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the input's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "the hint shown while the input is empty" } }, "description": "data-dr-props: the number_input part's typed props, handed to it as PartProps.props" } } }, "tabs": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tabs"], "properties": { "tabs": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the tab's id, which a tab_panel's tab names" }, "label": { "type": "string", "minLength": 1, "description": "the text on the tab" } } }, "description": "the tabs, in order" }, "default": { "type": "string", "description": "the id of the tab open first; default the first tab" } }, "description": "data-dr-props: the tabs part's typed props, handed to it as PartProps.props" } } }, "tab_panel": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["tab"], "properties": { "tab": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "description": "the id of the tab (in the enclosing tabs) this panel belongs to" } }, "description": "data-dr-props: the tab_panel part's typed props, handed to it as PartProps.props" } } }, "select": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: optional; the handler whose rows are the options when props.options is absent" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this select writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this select reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group"); dr-components 1.3.0' } } }, "description": "the options; when absent they are the page param's values (param mode), else the source rows" }, "option_value": { "type": "string", "description": "with a source: the row column that is stored; default id" }, "option_label": { "type": "string", "description": "with a source: the row column the reader sees; default the value column" }, "value": { "type": "string", "description": "field mode: the option chosen first; default none. Param mode reads ctx.params instead" }, "values": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "field mode with multiple: the options chosen first; default none (dr-components 1.3.0)" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a choice; default Choose\u2026" }, "multiple": { "type": "boolean", "description": "many values: field mode writes them as one list (a dialog posts the list), param mode moves a multi param; default false, one value (dr-components 1.3.0)" }, "searchable": { "type": "boolean", "description": "a search box over the list, filtering by label; default false (dr-components 1.3.0)" }, "group_by": { "type": "string", "minLength": 1, "description": "the key the list is grouped under: a source row's column, or group on a stated option; default none (dr-components 1.3.0)" } }, "description": "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } }, "date_picker": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this picker reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over a month param is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the date or month the picker starts on; default none. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Pick a date / Pick a month" } }, "description": "data-dr-props: the date_picker part's typed props, handed to it as PartProps.props" } } }, "data_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows the grid shows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row key the column shows" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent", "text", "date"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads; default text" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "align": { "enum": ["start", "end"], "description": "default end for currency, number and percent, start otherwise" }, "sortable": { "type": "boolean", "description": "whether the header sorts; default true" }, "cell": { "enum": ["badge", "status", "chip", "link", "toggle"], "description": "how the value draws instead of text (dr-components 1.3.0, the dr-grid cell renderers): badge (a dr-badge, its colour from badge_map), status (a dr-status, its type from status_map), chip (the value, or each value of a list, as a chip), link (the value as a link: to link_field's URL, else opening the row through on_row), toggle (a switch over a boolean; call flips it, without it the switch is read-only)" }, "badge_map": { "type": "object", "additionalProperties": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "a dr-badge colour" }, "description": "cell badge: value \u2192 dr-badge colour; an unmapped value is stone (dr-components 1.3.0)" }, "status_map": { "type": "object", "additionalProperties": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "a dr-status type" }, "description": "cell status: value \u2192 dr-status type; an unmapped value is default (dr-components 1.3.0)" }, "link_field": { "type": "string", "minLength": 1, "description": "cell link: the row column holding the link's URL (same-origin path, #hash, or http(s)); default none: the link opens the row (on_row) (dr-components 1.3.0)" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "cell toggle: a handler called with {id, row, field, value} when the reader flips the switch; the page re-reads after. Without it the switch is read-only (dr-components 1.3.0)" }, "weight": { "enum": ["strong"], "description": "strong draws the cell's text bold (the row's lead column: a vendor, an account) (dr-components 1.4.0)" }, "currency_field": { "type": "string", "minLength": 1, "description": "format currency only: the row column holding each row's ISO currency code (EUR, ILS, GBP, USD\u2026), so the symbol is the row's own; a row without it falls back to currency, else USD (dr-components 1.4.0)" }, "cell_secondary": { "type": "string", "minLength": 1, "description": `cell badge only: the row column whose text the badge shows, while badge_map still colours it by the cell's own value (a PO state coloured by matched / difference, reading "\u2713 matched") (dr-components 1.4.0)` }, "badge_labels": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 }, "description": "cell badge only: value \u2192 the text the badge shows (true \u2192 Paid, false \u2192 Unpaid); an unlisted value shows itself. The projection keeps the raw value (dr-components 1.4.0)" }, "compact": { "type": "boolean", "description": "currency and number: false draws the exact figure (\u20AC1,315.08), where the runtime abbreviates from 1,000 (\u20AC1.3K); default the runtime's (dr-components 1.5.0)" }, "truncate": { "type": "boolean", "description": "one line, cut with an ellipsis at max_width (default 240px), the whole value on hover (dr-components 1.5.0)" }, "max_width": { "type": "integer", "minimum": 40, "description": "the column's widest, in px: longer values wrap, or with truncate are cut (dr-components 1.5.0)" } } }, "description": "the columns, in order" }, "key": { "type": "string", "description": "the column whose value is each row's data-dr-row, and the id a row action posts; default id. A row without it projects its position as data-dr-row and draws no row actions (1.1.1); with row_actions the compiler requires it stated and a column the source's rows carry, and, where a row action writes through a remove, save or decide handler, that table's primary key (part_row_key)" }, "theme": { "enum": ["default", "borderless", "editable", "inside-card"], "description": "the dr-grid theme (dr-components 1.3.0): default (rows and header 56px), borderless (40px, no row lines), editable (40px, a focus ring on the cell), inside-card (rows 56px, a 32px header, for a grid inside a card); default default" }, "hierarchy": { "type": "object", "additionalProperties": false, "required": ["parent", "label"], "properties": { "parent": { "type": "string", "minLength": 1, "description": "the column holding each row's parent row key (the key column's value); empty for a top row" }, "label": { "type": "string", "minLength": 1, "description": "the column drawn as the tree: indented by depth, with expand / collapse on a parent" }, "expanded": { "type": "boolean", "description": "whether parents start open; default true" } }, "description": "tree rows (dr-components 1.3.0): a P&L's accounts under their parents, each parent's number columns the sum of its children's unless the source answers the parent's own; sorting orders siblings" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row, summing the top rows' number columns (currency, number, a platform format string; a percent is left blank), pinned above or below the rows (dr-components 1.3.0); default none" }, "pin": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "the leading columns (fields) that stay in view while the grid scrolls sideways, in column order (dr-components 1.3.0)" }, "csv_params": { "type": "object", "additionalProperties": false, "properties": { "file_name": { "type": "string", "minLength": 1, "description": "the downloaded file's name; default the element id, .csv" } }, "description": "draws an Export CSV button (dr-grid-toolbar csvParams, dr-components 1.3.0): every row in the grid's order, parents and totals included, numbers raw, headers as shown" }, "selection": { "type": "object", "additionalProperties": false, "required": ["bulk_actions"], "properties": { "bulk_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens once over the selection, and its Confirm posts ids (the selected rows' keys) with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the bulk bar's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {ids} (the selected rows' keys); the selection clears and the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel), the selection's size in it; default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this bulk action, by the platform's /access answer; absent means every role (the handler's own requiresRole is the control). With no bulk action left for the reader, the box column is not drawn" } } }] }, "description": "the bulk bar's buttons, shown while rows are ticked: open a row dialog over the selection, or call a handler with {ids}" } }, "description": "a checkbox column (a header box ticks or clears the page's rows) and, while any row is ticked, a bar above the grid: N selected, the bulk actions, Clear selection. Only keyed rows can be ticked; ticks a search hides are dropped. A dialog action's on_confirm, like a call, is a custom handler that reads ids (dr-components 1.4.0)" }, "sticky_header": { "type": "boolean", "description": "the header row stays in view while the grid scrolls (thead sticky inside the grid's own scroll box, which is capped at the viewport's height); default false (dr-components 1.4.0)" }, "search": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "an inline search box above the grid that narrows the loaded rows to those whose named fields hold the typed text (case-insensitive); it is the grid's own, not a page param (dr-components 1.4.0)" }, "row_detail": { "enum": ["drawer"], "description": "drawer: clicking a row opens a side panel listing the row's columns (or detail_fields), field by field (on_row still runs when stated) (dr-components 1.4.0)" }, "detail_fields": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "row_detail only: the row fields the drawer lists, in order; default the grid's columns. A field that is no column is drawn as text (dr-components 1.4.0)" }, "page_size": { "type": "integer", "minimum": 5, "description": "rows per page; default 10" }, "sort": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the column sorted first" }, "dir": { "enum": ["asc", "desc"], "description": "default asc" } }, "description": "the order the rows start in; default the order the handler answered" }, "on_row": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {row} when a reader opens a row; the page re-reads after it" }, "row_actions": { "type": "array", "minItems": 1, "items": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["label", "dialog"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "dialog": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", "description": "the id of a dialog on this page whose values_from is row: it opens over the row, its inputs prefilled, and posts id with its fields" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }, { "type": "object", "additionalProperties": false, "required": ["label", "call"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the text on the row's button" }, "call": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "a handler called with {id, row} (id: the row's key column); the page re-reads after it" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked before the call runs (Confirm / Cancel); default none" }, "role": { "type": "string", "minLength": 1, "description": "the one app role that sees this action; absent means every role (the handler's own requiresRole is the control)" }, "when": { "type": "object", "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "description": "the states this action is drawn in: {column: [values]}, every column matched; a row without the column keeps it (dr-components 1.2.0, the rule an action in a list follows). Hides the button only: the handler still refuses" } } }] }, "description": "a button per row for each action, after the columns: open a dialog over the row, or call a handler with it" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the data_grid part's typed props, handed to it as PartProps.props" } } }, "dialog": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "trigger": { "type": "string", "minLength": 1, "description": "the text on the button that opens it; default the element's label, else its title \u2014 the compiler writes it into the page (foldDialogTriggers). A dialog with none of the three and no values_from row is refused (part_mode); a row dialog (values_from row) takes none, a row action opens it" }, "title": { "type": "string", "description": "the dialog's title; default the element's label" }, "description": { "type": "string", "description": "one line under the title" }, "confirm": { "type": "string", "description": "the text on the confirm button; default Confirm" }, "on_confirm": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Confirm calls with the fields of the inputs inside; without one, Confirm only closes" }, "values_from": { "enum": ["row"], "description": "row: a data_grid row action opens it over one row \u2014 the inputs inside start from that row's values, and Confirm posts id (the row's key) with their fields, to a save handler" }, "key": { "type": "string", "minLength": 1, "description": "with values_from row: the row column posted as id; default the grid's key, else id" } }, "description": "data-dr-props: the dialog part's typed props, handed to it as PartProps.props" } } }, "variance_table": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler whose rows are the lines" }, "props": { "type": "object", "additionalProperties": false, "required": ["row", "actual", "plan"], "properties": { "row": { "type": "string", "minLength": 1, "description": "the column naming each line; its value is the line's data-dr-row" }, "actual": { "type": "string", "minLength": 1, "description": "the column holding the actual figure" }, "plan": { "type": "string", "minLength": 1, "description": "the column holding the plan (budget) figure" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how actual, plan and variance read; default currency" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how actual, plan and variance read below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good: higher (the default) for revenue, lower for cost" }, "threshold": { "type": "object", "additionalProperties": false, "required": [], "properties": { "abs": { "type": "number", "minimum": 0, "description": "a variance smaller than this, in the figures' units, is neutral" }, "pct": { "type": "number", "minimum": 0, "description": "a variance share smaller than this fraction (0.05 is 5%) is neutral" } }, "description": "below both limits a variance is neutral rather than toned; default none" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the variance_table part's typed props, handed to it as PartProps.props" } } }, "toggle": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this switch writes \u2014 a hidden input of that name carries the raw value, and the form or dialog it sits in posts it; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (pages[].params[].name) this switch reads from ctx.params and moves with ctx.setParam \u2014 it writes no hidden input, and the page's readers re-read when it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts on; default off. Param mode reads ctx.params instead" }, "label": { "type": "string", "description": "the switch's label; default the page param's label (param mode), else the element's label" }, "description": { "type": "string", "description": "one line under the label" } }, "description": "data-dr-props: the toggle part's typed props, handed to it as PartProps.props" } } }, "control_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "columns": { "enum": [1, 2, 3, 4], "description": "how many controls sit side by side; default 1 (under 640px always 1)" }, "label_position": { "enum": ["top", "start"], "description": "top (the default): each label above its control; start: every label in one column before its control" }, "description": { "type": "string", "description": "one line above the controls" } }, "description": "data-dr-props: the control_group part's typed props, handed to it as PartProps.props" } } }, "callout": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer the rules read \u2014 a summary's measures, a KPI, or rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["rules"], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["when", "tone", "text"], "properties": { "when": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["path", "gte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "gte": { "type": "number", "description": "matches when the value is at least this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "lte"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "lte": { "type": "number", "description": "matches when the value is at most this" } } }, { "type": "object", "additionalProperties": false, "required": ["path", "eq"], "properties": { "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer: current_arr, kpi.value, rows.0.arr" }, "eq": { "type": ["string", "number", "boolean"], "description": "matches when the value is exactly this" } } }], "description": "the condition: one path and one of gte, lte, eq" }, "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } } }, "description": "tried in order; the first whose when holds is the sentence" }, "default": { "type": "object", "additionalProperties": false, "required": ["tone", "text"], "properties": { "tone": { "enum": ["positive", "neutral", "warning", "negative"], "description": "the callout's tone" }, "text": { "type": "string", "minLength": 1, "description": "the sentence, a template: {path} is the value as text, {path|currency}, {path|number} and {path|percent} a graded number (data-dr-field, data-dr-value, data-dr-format)" } }, "description": "what it says when no rule holds; default nothing" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } }, "description": "data-dr-props: the callout part's typed props, handed to it as PartProps.props" } } }, "scenario_columns": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose rows are the scenarios" }, "props": { "type": "object", "additionalProperties": false, "required": ["key", "label_field", "metrics"], "properties": { "key": { "type": "string", "minLength": 1, "description": "the column naming each row uniquely; its value is the column's data-dr-row" }, "label_field": { "type": "string", "minLength": 1, "description": "the column whose value heads each scenario's column" }, "metrics": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row column the line shows" }, "label": { "type": "string", "description": "the line's name; default the field, humanised" }, "format": { "anyOf": [{ "enum": ["currency", "number", "percent"] }, { "type": "string", "maxLength": 64, "pattern": "^(General|[^\\u0000-\\u001f]*[#0][^\\u0000-\\u001f]*)$", "description": "a platform values_format string, as a Datarails dashboard writes it: #,### $#,###.## #,###.#[kilo]k #,###;[Red](#,###); drawn by dr-fmt 2" }], "description": "how the value reads" }, "negative": { "enum": ["minus", "red_minus", "absolute", "red_absolute"], "description": "how the value reads below zero: the platform's negative-number mode (NegativeNumbersFormat), applied below zero only: minus -1,234 | red_minus in red | absolute (1,234) | red_absolute (1,234) in red; default minus" }, "scale": { "enum": ["units", "fraction"], "description": "percent only: units (the default) means 4 is 4%; fraction means 0.04 is 4%" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" }, "favorable": { "enum": ["higher", "lower"], "description": "which way is good for the delta's tone: higher (the default) or lower" } } }, "description": "the lines, in order" }, "max": { "type": "integer", "minimum": 1, "description": "how many rows may be ticked at once; default 3 (at most 6)" }, "baseline": { "type": "string", "minLength": 1, "description": "the key value of the row every delta is against; default the first row" }, "empty_text": { "type": "string", "description": "what the empty state says; default the registry's sentence, Nothing to show." } }, "description": "data-dr-props: the scenario_columns part's typed props, handed to it as PartProps.props" } } }, "button": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words on the button" }, "theme": { "enum": ["primary", "secondary", "ghost", "danger", "positive", "negative", "link"], "description": "the dr-button theme; default primary. danger and negative always ask before the call" }, "size": { "enum": ["regular", "small"], "description": "regular (32px, the platform pill) or small (28px); default regular" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph before the label" }, "icon_after": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph after the label" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler a click calls with {} (and reason, when asked); the page re-reads after it. Without one the button draws disabled" }, "confirm": { "type": "string", "minLength": 1, "description": 'the question asked first (Confirm / Cancel); default none, and "<label>?" on a danger or negative button, which always asks' }, "reason": { "enum": ["required", "optional"], "description": "a reason box in the confirm dialog, posted as reason; required keeps Confirm disabled until it holds text" }, "split": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label", "on_click"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the menu entry" }, "on_click": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler it calls with {}" }, "confirm": { "type": "string", "minLength": 1, "description": "the question asked first" } } }, "description": "more calls behind the button's arrow (dr-split-button)" }, "disabled": { "type": "boolean", "description": "drawn disabled; default false" } }, "description": "data-dr-props: the button part's typed props, handed to it as PartProps.props" } } }, "status": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the dr-status type (its colour); default default. A map entry that matches wins" }, "label": { "type": "string", "description": "the words; default the value at path" }, "icon": { "type": "string", "pattern": "^dr-icon-[a-z0-9-]+$", "description": "a dr-icon-* glyph in place of the dot" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "type"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "type": { "enum": ["info", "progress", "error", "warning", "success", "default"], "description": "the type it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 type and words, tried in order" } }, "description": "data-dr-props: the status part's typed props, handed to it as PartProps.props" } } }, "badge": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "the words; default the value at path" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the dr-badge colour; default stone" }, "size": { "enum": ["medium", "small"], "description": "default medium" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "map": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value", "color"], "properties": { "value": { "type": ["string", "number", "boolean"], "description": "the value at path this entry matches" }, "color": { "enum": ["stone", "water", "baby-blue", "baby-pink", "light-purple", "purple", "light-turquoise", "bright-green", "peach", "soft-coral", "pale-yellow", "pastel-olive", "powder-blue-grey", "muted-plum"], "description": "the colour it draws" }, "label": { "type": "string", "description": "the words it says; default the value" } } }, "description": "value \u2192 colour and words, tried in order" } }, "description": "data-dr-props: the badge part's typed props, handed to it as PartProps.props" } } }, "tag": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["month", "quarter", "year", "forecast"], "description": "what the value is" }, "value": { "type": ["string", "number"], "description": "the period: 2026-03, 2026-Q1, 2026, 3 (a forecast's closed months) or 3+9" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "fiscal": { "type": "boolean", "description": "year only: prefix FY; default true" } }, "description": "data-dr-props: the tag part's typed props, handed to it as PartProps.props" } } }, "empty_state": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["noData", "noPermissions", "noResults", "noNotifications", "custom"], "description": "the platform's empty-state type: its icon and default words; default custom" }, "title": { "type": "string", "description": "the title; default the type's" }, "description": { "type": "string", "description": "the line under it; default the type's" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; with on_action" }, "on_action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler the button calls with {}; the page re-reads after it" } }, "description": "data-dr-props: the empty_state part's typed props, handed to it as PartProps.props" } } }, "stepper": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": { "steps": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "description": "the value current (or the value at path) names this step by" }, "label": { "type": "string", "minLength": 1, "description": "the step's name" }, "description": { "type": "string", "description": "one line under the name" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler that moves the flow on from this step, called with {step: <id>} when it is current; every step but the last needs one (A3.29)" }, "action_label": { "type": "string", "minLength": 1, "description": "the button's words; default Continue" } } }, "description": "the steps, in order" }, "current": { "type": "string", "minLength": 1, "description": "the id of the step the flow is at; default the value at path, else the first step" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "vertical": { "type": "boolean", "description": "steps top to bottom; default left to right" } }, "description": "data-dr-props: the stepper part's typed props, handed to it as PartProps.props" } } }, "alert": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "theme": { "enum": ["success", "error", "bold-error", "warning", "info", "tip"], "description": "the dr-alert type; default info" }, "title": { "type": "string", "description": "the bold first line" }, "text": { "type": "string", "minLength": 1, "description": "the notice" } }, "description": "data-dr-props: the alert part's typed props, handed to it as PartProps.props" } } }, "checkbox": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this box writes (true / false); exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the toggle page param it moves; exactly one of field and param" }, "value": { "type": "boolean", "description": "field mode: whether it starts ticked; default false. Param mode reads ctx.params" }, "label": { "type": "string", "description": "the words beside the box; default the page param's label, else the element's label" }, "description": { "type": "string", "description": "a line under it" } }, "description": "data-dr-props: the checkbox part's typed props, handed to it as PartProps.props" } } }, "radio_group": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this choice writes; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the select (or period / month) page param it moves; exactly one of field and param" }, "options": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["value"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees; default the value" } } }, "description": "the options, in order; param mode: default the page param's values" }, "value": { "type": "string", "description": "field mode: the option it starts on; default none" }, "label": { "type": "string", "description": "the group's label; default the page param's label, else the element's label" }, "direction": { "enum": ["vertical", "horizontal"], "description": "default vertical" } }, "description": "data-dr-props: the radio_group part's typed props, handed to it as PartProps.props" } } }, "file_upload": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "the payload key the stored file is written under, as {upload, filename, mime_type, size}" }, "accept": { "type": "string", "description": "the file types the picker offers, as an input accept list: .pdf,.xlsx; default any" }, "max_size_mb": { "type": "number", "minimum": 0, "description": "a larger file is refused before it is sent (client-side only: the platform's own limit still answers 413); 0 or less is no limit of its own; default the platform's own limit" }, "label": { "type": "string", "description": "the label above the zone; default the element's label" }, "dropzone_text": { "type": "string", "description": "the zone's first line; default Drop a file here, or browse" }, "dropzone_subtext": { "type": "string", "description": "the zone's second line; default the accepted types" }, "on_upload": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler called with {<field>: {upload, filename, mime_type, size}} once the file is stored (the parser hand-off); the page re-reads after it. Without one the value waits for the dialog around it" } }, "description": "data-dr-props: the file_upload part's typed props, handed to it as PartProps.props" } } }, "skeleton": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "appearance": { "enum": ["rectangle", "title-line", "text-line", "chip", "avatar"], "description": "the shape; default rectangle" }, "count": { "type": "integer", "minimum": 1, "description": "how many, one under the other; default 1 (at most 12)" }, "width": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|%|rem)$", "description": "a CSS length: 100%, 240px, 12rem; default the appearance's" }, "height": { "type": "string", "pattern": "^\\d+(\\.\\d+)?(px|rem)$", "description": "a CSS length; default the appearance's" } }, "description": "data-dr-props: the skeleton part's typed props, handed to it as PartProps.props" } } }, "progress": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the handler (or data.sources entry) whose answer `path` reads \u2014 a summary's measures, a record, or rows (rows.0.status)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "progress": { "type": "number", "minimum": 0, "description": "how much is done; default the value at path" }, "total": { "type": "number", "minimum": 0, "description": "what done means; default the value at total_path, else 100" }, "path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path into the source's answer whose value the part shows: status, kpi.state, rows.0.status" }, "total_path": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z0-9_]+)*$", "description": "a dotted path to the total in the source's answer" }, "show_value": { "type": "boolean", "description": "the percent beside the bar; default true" }, "type": { "enum": ["light", "dark"], "description": "the dr-progress-bar type; default light" }, "label": { "type": "string", "description": "the words above the bar; default the element's label" } }, "description": "data-dr-props: the progress part's typed props, handed to it as PartProps.props" } } }, "accordion": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "description": "the section's header" }, "open": { "type": "boolean", "description": "whether it starts open; default false" } } }, "description": "the sections, in order: child i of the element fills item i" }, "multi": { "type": "boolean", "description": "several may be open at once; default false" }, "theme": { "enum": ["regular", "borderless"], "description": "the dr-accordion theme; default regular" } }, "description": "data-dr-props: the accordion part's typed props, handed to it as PartProps.props" } } }, "tooltip_info": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1, "description": "the explanation" }, "label": { "type": "string", "description": "words before the mark; default none" }, "position": { "enum": ["top", "bottom", "left", "right"], "description": "where the explanation opens; default top" } }, "description": "data-dr-props: the tooltip_info part's typed props, handed to it as PartProps.props" } } }, "filter_bar": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["filters"], "properties": { "filters": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month", "text", "number-range"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param); dr-components 1.4.0, layout inline only: text (a text box over a text param), number-range (Min / Max over param_min and param_max). Every kind but number-range needs param" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused; a text param for text (dr-components 1.4.0); a date param for a date-range with mode day" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param; date with mode day)" }, "param_min": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Min box moves (dr-components 1.4.0)" }, "param_max": { "type": "string", "minLength": 1, "description": "number-range only: the number param the Max box moves (dr-components 1.4.0)" }, "mode": { "enum": ["day"], "description": "date-range only, layout inline: day picks two days (YYYY-MM-DD) over two date params, drawn as two date boxes; without it the range is months or periods, by its params' kind (dr-components 1.4.0)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "placeholder": { "type": "string", "description": "text only: the box's placeholder; default the label (dr-components 1.4.0)" }, "placeholder_min": { "type": "string", "description": "number-range only: the Min box's placeholder; default Min (dr-components 1.4.0)" }, "placeholder_max": { "type": "string", "description": "number-range only: the Max box's placeholder; default Max (dr-components 1.4.0)" }, "mandatory": { "type": "boolean", "description": "always shown, never under More, no remove (\xD7); default false. A filter is also shown when it starts active" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } } }, "description": "the filters, in order: each a chip over a page param" }, "layout": { "enum": ["chips", "inline"], "description": "chips (the default): a chip per filter, its editor in a popover, optional ones under More; inline: every filter drawn open in one row \u2014 dr-input boxes, dr-select lists, two date or number boxes for a range \u2014 with a Clear filters button at the end that resets the filters that narrow (with clearable); More, mandatory and the chips' remove do not apply (dr-components 1.4.0)" }, "filters_label": { "type": "string", "description": "words before the chips (Filters:); default none" }, "more_label": { "type": "string", "description": "the button that adds an optional filter that is not shown; default More" }, "add_filters_title": { "type": "string", "description": "the title of More's list; default Add Filters" }, "clear_tooltip": { "type": "string", "description": "the clear-all button's name; default Clear filters" }, "clearable": { "type": "boolean", "description": "draws the clear-all button while any filter narrows; default true" } }, "description": "data-dr-props: the filter_bar part's typed props, handed to it as PartProps.props" } } }, "filter_chip": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["kind", "param"], "properties": { "kind": { "enum": ["option", "date-range", "fiscal-month"], "description": "the dr-filter-bar kind: option (a select over the param, one value or many with multiple), date-range (From/To over param and param_to), fiscal-month (a fiscal month over the param)" }, "param": { "type": "string", "minLength": 1, "description": "the page param (pages[].params[].name) this filter reads from ctx.params and moves with ctx.setParam: a select, multi (multiple), period or month param for option; the From param (period or month) for date-range; a month or period param for fiscal-month. A filter bound to no declared param is refused" }, "param_to": { "type": "string", "minLength": 1, "description": "date-range only: the To param (period or month, the same kind as param)" }, "label": { "type": "string", "description": "the chip's label (Label: value); default the page param's label, else its name" }, "removable": { "type": "boolean", "description": "draws a remove (\xD7) that clears the filter; default false" }, "disabled": { "type": "boolean", "description": "drawn but not interactive; default false" }, "multiple": { "type": "boolean", "description": "option only: many values (a multi param), default false: one value" }, "searchable": { "type": "boolean", "description": "option only: a search box above the list; default false" }, "group_by": { "type": "string", "minLength": 1, "description": "option only: the key each option is grouped under (group, on a stated option)" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["value", "label"], "properties": { "value": { "type": "string", "minLength": 1, "description": "what is stored" }, "label": { "type": "string", "description": "what the reader sees" }, "group": { "type": "string", "description": 'the heading the option sits under when the list is grouped (group_by: "group")' } } }, "description": "option only: the options; default the page param's declared values" }, "label_from": { "type": "string", "description": "date-range only: the From picker's label; default From" }, "label_to": { "type": "string", "description": "date-range only: the To picker's label; default To" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "fiscal-month only: how many months after January the fiscal year starts (3: April); default 0" }, "fiscal_year_back": { "type": "boolean", "description": "fiscal-month only: the fiscal year is named by the calendar year it starts in; default false: by the year it ends in" } }, "description": "data-dr-props: the filter_chip part's typed props, handed to it as PartProps.props" } } }, "date_range": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the From date is written under (a hidden input of that name), with field_to; exactly one of field and param" }, "field_to": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key the To date is written under; required with field" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param the From date moves (a period or month param), with param_to; exactly one of field and param" }, "param_to": { "type": "string", "minLength": 1, "description": "param mode: the page param the To date moves, the same kind as param; required with param" }, "mode": { "enum": ["date", "month"], "description": "date (the default) stores YYYY-MM-DD; month stores YYYY-MM. Param mode over month params is month" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the From date it starts on; default none" }, "value_to": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$", "description": "field mode: the To date it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the From param's label (param mode), else the element's label" }, "label_from": { "type": "string", "description": "the From picker's label; default From" }, "label_to": { "type": "string", "description": "the To picker's label; default To" }, "placeholder_from": { "type": "string", "description": "what From says before a pick; default Select\u2026" }, "placeholder_to": { "type": "string", "description": "what To says before a pick; default Select\u2026" }, "column": { "type": "boolean", "description": "From above To instead of side by side; default false" } }, "description": "data-dr-props: the date_range part's typed props, handed to it as PartProps.props" } } }, "fiscal_month": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "field mode: the payload key this picker writes, the calendar month as YYYY-MM; exactly one of field and param" }, "param": { "type": "string", "minLength": 1, "description": "param mode: the page param (a month or period param) it moves with the calendar month as YYYY-MM; exactly one of field and param" }, "fiscal_year_months_modifier": { "type": "integer", "minimum": 0, "description": "how many months after January the fiscal year starts (3: April, so April is the fiscal year's first month); default 0, a calendar year" }, "fiscal_year_back": { "type": "boolean", "description": "the fiscal year is named by the calendar year it starts in; default false: by the year it ends in (an April 2026 start is FY2027)" }, "value": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "description": "field mode: the calendar month it starts on; default none" }, "label": { "type": "string", "description": "the control's label; default the page param's label (param mode), else the element's label" }, "placeholder": { "type": "string", "description": "what the control says before a pick; default Select\u2026" } }, "description": "data-dr-props: the fiscal_month part's typed props, handed to it as PartProps.props" } } }, "search_input": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "required": ["on_submit"], "properties": { "placeholder": { "type": "string", "description": "the box's placeholder; default Search\u2026" }, "button": { "type": "string", "minLength": 1, "description": "the words on the filled dr-button after the box; default Search" }, "on_submit": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the handler Enter or the button calls with {question: <the trimmed text>}; the page re-reads after it, and a refusal is one line under the box" }, "param": { "type": "string", "minLength": 1, "description": "a text page param (pages[].params[].name, kind text) set to the text on submit, settled, before the call; default none" } }, "description": "data-dr-props: the search_input part's typed props, handed to it as PartProps.props" } } }, "split_pane": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "props": { "type": "object", "additionalProperties": false, "properties": { "ratio": { "type": "array", "minItems": 2, "items": { "type": "number", "minimum": 1 }, "description": "the two panes' shares of the width, left then right ([55, 45]); exactly two; default [50, 50]" }, "resizable": { "type": "boolean", "description": "draw a divider the reader drags, or moves with the arrow keys (role=separator); default false" }, "remember": { "type": "boolean", "description": "keep the width the reader set, per page, in their browser (localStorage); default false" }, "min": { "type": "array", "minItems": 2, "items": { "type": "integer", "minimum": 0 }, "description": "each pane's narrowest width in px, left then right; default [240, 240]" } }, "description": "data-dr-props: the split_pane part's typed props, handed to it as PartProps.props" } } }, "file_viewer": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader whose row holds the file" }, "props": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's file column: {url, filename, mime_type, size} as the platform reads a file column back, or the stored reference" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "height": { "type": "integer", "minimum": 120, "description": "the viewer's height in px; default 640" }, "toolbar": { "type": "boolean", "description": "the bar over the file: its name and a download link; default true" } }, "description": "data-dr-props: the file_viewer part's typed props, handed to it as PartProps.props" } } }, "line_grid": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "entity": { "type": "string", "description": "data-dr-entity: the child table the rows belong to" }, "source": { "type": "string", "description": "data-dr-source: the reader of the child rows" }, "props": { "type": "object", "additionalProperties": false, "required": ["columns", "action"], "properties": { "columns": { "type": "array", "minItems": 1, "items": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the child row's key the column edits" }, "label": { "type": "string", "description": "the header; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" }, "editable": { "type": "boolean", "description": "whether the reader types in it; default true" }, "options": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "the values a select cell offers; default a typed cell" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "currency only: the ISO code; default USD" } } }] }, "description": "the columns, in order: a field name, or {field, label, format, editable, options, currency}" }, "key": { "type": "string", "minLength": 1, "description": "the child row's identity column, posted with a kept row; default id" }, "add_row": { "type": "boolean", "description": "draw Add a line, which adds a blank row at the bottom; default false" }, "remove_row": { "anyOf": [{ "type": "boolean" }, { "enum": ["confirm"] }], "description": "draw a \xD7 on each row; confirm asks first; default false" }, "totals": { "enum": ["top", "bottom", "none"], "description": "a totals row over the number and currency columns, above or below the rows; default none" }, "action": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "the custom handler Save calls with {id: <the parent row's key>, rows: [...]}; the lines re-read after it" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "empty_text": { "type": "string", "description": "the sentence while there are no rows; default No lines yet." } }, "description": "data-dr-props: the line_grid part's typed props, handed to it as PartProps.props" } } }, "document": { "type": "object", "additionalProperties": false, "required": ["props"], "properties": { "id": { "type": "string", "description": "data-dr-id: the element's stable id, unique on its page" }, "label": { "type": "string", "description": "data-dr-label: the title a reader sees" }, "role": { "type": "string", "description": "data-dr-role: the app role this element is meant for; absent means every role" }, "span": { "type": "integer", "description": "data-dr-span: columns of the kit's twelve" }, "section": { "type": "string", "description": "the page section the element sits in (the nearest data-dr-section)" }, "source": { "type": "string", "description": "data-dr-source: the reader of the document's row" }, "props": { "type": "object", "additionalProperties": false, "required": ["sections"], "properties": { "title": { "type": "string", "description": "the words on the Print bar, left of the button; default none (the card's title is the element's label)" }, "page_size": { "enum": ["A4", "Letter"], "description": "the paper it prints on; default A4" }, "bind": { "enum": ["selected"], "description": `selected: read the row the page's selected row names (dr-app-runtime 1.9.1's ctx.selected, written by a grid or list row click) from source, by its key; the part must sit at the page root, in a root split_pane or panel, or inside a form or detail with bind: "selected" (part_bind); default none: the one row source answers` }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "the ISO code its currency figures read in; default USD" }, "sections": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["header", "table", "text", "totals", "terms"], "description": "what the section is" }, "title": { "type": "string", "description": "header: the big title; table, text, terms: the section's heading" }, "title_field": { "type": "string", "minLength": 1, "description": "header: the row's key whose value is the title" }, "label": { "type": "string", "description": "header: the word on the right (Purchase order)" }, "fields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "header: the row's values listed under the title" }, "columns": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["field"], "properties": { "field": { "type": "string", "minLength": 1, "description": "the row's key" }, "label": { "type": "string", "description": "the words before it; default the field, humanised" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "table: its columns" }, "source": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "description": "table: the reader of the child rows, called with {<its by>: key}" }, "field": { "type": "string", "minLength": 1, "description": "table: the row's array of child rows; text, terms: the row's key holding the words" }, "text": { "type": "string", "description": "text, terms: the words" }, "lines": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["label"], "properties": { "label": { "type": "string", "minLength": 1, "description": "the words" }, "field": { "type": "string", "minLength": 1, "description": "the row's key holding the figure" }, "sum": { "type": "string", "minLength": 1, "description": "a table column whose figures it adds" }, "format": { "enum": ["currency", "number", "percent", "text", "date"], "description": "how the value reads; default text" } } }, "description": "totals: its lines, each one figure" }, "page_break": { "type": "boolean", "description": "printed, start this section on a new page" } } }, "description": "the document, top to bottom" } }, "description": "data-dr-props: the document part's typed props, handed to it as PartProps.props" } } } });
|
|
21024
21275
|
var CONTROLS_TYPES2 = Object.freeze(["slider"]);
|
|
21025
|
-
var PARTS2 = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "tabs": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": ["tab_panel"], "events": {}, "empty": null }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": {}, "empty": null }, "select": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": null }, "date_picker": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "data_grid": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "inbox", "custom"], "as": "rows" }, "children": "none", "events": { "on_row": ["custom", "decide"], "on_row_action": ["remove", "decide", "custom", "submit", "save"] }, "empty": "Nothing to show." }, "dialog": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": { "on_confirm": ["custom", "save", "submit", "decide"] }, "empty": null }, "variance_table": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "toggle": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": "none", "events": {}, "empty": null }, "control_group": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": ["number_input", "select", "date_picker", "toggle", "slider", "checkbox", "radio_group", "date_range", "fiscal_month"], "events": {}, "empty": null }, "callout": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "button": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_click": ["custom", "submit"] }, "empty": null }, "status": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "badge": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "tag": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "empty_state": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_action": ["custom", "submit"] }, "empty": null }, "stepper": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": { "on_step": ["custom", "submit"] }, "empty": null }, "alert": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "checkbox": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "radio_group": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "file_upload": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_upload": ["custom", "save", "submit"] }, "empty": null }, "skeleton": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "progress": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "accordion": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "any", "events": {}, "empty": null }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "date_range": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "search_input": { "module": "dr-components", "since": "1.4.0", "reads": null, "children": "none", "events": { "on_submit": ["custom"] }, "empty": null } });
|
|
21026
|
-
var LIBRARY_PARTS2 = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tabs": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "select": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "date_picker": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "data_grid": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "dialog": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "variance_table": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "toggle": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "control_group": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "callout": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "stage": "contract" }, "button": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "status": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "badge": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tag": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "empty_state": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "stepper": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "alert": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "checkbox": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "radio_group": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "file_upload": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "skeleton": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "progress": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "accordion": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "date_range": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "search_input": { "module": "dr-components", "since": "1.4.0", "stage": "contract" }, "split_pane": { "module": "dr-components", "since": "1.5.0", "stage": "
|
|
21027
|
-
var TITLED_TYPES2 = Object.freeze(["widget", "form", "list", "queue", "stat", "chart", "custom", "number_input", "select", "date_picker", "dialog", "date_range", "fiscal_month"]);
|
|
21276
|
+
var PARTS2 = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "tabs": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": ["tab_panel"], "events": {}, "empty": null }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": {}, "empty": null }, "select": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": null }, "date_picker": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "data_grid": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "inbox", "custom"], "as": "rows" }, "children": "none", "events": { "on_row": ["custom", "decide"], "on_row_action": ["remove", "decide", "custom", "submit", "save"] }, "empty": "Nothing to show." }, "dialog": { "module": "dr-components", "since": "1.0.0", "reads": null, "children": "any", "events": { "on_confirm": ["custom", "save", "submit", "decide"] }, "empty": null }, "variance_table": { "module": "dr-components", "since": "1.0.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "toggle": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": "none", "events": {}, "empty": null }, "control_group": { "module": "dr-components", "since": "1.1.0", "reads": null, "children": ["number_input", "select", "date_picker", "toggle", "slider", "checkbox", "radio_group", "date_range", "fiscal_month"], "events": {}, "empty": null }, "callout": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "reads": null, "children": "none", "events": {}, "empty": null }, "button": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_click": ["custom", "submit"] }, "empty": null }, "status": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "badge": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "tag": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "empty_state": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_action": ["custom", "submit"] }, "empty": null }, "stepper": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": { "on_step": ["custom", "submit"] }, "empty": null }, "alert": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "checkbox": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "radio_group": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "file_upload": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": { "on_upload": ["custom", "save", "submit"] }, "empty": null }, "skeleton": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "progress": { "module": "dr-components", "since": "1.2.0", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "accordion": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "any", "events": {}, "empty": null }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "date_range": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "reads": null, "children": "none", "events": {}, "empty": null }, "search_input": { "module": "dr-components", "since": "1.4.0", "reads": null, "children": "none", "events": { "on_submit": ["custom"] }, "empty": null }, "split_pane": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "any", "events": {}, "empty": null }, "file_viewer": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "none", "events": {}, "empty": null }, "line_grid": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "none", "events": { "on_save": ["custom"] }, "empty": null }, "document": { "module": "dr-components", "since": "1.5.0", "reads": null, "children": "none", "events": {}, "empty": null } });
|
|
21277
|
+
var LIBRARY_PARTS2 = Object.freeze({ "number_input": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tabs": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "tab_panel": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "select": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "date_picker": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "data_grid": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "dialog": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "variance_table": { "module": "dr-components", "since": "1.0.0", "stage": "contract" }, "toggle": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "control_group": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "callout": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "scenario_columns": { "module": "dr-components", "since": "1.1.0", "stage": "contract" }, "slider": { "module": "dr-components-controls", "since": "1.0.0", "stage": "contract" }, "button": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "status": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "badge": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tag": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "empty_state": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "stepper": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "alert": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "checkbox": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "radio_group": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "file_upload": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "skeleton": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "progress": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "accordion": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "tooltip_info": { "module": "dr-components", "since": "1.2.0", "stage": "contract" }, "filter_bar": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "filter_chip": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "date_range": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "fiscal_month": { "module": "dr-components", "since": "1.3.0", "stage": "contract" }, "search_input": { "module": "dr-components", "since": "1.4.0", "stage": "contract" }, "split_pane": { "module": "dr-components", "since": "1.5.0", "stage": "contract" }, "file_viewer": { "module": "dr-components", "since": "1.5.0", "stage": "contract" }, "line_grid": { "module": "dr-components", "since": "1.5.0", "stage": "contract" }, "document": { "module": "dr-components", "since": "1.5.0", "stage": "contract" } });
|
|
21278
|
+
var TITLED_TYPES2 = Object.freeze(["widget", "form", "list", "queue", "stat", "chart", "custom", "number_input", "select", "date_picker", "dialog", "date_range", "fiscal_month", "panel"]);
|
|
21028
21279
|
var CONTROL_PARTS2 = Object.freeze(["number_input", "select", "date_picker", "toggle", "control_group", "slider", "checkbox", "radio_group", "date_range", "fiscal_month"]);
|
|
21029
21280
|
|
|
21030
21281
|
// ../flows/appspace-builder/kit/contract/bundleScan.mjs
|
|
@@ -22323,8 +22574,14 @@ function partCalls2(element) {
|
|
|
22323
22574
|
for (const column of Array.isArray(typed.columns) ? typed.columns : []) {
|
|
22324
22575
|
if (column && typeof column === "object" && column.cell === "toggle" && named6(column.call)) out.push(column.call);
|
|
22325
22576
|
}
|
|
22577
|
+
if (element.type === "line_grid" && named6(typed.action)) out.push(typed.action);
|
|
22326
22578
|
return out;
|
|
22327
22579
|
}
|
|
22580
|
+
function partReads2(element) {
|
|
22581
|
+
const typed = element.props?.props ?? {};
|
|
22582
|
+
if (element.type !== "document") return [];
|
|
22583
|
+
return (Array.isArray(typed.sections) ? typed.sections : []).filter((section) => section && typeof section === "object" && named6(section.source)).map((section) => section.source);
|
|
22584
|
+
}
|
|
22328
22585
|
function isPart3(element) {
|
|
22329
22586
|
return typeof element?.type === "string" && Object.prototype.hasOwnProperty.call(PARTS2, element.type);
|
|
22330
22587
|
}
|
|
@@ -22681,6 +22938,7 @@ function bindComponents2(elements, { backend = null, model = null } = {}) {
|
|
|
22681
22938
|
if (named6(props.action)) actionRow(props.action).components.push(uid);
|
|
22682
22939
|
if (named6(props.source)) actionRow(props.source).reads.push(uid);
|
|
22683
22940
|
if (isPart3(element)) for (const name of partCalls2(element)) actionRow(name).components.push(uid);
|
|
22941
|
+
if (isPart3(element)) for (const name of partReads2(element)) actionRow(name).reads.push(uid);
|
|
22684
22942
|
if (entity !== null && element.type !== "field") entityRow(entity).components.push(uid);
|
|
22685
22943
|
if (!named6(props.field)) continue;
|
|
22686
22944
|
const column = entity === null ? null : (tables[entity]?.columns ?? {})[props.field] ?? null;
|
|
@@ -23007,7 +23265,7 @@ function backendSection2(app, manifest, pages, elements) {
|
|
|
23007
23265
|
attributed.add(name);
|
|
23008
23266
|
}
|
|
23009
23267
|
if (!isPart3(element)) continue;
|
|
23010
|
-
for (const name of partCalls2(element)) {
|
|
23268
|
+
for (const name of [...partCalls2(element), ...partReads2(element)]) {
|
|
23011
23269
|
record2(name, "attribute");
|
|
23012
23270
|
attributed.add(name);
|
|
23013
23271
|
}
|
|
@@ -24262,6 +24520,13 @@ function checkComponents(app, contract, contractError) {
|
|
|
24262
24520
|
}
|
|
24263
24521
|
};
|
|
24264
24522
|
for (const uid of uids) if (isPart4(elements[uid])) refsIn(elements[uid].props?.props);
|
|
24523
|
+
for (const uid of uids) {
|
|
24524
|
+
if (elements[uid]?.type !== "document") continue;
|
|
24525
|
+
const sections = elements[uid].props?.props?.sections;
|
|
24526
|
+
for (const section of Array.isArray(sections) ? sections : []) {
|
|
24527
|
+
if (typeof section?.source === "string" && section.source !== "") attributeRefs.add(section.source);
|
|
24528
|
+
}
|
|
24529
|
+
}
|
|
24265
24530
|
for (const page of Array.isArray(contract.pages) ? contract.pages : []) {
|
|
24266
24531
|
const source = page?.nav?.counts?.source;
|
|
24267
24532
|
if (typeof source === "string" && source !== "") attributeRefs.add(source);
|
|
@@ -25335,6 +25600,9 @@ function checkUx(app, contract, contractError) {
|
|
|
25335
25600
|
message: `form "${nameOf5(uid)}" on ${el.page} creates ${table} rows inline, on the page whose ${elements[listing].type} "${nameOf5(listing)}" lists them (create-form-inline). Make the create a toolbar button that opens a dialog holding the form \u2014 {"type": "dialog", "props": {"id": "${nameOf5(uid)}_dialog", "label": "${label}", "props": {"title": "${label}", "confirm": "Create"}}, "children": ["<this form>"]} \u2014 the dialog's confirm submits the form, checks its required fields, closes, shows a toast and re-reads the list; a long record can open in a drawer instead`
|
|
25336
25601
|
});
|
|
25337
25602
|
}
|
|
25603
|
+
const bindsOn = new Set(
|
|
25604
|
+
uids.filter((one) => elements[one]?.props?.bind === "selected" || elements[one]?.props?.props?.bind === "selected").map((one) => elements[one].page)
|
|
25605
|
+
);
|
|
25338
25606
|
for (const uid of uids) {
|
|
25339
25607
|
const el = elements[uid];
|
|
25340
25608
|
if (!ROWS.has(el?.type)) continue;
|
|
@@ -25349,11 +25617,11 @@ function checkUx(app, contract, contractError) {
|
|
|
25349
25617
|
if (el.type === "data_grid") {
|
|
25350
25618
|
const typed = isPlainObject14(el.props?.props) ? el.props.props : {};
|
|
25351
25619
|
shown2 = new Set((Array.isArray(typed.columns) ? typed.columns : []).map((c) => isPlainObject14(c) ? c.field : c).filter(said));
|
|
25352
|
-
opens3 = Boolean(said(typed.on_row)) || Array.isArray(typed.row_actions) && typed.row_actions.length > 0;
|
|
25620
|
+
opens3 = Boolean(said(typed.on_row)) || Array.isArray(typed.row_actions) && typed.row_actions.length > 0 || typed.row_detail === "drawer" || bindsOn.has(el.page);
|
|
25353
25621
|
} else {
|
|
25354
25622
|
const kids = kidsOf(uid).map((k) => elements[k]);
|
|
25355
25623
|
shown2 = new Set(kids.filter((k) => k.type === "field").map((k) => k.props?.field).filter(said));
|
|
25356
|
-
opens3 = kids.some((k) => k.type === "detail" || k.type === "form" || k.type === "action");
|
|
25624
|
+
opens3 = kids.some((k) => k.type === "detail" || k.type === "form" || k.type === "action") || bindsOn.has(el.page);
|
|
25357
25625
|
}
|
|
25358
25626
|
if (opens3) continue;
|
|
25359
25627
|
const hidden = fields.filter((c) => !shown2.has(c));
|
|
@@ -26104,7 +26372,7 @@ var kit_default2 = {
|
|
|
26104
26372
|
contract: "contract/extract.mjs",
|
|
26105
26373
|
charts: "echarts@5.6.0",
|
|
26106
26374
|
appWidgets: "dr-app-widgets@1.2.0",
|
|
26107
|
-
appComponents: "dr-components@1.
|
|
26375
|
+
appComponents: "dr-components@1.5.0",
|
|
26108
26376
|
appControls: "dr-components-controls@1.2.0"
|
|
26109
26377
|
};
|
|
26110
26378
|
|