You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "parameter"("type") field contained two variants of BOOLEAN name (the other one being 'BOOL') due to lack of natural "enum" constraint. Added parameter_type table and associated foreign key to ensure consistency. Also replaced all "BOOL" instances with "BOOLEAN".
component TEXTREFERENCES component(name) ON DELETE CASCADE,
12
18
description TEXT,
13
19
description_md TEXT,
14
-
type TEXT,
20
+
type TEXTREFERENCES parameter_type(name) ON DELETE CASCADE,
15
21
optional BOOLEAN DEFAULT FALSE,
16
22
PRIMARY KEY (component, top_level, name)
17
23
);
@@ -221,29 +227,29 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
221
227
('placeholder', 'A placeholder text that will be shown in the field when is is empty.', 'TEXT', FALSE, TRUE),
222
228
('value', 'A default value that will already be present in the field when the user loads the page.', 'TEXT', FALSE, TRUE),
223
229
('options', 'A json array of objects containing the label and value of all possible options of a select field. Used only when type=select. JSON objects in the array can contain the properties "label", "value" and "selected".', 'JSON', FALSE, TRUE),
224
-
('required', 'Set this to true to prevent the form contents from being sent if this field is left empty by the user.', 'BOOL', FALSE, TRUE),
230
+
('required', 'Set this to true to prevent the form contents from being sent if this field is left empty by the user.', 'BOOLEAN', FALSE, TRUE),
225
231
('min', 'The minimum value to accept for an input of type number', 'NUMBER', FALSE, TRUE),
226
232
('max', 'The minimum value to accept for an input of type number', 'NUMBER', FALSE, TRUE),
227
-
('checked', 'Used only for checkboxes and radio buttons. Indicates whether the checkbox should appear as already checked.', 'BOOL', FALSE, TRUE),
228
-
('multiple', 'Used only for select elements. Indicates that multiple elements can be selected simultaneously. When using multiple, you should add square brackets after the variable name: ''my_variable[]'' as name', 'BOOL', FALSE, TRUE),
229
-
('searchable', 'For select and multiple-select elements, displays them with a nice dropdown that allows searching for options.', 'BOOL', FALSE, TRUE),
230
-
('dropdown', 'An alias for "searchable".', 'BOOL', FALSE, TRUE),
231
-
('create_new', 'In a multiselect with a dropdown, this option allows the user to enter new values, that are not in the list of options.', 'BOOL', FALSE, TRUE),
233
+
('checked', 'Used only for checkboxes and radio buttons. Indicates whether the checkbox should appear as already checked.', 'BOOLEAN', FALSE, TRUE),
234
+
('multiple', 'Used only for select elements. Indicates that multiple elements can be selected simultaneously. When using multiple, you should add square brackets after the variable name: ''my_variable[]'' as name', 'BOOLEAN', FALSE, TRUE),
235
+
('searchable', 'For select and multiple-select elements, displays them with a nice dropdown that allows searching for options.', 'BOOLEAN', FALSE, TRUE),
236
+
('dropdown', 'An alias for "searchable".', 'BOOLEAN', FALSE, TRUE),
237
+
('create_new', 'In a multiselect with a dropdown, this option allows the user to enter new values, that are not in the list of options.', 'BOOLEAN', FALSE, TRUE),
232
238
('step', 'The increment of values in an input of type number. Set to 1 to allow only integers.', 'NUMBER', FALSE, TRUE),
233
239
('description', 'A helper text to display near the input field.', 'TEXT', FALSE, TRUE),
234
240
('pattern', 'A regular expression that the value must match. For instance, [0-9]{3} will only accept 3 digits.', 'TEXT', FALSE, TRUE),
235
-
('autofocus', 'Automatically focus the field when the page is loaded', 'BOOL', FALSE, TRUE),
241
+
('autofocus', 'Automatically focus the field when the page is loaded', 'BOOLEAN', FALSE, TRUE),
236
242
('width', 'Width of the form field, between 1 and 12.', 'NUMBER', FALSE, TRUE),
237
-
('autocomplete', 'Whether the browser should suggest previously entered values for this field.', 'BOOL', FALSE, TRUE),
243
+
('autocomplete', 'Whether the browser should suggest previously entered values for this field.', 'BOOLEAN', FALSE, TRUE),
238
244
('minlength', 'Minimum length of text allowed in the field.', 'NUMBER', FALSE, TRUE),
239
245
('maxlength', 'Maximum length of text allowed in the field.', 'NUMBER', FALSE, TRUE),
240
246
('formaction', 'When type is "submit", this specifies the URL of the file that will handle the form submission. Useful when you need multiple submit buttons.', 'TEXT', FALSE, TRUE),
241
247
('class', 'A CSS class to apply to the form element.', 'TEXT', FALSE, TRUE),
242
248
('prefix_icon','Icon to display on the left side of the input field, on the same line.','ICON',FALSE,TRUE),
243
249
('prefix','Text to display on the left side of the input field, on the same line.','TEXT',FALSE,TRUE),
244
250
('suffix','Short text to display after th input, on the same line. Useful to add units or a currency symbol to an input.','TEXT',FALSE,TRUE),
245
-
('readonly','Set to true to prevent the user from modifying the value of the input field.','BOOL',FALSE,TRUE),
246
-
('disabled','Makes the field non-editable, non-focusable, and not submitted with the form. Use readonly instead for simple non-editable fields.','BOOL',FALSE,TRUE),
251
+
('readonly','Set to true to prevent the user from modifying the value of the input field.','BOOLEAN',FALSE,TRUE),
252
+
('disabled','Makes the field non-editable, non-focusable, and not submitted with the form. Use readonly instead for simple non-editable fields.','BOOLEAN',FALSE,TRUE),
247
253
('id','A unique identifier for the input, which can then be used to select and manage the field with Javascript code. Usefull for advanced using as setting client side event listeners, interactive control of input field (disabled, visibility, read only, e.g.) and AJAX requests.','TEXT',FALSE,TRUE)
248
254
) x;
249
255
INSERT INTO example(component, description, properties) VALUES
0 commit comments