@carbon/ibm-products 2.33.0 → 2.35.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +31990 -32061
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +38 -17
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +636 -24096
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +2342 -17830
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/ActionSet/ActionSet.d.ts +38 -2
- package/es/components/ActionSet/ActionSet.js +3 -5
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/es/components/ConditionBuilder/index.d.ts +1 -0
- package/es/components/CreateFullPage/CreateFullPage.js +3 -19
- package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
- package/es/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
- package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
- package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
- package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
- package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/es/components/Datagrid/useEditableCell.js +15 -0
- package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/es/components/DelimitedList/DelimitedList.js +0 -1
- package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/es/components/EditInPlace/EditInPlace.js +10 -6
- package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
- package/es/components/EditSidePanel/EditSidePanel.js +8 -10
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
- package/es/components/ExportModal/ExportModal.d.ts +110 -2
- package/es/components/ExportModal/ExportModal.js +10 -4
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
- package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
- package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
- package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
- package/es/components/FilterPanel/index.d.ts +5 -0
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/es/components/ImportModal/ImportModal.d.ts +136 -2
- package/es/components/ImportModal/ImportModal.js +3 -2
- package/es/components/InlineTip/InlineTip.d.ts +90 -2
- package/es/components/InlineTip/InlineTip.js +3 -2
- package/es/components/Nav/Nav.js +1 -1
- package/es/components/Nav/NavList.js +7 -7
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
- package/es/components/OptionsTile/OptionsTile.js +9 -20
- package/es/components/PageHeader/PageHeader.js +3 -3
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -3
- package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
- package/es/components/RemoveModal/RemoveModal.js +1 -0
- package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
- package/es/components/ScrollGradient/ScrollGradient.js +156 -0
- package/es/components/ScrollGradient/constants.d.ts +15 -0
- package/es/components/ScrollGradient/constants.js +121 -0
- package/es/components/ScrollGradient/index.d.ts +1 -0
- package/es/components/SidePanel/SidePanel.d.ts +144 -2
- package/es/components/SidePanel/SidePanel.js +100 -75
- package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
- package/es/components/StatusIcon/StatusIcon.js +97 -95
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +209 -0
- package/es/components/TagOverflow/constants.d.ts +14 -0
- package/es/components/TagOverflow/constants.js +30 -0
- package/es/components/TagOverflow/index.d.ts +1 -0
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/es/components/Toolbar/Toolbar.d.ts +23 -5
- package/es/components/Toolbar/Toolbar.js +30 -26
- package/es/components/TruncatedList/TruncatedList.js +5 -3
- package/es/components/UserAvatar/UserAvatar.js +7 -4
- package/es/components/index.d.ts +5 -2
- package/es/global/js/package-settings.d.ts +8 -0
- package/es/global/js/package-settings.js +8 -0
- package/es/index.js +9 -0
- package/es/settings.d.ts +8 -0
- package/lib/components/ActionSet/ActionSet.d.ts +38 -2
- package/lib/components/ActionSet/ActionSet.js +3 -5
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/lib/components/ConditionBuilder/index.d.ts +1 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +2 -18
- package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
- package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
- package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/lib/components/Datagrid/useEditableCell.js +19 -0
- package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/lib/components/DelimitedList/DelimitedList.js +0 -1
- package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/lib/components/EditInPlace/EditInPlace.js +10 -6
- package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
- package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
- package/lib/components/ExportModal/ExportModal.d.ts +110 -2
- package/lib/components/ExportModal/ExportModal.js +10 -4
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
- package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
- package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
- package/lib/components/FilterPanel/index.d.ts +5 -0
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/lib/components/ImportModal/ImportModal.d.ts +136 -2
- package/lib/components/ImportModal/ImportModal.js +3 -2
- package/lib/components/InlineTip/InlineTip.d.ts +90 -2
- package/lib/components/InlineTip/InlineTip.js +3 -2
- package/lib/components/Nav/Nav.js +1 -1
- package/lib/components/Nav/NavList.js +7 -7
- package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
- package/lib/components/OptionsTile/OptionsTile.js +9 -20
- package/lib/components/PageHeader/PageHeader.js +3 -3
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
- package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
- package/lib/components/RemoveModal/RemoveModal.js +1 -0
- package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
- package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
- package/lib/components/ScrollGradient/constants.d.ts +15 -0
- package/lib/components/ScrollGradient/constants.js +128 -0
- package/lib/components/ScrollGradient/index.d.ts +1 -0
- package/lib/components/SidePanel/SidePanel.d.ts +144 -2
- package/lib/components/SidePanel/SidePanel.js +100 -75
- package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
- package/lib/components/StatusIcon/StatusIcon.js +97 -95
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +216 -0
- package/lib/components/TagOverflow/constants.d.ts +14 -0
- package/lib/components/TagOverflow/constants.js +34 -0
- package/lib/components/TagOverflow/index.d.ts +1 -0
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/lib/components/Toolbar/Toolbar.d.ts +23 -5
- package/lib/components/Toolbar/Toolbar.js +30 -26
- package/lib/components/TruncatedList/TruncatedList.js +5 -3
- package/lib/components/UserAvatar/UserAvatar.js +7 -4
- package/lib/components/index.d.ts +5 -2
- package/lib/global/js/package-settings.d.ts +8 -0
- package/lib/global/js/package-settings.js +8 -0
- package/lib/index.js +42 -0
- package/lib/settings.d.ts +8 -0
- package/package.json +3 -3
- package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
- package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
- package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
- package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
- package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
- package/scss/components/ConditionBuilder/_index.scss +8 -0
- package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
- package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
- package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
- package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +54 -0
- package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
- package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +60 -0
- package/scss/components/FilterPanel/_filter-panel-checkbox.scss +24 -3
- package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
- package/scss/components/FilterPanel/_filter-panel-label.scss +0 -8
- package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
- package/scss/components/FilterPanel/_filter-panel.scss +2 -0
- package/scss/components/FilterPanel/_index-with-carbon.scss +5 -0
- package/scss/components/FilterPanel/_index.scss +5 -0
- package/scss/components/Guidebanner/_guidebanner.scss +1 -1
- package/scss/components/InlineTip/_inline-tip.scss +1 -1
- package/scss/components/ProductiveCard/_productive-card.scss +13 -0
- package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
- package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
- package/scss/components/ScrollGradient/_index.scss +8 -0
- package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
- package/scss/components/SidePanel/_side-panel.scss +9 -9
- package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
- package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
- package/scss/components/TagOverflow/_index.scss +8 -0
- package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
- package/scss/components/Tearsheet/_tearsheet.scss +10 -0
- package/scss/components/UserAvatar/_user-avatar.scss +38 -4
- package/scss/components/_index-with-carbon.scss +3 -0
- package/scss/components/_index.scss +3 -0
@@ -1,5 +1,95 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2021
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { ReactNode } from 'react';
|
8
|
+
import '../../global/js/utils/props-helper';
|
9
|
+
interface EditSidePanelProps {
|
10
|
+
/**
|
11
|
+
* Sets the body content of the create side panel
|
12
|
+
*/
|
13
|
+
children: ReactNode;
|
14
|
+
/**
|
15
|
+
* Provide an optional class to be applied to the containing node.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* Specifies a boolean for disabling or enabling the primary button. This is important for form validation
|
20
|
+
* Returning `true` prevents the primary button from being clicked until required fields are completed.
|
21
|
+
*/
|
22
|
+
disableSubmit?: boolean;
|
23
|
+
/**
|
24
|
+
* Specifies an optional field that provides a additional context for a form
|
25
|
+
*/
|
26
|
+
formDescription?: ReactNode;
|
27
|
+
/**
|
28
|
+
* Specifies a required field that provides a title for a form
|
29
|
+
*/
|
30
|
+
formTitle: ReactNode;
|
31
|
+
/**
|
32
|
+
* Unique identifier
|
33
|
+
*/
|
34
|
+
id?: string;
|
35
|
+
/**
|
36
|
+
* Specifies an optional handler which is called when the CreateSidePanel
|
37
|
+
* is closed.
|
38
|
+
*/
|
39
|
+
onRequestClose?: () => void;
|
40
|
+
/**
|
41
|
+
* Specifies an optional handler which is called when the CreateSidePanel
|
42
|
+
* primary button is pressed.
|
43
|
+
*/
|
44
|
+
onRequestSubmit?: () => void;
|
45
|
+
/**
|
46
|
+
* Specifies whether the CreateSidePanel is open or not.
|
47
|
+
*/
|
48
|
+
open: boolean;
|
49
|
+
/**
|
50
|
+
* Determines if the side panel is on the right or left
|
51
|
+
*/
|
52
|
+
placement?: 'left' | 'right';
|
53
|
+
/**
|
54
|
+
* Specifies the primary button's text in the modal.
|
55
|
+
*/
|
56
|
+
primaryButtonText: string;
|
57
|
+
/**
|
58
|
+
* Specifies the secondary button's text in the modal.
|
59
|
+
*/
|
60
|
+
secondaryButtonText: string;
|
61
|
+
/**
|
62
|
+
* This is the selector to the element that contains all of the page content that will shrink if the panel is a slide in.
|
63
|
+
* This prop is required when using the `slideIn` variant of the side panel.
|
64
|
+
*/
|
65
|
+
selectorPageContent?: string;
|
66
|
+
/**
|
67
|
+
* Specifies which DOM element in the form should be focused.
|
68
|
+
*/
|
69
|
+
selectorPrimaryFocus?: string;
|
70
|
+
/**
|
71
|
+
* Sets the size of the side panel
|
72
|
+
*/
|
73
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | '2xl';
|
74
|
+
/**
|
75
|
+
* Specifies which DOM element in the form should be focused.
|
76
|
+
*/
|
77
|
+
slideIn?: boolean;
|
78
|
+
/**
|
79
|
+
* **Experimental:** Provide a `Slug` component to be rendered inside the `SidePanel` component
|
80
|
+
*/
|
81
|
+
slug?: ReactNode;
|
82
|
+
/**
|
83
|
+
* The subtitle of the CreateSidePanel is optional and serves to provide more information about the modal.
|
84
|
+
*/
|
85
|
+
subtitle?: ReactNode;
|
86
|
+
/**
|
87
|
+
* The title of the CreateSidePanel is usually the product or service name.
|
88
|
+
*/
|
89
|
+
title: string;
|
90
|
+
}
|
1
91
|
/**
|
2
92
|
* Use with medium complexity edits if the user needs page context.
|
3
93
|
*/
|
4
|
-
export let EditSidePanel: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
94
|
+
export declare let EditSidePanel: React.ForwardRefExoticComponent<EditSidePanelProps & React.RefAttributes<HTMLDivElement>>;
|
95
|
+
export {};
|
@@ -24,12 +24,6 @@ var componentName = 'EditSidePanel';
|
|
24
24
|
|
25
25
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
26
26
|
|
27
|
-
// Default values for props
|
28
|
-
var defaults = {
|
29
|
-
placement: 'right',
|
30
|
-
size: 'md'
|
31
|
-
};
|
32
|
-
|
33
27
|
/**
|
34
28
|
* Use with medium complexity edits if the user needs page context.
|
35
29
|
*/
|
@@ -44,13 +38,13 @@ var EditSidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
44
38
|
onRequestSubmit = _ref.onRequestSubmit,
|
45
39
|
open = _ref.open,
|
46
40
|
_ref$placement = _ref.placement,
|
47
|
-
placement = _ref$placement === void 0 ?
|
41
|
+
placement = _ref$placement === void 0 ? 'right' : _ref$placement,
|
48
42
|
primaryButtonText = _ref.primaryButtonText,
|
49
43
|
secondaryButtonText = _ref.secondaryButtonText,
|
50
44
|
selectorPrimaryFocus = _ref.selectorPrimaryFocus,
|
51
45
|
selectorPageContent = _ref.selectorPageContent,
|
52
46
|
_ref$size = _ref.size,
|
53
|
-
size = _ref$size === void 0 ?
|
47
|
+
size = _ref$size === void 0 ? 'md' : _ref$size,
|
54
48
|
slideIn = _ref.slideIn,
|
55
49
|
subtitle = _ref.subtitle,
|
56
50
|
title = _ref.title,
|
@@ -59,7 +53,7 @@ var EditSidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
59
53
|
label: primaryButtonText,
|
60
54
|
onClick: function onClick(event) {
|
61
55
|
event.preventDefault();
|
62
|
-
onRequestSubmit();
|
56
|
+
onRequestSubmit && onRequestSubmit();
|
63
57
|
},
|
64
58
|
kind: 'primary',
|
65
59
|
disabled: disableSubmit,
|
@@ -112,6 +106,7 @@ EditSidePanel.propTypes = {
|
|
112
106
|
/**
|
113
107
|
* Sets the body content of the create side panel
|
114
108
|
*/
|
109
|
+
/**@ts-ignore*/
|
115
110
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
116
111
|
/**
|
117
112
|
* Provide an optional class to be applied to the containing node.
|
@@ -147,7 +142,7 @@ EditSidePanel.propTypes = {
|
|
147
142
|
/**
|
148
143
|
* Specifies whether the CreateSidePanel is open or not.
|
149
144
|
*/
|
150
|
-
open: PropTypes.bool,
|
145
|
+
open: PropTypes.bool.isRequired,
|
151
146
|
/**
|
152
147
|
* Determines if the side panel is on the right or left
|
153
148
|
*/
|
@@ -164,6 +159,7 @@ EditSidePanel.propTypes = {
|
|
164
159
|
* This is the selector to the element that contains all of the page content that will shrink if the panel is a slide in.
|
165
160
|
* This prop is required when using the `slideIn` variant of the side panel.
|
166
161
|
*/
|
162
|
+
/**@ts-ignore*/
|
167
163
|
selectorPageContent: PropTypes.string.isRequired.if(function (_ref2) {
|
168
164
|
var slideIn = _ref2.slideIn;
|
169
165
|
return slideIn;
|
@@ -171,6 +167,7 @@ EditSidePanel.propTypes = {
|
|
171
167
|
/**
|
172
168
|
* Specifies which DOM element in the form should be focused.
|
173
169
|
*/
|
170
|
+
/**@ts-ignore*/
|
174
171
|
selectorPrimaryFocus: PropTypes.node.isRequired,
|
175
172
|
/**
|
176
173
|
* Sets the size of the side panel
|
@@ -191,6 +188,7 @@ EditSidePanel.propTypes = {
|
|
191
188
|
/**
|
192
189
|
* The title of the CreateSidePanel is usually the product or service name.
|
193
190
|
*/
|
191
|
+
/**@ts-ignore*/
|
194
192
|
title: PropTypes.node.isRequired
|
195
193
|
};
|
196
194
|
|
@@ -1,5 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/// <reference path="../../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React, { ReactNode } from 'react';
|
9
|
+
import { ButtonProps } from '@carbon/react';
|
10
|
+
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
11
|
+
interface ErrorEmptyStateProps {
|
12
|
+
/**
|
13
|
+
* Empty state action button
|
14
|
+
*/
|
15
|
+
action?: {
|
16
|
+
kind?: 'primary' | 'secondary' | 'tertiary';
|
17
|
+
renderIcon?: CarbonIconType;
|
18
|
+
onClick?: ButtonProps['onClick'];
|
19
|
+
text?: string;
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Provide an optional class to be applied to the containing node.
|
23
|
+
*/
|
24
|
+
className?: string;
|
25
|
+
/**
|
26
|
+
* The alt text for empty state svg images. If not provided , title will be used.
|
27
|
+
*/
|
28
|
+
illustrationDescription?: string;
|
29
|
+
/**
|
30
|
+
* Designates the position of the illustration relative to the content
|
31
|
+
*/
|
32
|
+
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
33
|
+
/**
|
34
|
+
* Empty state illustration theme variations.
|
35
|
+
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
36
|
+
* based on your app's current theme value. Example:
|
37
|
+
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
38
|
+
*/
|
39
|
+
illustrationTheme?: 'light' | 'dark';
|
40
|
+
/**
|
41
|
+
* Empty state link object
|
42
|
+
*/
|
43
|
+
link?: {
|
44
|
+
text?: string | ReactNode;
|
45
|
+
href?: string;
|
46
|
+
};
|
47
|
+
/**
|
48
|
+
* Empty state size
|
49
|
+
*/
|
50
|
+
size?: 'lg' | 'sm';
|
51
|
+
/**
|
52
|
+
* Empty state subtitle
|
53
|
+
*/
|
54
|
+
subtitle?: string | ReactNode;
|
55
|
+
/**
|
56
|
+
* Empty state title
|
57
|
+
*/
|
58
|
+
title: string | ReactNode;
|
59
|
+
}
|
1
60
|
/**
|
2
61
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
3
62
|
*/
|
4
|
-
export let ErrorEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
63
|
+
export declare let ErrorEmptyState: React.ForwardRefExoticComponent<ErrorEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
64
|
+
export {};
|
@@ -17,11 +17,9 @@ import ErrorIllustration from '../assets/ErrorIllustration.js';
|
|
17
17
|
import { defaults } from '../EmptyState.js';
|
18
18
|
|
19
19
|
var _excluded = ["action", "className", "illustrationPosition", "illustrationDescription", "illustrationTheme", "link", "size", "subtitle", "title"];
|
20
|
-
|
21
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
23
22
|
var componentName = 'ErrorEmptyState';
|
24
|
-
|
25
23
|
/**
|
26
24
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
27
25
|
*/
|
@@ -50,7 +48,7 @@ var ErrorEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
50
48
|
link: link,
|
51
49
|
size: size,
|
52
50
|
subtitle: subtitle,
|
53
|
-
title: title
|
51
|
+
title: title || ''
|
54
52
|
}));
|
55
53
|
});
|
56
54
|
|
@@ -1,5 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2021
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/// <reference path="../../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React, { ReactNode } from 'react';
|
9
|
+
import { ButtonProps } from '@carbon/react';
|
10
|
+
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
11
|
+
interface NoDataEmptyStateProps {
|
12
|
+
/**
|
13
|
+
* Empty state action button
|
14
|
+
*/
|
15
|
+
action?: {
|
16
|
+
kind?: 'primary' | 'secondary' | 'tertiary';
|
17
|
+
renderIcon?: CarbonIconType;
|
18
|
+
onClick?: ButtonProps['onClick'];
|
19
|
+
text?: string;
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Provide an optional class to be applied to the containing node.
|
23
|
+
*/
|
24
|
+
className?: string;
|
25
|
+
/**
|
26
|
+
* The alt text for empty state svg images. If not provided, title will be used.
|
27
|
+
*/
|
28
|
+
illustrationDescription?: string;
|
29
|
+
/**
|
30
|
+
* Designates the position of the illustration relative to the content
|
31
|
+
*/
|
32
|
+
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
33
|
+
/**
|
34
|
+
* Empty state illustration theme variations.
|
35
|
+
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
36
|
+
* based on your app's current theme value. Example:
|
37
|
+
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
38
|
+
*/
|
39
|
+
illustrationTheme?: 'light' | 'dark';
|
40
|
+
/**
|
41
|
+
* Empty state link object
|
42
|
+
*/
|
43
|
+
link?: {
|
44
|
+
text?: string | ReactNode;
|
45
|
+
href?: string;
|
46
|
+
};
|
47
|
+
/**
|
48
|
+
* Empty state size
|
49
|
+
*/
|
50
|
+
size?: 'lg' | 'sm';
|
51
|
+
/**
|
52
|
+
* Empty state subtitle
|
53
|
+
*/
|
54
|
+
subtitle?: string | React.ReactNode;
|
55
|
+
/**
|
56
|
+
* Empty state title
|
57
|
+
*/
|
58
|
+
title: string | React.ReactNode;
|
59
|
+
}
|
1
60
|
/**
|
2
61
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
3
62
|
*/
|
4
|
-
export let NoDataEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
63
|
+
export declare let NoDataEmptyState: React.ForwardRefExoticComponent<NoDataEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
64
|
+
export {};
|
@@ -21,7 +21,6 @@ var _excluded = ["action", "className", "illustrationPosition", "illustrationThe
|
|
21
21
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
22
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
23
23
|
var componentName = 'NoDataEmptyState';
|
24
|
-
|
25
24
|
/**
|
26
25
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
27
26
|
*/
|
@@ -50,7 +49,7 @@ var NoDataEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
50
49
|
link: link,
|
51
50
|
size: size,
|
52
51
|
subtitle: subtitle,
|
53
|
-
title: title
|
52
|
+
title: title || ''
|
54
53
|
}));
|
55
54
|
});
|
56
55
|
|
@@ -1,5 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/// <reference path="../../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React, { ReactNode } from 'react';
|
9
|
+
import { ButtonProps } from '@carbon/react';
|
10
|
+
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
11
|
+
interface NotFoundEmptyStateProps {
|
12
|
+
/**
|
13
|
+
* Empty state action button
|
14
|
+
*/
|
15
|
+
action?: {
|
16
|
+
kind?: 'primary' | 'secondary' | 'tertiary';
|
17
|
+
renderIcon?: CarbonIconType;
|
18
|
+
onClick?: ButtonProps['onClick'];
|
19
|
+
text?: string;
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Provide an optional class to be applied to the containing node.
|
23
|
+
*/
|
24
|
+
className?: string;
|
25
|
+
/**
|
26
|
+
* The alt text for empty state svg images. If not provided , title will be used.
|
27
|
+
*/
|
28
|
+
illustrationDescription?: string;
|
29
|
+
/**
|
30
|
+
* Designates the position of the illustration relative to the content
|
31
|
+
*/
|
32
|
+
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
33
|
+
/**
|
34
|
+
* Empty state illustration theme variations.
|
35
|
+
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
36
|
+
* based on your app's current theme value. Example:
|
37
|
+
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
38
|
+
*/
|
39
|
+
illustrationTheme?: 'light' | 'dark';
|
40
|
+
/**
|
41
|
+
* Empty state link object
|
42
|
+
*/
|
43
|
+
link?: {
|
44
|
+
text?: string | ReactNode;
|
45
|
+
href?: string;
|
46
|
+
};
|
47
|
+
/**
|
48
|
+
* Empty state size
|
49
|
+
*/
|
50
|
+
size?: 'lg' | 'sm';
|
51
|
+
/**
|
52
|
+
* Empty state subtitle
|
53
|
+
*/
|
54
|
+
subtitle: string | ReactNode;
|
55
|
+
/**
|
56
|
+
* Empty state title
|
57
|
+
*/
|
58
|
+
title: string | ReactNode;
|
59
|
+
}
|
1
60
|
/**
|
2
61
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
3
62
|
*/
|
4
|
-
export let NotFoundEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
63
|
+
export declare let NotFoundEmptyState: React.ForwardRefExoticComponent<NotFoundEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
64
|
+
export {};
|
@@ -17,11 +17,9 @@ import NotFoundIllustration from '../assets/NotFoundIllustration.js';
|
|
17
17
|
import { defaults } from '../EmptyState.js';
|
18
18
|
|
19
19
|
var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
20
|
-
|
21
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
23
22
|
var componentName = 'NotFoundEmptyState';
|
24
|
-
|
25
23
|
/**
|
26
24
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
27
25
|
*/
|
@@ -50,7 +48,7 @@ var NotFoundEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
50
48
|
link: link,
|
51
49
|
size: size,
|
52
50
|
subtitle: subtitle,
|
53
|
-
title: title
|
51
|
+
title: title || ''
|
54
52
|
}));
|
55
53
|
});
|
56
54
|
|
@@ -1,5 +1,113 @@
|
|
1
|
+
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
2
|
+
import React, { ReactNode } from 'react';
|
3
|
+
import { ComposedModal } from '@carbon/react';
|
4
|
+
type InputType = 'text' | 'password';
|
5
|
+
type PreformattedExtensions = {
|
6
|
+
extension?: string;
|
7
|
+
description?: string;
|
8
|
+
};
|
9
|
+
interface RemoveModalProps extends React.ComponentProps<typeof ComposedModal> {
|
10
|
+
/**
|
11
|
+
* Body content for the modal
|
12
|
+
*/
|
13
|
+
body?: string;
|
14
|
+
/**
|
15
|
+
* Optional class name
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* specify if an error occurred
|
20
|
+
*/
|
21
|
+
error?: boolean;
|
22
|
+
/**
|
23
|
+
* messaging to display in the event of an error
|
24
|
+
*/
|
25
|
+
errorMessage?: string;
|
26
|
+
/**
|
27
|
+
* name of the file being exported
|
28
|
+
*/
|
29
|
+
filename: string;
|
30
|
+
/**
|
31
|
+
* label text that's displayed when hovering over visibility toggler to hide key
|
32
|
+
*/
|
33
|
+
hidePasswordLabel?: string;
|
34
|
+
/**
|
35
|
+
* label for the text input
|
36
|
+
*/
|
37
|
+
inputLabel?: string;
|
38
|
+
/**
|
39
|
+
* specify the type of text input
|
40
|
+
*/
|
41
|
+
inputType: InputType;
|
42
|
+
/**
|
43
|
+
* text for an invalid input
|
44
|
+
*/
|
45
|
+
invalidInputText?: string;
|
46
|
+
/**
|
47
|
+
* specify if the modal is in a loading state
|
48
|
+
*/
|
49
|
+
loading?: boolean;
|
50
|
+
/**
|
51
|
+
* message to display during the loading state
|
52
|
+
*/
|
53
|
+
loadingMessage?: string;
|
54
|
+
/**
|
55
|
+
* Specify a handler for closing modal
|
56
|
+
*/
|
57
|
+
onClose?: () => void;
|
58
|
+
/**
|
59
|
+
* Specify a handler for "submitting" modal. Returns the file name
|
60
|
+
*/
|
61
|
+
onRequestSubmit?: (value?: string) => void;
|
62
|
+
/**
|
63
|
+
* Specify whether the Modal is currently open
|
64
|
+
*/
|
65
|
+
open?: boolean;
|
66
|
+
/**
|
67
|
+
* The DOM node the tearsheet should be rendered within. Defaults to document.body.
|
68
|
+
*/
|
69
|
+
portalTarget?: ReactNode;
|
70
|
+
/**
|
71
|
+
* Array of extensions to display as radio buttons
|
72
|
+
*/
|
73
|
+
preformattedExtensions: readonly PreformattedExtensions[];
|
74
|
+
/**
|
75
|
+
* Label for the preformatted label form group
|
76
|
+
*/
|
77
|
+
preformattedExtensionsLabel?: string;
|
78
|
+
/**
|
79
|
+
* Specify the text for the primary button
|
80
|
+
*/
|
81
|
+
primaryButtonText: string;
|
82
|
+
/**
|
83
|
+
* Specify the text for the secondary button
|
84
|
+
*/
|
85
|
+
secondaryButtonText: string;
|
86
|
+
/**
|
87
|
+
* label text that's displayed when hovering over visibility toggler to show key
|
88
|
+
*/
|
89
|
+
showPasswordLabel?: string;
|
90
|
+
/**
|
91
|
+
* messaging to display if the export was successful
|
92
|
+
*/
|
93
|
+
successMessage?: string;
|
94
|
+
/**
|
95
|
+
* specify if the export was successful
|
96
|
+
*/
|
97
|
+
successful?: boolean;
|
98
|
+
/**
|
99
|
+
* The text displayed at the top of the modal
|
100
|
+
*/
|
101
|
+
title: string;
|
102
|
+
/**
|
103
|
+
* array of valid extensions the file can have
|
104
|
+
*/
|
105
|
+
validExtensions: readonly any[];
|
106
|
+
}
|
1
107
|
/**
|
2
108
|
* Modal dialog version of the export pattern
|
3
109
|
*/
|
4
|
-
export let ExportModal: React.ForwardRefExoticComponent<
|
5
|
-
|
110
|
+
export declare let ExportModal: React.ForwardRefExoticComponent<RemoveModalProps & {
|
111
|
+
children?: React.ReactNode;
|
112
|
+
} & React.RefAttributes<unknown>>;
|
113
|
+
export {};
|
@@ -26,7 +26,6 @@ var defaults = {
|
|
26
26
|
preformattedExtensions: Object.freeze([]),
|
27
27
|
validExtensions: Object.freeze([])
|
28
28
|
};
|
29
|
-
|
30
29
|
/**
|
31
30
|
* Modal dialog version of the export pattern
|
32
31
|
*/
|
@@ -39,7 +38,7 @@ var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
39
38
|
hidePasswordLabel = _ref.hidePasswordLabel,
|
40
39
|
inputLabel = _ref.inputLabel,
|
41
40
|
_ref$inputType = _ref.inputType,
|
42
|
-
inputType = _ref$inputType === void 0 ?
|
41
|
+
inputType = _ref$inputType === void 0 ? 'text' : _ref$inputType,
|
43
42
|
invalidInputText = _ref.invalidInputText,
|
44
43
|
loading = _ref.loading,
|
45
44
|
loadingMessage = _ref.loadingMessage,
|
@@ -76,7 +75,10 @@ var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
76
75
|
useEffect(function () {
|
77
76
|
var _preformattedExtensio;
|
78
77
|
setName(filename);
|
79
|
-
|
78
|
+
if (preformattedExtensions && preformattedExtensions.length > 0 && (_preformattedExtensio = preformattedExtensions[0]) !== null && _preformattedExtensio !== void 0 && _preformattedExtensio.extension) {
|
79
|
+
var _preformattedExtensio2;
|
80
|
+
setExtension(preformattedExtensions === null || preformattedExtensions === void 0 || (_preformattedExtensio2 = preformattedExtensions[0]) === null || _preformattedExtensio2 === void 0 ? void 0 : _preformattedExtensio2.extension);
|
81
|
+
}
|
80
82
|
}, [filename, preformattedExtensions, open]);
|
81
83
|
var onNameChangeHandler = function onNameChangeHandler(evt) {
|
82
84
|
setName(evt.target.value);
|
@@ -89,7 +91,7 @@ var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
89
91
|
};
|
90
92
|
var onSubmitHandler = function onSubmitHandler() {
|
91
93
|
var returnName = extension ? "".concat(filename, ".").concat(extension.toLocaleLowerCase()) : name;
|
92
|
-
onRequestSubmit(returnName);
|
94
|
+
onRequestSubmit && onRequestSubmit(returnName);
|
93
95
|
};
|
94
96
|
var hasInvalidExtension = function hasInvalidExtension() {
|
95
97
|
if (!dirtyInput || !validExtensions || !validExtensions.length) {
|
@@ -186,6 +188,7 @@ ExportModal.propTypes = {
|
|
186
188
|
/**
|
187
189
|
* Body content for the modal
|
188
190
|
*/
|
191
|
+
/**@ts-ignore*/
|
189
192
|
body: PropTypes.string,
|
190
193
|
/**
|
191
194
|
* Optional class name
|
@@ -214,6 +217,7 @@ ExportModal.propTypes = {
|
|
214
217
|
/**
|
215
218
|
* specify the type of text input
|
216
219
|
*/
|
220
|
+
/**@ts-ignore */
|
217
221
|
inputType: PropTypes.oneOf(['text', 'password']),
|
218
222
|
/**
|
219
223
|
* text for an invalid input
|
@@ -246,6 +250,7 @@ ExportModal.propTypes = {
|
|
246
250
|
/**
|
247
251
|
* Array of extensions to display as radio buttons
|
248
252
|
*/
|
253
|
+
/**@ts-ignore */
|
249
254
|
preformattedExtensions: PropTypes.arrayOf(PropTypes.shape({
|
250
255
|
extension: PropTypes.string,
|
251
256
|
description: PropTypes.string
|
@@ -281,6 +286,7 @@ ExportModal.propTypes = {
|
|
281
286
|
/**
|
282
287
|
* array of valid extensions the file can have
|
283
288
|
*/
|
289
|
+
/**@ts-ignore */
|
284
290
|
validExtensions: PropTypes.array
|
285
291
|
};
|
286
292
|
ExportModal.displayName = componentName;
|