ToolJet/frontend/src/_ui/Select/SelectComponent.jsx

84 lines
2.2 KiB
React
Raw Normal View History

import React from 'react';
import _ from 'lodash';
import Select from 'react-select';
import defaultStyles from './styles';
Feature Homepage and settings redesign (#5763) * adding colors * feat :: add button * feat :: added typography * feat: init storybook * removes browserlist * feat :: adding button styles and button component * feat :: added sass addon * stories update * feat :: replacing with radix colors * danger variants * updates buttin story * fix :: removing default items * cleanup * fix icons update * feat :: folder list component * fix :: naming * icon and split button :: init * intermediate save :: app card component * renaming * updates * update for module imports * updates icon * update :: homepage design updates * design changes dashboard * updates :: apps section * workspace stting new design upate * updates dasboard design * style :: fixes * feat :: added context for sidebar nav breadcrumb * added all solid icons * intermediate update * change: conditions for fetching users * sorybook updates * design updates :: workspace settings page * manage users page * lint fixes * fix :: styling * stle fixes :: workspace settings * homepage redesign * fix :: all drawer colors and position ,teplate page revamp , database page header fixes * imported all bulk icons * svg to jsx : bulk icons * minor :: cleanup * fix :: manage users drawer * fix :: searchboxes , userspage fixes * fix :: all inputs and minor ui fixes * database page ui fixes * fix :: database and folder search functionality and iconlist in homecard * fixed some db functionality and edge cases for longer texts * fix :: user addition manage user page * self review cleanup and change in bulk icon fill state * fix :: homepage seacbar * merging develop and resolving conflicts * remove unwanted stories * reverting merge with develop * Revert "reverting merge with develop" This reverts commit 2150c8ec0ce9cedda4f4676211faa3321d4af7f8. * clearing out warnings * lint fixes * feat :: added org modal in database page * fix :: sso loader theme * fix :: broken styles select * fixed icon warning and select ui * fix :: upload bulk and user select dark mode * merge styles with develop * feat :: integrated new ui for database * removing storybook files * fix :: all bugs related to users dropdown and cleanup * fix: user search api for organization page * cleanup and splitting dropzone component * fix :: overflow issue in app card time * fix for scrollbars in homepage * PR review fixes * updates :: fix d=global datasource design issues , homepage responsiveness * tj db operations * breadcrumb bug fixes * lint fixes * removing logs , removed fade in in datasource and database page * marketplace page ui fix * removing inital users table fetch * Pr :: review changes * remove logs * fix :: popover bug * minot style fix * fix :: remove arrow from all popovers * fix :: for loading states * ux :: sidebar items reorder * style :: fix * style fix :: templates * fix :: qa bugs * fix :: Qa reported bugs * removes :: folder fetch bug * share link and datsource bg color fix * fixes :: rename group , * removed logs * pages popover background fix * fix :: tj db table addition ui bug * fix :: ui bug confirm modal password disable * modal , revert name capitalize in lists, typos fix * typos , users page route bugfix * users page header bugfix * workspace archive btn , datasources form style for select * groups updated , delete, create flow updated * avatar bug in profile page fix * revert styles * fix :: for create new table nav breadcrumb not being updated * click state bug fix in avatar * fix bug with appcard popover * fix :: text capitalize issue * fix :: lints and updated icon for filter delete * fix warnings --------- Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Vijaykant Yadav <vjy239@gmail.com>
2023-04-21 06:15:48 +00:00
export const SelectComponent = ({
options = [],
value,
onChange,
closeMenuOnSelect,
Feat :: Editor UI revamp (#7275) * temp commit :: editor redesign * fix :: components panel ui * style updates * fix :: arrangement widget list * fix :: light mode widget list * style fixes query manager * updates * updates heaer styles * global settings fix * left sidebar states and icon change * cleanup * minor fixes :: review * fix opacity mode toggle * detailing in hover states , bugfixes * fix :: coloring whole app , debugger ui * cleanup * fix :: revert some changes , fix statistics widget * feat :: navbar with new layout * fix :: lint warnings * cleanup * cleanup * minor fixes * fix :: reusing serchbox * removed unwanted prop * Revert "cleanup" This reverts commit b18abe19fbd82246611153634c79934ad9012101. * fix :: icons sidebar * fix :: padding searchbar * style fix * radix :: dark theme for portals * fix :: icon styles * fix :: all codehinter styles * update :: base bg color app * fix :: viewer color * minor fixes :: icon left sidebar * typo * fix :: styling save message header * icon :: fix for layout and inspector queries * fix :: canvas and editor bg * fix :: release btn style * fix :: navbar border * undo redo tooltip * fix :: page input * remove released btn icon * fix :: for icon not loading proper in inspector * fix :: dark mode toggle icon size * fix :: share app ui * fix :: style fixes , inspector runpy icon * fix :: ui runpy codehinter * fix :: inputs in gds connection * cleanup * fix :: copilot codehinter ui * fix :: share modal button * fix :: canvas bg text * style fix debugger * fix :: whole dahsboard layout and border for all codehinters * fix :: icon fills * fix :: icon fill color sidebar * darkmode fill color * minor style fix * Widget inspector redesign (#7355) * Setup Storybook * Update storybook config * Add tab and toggle group component * Created list component * Properties tab * update codehinter dropdown components * Refactor styling * Inspector header changes * Fix es lint issue * Fix * feat :: styling color picker styles panel * Fix color picker alignment * feat :: remove alpha * Fix UI bugs * fix :: color picker * Ui fix * Backward compatible pagination changes * fix * Feedback changes * UI feedback * Check fix * Fix * fix :: canvas bg popover * Styles fix * Fix conflct issues * minor style fix style tab * Fix * review comments fix :: hovering in color picker * Code review and design feedback * UI feedback * Fix UI styles * Fix pagination issue * fix :: dark mode issues in select , number input * fix :: remove extra boreder * fix :: table column popover ui and component popover inspector * fix :: datepickre input table column * fix :: colopicker in table column inspector * fix :: link column type ui in table * fix :: column delete ui and delete not triggering * Fix list item not dragging * fix :: closing of popover on link column select * style fix table popover * Pass dark mode to Event manager button * fix :: ux event manager * cleanup * cleanup * fix :: delete page modal ui --------- Co-authored-by: stepinfwd <stepinfwd@gmail.com> * style fixes --------- Co-authored-by: Nakul Nagargade <133095394+nakulnagargade@users.noreply.github.com>
2023-09-04 08:00:39 +00:00
classNamePrefix,
darkMode,
Feature Homepage and settings redesign (#5763) * adding colors * feat :: add button * feat :: added typography * feat: init storybook * removes browserlist * feat :: adding button styles and button component * feat :: added sass addon * stories update * feat :: replacing with radix colors * danger variants * updates buttin story * fix :: removing default items * cleanup * fix icons update * feat :: folder list component * fix :: naming * icon and split button :: init * intermediate save :: app card component * renaming * updates * update for module imports * updates icon * update :: homepage design updates * design changes dashboard * updates :: apps section * workspace stting new design upate * updates dasboard design * style :: fixes * feat :: added context for sidebar nav breadcrumb * added all solid icons * intermediate update * change: conditions for fetching users * sorybook updates * design updates :: workspace settings page * manage users page * lint fixes * fix :: styling * stle fixes :: workspace settings * homepage redesign * fix :: all drawer colors and position ,teplate page revamp , database page header fixes * imported all bulk icons * svg to jsx : bulk icons * minor :: cleanup * fix :: manage users drawer * fix :: searchboxes , userspage fixes * fix :: all inputs and minor ui fixes * database page ui fixes * fix :: database and folder search functionality and iconlist in homecard * fixed some db functionality and edge cases for longer texts * fix :: user addition manage user page * self review cleanup and change in bulk icon fill state * fix :: homepage seacbar * merging develop and resolving conflicts * remove unwanted stories * reverting merge with develop * Revert "reverting merge with develop" This reverts commit 2150c8ec0ce9cedda4f4676211faa3321d4af7f8. * clearing out warnings * lint fixes * feat :: added org modal in database page * fix :: sso loader theme * fix :: broken styles select * fixed icon warning and select ui * fix :: upload bulk and user select dark mode * merge styles with develop * feat :: integrated new ui for database * removing storybook files * fix :: all bugs related to users dropdown and cleanup * fix: user search api for organization page * cleanup and splitting dropzone component * fix :: overflow issue in app card time * fix for scrollbars in homepage * PR review fixes * updates :: fix d=global datasource design issues , homepage responsiveness * tj db operations * breadcrumb bug fixes * lint fixes * removing logs , removed fade in in datasource and database page * marketplace page ui fix * removing inital users table fetch * Pr :: review changes * remove logs * fix :: popover bug * minot style fix * fix :: remove arrow from all popovers * fix :: for loading states * ux :: sidebar items reorder * style :: fix * style fix :: templates * fix :: qa bugs * fix :: Qa reported bugs * removes :: folder fetch bug * share link and datsource bg color fix * fixes :: rename group , * removed logs * pages popover background fix * fix :: tj db table addition ui bug * fix :: ui bug confirm modal password disable * modal , revert name capitalize in lists, typos fix * typos , users page route bugfix * users page header bugfix * workspace archive btn , datasources form style for select * groups updated , delete, create flow updated * avatar bug in profile page fix * revert styles * fix :: for create new table nav breadcrumb not being updated * click state bug fix in avatar * fix bug with appcard popover * fix :: text capitalize issue * fix :: lints and updated icon for filter delete * fix warnings --------- Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Vijaykant Yadav <vjy239@gmail.com>
2023-04-21 06:15:48 +00:00
...restProps
}) => {
const isDarkMode = darkMode ?? localStorage.getItem('darkMode') === 'true';
const {
isMulti = false,
styles = {},
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
isLoading = false,
hasSearch = true,
height,
width,
placeholder = 'Select..',
customOption = undefined,
defaultValue = null,
2023-01-25 12:32:39 +00:00
useMenuPortal = true, // todo: deprecate this prop, use menuPortalTarget instead
maxMenuHeight = 250,
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
menuPortalTarget = null,
menuPlacement = 'auto',
useCustomStyles = false,
isDisabled = false,
} = restProps;
const customStyles = useCustomStyles ? styles : defaultStyles(isDarkMode, width, height, styles);
const selectOptions =
Array.isArray(options) && options.length === 0
? options
: options.map((option) => {
if (!option.hasOwnProperty('label')) {
return _.mapKeys(option, (value, key) => (key === 'value' ? key : 'label'));
}
return option;
});
const currentValue = selectOptions.find((option) => option.value === value) || value;
const handleOnChange = (data) => {
if (isMulti) {
onChange(data);
} else {
onChange(data.value);
}
};
const renderCustomOption = (option) => {
if (customOption) {
return customOption(option);
}
return option.label;
};
return (
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
<Select
{...restProps}
defaultValue={defaultValue}
isLoading={isLoading}
isDisabled={isDisabled || isLoading}
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
options={selectOptions}
value={currentValue}
isSearchable={hasSearch}
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
onChange={handleOnChange}
placeholder={placeholder}
styles={customStyles}
formatOptionLabel={(option) => renderCustomOption(option)}
menuPlacement={menuPlacement}
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
maxMenuHeight={maxMenuHeight}
menuPortalTarget={useMenuPortal ? document.body : menuPortalTarget}
Feature Homepage and settings redesign (#5763) * adding colors * feat :: add button * feat :: added typography * feat: init storybook * removes browserlist * feat :: adding button styles and button component * feat :: added sass addon * stories update * feat :: replacing with radix colors * danger variants * updates buttin story * fix :: removing default items * cleanup * fix icons update * feat :: folder list component * fix :: naming * icon and split button :: init * intermediate save :: app card component * renaming * updates * update for module imports * updates icon * update :: homepage design updates * design changes dashboard * updates :: apps section * workspace stting new design upate * updates dasboard design * style :: fixes * feat :: added context for sidebar nav breadcrumb * added all solid icons * intermediate update * change: conditions for fetching users * sorybook updates * design updates :: workspace settings page * manage users page * lint fixes * fix :: styling * stle fixes :: workspace settings * homepage redesign * fix :: all drawer colors and position ,teplate page revamp , database page header fixes * imported all bulk icons * svg to jsx : bulk icons * minor :: cleanup * fix :: manage users drawer * fix :: searchboxes , userspage fixes * fix :: all inputs and minor ui fixes * database page ui fixes * fix :: database and folder search functionality and iconlist in homecard * fixed some db functionality and edge cases for longer texts * fix :: user addition manage user page * self review cleanup and change in bulk icon fill state * fix :: homepage seacbar * merging develop and resolving conflicts * remove unwanted stories * reverting merge with develop * Revert "reverting merge with develop" This reverts commit 2150c8ec0ce9cedda4f4676211faa3321d4af7f8. * clearing out warnings * lint fixes * feat :: added org modal in database page * fix :: sso loader theme * fix :: broken styles select * fixed icon warning and select ui * fix :: upload bulk and user select dark mode * merge styles with develop * feat :: integrated new ui for database * removing storybook files * fix :: all bugs related to users dropdown and cleanup * fix: user search api for organization page * cleanup and splitting dropzone component * fix :: overflow issue in app card time * fix for scrollbars in homepage * PR review fixes * updates :: fix d=global datasource design issues , homepage responsiveness * tj db operations * breadcrumb bug fixes * lint fixes * removing logs , removed fade in in datasource and database page * marketplace page ui fix * removing inital users table fetch * Pr :: review changes * remove logs * fix :: popover bug * minot style fix * fix :: remove arrow from all popovers * fix :: for loading states * ux :: sidebar items reorder * style :: fix * style fix :: templates * fix :: qa bugs * fix :: Qa reported bugs * removes :: folder fetch bug * share link and datsource bg color fix * fixes :: rename group , * removed logs * pages popover background fix * fix :: tj db table addition ui bug * fix :: ui bug confirm modal password disable * modal , revert name capitalize in lists, typos fix * typos , users page route bugfix * users page header bugfix * workspace archive btn , datasources form style for select * groups updated , delete, create flow updated * avatar bug in profile page fix * revert styles * fix :: for create new table nav breadcrumb not being updated * click state bug fix in avatar * fix bug with appcard popover * fix :: text capitalize issue * fix :: lints and updated icon for filter delete * fix warnings --------- Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Vijaykant Yadav <vjy239@gmail.com>
2023-04-21 06:15:48 +00:00
closeMenuOnSelect={closeMenuOnSelect ?? true}
classNamePrefix={`${isDarkMode && 'dark-theme'} ${'react-select'}`}
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
/>
);
};