@digital-ai/dot-components 4.22.0 → 4.24.0
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/index.esm.js +124 -36
- package/package.json +1 -1
- package/src/lib/components/analytics/dashboard-actions/DashboardPublishConfirm.styles.d.ts +1 -1
- package/src/lib/components/auto-complete/AutoComplete.d.ts +4 -2
- package/src/lib/components/input-form-fields/InputFormFields.styles.d.ts +2 -0
- package/src/lib/components/input-form-fields/InputLabel.d.ts +6 -3
- package/src/lib/components/input-form-fields/InputSelect.d.ts +4 -1
- package/src/lib/components/input-form-fields/InputText.d.ts +3 -1
- package/src/lib/components/search/Search.styles.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -1386,6 +1386,7 @@ const rootClassName$1p = 'dot-text-field';
|
|
|
1386
1386
|
const rootSelectClassName = 'dot-select-field';
|
|
1387
1387
|
const wrapperClassName$2 = 'dot-label-wrapper';
|
|
1388
1388
|
const labelClassName = 'dot-input-label';
|
|
1389
|
+
const additionalLabelContentClassName = 'dot-additional-label-content';
|
|
1389
1390
|
const errorClassName = 'dot-error';
|
|
1390
1391
|
const warningClassName = 'dot-warning';
|
|
1391
1392
|
const successClassName = 'dot-success';
|
|
@@ -1400,12 +1401,33 @@ const StyledAdornment = styled(InputAdornment)`
|
|
|
1400
1401
|
${adornmentIconStyles()};
|
|
1401
1402
|
}
|
|
1402
1403
|
`;
|
|
1404
|
+
const StyledInputLabelWrapper = styled.div`
|
|
1405
|
+
${({
|
|
1406
|
+
theme
|
|
1407
|
+
}) => css`
|
|
1408
|
+
&.${wrapperClassName$2} {
|
|
1409
|
+
display: flex;
|
|
1410
|
+
align-items: flex-end;
|
|
1411
|
+
gap: ${theme.spacing(0.5)};
|
|
1412
|
+
margin-bottom: ${theme.spacing(0.5)};
|
|
1413
|
+
|
|
1414
|
+
.${warningClassName} {
|
|
1415
|
+
padding-bottom: 2px;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
.${additionalLabelContentClassName} {
|
|
1419
|
+
margin-left: auto;
|
|
1420
|
+
padding-left: ${theme.spacing(2)};
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
`}
|
|
1424
|
+
`;
|
|
1403
1425
|
const StyledInputLabel = styled(InputLabel)`
|
|
1404
1426
|
${({
|
|
1405
1427
|
theme
|
|
1406
1428
|
}) => css`
|
|
1407
1429
|
&.${labelClassName} {
|
|
1408
|
-
margin-bottom:
|
|
1430
|
+
margin-bottom: 0;
|
|
1409
1431
|
transform: none;
|
|
1410
1432
|
|
|
1411
1433
|
&.Mui-disabled .dot-typography {
|
|
@@ -4818,6 +4840,7 @@ const DotCopyButton = ({
|
|
|
4818
4840
|
};
|
|
4819
4841
|
|
|
4820
4842
|
const DotInputLabel = ({
|
|
4843
|
+
additionalLabelContent,
|
|
4821
4844
|
'data-testid': dataTestId,
|
|
4822
4845
|
disabled = false,
|
|
4823
4846
|
error = false,
|
|
@@ -4826,14 +4849,9 @@ const DotInputLabel = ({
|
|
|
4826
4849
|
label,
|
|
4827
4850
|
required
|
|
4828
4851
|
}) => {
|
|
4829
|
-
|
|
4830
|
-
display: 'flex',
|
|
4831
|
-
gap: '4px'
|
|
4832
|
-
};
|
|
4833
|
-
return jsxs("div", {
|
|
4852
|
+
return jsxs(StyledInputLabelWrapper, {
|
|
4834
4853
|
className: wrapperClassName$2,
|
|
4835
|
-
|
|
4836
|
-
children: [jsx(StyledInputLabel, {
|
|
4854
|
+
children: [label && jsx(StyledInputLabel, {
|
|
4837
4855
|
"data-testid": dataTestId,
|
|
4838
4856
|
classes: {
|
|
4839
4857
|
root: labelClassName
|
|
@@ -4854,6 +4872,9 @@ const DotInputLabel = ({
|
|
|
4854
4872
|
iconId: "circle-info-outline",
|
|
4855
4873
|
tooltip: informationToolTip,
|
|
4856
4874
|
fontSize: "small"
|
|
4875
|
+
}), additionalLabelContent && jsx("div", {
|
|
4876
|
+
className: additionalLabelContentClassName,
|
|
4877
|
+
children: renderNodeOrTypography(additionalLabelContent)
|
|
4857
4878
|
})]
|
|
4858
4879
|
});
|
|
4859
4880
|
};
|
|
@@ -4891,6 +4912,7 @@ const getInitialState = (value, defaultValue) => ({
|
|
|
4891
4912
|
});
|
|
4892
4913
|
const DotInputText = ({
|
|
4893
4914
|
ai = false,
|
|
4915
|
+
additionalLabelContent,
|
|
4894
4916
|
autoComplete = 'off',
|
|
4895
4917
|
autoFocus,
|
|
4896
4918
|
className,
|
|
@@ -5024,11 +5046,12 @@ const DotInputText = ({
|
|
|
5024
5046
|
const inputClassName = useStylesWithRootClass('dot-input', readOnly && readOnlyClassName$1);
|
|
5025
5047
|
return jsxs(StyledTextFieldContainer, {
|
|
5026
5048
|
className: wrapperClassName,
|
|
5027
|
-
children: [persistentLabel && jsx(DotInputLabel, {
|
|
5049
|
+
children: [(persistentLabel || additionalLabelContent) && jsx(DotInputLabel, {
|
|
5050
|
+
additionalLabelContent,
|
|
5028
5051
|
disabled,
|
|
5029
5052
|
error,
|
|
5030
5053
|
id,
|
|
5031
|
-
label,
|
|
5054
|
+
label: persistentLabel ? label : undefined,
|
|
5032
5055
|
required,
|
|
5033
5056
|
informationToolTip
|
|
5034
5057
|
}), jsx(StyledTextField, {
|
|
@@ -7050,6 +7073,7 @@ function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
|
|
|
7050
7073
|
const DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
7051
7074
|
const DotAutoComplete = ({
|
|
7052
7075
|
ListboxComponent,
|
|
7076
|
+
additionalLabelContent,
|
|
7053
7077
|
actionItem,
|
|
7054
7078
|
ai = false,
|
|
7055
7079
|
aiAction,
|
|
@@ -7402,12 +7426,13 @@ const DotAutoComplete = ({
|
|
|
7402
7426
|
// functionality be added to DotInputText we will have to make a
|
|
7403
7427
|
// decision about if/how to expose it here.
|
|
7404
7428
|
jsxs(Fragment, {
|
|
7405
|
-
children: [persistentLabel && jsx(DotInputLabel, {
|
|
7429
|
+
children: [(persistentLabel || additionalLabelContent) && jsx(DotInputLabel, {
|
|
7406
7430
|
"data-testid": dataTestId && `${dataTestId}-persistent-label`,
|
|
7407
7431
|
id: inputId,
|
|
7432
|
+
additionalLabelContent,
|
|
7408
7433
|
disabled,
|
|
7409
7434
|
error,
|
|
7410
|
-
label,
|
|
7435
|
+
label: persistentLabel ? label : undefined,
|
|
7411
7436
|
required,
|
|
7412
7437
|
informationToolTip
|
|
7413
7438
|
}), jsx(StyledTextField, Object.assign({}, params, {
|
|
@@ -10594,6 +10619,31 @@ const dashboard6 = Object.assign(Object.assign({}, dashboard6InProgress), {
|
|
|
10594
10619
|
in_progress_changes: dashboard6InProgress,
|
|
10595
10620
|
parent_id: null
|
|
10596
10621
|
});
|
|
10622
|
+
({
|
|
10623
|
+
author_fullname: 'Dashboard7 Author',
|
|
10624
|
+
author_id: 'id7a',
|
|
10625
|
+
target_apps: ['AGILITY'],
|
|
10626
|
+
external_id: '7',
|
|
10627
|
+
name: 'dummy dashboard 7',
|
|
10628
|
+
description: '',
|
|
10629
|
+
dashboard_url: 'https://test.com',
|
|
10630
|
+
server_url: 'https://test.com',
|
|
10631
|
+
external_embedding_id: null,
|
|
10632
|
+
created_dt: '2023-11-21T04:42:07.872000+00:00',
|
|
10633
|
+
id: 'id7',
|
|
10634
|
+
lifecycle_state: DashboardView.lifecycle_state.PUBLISHED,
|
|
10635
|
+
application_instances: ['2'],
|
|
10636
|
+
categories: [],
|
|
10637
|
+
bi_type: DashboardView.bi_type.MICROSTRATEGY,
|
|
10638
|
+
is_ootb_dashboard: false,
|
|
10639
|
+
thumbnail: '',
|
|
10640
|
+
external_object: {},
|
|
10641
|
+
embed_config: {},
|
|
10642
|
+
help_content_id: helpContent.id,
|
|
10643
|
+
filter_configuration: [],
|
|
10644
|
+
favorite: false,
|
|
10645
|
+
updated_dt: '2023-11-21T04:42:07.951000+00:00'
|
|
10646
|
+
});
|
|
10597
10647
|
const dummyDashboards = [dashboard1, dashboard2, dashboard3, dashboard4, dashboard5, dashboard6];
|
|
10598
10648
|
const getCategoriesMock = {
|
|
10599
10649
|
categories: {
|
|
@@ -10877,13 +10927,19 @@ const DotMetadataApiProvider = ({
|
|
|
10877
10927
|
}
|
|
10878
10928
|
let response;
|
|
10879
10929
|
try {
|
|
10880
|
-
if (dashboard.lifecycle_state === DashboardView.lifecycle_state.PUBLISHED &&
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10930
|
+
if (dashboard.lifecycle_state === DashboardView.lifecycle_state.PUBLISHED && updatePayload.lifecycle_state !== DashboardPatchBody.lifecycle_state.DRAFT) {
|
|
10931
|
+
if (dashboard.in_progress_changes) {
|
|
10932
|
+
// If the dashboard is published and has in-progress changes, we need to update the in-progress dashboard
|
|
10933
|
+
response = yield DashboardsService.patchInProgressDashboard(dashboard.id, updatePayload, accountId, isSync);
|
|
10934
|
+
} else {
|
|
10935
|
+
// If the dashboard is published and has no in-progress changes, we need to create an in-progress dashboard
|
|
10936
|
+
response = yield DashboardsService.postInProgressDashboard(dashboard.id, accountId, updatePayload);
|
|
10937
|
+
}
|
|
10938
|
+
} else if (dashboard.parent_id) {
|
|
10939
|
+
// If the dashboard is in progress (has a parent_id), we need to update the in-progress dashboard
|
|
10940
|
+
response = yield DashboardsService.patchInProgressDashboard(dashboard.parent_id, updatePayload, accountId, isSync);
|
|
10886
10941
|
} else {
|
|
10942
|
+
// If the dashboard is in draft state, we can update it directly
|
|
10887
10943
|
response = yield DashboardsService.patchDashboard(dashboard.id, updatePayload, accountId, isSync);
|
|
10888
10944
|
}
|
|
10889
10945
|
setDashboardsError(null);
|
|
@@ -11622,6 +11678,7 @@ function DashboardCategoriesAutoComplete(_a) {
|
|
|
11622
11678
|
|
|
11623
11679
|
const DotInputSelect = ({
|
|
11624
11680
|
ariaLabel,
|
|
11681
|
+
additionalLabelContent,
|
|
11625
11682
|
autoFocus,
|
|
11626
11683
|
className,
|
|
11627
11684
|
'data-pendoid': dataPendoId = rootSelectClassName,
|
|
@@ -11672,11 +11729,12 @@ const DotInputSelect = ({
|
|
|
11672
11729
|
};
|
|
11673
11730
|
return jsxs("div", {
|
|
11674
11731
|
className: className,
|
|
11675
|
-
children: [persistentLabel && jsx(DotInputLabel, {
|
|
11732
|
+
children: [(persistentLabel || additionalLabelContent) && jsx(DotInputLabel, {
|
|
11733
|
+
additionalLabelContent,
|
|
11676
11734
|
disabled,
|
|
11677
11735
|
error,
|
|
11678
11736
|
id,
|
|
11679
|
-
label,
|
|
11737
|
+
label: persistentLabel ? label : undefined,
|
|
11680
11738
|
required
|
|
11681
11739
|
}), jsx(StyledTextField, {
|
|
11682
11740
|
InputProps: {
|
|
@@ -12632,6 +12690,9 @@ function DotDashboardPublishConfirm({
|
|
|
12632
12690
|
};
|
|
12633
12691
|
return jsxs(Fragment, {
|
|
12634
12692
|
children: [dashboardToPublish !== null && jsx(DotDialog, {
|
|
12693
|
+
cancelButtonProps: {
|
|
12694
|
+
'data-testid': 'publish-cancel-button'
|
|
12695
|
+
},
|
|
12635
12696
|
cancelButtonVisible: !published,
|
|
12636
12697
|
closeOnSubmit: false,
|
|
12637
12698
|
hasPrimaryAction: publishing === null || published,
|
|
@@ -12656,6 +12717,9 @@ function DotDashboardPublishConfirm({
|
|
|
12656
12717
|
editInProgress: editInProgressByUser(dashboardToPublish, currentUser.id)
|
|
12657
12718
|
})
|
|
12658
12719
|
}), dashboardToUnpublish !== null && jsx(DotDialog, {
|
|
12720
|
+
cancelButtonProps: {
|
|
12721
|
+
'data-testid': 'unpublish-cancel-button'
|
|
12722
|
+
},
|
|
12659
12723
|
cancelButtonVisible: !unpublished,
|
|
12660
12724
|
closeOnSubmit: false,
|
|
12661
12725
|
hasPrimaryAction: unpublishing === null || unpublished,
|
|
@@ -12830,19 +12894,35 @@ function DotDashboardOptionsMenu({
|
|
|
12830
12894
|
key: 'edit-props'
|
|
12831
12895
|
});
|
|
12832
12896
|
}
|
|
12833
|
-
if (onStartStatusChange && !dashboard.is_ootb_dashboard
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12897
|
+
if (onStartStatusChange && !dashboard.is_ootb_dashboard) {
|
|
12898
|
+
if (isDraft) {
|
|
12899
|
+
menuItems.push({
|
|
12900
|
+
key: 'publish',
|
|
12901
|
+
children: jsx(DotButton, {
|
|
12902
|
+
ariaLabel: "Publish dashboard",
|
|
12903
|
+
type: "text",
|
|
12904
|
+
"data-testid": `publish-dashboard-button-${dashboard.id}`,
|
|
12905
|
+
startIcon: jsx(DotIcon, {
|
|
12906
|
+
iconId: "send-airplane"
|
|
12907
|
+
}),
|
|
12908
|
+
children: "Publish"
|
|
12909
|
+
})
|
|
12910
|
+
});
|
|
12911
|
+
}
|
|
12912
|
+
if (dashboard.lifecycle_state === DashboardView.lifecycle_state.PUBLISHED && !dashboard.in_progress_changes) {
|
|
12913
|
+
menuItems.push({
|
|
12914
|
+
key: 'unpublish',
|
|
12915
|
+
children: jsx(DotButton, {
|
|
12916
|
+
ariaLabel: "Unpublish dashboard",
|
|
12917
|
+
type: "text",
|
|
12918
|
+
"data-testid": `unpublish-dashboard-button-${dashboard.id}`,
|
|
12919
|
+
startIcon: jsx(DotIcon, {
|
|
12920
|
+
iconId: "undo"
|
|
12921
|
+
}),
|
|
12922
|
+
children: "Unpublish"
|
|
12923
|
+
})
|
|
12924
|
+
});
|
|
12925
|
+
}
|
|
12846
12926
|
}
|
|
12847
12927
|
if (onStartDuplicate) {
|
|
12848
12928
|
menuItems.push({
|
|
@@ -12971,6 +13051,9 @@ function DotDashboardOptionsMenu({
|
|
|
12971
13051
|
case 'publish':
|
|
12972
13052
|
onStartStatusChange(dashboard, DashboardView.lifecycle_state.PUBLISHED);
|
|
12973
13053
|
break;
|
|
13054
|
+
case 'unpublish':
|
|
13055
|
+
onStartStatusChange(dashboard, DashboardView.lifecycle_state.DRAFT);
|
|
13056
|
+
break;
|
|
12974
13057
|
}
|
|
12975
13058
|
handleMenuClose();
|
|
12976
13059
|
}, [menuItems, handleMenuClose]);
|
|
@@ -13185,9 +13268,14 @@ function DotDashboardActions({
|
|
|
13185
13268
|
setDashboardToPublish(null);
|
|
13186
13269
|
setDashboardToUnpublish(null);
|
|
13187
13270
|
}, []);
|
|
13188
|
-
const handleStartStatusChange = useCallback(() => {
|
|
13189
|
-
|
|
13190
|
-
|
|
13271
|
+
const handleStartStatusChange = useCallback((dashboardView, newStatus) => {
|
|
13272
|
+
if (newStatus === DashboardView.lifecycle_state.DRAFT) {
|
|
13273
|
+
setDashboardToUnpublish(dashboard);
|
|
13274
|
+
setDashboardToPublish(null);
|
|
13275
|
+
} else {
|
|
13276
|
+
setDashboardToPublish(dashboard);
|
|
13277
|
+
setDashboardToUnpublish(null);
|
|
13278
|
+
}
|
|
13191
13279
|
}, [dashboard]);
|
|
13192
13280
|
const handleDeleteClose = useCallback(() => {
|
|
13193
13281
|
setDashboardToDelete(null);
|
package/package.json
CHANGED
|
@@ -2,5 +2,5 @@ export declare const dashboardCategoriesContainerClassName = "dashboard-categori
|
|
|
2
2
|
export declare const InlineMessage: import("styled-components").StyledComponent<({ ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: import("../../typography/Typography").TypographyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
3
3
|
export declare const StyledPublishConfirmDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const StyledAppSelectDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const StyledAppSelectDotAutoComplete: import("styled-components").StyledComponent<(<T extends import("../..").AutoCompleteOption>({ ListboxComponent, actionItem, ai, aiAction, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: import("../../auto-complete/AutoComplete").AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element), any, {}, never>;
|
|
5
|
+
export declare const StyledAppSelectDotAutoComplete: import("styled-components").StyledComponent<(<T extends import("../..").AutoCompleteOption>({ ListboxComponent, additionalLabelContent, actionItem, ai, aiAction, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: import("../../auto-complete/AutoComplete").AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element), any, {}, never>;
|
|
6
6
|
export declare const StyledAppSelectAutoCompleteOption: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
@@ -13,6 +13,8 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
13
13
|
ListboxComponent?: JSXElementConstructor<HTMLAttributes<HTMLElement>>;
|
|
14
14
|
/** Action button as the last element on the menu **/
|
|
15
15
|
actionItem?: ActionItem;
|
|
16
|
+
/** Additional content on the top right of the autocomplete field. **/
|
|
17
|
+
additionalLabelContent?: ReactNode;
|
|
16
18
|
/** If true, applies a gradient color to the border */
|
|
17
19
|
ai?: boolean;
|
|
18
20
|
/** Event callback */
|
|
@@ -75,7 +77,7 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
75
77
|
open?: boolean;
|
|
76
78
|
/** pre-defined options available to the user */
|
|
77
79
|
options?: Array<T>;
|
|
78
|
-
/** If true, the label will be persistently displayed outside
|
|
80
|
+
/** If true, the label will be persistently displayed outside the field. */
|
|
79
81
|
persistentLabel?: boolean;
|
|
80
82
|
/** Placeholder text always displayed inside the input field */
|
|
81
83
|
placeholder?: string;
|
|
@@ -106,4 +108,4 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
106
108
|
/** If true, the label will be displayed in a warning state. */
|
|
107
109
|
warning?: boolean;
|
|
108
110
|
}
|
|
109
|
-
export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, actionItem, ai, aiAction, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, additionalLabelContent, actionItem, ai, aiAction, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ export declare const rootClassName = "dot-text-field";
|
|
|
3
3
|
export declare const rootSelectClassName = "dot-select-field";
|
|
4
4
|
export declare const wrapperClassName = "dot-label-wrapper";
|
|
5
5
|
export declare const labelClassName = "dot-input-label";
|
|
6
|
+
export declare const additionalLabelContentClassName = "dot-additional-label-content";
|
|
6
7
|
export declare const errorClassName = "dot-error";
|
|
7
8
|
export declare const warningClassName = "dot-warning";
|
|
8
9
|
export declare const successClassName = "dot-success";
|
|
@@ -17,6 +18,7 @@ interface StyledTextFieldProps {
|
|
|
17
18
|
$minRows?: number;
|
|
18
19
|
}
|
|
19
20
|
export declare const StyledAdornment: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputAdornmentTypeMap<{}, "div">>, any, {}, never>;
|
|
21
|
+
export declare const StyledInputLabelWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
20
22
|
export declare const StyledInputLabel: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputLabelTypeMap<{}, "label">>, any, {}, never>;
|
|
21
23
|
export declare const StyledTextFieldContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
22
24
|
export declare const StyledTextField: import("styled-components").StyledComponent<typeof TextField, any, StyledTextFieldProps, never>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { CommonProps } from '../CommonProps';
|
|
2
3
|
export interface InputLabelProps extends CommonProps {
|
|
4
|
+
/** Additional content shown on the far right side of label element. */
|
|
5
|
+
additionalLabelContent?: ReactNode;
|
|
3
6
|
/** If true, the input will be disabled. */
|
|
4
7
|
disabled?: boolean;
|
|
5
8
|
/** If true, the label will be displayed in an error state. */
|
|
6
9
|
error?: boolean;
|
|
7
10
|
/**
|
|
8
|
-
* id to identify the element, also used to create label "for" and helper text id attribute
|
|
9
|
-
*
|
|
11
|
+
* id to identify the element, also used to create label "for" and helper text id attribute.
|
|
12
|
+
* While it's optional, it is considered required for accessibility best practice.
|
|
10
13
|
*/
|
|
11
14
|
id: string;
|
|
12
15
|
/** Additional information for persistent labels */
|
|
@@ -16,4 +19,4 @@ export interface InputLabelProps extends CommonProps {
|
|
|
16
19
|
/** If true, the label is displayed as required and the input element` will be required. */
|
|
17
20
|
required?: boolean;
|
|
18
21
|
}
|
|
19
|
-
export declare const DotInputLabel: ({ "data-testid": dataTestId, disabled, error, id, informationToolTip, label, required, }: InputLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const DotInputLabel: ({ additionalLabelContent, "data-testid": dataTestId, disabled, error, id, informationToolTip, label, required, }: InputLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { InputProps } from './InputFormFields.propTypes';
|
|
2
3
|
export type OptionType = string | InputSelectOption;
|
|
3
4
|
export interface InputSelectOption {
|
|
@@ -7,9 +8,11 @@ export interface InputSelectOption {
|
|
|
7
8
|
value?: string;
|
|
8
9
|
}
|
|
9
10
|
export interface InputSelectProps extends InputProps {
|
|
11
|
+
/** Additional content on the top right of the input select field. **/
|
|
12
|
+
additionalLabelContent?: ReactNode;
|
|
10
13
|
/** default value of select field */
|
|
11
14
|
defaultValue?: string;
|
|
12
15
|
/** options of select dropdown */
|
|
13
16
|
options: Array<OptionType>;
|
|
14
17
|
}
|
|
15
|
-
export declare const DotInputSelect: ({ ariaLabel, autoFocus, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, disabled, endIcon, endText, error, fullWidth, helperText, id, inputRef, label, name, onBlur, onChange, onFocus, onKeyDown, options, persistentLabel, readOnly, required, shrink, size, startIcon, success, value, warning, }: InputSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const DotInputSelect: ({ ariaLabel, additionalLabelContent, autoFocus, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, disabled, endIcon, endText, error, fullWidth, helperText, id, inputRef, label, name, onBlur, onChange, onFocus, onKeyDown, options, persistentLabel, readOnly, required, shrink, size, startIcon, success, value, warning, }: InputSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,8 @@ import { InputProps } from './InputFormFields.propTypes';
|
|
|
3
3
|
export declare const DELAY_MS = 300;
|
|
4
4
|
export type endAdornmentIconType = 'warning' | 'error' | 'check';
|
|
5
5
|
export interface InputTextProps extends InputProps {
|
|
6
|
+
/** Additional content on the top right of the input text field. **/
|
|
7
|
+
additionalLabelContent?: ReactNode;
|
|
6
8
|
/** If true, applies no border */
|
|
7
9
|
ai?: boolean;
|
|
8
10
|
/** The HTML autocomplete property to pass along to the input tag. Used for
|
|
@@ -42,4 +44,4 @@ export interface EndIconProps {
|
|
|
42
44
|
success?: boolean;
|
|
43
45
|
warning?: boolean;
|
|
44
46
|
}
|
|
45
|
-
export declare const DotInputText: ({ ai, autoComplete, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, hasResizer, helperText, endIcon, endText, id, informationToolTip, inputRef, label, max, maxLength, maxRows, min, minLength, minRows, multiline, name, onBlur, onChange, onClear, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare const DotInputText: ({ ai, additionalLabelContent, autoComplete, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, hasResizer, helperText, endIcon, endText, id, informationToolTip, inputRef, label, max, maxLength, maxRows, min, minLength, minRows, multiline, name, onBlur, onChange, onClear, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const rootClassName = "dot-search";
|
|
2
|
-
export declare const StyledSearch: import("styled-components").StyledComponent<({ ai, autoComplete, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, hasResizer, helperText, endIcon, endText, id, informationToolTip, inputRef, label, max, maxLength, maxRows, min, minLength, minRows, multiline, name, onBlur, onChange, onClear, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: import("../input-form-fields/InputText").InputTextProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
2
|
+
export declare const StyledSearch: import("styled-components").StyledComponent<({ ai, additionalLabelContent, autoComplete, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, hasResizer, helperText, endIcon, endText, id, informationToolTip, inputRef, label, max, maxLength, maxRows, min, minLength, minRows, multiline, name, onBlur, onChange, onClear, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: import("../input-form-fields/InputText").InputTextProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|