Removed all v2 in naming of state management logic (#13675)
This PR removes any V2 naming in state management logic and some minor utils and hooks. It has a lot of changes but nearly all of them were made by the rename functionality of vscode which is deterministic, so it shouldn't introduce any regression. QA has been made on this PR on the main features of the app without any noticeable issue. Also renamed some other v2 naming related items : - TextInputV2 => TextInput - TextInput => SettingsTextInput - ObjectFilterDropdownFilterSelectMenuItemV2 => ObjectFilterDropdownFilterSelectMenuItem - useInitDraftValueV2 => useInitDraftValue - useOpenRecordTableCellV2 => useOpenRecordTableCell
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ import { Controller, useForm } from 'react-hook-form';
|
||||
import { Key } from 'ts-key-enum';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { isValidHostname } from 'twenty-shared/utils';
|
||||
import { Button } from 'twenty-ui/input';
|
||||
@@ -94,7 +94,7 @@ export const SettingsAccountsBlocklistInput = ({
|
||||
name="emailOrDomain"
|
||||
control={control}
|
||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="settings-accounts-blocklist-input"
|
||||
placeholder="eddy@gmail.com, @apple.com"
|
||||
value={value}
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ import { SettingsNewAccountSection } from '@/settings/accounts/components/Settin
|
||||
import { SETTINGS_ACCOUNT_CALENDAR_CHANNELS_TAB_LIST_COMPONENT_ID } from '@/settings/accounts/constants/SettingsAccountCalendarChannelsTabListComponentId';
|
||||
import { TabList } from '@/ui/layout/tab-list/components/TabList';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import React from 'react';
|
||||
|
||||
const StyledCalenderContainer = styled.div`
|
||||
@@ -20,7 +20,7 @@ const StyledCalenderContainer = styled.div`
|
||||
`;
|
||||
|
||||
export const SettingsAccountsCalendarChannelsContainer = () => {
|
||||
const activeTabId = useRecoilComponentValueV2(
|
||||
const activeTabId = useRecoilComponentValue(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ACCOUNT_CALENDAR_CHANNELS_TAB_LIST_COMPONENT_ID,
|
||||
);
|
||||
|
||||
+11
-11
@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
|
||||
import { ConnectionFormData } from '@/settings/accounts/hooks/useImapSmtpCaldavConnectionForm';
|
||||
import { H2Title } from 'twenty-ui/display';
|
||||
@@ -89,7 +89,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="handle"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="email-address-connection-form"
|
||||
label={t`Email Address`}
|
||||
placeholder={t`john.doe@example.com`}
|
||||
@@ -114,7 +114,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="IMAP.host"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="imap-host-connection-form"
|
||||
label={t`IMAP Server`}
|
||||
placeholder={t`imap.example.com`}
|
||||
@@ -129,7 +129,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="IMAP.password"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="imap-password-connection-form"
|
||||
label={t`IMAP Password`}
|
||||
placeholder={t`••••••••`}
|
||||
@@ -147,7 +147,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="IMAP.port"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="imap-port-connection-form"
|
||||
label={t`IMAP Port`}
|
||||
type="number"
|
||||
@@ -197,7 +197,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="SMTP.host"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="smtp-host-connection-form"
|
||||
label={t`SMTP Server`}
|
||||
placeholder={t`smtp.example.com`}
|
||||
@@ -212,7 +212,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="SMTP.password"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="smtp-password-connection-form"
|
||||
label={t`SMTP Password`}
|
||||
placeholder={t`••••••••`}
|
||||
@@ -230,7 +230,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="SMTP.port"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="smtp-port-connection-form"
|
||||
label={t`SMTP Port`}
|
||||
type="number"
|
||||
@@ -280,7 +280,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="CALDAV.host"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="caldav-host-connection-form"
|
||||
label={t`CalDAV Server`}
|
||||
placeholder={t`caldav.example.com`}
|
||||
@@ -295,7 +295,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="CALDAV.username"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="caldav-username-connection-form"
|
||||
label={t`CalDAV Username`}
|
||||
placeholder={t`john.doe`}
|
||||
@@ -311,7 +311,7 @@ export const SettingsAccountsConnectionForm = ({
|
||||
name="CALDAV.password"
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="caldav-password-connection-form"
|
||||
label={t`CalDAV Password`}
|
||||
placeholder={t`••••••••`}
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ import { SettingsNewAccountSection } from '@/settings/accounts/components/Settin
|
||||
import { SETTINGS_ACCOUNT_MESSAGE_CHANNELS_TAB_LIST_COMPONENT_ID } from '@/settings/accounts/constants/SettingsAccountMessageChannelsTabListComponentId';
|
||||
import { TabList } from '@/ui/layout/tab-list/components/TabList';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import React from 'react';
|
||||
|
||||
const StyledMessageContainer = styled.div`
|
||||
@@ -19,7 +19,7 @@ const StyledMessageContainer = styled.div`
|
||||
`;
|
||||
|
||||
export const SettingsAccountsMessageChannelsContainer = () => {
|
||||
const activeTabId = useRecoilComponentValueV2(
|
||||
const activeTabId = useRecoilComponentValue(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ACCOUNT_MESSAGE_CHANNELS_TAB_LIST_COMPONENT_ID,
|
||||
);
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@ import { canManageFeatureFlagsState } from '@/client-config/states/canManageFeat
|
||||
import { SettingsAdminWorkspaceContent } from '@/settings/admin-panel/components/SettingsAdminWorkspaceContent';
|
||||
import { userLookupResultState } from '@/settings/admin-panel/states/userLookupResultState';
|
||||
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { TabList } from '@/ui/layout/tab-list/components/TabList';
|
||||
import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo';
|
||||
import styled from '@emotion/styled';
|
||||
@@ -18,7 +18,7 @@ import { SettingsAdminTableCard } from '@/settings/admin-panel/components/Settin
|
||||
import { SettingsAdminVersionContainer } from '@/settings/admin-panel/components/SettingsAdminVersionContainer';
|
||||
import { SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID } from '@/settings/admin-panel/constants/SettingsAdminUserLookupWorkspaceTabsId';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentStateV2';
|
||||
import { useRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentState';
|
||||
import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';
|
||||
import {
|
||||
H2Title,
|
||||
@@ -41,7 +41,7 @@ export const SettingsAdminGeneral = () => {
|
||||
const [userIdentifier, setUserIdentifier] = useState('');
|
||||
const { enqueueErrorSnackBar } = useSnackBar();
|
||||
|
||||
const [activeTabId, setActiveTabId] = useRecoilComponentStateV2(
|
||||
const [activeTabId, setActiveTabId] = useRecoilComponentState(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID,
|
||||
);
|
||||
@@ -155,7 +155,7 @@ export const SettingsAdminGeneral = () => {
|
||||
/>
|
||||
|
||||
<StyledContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="admin-user-lookup"
|
||||
value={userIdentifier}
|
||||
onChange={setUserIdentifier}
|
||||
|
||||
+2
-2
@@ -4,10 +4,10 @@ import { SETTINGS_ADMIN_TABS } from '@/settings/admin-panel/constants/SettingsAd
|
||||
import { SETTINGS_ADMIN_TABS_ID } from '@/settings/admin-panel/constants/SettingsAdminTabsId';
|
||||
import { SettingsAdminHealthStatus } from '@/settings/admin-panel/health-status/components/SettingsAdminHealthStatus';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
|
||||
export const SettingsAdminTabContent = () => {
|
||||
const activeTabId = useRecoilComponentValueV2(
|
||||
const activeTabId = useRecoilComponentValue(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ADMIN_TABS_ID,
|
||||
);
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@ import { CustomError } from '@/error-handler/CustomError';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { SelectControl } from '@/ui/input/components/SelectControl';
|
||||
import { TextArea } from '@/ui/input/components/TextArea';
|
||||
import { TextInputV2 } from '@/ui/input/components/TextInputV2';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
|
||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||
@@ -78,7 +78,7 @@ export const ConfigVariableDatabaseInput = ({
|
||||
|
||||
case ConfigVariableType.NUMBER:
|
||||
return (
|
||||
<TextInputV2
|
||||
<TextInput
|
||||
label={label}
|
||||
value={value !== null && value !== undefined ? String(value) : ''}
|
||||
onChange={(text) => {
|
||||
@@ -173,7 +173,7 @@ export const ConfigVariableDatabaseInput = ({
|
||||
|
||||
case ConfigVariableType.STRING:
|
||||
return (
|
||||
<TextInputV2
|
||||
<TextInput
|
||||
label={label}
|
||||
value={
|
||||
typeof value === 'string'
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { IconSearch } from 'twenty-ui/display';
|
||||
|
||||
const StyledSearchInput = styled(TextInput)`
|
||||
const StyledSearchInput = styled(SettingsTextInput)`
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
|
||||
+2
-7
@@ -1,7 +1,7 @@
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
|
||||
import { isConfigVariablesInDbEnabledState } from '@/client-config/states/isConfigVariablesInDbEnabledState';
|
||||
import { TextInputV2 } from '@/ui/input/components/TextInputV2';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { ConfigVariableValue } from 'twenty-shared/types';
|
||||
@@ -45,12 +45,7 @@ export const ConfigVariableValueInput = ({
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<TextInputV2
|
||||
value={String(value)}
|
||||
disabled
|
||||
label={t`Value`}
|
||||
fullWidth
|
||||
/>
|
||||
<TextInput value={String(value)} disabled label={t`Value`} fullWidth />
|
||||
)}
|
||||
</StyledValueContainer>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { IconMinus, IconPlus } from 'twenty-ui/display';
|
||||
import { IconButton } from 'twenty-ui/input';
|
||||
@@ -20,7 +20,7 @@ const StyledCounterContainer = styled.div`
|
||||
width: ${({ theme }) => theme.spacing(30)};
|
||||
`;
|
||||
|
||||
const StyledTextInput = styled(TextInput)`
|
||||
const StyledTextInput = styled(SettingsTextInput)`
|
||||
width: ${({ theme }) => theme.spacing(16)};
|
||||
input {
|
||||
width: ${({ theme }) => theme.spacing(16)};
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsO
|
||||
import { DATABASE_IDENTIFIER_MAXIMUM_LENGTH } from '@/settings/data-model/constants/DatabaseIdentifierMaximumLength';
|
||||
import { getErrorMessageFromError } from '@/settings/data-model/fields/forms/utils/errorMessages';
|
||||
import { IconPicker } from '@/ui/input/components/IconPicker';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { FieldMetadataType } from 'twenty-shared/types';
|
||||
@@ -158,7 +158,7 @@ export const SettingsDataModelFieldIconLabelForm = ({
|
||||
control={control}
|
||||
defaultValue={fieldMetadataItem?.label}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={labelTextInputId}
|
||||
placeholder={t`Employees`}
|
||||
value={value}
|
||||
@@ -193,7 +193,7 @@ export const SettingsDataModelFieldIconLabelForm = ({
|
||||
defaultValue={fieldMetadataItem?.name}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={nameTextInputId}
|
||||
label={t`API Name`}
|
||||
placeholder={t`employees`}
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import { useSelectSettingsFormInitialValues } from '@/settings/data-model/fields
|
||||
import { FieldType } from '@/settings/data-model/types/FieldType';
|
||||
import { SettingsFieldType } from '@/settings/data-model/types/SettingsFieldType';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
@@ -58,7 +58,7 @@ const StyledCardContainer = styled.div`
|
||||
width: calc(50% - ${({ theme }) => theme.spacing(1)});
|
||||
`;
|
||||
|
||||
const StyledSearchInput = styled(TextInput)`
|
||||
const StyledSearchInput = styled(SettingsTextInput)`
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ import { useDateSettingsFormInitialValues } from '@/settings/data-model/fields/f
|
||||
import { getDisplayFormatLabel } from '@/settings/data-model/fields/forms/date/utils/getDisplayFormatLabel';
|
||||
import { getDisplayFormatSelectDescription } from '@/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { IconSlash } from 'twenty-ui/display';
|
||||
@@ -34,7 +34,7 @@ export const settingsDataModelFieldDateFormSchema = z.object({
|
||||
settings: fieldDateSettings.optional(),
|
||||
});
|
||||
|
||||
const StyledTextInput = styled(TextInput)`
|
||||
const StyledTextInput = styled(SettingsTextInput)`
|
||||
padding: ${({ theme }) => theme.spacing(4)};
|
||||
padding-top: 0;
|
||||
`;
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ import { RELATION_TYPES } from '@/settings/data-model/constants/RelationTypes';
|
||||
import { useRelationSettingsFormInitialValues } from '@/settings/data-model/fields/forms/relation/hooks/useRelationSettingsFormInitialValues';
|
||||
import { IconPicker } from '@/ui/input/components/IconPicker';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { useIcons } from 'twenty-ui/display';
|
||||
@@ -186,7 +186,7 @@ export const SettingsDataModelFieldRelationForm = ({
|
||||
control={control}
|
||||
defaultValue={initialRelationFieldMetadataItem.label}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="relation-field-label"
|
||||
disabled={disableFieldEdition}
|
||||
placeholder={t`Field name`}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { FieldMetadataItemOption } from '@/object-metadata/types/FieldMetadataItem';
|
||||
import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
|
||||
import { OPTION_VALUE_MAXIMUM_LENGTH } from '@/settings/data-model/constants/OptionValueMaximumLength';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
|
||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||
@@ -50,7 +50,7 @@ const StyledColorSample = styled(ColorSample)`
|
||||
margin-left: ${({ theme }) => theme.spacing(3.5)};
|
||||
`;
|
||||
|
||||
const StyledOptionInput = styled(TextInput)`
|
||||
const StyledOptionInput = styled(SettingsTextInput)`
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
& input {
|
||||
|
||||
+4
-4
@@ -4,8 +4,8 @@ import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsO
|
||||
import { OBJECT_NAME_MAXIMUM_LENGTH } from '@/settings/data-model/constants/ObjectNameMaximumLength';
|
||||
import { SettingsDataModelObjectAboutFormValues } from '@/settings/data-model/validation-schemas/settingsDataModelObjectAboutFormSchema';
|
||||
import { IconPicker } from '@/ui/input/components/IconPicker';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { TextArea } from '@/ui/input/components/TextArea';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
@@ -153,7 +153,7 @@ export const SettingsDataModelObjectAboutForm = ({
|
||||
control={control}
|
||||
defaultValue={objectMetadataItem?.labelSingular ?? ''}
|
||||
render={({ field: { onChange, value }, formState: { errors } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={labelSingularTextInputId}
|
||||
// TODO we should discuss on how to notify user about form validation schema issue, from now just displaying red borders
|
||||
noErrorHelper={true}
|
||||
@@ -185,7 +185,7 @@ export const SettingsDataModelObjectAboutForm = ({
|
||||
control={control}
|
||||
defaultValue={objectMetadataItem?.labelPlural ?? ''}
|
||||
render={({ field: { onChange, value }, formState: { errors } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={labelPluralTextInputId}
|
||||
// TODO we should discuss on how to notify user about form validation schema issue, from now just displaying red borders
|
||||
noErrorHelper={true}
|
||||
@@ -270,7 +270,7 @@ export const SettingsDataModelObjectAboutForm = ({
|
||||
formState: { errors },
|
||||
}) => (
|
||||
<>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={`${objectMetadataItem?.id}-${fieldName}`}
|
||||
label={label}
|
||||
placeholder={placeholder}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { IconCopy } from 'twenty-ui/display';
|
||||
import { Button } from 'twenty-ui/input';
|
||||
@@ -23,7 +23,11 @@ export const ApiKeyInput = ({ apiKey }: ApiKeyInputProps) => {
|
||||
return (
|
||||
<StyledContainer>
|
||||
<StyledLinkContainer>
|
||||
<TextInput instanceId="api-key-display" value={apiKey} fullWidth />
|
||||
<SettingsTextInput
|
||||
instanceId="api-key-display"
|
||||
value={apiKey}
|
||||
fullWidth
|
||||
/>
|
||||
</StyledLinkContainer>
|
||||
<Button
|
||||
Icon={IconCopy}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ import styled from '@emotion/styled';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { useUpdateApiKeyMutation } from '~/generated-metadata/graphql';
|
||||
|
||||
@@ -64,7 +64,7 @@ export const ApiKeyNameInput = ({
|
||||
|
||||
return (
|
||||
<StyledComboInputContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={nameTextInputId}
|
||||
placeholder="E.g. backoffice integration"
|
||||
onChange={onNameUpdate}
|
||||
|
||||
+3
-3
@@ -8,8 +8,8 @@ import { WebhookFormMode } from '@/settings/developers/constants/WebhookFormMode
|
||||
import { useWebhookForm } from '@/settings/developers/hooks/useWebhookForm';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { TextArea } from '@/ui/input/components/TextArea';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||
import { useModal } from '@/ui/layout/modal/hooks/useModal';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
|
||||
@@ -159,7 +159,7 @@ export const SettingsDevelopersWebhookForm = ({
|
||||
fieldState: { error },
|
||||
}) => {
|
||||
return (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={targetUrlTextInputId}
|
||||
placeholder={t`https://example.com/webhook`}
|
||||
value={value}
|
||||
@@ -247,7 +247,7 @@ export const SettingsDevelopersWebhookForm = ({
|
||||
name="secret"
|
||||
control={formConfig.control}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={secretTextInputId}
|
||||
placeholder={t`Secret (optional)`}
|
||||
value={value || ''}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ import styled from '@emotion/styled';
|
||||
import { Controller, useFormContext } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
|
||||
export const settingsIntegrationPostgreSQLConnectionFormSchema = z.object({
|
||||
dbname: z.string().min(1),
|
||||
@@ -128,7 +128,7 @@ export const SettingsIntegrationDatabaseConnectionForm = ({
|
||||
control={control}
|
||||
render={({ field: { onChange, value } }) => {
|
||||
return (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={`${databaseKey}-${name}`}
|
||||
autoComplete="new-password" // Disable autocomplete
|
||||
label={label}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import { PlaygroundSchemas } from '@/settings/playground/types/PlaygroundSchemas
|
||||
import { PlaygroundTypes } from '@/settings/playground/types/PlaygroundTypes';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
@@ -116,7 +116,7 @@ export const PlaygroundSetupForm = () => {
|
||||
name="apiKeyForPlayground"
|
||||
control={control}
|
||||
render={({ field: { onChange, value }, fieldState: { error } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="playground-api-key"
|
||||
label={t`API Key`}
|
||||
placeholder="Enter your API key"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
|
||||
export const EmailField = () => {
|
||||
const currentUser = useRecoilValue(currentUserState);
|
||||
|
||||
return (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={`user-email-${currentUser?.id}`}
|
||||
value={currentUser?.email}
|
||||
disabled
|
||||
|
||||
@@ -8,7 +8,7 @@ import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { logError } from '~/utils/logError';
|
||||
|
||||
const StyledComboInputContainer = styled.div`
|
||||
@@ -114,7 +114,7 @@ export const NameFields = ({
|
||||
|
||||
return (
|
||||
<StyledComboInputContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={firstNameTextInputId}
|
||||
label={t`First Name`}
|
||||
value={firstName}
|
||||
@@ -122,7 +122,7 @@ export const NameFields = ({
|
||||
placeholder="Tim"
|
||||
fullWidth
|
||||
/>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={lastNameTextInputId}
|
||||
label={t`Last Name`}
|
||||
value={lastName}
|
||||
|
||||
+4
-4
@@ -11,13 +11,13 @@ import { SettingsRoleAssignmentConfirmationModalSelectedWorkspaceMember } from '
|
||||
import { settingsAllRolesSelector } from '@/settings/roles/states/settingsAllRolesSelector';
|
||||
import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||
import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
|
||||
import { useModal } from '@/ui/layout/modal/hooks/useModal';
|
||||
import { isModalOpenedComponentState } from '@/ui/layout/modal/states/isModalOpenedComponentState';
|
||||
import { TableCell } from '@/ui/layout/table/components/TableCell';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useState } from 'react';
|
||||
@@ -47,7 +47,7 @@ const StyledSearchContainer = styled.div`
|
||||
padding-bottom: ${({ theme }) => theme.spacing(2)};
|
||||
`;
|
||||
|
||||
const StyledSearchInput = styled(TextInput)`
|
||||
const StyledSearchInput = styled(SettingsTextInput)`
|
||||
input {
|
||||
background: ${({ theme }) => theme.background.transparent.lighter};
|
||||
border: 1px solid ${({ theme }) => theme.border.color.medium};
|
||||
@@ -157,7 +157,7 @@ export const SettingsRoleAssignment = ({
|
||||
closeDropdown(dropdownId);
|
||||
};
|
||||
|
||||
const isModalOpened = useRecoilComponentValueV2(
|
||||
const isModalOpened = useRecoilComponentValue(
|
||||
isModalOpenedComponentState,
|
||||
ROLE_ASSIGNMENT_CONFIRMATION_MODAL_ID,
|
||||
);
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ import { SettingsCard } from '@/settings/components/SettingsCard';
|
||||
import { useFilterObjectMetadataItemsWithPermissionOverride } from '@/settings/roles/role-permissions/object-level-permissions/hooks/useFilterObjectWithPermissionOverride';
|
||||
import { useObjectMetadataItemsThatCanHavePermission } from '@/settings/roles/role-permissions/object-level-permissions/hooks/useObjectMetadataItemsThatCanHavePermission';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
@@ -38,7 +38,7 @@ const StyledSearchContainer = styled.div`
|
||||
padding-bottom: ${({ theme }) => theme.spacing(2)};
|
||||
`;
|
||||
|
||||
const StyledSearchInput = styled(TextInput)`
|
||||
const StyledSearchInput = styled(SettingsTextInput)`
|
||||
input {
|
||||
background: ${({ theme }) => theme.background.transparent.lighter};
|
||||
border: 1px solid ${({ theme }) => theme.border.color.medium};
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ import { SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow } from
|
||||
import { useObjectPermissionDerivedStates } from '@/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/useObjectPermissionDerivedStates';
|
||||
import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';
|
||||
import { OrderBy } from '@/types/OrderBy';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { SortableTableHeader } from '@/ui/layout/table/components/SortableTableHeader';
|
||||
import { Table } from '@/ui/layout/table/components/Table';
|
||||
import { TableHeader } from '@/ui/layout/table/components/TableHeader';
|
||||
@@ -26,7 +26,7 @@ import { turnOrderByIntoSort } from '~/utils/turnOrderByIntoSort';
|
||||
export const SETTINGS_ROLE_PERMISSION_OBJECT_LEVEL_FIELD_PERMISSION_TABLE_ID =
|
||||
'settings-role-permissions-object-level-object-field-permission';
|
||||
|
||||
const StyledSearchInput = styled(TextInput)`
|
||||
const StyledSearchInput = styled(SettingsTextInput)`
|
||||
padding-bottom: ${({ theme }) => theme.spacing(2)};
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@ import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { ROLE_SETTINGS_DELETE_ROLE_CONFIRMATION_MODAL_ID } from '@/settings/roles/role-settings/components/constants/RoleSettingsDeleteRoleConfirmationModalId';
|
||||
import { SettingsRoleSettingsDeleteRoleConfirmationModal } from '@/settings/roles/role-settings/components/SettingsRoleSettingsDeleteRoleConfirmationModal';
|
||||
import { ROLE_SETTINGS_DELETE_ROLE_CONFIRMATION_MODAL_ID } from '@/settings/roles/role-settings/components/constants/RoleSettingsDeleteRoleConfirmationModalId';
|
||||
import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';
|
||||
import { IconPicker } from '@/ui/input/components/IconPicker';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { TextArea } from '@/ui/input/components/TextArea';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { useModal } from '@/ui/layout/modal/hooks/useModal';
|
||||
import { H2Title } from 'twenty-ui/display';
|
||||
import { Button } from 'twenty-ui/input';
|
||||
@@ -62,7 +62,7 @@ export const SettingsRoleSettings = ({
|
||||
disabled={!isEditable}
|
||||
/>
|
||||
</StyledInputContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={nameTextInputId}
|
||||
value={settingsDraftRole.label}
|
||||
fullWidth
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
|
||||
import { TabList } from '@/ui/layout/tab-list/components/TabList';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useState } from 'react';
|
||||
import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
@@ -33,7 +33,7 @@ type SettingsRoleProps = {
|
||||
};
|
||||
|
||||
export const SettingsRole = ({ roleId, isCreateMode }: SettingsRoleProps) => {
|
||||
const activeTabId = useRecoilComponentValueV2(
|
||||
const activeTabId = useRecoilComponentValue(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ROLE_DETAIL_TABS.COMPONENT_INSTANCE_ID + '-' + roleId,
|
||||
);
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ import { SETTINGS_ROLE_DETAIL_TABS } from '@/settings/roles/role/constants/Setti
|
||||
import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';
|
||||
import { settingsPersistedRoleFamilyState } from '@/settings/roles/states/settingsPersistedRoleFamilyState';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useSetRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentStateV2';
|
||||
import { useSetRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentState';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
@@ -22,7 +22,7 @@ export const SettingsRoleCreateEffect = ({
|
||||
settingsPersistedRoleFamilyState(roleId),
|
||||
);
|
||||
|
||||
const setActiveTabId = useSetRecoilComponentStateV2(
|
||||
const setActiveTabId = useSetRecoilComponentState(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ROLE_DETAIL_TABS.COMPONENT_INSTANCE_ID + '-' + roleId,
|
||||
);
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ import { SETTINGS_ROLE_DETAIL_TABS } from '@/settings/roles/role/constants/Setti
|
||||
import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';
|
||||
import { settingsPersistedRoleFamilyState } from '@/settings/roles/states/settingsPersistedRoleFamilyState';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useSetRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentStateV2';
|
||||
import { useSetRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentState';
|
||||
import { getSnapshotValue } from '@/ui/utilities/state/utils/getSnapshotValue';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useRecoilCallback, useRecoilValue } from 'recoil';
|
||||
@@ -20,7 +20,7 @@ export const SettingsRoleEditEffect = ({
|
||||
const [isInitialized, setIsInitialized] = useState(false);
|
||||
|
||||
const role = useRecoilValue(settingsPersistedRoleFamilyState(roleId));
|
||||
const setActiveTabId = useSetRecoilComponentStateV2(
|
||||
const setActiveTabId = useSetRecoilComponentState(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_ROLE_DETAIL_TABS.COMPONENT_INSTANCE_ID + '-' + roleId,
|
||||
);
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import { SettingsRadioCardContainer } from '@/settings/components/SettingsRadioC
|
||||
import { SettingsSSOOIDCForm } from '@/settings/security/components/SSO/SettingsSSOOIDCForm';
|
||||
import { SettingsSSOSAMLForm } from '@/settings/security/components/SSO/SettingsSSOSAMLForm';
|
||||
import { SettingSecurityNewSSOIdentityFormValues } from '@/settings/security/types/SSOIdentityProvider';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { ReactElement, useMemo } from 'react';
|
||||
@@ -87,7 +87,7 @@ export const SettingsSSOIdentitiesProvidersForm = () => {
|
||||
name="name"
|
||||
control={control}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-identity-provider-name"
|
||||
autoComplete="off"
|
||||
label={t`Name`}
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { Controller, useFormContext } from 'react-hook-form';
|
||||
@@ -51,7 +51,7 @@ export const SettingsSSOOIDCForm = () => {
|
||||
<StyledInputsContainer>
|
||||
<StyledContainer>
|
||||
<StyledLinkContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-oidc-authorized-uri"
|
||||
readOnly={true}
|
||||
label={t`Authorized URI`}
|
||||
@@ -75,7 +75,7 @@ export const SettingsSSOOIDCForm = () => {
|
||||
</StyledContainer>
|
||||
<StyledContainer>
|
||||
<StyledLinkContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-oidc-redirection-uri"
|
||||
readOnly={true}
|
||||
label={t`Redirection URI`}
|
||||
@@ -109,7 +109,7 @@ export const SettingsSSOOIDCForm = () => {
|
||||
name="clientID"
|
||||
control={control}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-oidc-client-id"
|
||||
autoComplete="off"
|
||||
label={t`Client ID`}
|
||||
@@ -124,7 +124,7 @@ export const SettingsSSOOIDCForm = () => {
|
||||
name="clientSecret"
|
||||
control={control}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-oidc-client-secret"
|
||||
autoComplete="off"
|
||||
type="password"
|
||||
@@ -140,7 +140,7 @@ export const SettingsSSOOIDCForm = () => {
|
||||
name="issuer"
|
||||
control={control}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-oidc-issuer"
|
||||
autoComplete="off"
|
||||
label={t`Issuer URI`}
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
|
||||
import { parseSAMLMetadataFromXMLFile } from '@/settings/security/utils/parseSAMLMetadataFromXMLFile';
|
||||
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
@@ -170,7 +170,7 @@ export const SettingsSSOSAMLForm = () => {
|
||||
<HorizontalSeparator text={'Or'} />
|
||||
<StyledContainer>
|
||||
<StyledLinkContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-saml-acs-url"
|
||||
disabled={true}
|
||||
label="ACS Url"
|
||||
@@ -191,7 +191,7 @@ export const SettingsSSOSAMLForm = () => {
|
||||
</StyledContainer>
|
||||
<StyledContainer>
|
||||
<StyledLinkContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="sso-saml-entity-id"
|
||||
disabled={true}
|
||||
label="Entity ID"
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { ServerlessFunctionNewFormValues } from '@/settings/serverless-functions/hooks/useServerlessFunctionUpdateFormState';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { TextArea } from '@/ui/input/components/TextArea';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import styled from '@emotion/styled';
|
||||
import { H2Title } from 'twenty-ui/display';
|
||||
import { Section } from 'twenty-ui/layout';
|
||||
@@ -25,7 +25,7 @@ export const SettingsServerlessFunctionNewForm = ({
|
||||
<Section>
|
||||
<H2Title title="About" description="Name and set your function" />
|
||||
<StyledInputsContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId={nameTextInputId}
|
||||
placeholder="Name"
|
||||
fullWidth
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import {
|
||||
import { SETTINGS_SERVERLESS_FUNCTION_TAB_LIST_COMPONENT_ID } from '@/settings/serverless-functions/constants/SettingsServerlessFunctionTabListComponentId';
|
||||
import { TabList } from '@/ui/layout/tab-list/components/TabList';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import styled from '@emotion/styled';
|
||||
import {
|
||||
H2Title,
|
||||
@@ -39,7 +39,7 @@ export const SettingsServerlessFunctionCodeEditorTab = ({
|
||||
onChange: (filePath: string, value: string) => void;
|
||||
setIsCodeValid: (isCodeValid: boolean) => void;
|
||||
}) => {
|
||||
const activeTabId = useRecoilComponentValueV2(
|
||||
const activeTabId = useRecoilComponentValue(
|
||||
activeTabIdComponentState,
|
||||
SETTINGS_SERVERLESS_FUNCTION_TAB_LIST_COMPONENT_ID,
|
||||
);
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
import { EnvironmentVariable } from '@/settings/serverless-functions/components/tabs/SettingsServerlessFunctionTabEnvironmentVariablesSection';
|
||||
import { TextInputV2 } from '@/ui/input/components/TextInputV2';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
|
||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||
@@ -46,7 +46,7 @@ export const SettingsServerlessFunctionTabEnvironmentVariableTableRow = ({
|
||||
return editMode ? (
|
||||
<StyledEditModeTableRow>
|
||||
<TableCell>
|
||||
<TextInputV2
|
||||
<TextInput
|
||||
autoFocus
|
||||
value={editedEnvVariable.key}
|
||||
onChange={(newKey) =>
|
||||
@@ -57,7 +57,7 @@ export const SettingsServerlessFunctionTabEnvironmentVariableTableRow = ({
|
||||
/>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<TextInputV2
|
||||
<TextInput
|
||||
value={editedEnvVariable.value}
|
||||
onChange={(newValue) =>
|
||||
setEditedEnvVariable({ ...editedEnvVariable, value: newValue })
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { SettingsServerlessFunctionTabEnvironmentVariableTableRow } from '@/settings/serverless-functions/components/tabs/SettingsServerlessFunctionTabEnvironmentVariableTableRow';
|
||||
import { ServerlessFunctionFormValues } from '@/settings/serverless-functions/hooks/useServerlessFunctionUpdateFormState';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { Table } from '@/ui/layout/table/components/Table';
|
||||
import { TableBody } from '@/ui/layout/table/components/TableBody';
|
||||
import { TableHeader } from '@/ui/layout/table/components/TableHeader';
|
||||
@@ -14,7 +14,7 @@ import { Section } from 'twenty-ui/layout';
|
||||
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
const StyledSearchInput = styled(TextInput)`
|
||||
const StyledSearchInput = styled(SettingsTextInput)`
|
||||
padding-bottom: ${({ theme }) => theme.spacing(2)};
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRecoilValue, useSetRecoilState } from 'recoil';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
|
||||
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import isEmpty from 'lodash.isempty';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
@@ -87,7 +87,7 @@ export const NameField = ({
|
||||
|
||||
return (
|
||||
<StyledComboInputContainer>
|
||||
<TextInput
|
||||
<SettingsTextInput
|
||||
instanceId="workspace-name"
|
||||
label={t`Name`}
|
||||
value={displayName}
|
||||
|
||||
Reference in New Issue
Block a user