Skip to content

Commit 4569825

Browse files
authored
Advanced formulas: Add formula type and category (baserow#4133)
* Add formula type and category * Rename 'formula' to 'function' to be more accurate * Add getOperatorSymbol() method
1 parent 3988349 commit 4569825

File tree

6 files changed

+388
-18
lines changed

6 files changed

+388
-18
lines changed

web-frontend/locales/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,12 @@
670670
"randomIntDescription": "Returns a random integer from the range specified by the arguments.",
671671
"randomFloatDescription": "Returns a random float from the range specified by the arguments.",
672672
"randomBoolDescription": "Returns a random boolean of true or false.",
673-
"generateUUIDDescription": "Returns a random UUID4 string."
673+
"generateUUIDDescription": "Returns a random UUID4 string.",
674+
"formulaTypeFormula": "Formula",
675+
"formulaTypeOperator": "Operator",
676+
"categoryText": "Text",
677+
"categoryNumber": "Number",
678+
"categoryBoolean": "Boolean",
679+
"categoryDate": "Date"
674680
}
675681
}
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

web-frontend/modules/core/assets/scss/variables.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ $baserow-icon-prefix: 'baserow-icon-';
7777
$baserow-icons: 'circle-empty', 'circle-checked', 'check-square', 'formula',
7878
'hashtag', 'more-horizontal', 'more-vertical', 'reddit', 'single-select',
7979
'twitter', 'lock-open', 'flag', 'heart', 'star', 'thumbs-up', 'history',
80-
'facebook', 'linkedin', 'gitlab', 'file-csv', 'file-pdf', 'file-image',
80+
'facebook', 'linkedin', 'gitlab', 'file', 'file-csv', 'file-pdf', 'file-image',
8181
'file-audio', 'file-video', 'file-code', 'tablet', 'form', 'file-excel',
8282
'kanban', 'file-word', 'file-archive', 'gallery', 'file-powerpoint',
8383
'calendar', 'smile', 'smartphone', 'plus', 'heading-1', 'heading-2',
8484
'heading-3', 'paragraph', 'ordered-list', 'enlarge', 'share', 'settings',
85-
'up-down-arrows', 'application', 'groups', 'timeline', 'dashboard', 'jira',
86-
'postgresql', 'hubspot', 'separator', 'spacer', 'automation', 'sidebar',
87-
'enlarge-row', 'bar-chart', 'line-chart', 'pie-chart', 'donut-chart',
88-
'dependency';
85+
'up-down-arrows', 'application', 'groups', 'text', 'timeline', 'dashboard',
86+
'jira', 'postgresql', 'hubspot', 'separator', 'spacer', 'automation',
87+
'sidebar', 'enlarge-row', 'bar-chart', 'line-chart', 'pie-chart',
88+
'donut-chart', 'dependency';
8989

9090
$grid-view-row-height-small: 33px;
9191
$grid-view-row-height-medium: 55px;

web-frontend/modules/core/enums.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,31 @@ export const RATING_STYLES = {
4949
FLAG: 'flag',
5050
SMILE: 'smile',
5151
}
52+
53+
export const FORMULA_TYPE = {
54+
FUNCTION: 'function',
55+
OPERATOR: 'operator',
56+
}
57+
58+
export const FORMULA_CATEGORY = {
59+
TEXT: {
60+
category: 'categoryText',
61+
iconClass: 'baserow-icon-text',
62+
},
63+
NUMBER: {
64+
category: 'categoryNumber',
65+
iconClass: 'baserow-icon-hashtag',
66+
},
67+
BOOLEAN: {
68+
category: 'categoryBoolean',
69+
iconClass: 'baserow-icon-circle-checked',
70+
},
71+
DATE: {
72+
category: 'categoryDate',
73+
iconClass: 'iconoir-calendar',
74+
},
75+
FILE: {
76+
category: 'categoryFile',
77+
iconClass: 'baserow-icon-file',
78+
},
79+
}

0 commit comments

Comments
 (0)