@rh-support/components 2.0.4 → 2.0.7-beta.1
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/lib/cjs/AlertMessage/AlertMessage.js +5 -5
- package/lib/cjs/AlertMessage/index.d.ts +0 -1
- package/lib/cjs/AlertMessage/index.d.ts.map +1 -1
- package/lib/cjs/AlertMessage/index.js +1 -1
- package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts +0 -1
- package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts.map +1 -1
- package/lib/cjs/ConfirmationModal/ConfirmationContext.js +13 -41
- package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts +4 -2
- package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
- package/lib/cjs/ConfirmationModal/ConfirmationDialog.js +7 -6
- package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -6
- package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -1
- package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.js +29 -69
- package/lib/cjs/CoverSpinner/CoverSpinner.d.ts +0 -1
- package/lib/cjs/CoverSpinner/CoverSpinner.d.ts.map +1 -1
- package/lib/cjs/CoverSpinner/CoverSpinner.js +1 -1
- package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts.map +1 -1
- package/lib/cjs/CustomContentLoader/CustomContentLoader.js +25 -25
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -1
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/cjs/CustomTextInput/CustomTextInput.js +10 -21
- package/lib/cjs/DropDownList/AsyncDropDownList.js +5 -5
- package/lib/cjs/DropDownList/DropDownList.d.ts +0 -1
- package/lib/cjs/DropDownList/DropDownList.d.ts.map +1 -1
- package/lib/cjs/DropDownList/DropDownList.js +45 -75
- package/lib/cjs/DropDownList/DropdownWrapper.js +7 -18
- package/lib/cjs/DropDownList/MultiSelectDropdownList.js +3 -3
- package/lib/cjs/DropDownList/SearchableList.d.ts +1 -0
- package/lib/cjs/DropDownList/SearchableList.d.ts.map +1 -1
- package/lib/cjs/DropDownList/SearchableList.js +45 -55
- package/lib/cjs/DropDownList/SelectList.js +15 -26
- package/lib/cjs/DropDownList/async.js +28 -38
- package/lib/cjs/DropDownList/dropdownList.css +1 -1
- package/lib/cjs/DropDownList/dropdownUtils.d.ts.map +1 -1
- package/lib/cjs/DropDownList/dropdownUtils.js +9 -19
- package/lib/cjs/DropDownList/types.d.ts +1 -0
- package/lib/cjs/DropDownList/types.d.ts.map +1 -1
- package/lib/cjs/DropDownList/withMulti.js +15 -26
- package/lib/cjs/ErrorBoundary/ErrorBoundary.js +18 -47
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +10 -10
- package/lib/cjs/ErrorPages/Generic403.d.ts +0 -1
- package/lib/cjs/ErrorPages/Generic403.d.ts.map +1 -1
- package/lib/cjs/ErrorPages/Generic403.js +2 -2
- package/lib/cjs/FeedbackForm/FeedbackForm.d.ts +0 -1
- package/lib/cjs/FeedbackForm/FeedbackForm.d.ts.map +1 -1
- package/lib/cjs/FeedbackForm/FeedbackForm.js +24 -52
- package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
- package/lib/cjs/Functional/CaseContactsSelectorExternal.js +81 -154
- package/lib/cjs/InlineEdit/InlineEdit.d.ts +1 -0
- package/lib/cjs/InlineEdit/InlineEdit.d.ts.map +1 -1
- package/lib/cjs/InlineEdit/InlineEdit.js +58 -144
- package/lib/cjs/InlineEdit/NewInlineEdit.d.ts +1 -0
- package/lib/cjs/InlineEdit/NewInlineEdit.d.ts.map +1 -1
- package/lib/cjs/InlineEdit/NewInlineEdit.js +62 -147
- package/lib/cjs/InlineEdit/inlineEdit.css +4 -0
- package/lib/cjs/InlineEdit/newInlineEdit.css +4 -0
- package/lib/cjs/LanguageSelector/LanguageSelector.d.ts +0 -1
- package/lib/cjs/LanguageSelector/LanguageSelector.d.ts.map +1 -1
- package/lib/cjs/LanguageSelector/LanguageSelector.js +10 -26
- package/lib/cjs/LoadingDots/LoadingDots.d.ts +0 -1
- package/lib/cjs/LoadingDots/LoadingDots.d.ts.map +1 -1
- package/lib/cjs/LoadingDots/LoadingDots.js +4 -4
- package/lib/cjs/LoadingDots/index.d.ts +0 -1
- package/lib/cjs/LoadingDots/index.d.ts.map +1 -1
- package/lib/cjs/LoadingDots/index.js +1 -1
- package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts +0 -1
- package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
- package/lib/cjs/LoadingIndicator/LoadingIndicator.js +3 -3
- package/lib/cjs/LoginModal/LoginModal.d.ts +0 -1
- package/lib/cjs/LoginModal/LoginModal.d.ts.map +1 -1
- package/lib/cjs/LoginModal/LoginModal.js +3 -3
- package/lib/cjs/MarkdownEditor/MarkdownEditor.js +113 -165
- package/lib/cjs/MoreOrLess/MoreOrLess.js +20 -40
- package/lib/cjs/PaginatedList/PaginatedList.js +15 -31
- package/lib/cjs/PaginationCompact/PaginationCompact.d.ts +0 -1
- package/lib/cjs/PaginationCompact/PaginationCompact.d.ts.map +1 -1
- package/lib/cjs/PaginationCompact/PaginationCompact.js +14 -31
- package/lib/cjs/PhoneInput/CountryData.d.ts +3 -0
- package/lib/cjs/PhoneInput/CountryData.d.ts.map +1 -0
- package/lib/cjs/PhoneInput/CountryData.js +583 -0
- package/lib/cjs/PhoneInput/PhoneInput.d.ts +19 -0
- package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/lib/cjs/PhoneInput/PhoneInput.js +284 -0
- package/lib/cjs/PhoneInput/PhoneInput.scss +753 -0
- package/lib/cjs/PhoneInput/flags.png +0 -0
- package/lib/cjs/PhoneInput/index.d.ts +2 -0
- package/lib/cjs/PhoneInput/index.d.ts.map +1 -0
- package/lib/cjs/PhoneInput/index.js +13 -0
- package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +1 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.js +14 -14
- package/lib/cjs/ProgressBar/CircularProgressBar/Path.js +20 -18
- package/lib/cjs/ProgressBar/ProgressBar.js +8 -19
- package/lib/cjs/PromisifyModal/PromisifyModal.js +19 -36
- package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -1
- package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +1 -1
- package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.js +5 -5
- package/lib/cjs/SubscriptionAbuse/const.d.ts +0 -1
- package/lib/cjs/SubscriptionAbuse/const.d.ts.map +1 -1
- package/lib/cjs/SubscriptionAbuse/const.js +3 -3
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +1 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.js +8 -24
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +50 -120
- package/lib/cjs/Table/PFTable.js +52 -89
- package/lib/cjs/Table/Table.js +12 -29
- package/lib/cjs/Table/TableColumnSelector.d.ts +0 -1
- package/lib/cjs/Table/TableColumnSelector.d.ts.map +1 -1
- package/lib/cjs/Table/TableColumnSelector.js +14 -15
- package/lib/cjs/Table/TablePagination.d.ts +0 -1
- package/lib/cjs/Table/TablePagination.d.ts.map +1 -1
- package/lib/cjs/Table/TablePagination.js +8 -8
- package/lib/cjs/Table/TableProvider.js +6 -6
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts +0 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +46 -100
- package/lib/cjs/TextAreaAutosize/TextAreaAutosize.js +35 -62
- package/lib/cjs/TextAreaResizable/TextAreaResizable.js +12 -25
- package/lib/cjs/ToastNotification/ToastNotification.js +35 -70
- package/lib/cjs/TopContentSearch/TopContentSearch.js +48 -113
- package/lib/cjs/ValueChangedIcon/ValueChangedIcon.js +13 -29
- package/lib/cjs/helperFunctions/errorMessage.d.ts +0 -1
- package/lib/cjs/helperFunctions/errorMessage.d.ts.map +1 -1
- package/lib/cjs/helperFunctions/errorMessage.js +13 -13
- package/lib/cjs/hooks/useBreakpoint.js +26 -43
- package/lib/cjs/hooks/useCopyToClipboard.js +8 -24
- package/lib/cjs/hooks/useDebounce.js +13 -38
- package/lib/cjs/hooks/useFetch.js +47 -123
- package/lib/cjs/hooks/useForceUpdate.js +2 -18
- package/lib/cjs/hooks/useForkRef.js +3 -3
- package/lib/cjs/hooks/useIsMounted.js +4 -4
- package/lib/cjs/hooks/useLRUCache.js +11 -11
- package/lib/cjs/hooks/useLocalStorage.js +7 -23
- package/lib/cjs/hooks/useOnScreen.js +5 -24
- package/lib/cjs/hooks/usePolling.js +8 -30
- package/lib/cjs/hooks/usePrevious.js +3 -3
- package/lib/cjs/hooks/useTitle.js +4 -4
- package/lib/cjs/hooks/useUndo.js +49 -72
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +1 -0
- package/lib/esm/AlertMessage/AlertMessage.js +2 -2
- package/lib/esm/AlertMessage/index.d.ts +0 -1
- package/lib/esm/AlertMessage/index.d.ts.map +1 -1
- package/lib/esm/AlertMessage/index.js +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts +0 -1
- package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts.map +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts +4 -2
- package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationDialog.js +3 -2
- package/lib/esm/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -6
- package/lib/esm/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationModal.stories.js +19 -18
- package/lib/esm/CoverSpinner/CoverSpinner.d.ts +0 -1
- package/lib/esm/CoverSpinner/CoverSpinner.d.ts.map +1 -1
- package/lib/esm/CustomContentLoader/CustomContentLoader.d.ts.map +1 -1
- package/lib/esm/CustomContentLoader/CustomContentLoader.js +23 -23
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts +0 -1
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/esm/CustomTextInput/CustomTextInput.js +1 -1
- package/lib/esm/DropDownList/DropDownList.d.ts +0 -1
- package/lib/esm/DropDownList/DropDownList.d.ts.map +1 -1
- package/lib/esm/DropDownList/SearchableList.d.ts +1 -0
- package/lib/esm/DropDownList/SearchableList.d.ts.map +1 -1
- package/lib/esm/DropDownList/SearchableList.js +6 -2
- package/lib/esm/DropDownList/dropdownList.css +1 -1
- package/lib/esm/DropDownList/dropdownUtils.d.ts.map +1 -1
- package/lib/esm/DropDownList/dropdownUtils.js +1 -0
- package/lib/esm/DropDownList/types.d.ts +1 -0
- package/lib/esm/DropDownList/types.d.ts.map +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/esm/ErrorPages/Generic403.d.ts +0 -1
- package/lib/esm/ErrorPages/Generic403.d.ts.map +1 -1
- package/lib/esm/FeedbackForm/FeedbackForm.d.ts +0 -1
- package/lib/esm/FeedbackForm/FeedbackForm.d.ts.map +1 -1
- package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
- package/lib/esm/Functional/CaseContactsSelectorExternal.js +2 -2
- package/lib/esm/InlineEdit/InlineEdit.d.ts +1 -0
- package/lib/esm/InlineEdit/InlineEdit.d.ts.map +1 -1
- package/lib/esm/InlineEdit/InlineEdit.js +3 -3
- package/lib/esm/InlineEdit/NewInlineEdit.d.ts +1 -0
- package/lib/esm/InlineEdit/NewInlineEdit.d.ts.map +1 -1
- package/lib/esm/InlineEdit/NewInlineEdit.js +3 -3
- package/lib/esm/InlineEdit/inlineEdit.css +4 -0
- package/lib/esm/InlineEdit/newInlineEdit.css +4 -0
- package/lib/esm/LanguageSelector/LanguageSelector.d.ts +0 -1
- package/lib/esm/LanguageSelector/LanguageSelector.d.ts.map +1 -1
- package/lib/esm/LoadingDots/LoadingDots.d.ts +0 -1
- package/lib/esm/LoadingDots/LoadingDots.d.ts.map +1 -1
- package/lib/esm/LoadingDots/LoadingDots.js +1 -1
- package/lib/esm/LoadingDots/index.d.ts +0 -1
- package/lib/esm/LoadingDots/index.d.ts.map +1 -1
- package/lib/esm/LoadingDots/index.js +1 -1
- package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts +0 -1
- package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
- package/lib/esm/LoginModal/LoginModal.d.ts +0 -1
- package/lib/esm/LoginModal/LoginModal.d.ts.map +1 -1
- package/lib/esm/PaginationCompact/PaginationCompact.d.ts +0 -1
- package/lib/esm/PaginationCompact/PaginationCompact.d.ts.map +1 -1
- package/lib/esm/PhoneInput/CountryData.d.ts +3 -0
- package/lib/esm/PhoneInput/CountryData.d.ts.map +1 -0
- package/lib/esm/PhoneInput/CountryData.js +580 -0
- package/lib/esm/PhoneInput/PhoneInput.d.ts +19 -0
- package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/lib/esm/PhoneInput/PhoneInput.js +257 -0
- package/lib/esm/PhoneInput/PhoneInput.scss +753 -0
- package/lib/esm/PhoneInput/flags.png +0 -0
- package/lib/esm/PhoneInput/index.d.ts +2 -0
- package/lib/esm/PhoneInput/index.d.ts.map +1 -0
- package/lib/esm/PhoneInput/index.js +1 -0
- package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -1
- package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +1 -1
- package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -1
- package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +1 -1
- package/lib/esm/SubscriptionAbuse/const.d.ts +0 -1
- package/lib/esm/SubscriptionAbuse/const.d.ts.map +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
- package/lib/esm/Table/TableColumnSelector.d.ts +0 -1
- package/lib/esm/Table/TableColumnSelector.d.ts.map +1 -1
- package/lib/esm/Table/TablePagination.d.ts +0 -1
- package/lib/esm/Table/TablePagination.d.ts.map +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts +0 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
- package/lib/esm/helperFunctions/errorMessage.d.ts +0 -1
- package/lib/esm/helperFunctions/errorMessage.d.ts.map +1 -1
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -0
- package/package.json +16 -30
- package/lib/cjs/AlertMessage/AlertMessage.stories.d.ts +0 -12
- package/lib/cjs/AlertMessage/AlertMessage.stories.d.ts.map +0 -1
- package/lib/cjs/AlertMessage/AlertMessage.stories.js +0 -29
- package/lib/cjs/DropDownList/Dropdownlist.stories.d.ts +0 -17
- package/lib/cjs/DropDownList/Dropdownlist.stories.d.ts.map +0 -1
- package/lib/cjs/DropDownList/Dropdownlist.stories.js +0 -253
- package/lib/cjs/LoadingDots/LoadingDots.stories.d.ts +0 -10
- package/lib/cjs/LoadingDots/LoadingDots.stories.d.ts.map +0 -1
- package/lib/cjs/LoadingDots/LoadingDots.stories.js +0 -16
- package/lib/cjs/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
- package/lib/cjs/LoadingIndicator/LoadingIndicator.stories.d.ts.map +0 -1
- package/lib/cjs/LoadingIndicator/LoadingIndicator.stories.js +0 -18
- package/lib/cjs/Table/PFTable.stories.d.ts +0 -20
- package/lib/cjs/Table/PFTable.stories.d.ts.map +0 -1
- package/lib/cjs/Table/PFTable.stories.js +0 -81
- package/lib/cjs/demo/Demo.css +0 -3
- package/lib/cjs/demo/Demo.d.ts +0 -13
- package/lib/cjs/demo/Demo.d.ts.map +0 -1
- package/lib/cjs/demo/Demo.js +0 -42
- package/lib/cjs/demo/Demo.md +0 -0
- package/lib/cjs/demo/Demo.scss +0 -3
- package/lib/cjs/demo/index.d.ts +0 -3
- package/lib/cjs/demo/index.d.ts.map +0 -1
- package/lib/cjs/demo/index.js +0 -23
- package/lib/esm/AlertMessage/AlertMessage.stories.d.ts +0 -12
- package/lib/esm/AlertMessage/AlertMessage.stories.d.ts.map +0 -1
- package/lib/esm/AlertMessage/AlertMessage.stories.js +0 -20
- package/lib/esm/DropDownList/Dropdownlist.stories.d.ts +0 -17
- package/lib/esm/DropDownList/Dropdownlist.stories.d.ts.map +0 -1
- package/lib/esm/DropDownList/Dropdownlist.stories.js +0 -156
- package/lib/esm/LoadingDots/LoadingDots.stories.d.ts +0 -10
- package/lib/esm/LoadingDots/LoadingDots.stories.d.ts.map +0 -1
- package/lib/esm/LoadingDots/LoadingDots.stories.js +0 -8
- package/lib/esm/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
- package/lib/esm/LoadingIndicator/LoadingIndicator.stories.d.ts.map +0 -1
- package/lib/esm/LoadingIndicator/LoadingIndicator.stories.js +0 -9
- package/lib/esm/Table/PFTable.stories.d.ts +0 -20
- package/lib/esm/Table/PFTable.stories.d.ts.map +0 -1
- package/lib/esm/Table/PFTable.stories.js +0 -73
- package/lib/esm/demo/Demo.css +0 -3
- package/lib/esm/demo/Demo.d.ts +0 -13
- package/lib/esm/demo/Demo.d.ts.map +0 -1
- package/lib/esm/demo/Demo.js +0 -26
- package/lib/esm/demo/Demo.md +0 -0
- package/lib/esm/demo/Demo.scss +0 -3
- package/lib/esm/demo/index.d.ts +0 -3
- package/lib/esm/demo/index.d.ts.map +0 -1
- package/lib/esm/demo/index.js +0 -2
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AlertMessage = exports.AlertType = void 0;
|
|
7
7
|
require("./AlertMessage.css");
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
10
|
var AlertType;
|
|
11
11
|
(function (AlertType) {
|
|
12
12
|
AlertType["DANGER"] = "danger";
|
|
@@ -14,7 +14,7 @@ var AlertType;
|
|
|
14
14
|
AlertType["INFO"] = "info";
|
|
15
15
|
AlertType["SUCCESS"] = "success";
|
|
16
16
|
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
17
|
-
|
|
17
|
+
const defaultProps = {
|
|
18
18
|
className: '',
|
|
19
19
|
show: false,
|
|
20
20
|
};
|
|
@@ -23,8 +23,8 @@ function AlertMessage(props) {
|
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
25
|
// If there is no title then the children node becomes the title to have a better styling
|
|
26
|
-
|
|
27
|
-
return (react_1.default.createElement(react_core_1.Alert, { label: props.title, className: props.className, variant: props.variant, title:
|
|
26
|
+
const alertMsgTitle = props.title || props.children;
|
|
27
|
+
return (react_1.default.createElement(react_core_1.Alert, { label: props.title, className: props.className, variant: props.variant, title: alertMsgTitle, isInline: props.isInline, actionClose: !!props.onClose ? react_1.default.createElement(react_core_1.AlertActionCloseButton, { onClose: props.onClose }) : null }, props.title ? props.children : react_1.default.createElement(react_1.default.Fragment, null)));
|
|
28
28
|
}
|
|
29
29
|
exports.AlertMessage = AlertMessage;
|
|
30
30
|
AlertMessage.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AlertMessage/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AlertMessage/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -11,4 +11,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./AlertMessage"), exports);
|
|
14
|
-
|
|
14
|
+
//export * from './AlertMessage.stories';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationContext.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmationContext.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI/E,eAAO,MAAM,eAAe,kBAFqC,mBAAmB,KAAK,QAAQ,IAAI,CAE1B,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;iBA2CvC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -29,46 +18,29 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
18
|
__setModuleDefault(result, mod);
|
|
30
19
|
return result;
|
|
31
20
|
};
|
|
32
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
33
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
34
|
-
if (!m) return o;
|
|
35
|
-
var i = m.call(o), r, ar = [], e;
|
|
36
|
-
try {
|
|
37
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
38
|
-
}
|
|
39
|
-
catch (error) { e = { error: error }; }
|
|
40
|
-
finally {
|
|
41
|
-
try {
|
|
42
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
43
|
-
}
|
|
44
|
-
finally { if (e) throw e.error; }
|
|
45
|
-
}
|
|
46
|
-
return ar;
|
|
47
|
-
};
|
|
48
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
22
|
exports.ConfirmationServiceProvider = exports.useConfirmation = void 0;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
const react_1 = __importStar(require("react"));
|
|
24
|
+
const ConfirmationDialog_1 = require("./ConfirmationDialog");
|
|
25
|
+
const ConfirmationServiceContext = react_1.default.createContext(Promise.reject);
|
|
26
|
+
const useConfirmation = () => react_1.useContext(ConfirmationServiceContext);
|
|
54
27
|
exports.useConfirmation = useConfirmation;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var openConfirmation = function (options) {
|
|
28
|
+
const ConfirmationServiceProvider = ({ children }) => {
|
|
29
|
+
const [confirmationState, setConfirmationState] = react_1.useState(null);
|
|
30
|
+
const awaitingPromiseRef = react_1.useRef();
|
|
31
|
+
const openConfirmation = (options) => {
|
|
60
32
|
setConfirmationState(options);
|
|
61
|
-
return new Promise(
|
|
62
|
-
awaitingPromiseRef.current = { resolve
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
awaitingPromiseRef.current = { resolve, reject };
|
|
63
35
|
});
|
|
64
36
|
};
|
|
65
|
-
|
|
37
|
+
const handleClose = () => {
|
|
66
38
|
if (confirmationState.catchOnCancel && awaitingPromiseRef.current) {
|
|
67
39
|
awaitingPromiseRef.current.reject();
|
|
68
40
|
}
|
|
69
41
|
setConfirmationState(null);
|
|
70
42
|
};
|
|
71
|
-
|
|
43
|
+
const handleConfirm = () => {
|
|
72
44
|
if (awaitingPromiseRef.current) {
|
|
73
45
|
awaitingPromiseRef.current.resolve();
|
|
74
46
|
}
|
|
@@ -76,6 +48,6 @@ var ConfirmationServiceProvider = function (_a) {
|
|
|
76
48
|
};
|
|
77
49
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
78
50
|
react_1.default.createElement(ConfirmationServiceContext.Provider, { value: openConfirmation, children: children }),
|
|
79
|
-
react_1.default.createElement(ConfirmationDialog_1.ConfirmationDialog,
|
|
51
|
+
react_1.default.createElement(ConfirmationDialog_1.ConfirmationDialog, Object.assign({ open: Boolean(confirmationState), onConfirm: handleConfirm, onClose: handleClose }, confirmationState))));
|
|
80
52
|
};
|
|
81
53
|
exports.ConfirmationServiceProvider = ConfirmationServiceProvider;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ButtonVariant } from '@patternfly/react-core';
|
|
1
|
+
import { ButtonVariant, ModalVariant } from '@patternfly/react-core';
|
|
3
2
|
export interface ConfirmationOptions {
|
|
4
3
|
catchOnCancel?: boolean;
|
|
5
4
|
title?: string;
|
|
@@ -8,11 +7,13 @@ export interface ConfirmationOptions {
|
|
|
8
7
|
confirmButtonVariant?: ButtonVariant;
|
|
9
8
|
cancelText?: string;
|
|
10
9
|
cancelButtonVariant?: ButtonVariant;
|
|
10
|
+
modalVariant?: ModalVariant;
|
|
11
11
|
}
|
|
12
12
|
interface IProps extends ConfirmationOptions {
|
|
13
13
|
open: boolean;
|
|
14
14
|
onConfirm: () => void;
|
|
15
15
|
onClose: () => void;
|
|
16
|
+
modalVariant?: ModalVariant;
|
|
16
17
|
}
|
|
17
18
|
declare function ConfirmationDialog(props: IProps): JSX.Element;
|
|
18
19
|
declare namespace ConfirmationDialog {
|
|
@@ -21,6 +22,7 @@ declare namespace ConfirmationDialog {
|
|
|
21
22
|
cancelText: string;
|
|
22
23
|
confirmButtonVariant: ButtonVariant;
|
|
23
24
|
cancelButtonVariant: ButtonVariant;
|
|
25
|
+
modalVariant: ModalVariant;
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
export { ConfirmationDialog };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAS,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAIpF,MAAM,WAAW,mBAAmB;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED,UAAU,MAAO,SAAQ,mBAAmB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAUD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,eAsBxC;kBAtBQ,kBAAkB;;;;;;;;;AAwB3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -4,18 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ConfirmationDialog = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_i18next_1 = require("react-i18next");
|
|
10
|
+
const defaultProps = {
|
|
11
11
|
confirmText: 'Confirm',
|
|
12
12
|
cancelText: 'Cancel',
|
|
13
13
|
confirmButtonVariant: react_core_1.ButtonVariant.primary,
|
|
14
14
|
cancelButtonVariant: react_core_1.ButtonVariant.link,
|
|
15
|
+
modalVariant: react_core_1.ModalVariant.medium,
|
|
15
16
|
};
|
|
16
17
|
function ConfirmationDialog(props) {
|
|
17
|
-
|
|
18
|
-
return (react_1.default.createElement(react_core_1.Modal, {
|
|
18
|
+
const { t } = react_i18next_1.useTranslation();
|
|
19
|
+
return (react_1.default.createElement(react_core_1.Modal, { variant: props.modalVariant, "aria-describedby": "se-confirm-dialog", "aria-label": t('confirmation modal'), title: props.title || '', isOpen: props.open, onClose: props.onClose, actions: [
|
|
19
20
|
react_1.default.createElement(react_core_1.Button, { key: "confirm", onClick: props.onConfirm, variant: props.confirmButtonVariant },
|
|
20
21
|
react_1.default.createElement(react_i18next_1.Trans, null, props.confirmText)),
|
|
21
22
|
react_1.default.createElement(react_core_1.Button, { key: "cancel", onClick: props.onClose, variant: props.cancelButtonVariant },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationModal.stories.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationModal.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmationModal.stories.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationModal.stories.tsx"],"names":[],"mappings":""}
|
|
@@ -1,76 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.ConfirmDialog = void 0;
|
|
43
|
-
var react_1 = __importDefault(require("react"));
|
|
44
|
-
var ConfirmationContext_1 = require("./ConfirmationContext");
|
|
45
|
-
exports.default = {
|
|
1
|
+
/*import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { ConfirmationServiceProvider, useConfirmation } from './ConfirmationContext';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
46
6
|
title: 'Components/ConfirmationModal',
|
|
47
7
|
};
|
|
48
|
-
|
|
8
|
+
|
|
9
|
+
const options = {
|
|
49
10
|
catchOnCancel: true,
|
|
50
11
|
title: 'Title',
|
|
51
12
|
description: 'Decroption',
|
|
52
13
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
case 3: return [2 /*return*/];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}); }; };
|
|
72
|
-
return react_1.default.createElement("button", { onClick: action() }, "action link");
|
|
14
|
+
|
|
15
|
+
const ActionPage = () => {
|
|
16
|
+
const confirm = useConfirmation();
|
|
17
|
+
|
|
18
|
+
const action = () => async () => {
|
|
19
|
+
try {
|
|
20
|
+
await confirm(options);
|
|
21
|
+
// confirmed, continue
|
|
22
|
+
// rest of code
|
|
23
|
+
} catch (e) {
|
|
24
|
+
// didn't confirm
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return <button onClick={action()}>action link</button>;
|
|
73
29
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
30
|
+
|
|
31
|
+
export const ConfirmDialog = () => (
|
|
32
|
+
<ConfirmationServiceProvider>
|
|
33
|
+
<ActionPage />
|
|
34
|
+
</ConfirmationServiceProvider>
|
|
35
|
+
);
|
|
36
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoverSpinner.d.ts","sourceRoot":"","sources":["../../../src/CoverSpinner/CoverSpinner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoverSpinner.d.ts","sourceRoot":"","sources":["../../../src/CoverSpinner/CoverSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAI5B,wBAAgB,YAAY,gBAM3B"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CoverSpinner = void 0;
|
|
7
7
|
require("./CoverSpinner.css");
|
|
8
|
-
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
9
|
function CoverSpinner() {
|
|
10
10
|
return (react_1.default.createElement("div", { className: "cover-spin", role: "alert" },
|
|
11
11
|
react_1.default.createElement("div", { className: "spinner" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomContentLoader.d.ts","sourceRoot":"","sources":["../../../src/CustomContentLoader/CustomContentLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomContentLoader.d.ts","sourceRoot":"","sources":["../../../src/CustomContentLoader/CustomContentLoader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,qBAAqB,gBAgEpC;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,UAAU,2BAA2B;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC1C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,2BAA2B,eAUrE"}
|
|
@@ -4,26 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CustomContentLoader = exports.OverviewContentLoader = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
9
|
function OverviewContentLoader() {
|
|
10
10
|
return (react_1.default.createElement("div", { style: { width: '100%', position: 'relative' } },
|
|
11
|
-
react_1.default.createElement(
|
|
12
|
-
react_1.default.createElement(
|
|
13
|
-
react_1.default.createElement(
|
|
14
|
-
react_1.default.createElement(
|
|
15
|
-
react_1.default.createElement(
|
|
16
|
-
react_1.default.createElement(
|
|
17
|
-
react_1.default.createElement(
|
|
18
|
-
react_1.default.createElement(
|
|
19
|
-
react_1.default.createElement(
|
|
20
|
-
react_1.default.createElement(
|
|
21
|
-
react_1.default.createElement(
|
|
22
|
-
react_1.default.createElement(
|
|
23
|
-
react_1.default.createElement(
|
|
24
|
-
react_1.default.createElement(
|
|
25
|
-
react_1.default.createElement(
|
|
26
|
-
react_1.default.createElement(
|
|
11
|
+
react_1.default.createElement("div", { style: { width: '70%', height: '900px', position: 'relative' } },
|
|
12
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "30px", width: "15%", style: { top: '50px', left: '2.3%' } }),
|
|
13
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "12%", style: { top: '95px', left: '2.3%' } }),
|
|
14
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "50%", style: { top: '140px', left: '2.3%' } }),
|
|
15
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "150px", width: "97.7%", style: { top: '190px', left: '2.3%' } }),
|
|
16
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "120px", width: "97.7%", style: { top: '370px', left: '2.3%' } }),
|
|
17
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "50px", width: "97.7%", style: { top: '520px', left: '2.3%' } }),
|
|
18
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "10%", style: { top: '590px', left: '3%' } }),
|
|
19
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "43%", style: { top: '635px', left: '3%' } }),
|
|
20
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "10%", style: { top: '590px', left: '55%' } }),
|
|
21
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "43%", style: { top: '635px', left: '55%' } }),
|
|
22
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "10%", style: { top: '695px', left: '3%' } }),
|
|
23
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "95%", style: { top: '740px', left: '3%' } }),
|
|
24
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "220px", width: "1px", style: { top: '570px', left: '2.3%' } }),
|
|
25
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "220px", width: "1px", style: { top: '570px', left: '99.9%' } }),
|
|
26
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "1px", width: "97.7%", style: { top: '790px', left: '2.3%' } })),
|
|
27
27
|
react_1.default.createElement("div", { style: {
|
|
28
28
|
position: 'absolute',
|
|
29
29
|
top: '0',
|
|
@@ -48,15 +48,15 @@ function OverviewContentLoader() {
|
|
|
48
48
|
bottom: '0',
|
|
49
49
|
backgroundColor: '#ededed',
|
|
50
50
|
} },
|
|
51
|
-
react_1.default.createElement(
|
|
52
|
-
react_1.default.createElement(
|
|
53
|
-
react_1.default.createElement(
|
|
51
|
+
react_1.default.createElement("div", { className: "gray-loader-background", style: { height: '100%', width: '100%' } },
|
|
52
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "500px", width: "94%", style: { top: '40px', left: '3%' } }),
|
|
53
|
+
react_1.default.createElement(react_core_1.Skeleton, { height: "500px", width: "94%", style: { top: '570px', left: '3%' } })))));
|
|
54
54
|
}
|
|
55
55
|
exports.OverviewContentLoader = OverviewContentLoader;
|
|
56
56
|
function CustomContentLoader(props) {
|
|
57
|
-
|
|
58
|
-
props.rectangles.map(
|
|
59
|
-
props.children || react_1.default.createElement(
|
|
60
|
-
return react_1.default.createElement(
|
|
57
|
+
const children = (props.rectangles &&
|
|
58
|
+
props.rectangles.map((obj) => (react_1.default.createElement(react_core_1.Skeleton, { height: obj.height, width: obj.width, style: { top: obj.y, left: obj.x } })))) ||
|
|
59
|
+
props.children || (react_1.default.createElement(react_core_1.Skeleton, { height: "100px", width: "400px", style: { position: 'relative', marginBottom: '50px' } }));
|
|
60
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
61
61
|
}
|
|
62
62
|
exports.CustomContentLoader = CustomContentLoader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;AAIrF,UAAU,MAAO,SAAQ,cAAc;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,gBAqD5C,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -26,21 +15,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
15
|
};
|
|
27
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
17
|
exports.CustomTextInput = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
19
|
+
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
20
|
+
const react_1 = __importDefault(require("react"));
|
|
21
|
+
const CustomTextInput = (props) => {
|
|
33
22
|
// To set defaultProps
|
|
34
|
-
|
|
23
|
+
const { onChange, isSpaceAllowed = false, isRequired, className, type, maxLength, value, isDisabled, placeholder, validated, name } = props, rest = __rest(props, ["onChange", "isSpaceAllowed", "isRequired", "className", "type", "maxLength", "value", "isDisabled", "placeholder", "validated", "name"]);
|
|
35
24
|
// To handle on input change
|
|
36
|
-
|
|
25
|
+
const onTextInputChange = (value, event) => {
|
|
37
26
|
onChange(value, event);
|
|
38
27
|
event.preventDefault();
|
|
39
28
|
return [];
|
|
40
29
|
};
|
|
41
30
|
// Function to check for validity
|
|
42
|
-
|
|
43
|
-
if (!
|
|
31
|
+
const validatedCheck = () => {
|
|
32
|
+
if (!isEmpty_1.default(value)) {
|
|
44
33
|
if (validated === 'error') {
|
|
45
34
|
return 'error';
|
|
46
35
|
}
|
|
@@ -48,12 +37,12 @@ var CustomTextInput = function (props) {
|
|
|
48
37
|
return validated;
|
|
49
38
|
}
|
|
50
39
|
else if (!isSpaceAllowed) {
|
|
51
|
-
return
|
|
40
|
+
return isEmpty_1.default(value === null || value === void 0 ? void 0 : value.trim()) ? 'error' : 'default';
|
|
52
41
|
}
|
|
53
42
|
else
|
|
54
43
|
return validated;
|
|
55
44
|
}
|
|
56
45
|
};
|
|
57
|
-
return (react_1.default.createElement(react_core_1.TextInput,
|
|
46
|
+
return (react_1.default.createElement(react_core_1.TextInput, Object.assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange: onTextInputChange, validated: validatedCheck(), name: name })));
|
|
58
47
|
};
|
|
59
48
|
exports.CustomTextInput = CustomTextInput;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncMultiDropDownList = exports.AsyncDropDownList = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const async_1 = require("./async");
|
|
5
|
+
const DropDownList_1 = require("./DropDownList");
|
|
6
|
+
const MultiSelectDropdownList_1 = require("./MultiSelectDropdownList");
|
|
7
|
+
const AsyncDropDownList = async_1.withAsync(DropDownList_1.Dropdown);
|
|
8
8
|
exports.AsyncDropDownList = AsyncDropDownList;
|
|
9
|
-
|
|
9
|
+
const AsyncMultiDropDownList = async_1.withAsync(MultiSelectDropdownList_1.MultiSelectDropDownList);
|
|
10
10
|
exports.AsyncMultiDropDownList = AsyncMultiDropDownList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropDownList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropDownList.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAa5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAuB7C,iBAAS,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,eAoJhD;kBApJQ,QAAQ;;;AAsJjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|