@ironflock/widget-toolbar 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -2
- package/dist/widget-toolbar.js +1331 -0
- package/dist/widget-toolbar.js.map +1 -0
- package/package.json +53 -5
- package/src/colors.ts +102 -0
- package/src/default-data.json +45 -0
- package/src/definition-schema.d.ts +192 -0
- package/src/definition-schema.json +317 -0
- package/src/layout.ts +153 -0
- package/src/tools.ts +430 -0
- package/src/widget-toolbar.ts +1289 -0
- package/thumbnail.png +0 -0
- package/thumbnail.webp +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Horizontal draws one row of tools, for a bar about 48 px high across the page. Vertical stacks them in a column, for a tool strip at the side. Default horizontal.
|
|
10
|
+
*/
|
|
11
|
+
export type Orientation = "horizontal" | "vertical";
|
|
12
|
+
/**
|
|
13
|
+
* How large the tools are drawn: 'small' for dense bars, 'normal' (the default), 'big' for touch screens and wall displays.
|
|
14
|
+
*/
|
|
15
|
+
export type Size = "small" | "normal" | "big";
|
|
16
|
+
/**
|
|
17
|
+
* The corners of the buttons, choice groups, dropdowns and switches: 'round' for pill-shaped ends (the default), 'rounded' for slightly rounded corners, 'square' for sharp corners.
|
|
18
|
+
*/
|
|
19
|
+
export type ButtonShape = "round" | "rounded" | "square";
|
|
20
|
+
/**
|
|
21
|
+
* Where the tools sit along the bar when there is room to spare: at the start (left or top, the default), in the centre, or at the end. A Spacer tool pushes the tools after it to the end instead.
|
|
22
|
+
*/
|
|
23
|
+
export type Alignment = "start" | "center" | "end";
|
|
24
|
+
/**
|
|
25
|
+
* What every row of that table gets in this column: a constant, or bound to a column, such as the id of the record shown on this page. Converted to the column's type (number, true/false).
|
|
26
|
+
*/
|
|
27
|
+
export type SharedValue = string;
|
|
28
|
+
/**
|
|
29
|
+
* Columns written with every tool's row that goes into the same table, such as the id of the record or machine this page shows, so you set them once instead of per tool. A tool that writes to another table ignores them. While one of them has no value (its binding has not delivered one yet), the tools writing to its table are disabled, so no row is written without its key.
|
|
30
|
+
*/
|
|
31
|
+
export type SharedColumns = {
|
|
32
|
+
targetColumn?: SharedColumn;
|
|
33
|
+
value?: SharedValue;
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
}[];
|
|
36
|
+
/**
|
|
37
|
+
* Text on or next to the tool, such as 'Start', 'Auto mode' or 'Speed'. Buttons with an icon drop it when the bar gets tight; it stays the tool's accessible name.
|
|
38
|
+
*/
|
|
39
|
+
export type Label = string;
|
|
40
|
+
/**
|
|
41
|
+
* What the tool is. 'button' (the default) writes its Button Value on each click. 'switch' writes the On or Off Value. 'slider' writes a number between Minimum and Maximum when released. 'choice' shows the options side by side and 'dropdown' as a list; both write the picked option's value. 'label' is text, 'separator' a line between groups, 'spacer' pushes the tools after it to the end; these three write nothing.
|
|
42
|
+
*/
|
|
43
|
+
export type ToolType = "button" | "switch" | "slider" | "choice" | "dropdown" | "label" | "separator" | "spacer";
|
|
44
|
+
/**
|
|
45
|
+
* Name of a Material Symbols icon shown before the label, such as 'play_arrow', 'stop', 'tune' or 'restart_alt' (see fonts.google.com/icons). A button with an icon can shrink to the icon alone when the bar is tight.
|
|
46
|
+
*/
|
|
47
|
+
export type Icon = string;
|
|
48
|
+
/**
|
|
49
|
+
* How the button is drawn: 'filled' in the accent colour (the default, for the main command), 'tonal' lightly tinted, 'outlined' with a border, 'text' without one.
|
|
50
|
+
*/
|
|
51
|
+
export type ButtonStyle = "filled" | "tonal" | "outlined" | "text";
|
|
52
|
+
/**
|
|
53
|
+
* What a click writes, such as 'start' or '1'. Converted to the column's type. Leave it empty to write true into the column and to remove the URL parameter (a 'Show all' button). While the tool's Current Value or URL parameter equals it, the button is drawn as active, so several buttons on one column or parameter act as a mode selector.
|
|
54
|
+
*/
|
|
55
|
+
export type ButtonValue = string;
|
|
56
|
+
/**
|
|
57
|
+
* What the switch writes when turned on, and the value that shows it on. Default true ('true' in a URL parameter, 1 in a numeric column).
|
|
58
|
+
*/
|
|
59
|
+
export type OnValue = string;
|
|
60
|
+
/**
|
|
61
|
+
* What the switch writes when turned off. Default false in a column; in a URL parameter an empty Off Value removes the parameter, so filtered widgets show everything while the switch is off.
|
|
62
|
+
*/
|
|
63
|
+
export type OffValue = string;
|
|
64
|
+
/**
|
|
65
|
+
* Lowest value of the slider. Default 0.
|
|
66
|
+
*/
|
|
67
|
+
export type Minimum = number;
|
|
68
|
+
/**
|
|
69
|
+
* Highest value of the slider. Default 100; a Maximum not above the Minimum is ignored.
|
|
70
|
+
*/
|
|
71
|
+
export type Maximum = number;
|
|
72
|
+
/**
|
|
73
|
+
* Distance between the values the slider can take, such as 1, 5 or 0.1. Default 1. Its decimals are the decimals shown.
|
|
74
|
+
*/
|
|
75
|
+
export type Step = number;
|
|
76
|
+
/**
|
|
77
|
+
* Unit shown after the slider's value, such as '%' or 'rpm'. Display only; the number is written without it.
|
|
78
|
+
*/
|
|
79
|
+
export type Unit = string;
|
|
80
|
+
/**
|
|
81
|
+
* Text shown for the option, such as 'Week'. Leave it empty to show the value.
|
|
82
|
+
*/
|
|
83
|
+
export type OptionLabel = string;
|
|
84
|
+
/**
|
|
85
|
+
* What picking the option writes, such as 'week'. In a URL parameter it must match the values of the filtered column exactly.
|
|
86
|
+
*/
|
|
87
|
+
export type OptionValue = string;
|
|
88
|
+
/**
|
|
89
|
+
* Material Symbols icon shown for the option. In a tight bar a choice group shows only the icons.
|
|
90
|
+
*/
|
|
91
|
+
export type OptionIcon = string;
|
|
92
|
+
/**
|
|
93
|
+
* The choices of a choice group or dropdown, in order. Enter them, or bind them to a table with a label and a value column. An option with an empty value removes the URL parameter ('All') and writes an empty value into the column.
|
|
94
|
+
*/
|
|
95
|
+
export type Options = {
|
|
96
|
+
label?: OptionLabel;
|
|
97
|
+
value?: OptionValue;
|
|
98
|
+
icon?: OptionIcon;
|
|
99
|
+
[k: string]: unknown;
|
|
100
|
+
}[];
|
|
101
|
+
/**
|
|
102
|
+
* What is stored now, to show it on the tool: the switch position, the slider position, the picked option, or a button as active. Bind it to the latest value of the column the tool writes, filtered to the same record. After a click the tool keeps the new value for up to 10 seconds until this agrees, then shows what this reports. Without it the tool shows what was last set on this page. Ignored when URL Parameter is set, which the tool follows instead.
|
|
103
|
+
*/
|
|
104
|
+
export type CurrentValue = string;
|
|
105
|
+
/**
|
|
106
|
+
* What the tool writes into this column with every row: a constant, or bound to a column. Converted to the column's type (number, true/false).
|
|
107
|
+
*/
|
|
108
|
+
export type ExtraValue = string;
|
|
109
|
+
/**
|
|
110
|
+
* More columns of the row this tool writes, each with a fixed or bound value, such as a command name. While one of them has no value, the tool is disabled.
|
|
111
|
+
*/
|
|
112
|
+
export type ExtraColumns = {
|
|
113
|
+
targetColumn?: ExtraColumn;
|
|
114
|
+
value?: ExtraValue;
|
|
115
|
+
[k: string]: unknown;
|
|
116
|
+
}[];
|
|
117
|
+
/**
|
|
118
|
+
* The NAME of a URL parameter the tool sets to its value, such as 'period', and whose value it then shows. Every widget that should follow it needs a filterAnd condition with "useFilter": true and exactly this name as the bare "value", such as {"column": "period", "operator": "=", "value": "period", "useFilter": true}. While the parameter is removed, that condition is dropped and the widget shows everything. Each change is a step in the browser history.
|
|
119
|
+
*/
|
|
120
|
+
export type URLParameter = string;
|
|
121
|
+
/**
|
|
122
|
+
* A question asked before the tool writes, such as 'Stop the line?'. The value is written only after OK. Leave it empty to write at once. Use it for commands that are hard to undo: clicks in the widget editor's preview and the AI chat write real rows too.
|
|
123
|
+
*/
|
|
124
|
+
export type Confirmation = string;
|
|
125
|
+
/**
|
|
126
|
+
* The tools in the bar, in order. Each is a button, switch, slider, choice group, dropdown, label, separator or spacer. Tools that do not fit the tile move, from the end, into a menu opened by the ⋮ button.
|
|
127
|
+
*/
|
|
128
|
+
export type Tools = {
|
|
129
|
+
label?: Label;
|
|
130
|
+
control?: ToolType;
|
|
131
|
+
icon?: Icon;
|
|
132
|
+
variant?: ButtonStyle;
|
|
133
|
+
color?: Color;
|
|
134
|
+
buttonValue?: ButtonValue;
|
|
135
|
+
onValue?: OnValue;
|
|
136
|
+
offValue?: OffValue;
|
|
137
|
+
min?: Minimum;
|
|
138
|
+
max?: Maximum;
|
|
139
|
+
step?: Step;
|
|
140
|
+
unit?: Unit;
|
|
141
|
+
options?: Options;
|
|
142
|
+
value?: CurrentValue;
|
|
143
|
+
targetColumn?: WriteToColumn;
|
|
144
|
+
extraColumns?: ExtraColumns;
|
|
145
|
+
parameterKey?: URLParameter;
|
|
146
|
+
confirmText?: Confirmation;
|
|
147
|
+
[k: string]: unknown;
|
|
148
|
+
}[];
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* A bar of controls that users click to change things: buttons, switches, sliders, choice groups and dropdowns. Each tool writes its value into a table column, which the app's backend receives as a new row, and/or sets a URL parameter that other widgets on the page filter on. The tools show the stored or current value, and tools that do not fit the tile move into a menu.
|
|
152
|
+
*/
|
|
153
|
+
export interface ToolbarConfiguration {
|
|
154
|
+
orientation?: Orientation;
|
|
155
|
+
size?: Size;
|
|
156
|
+
shape?: ButtonShape;
|
|
157
|
+
alignment?: Alignment;
|
|
158
|
+
accentColor?: AccentColor;
|
|
159
|
+
sharedColumns?: SharedColumns;
|
|
160
|
+
tools?: Tools;
|
|
161
|
+
[k: string]: unknown;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Colour of filled buttons, switches that are on, sliders and selected choices. A tool's own Color wins over it. Leave it empty to use the theme's first colour.
|
|
165
|
+
*/
|
|
166
|
+
export interface AccentColor {
|
|
167
|
+
[k: string]: unknown;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The column this value goes into. It decides the table: only tools writing to the same table write it.
|
|
171
|
+
*/
|
|
172
|
+
export interface SharedColumn {
|
|
173
|
+
[k: string]: unknown;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Accent colour of this tool, such as red for a Stop button. Leave it empty to use the toolbar's Accent Color.
|
|
177
|
+
*/
|
|
178
|
+
export interface Color {
|
|
179
|
+
[k: string]: unknown;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* The column the tool writes into: every click, release or pick publishes a new row to its table with this value, the Extra Columns and the matching Shared Columns. The app's backend receives the row by subscribing to the table. Can be combined with URL Parameter.
|
|
183
|
+
*/
|
|
184
|
+
export interface WriteToColumn {
|
|
185
|
+
[k: string]: unknown;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* The column this value goes into, in the same table as Write to Column.
|
|
189
|
+
*/
|
|
190
|
+
export interface ExtraColumn {
|
|
191
|
+
[k: string]: unknown;
|
|
192
|
+
}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Toolbar Configuration",
|
|
3
|
+
"description": "A bar of controls that users click to change things: buttons, switches, sliders, choice groups and dropdowns. Each tool writes its value into a table column, which the app's backend receives as a new row, and/or sets a URL parameter that other widgets on the page filter on. The tools show the stored or current value, and tools that do not fit the tile move into a menu.",
|
|
4
|
+
"aiSelection": {
|
|
5
|
+
"dataShape": "No input data needed. Each tool writes: targetColumn gets the clicked value (plus extraColumns and sharedColumns such as a record id, in the same row), parameterKey gets it as a URL parameter. To show what is stored, bind a tool's value to the latest value of the same column for the same record. choice and dropdown options can be bound to a table (label, value).",
|
|
6
|
+
"useWhen": [
|
|
7
|
+
"The controls of an app page in one bar: commands, modes, set points and view filters together, such as Start/Stop buttons, an Auto switch and a speed slider writing to a commands table the backend subscribes to.",
|
|
8
|
+
"A view bar whose switches, choice groups (Day | Week | Month) and dropdowns set URL parameters that filter the other widgets: each filtered widget gets a filterAnd condition with useFilter: true and the parameterKey as value."
|
|
9
|
+
],
|
|
10
|
+
"notFor": [
|
|
11
|
+
"One stand-alone on/off control, or a direct call of a device function — use widget-switch.",
|
|
12
|
+
"Several values typed in and saved together, text, dates or files — use widget-form.",
|
|
13
|
+
"Picking a date or a time range — use widget-filter-calendar.",
|
|
14
|
+
"One filter dropdown on its own, such as picking the machine a page shows — use widget-filter-dropdown.",
|
|
15
|
+
"Opening other pages — use widget-navbar or widget-navbutton."
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"orientation": {
|
|
21
|
+
"title": "Orientation",
|
|
22
|
+
"description": "Horizontal draws one row of tools, for a bar about 48 px high across the page. Vertical stacks them in a column, for a tool strip at the side. Default horizontal.",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["horizontal", "vertical"],
|
|
25
|
+
"enumLabels": ["Horizontal", "Vertical"],
|
|
26
|
+
"default": "horizontal",
|
|
27
|
+
"dataDrivenDisabled": true,
|
|
28
|
+
"order": 1
|
|
29
|
+
},
|
|
30
|
+
"size": {
|
|
31
|
+
"title": "Size",
|
|
32
|
+
"description": "How large the tools are drawn: 'small' for dense bars, 'normal' (the default), 'big' for touch screens and wall displays.",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["small", "normal", "big"],
|
|
35
|
+
"enumLabels": ["Small", "Normal", "Big"],
|
|
36
|
+
"default": "normal",
|
|
37
|
+
"dataDrivenDisabled": true,
|
|
38
|
+
"order": 2
|
|
39
|
+
},
|
|
40
|
+
"shape": {
|
|
41
|
+
"title": "Button Shape",
|
|
42
|
+
"description": "The corners of the buttons, choice groups, dropdowns and switches: 'round' for pill-shaped ends (the default), 'rounded' for slightly rounded corners, 'square' for sharp corners.",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": ["round", "rounded", "square"],
|
|
45
|
+
"enumLabels": ["Round", "Rounded", "Square"],
|
|
46
|
+
"default": "round",
|
|
47
|
+
"dataDrivenDisabled": true,
|
|
48
|
+
"order": 3
|
|
49
|
+
},
|
|
50
|
+
"alignment": {
|
|
51
|
+
"title": "Alignment",
|
|
52
|
+
"description": "Where the tools sit along the bar when there is room to spare: at the start (left or top, the default), in the centre, or at the end. A Spacer tool pushes the tools after it to the end instead.",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": ["start", "center", "end"],
|
|
55
|
+
"enumLabels": ["Start", "Center", "End"],
|
|
56
|
+
"default": "start",
|
|
57
|
+
"dataDrivenDisabled": true,
|
|
58
|
+
"order": 4
|
|
59
|
+
},
|
|
60
|
+
"accentColor": {
|
|
61
|
+
"title": "Accent Color",
|
|
62
|
+
"description": "Colour of filled buttons, switches that are on, sliders and selected choices. A tool's own Color wins over it. Leave it empty to use the theme's first colour.",
|
|
63
|
+
"type": "color",
|
|
64
|
+
"dataDrivenDisabled": true,
|
|
65
|
+
"order": 5
|
|
66
|
+
},
|
|
67
|
+
"sharedColumns": {
|
|
68
|
+
"title": "Shared Columns",
|
|
69
|
+
"description": "Columns written with every tool's row that goes into the same table, such as the id of the record or machine this page shows, so you set them once instead of per tool. A tool that writes to another table ignores them. While one of them has no value (its binding has not delivered one yet), the tools writing to its table are disabled, so no row is written without its key.",
|
|
70
|
+
"type": "array",
|
|
71
|
+
"dataDrivenDisabled": true,
|
|
72
|
+
"order": 6,
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"targetColumn": {
|
|
77
|
+
"title": "Shared Column",
|
|
78
|
+
"description": "The column this value goes into. It decides the table: only tools writing to the same table write it.",
|
|
79
|
+
"type": "targetColumn",
|
|
80
|
+
"dataDrivenDisabled": true,
|
|
81
|
+
"order": 1
|
|
82
|
+
},
|
|
83
|
+
"value": {
|
|
84
|
+
"title": "Shared Value",
|
|
85
|
+
"description": "What every row of that table gets in this column: a constant, or bound to a column, such as the id of the record shown on this page. Converted to the column's type (number, true/false).",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"order": 2
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"tools": {
|
|
93
|
+
"title": "Tools",
|
|
94
|
+
"description": "The tools in the bar, in order. Each is a button, switch, slider, choice group, dropdown, label, separator or spacer. Tools that do not fit the tile move, from the end, into a menu opened by the ⋮ button.",
|
|
95
|
+
"type": "array",
|
|
96
|
+
"dataDrivenDisabled": true,
|
|
97
|
+
"order": 7,
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"label": {
|
|
102
|
+
"title": "Label",
|
|
103
|
+
"description": "Text on or next to the tool, such as 'Start', 'Auto mode' or 'Speed'. Buttons with an icon drop it when the bar gets tight; it stays the tool's accessible name.",
|
|
104
|
+
"type": "string",
|
|
105
|
+
"order": 1
|
|
106
|
+
},
|
|
107
|
+
"control": {
|
|
108
|
+
"title": "Tool Type",
|
|
109
|
+
"description": "What the tool is. 'button' (the default) writes its Button Value on each click. 'switch' writes the On or Off Value. 'slider' writes a number between Minimum and Maximum when released. 'choice' shows the options side by side and 'dropdown' as a list; both write the picked option's value. 'label' is text, 'separator' a line between groups, 'spacer' pushes the tools after it to the end; these three write nothing.",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"enum": ["button", "switch", "slider", "choice", "dropdown", "label", "separator", "spacer"],
|
|
112
|
+
"enumLabels": [
|
|
113
|
+
"Button",
|
|
114
|
+
"Switch",
|
|
115
|
+
"Slider",
|
|
116
|
+
"Choice Group",
|
|
117
|
+
"Dropdown",
|
|
118
|
+
"Label",
|
|
119
|
+
"Separator",
|
|
120
|
+
"Spacer"
|
|
121
|
+
],
|
|
122
|
+
"default": "button",
|
|
123
|
+
"dataDrivenDisabled": true,
|
|
124
|
+
"order": 2
|
|
125
|
+
},
|
|
126
|
+
"icon": {
|
|
127
|
+
"title": "Icon",
|
|
128
|
+
"description": "Name of a Material Symbols icon shown before the label, such as 'play_arrow', 'stop', 'tune' or 'restart_alt' (see fonts.google.com/icons). A button with an icon can shrink to the icon alone when the bar is tight.",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"dataDrivenDisabled": true,
|
|
131
|
+
"condition": {
|
|
132
|
+
"relativePath": "../control",
|
|
133
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", "label", false]
|
|
134
|
+
},
|
|
135
|
+
"order": 3
|
|
136
|
+
},
|
|
137
|
+
"variant": {
|
|
138
|
+
"title": "Button Style",
|
|
139
|
+
"description": "How the button is drawn: 'filled' in the accent colour (the default, for the main command), 'tonal' lightly tinted, 'outlined' with a border, 'text' without one.",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"enum": ["filled", "tonal", "outlined", "text"],
|
|
142
|
+
"enumLabels": ["Filled", "Tonal", "Outlined", "Text"],
|
|
143
|
+
"default": "filled",
|
|
144
|
+
"dataDrivenDisabled": true,
|
|
145
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["button", false] },
|
|
146
|
+
"order": 4
|
|
147
|
+
},
|
|
148
|
+
"color": {
|
|
149
|
+
"title": "Color",
|
|
150
|
+
"description": "Accent colour of this tool, such as red for a Stop button. Leave it empty to use the toolbar's Accent Color.",
|
|
151
|
+
"type": "color",
|
|
152
|
+
"dataDrivenDisabled": true,
|
|
153
|
+
"condition": {
|
|
154
|
+
"relativePath": "../control",
|
|
155
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", false]
|
|
156
|
+
},
|
|
157
|
+
"order": 5
|
|
158
|
+
},
|
|
159
|
+
"buttonValue": {
|
|
160
|
+
"title": "Button Value",
|
|
161
|
+
"description": "What a click writes, such as 'start' or '1'. Converted to the column's type. Leave it empty to write true into the column and to remove the URL parameter (a 'Show all' button). While the tool's Current Value or URL parameter equals it, the button is drawn as active, so several buttons on one column or parameter act as a mode selector.",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["button", false] },
|
|
164
|
+
"order": 6
|
|
165
|
+
},
|
|
166
|
+
"onValue": {
|
|
167
|
+
"title": "On Value",
|
|
168
|
+
"description": "What the switch writes when turned on, and the value that shows it on. Default true ('true' in a URL parameter, 1 in a numeric column).",
|
|
169
|
+
"type": "string",
|
|
170
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["switch"] },
|
|
171
|
+
"order": 7
|
|
172
|
+
},
|
|
173
|
+
"offValue": {
|
|
174
|
+
"title": "Off Value",
|
|
175
|
+
"description": "What the switch writes when turned off. Default false in a column; in a URL parameter an empty Off Value removes the parameter, so filtered widgets show everything while the switch is off.",
|
|
176
|
+
"type": "string",
|
|
177
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["switch"] },
|
|
178
|
+
"order": 8
|
|
179
|
+
},
|
|
180
|
+
"min": {
|
|
181
|
+
"title": "Minimum",
|
|
182
|
+
"description": "Lowest value of the slider. Default 0.",
|
|
183
|
+
"type": "number",
|
|
184
|
+
"dataDrivenDisabled": true,
|
|
185
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["slider"] },
|
|
186
|
+
"order": 9
|
|
187
|
+
},
|
|
188
|
+
"max": {
|
|
189
|
+
"title": "Maximum",
|
|
190
|
+
"description": "Highest value of the slider. Default 100; a Maximum not above the Minimum is ignored.",
|
|
191
|
+
"type": "number",
|
|
192
|
+
"dataDrivenDisabled": true,
|
|
193
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["slider"] },
|
|
194
|
+
"order": 10
|
|
195
|
+
},
|
|
196
|
+
"step": {
|
|
197
|
+
"title": "Step",
|
|
198
|
+
"description": "Distance between the values the slider can take, such as 1, 5 or 0.1. Default 1. Its decimals are the decimals shown.",
|
|
199
|
+
"type": "number",
|
|
200
|
+
"dataDrivenDisabled": true,
|
|
201
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["slider"] },
|
|
202
|
+
"order": 11
|
|
203
|
+
},
|
|
204
|
+
"unit": {
|
|
205
|
+
"title": "Unit",
|
|
206
|
+
"description": "Unit shown after the slider's value, such as '%' or 'rpm'. Display only; the number is written without it.",
|
|
207
|
+
"type": "string",
|
|
208
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["slider"] },
|
|
209
|
+
"order": 12
|
|
210
|
+
},
|
|
211
|
+
"options": {
|
|
212
|
+
"title": "Options",
|
|
213
|
+
"description": "The choices of a choice group or dropdown, in order. Enter them, or bind them to a table with a label and a value column. An option with an empty value removes the URL parameter ('All') and writes an empty value into the column.",
|
|
214
|
+
"type": "array",
|
|
215
|
+
"condition": { "relativePath": "../control", "showIfValueIn": ["choice", "dropdown"] },
|
|
216
|
+
"order": 13,
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"properties": {
|
|
220
|
+
"label": {
|
|
221
|
+
"title": "Option Label",
|
|
222
|
+
"description": "Text shown for the option, such as 'Week'. Leave it empty to show the value.",
|
|
223
|
+
"type": "string",
|
|
224
|
+
"order": 1
|
|
225
|
+
},
|
|
226
|
+
"value": {
|
|
227
|
+
"title": "Option Value",
|
|
228
|
+
"description": "What picking the option writes, such as 'week'. In a URL parameter it must match the values of the filtered column exactly.",
|
|
229
|
+
"type": "string",
|
|
230
|
+
"order": 2
|
|
231
|
+
},
|
|
232
|
+
"icon": {
|
|
233
|
+
"title": "Option Icon",
|
|
234
|
+
"description": "Material Symbols icon shown for the option. In a tight bar a choice group shows only the icons.",
|
|
235
|
+
"type": "string",
|
|
236
|
+
"dataDrivenDisabled": true,
|
|
237
|
+
"order": 3
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"value": {
|
|
243
|
+
"title": "Current Value",
|
|
244
|
+
"description": "What is stored now, to show it on the tool: the switch position, the slider position, the picked option, or a button as active. Bind it to the latest value of the column the tool writes, filtered to the same record. After a click the tool keeps the new value for up to 10 seconds until this agrees, then shows what this reports. Without it the tool shows what was last set on this page. Ignored when URL Parameter is set, which the tool follows instead.",
|
|
245
|
+
"type": "string",
|
|
246
|
+
"condition": {
|
|
247
|
+
"relativePath": "../control",
|
|
248
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", false]
|
|
249
|
+
},
|
|
250
|
+
"order": 14
|
|
251
|
+
},
|
|
252
|
+
"targetColumn": {
|
|
253
|
+
"title": "Write to Column",
|
|
254
|
+
"description": "The column the tool writes into: every click, release or pick publishes a new row to its table with this value, the Extra Columns and the matching Shared Columns. The app's backend receives the row by subscribing to the table. Can be combined with URL Parameter.",
|
|
255
|
+
"type": "targetColumn",
|
|
256
|
+
"dataDrivenDisabled": true,
|
|
257
|
+
"condition": {
|
|
258
|
+
"relativePath": "../control",
|
|
259
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", false]
|
|
260
|
+
},
|
|
261
|
+
"order": 15
|
|
262
|
+
},
|
|
263
|
+
"extraColumns": {
|
|
264
|
+
"title": "Extra Columns",
|
|
265
|
+
"description": "More columns of the row this tool writes, each with a fixed or bound value, such as a command name. While one of them has no value, the tool is disabled.",
|
|
266
|
+
"type": "array",
|
|
267
|
+
"dataDrivenDisabled": true,
|
|
268
|
+
"condition": {
|
|
269
|
+
"relativePath": "../control",
|
|
270
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", false]
|
|
271
|
+
},
|
|
272
|
+
"order": 16,
|
|
273
|
+
"items": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"properties": {
|
|
276
|
+
"targetColumn": {
|
|
277
|
+
"title": "Extra Column",
|
|
278
|
+
"description": "The column this value goes into, in the same table as Write to Column.",
|
|
279
|
+
"type": "targetColumn",
|
|
280
|
+
"dataDrivenDisabled": true,
|
|
281
|
+
"order": 1
|
|
282
|
+
},
|
|
283
|
+
"value": {
|
|
284
|
+
"title": "Extra Value",
|
|
285
|
+
"description": "What the tool writes into this column with every row: a constant, or bound to a column. Converted to the column's type (number, true/false).",
|
|
286
|
+
"type": "string",
|
|
287
|
+
"order": 2
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"parameterKey": {
|
|
293
|
+
"title": "URL Parameter",
|
|
294
|
+
"description": "The NAME of a URL parameter the tool sets to its value, such as 'period', and whose value it then shows. Every widget that should follow it needs a filterAnd condition with \"useFilter\": true and exactly this name as the bare \"value\", such as {\"column\": \"period\", \"operator\": \"=\", \"value\": \"period\", \"useFilter\": true}. While the parameter is removed, that condition is dropped and the widget shows everything. Each change is a step in the browser history.",
|
|
295
|
+
"type": "string",
|
|
296
|
+
"dataDrivenDisabled": true,
|
|
297
|
+
"condition": {
|
|
298
|
+
"relativePath": "../control",
|
|
299
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", false]
|
|
300
|
+
},
|
|
301
|
+
"order": 17
|
|
302
|
+
},
|
|
303
|
+
"confirmText": {
|
|
304
|
+
"title": "Confirmation",
|
|
305
|
+
"description": "A question asked before the tool writes, such as 'Stop the line?'. The value is written only after OK. Leave it empty to write at once. Use it for commands that are hard to undo: clicks in the widget editor's preview and the AI chat write real rows too.",
|
|
306
|
+
"type": "string",
|
|
307
|
+
"condition": {
|
|
308
|
+
"relativePath": "../control",
|
|
309
|
+
"showIfValueIn": ["button", "switch", "slider", "choice", "dropdown", false]
|
|
310
|
+
},
|
|
311
|
+
"order": 18
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|