@devtron-labs/devtron-fe-common-lib 1.15.1-beta-5 → 1.15.1-pre-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-D3u1HU6g.js → @code-editor-xNsLtfRd.js} +7908 -7788
- package/dist/{@common-rjsf-BWZsX9t4.js → @common-rjsf-iH1FvWN3.js} +222 -230
- package/dist/Common/Dialogs/Types.d.ts +0 -17
- package/dist/Common/Dialogs/index.d.ts +0 -1
- package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
- package/dist/Common/Types.d.ts +1 -43
- package/dist/Common/index.d.ts +0 -2
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +2 -46
- package/dist/Pages/ResourceBrowser/constants.d.ts +0 -2
- package/dist/Pages/ResourceBrowser/service.d.ts +1 -1
- package/dist/Shared/Analytics/analytics.d.ts +2 -0
- package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +2 -1
- package/dist/Shared/Components/CICDHistory/service.d.ts +1 -7
- package/dist/Shared/Components/CICDHistory/types.d.ts +2 -18
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +18 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffRadioSelect.d.ts +7 -0
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -0
- package/dist/Shared/Components/DocLink/types.d.ts +1 -0
- package/dist/Shared/Components/DocLink/utils.d.ts +1 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +9 -4
- package/dist/Shared/Components/Popover/types.d.ts +5 -0
- package/dist/Shared/Components/Popover/usePopover.hook.d.ts +1 -1
- package/dist/Shared/Components/Switch/Switch.component.d.ts +1 -1
- package/dist/Shared/Components/Switch/types.d.ts +11 -2
- package/dist/Shared/Components/Switch/utils.d.ts +2 -2
- package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +3 -0
- package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +2 -0
- package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +35 -0
- package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
- package/dist/Shared/Components/Textarea/types.d.ts +17 -1
- package/dist/Shared/Components/Textarea/utils.d.ts +5 -0
- package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
- package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
- package/dist/Shared/Components/Typewriter/BlinkingCursor.d.ts +1 -0
- package/dist/Shared/Components/Typewriter/index.d.ts +2 -0
- package/dist/Shared/Components/Typewriter/useTypewriter.d.ts +1 -0
- package/dist/Shared/Components/index.d.ts +2 -0
- package/dist/Shared/Helpers.d.ts +1 -2
- package/dist/Shared/Providers/index.d.ts +1 -0
- package/dist/Shared/Providers/types.d.ts +39 -12
- package/dist/Shared/Services/app.types.d.ts +7 -2
- package/dist/Shared/constants.d.ts +2 -1
- package/dist/Shared/types.d.ts +8 -4
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/@common-rjsf.css +1 -1
- package/dist/assets/ic-add.2d785695.svg +3 -0
- package/dist/assets/ic-asterisk.ab224e72.svg +3 -0
- package/dist/assets/ic-brain.838491eb.svg +3 -0
- package/dist/assets/ic-devtron-ai.535b45ec.svg +287 -0
- package/dist/assets/ic-folder-color.7cf84356.svg +6 -0
- package/dist/assets/{ic-minus.aac464f7.svg → ic-minus.416da21b.svg} +1 -1
- package/dist/assets/ic-paper-plane.ad7e6d2f.svg +3 -0
- package/dist/assets/ic-sparkle-ai-color.d123b325.svg +16 -0
- package/dist/assets/ic-sparkle-color.a9722593.svg +18 -0
- package/dist/assets/ic-stop-fill.32ea653f.svg +8 -0
- package/dist/assets/ic-world-globe.877fa6a0.svg +3 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +767 -773
- package/package.json +3 -3
- package/dist/Common/Dialogs/ConfirmationDialog.d.ts +0 -11
- package/dist/Common/InfoColorBar/InfoColourbar.d.ts +0 -6
- package/dist/Common/Toggle/Toggle.d.ts +0 -18
- package/dist/assets/ic-add.18a93616.svg +0 -19
- package/dist/assets/ic-container.92a4c33a.svg +0 -3
- package/dist/assets/ic-gavel.a3b064b5.svg +0 -3
- package/dist/assets/ic-sparkle-color.01c0be88.svg +0 -1
- package/dist/assets/ic-speedometer.3ecaae3b.svg +0 -3
- package/dist/assets/ic-two-cubes.056d1333.svg +0 -3
- /package/dist/assets/{ic-container-registry.4e1e6455.svg → ic-container.4e1e6455.svg} +0 -0
@@ -32,23 +32,6 @@ export interface ForceDeleteDialogType {
|
|
32
32
|
forceDeleteDialogTitle: string;
|
33
33
|
forceDeleteDialogMessage: string;
|
34
34
|
}
|
35
|
-
export interface ConfirmationDialogType {
|
36
|
-
className?: string;
|
37
|
-
children: any;
|
38
|
-
close?: (e: any) => void;
|
39
|
-
}
|
40
|
-
export interface ConfirmationDialogIconType {
|
41
|
-
src: string;
|
42
|
-
className?: string;
|
43
|
-
}
|
44
|
-
export interface ConfirmationDialogBodyType {
|
45
|
-
title: string;
|
46
|
-
subtitle?: ReactNode;
|
47
|
-
children?: any;
|
48
|
-
}
|
49
|
-
export interface ConfirmationDialogButtonGroupType {
|
50
|
-
children: any;
|
51
|
-
}
|
52
35
|
export interface DialogFormProps {
|
53
36
|
className: string;
|
54
37
|
title: string;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { WidgetProps } from '@rjsf/utils';
|
2
|
-
export declare const Checkbox: ({ id, onChange, value,
|
2
|
+
export declare const Checkbox: ({ id, onChange, value, disabled, readonly, autofocus, }: WidgetProps) => JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
3
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
4
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
5
|
-
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO,
|
5
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ComponentLayoutType, StatusType, DocLinkProps, DeploymentStrategyType } from '../Shared';
|
6
6
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
|
7
7
|
/**
|
8
8
|
* Generic response type object with support for overriding the result type
|
@@ -162,48 +162,6 @@ export declare enum ImageType {
|
|
162
162
|
Medium = "medium",
|
163
163
|
SMALL = "small"
|
164
164
|
}
|
165
|
-
interface InfoColourBarTextConfigType {
|
166
|
-
/**
|
167
|
-
* If given would be shown above the description, in bold
|
168
|
-
*/
|
169
|
-
heading?: string;
|
170
|
-
/**
|
171
|
-
* If given would be shown below the heading (if given)
|
172
|
-
*/
|
173
|
-
description: string;
|
174
|
-
actionButtonConfig?: ButtonProps;
|
175
|
-
}
|
176
|
-
type InfoColourBarMessageProp = {
|
177
|
-
message: ReactNode;
|
178
|
-
linkText?: ReactNode;
|
179
|
-
redirectLink?: string;
|
180
|
-
linkOnClick?: () => void;
|
181
|
-
linkClass?: string;
|
182
|
-
internalLink?: boolean;
|
183
|
-
textConfig?: never;
|
184
|
-
} | {
|
185
|
-
textConfig: InfoColourBarTextConfigType;
|
186
|
-
message?: never;
|
187
|
-
linkText?: never;
|
188
|
-
redirectLink?: never;
|
189
|
-
linkOnClick?: () => never;
|
190
|
-
linkClass?: never;
|
191
|
-
internalLink?: never;
|
192
|
-
};
|
193
|
-
export type InfoColourBarType = InfoColourBarMessageProp & {
|
194
|
-
classname: string;
|
195
|
-
Icon: any;
|
196
|
-
iconClass?: string;
|
197
|
-
iconSize?: number;
|
198
|
-
renderActionButton?: () => JSX.Element;
|
199
|
-
styles?: CSSProperties;
|
200
|
-
/**
|
201
|
-
* If true, the icon is not shown
|
202
|
-
*
|
203
|
-
* @default false
|
204
|
-
*/
|
205
|
-
hideIcon?: boolean;
|
206
|
-
};
|
207
165
|
export interface ReloadType {
|
208
166
|
reload?: (event?: any) => void;
|
209
167
|
className?: string;
|
package/dist/Common/index.d.ts
CHANGED
@@ -25,7 +25,6 @@ export * from './Helper';
|
|
25
25
|
export * from './Hooks';
|
26
26
|
export * from './ImageTags';
|
27
27
|
export * from './ImageTags.Types';
|
28
|
-
export { default as InfoColourBar } from './InfoColorBar/InfoColourbar';
|
29
28
|
export * from './Markdown';
|
30
29
|
export * from './Modals/Modal';
|
31
30
|
export * from './Modals/VisibleModal';
|
@@ -47,6 +46,5 @@ export { default as Select } from './Select/Select';
|
|
47
46
|
export * from './ServerError';
|
48
47
|
export * from './SortableTableHeaderCell';
|
49
48
|
export * from './TippyCustomized';
|
50
|
-
export { default as Toggle } from './Toggle/Toggle';
|
51
49
|
export * from './Tooltip';
|
52
50
|
export * from './Types';
|
@@ -1,7 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { GroupBase } from 'react-select';
|
3
|
-
import { ServerErrors } from '../../Common/ServerError';
|
4
|
-
import { SelectPickerOptionType } from '../../Shared/Components';
|
1
|
+
import { RefObject } from 'react';
|
5
2
|
import { Nodes, NodeType } from '../../Shared/types';
|
6
3
|
export interface GVKType {
|
7
4
|
Group: string;
|
@@ -37,37 +34,14 @@ export interface K8sResourceListPayloadType {
|
|
37
34
|
filter?: string;
|
38
35
|
k8sRequest: ResourceListPayloadK8sRequestType;
|
39
36
|
}
|
40
|
-
export declare enum ResourceRecommenderHeaderType {
|
41
|
-
NAME = "name",
|
42
|
-
NAMESPACE = "namespace",
|
43
|
-
KIND = "kind",
|
44
|
-
API_VERSION = "apiVersion",
|
45
|
-
CONTAINER_NAME = "containerName",
|
46
|
-
CPU_REQUEST = "cpuRequest",
|
47
|
-
CPU_LIMIT = "cpuLimit",
|
48
|
-
MEMORY_REQUEST = "memoryRequest",
|
49
|
-
MEMORY_LIMIT = "memoryLimit"
|
50
|
-
}
|
51
|
-
export type ResourceRecommenderHeaderWithStringValue = Extract<ResourceRecommenderHeaderType, ResourceRecommenderHeaderType.NAME | ResourceRecommenderHeaderType.NAMESPACE | ResourceRecommenderHeaderType.KIND | ResourceRecommenderHeaderType.API_VERSION | ResourceRecommenderHeaderType.CONTAINER_NAME>;
|
52
|
-
export type ResourceRecommenderHeaderWithRecommendation = Extract<ResourceRecommenderHeaderType, ResourceRecommenderHeaderType.CPU_REQUEST | ResourceRecommenderHeaderType.CPU_LIMIT | ResourceRecommenderHeaderType.MEMORY_REQUEST | ResourceRecommenderHeaderType.MEMORY_LIMIT>;
|
53
37
|
export type K8sResourceDetailDataType = {
|
54
38
|
[key: string]: string | number | object | boolean;
|
55
|
-
additionalMetadata?: Partial<Record<ResourceRecommenderHeaderWithRecommendation, {
|
56
|
-
current: {
|
57
|
-
value: string | 'none';
|
58
|
-
} | null;
|
59
|
-
recommended: {
|
60
|
-
value: string | 'none';
|
61
|
-
} | null;
|
62
|
-
delta: number | null;
|
63
|
-
}>>;
|
64
39
|
};
|
65
40
|
export interface K8sResourceDetailType {
|
66
41
|
headers: string[];
|
67
42
|
data: K8sResourceDetailDataType[];
|
68
43
|
}
|
69
44
|
export interface BulkSelectionActionWidgetProps {
|
70
|
-
isResourceRecommendationView: boolean;
|
71
45
|
count: number;
|
72
46
|
handleOpenBulkDeleteModal: () => void;
|
73
47
|
handleClearBulkSelection: () => void;
|
@@ -75,12 +49,11 @@ export interface BulkSelectionActionWidgetProps {
|
|
75
49
|
handleOpenUncordonNodeModal: () => void;
|
76
50
|
handleOpenDrainNodeModal: () => void;
|
77
51
|
handleOpenRestartWorkloadModal: () => void;
|
78
|
-
handleOpenApplyResourceRecommendationModal: () => void;
|
79
52
|
parentRef: RefObject<HTMLDivElement>;
|
80
53
|
showBulkRestartOption: boolean;
|
81
54
|
showNodeListingOptions: boolean;
|
82
55
|
}
|
83
|
-
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain'
|
56
|
+
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain';
|
84
57
|
export interface CreateResourceRequestBodyType {
|
85
58
|
appId: string;
|
86
59
|
clusterId: number;
|
@@ -92,7 +65,6 @@ export interface CreateResourceRequestBodyType {
|
|
92
65
|
export interface ResourceManifestDTO {
|
93
66
|
manifestResponse: {
|
94
67
|
manifest: Record<string, unknown>;
|
95
|
-
recommendedManifest?: Record<string, unknown>;
|
96
68
|
};
|
97
69
|
secretViewAccess: boolean;
|
98
70
|
}
|
@@ -136,20 +108,4 @@ export interface NodeActionRequest {
|
|
136
108
|
version: string;
|
137
109
|
kind: string;
|
138
110
|
}
|
139
|
-
export interface GVKOptionValueType {
|
140
|
-
kind: string;
|
141
|
-
apiVersion: string;
|
142
|
-
}
|
143
|
-
export interface GetResourceRecommenderResourceListPropsType {
|
144
|
-
resourceList: K8sResourceDetailType;
|
145
|
-
reloadResourceListData: () => void;
|
146
|
-
setShowAbsoluteValuesInResourceRecommender: Dispatch<SetStateAction<boolean>>;
|
147
|
-
showAbsoluteValuesInResourceRecommender: boolean;
|
148
|
-
gvkOptions: GroupBase<SelectPickerOptionType<GVKOptionValueType>>[];
|
149
|
-
areGVKOptionsLoading: boolean;
|
150
|
-
reloadGVKOptions: () => void;
|
151
|
-
gvkOptionsError: ServerErrors;
|
152
|
-
isResourceListLoading: boolean;
|
153
|
-
resourceListError: ServerErrors;
|
154
|
-
}
|
155
111
|
export {};
|
@@ -2,7 +2,7 @@ import { APIOptions, ResponseType } from '../../Common/Types';
|
|
2
2
|
import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType, NodeActionRequest, ResourceListPayloadType, ResourceType } from './ResourceBrowser.Types';
|
3
3
|
import { ClusterDetail, NodeCordonRequest } from './types';
|
4
4
|
export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
|
5
|
-
export declare const createNewResource: (resourceListPayload: CreateResourcePayload
|
5
|
+
export declare const createNewResource: (resourceListPayload: CreateResourcePayload) => Promise<ResponseType<CreateResourceDTO[]>>;
|
6
6
|
export declare const deleteResource: (resourceListPayload: ResourceListPayloadType, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<ResourceType[]>>;
|
7
7
|
export declare const deleteNodeCapacity: (requestPayload: NodeActionRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
8
8
|
export declare const cordonNodeCapacity: (requestPayload: NodeCordonRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
@@ -1,2 +1,4 @@
|
|
1
|
+
import { UaEventOptions } from 'react-ga4/types/ga4';
|
1
2
|
import { ServerAnalyticsEventType } from './types';
|
2
3
|
export declare const handleSendAnalyticsEventToServer: (eventType: ServerAnalyticsEventType, preventLicenseRedirect?: boolean) => Promise<void>;
|
4
|
+
export declare const handleAnalyticsEvent: ({ category, action }: Pick<UaEventOptions, "category" | "action">) => void;
|
@@ -63,5 +63,5 @@ import { ButtonComponentType, ButtonProps } from './types';
|
|
63
63
|
* <Button icon={<ICCube />} ariaLabel="Label" />
|
64
64
|
* ```
|
65
65
|
*/
|
66
|
-
declare const Button: <
|
66
|
+
declare const Button: import('react').ForwardRefExoticComponent<ButtonProps<ButtonComponentType> & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
67
67
|
export default Button;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SelectPickerOptionType } from '@Shared/Components/SelectPicker';
|
2
|
-
import { History } from '../types';
|
2
|
+
import { DeploymentHistorySingleValue, History } from '../types';
|
3
3
|
import { DeploymentHistoryConfigDiffProps } from './types';
|
4
4
|
export declare const getPipelineDeployments: (triggerHistory: DeploymentHistoryConfigDiffProps["triggerHistory"]) => History[];
|
5
5
|
export declare const getPipelineDeploymentsWfrIds: ({ pipelineDeployments, wfrId, }: {
|
@@ -20,3 +20,4 @@ export declare const parseDeploymentHistoryDiffSearchParams: (compareWfrId: numb
|
|
20
20
|
};
|
21
21
|
export declare const isDeploymentHistoryConfigDiffNotFoundError: <T extends unknown>(res: PromiseSettledResult<T>) => boolean;
|
22
22
|
export declare const getDeploymentHistoryConfigDiffError: <T extends unknown>(res: PromiseSettledResult<T>) => any;
|
23
|
+
export declare const renderDetailedValue: (parentClassName: string, singleValue: DeploymentHistorySingleValue, dataTestId: string) => JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ResponseType } from '../../../Common';
|
2
|
-
import {
|
2
|
+
import { DeploymentHistoryDetail, DeploymentHistoryResult, DeploymentStatusDetailsResponse, ModuleConfigResponse, TriggerDetailsResponseType, TriggerHistoryParamsType } from './types';
|
3
3
|
export declare function getTriggerDetails({ appId, envId, pipelineId, triggerId, fetchIdData, }: {
|
4
4
|
appId: any;
|
5
5
|
envId: any;
|
@@ -18,12 +18,6 @@ export declare function getManualSync(params: {
|
|
18
18
|
appId: string;
|
19
19
|
envId: string;
|
20
20
|
}): Promise<ResponseType>;
|
21
|
-
export declare const getDeploymentHistoryList: (appId: string, pipelineId: string, triggerId: string) => Promise<DeploymentConfigurationsRes>;
|
22
|
-
export declare const getDeploymentHistoryDetail: (appId: string, pipelineId: string, id: string, historyComponent: string, historyComponentName: string) => Promise<DeploymentHistoryDetailRes>;
|
23
|
-
export declare const prepareDeploymentTemplateData: (rawData: any) => Record<string, DeploymentHistorySingleValue>;
|
24
|
-
export declare const preparePipelineConfigData: (rawData: any) => Record<string, DeploymentHistorySingleValue>;
|
25
|
-
export declare const prepareConfigMapAndSecretData: (rawData: any, type: string, historyData: DeploymentHistoryDetail, skipDecode?: boolean) => Record<string, DeploymentHistorySingleValue>;
|
26
21
|
export declare const prepareHistoryData: (rawData: any, historyComponent: string, skipDecode?: boolean) => DeploymentHistoryDetail;
|
27
|
-
export declare const getDeploymentDiffSelector: (pipelineId: string, historyComponent: any, baseConfigurationId: any, historyComponentName: any) => Promise<HistoryDiffSelectorRes>;
|
28
22
|
export declare const getTriggerHistory: ({ appId, envId, pagination, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryParamsType) => Promise<Pick<DeploymentHistoryResult, "result">>;
|
29
23
|
export declare const getModuleConfigured: (moduleName: string) => Promise<ModuleConfigResponse>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CSSProperties, MutableRefObject, ReactElement, ReactNode } from 'react';
|
2
2
|
import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types';
|
3
|
-
import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, UserApprovalMetadataType, useScrollable } from '../../../Common';
|
3
|
+
import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, TooltipProps, UserApprovalMetadataType, useScrollable } from '../../../Common';
|
4
4
|
import { DeploymentStageType } from '../../constants';
|
5
5
|
import { AggregationKeys, AppDetails, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, DeploymentStrategyType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
|
6
6
|
import { TargetPlatformBadgeListProps } from '../TargetPlatforms';
|
@@ -408,14 +408,12 @@ export interface DeploymentStatusDetailRowType extends Pick<DeploymentStatusDeta
|
|
408
408
|
hideVerticalConnector?: boolean;
|
409
409
|
deploymentDetailedData: DeploymentStatusDetailsBreakdownDataType;
|
410
410
|
}
|
411
|
-
export interface DeploymentConfigurationsRes extends ResponseType {
|
412
|
-
result?: DeploymentTemplateList[];
|
413
|
-
}
|
414
411
|
export interface DeploymentHistorySingleValue {
|
415
412
|
displayName: string;
|
416
413
|
value: string;
|
417
414
|
variableSnapshot?: object;
|
418
415
|
resolvedValue?: string;
|
416
|
+
tooltipContent?: TooltipProps['content'];
|
419
417
|
}
|
420
418
|
export interface DeploymentHistoryDetail {
|
421
419
|
componentName?: string;
|
@@ -428,20 +426,6 @@ export interface DeploymentTemplateHistoryType {
|
|
428
426
|
previousConfigAvailable: boolean;
|
429
427
|
rootClassName?: string;
|
430
428
|
}
|
431
|
-
export interface DeploymentHistoryDetailRes extends ResponseType {
|
432
|
-
result?: DeploymentHistoryDetail;
|
433
|
-
}
|
434
|
-
export interface HistoryDiffSelectorList {
|
435
|
-
id: number;
|
436
|
-
deployedOn: string;
|
437
|
-
deployedBy: string;
|
438
|
-
deploymentStatus: string;
|
439
|
-
wfrId?: number;
|
440
|
-
runSource?: RunSourceType;
|
441
|
-
}
|
442
|
-
export interface HistoryDiffSelectorRes {
|
443
|
-
result?: HistoryDiffSelectorList[];
|
444
|
-
}
|
445
429
|
export interface DeploymentHistorySidebarType {
|
446
430
|
deploymentHistoryList: DeploymentTemplateList[];
|
447
431
|
setDeploymentHistoryList: React.Dispatch<React.SetStateAction<DeploymentTemplateList[]>>;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { SortingOrder } from '../../../Common/Constants';
|
2
|
+
import { RadioGroupItemProps, RadioGroupProps } from '../../../Common/Types';
|
2
3
|
import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, EnvResourceType, TemplateListDTO } from '../../Services';
|
3
4
|
import { ManifestTemplateDTO } from '../../../Pages/Applications';
|
4
5
|
import { DeploymentHistoryDetail } from '../CICDHistory';
|
5
6
|
import { CollapseProps } from '../Collapse';
|
6
7
|
import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
|
7
|
-
import { SelectPickerProps } from '../SelectPicker';
|
8
|
+
import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
|
8
9
|
export declare enum DeploymentConfigDiffState {
|
9
10
|
NO_DIFF = "noDiff",
|
10
11
|
HAS_DIFF = "hasDiff",
|
@@ -26,6 +27,15 @@ export interface DeploymentConfigListItem {
|
|
26
27
|
singleView?: boolean;
|
27
28
|
groupHeader?: string;
|
28
29
|
}
|
30
|
+
interface DeploymentConfigDiffRadioConfig extends Pick<RadioGroupProps, 'name' | 'onChange'> {
|
31
|
+
title: string;
|
32
|
+
options: (Pick<RadioGroupItemProps, 'disabled'> & Pick<SelectPickerOptionType<string>, 'label' | 'value' | 'description' | 'tooltipProps'>)[];
|
33
|
+
groupValue: string;
|
34
|
+
}
|
35
|
+
export interface DeploymentConfigDiffRadioSelectConfig {
|
36
|
+
triggerElementTitle: string;
|
37
|
+
radioGroupConfig: DeploymentConfigDiffRadioConfig[];
|
38
|
+
}
|
29
39
|
export type DeploymentConfigDiffSelectPickerProps = {
|
30
40
|
type: 'string';
|
31
41
|
id: string;
|
@@ -36,6 +46,12 @@ export type DeploymentConfigDiffSelectPickerProps = {
|
|
36
46
|
id: string;
|
37
47
|
text?: never;
|
38
48
|
selectPickerProps: SelectPickerProps;
|
49
|
+
} | {
|
50
|
+
type: 'radio-group';
|
51
|
+
id: string;
|
52
|
+
text?: never;
|
53
|
+
radioSelectConfig: DeploymentConfigDiffRadioSelectConfig;
|
54
|
+
selectPickerProps?: never;
|
39
55
|
};
|
40
56
|
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem<'navLink'>, 'href' | 'title' | 'onClick'> {
|
41
57
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
@@ -115,3 +131,4 @@ export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView e
|
|
115
131
|
isManifestView?: IsManifestView;
|
116
132
|
convertVariables?: boolean;
|
117
133
|
};
|
134
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { UsePopoverProps } from '../Popover';
|
2
|
+
import { DeploymentConfigDiffRadioSelectConfig } from './DeploymentConfigDiff.types';
|
3
|
+
declare const DeploymentConfigDiffRadioSelect: ({ radioSelectConfig, position, }: {
|
4
|
+
radioSelectConfig: DeploymentConfigDiffRadioSelectConfig;
|
5
|
+
position?: UsePopoverProps["position"];
|
6
|
+
}) => JSX.Element;
|
7
|
+
export default DeploymentConfigDiffRadioSelect;
|
@@ -2,3 +2,4 @@ export * from './DeploymentConfigDiff.component';
|
|
2
2
|
export * from './DeploymentConfigDiff.constants';
|
3
3
|
export * from './DeploymentConfigDiff.types';
|
4
4
|
export * from './DeploymentConfigDiff.utils';
|
5
|
+
export { default as DeploymentConfigDiffRadioSelect } from './DeploymentConfigDiffRadioSelect';
|
@@ -4,6 +4,7 @@ import { DOCUMENTATION } from './constants';
|
|
4
4
|
export type BaseDocLink<T extends boolean> = {
|
5
5
|
isExternalLink?: T;
|
6
6
|
isEnterprise?: boolean;
|
7
|
+
isLicenseDashboard?: boolean;
|
7
8
|
docLinkKey: T extends true ? string : keyof typeof DOCUMENTATION;
|
8
9
|
};
|
9
10
|
export type DocLinkProps<T extends boolean = false> = Pick<ButtonProps<ButtonComponentType.anchor>, 'dataTestId' | 'size' | 'variant' | 'fullWidth' | 'fontWeight' | 'startIcon'> & Omit<BaseDocLink<T>, 'isEnterprise'> & {
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { BaseDocLink } from './types';
|
2
|
-
export declare const getDocumentationUrl: <T extends boolean = false>({ docLinkKey, isEnterprise, isExternalLink, }: BaseDocLink<T>) => string;
|
2
|
+
export declare const getDocumentationUrl: <T extends boolean = false>({ docLinkKey, isEnterprise, isExternalLink, isLicenseDashboard, }: BaseDocLink<T>) => string;
|
@@ -12,6 +12,7 @@ export declare const iconMap: {
|
|
12
12
|
'ic-arrow-square-out': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
13
|
'ic-arrows-clockwise': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
14
14
|
'ic-arrows-left-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
15
|
+
'ic-asterisk': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
15
16
|
'ic-ather': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
16
17
|
'ic-azure-aks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
17
18
|
'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -19,6 +20,7 @@ export declare const iconMap: {
|
|
19
20
|
'ic-bharatpe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
21
|
'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
22
|
'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
|
+
'ic-brain': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
22
24
|
'ic-browser': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
25
|
'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
24
26
|
'ic-calendar': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -41,7 +43,6 @@ export declare const iconMap: {
|
|
41
43
|
'ic-cloud-vms': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
42
44
|
'ic-cluster': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
43
45
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
44
|
-
'ic-container-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
45
46
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
46
47
|
'ic-cookr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
47
48
|
'ic-copy': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -52,6 +53,7 @@ export declare const iconMap: {
|
|
52
53
|
'ic-delete-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
53
54
|
'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
54
55
|
'ic-delhivery': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
56
|
+
'ic-devtron-ai': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
55
57
|
'ic-devtron-app': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
56
58
|
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
57
59
|
'ic-devtron-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -77,8 +79,8 @@ export declare const iconMap: {
|
|
77
79
|
'ic-filter-applied': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
78
80
|
'ic-filter': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
79
81
|
'ic-flask': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
82
|
+
'ic-folder-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
80
83
|
'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
81
|
-
'ic-gavel': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
82
84
|
'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
83
85
|
'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
84
86
|
'ic-gift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -137,6 +139,7 @@ export declare const iconMap: {
|
|
137
139
|
'ic-openshift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
138
140
|
'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
139
141
|
'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
142
|
+
'ic-paper-plane': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
140
143
|
'ic-path': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
141
144
|
'ic-pencil': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
142
145
|
'ic-play-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -150,12 +153,13 @@ export declare const iconMap: {
|
|
150
153
|
'ic-sort-ascending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
151
154
|
'ic-sort-descending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
152
155
|
'ic-sortable': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
156
|
+
'ic-sparkle-ai-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
153
157
|
'ic-sparkle-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
154
|
-
'ic-speedometer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
155
158
|
'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
156
159
|
'ic-spray-can': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
157
160
|
'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
158
161
|
'ic-stamp': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
162
|
+
'ic-stop-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
159
163
|
'ic-strategy-blue-green-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
160
164
|
'ic-strategy-blue-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
161
165
|
'ic-strategy-canary-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -177,14 +181,15 @@ export declare const iconMap: {
|
|
177
181
|
'ic-timer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
178
182
|
'ic-traffic-signal': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
179
183
|
'ic-travclan': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
180
|
-
'ic-two-cubes': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
181
184
|
'ic-ubuntu': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
182
185
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
183
186
|
'ic-user-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
184
187
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
185
188
|
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
189
|
+
'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
186
190
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
187
191
|
'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
192
|
+
'ic-world-globe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
188
193
|
};
|
189
194
|
export type IconName = keyof typeof iconMap;
|
190
195
|
export interface IconsProps extends Omit<IconBaseProps, 'name' | 'iconMap'> {
|
@@ -50,6 +50,11 @@ export interface UsePopoverProps {
|
|
50
50
|
* @param closePopover - A function to close the popover.
|
51
51
|
*/
|
52
52
|
onPopoverKeyDown?: (e: KeyboardEvent, openState: boolean, closePopover: () => void) => void;
|
53
|
+
/**
|
54
|
+
* Variant of the popover (bg, shadow and styles changes based on variant)
|
55
|
+
* @default 'menu'
|
56
|
+
*/
|
57
|
+
variant?: 'menu' | 'overlay';
|
53
58
|
}
|
54
59
|
/**
|
55
60
|
* Represents the return type of the `usePopover` hook, providing properties and methods
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { UsePopoverProps, UsePopoverReturnType } from './types';
|
2
|
-
export declare const usePopover: ({ id, position, alignment, width, onOpen, onPopoverKeyDown, onTriggerKeyDown, }: UsePopoverProps) => UsePopoverReturnType;
|
2
|
+
export declare const usePopover: ({ id, position, alignment, width, variant, onOpen, onPopoverKeyDown, onTriggerKeyDown, }: UsePopoverProps) => UsePopoverReturnType;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DTSwitchProps } from './types';
|
2
|
-
declare const Switch: ({ ariaLabel, isDisabled, isLoading, isChecked, tooltipContent, shape, variant, iconColor, iconName, indeterminate, size, name, onChange, }: DTSwitchProps) => JSX.Element;
|
2
|
+
declare const Switch: ({ ariaLabel, isDisabled, isLoading, isChecked, tooltipContent, shape, variant, iconColor, iconName, indeterminate, size, name, dataTestId, onChange, autoFocus, }: DTSwitchProps) => JSX.Element;
|
3
3
|
export default Switch;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
3
3
|
import { IconBaseColorType } from '../../types';
|
4
4
|
import { IconName } from '../Icon';
|
@@ -64,6 +64,10 @@ export type DTSwitchProps = {
|
|
64
64
|
* Used in forms to identify the switch.
|
65
65
|
*/
|
66
66
|
name: string;
|
67
|
+
/**
|
68
|
+
* Provide if name generated through `getUniqueId`.
|
69
|
+
*/
|
70
|
+
dataTestId?: string;
|
67
71
|
/**
|
68
72
|
* The visual variant of the switch.
|
69
73
|
*
|
@@ -97,6 +101,11 @@ export type DTSwitchProps = {
|
|
97
101
|
*
|
98
102
|
* @default undefined
|
99
103
|
*/
|
100
|
-
tooltipContent?:
|
104
|
+
tooltipContent?: ReactNode;
|
105
|
+
/**
|
106
|
+
* Indicates whether the switch should be focused automatically when rendered.
|
107
|
+
* @default false
|
108
|
+
*/
|
109
|
+
autoFocus?: boolean;
|
101
110
|
} & SwitchShapeProps;
|
102
111
|
export {};
|
@@ -3,10 +3,10 @@ import { ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP } from './constants';
|
|
3
3
|
import { DTSwitchProps } from './types';
|
4
4
|
export declare const getSwitchContainerClass: ({ shape, size }: Required<Pick<DTSwitchProps, "shape" | "size">>) => string;
|
5
5
|
export declare const getSwitchTrackColor: ({ shape, variant, isChecked, isLoading, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked" | "isLoading">>) => string;
|
6
|
-
export declare const getSwitchTrackHoverColor: ({ shape, variant, isChecked, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked">>) => (typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP)[DTSwitchProps["variant"]];
|
6
|
+
export declare const getSwitchTrackHoverColor: ({ shape, variant, isChecked, isLoading, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked" | "isLoading">>) => (typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP)[DTSwitchProps["variant"]] | "transparent";
|
7
7
|
export declare const getSwitchThumbClass: ({ shape, size, showIndeterminateIcon, }: Pick<DTSwitchProps, "shape" | "size"> & {
|
8
8
|
showIndeterminateIcon: boolean;
|
9
9
|
}) => string;
|
10
10
|
export declare const getSwitchIconColor: ({ iconColor, isChecked, variant, }: Pick<DTSwitchProps, "iconColor" | "isChecked" | "variant">) => IconBaseColorType;
|
11
|
-
export declare const getThumbPosition: ({
|
11
|
+
export declare const getThumbPosition: ({ isChecked, size, shape, indeterminate, isLoading, }: Required<Pick<DTSwitchProps, "isChecked" | "size" | "shape" | "indeterminate" | "isLoading">>) => number;
|
12
12
|
export declare const getThumbPadding: ({ shape, isLoading }: Pick<DTSwitchProps, "shape" | "isLoading">) => string;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { AppThemeType, useTheme } from '../../Providers';
|
2
|
+
type ThemePreferenceType = ReturnType<typeof useTheme>['themePreference'];
|
3
|
+
export type SwitchThemeDialogProps = {
|
4
|
+
/**
|
5
|
+
* @description The initial theme preference of the user fetched from api, in case of error would be null
|
6
|
+
*/
|
7
|
+
initialThemePreference: ThemePreferenceType;
|
8
|
+
handleUpdateUserThemePreference: (themePreference: ThemePreferenceType) => void;
|
9
|
+
handleClose: () => void;
|
10
|
+
} & ({
|
11
|
+
/**
|
12
|
+
* @default false
|
13
|
+
* @description Required for storybook
|
14
|
+
*/
|
15
|
+
disableAPICalls?: false;
|
16
|
+
} | {
|
17
|
+
currentUserPreferences?: never;
|
18
|
+
disableAPICalls: true;
|
19
|
+
});
|
20
|
+
export interface ThemePreferenceOptionProps {
|
21
|
+
selectedThemePreference: SwitchThemeDialogProps['initialThemePreference'];
|
22
|
+
value: SwitchThemeDialogProps['initialThemePreference'];
|
23
|
+
handleChangedThemePreference: (themePreference: SwitchThemeDialogProps['initialThemePreference']) => void;
|
24
|
+
}
|
25
|
+
export interface ThemePreferenceLabelFigureProps extends Pick<ThemePreferenceOptionProps, 'value'> {
|
26
|
+
isSelected: boolean;
|
27
|
+
}
|
28
|
+
export interface BaseLabelFigureProps extends Pick<ThemePreferenceLabelFigureProps, 'isSelected'> {
|
29
|
+
value: AppThemeType;
|
30
|
+
/**
|
31
|
+
* @default false
|
32
|
+
*/
|
33
|
+
noLeftRadius?: boolean;
|
34
|
+
}
|
35
|
+
export {};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { TextareaProps } from './types';
|
2
|
-
declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, hideFormFieldInfo, value, borderConfig, ...props }: TextareaProps) => JSX.Element;
|
2
|
+
declare const Textarea: ({ name, label, textareaRef: textareaRefProp, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, hideFormFieldInfo, value, borderConfig, disableResize, newlineOnShiftEnter, ...props }: TextareaProps) => JSX.Element;
|
3
3
|
export default Textarea;
|
@@ -13,9 +13,25 @@ export interface TextareaProps extends Omit<FormFieldWrapperProps, 'children' |
|
|
13
13
|
*
|
14
14
|
* @default ComponentSizeType.large
|
15
15
|
*/
|
16
|
-
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
16
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.small | ComponentSizeType.medium | ComponentSizeType.large>;
|
17
17
|
/**
|
18
18
|
* Value of the textarea
|
19
19
|
*/
|
20
20
|
value: string;
|
21
|
+
/**
|
22
|
+
* If true, the textarea resize is disabled
|
23
|
+
*
|
24
|
+
* @default false
|
25
|
+
*/
|
26
|
+
disableResize?: true;
|
27
|
+
/**
|
28
|
+
* Allows inserting a newline with Shift + Enter instead of Enter alone.
|
29
|
+
*
|
30
|
+
* When enabled, pressing Enter submits the form, while Shift + Enter inserts a newline.
|
31
|
+
* Useful for forms where Enter should trigger submission, but multiline input is still needed.
|
32
|
+
*
|
33
|
+
* @default false
|
34
|
+
*/
|
35
|
+
newlineOnShiftEnter?: boolean;
|
36
|
+
textareaRef?: React.MutableRefObject<HTMLTextAreaElement> | React.RefCallback<HTMLTextAreaElement>;
|
21
37
|
}
|