@i-novus/n2o-components 7.27.4 → 7.27.5
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/display/Alerts/Alert.d.ts +2 -2
- package/lib/display/Alerts/Alert.js +46 -46
- package/lib/display/Alerts/AlertSection.d.ts +18 -18
- package/lib/display/Alerts/AlertSection.js +22 -22
- package/lib/display/Alerts/AlertWrapper.d.ts +6 -6
- package/lib/display/Alerts/AlertWrapper.js +19 -19
- package/lib/display/Alerts/DefaultAlert.d.ts +6 -6
- package/lib/display/Alerts/DefaultAlert.js +62 -62
- package/lib/display/Alerts/LoaderAlert.d.ts +5 -5
- package/lib/display/Alerts/LoaderAlert.js +10 -10
- package/lib/display/Alerts/types.d.ts +49 -49
- package/lib/display/Alerts/types.js +12 -12
- package/lib/display/Alerts/utils.d.ts +15 -15
- package/lib/display/Alerts/utils.js +43 -43
- package/lib/display/Badge/Badge.d.ts +16 -16
- package/lib/display/Badge/Badge.js +35 -35
- package/lib/display/Badge/enums.d.ts +9 -9
- package/lib/display/Badge/enums.js +11 -11
- package/lib/display/Badge/utils.d.ts +9 -9
- package/lib/display/Badge/utils.js +9 -9
- package/lib/display/Block.d.ts +369 -369
- package/lib/display/Block.js +11 -11
- package/lib/display/CodeViewer.d.ts +13 -13
- package/lib/display/CodeViewer.js +30 -30
- package/lib/display/Drawer.d.ts +25 -25
- package/lib/display/Drawer.js +34 -34
- package/lib/display/DropdownCustomItem.d.ts +7 -7
- package/lib/display/DropdownCustomItem.js +6 -6
- package/lib/display/Filter/Buttons.d.ts +11 -11
- package/lib/display/Filter/Buttons.js +12 -12
- package/lib/display/Filter/Filter.d.ts +8 -8
- package/lib/display/Filter/Filter.js +18 -18
- package/lib/display/HelpPopover.d.ts +16 -16
- package/lib/display/HelpPopover.js +32 -32
- package/lib/display/Html.d.ts +8 -8
- package/lib/display/Html.js +4 -4
- package/lib/display/Icon.d.ts +12 -12
- package/lib/display/Icon.js +17 -17
- package/lib/display/Image/Image.d.ts +30 -30
- package/lib/display/Image/Image.js +42 -42
- package/lib/display/Image/ImageInfo.d.ts +7 -7
- package/lib/display/Image/ImageInfo.js +6 -6
- package/lib/display/InputIcon.d.ts +13 -13
- package/lib/display/InputIcon.js +7 -7
- package/lib/display/NavItemImage.d.ts +9 -9
- package/lib/display/NavItemImage.js +11 -11
- package/lib/display/OutputList.d.ts +12 -12
- package/lib/display/OutputList.js +11 -11
- package/lib/display/OutputListItem.d.ts +10 -10
- package/lib/display/OutputListItem.js +20 -20
- package/lib/display/OutputText.d.ts +16 -16
- package/lib/display/OutputText.js +34 -34
- package/lib/display/Pagination/Pagination.d.ts +2 -2
- package/lib/display/Pagination/Pagination.js +124 -124
- package/lib/display/Pagination/PaginationButton.d.ts +13 -13
- package/lib/display/Pagination/PaginationButton.js +15 -15
- package/lib/display/Pagination/types.d.ts +62 -62
- package/lib/display/Pagination/types.js +21 -21
- package/lib/display/PopoverConfirm.d.ts +38 -38
- package/lib/display/PopoverConfirm.js +39 -39
- package/lib/display/ProgressControl.d.ts +17 -17
- package/lib/display/ProgressControl.js +21 -21
- package/lib/display/Slider.d.ts +23 -23
- package/lib/display/Slider.js +41 -41
- package/lib/display/Status.d.ts +9 -9
- package/lib/display/Status.js +15 -15
- package/lib/display/StatusText/StatusText.d.ts +10 -10
- package/lib/display/StatusText/StatusText.js +14 -14
- package/lib/display/StatusText/types.d.ts +18 -18
- package/lib/display/StatusText/types.js +13 -13
- package/lib/display/StatusText/utils.d.ts +3 -3
- package/lib/display/StatusText/utils.js +9 -9
- package/lib/display/Tabs/Content.d.ts +11 -11
- package/lib/display/Tabs/Content.js +8 -8
- package/lib/display/Tabs/Pane.d.ts +10 -10
- package/lib/display/Tabs/Pane.js +11 -11
- package/lib/display/Tabs/Tabs.d.ts +27 -27
- package/lib/display/Tabs/Tabs.js +11 -11
- package/lib/display/Tabs/helpers.d.ts +3 -3
- package/lib/display/Tabs/helpers.js +22 -22
- package/lib/display/Text.d.ts +12 -12
- package/lib/display/Text.js +15 -15
- package/lib/display/Typography/Base.d.ts +32 -32
- package/lib/display/Typography/Base.js +100 -100
- package/lib/display/Typography/ContentEditable.d.ts +15 -15
- package/lib/display/Typography/ContentEditable.js +25 -25
- package/lib/display/Typography/Paragraph.d.ts +4 -4
- package/lib/display/Typography/Paragraph.js +8 -8
- package/lib/display/Typography/Text.d.ts +9 -9
- package/lib/display/Typography/Text.js +11 -11
- package/lib/display/Typography/Title.d.ts +7 -7
- package/lib/display/Typography/Title.js +8 -8
- package/lib/display/Typography/utils.d.ts +13 -13
- package/lib/display/Typography/utils.js +29 -29
- package/lib/helpers/HelpPopover.d.ts +9 -9
- package/lib/helpers/HelpPopover.js +13 -13
- package/lib/helpers/withRightPlaceholder.d.ts +9 -9
- package/lib/helpers/withRightPlaceholder.js +13 -13
- package/lib/inputs/Checkbox/Checkbox.d.ts +29 -29
- package/lib/inputs/Checkbox/Checkbox.js +28 -28
- package/lib/inputs/Checkbox/CheckboxControl.d.ts +7 -7
- package/lib/inputs/Checkbox/CheckboxControl.js +19 -19
- package/lib/inputs/CheckboxGroup.d.ts +11 -11
- package/lib/inputs/CheckboxGroup.js +35 -35
- package/lib/inputs/CodeEditor.d.ts +21 -21
- package/lib/inputs/CodeEditor.js +27 -27
- package/lib/inputs/DatePicker/Calendar.d.ts +65 -65
- package/lib/inputs/DatePicker/Calendar.js +297 -297
- package/lib/inputs/DatePicker/CalendarHeader.d.ts +26 -26
- package/lib/inputs/DatePicker/CalendarHeader.js +92 -92
- package/lib/inputs/DatePicker/Clock.d.ts +10 -10
- package/lib/inputs/DatePicker/Clock.js +12 -12
- package/lib/inputs/DatePicker/DateInput.d.ts +45 -45
- package/lib/inputs/DatePicker/DateInput.js +127 -127
- package/lib/inputs/DatePicker/DateInputGroup.d.ts +21 -21
- package/lib/inputs/DatePicker/DateInputGroup.js +16 -16
- package/lib/inputs/DatePicker/DateInterval.d.ts +24 -24
- package/lib/inputs/DatePicker/DateInterval.js +36 -36
- package/lib/inputs/DatePicker/DatePicker.d.ts +22 -22
- package/lib/inputs/DatePicker/DatePicker.js +7 -7
- package/lib/inputs/DatePicker/DateTimeControl.d.ts +99 -99
- package/lib/inputs/DatePicker/DateTimeControl.js +276 -276
- package/lib/inputs/DatePicker/Day.d.ts +14 -14
- package/lib/inputs/DatePicker/Day.js +15 -15
- package/lib/inputs/DatePicker/PopUp.d.ts +19 -19
- package/lib/inputs/DatePicker/PopUp.js +18 -18
- package/lib/inputs/DatePicker/types.d.ts +31 -31
- package/lib/inputs/DatePicker/types.js +1 -1
- package/lib/inputs/DatePicker/utils.d.ts +39 -39
- package/lib/inputs/DatePicker/utils.js +207 -207
- package/lib/inputs/Input.d.ts +51 -51
- package/lib/inputs/Input.js +89 -89
- package/lib/inputs/InputMask.d.ts +24 -24
- package/lib/inputs/InputMask.js +166 -166
- package/lib/inputs/InputMoney.d.ts +101 -101
- package/lib/inputs/InputMoney.js +131 -131
- package/lib/inputs/InputNumber/InputNumber.d.ts +30 -30
- package/lib/inputs/InputNumber/InputNumber.js +159 -159
- package/lib/inputs/InputNumber/index.d.ts +1 -1
- package/lib/inputs/InputNumber/index.js +1 -1
- package/lib/inputs/InputNumber/types.d.ts +20 -20
- package/lib/inputs/InputNumber/types.js +1 -1
- package/lib/inputs/InputNumber/utils.d.ts +6 -6
- package/lib/inputs/InputNumber/utils.js +60 -60
- package/lib/inputs/InputPassword.d.ts +10 -10
- package/lib/inputs/InputPassword.js +14 -14
- package/lib/inputs/InputSelect/InputAddon.d.ts +17 -17
- package/lib/inputs/InputSelect/InputAddon.js +10 -10
- package/lib/inputs/InputSelect/InputContent.d.ts +60 -60
- package/lib/inputs/InputSelect/InputContent.js +115 -115
- package/lib/inputs/InputSelect/InputSelect.d.ts +307 -307
- package/lib/inputs/InputSelect/InputSelect.js +522 -523
- package/lib/inputs/InputSelect/InputSelect.js.map +1 -1
- package/lib/inputs/InputSelect/InputSelectGroup.d.ts +43 -43
- package/lib/inputs/InputSelect/InputSelectGroup.js +50 -50
- package/lib/inputs/InputSelect/PopupItems.d.ts +56 -56
- package/lib/inputs/InputSelect/PopupItems.js +170 -170
- package/lib/inputs/InputSelect/PopupList.d.ts +82 -82
- package/lib/inputs/InputSelect/PopupList.js +52 -52
- package/lib/inputs/InputSelect/SelectedItems.d.ts +13 -13
- package/lib/inputs/InputSelect/SelectedItems.js +61 -61
- package/lib/inputs/InputSelect/constants.d.ts +4 -4
- package/lib/inputs/InputSelect/constants.js +4 -4
- package/lib/inputs/InputSelect/snippets.d.ts +9 -9
- package/lib/inputs/InputSelect/snippets.js +17 -17
- package/lib/inputs/InputSelect/types.d.ts +18 -18
- package/lib/inputs/InputSelect/types.js +7 -7
- package/lib/inputs/InputSelect/utils.d.ts +9 -9
- package/lib/inputs/InputSelect/utils.js +74 -74
- package/lib/inputs/InputSelectTree/InputSelectTree.d.ts +110 -110
- package/lib/inputs/InputSelectTree/InputSelectTree.js +243 -243
- package/lib/inputs/InputSelectTree/TreeSelectNode.d.ts +36 -36
- package/lib/inputs/InputSelectTree/TreeSelectNode.js +37 -37
- package/lib/inputs/InputSelectTree/allProps.d.ts +119 -119
- package/lib/inputs/InputSelectTree/allProps.js +40 -40
- package/lib/inputs/InputSelectTree/until.d.ts +4 -4
- package/lib/inputs/InputSelectTree/until.js +38 -38
- package/lib/inputs/InputText.d.ts +41 -41
- package/lib/inputs/InputText.js +71 -71
- package/lib/inputs/NumberPicker/NumberPicker.d.ts +16 -16
- package/lib/inputs/NumberPicker/NumberPicker.js +49 -49
- package/lib/inputs/NumberPicker/NumberPickerButton.d.ts +8 -8
- package/lib/inputs/NumberPicker/NumberPickerButton.js +23 -23
- package/lib/inputs/NumberPicker/index.d.ts +1 -1
- package/lib/inputs/NumberPicker/index.js +1 -1
- package/lib/inputs/NumberPicker/utils.d.ts +2 -2
- package/lib/inputs/NumberPicker/utils.js +14 -14
- package/lib/inputs/Radio.d.ts +16 -16
- package/lib/inputs/Radio.js +22 -22
- package/lib/inputs/RadioGroup.d.ts +14 -14
- package/lib/inputs/RadioGroup.js +25 -25
- package/lib/inputs/Rating.d.ts +31 -31
- package/lib/inputs/Rating.js +110 -110
- package/lib/inputs/Select/Popup.d.ts +31 -31
- package/lib/inputs/Select/Popup.js +61 -61
- package/lib/inputs/Select/Select.d.ts +224 -224
- package/lib/inputs/Select/Select.js +382 -382
- package/lib/inputs/Select/SelectInput.d.ts +19 -19
- package/lib/inputs/Select/SelectInput.js +15 -15
- package/lib/inputs/Select/utils.d.ts +1 -1
- package/lib/inputs/Select/utils.js +15 -15
- package/lib/inputs/Switch.d.ts +11 -11
- package/lib/inputs/Switch.js +10 -10
- package/lib/inputs/TextArea.d.ts +12 -12
- package/lib/inputs/TextArea.js +12 -12
- package/lib/inputs/TextEditor.d.ts +12 -12
- package/lib/inputs/TextEditor.js +40 -40
- package/lib/inputs/TimePicker.d.ts +51 -51
- package/lib/inputs/TimePicker.js +214 -214
- package/lib/inputs/eventHandlersContext.d.ts +9 -9
- package/lib/inputs/eventHandlersContext.js +2 -2
- package/lib/inputs/utils.d.ts +5 -5
- package/lib/inputs/utils.js +16 -16
- package/lib/layouts/ScrollContainer.d.ts +218 -218
- package/lib/layouts/ScrollContainer.js +67 -67
- package/lib/layouts/Spinner/CoverSpinner.d.ts +29 -29
- package/lib/layouts/Spinner/CoverSpinner.js +49 -49
- package/lib/layouts/Spinner/InlineSpinner.d.ts +5 -5
- package/lib/layouts/Spinner/InlineSpinner.js +7 -7
- package/lib/layouts/Spinner/Spinner.d.ts +32 -32
- package/lib/layouts/Spinner/Spinner.js +79 -79
- package/lib/styles/components/Calendar.scss +125 -125
- package/lib/styles/components/CalendarHeader.scss +77 -77
- package/lib/styles/components/DateInputGroup.scss +39 -39
- package/lib/styles/components/DatePicker.scss +18 -18
- package/lib/styles/components/Day.scss +29 -29
- package/lib/styles/components/OutputList.scss +14 -14
- package/lib/styles/components/OutputText.scss +50 -50
- package/lib/styles/controls/CodeEditor.scss +25 -25
- package/lib/styles/controls/InputNumber.scss +36 -36
- package/lib/styles/controls/InputPassword.scss +17 -17
- package/lib/styles/controls/InputText.scss +59 -59
- package/lib/styles/controls/NumberPicker.scss +36 -36
- package/lib/styles/controls/ProgressControl.scss +3 -3
- package/lib/styles/controls/Slider.scss +32 -32
- package/lib/styles/controls/Switch.scss +105 -105
- package/lib/styles/controls/TextEditor.scss +57 -57
- package/lib/styles/controls/TimePicker.scss +32 -32
- package/lib/styles/n2o/variables.scss +328 -328
- package/lib/styles/root.scss +18 -18
- package/lib/styles/theme/variables.scss +81 -81
- package/lib/styles/variables.scss +10 -10
- package/lib/tests/unit/Checkbox.test.d.ts +1 -1
- package/lib/tests/unit/Checkbox.test.js +47 -47
- package/lib/tests/unit/CheckboxGroup.test.d.ts +1 -1
- package/lib/tests/unit/CheckboxGroup.test.js +70 -70
- package/lib/tests/unit/CodeEditor.test.d.ts +1 -1
- package/lib/tests/unit/CodeEditor.test.js +23 -23
- package/lib/tests/unit/CodeViewer.test.d.ts +1 -1
- package/lib/tests/unit/CodeViewer.test.js +22 -22
- package/lib/tests/unit/DatePicker/DateTimeControl.test.d.ts +1 -1
- package/lib/tests/unit/DatePicker/DateTimeControl.test.js +307 -307
- package/lib/tests/unit/DatePicker/utils.test.d.ts +1 -1
- package/lib/tests/unit/DatePicker/utils.test.js +154 -154
- package/lib/tests/unit/Drawer.test.d.ts +1 -1
- package/lib/tests/unit/Drawer.test.js +26 -26
- package/lib/tests/unit/Icon.test.d.ts +1 -1
- package/lib/tests/unit/Icon.test.js +52 -52
- package/lib/tests/unit/InputMask.test.d.ts +1 -1
- package/lib/tests/unit/InputMask.test.js +42 -42
- package/lib/tests/unit/InputMoney.test.d.ts +1 -1
- package/lib/tests/unit/InputMoney.test.js +22 -22
- package/lib/tests/unit/InputNumber.test.d.ts +1 -1
- package/lib/tests/unit/InputNumber.test.js +211 -211
- package/lib/tests/unit/InputPassword.test.d.ts +1 -1
- package/lib/tests/unit/InputPassword.test.js +28 -28
- package/lib/tests/unit/InputSelect.test.d.ts +1 -1
- package/lib/tests/unit/InputSelect.test.js +241 -241
- package/lib/tests/unit/NavItemImage.test.d.ts +1 -1
- package/lib/tests/unit/NavItemImage.test.js +26 -26
- package/lib/tests/unit/NumberPicker.test.d.ts +1 -1
- package/lib/tests/unit/NumberPicker.test.js +49 -49
- package/lib/tests/unit/PopoverConfirm.test.d.ts +1 -1
- package/lib/tests/unit/PopoverConfirm.test.js +36 -36
- package/lib/tests/unit/ProgressControl.test.d.ts +1 -1
- package/lib/tests/unit/ProgressControl.test.js +77 -77
- package/lib/tests/unit/Rating.test.d.ts +1 -1
- package/lib/tests/unit/Rating.test.js +21 -21
- package/lib/tests/unit/Select.test.d.ts +1 -1
- package/lib/tests/unit/Select.test.js +84 -84
- package/lib/tests/unit/Spinner.test.d.ts +1 -1
- package/lib/tests/unit/Spinner.test.js +31 -31
- package/lib/tests/unit/StatusText.test.d.ts +1 -1
- package/lib/tests/unit/StatusText.test.js +23 -23
- package/lib/tests/unit/Switch.test.d.ts +1 -1
- package/lib/tests/unit/Switch.test.js +25 -25
- package/lib/tests/unit/TextEditor.test.d.ts +1 -1
- package/lib/tests/unit/TextEditor.test.js +40 -40
- package/lib/tests/unit/TimePicker.test.d.ts +1 -1
- package/lib/tests/unit/TimePicker.test.js +144 -144
- package/lib/tests/unit/Typography/Base.test.d.ts +1 -1
- package/lib/tests/unit/Typography/Base.test.js +71 -71
- package/lib/tests/unit/Typography/ContentEditable.test.d.ts +1 -1
- package/lib/tests/unit/Typography/ContentEditable.test.js +13 -13
- package/lib/types.d.ts +28 -28
- package/lib/types.js +1 -1
- package/lib/utils/id.d.ts +3 -3
- package/lib/utils/id.js +37 -37
- package/lib/utils/isEmptyModel.d.ts +1 -1
- package/lib/utils/isEmptyModel.js +6 -6
- package/lib/utils/parseFormatter.d.ts +16 -16
- package/lib/utils/parseFormatter.js +96 -96
- package/package.json +201 -200
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const Alert: React.ComponentType<import("react-i18next").Omit<import("react-i18next").WithTranslation, keyof import("react-i18next").WithTranslation> & import("react-i18next").WithTranslationProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Alert: React.ComponentType<import("react-i18next").Omit<import("react-i18next").WithTranslation, keyof import("react-i18next").WithTranslation> & import("react-i18next").WithTranslationProps>;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import { withTranslation } from 'react-i18next';
|
|
3
|
-
import { LoaderAlert } from './LoaderAlert';
|
|
4
|
-
import { DefaultAlert } from './DefaultAlert';
|
|
5
|
-
import { AnimationDirection } from './types';
|
|
6
|
-
function AlertComponent(props) {
|
|
7
|
-
const { loader, title, text, severity, href, timestamp, closeButton, className, style, animate, t, stacktrace, onDismiss, stopRemoving, placement, } = props;
|
|
8
|
-
const [stacktraceVisible, setStacktraceVisible] = useState(false);
|
|
9
|
-
const togglingStacktrace = useCallback(() => {
|
|
10
|
-
setStacktraceVisible(!stacktraceVisible);
|
|
11
|
-
if (stopRemoving) {
|
|
12
|
-
stopRemoving();
|
|
13
|
-
}
|
|
14
|
-
}, [stacktraceVisible, stopRemoving]);
|
|
15
|
-
const formattingDetails = useCallback((stacktrace) => {
|
|
16
|
-
if (!stacktrace) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
if (Array.isArray(stacktrace)) {
|
|
20
|
-
return stacktrace.join('\r\n');
|
|
21
|
-
}
|
|
22
|
-
return stacktrace;
|
|
23
|
-
}, []);
|
|
24
|
-
const { visible } = props;
|
|
25
|
-
if (!visible) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
if (loader) {
|
|
29
|
-
return (React.createElement(LoaderAlert, { text: String(text), severity: severity, className: className, style: style, animate: animate, t: t }));
|
|
30
|
-
}
|
|
31
|
-
return (React.createElement(DefaultAlert, { title: String(title), text: String(text), severity: severity, href: href, timestamp: timestamp, closeButton: closeButton, className: className, style: style, stacktrace: formattingDetails(stacktrace), onDismiss: onDismiss, animate: animate, t: t, stacktraceVisible: stacktraceVisible, togglingStacktrace: togglingStacktrace, animationDirection: (placement || '').startsWith('bottom') ? AnimationDirection.reversed : AnimationDirection.default }));
|
|
32
|
-
}
|
|
33
|
-
AlertComponent.defaultProps = {
|
|
34
|
-
text: '',
|
|
35
|
-
title: '',
|
|
36
|
-
severity: 'danger',
|
|
37
|
-
closeButton: false,
|
|
38
|
-
visible: true,
|
|
39
|
-
position: 'relative',
|
|
40
|
-
animate: false,
|
|
41
|
-
placement: 'top',
|
|
42
|
-
onDismiss: () => { },
|
|
43
|
-
stopRemoving: () => { },
|
|
44
|
-
t: () => '',
|
|
45
|
-
};
|
|
46
|
-
export const Alert = withTranslation()(AlertComponent);
|
|
1
|
+
import React, { useState, useCallback } from 'react';
|
|
2
|
+
import { withTranslation } from 'react-i18next';
|
|
3
|
+
import { LoaderAlert } from './LoaderAlert';
|
|
4
|
+
import { DefaultAlert } from './DefaultAlert';
|
|
5
|
+
import { AnimationDirection } from './types';
|
|
6
|
+
function AlertComponent(props) {
|
|
7
|
+
const { loader, title, text, severity, href, timestamp, closeButton, className, style, animate, t, stacktrace, onDismiss, stopRemoving, placement, } = props;
|
|
8
|
+
const [stacktraceVisible, setStacktraceVisible] = useState(false);
|
|
9
|
+
const togglingStacktrace = useCallback(() => {
|
|
10
|
+
setStacktraceVisible(!stacktraceVisible);
|
|
11
|
+
if (stopRemoving) {
|
|
12
|
+
stopRemoving();
|
|
13
|
+
}
|
|
14
|
+
}, [stacktraceVisible, stopRemoving]);
|
|
15
|
+
const formattingDetails = useCallback((stacktrace) => {
|
|
16
|
+
if (!stacktrace) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
if (Array.isArray(stacktrace)) {
|
|
20
|
+
return stacktrace.join('\r\n');
|
|
21
|
+
}
|
|
22
|
+
return stacktrace;
|
|
23
|
+
}, []);
|
|
24
|
+
const { visible } = props;
|
|
25
|
+
if (!visible) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
if (loader) {
|
|
29
|
+
return (React.createElement(LoaderAlert, { text: String(text), severity: severity, className: className, style: style, animate: animate, t: t }));
|
|
30
|
+
}
|
|
31
|
+
return (React.createElement(DefaultAlert, { title: String(title), text: String(text), severity: severity, href: href, timestamp: timestamp, closeButton: closeButton, className: className, style: style, stacktrace: formattingDetails(stacktrace), onDismiss: onDismiss, animate: animate, t: t, stacktraceVisible: stacktraceVisible, togglingStacktrace: togglingStacktrace, animationDirection: (placement || '').startsWith('bottom') ? AnimationDirection.reversed : AnimationDirection.default }));
|
|
32
|
+
}
|
|
33
|
+
AlertComponent.defaultProps = {
|
|
34
|
+
text: '',
|
|
35
|
+
title: '',
|
|
36
|
+
severity: 'danger',
|
|
37
|
+
closeButton: false,
|
|
38
|
+
visible: true,
|
|
39
|
+
position: 'relative',
|
|
40
|
+
animate: false,
|
|
41
|
+
placement: 'top',
|
|
42
|
+
onDismiss: () => { },
|
|
43
|
+
stopRemoving: () => { },
|
|
44
|
+
t: () => '',
|
|
45
|
+
};
|
|
46
|
+
export const Alert = withTranslation()(AlertComponent);
|
|
47
47
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AlertSectionProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* AlertSection - можно складывать в едицый блок
|
|
5
|
-
* TextSegment, TimeStampSegment, CloseButtonSegment, StacktraceSegment - опциональны
|
|
6
|
-
* @example
|
|
7
|
-
* двухуровневый Alert
|
|
8
|
-
* (on top -> title + close + timestamp) , (on bottom -> text)
|
|
9
|
-
* <div>
|
|
10
|
-
* <AlertSection text={title}
|
|
11
|
-
timestamp={timestamp}
|
|
12
|
-
closeButton={closeButton}
|
|
13
|
-
onClick={batchedActionToClose}
|
|
14
|
-
/>
|
|
15
|
-
<AlertSection text={text} />
|
|
16
|
-
</div>
|
|
17
|
-
*/
|
|
18
|
-
export declare const AlertSection: ({ text, timestamp, closeButton, onClick, stacktrace, stacktraceVisible, textClassName, style, isSimple, t, }: AlertSectionProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AlertSectionProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* AlertSection - можно складывать в едицый блок
|
|
5
|
+
* TextSegment, TimeStampSegment, CloseButtonSegment, StacktraceSegment - опциональны
|
|
6
|
+
* @example
|
|
7
|
+
* двухуровневый Alert
|
|
8
|
+
* (on top -> title + close + timestamp) , (on bottom -> text)
|
|
9
|
+
* <div>
|
|
10
|
+
* <AlertSection text={title}
|
|
11
|
+
timestamp={timestamp}
|
|
12
|
+
closeButton={closeButton}
|
|
13
|
+
onClick={batchedActionToClose}
|
|
14
|
+
/>
|
|
15
|
+
<AlertSection text={text} />
|
|
16
|
+
</div>
|
|
17
|
+
*/
|
|
18
|
+
export declare const AlertSection: ({ text, timestamp, closeButton, onClick, stacktrace, stacktraceVisible, textClassName, style, isSimple, t, }: AlertSectionProps) => JSX.Element;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextSegment, TimeStampSegment, CloseButtonSegment, StacktraceSegment } from './utils';
|
|
3
|
-
/**
|
|
4
|
-
* AlertSection - можно складывать в едицый блок
|
|
5
|
-
* TextSegment, TimeStampSegment, CloseButtonSegment, StacktraceSegment - опциональны
|
|
6
|
-
* @example
|
|
7
|
-
* двухуровневый Alert
|
|
8
|
-
* (on top -> title + close + timestamp) , (on bottom -> text)
|
|
9
|
-
* <div>
|
|
10
|
-
* <AlertSection text={title}
|
|
11
|
-
timestamp={timestamp}
|
|
12
|
-
closeButton={closeButton}
|
|
13
|
-
onClick={batchedActionToClose}
|
|
14
|
-
/>
|
|
15
|
-
<AlertSection text={text} />
|
|
16
|
-
</div>
|
|
17
|
-
*/
|
|
18
|
-
export const AlertSection = ({ text, timestamp, closeButton, onClick, stacktrace, stacktraceVisible, textClassName, style, isSimple, t, }) => (React.createElement("div", { className: "n2o-alert-segment w-100 d-flex flex-row flex-nowrap", style: style || {} },
|
|
19
|
-
React.createElement(TextSegment, { text: text || '', className: textClassName }),
|
|
20
|
-
React.createElement(TimeStampSegment, { timestamp: timestamp, text: text || '' }),
|
|
21
|
-
React.createElement(CloseButtonSegment, { closeButton: closeButton, onClick: onClick, text: text, timestamp: timestamp, extended: isSimple }),
|
|
22
|
-
React.createElement(StacktraceSegment, { stacktrace: stacktrace, onClick: onClick, stacktraceVisible: stacktraceVisible, t: t })));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextSegment, TimeStampSegment, CloseButtonSegment, StacktraceSegment } from './utils';
|
|
3
|
+
/**
|
|
4
|
+
* AlertSection - можно складывать в едицый блок
|
|
5
|
+
* TextSegment, TimeStampSegment, CloseButtonSegment, StacktraceSegment - опциональны
|
|
6
|
+
* @example
|
|
7
|
+
* двухуровневый Alert
|
|
8
|
+
* (on top -> title + close + timestamp) , (on bottom -> text)
|
|
9
|
+
* <div>
|
|
10
|
+
* <AlertSection text={title}
|
|
11
|
+
timestamp={timestamp}
|
|
12
|
+
closeButton={closeButton}
|
|
13
|
+
onClick={batchedActionToClose}
|
|
14
|
+
/>
|
|
15
|
+
<AlertSection text={text} />
|
|
16
|
+
</div>
|
|
17
|
+
*/
|
|
18
|
+
export const AlertSection = ({ text, timestamp, closeButton, onClick, stacktrace, stacktraceVisible, textClassName, style, isSimple, t, }) => (React.createElement("div", { className: "n2o-alert-segment w-100 d-flex flex-row flex-nowrap", style: style || {} },
|
|
19
|
+
React.createElement(TextSegment, { text: text || '', className: textClassName }),
|
|
20
|
+
React.createElement(TimeStampSegment, { timestamp: timestamp, text: text || '' }),
|
|
21
|
+
React.createElement(CloseButtonSegment, { closeButton: closeButton, onClick: onClick, text: text, timestamp: timestamp, extended: isSimple }),
|
|
22
|
+
React.createElement(StacktraceSegment, { stacktrace: stacktrace, onClick: onClick, stacktraceVisible: stacktraceVisible, t: t })));
|
|
23
23
|
//# sourceMappingURL=AlertSection.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AlertWrapperProps } from './types';
|
|
3
|
-
export declare function AlertWrapper({ children, className, severity, animate, stacktrace, href, style, animationDirection, }: AlertWrapperProps): JSX.Element;
|
|
4
|
-
export declare namespace AlertWrapper {
|
|
5
|
-
var defaultProps: AlertWrapperProps;
|
|
6
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AlertWrapperProps } from './types';
|
|
3
|
+
export declare function AlertWrapper({ children, className, severity, animate, stacktrace, href, style, animationDirection, }: AlertWrapperProps): JSX.Element;
|
|
4
|
+
export declare namespace AlertWrapper {
|
|
5
|
+
var defaultProps: AlertWrapperProps;
|
|
6
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
export function AlertWrapper({ children, className, severity, animate, stacktrace, href, style, animationDirection, }) {
|
|
4
|
-
return (React.createElement("div", { className: classNames('alert n2o-alert', className, {
|
|
5
|
-
[`alert-${severity}`]: severity,
|
|
6
|
-
'n2o-alert--animated': animate,
|
|
7
|
-
'n2o-alert--animated_default': animationDirection === 'default',
|
|
8
|
-
'n2o-alert--animated_reversed': animationDirection === 'reversed',
|
|
9
|
-
'with-details': stacktrace,
|
|
10
|
-
'with-link': href,
|
|
11
|
-
}), style: style },
|
|
12
|
-
React.createElement("a", { href: href, className: classNames({
|
|
13
|
-
[`alert-${severity}`]: severity,
|
|
14
|
-
'n2o-alert__with-link': href,
|
|
15
|
-
}) }, children)));
|
|
16
|
-
}
|
|
17
|
-
AlertWrapper.defaultProps = {
|
|
18
|
-
animationDirection: 'default',
|
|
19
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
export function AlertWrapper({ children, className, severity, animate, stacktrace, href, style, animationDirection, }) {
|
|
4
|
+
return (React.createElement("div", { className: classNames('alert n2o-alert', className, {
|
|
5
|
+
[`alert-${severity}`]: severity,
|
|
6
|
+
'n2o-alert--animated': animate,
|
|
7
|
+
'n2o-alert--animated_default': animationDirection === 'default',
|
|
8
|
+
'n2o-alert--animated_reversed': animationDirection === 'reversed',
|
|
9
|
+
'with-details': stacktrace,
|
|
10
|
+
'with-link': href,
|
|
11
|
+
}), style: style },
|
|
12
|
+
React.createElement("a", { href: href, className: classNames({
|
|
13
|
+
[`alert-${severity}`]: severity,
|
|
14
|
+
'n2o-alert__with-link': href,
|
|
15
|
+
}) }, children)));
|
|
16
|
+
}
|
|
17
|
+
AlertWrapper.defaultProps = {
|
|
18
|
+
animationDirection: 'default',
|
|
19
|
+
};
|
|
20
20
|
//# sourceMappingURL=AlertWrapper.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DefaultAlertProps } from './types';
|
|
3
|
-
export declare const DefaultAlert: {
|
|
4
|
-
({ title, text, severity: propsSeverity, href, timestamp, closeButton, className, style, stacktrace, animate, onDismiss, t, stacktraceVisible, togglingStacktrace, onClose, isField, animationDirection, }: DefaultAlertProps): JSX.Element;
|
|
5
|
-
defaultProps: DefaultAlertProps;
|
|
6
|
-
};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultAlertProps } from './types';
|
|
3
|
+
export declare const DefaultAlert: {
|
|
4
|
+
({ title, text, severity: propsSeverity, href, timestamp, closeButton, className, style, stacktrace, animate, onDismiss, t, stacktraceVisible, togglingStacktrace, onClose, isField, animationDirection, }: DefaultAlertProps): JSX.Element;
|
|
5
|
+
defaultProps: DefaultAlertProps;
|
|
6
|
+
};
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import omit from 'lodash/omit';
|
|
3
|
-
import { AlertWrapper } from './AlertWrapper';
|
|
4
|
-
import { AlertSection } from './AlertSection';
|
|
5
|
-
export const DefaultAlert = ({ title, text, severity: propsSeverity, href, timestamp, closeButton, className, style, stacktrace, animate, onDismiss, t, stacktraceVisible, togglingStacktrace, onClose, isField, animationDirection, }) => {
|
|
6
|
-
const severity = propsSeverity || 'secondary';
|
|
7
|
-
const batchedActionToClose = (e) => {
|
|
8
|
-
e.preventDefault();
|
|
9
|
-
if (onClose) {
|
|
10
|
-
/* custom onClose this is used id AlertField */
|
|
11
|
-
onClose();
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const batchedActionToToggling = (e) => {
|
|
18
|
-
e.preventDefault();
|
|
19
|
-
togglingStacktrace();
|
|
20
|
-
};
|
|
21
|
-
const currentTitle = isField ? (title || text) : title;
|
|
22
|
-
const currentText = (isField && !title) ? null : text;
|
|
23
|
-
const titleSegmentClassName = title ? 'n2o-alert-segment__title' : 'n2o-alert-segment__text';
|
|
24
|
-
const needToDivide = (currentTitle && currentText) || !!(currentText && (timestamp || closeButton));
|
|
25
|
-
/* this is necessary for custom text colors or font-sizes */
|
|
26
|
-
const getSectionStyle = (style) => {
|
|
27
|
-
if (!style) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return omit(style, ['width', 'height', 'padding', 'margin', 'backgroundColor']);
|
|
31
|
-
};
|
|
32
|
-
const checkSimpleAlert = () => {
|
|
33
|
-
if (closeButton && !stacktrace && !timestamp) {
|
|
34
|
-
return (!title && text) || (title && !text);
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
};
|
|
38
|
-
const isSimple = checkSimpleAlert();
|
|
39
|
-
const wrapperProps = {
|
|
40
|
-
className,
|
|
41
|
-
severity,
|
|
42
|
-
animate,
|
|
43
|
-
stacktrace,
|
|
44
|
-
href,
|
|
45
|
-
style,
|
|
46
|
-
animationDirection,
|
|
47
|
-
};
|
|
48
|
-
/* simple one section alert without extra features */
|
|
49
|
-
if (isSimple) {
|
|
50
|
-
return (React.createElement(AlertWrapper, Object.assign({}, wrapperProps),
|
|
51
|
-
React.createElement(AlertSection, { text: currentTitle || currentText, timestamp: timestamp, closeButton: closeButton, onClick: batchedActionToClose, textClassName: titleSegmentClassName, style: getSectionStyle(style), isSimple: true })));
|
|
52
|
-
}
|
|
53
|
-
return (React.createElement(AlertWrapper, Object.assign({}, wrapperProps),
|
|
54
|
-
React.createElement(AlertSection, { text: currentTitle, timestamp: timestamp, closeButton: closeButton, onClick: batchedActionToClose, textClassName: titleSegmentClassName, style: getSectionStyle(style) }),
|
|
55
|
-
needToDivide && React.createElement("hr", { className: "w-100 n2o-alert__divider" }),
|
|
56
|
-
React.createElement(AlertSection, { text: currentText, textClassName: "n2o-alert-segment__text" }),
|
|
57
|
-
React.createElement(AlertSection, { onClick: batchedActionToToggling, stacktraceVisible: stacktraceVisible, stacktrace: stacktrace, t: t })));
|
|
58
|
-
};
|
|
59
|
-
DefaultAlert.defaultProps = {
|
|
60
|
-
stacktrace: null,
|
|
61
|
-
isField: false,
|
|
62
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import omit from 'lodash/omit';
|
|
3
|
+
import { AlertWrapper } from './AlertWrapper';
|
|
4
|
+
import { AlertSection } from './AlertSection';
|
|
5
|
+
export const DefaultAlert = ({ title, text, severity: propsSeverity, href, timestamp, closeButton, className, style, stacktrace, animate, onDismiss, t, stacktraceVisible, togglingStacktrace, onClose, isField, animationDirection, }) => {
|
|
6
|
+
const severity = propsSeverity || 'secondary';
|
|
7
|
+
const batchedActionToClose = (e) => {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
if (onClose) {
|
|
10
|
+
/* custom onClose this is used id AlertField */
|
|
11
|
+
onClose();
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const batchedActionToToggling = (e) => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
togglingStacktrace();
|
|
20
|
+
};
|
|
21
|
+
const currentTitle = isField ? (title || text) : title;
|
|
22
|
+
const currentText = (isField && !title) ? null : text;
|
|
23
|
+
const titleSegmentClassName = title ? 'n2o-alert-segment__title' : 'n2o-alert-segment__text';
|
|
24
|
+
const needToDivide = (currentTitle && currentText) || !!(currentText && (timestamp || closeButton));
|
|
25
|
+
/* this is necessary for custom text colors or font-sizes */
|
|
26
|
+
const getSectionStyle = (style) => {
|
|
27
|
+
if (!style) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return omit(style, ['width', 'height', 'padding', 'margin', 'backgroundColor']);
|
|
31
|
+
};
|
|
32
|
+
const checkSimpleAlert = () => {
|
|
33
|
+
if (closeButton && !stacktrace && !timestamp) {
|
|
34
|
+
return (!title && text) || (title && !text);
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
const isSimple = checkSimpleAlert();
|
|
39
|
+
const wrapperProps = {
|
|
40
|
+
className,
|
|
41
|
+
severity,
|
|
42
|
+
animate,
|
|
43
|
+
stacktrace,
|
|
44
|
+
href,
|
|
45
|
+
style,
|
|
46
|
+
animationDirection,
|
|
47
|
+
};
|
|
48
|
+
/* simple one section alert without extra features */
|
|
49
|
+
if (isSimple) {
|
|
50
|
+
return (React.createElement(AlertWrapper, Object.assign({}, wrapperProps),
|
|
51
|
+
React.createElement(AlertSection, { text: currentTitle || currentText, timestamp: timestamp, closeButton: closeButton, onClick: batchedActionToClose, textClassName: titleSegmentClassName, style: getSectionStyle(style), isSimple: true })));
|
|
52
|
+
}
|
|
53
|
+
return (React.createElement(AlertWrapper, Object.assign({}, wrapperProps),
|
|
54
|
+
React.createElement(AlertSection, { text: currentTitle, timestamp: timestamp, closeButton: closeButton, onClick: batchedActionToClose, textClassName: titleSegmentClassName, style: getSectionStyle(style) }),
|
|
55
|
+
needToDivide && React.createElement("hr", { className: "w-100 n2o-alert__divider" }),
|
|
56
|
+
React.createElement(AlertSection, { text: currentText, textClassName: "n2o-alert-segment__text" }),
|
|
57
|
+
React.createElement(AlertSection, { onClick: batchedActionToToggling, stacktraceVisible: stacktraceVisible, stacktrace: stacktrace, t: t })));
|
|
58
|
+
};
|
|
59
|
+
DefaultAlert.defaultProps = {
|
|
60
|
+
stacktrace: null,
|
|
61
|
+
isField: false,
|
|
62
|
+
};
|
|
63
63
|
//# sourceMappingURL=DefaultAlert.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AlertProps } from './types';
|
|
3
|
-
declare type LoaderAlertPropsType = Pick<AlertProps, 'text' | 'severity' | 'className' | 'style' | 'animate' | 't'>;
|
|
4
|
-
export declare const LoaderAlert: ({ text, severity, className, style, animate, t }: LoaderAlertPropsType) => JSX.Element;
|
|
5
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AlertProps } from './types';
|
|
3
|
+
declare type LoaderAlertPropsType = Pick<AlertProps, 'text' | 'severity' | 'className' | 'style' | 'animate' | 't'>;
|
|
4
|
+
export declare const LoaderAlert: ({ text, severity, className, style, animate, t }: LoaderAlertPropsType) => JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { InlineSpinner } from '../../layouts/Spinner/InlineSpinner';
|
|
4
|
-
export const LoaderAlert = ({ text, severity, className, style, animate, t }) => (React.createElement("div", { className: classNames('n2o-alert', 'n2o-alert-loader', 'alert', 'n2o-snippet', className, {
|
|
5
|
-
[`alert-${severity}`]: severity,
|
|
6
|
-
'n2o-alert--animated': animate,
|
|
7
|
-
}), style: style },
|
|
8
|
-
React.createElement("div", { className: "n2o-alert-body-container" },
|
|
9
|
-
React.createElement(InlineSpinner, null),
|
|
10
|
-
text || `${t === null || t === void 0 ? void 0 : t('loading')}...`)));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { InlineSpinner } from '../../layouts/Spinner/InlineSpinner';
|
|
4
|
+
export const LoaderAlert = ({ text, severity, className, style, animate, t }) => (React.createElement("div", { className: classNames('n2o-alert', 'n2o-alert-loader', 'alert', 'n2o-snippet', className, {
|
|
5
|
+
[`alert-${severity}`]: severity,
|
|
6
|
+
'n2o-alert--animated': animate,
|
|
7
|
+
}), style: style },
|
|
8
|
+
React.createElement("div", { className: "n2o-alert-body-container" },
|
|
9
|
+
React.createElement(InlineSpinner, null),
|
|
10
|
+
text || `${t === null || t === void 0 ? void 0 : t('loading')}...`)));
|
|
11
11
|
//# sourceMappingURL=LoaderAlert.js.map
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { ReactNode, SyntheticEvent } from 'react';
|
|
2
|
-
import { TBaseProps } from '../../types';
|
|
3
|
-
export declare enum Severity {
|
|
4
|
-
danger = "danger",
|
|
5
|
-
info = "info",
|
|
6
|
-
success = "success",
|
|
7
|
-
warning = "warning"
|
|
8
|
-
}
|
|
9
|
-
export declare enum AnimationDirection {
|
|
10
|
-
default = "default",
|
|
11
|
-
reversed = "reversed"
|
|
12
|
-
}
|
|
13
|
-
export declare type AlertProps = TBaseProps & {
|
|
14
|
-
animate?: boolean;
|
|
15
|
-
closeButton?: boolean;
|
|
16
|
-
href?: string;
|
|
17
|
-
loader?: boolean;
|
|
18
|
-
onDismiss?(): void;
|
|
19
|
-
placement?: string;
|
|
20
|
-
severity?: Severity;
|
|
21
|
-
stacktrace?: string | string[] | null;
|
|
22
|
-
stopRemoving?(): void;
|
|
23
|
-
t?(arg: string): string;
|
|
24
|
-
text?: string;
|
|
25
|
-
timestamp?: number;
|
|
26
|
-
title?: string;
|
|
27
|
-
};
|
|
28
|
-
declare type DefaultAlertOwnProps = {
|
|
29
|
-
animationDirection: AnimationDirection;
|
|
30
|
-
isField: boolean;
|
|
31
|
-
onClose?(): void;
|
|
32
|
-
stacktraceVisible?: boolean;
|
|
33
|
-
togglingStacktrace(): void;
|
|
34
|
-
};
|
|
35
|
-
export declare type DefaultAlertProps = DefaultAlertOwnProps & Omit<AlertProps, 'visible' | 'loader' | 'placement' | 'stopRemoving'>;
|
|
36
|
-
declare type AlertSectionOwnProps = {
|
|
37
|
-
isSimple?: boolean;
|
|
38
|
-
onClick?(e: SyntheticEvent): void;
|
|
39
|
-
style?: AlertProps['style'] | null;
|
|
40
|
-
text?: AlertProps['text'] | null;
|
|
41
|
-
textClassName?: string;
|
|
42
|
-
};
|
|
43
|
-
export declare type AlertSectionProps = AlertSectionOwnProps & Pick<DefaultAlertProps, 'timestamp' | 'closeButton' | 'stacktrace' | 'stacktraceVisible' | 't'>;
|
|
44
|
-
declare type AlertWrapperOwnProps = {
|
|
45
|
-
children: ReactNode;
|
|
46
|
-
severity: string;
|
|
47
|
-
};
|
|
48
|
-
export declare type AlertWrapperProps = AlertWrapperOwnProps & Pick<DefaultAlertProps, 'className' | 'animate' | 'stacktrace' | 'href' | 'style' | 'animationDirection'>;
|
|
49
|
-
export {};
|
|
1
|
+
import { ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
import { TBaseProps } from '../../types';
|
|
3
|
+
export declare enum Severity {
|
|
4
|
+
danger = "danger",
|
|
5
|
+
info = "info",
|
|
6
|
+
success = "success",
|
|
7
|
+
warning = "warning"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AnimationDirection {
|
|
10
|
+
default = "default",
|
|
11
|
+
reversed = "reversed"
|
|
12
|
+
}
|
|
13
|
+
export declare type AlertProps = TBaseProps & {
|
|
14
|
+
animate?: boolean;
|
|
15
|
+
closeButton?: boolean;
|
|
16
|
+
href?: string;
|
|
17
|
+
loader?: boolean;
|
|
18
|
+
onDismiss?(): void;
|
|
19
|
+
placement?: string;
|
|
20
|
+
severity?: Severity;
|
|
21
|
+
stacktrace?: string | string[] | null;
|
|
22
|
+
stopRemoving?(): void;
|
|
23
|
+
t?(arg: string): string;
|
|
24
|
+
text?: string;
|
|
25
|
+
timestamp?: number;
|
|
26
|
+
title?: string;
|
|
27
|
+
};
|
|
28
|
+
declare type DefaultAlertOwnProps = {
|
|
29
|
+
animationDirection: AnimationDirection;
|
|
30
|
+
isField: boolean;
|
|
31
|
+
onClose?(): void;
|
|
32
|
+
stacktraceVisible?: boolean;
|
|
33
|
+
togglingStacktrace(): void;
|
|
34
|
+
};
|
|
35
|
+
export declare type DefaultAlertProps = DefaultAlertOwnProps & Omit<AlertProps, 'visible' | 'loader' | 'placement' | 'stopRemoving'>;
|
|
36
|
+
declare type AlertSectionOwnProps = {
|
|
37
|
+
isSimple?: boolean;
|
|
38
|
+
onClick?(e: SyntheticEvent): void;
|
|
39
|
+
style?: AlertProps['style'] | null;
|
|
40
|
+
text?: AlertProps['text'] | null;
|
|
41
|
+
textClassName?: string;
|
|
42
|
+
};
|
|
43
|
+
export declare type AlertSectionProps = AlertSectionOwnProps & Pick<DefaultAlertProps, 'timestamp' | 'closeButton' | 'stacktrace' | 'stacktraceVisible' | 't'>;
|
|
44
|
+
declare type AlertWrapperOwnProps = {
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
severity: string;
|
|
47
|
+
};
|
|
48
|
+
export declare type AlertWrapperProps = AlertWrapperOwnProps & Pick<DefaultAlertProps, 'className' | 'animate' | 'stacktrace' | 'href' | 'style' | 'animationDirection'>;
|
|
49
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export var Severity;
|
|
2
|
-
(function (Severity) {
|
|
3
|
-
Severity["danger"] = "danger";
|
|
4
|
-
Severity["info"] = "info";
|
|
5
|
-
Severity["success"] = "success";
|
|
6
|
-
Severity["warning"] = "warning";
|
|
7
|
-
})(Severity || (Severity = {}));
|
|
8
|
-
export var AnimationDirection;
|
|
9
|
-
(function (AnimationDirection) {
|
|
10
|
-
AnimationDirection["default"] = "default";
|
|
11
|
-
AnimationDirection["reversed"] = "reversed";
|
|
12
|
-
})(AnimationDirection || (AnimationDirection = {}));
|
|
1
|
+
export var Severity;
|
|
2
|
+
(function (Severity) {
|
|
3
|
+
Severity["danger"] = "danger";
|
|
4
|
+
Severity["info"] = "info";
|
|
5
|
+
Severity["success"] = "success";
|
|
6
|
+
Severity["warning"] = "warning";
|
|
7
|
+
})(Severity || (Severity = {}));
|
|
8
|
+
export var AnimationDirection;
|
|
9
|
+
(function (AnimationDirection) {
|
|
10
|
+
AnimationDirection["default"] = "default";
|
|
11
|
+
AnimationDirection["reversed"] = "reversed";
|
|
12
|
+
})(AnimationDirection || (AnimationDirection = {}));
|
|
13
13
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AlertSectionProps } from './types';
|
|
3
|
-
declare type TextSegmentPropsType = {
|
|
4
|
-
className: AlertSectionProps['textClassName'];
|
|
5
|
-
} & Pick<AlertSectionProps, 'text'>;
|
|
6
|
-
export declare const TextSegment: ({ text, className }: TextSegmentPropsType) => JSX.Element | null;
|
|
7
|
-
declare type TimeStampSegmentPropsType = Pick<AlertSectionProps, 'text' | 'timestamp'>;
|
|
8
|
-
export declare const TimeStampSegment: ({ timestamp, text }: TimeStampSegmentPropsType) => JSX.Element | null;
|
|
9
|
-
declare type CloseButtonSegmentPropsType = {
|
|
10
|
-
extended: AlertSectionProps['isSimple'];
|
|
11
|
-
} & Pick<AlertSectionProps, 'closeButton' | 'onClick' | 'text' | 'timestamp'>;
|
|
12
|
-
export declare const CloseButtonSegment: ({ closeButton, onClick, text, timestamp, extended, }: CloseButtonSegmentPropsType) => JSX.Element | null;
|
|
13
|
-
declare type StacktraceSegmentPropsType = Pick<AlertSectionProps, 'stacktrace' | 'onClick' | 'stacktraceVisible' | 't'>;
|
|
14
|
-
export declare const StacktraceSegment: ({ stacktrace, onClick, stacktraceVisible, t }: StacktraceSegmentPropsType) => JSX.Element | null;
|
|
15
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AlertSectionProps } from './types';
|
|
3
|
+
declare type TextSegmentPropsType = {
|
|
4
|
+
className: AlertSectionProps['textClassName'];
|
|
5
|
+
} & Pick<AlertSectionProps, 'text'>;
|
|
6
|
+
export declare const TextSegment: ({ text, className }: TextSegmentPropsType) => JSX.Element | null;
|
|
7
|
+
declare type TimeStampSegmentPropsType = Pick<AlertSectionProps, 'text' | 'timestamp'>;
|
|
8
|
+
export declare const TimeStampSegment: ({ timestamp, text }: TimeStampSegmentPropsType) => JSX.Element | null;
|
|
9
|
+
declare type CloseButtonSegmentPropsType = {
|
|
10
|
+
extended: AlertSectionProps['isSimple'];
|
|
11
|
+
} & Pick<AlertSectionProps, 'closeButton' | 'onClick' | 'text' | 'timestamp'>;
|
|
12
|
+
export declare const CloseButtonSegment: ({ closeButton, onClick, text, timestamp, extended, }: CloseButtonSegmentPropsType) => JSX.Element | null;
|
|
13
|
+
declare type StacktraceSegmentPropsType = Pick<AlertSectionProps, 'stacktrace' | 'onClick' | 'stacktraceVisible' | 't'>;
|
|
14
|
+
export declare const StacktraceSegment: ({ stacktrace, onClick, stacktraceVisible, t }: StacktraceSegmentPropsType) => JSX.Element | null;
|
|
15
|
+
export {};
|