@datarails-ai/dr-appspace-cli 0.10.17 → 0.10.18

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.
Files changed (2) hide show
  1. package/dist/cli.js +86 -19
  2. 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.10.17",
16
+ version: "0.10.18",
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-01T11:50:28.550Z";
60
+ var BUILD_TIME = "2026-10-01T12:55:16.173Z";
61
61
  function formatBuildTime(iso) {
62
62
  if (iso === "") return "";
63
63
  const d = new Date(iso);
@@ -5928,6 +5928,7 @@ __export(components_gen_exports, {
5928
5928
  PLATFORM_FORMAT: () => PLATFORM_FORMAT,
5929
5929
  PLATFORM_NUMBERS: () => PLATFORM_NUMBERS,
5930
5930
  PROPS_SCHEMAS: () => PROPS_SCHEMAS,
5931
+ PROPS_SINCE: () => PROPS_SINCE,
5931
5932
  REGISTRY_VERSION: () => REGISTRY_VERSION,
5932
5933
  ROW_ACTION_WHEN: () => ROW_ACTION_WHEN,
5933
5934
  SMART_COMPARES: () => SMART_COMPARES,
@@ -5937,7 +5938,7 @@ __export(components_gen_exports, {
5937
5938
  TITLED_TYPES: () => TITLED_TYPES,
5938
5939
  WIDGET_KINDS: () => WIDGET_KINDS
5939
5940
  });
5940
- var REGISTRY_VERSION = Object.freeze(8);
5941
+ var REGISTRY_VERSION = Object.freeze(9);
5941
5942
  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"]);
5942
5943
  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"]);
5943
5944
  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"]);
@@ -5953,6 +5954,7 @@ var NEGATIVE_MODES = Object.freeze(["minus", "red_minus", "absolute", "red_absol
5953
5954
  var FORMAT_PATTERNS = Object.freeze({ "currency": "$#,###", "number": "#,###", "percent": '#,###.#"%"' });
5954
5955
  var PLATFORM_NUMBERS = Object.freeze({ "dr-app-runtime": "1.8.0", "dr-app-widgets": "1.2.0", "dr-components": "1.2.0", "dr-components-controls": "1.1.0" });
5955
5956
  var ROW_ACTION_WHEN = Object.freeze({ "dr-components": "1.2.0" });
5957
+ 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" } });
5956
5958
  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" });
5957
5959
  var STAT_TONES = Object.freeze(["default", "positive", "warning", "negative"]);
5958
5960
  var WIDGET_KINDS = Object.freeze(["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative"]);
@@ -5962,9 +5964,9 @@ var APP_KIND_READS = Object.freeze({ "waterfall": ["breakdown", "series"], "wate
5962
5964
  var SMART_COMPARES = Object.freeze(["BvA", "AvF", "vs_prev_period"]);
5963
5965
  var PLATFORM_FINANCE = Object.freeze({ "dr-app-widgets": "1.2.0" });
5964
5966
  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"]);
5965
- 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" } } }, "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" }, "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" } }, "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" } } }, "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)" }, "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" } } } });
5966
- 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"]);
5967
- 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" } } }, "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" }, "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" } }, "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" } } }, "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)" }, "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" } } } });
5967
+ 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)" } } }, "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" }, "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" } } } });
5968
+ 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"]);
5969
+ 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)" } } }, "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" }, "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", "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" }, "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" }, "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" } } } });
5968
5970
  var CONTROLS_TYPES = Object.freeze(["slider"]);
5969
5971
  var PARTS = Object.freeze({ "number_input": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "tabs": { "module": "dr-components", "reads": null, "children": ["tab_panel"], "events": {}, "empty": null }, "tab_panel": { "module": "dr-components", "reads": null, "children": "any", "events": {}, "empty": null }, "select": { "module": "dr-components", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": null }, "date_picker": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "data_grid": { "module": "dr-components", "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", "reads": null, "children": "any", "events": { "on_confirm": ["custom", "save", "submit", "decide"] }, "empty": null }, "variance_table": { "module": "dr-components", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "toggle": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "control_group": { "module": "dr-components", "reads": null, "children": ["number_input", "select", "date_picker", "toggle", "slider", "checkbox", "radio_group"], "events": {}, "empty": null }, "callout": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "scenario_columns": { "module": "dr-components", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "slider": { "module": "dr-components-controls", "reads": null, "children": "none", "events": {}, "empty": null }, "button": { "module": "dr-components", "reads": null, "children": "none", "events": { "on_click": ["custom", "submit"] }, "empty": null }, "status": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "badge": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "tag": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "empty_state": { "module": "dr-components", "reads": null, "children": "none", "events": { "on_action": ["custom", "submit"] }, "empty": null }, "stepper": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": { "on_step": ["custom", "submit"] }, "empty": null }, "alert": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "checkbox": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "radio_group": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "file_upload": { "module": "dr-components", "reads": null, "children": "none", "events": { "on_upload": ["custom", "save", "submit"] }, "empty": null }, "skeleton": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "progress": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "accordion": { "module": "dr-components", "reads": null, "children": "any", "events": {}, "empty": null }, "tooltip_info": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null } });
5970
5972
  var TITLED_TYPES = Object.freeze(["widget", "form", "list", "queue", "stat", "chart", "custom", "number_input", "select", "date_picker", "dialog"]);
@@ -6026,6 +6028,7 @@ var OWN_RULES = /* @__PURE__ */ new Set(["filter", "args", "props", "declares"])
6026
6028
  var ARGS_RULE_ATTRIBUTES = Object.freeze(STRUCTURED_ATTRIBUTES2.filter(([, prop]) => !OWN_RULES.has(prop)));
6027
6029
  var WHEN_ATTR = STRUCTURED_ATTRIBUTES2.find(([, prop]) => prop === "when")?.[0];
6028
6030
  var ROW_ACTION_WHEN2 = ROW_ACTION_WHEN;
6031
+ var PROPS_SINCE2 = PROPS_SINCE;
6029
6032
  function parseFilter(raw) {
6030
6033
  const filter = {};
6031
6034
  for (const part of String(raw).split(/[;,]/)) {
@@ -10433,9 +10436,9 @@ var contract_schema_default = {
10433
10436
  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" } } },
10434
10437
  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" } } },
10435
10438
  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" } } },
10436
- 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" } } }, 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" }, 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" } }, description: "data-dr-props: the select part's typed props, handed to it as PartProps.props" } } },
10439
+ 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" } } },
10437
10440
  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" } } },
10438
- 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" } } }, 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)" }, 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" } } },
10441
+ 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)" } } }, 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" }, 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" } } },
10439
10442
  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" } } },
10440
10443
  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" } } },
10441
10444
  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" } } },
@@ -13150,10 +13153,11 @@ function compileApp(contract, { kit = null, runtime = RUNTIME, extra = {} } = {}
13150
13153
  problems.push(...numberProblems(declared));
13151
13154
  problems.push(...numberPinProblems(declared, { "dr-app-runtime": runtime, "dr-app-widgets": appWidgets, "dr-components": appComponents, "dr-components-controls": appControls }));
13152
13155
  problems.push(...whenPinProblems(declared, { "dr-components": appComponents }));
13156
+ problems.push(...propsPinProblems(declared, { "dr-components": appComponents, "dr-components-controls": appControls }));
13153
13157
  const widgetFindings = tree.problems.length === 0 ? widgetProblems(declared, tree, handlers, contract?.data?.sources, appWidgets) : [];
13154
13158
  const warnings = [...sourceFindings, ...widgetFindings].filter((one) => one.advisory).map(({ advisory: _advisory, ...one }) => one);
13155
13159
  problems.push(...widgetFindings.filter((one) => !one.advisory));
13156
- if (tree.problems.length === 0) problems.push(...partProblems(declared, tree, handlers, sources, contract?.pages, model));
13160
+ if (tree.problems.length === 0) problems.push(...partProblems(declared, tree, handlers, sources, contract?.pages, model, { "dr-components": appComponents }));
13157
13161
  if (problems.length > 0) return { files: {}, problems, contract, warnings };
13158
13162
  if (sources !== stated2) contract = { ...contract, data: { ...contract.data, sources } };
13159
13163
  const parented = dropEmptyArgs(fillChartFormats(fillParents(declared, tree), handlers, model));
@@ -13958,6 +13962,41 @@ function whenPinProblems(elements, pins) {
13958
13962
  }
13959
13963
  return problems;
13960
13964
  }
13965
+ function propsPinProblems(elements, pins) {
13966
+ const problems = [];
13967
+ for (const uid of Object.keys(elements).sort(natural3)) {
13968
+ const element = elements[uid] ?? {};
13969
+ const gates = PROPS_SINCE2?.[element.type];
13970
+ if (!isPlainObject5(gates)) continue;
13971
+ const module = MODULE_OF2[element.type];
13972
+ const pin = pins[module];
13973
+ if (typeof pin !== "string") continue;
13974
+ for (const [path3, first] of Object.entries(gates)) {
13975
+ if (pinAtLeast(pin, first)) continue;
13976
+ let reached = [[`/elements/${escapePointer3(uid)}/props/props`, element.props?.props]];
13977
+ for (const step of path3.split(".")) {
13978
+ const many = step.endsWith("[]");
13979
+ const key = many ? step.slice(0, -2) : step;
13980
+ const next = [];
13981
+ for (const [at, node] of reached) {
13982
+ if (!isPlainObject5(node) || node[key] === void 0 || node[key] === null) continue;
13983
+ const pointer2 = `${at}/${escapePointer3(key)}`;
13984
+ if (!many) next.push([pointer2, node[key]]);
13985
+ else if (Array.isArray(node[key])) node[key].forEach((item, i) => next.push([`${pointer2}/${i}`, item]));
13986
+ }
13987
+ reached = next;
13988
+ }
13989
+ for (const [pointer2] of reached) {
13990
+ problems.push({
13991
+ code: "prop_unsupported",
13992
+ pointer: pointer2,
13993
+ message: `${element.type} "${element.props?.id ?? uid}" states props.${path3}, and ${module}@${first} is the first release that draws it; the pinned version is ${pin.slice(pin.lastIndexOf("@") + 1)}, which would draw the ${element.type} without it \u2014 drop it for now`
13994
+ });
13995
+ }
13996
+ }
13997
+ }
13998
+ return problems;
13999
+ }
13961
14000
  function pinAtLeast(pin, first) {
13962
14001
  const semver3 = (v) => String(v).split(".").map((n) => Number.parseInt(n, 10) || 0);
13963
14002
  const [a, b] = [semver3(pin.slice(pin.lastIndexOf("@") + 1)), semver3(first)];
@@ -14206,7 +14245,7 @@ function primaryKeyOf(model, table) {
14206
14245
  const pks = Object.entries(model.tables[table]?.columns ?? {}).filter(([, column]) => column?.pk);
14207
14246
  return pks.length === 1 ? pks[0][0] : null;
14208
14247
  }
14209
- function partProblems(elements, tree, handlers, sources, pages = [], model = null) {
14248
+ function partProblems(elements, tree, handlers, sources, pages = [], model = null, pins = {}) {
14210
14249
  const problems = [];
14211
14250
  const declaredSources = isPlainObject5(sources) ? sources : {};
14212
14251
  const paramsOf4 = (path3) => {
@@ -14262,7 +14301,8 @@ function partProblems(elements, tree, handlers, sources, pages = [], model = nul
14262
14301
  } else if (param) {
14263
14302
  const declared = paramsOf4(element.page);
14264
14303
  const one = declared.find((candidate) => candidate.name === typedProps.param);
14265
- const kinds = CONTROL_KINDS2[type] ?? [];
14304
+ const multiple = type === "select" && typedProps.multiple === true && pinAtLeast(pins["dr-components"] ?? "", PROPS_SINCE2?.select?.multiple ?? "");
14305
+ const kinds = multiple ? ["multi"] : CONTROL_KINDS2[type] ?? [];
14266
14306
  if (!one) {
14267
14307
  const names = declared.map((candidate) => `"${candidate.name}"`);
14268
14308
  say(
@@ -20036,7 +20076,7 @@ function parseAttrs2(raw) {
20036
20076
  }
20037
20077
 
20038
20078
  // ../flows/appspace-builder/kit/contract/components.gen.mjs
20039
- var REGISTRY_VERSION2 = Object.freeze(8);
20079
+ var REGISTRY_VERSION2 = Object.freeze(9);
20040
20080
  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"]);
20041
20081
  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"]);
20042
20082
  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"]);
@@ -20052,6 +20092,7 @@ var NEGATIVE_MODES3 = Object.freeze(["minus", "red_minus", "absolute", "red_abso
20052
20092
  var FORMAT_PATTERNS3 = Object.freeze({ "currency": "$#,###", "number": "#,###", "percent": '#,###.#"%"' });
20053
20093
  var PLATFORM_NUMBERS3 = Object.freeze({ "dr-app-runtime": "1.8.0", "dr-app-widgets": "1.2.0", "dr-components": "1.2.0", "dr-components-controls": "1.1.0" });
20054
20094
  var ROW_ACTION_WHEN3 = Object.freeze({ "dr-components": "1.2.0" });
20095
+ 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" } });
20055
20096
  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" });
20056
20097
  var STAT_TONES3 = Object.freeze(["default", "positive", "warning", "negative"]);
20057
20098
  var WIDGET_KINDS4 = Object.freeze(["line", "area", "bar", "stacked", "pie", "donut", "kpi", "candle", "bubble", "table", "narrative"]);
@@ -20061,9 +20102,9 @@ var APP_KIND_READS4 = Object.freeze({ "waterfall": ["breakdown", "series"], "wat
20061
20102
  var SMART_COMPARES3 = Object.freeze(["BvA", "AvF", "vs_prev_period"]);
20062
20103
  var PLATFORM_FINANCE3 = Object.freeze({ "dr-app-widgets": "1.2.0" });
20063
20104
  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"]);
20064
- 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" } } }, "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" }, "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" } }, "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" } } }, "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)" }, "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" } } } });
20065
- 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"]);
20066
- 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" } } }, "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" }, "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" } }, "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" } } }, "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)" }, "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" } } } });
20105
+ 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)" } } }, "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" }, "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" } } } });
20106
+ 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"]);
20107
+ 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)" } } }, "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" }, "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", "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" }, "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" }, "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" } } } });
20067
20108
  var CONTROLS_TYPES2 = Object.freeze(["slider"]);
20068
20109
  var PARTS2 = Object.freeze({ "number_input": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "tabs": { "module": "dr-components", "reads": null, "children": ["tab_panel"], "events": {}, "empty": null }, "tab_panel": { "module": "dr-components", "reads": null, "children": "any", "events": {}, "empty": null }, "select": { "module": "dr-components", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": null }, "date_picker": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "data_grid": { "module": "dr-components", "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", "reads": null, "children": "any", "events": { "on_confirm": ["custom", "save", "submit", "decide"] }, "empty": null }, "variance_table": { "module": "dr-components", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "toggle": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "control_group": { "module": "dr-components", "reads": null, "children": ["number_input", "select", "date_picker", "toggle", "slider", "checkbox", "radio_group"], "events": {}, "empty": null }, "callout": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "scenario_columns": { "module": "dr-components", "reads": { "roles": ["list", "custom"], "as": "rows" }, "children": "none", "events": {}, "empty": "Nothing to show." }, "slider": { "module": "dr-components-controls", "reads": null, "children": "none", "events": {}, "empty": null }, "button": { "module": "dr-components", "reads": null, "children": "none", "events": { "on_click": ["custom", "submit"] }, "empty": null }, "status": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "badge": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "tag": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "empty_state": { "module": "dr-components", "reads": null, "children": "none", "events": { "on_action": ["custom", "submit"] }, "empty": null }, "stepper": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": { "on_step": ["custom", "submit"] }, "empty": null }, "alert": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "checkbox": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "radio_group": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "file_upload": { "module": "dr-components", "reads": null, "children": "none", "events": { "on_upload": ["custom", "save", "submit"] }, "empty": null }, "skeleton": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null }, "progress": { "module": "dr-components", "reads": { "roles": ["summary", "list", "custom"], "as": "payload" }, "children": "none", "events": {}, "empty": null }, "accordion": { "module": "dr-components", "reads": null, "children": "any", "events": {}, "empty": null }, "tooltip_info": { "module": "dr-components", "reads": null, "children": "none", "events": {}, "empty": null } });
20069
20110
  var TITLED_TYPES2 = Object.freeze(["widget", "form", "list", "queue", "stat", "chart", "custom", "number_input", "select", "date_picker", "dialog"]);
@@ -23431,14 +23472,27 @@ function paramModeOf(element) {
23431
23472
  const typed = isPlainObject11(props.props) ? props.props : {};
23432
23473
  return named7(typed.param) ? typed.param : null;
23433
23474
  }
23475
+ function paramsWrittenBy(element) {
23476
+ const out = [];
23477
+ const one = paramModeOf(element);
23478
+ if (one !== null) out.push(one);
23479
+ if (element?.type === "custom") return out;
23480
+ const typed = isPlainObject11(element?.props?.props) ? element.props.props : {};
23481
+ if (named7(typed.param_to)) out.push(typed.param_to);
23482
+ for (const filter of Array.isArray(typed.filters) ? typed.filters : []) {
23483
+ if (!isPlainObject11(filter)) continue;
23484
+ if (named7(filter.param)) out.push(filter.param);
23485
+ if (named7(filter.param_to)) out.push(filter.param_to);
23486
+ }
23487
+ return out;
23488
+ }
23434
23489
  function paramWriters(contract, { moduleSource = () => void 0 } = {}) {
23435
23490
  const out = /* @__PURE__ */ new Map();
23436
23491
  for (const page of paramPages(contract)) {
23437
23492
  const written = /* @__PURE__ */ new Set();
23438
23493
  let unknown = false;
23439
23494
  for (const [, element] of elementsOn(contract, page.path)) {
23440
- const mode = paramModeOf(element);
23441
- if (mode !== null) written.add(mode);
23495
+ for (const name of paramsWrittenBy(element)) written.add(name);
23442
23496
  if (element?.type !== "custom") continue;
23443
23497
  const props = isPlainObject11(element.props) ? element.props : {};
23444
23498
  const produces = isPlainObject11(props.declares?.produces) ? props.declares.produces : {};
@@ -29277,14 +29331,27 @@ function paramModeOf2(element) {
29277
29331
  const typed = isPlainObject17(props.props) ? props.props : {};
29278
29332
  return named10(typed.param) ? typed.param : null;
29279
29333
  }
29334
+ function paramsWrittenBy2(element) {
29335
+ const out = [];
29336
+ const one = paramModeOf2(element);
29337
+ if (one !== null) out.push(one);
29338
+ if (element?.type === "custom") return out;
29339
+ const typed = isPlainObject17(element?.props?.props) ? element.props.props : {};
29340
+ if (named10(typed.param_to)) out.push(typed.param_to);
29341
+ for (const filter of Array.isArray(typed.filters) ? typed.filters : []) {
29342
+ if (!isPlainObject17(filter)) continue;
29343
+ if (named10(filter.param)) out.push(filter.param);
29344
+ if (named10(filter.param_to)) out.push(filter.param_to);
29345
+ }
29346
+ return out;
29347
+ }
29280
29348
  function paramWriters2(contract, { moduleSource = () => void 0 } = {}) {
29281
29349
  const out = /* @__PURE__ */ new Map();
29282
29350
  for (const page of paramPages2(contract)) {
29283
29351
  const written = /* @__PURE__ */ new Set();
29284
29352
  let unknown = false;
29285
29353
  for (const [, element] of elementsOn2(contract, page.path)) {
29286
- const mode = paramModeOf2(element);
29287
- if (mode !== null) written.add(mode);
29354
+ for (const name of paramsWrittenBy2(element)) written.add(name);
29288
29355
  if (element?.type !== "custom") continue;
29289
29356
  const props = isPlainObject17(element.props) ? element.props : {};
29290
29357
  const produces = isPlainObject17(props.declares?.produces) ? props.declares.produces : {};