@i-novus/n2o-components 7.27.5 → 7.27.7

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.
Files changed (308) hide show
  1. package/lib/display/Alerts/Alert.d.ts +2 -2
  2. package/lib/display/Alerts/Alert.js +46 -46
  3. package/lib/display/Alerts/AlertSection.d.ts +18 -18
  4. package/lib/display/Alerts/AlertSection.js +22 -22
  5. package/lib/display/Alerts/AlertWrapper.d.ts +6 -6
  6. package/lib/display/Alerts/AlertWrapper.js +19 -19
  7. package/lib/display/Alerts/DefaultAlert.d.ts +6 -6
  8. package/lib/display/Alerts/DefaultAlert.js +62 -62
  9. package/lib/display/Alerts/LoaderAlert.d.ts +5 -5
  10. package/lib/display/Alerts/LoaderAlert.js +10 -10
  11. package/lib/display/Alerts/types.d.ts +49 -49
  12. package/lib/display/Alerts/types.js +12 -12
  13. package/lib/display/Alerts/utils.d.ts +15 -15
  14. package/lib/display/Alerts/utils.js +43 -43
  15. package/lib/display/Badge/Badge.d.ts +16 -16
  16. package/lib/display/Badge/Badge.js +35 -35
  17. package/lib/display/Badge/enums.d.ts +9 -9
  18. package/lib/display/Badge/enums.js +11 -11
  19. package/lib/display/Badge/utils.d.ts +9 -9
  20. package/lib/display/Badge/utils.js +9 -9
  21. package/lib/display/Block.d.ts +369 -369
  22. package/lib/display/Block.js +11 -11
  23. package/lib/display/CodeViewer.d.ts +13 -13
  24. package/lib/display/CodeViewer.js +30 -30
  25. package/lib/display/Drawer.d.ts +25 -25
  26. package/lib/display/Drawer.js +34 -34
  27. package/lib/display/DropdownCustomItem.d.ts +7 -7
  28. package/lib/display/DropdownCustomItem.js +6 -6
  29. package/lib/display/HelpPopover.d.ts +16 -16
  30. package/lib/display/HelpPopover.js +32 -32
  31. package/lib/display/Html.d.ts +8 -8
  32. package/lib/display/Html.js +4 -4
  33. package/lib/display/Icon.d.ts +12 -12
  34. package/lib/display/Icon.js +17 -17
  35. package/lib/display/Image/Image.d.ts +30 -30
  36. package/lib/display/Image/Image.js +42 -42
  37. package/lib/display/Image/ImageInfo.d.ts +7 -7
  38. package/lib/display/Image/ImageInfo.js +6 -6
  39. package/lib/display/InputIcon.d.ts +13 -13
  40. package/lib/display/InputIcon.js +7 -7
  41. package/lib/display/NavItemImage.d.ts +9 -9
  42. package/lib/display/NavItemImage.js +11 -11
  43. package/lib/display/OutputList.d.ts +12 -12
  44. package/lib/display/OutputList.js +11 -11
  45. package/lib/display/OutputListItem.d.ts +10 -10
  46. package/lib/display/OutputListItem.js +20 -20
  47. package/lib/display/OutputText.d.ts +16 -16
  48. package/lib/display/OutputText.js +34 -34
  49. package/lib/display/OutputText.js.map +1 -1
  50. package/lib/display/Pagination/Pagination.d.ts +2 -2
  51. package/lib/display/Pagination/Pagination.js +124 -124
  52. package/lib/display/Pagination/PaginationButton.d.ts +13 -13
  53. package/lib/display/Pagination/PaginationButton.js +15 -15
  54. package/lib/display/Pagination/types.d.ts +62 -62
  55. package/lib/display/Pagination/types.js +21 -21
  56. package/lib/display/PopoverConfirm.d.ts +38 -38
  57. package/lib/display/PopoverConfirm.js +39 -39
  58. package/lib/display/ProgressControl.d.ts +17 -17
  59. package/lib/display/ProgressControl.js +21 -21
  60. package/lib/display/Slider.d.ts +23 -23
  61. package/lib/display/Slider.js +41 -41
  62. package/lib/display/Status.d.ts +9 -9
  63. package/lib/display/Status.js +15 -15
  64. package/lib/display/StatusText/StatusText.d.ts +10 -10
  65. package/lib/display/StatusText/StatusText.js +14 -14
  66. package/lib/display/StatusText/types.d.ts +18 -18
  67. package/lib/display/StatusText/types.js +13 -13
  68. package/lib/display/StatusText/utils.d.ts +3 -3
  69. package/lib/display/StatusText/utils.js +9 -9
  70. package/lib/display/Tabs/Content.d.ts +11 -11
  71. package/lib/display/Tabs/Content.js +8 -8
  72. package/lib/display/Tabs/Pane.d.ts +10 -10
  73. package/lib/display/Tabs/Pane.js +11 -11
  74. package/lib/display/Tabs/Tabs.d.ts +27 -27
  75. package/lib/display/Tabs/Tabs.js +11 -11
  76. package/lib/display/Tabs/helpers.d.ts +3 -3
  77. package/lib/display/Tabs/helpers.js +22 -22
  78. package/lib/display/Text.d.ts +12 -12
  79. package/lib/display/Text.js +15 -15
  80. package/lib/display/Typography/Base.d.ts +32 -32
  81. package/lib/display/Typography/Base.js +100 -100
  82. package/lib/display/Typography/ContentEditable.d.ts +15 -15
  83. package/lib/display/Typography/ContentEditable.js +25 -25
  84. package/lib/display/Typography/Paragraph.d.ts +4 -4
  85. package/lib/display/Typography/Paragraph.js +8 -8
  86. package/lib/display/Typography/Text.d.ts +9 -9
  87. package/lib/display/Typography/Text.js +11 -11
  88. package/lib/display/Typography/Title.d.ts +7 -7
  89. package/lib/display/Typography/Title.js +8 -8
  90. package/lib/display/Typography/utils.d.ts +13 -13
  91. package/lib/display/Typography/utils.js +29 -29
  92. package/lib/helpers/HelpPopover.d.ts +9 -9
  93. package/lib/helpers/HelpPopover.js +13 -13
  94. package/lib/helpers/withRightPlaceholder.d.ts +9 -9
  95. package/lib/helpers/withRightPlaceholder.js +13 -13
  96. package/lib/inputs/Checkbox/Checkbox.d.ts +29 -29
  97. package/lib/inputs/Checkbox/Checkbox.js +28 -28
  98. package/lib/inputs/Checkbox/CheckboxControl.d.ts +7 -7
  99. package/lib/inputs/Checkbox/CheckboxControl.js +19 -19
  100. package/lib/inputs/CheckboxGroup.d.ts +11 -11
  101. package/lib/inputs/CheckboxGroup.js +35 -35
  102. package/lib/inputs/CodeEditor.d.ts +21 -21
  103. package/lib/inputs/CodeEditor.js +27 -27
  104. package/lib/inputs/DatePicker/Calendar.d.ts +65 -65
  105. package/lib/inputs/DatePicker/Calendar.js +297 -297
  106. package/lib/inputs/DatePicker/CalendarHeader.d.ts +26 -26
  107. package/lib/inputs/DatePicker/CalendarHeader.js +92 -92
  108. package/lib/inputs/DatePicker/Clock.d.ts +10 -10
  109. package/lib/inputs/DatePicker/Clock.js +12 -12
  110. package/lib/inputs/DatePicker/DateInput.d.ts +45 -45
  111. package/lib/inputs/DatePicker/DateInput.js +127 -127
  112. package/lib/inputs/DatePicker/DateInputGroup.d.ts +21 -21
  113. package/lib/inputs/DatePicker/DateInputGroup.js +16 -16
  114. package/lib/inputs/DatePicker/DateInterval.d.ts +24 -24
  115. package/lib/inputs/DatePicker/DateInterval.js +36 -36
  116. package/lib/inputs/DatePicker/DatePicker.d.ts +22 -22
  117. package/lib/inputs/DatePicker/DatePicker.js +7 -7
  118. package/lib/inputs/DatePicker/DatePicker.js.map +1 -1
  119. package/lib/inputs/DatePicker/DateTimeControl.d.ts +99 -99
  120. package/lib/inputs/DatePicker/DateTimeControl.js +280 -276
  121. package/lib/inputs/DatePicker/DateTimeControl.js.map +1 -1
  122. package/lib/inputs/DatePicker/Day.d.ts +14 -14
  123. package/lib/inputs/DatePicker/Day.js +15 -15
  124. package/lib/inputs/DatePicker/PopUp.d.ts +19 -19
  125. package/lib/inputs/DatePicker/PopUp.js +18 -18
  126. package/lib/inputs/DatePicker/types.d.ts +31 -31
  127. package/lib/inputs/DatePicker/types.js +1 -1
  128. package/lib/inputs/DatePicker/utils.d.ts +39 -39
  129. package/lib/inputs/DatePicker/utils.js +207 -207
  130. package/lib/inputs/Input.d.ts +51 -51
  131. package/lib/inputs/Input.js +89 -89
  132. package/lib/inputs/InputMask.d.ts +24 -24
  133. package/lib/inputs/InputMask.js +166 -166
  134. package/lib/inputs/InputMoney.d.ts +101 -101
  135. package/lib/inputs/InputMoney.js +131 -131
  136. package/lib/inputs/InputNumber/InputNumber.d.ts +30 -30
  137. package/lib/inputs/InputNumber/InputNumber.js +159 -159
  138. package/lib/inputs/InputNumber/index.d.ts +1 -1
  139. package/lib/inputs/InputNumber/index.js +1 -1
  140. package/lib/inputs/InputNumber/types.d.ts +20 -20
  141. package/lib/inputs/InputNumber/types.js +1 -1
  142. package/lib/inputs/InputNumber/utils.d.ts +6 -6
  143. package/lib/inputs/InputNumber/utils.js +60 -60
  144. package/lib/inputs/InputPassword.d.ts +10 -10
  145. package/lib/inputs/InputPassword.js +14 -14
  146. package/lib/inputs/InputSelect/InputAddon.d.ts +17 -17
  147. package/lib/inputs/InputSelect/InputAddon.js +10 -10
  148. package/lib/inputs/InputSelect/InputContent.d.ts +60 -60
  149. package/lib/inputs/InputSelect/InputContent.js +115 -115
  150. package/lib/inputs/InputSelect/InputSelect.d.ts +307 -307
  151. package/lib/inputs/InputSelect/InputSelect.js +520 -522
  152. package/lib/inputs/InputSelect/InputSelect.js.map +1 -1
  153. package/lib/inputs/InputSelect/InputSelectGroup.d.ts +43 -43
  154. package/lib/inputs/InputSelect/InputSelectGroup.js +50 -50
  155. package/lib/inputs/InputSelect/PopupItems.d.ts +56 -56
  156. package/lib/inputs/InputSelect/PopupItems.js +170 -170
  157. package/lib/inputs/InputSelect/PopupList.d.ts +82 -82
  158. package/lib/inputs/InputSelect/PopupList.js +52 -52
  159. package/lib/inputs/InputSelect/SelectedItems.d.ts +13 -13
  160. package/lib/inputs/InputSelect/SelectedItems.js +61 -61
  161. package/lib/inputs/InputSelect/constants.d.ts +4 -4
  162. package/lib/inputs/InputSelect/constants.js +4 -4
  163. package/lib/inputs/InputSelect/snippets.d.ts +9 -9
  164. package/lib/inputs/InputSelect/snippets.js +17 -17
  165. package/lib/inputs/InputSelect/types.d.ts +18 -18
  166. package/lib/inputs/InputSelect/types.js +7 -7
  167. package/lib/inputs/InputSelect/utils.d.ts +9 -9
  168. package/lib/inputs/InputSelect/utils.js +74 -74
  169. package/lib/inputs/InputSelectTree/InputSelectTree.d.ts +110 -110
  170. package/lib/inputs/InputSelectTree/InputSelectTree.js +243 -243
  171. package/lib/inputs/InputSelectTree/TreeSelectNode.d.ts +36 -36
  172. package/lib/inputs/InputSelectTree/TreeSelectNode.js +37 -37
  173. package/lib/inputs/InputSelectTree/allProps.d.ts +119 -119
  174. package/lib/inputs/InputSelectTree/allProps.js +40 -40
  175. package/lib/inputs/InputSelectTree/until.d.ts +4 -4
  176. package/lib/inputs/InputSelectTree/until.js +38 -38
  177. package/lib/inputs/InputText.d.ts +41 -41
  178. package/lib/inputs/InputText.js +71 -71
  179. package/lib/inputs/NumberPicker/NumberPicker.d.ts +16 -16
  180. package/lib/inputs/NumberPicker/NumberPicker.js +49 -49
  181. package/lib/inputs/NumberPicker/NumberPickerButton.d.ts +8 -8
  182. package/lib/inputs/NumberPicker/NumberPickerButton.js +23 -23
  183. package/lib/inputs/NumberPicker/index.d.ts +1 -1
  184. package/lib/inputs/NumberPicker/index.js +1 -1
  185. package/lib/inputs/NumberPicker/utils.d.ts +2 -2
  186. package/lib/inputs/NumberPicker/utils.js +14 -14
  187. package/lib/inputs/Radio.d.ts +16 -16
  188. package/lib/inputs/Radio.js +22 -22
  189. package/lib/inputs/RadioGroup.d.ts +14 -14
  190. package/lib/inputs/RadioGroup.js +25 -25
  191. package/lib/inputs/Rating.d.ts +31 -31
  192. package/lib/inputs/Rating.js +110 -110
  193. package/lib/inputs/Select/Popup.d.ts +31 -31
  194. package/lib/inputs/Select/Popup.js +61 -61
  195. package/lib/inputs/Select/Select.d.ts +224 -224
  196. package/lib/inputs/Select/Select.js +382 -382
  197. package/lib/inputs/Select/SelectInput.d.ts +19 -19
  198. package/lib/inputs/Select/SelectInput.js +15 -15
  199. package/lib/inputs/Select/utils.d.ts +1 -1
  200. package/lib/inputs/Select/utils.js +15 -15
  201. package/lib/inputs/Switch.d.ts +11 -11
  202. package/lib/inputs/Switch.js +10 -10
  203. package/lib/inputs/TextArea.d.ts +12 -12
  204. package/lib/inputs/TextArea.js +12 -12
  205. package/lib/inputs/TextEditor.d.ts +12 -12
  206. package/lib/inputs/TextEditor.js +40 -40
  207. package/lib/inputs/TimePicker.d.ts +51 -51
  208. package/lib/inputs/TimePicker.js +214 -214
  209. package/lib/inputs/eventHandlersContext.d.ts +9 -9
  210. package/lib/inputs/eventHandlersContext.js +2 -2
  211. package/lib/inputs/utils.d.ts +5 -5
  212. package/lib/inputs/utils.js +16 -16
  213. package/lib/layouts/ScrollContainer.d.ts +218 -218
  214. package/lib/layouts/ScrollContainer.js +67 -67
  215. package/lib/layouts/Spinner/CoverSpinner.d.ts +29 -29
  216. package/lib/layouts/Spinner/CoverSpinner.js +49 -49
  217. package/lib/layouts/Spinner/InlineSpinner.d.ts +5 -5
  218. package/lib/layouts/Spinner/InlineSpinner.js +7 -7
  219. package/lib/layouts/Spinner/Spinner.d.ts +32 -32
  220. package/lib/layouts/Spinner/Spinner.js +79 -79
  221. package/lib/styles/components/Calendar.scss +125 -125
  222. package/lib/styles/components/CalendarHeader.scss +77 -77
  223. package/lib/styles/components/DateInputGroup.scss +39 -39
  224. package/lib/styles/components/DatePicker.scss +18 -18
  225. package/lib/styles/components/Day.scss +29 -29
  226. package/lib/styles/components/OutputList.scss +14 -14
  227. package/lib/styles/components/OutputText.scss +50 -50
  228. package/lib/styles/controls/CodeEditor.scss +25 -25
  229. package/lib/styles/controls/InputNumber.scss +36 -36
  230. package/lib/styles/controls/InputPassword.scss +17 -17
  231. package/lib/styles/controls/InputText.scss +59 -59
  232. package/lib/styles/controls/NumberPicker.scss +36 -36
  233. package/lib/styles/controls/ProgressControl.scss +3 -3
  234. package/lib/styles/controls/Slider.scss +32 -32
  235. package/lib/styles/controls/Switch.scss +105 -105
  236. package/lib/styles/controls/TextEditor.scss +62 -57
  237. package/lib/styles/controls/TimePicker.scss +32 -32
  238. package/lib/styles/n2o/variables.scss +328 -328
  239. package/lib/styles/root.scss +18 -18
  240. package/lib/styles/theme/variables.scss +81 -81
  241. package/lib/styles/variables.scss +10 -10
  242. package/lib/tests/unit/Checkbox.test.d.ts +1 -1
  243. package/lib/tests/unit/Checkbox.test.js +47 -47
  244. package/lib/tests/unit/CheckboxGroup.test.d.ts +1 -1
  245. package/lib/tests/unit/CheckboxGroup.test.js +70 -70
  246. package/lib/tests/unit/CodeEditor.test.d.ts +1 -1
  247. package/lib/tests/unit/CodeEditor.test.js +23 -23
  248. package/lib/tests/unit/CodeViewer.test.d.ts +1 -1
  249. package/lib/tests/unit/CodeViewer.test.js +22 -22
  250. package/lib/tests/unit/DatePicker/DateTimeControl.test.d.ts +1 -1
  251. package/lib/tests/unit/DatePicker/DateTimeControl.test.js +307 -307
  252. package/lib/tests/unit/DatePicker/utils.test.d.ts +1 -1
  253. package/lib/tests/unit/DatePicker/utils.test.js +154 -154
  254. package/lib/tests/unit/Drawer.test.d.ts +1 -1
  255. package/lib/tests/unit/Drawer.test.js +26 -26
  256. package/lib/tests/unit/Icon.test.d.ts +1 -1
  257. package/lib/tests/unit/Icon.test.js +52 -52
  258. package/lib/tests/unit/InputMask.test.d.ts +1 -1
  259. package/lib/tests/unit/InputMask.test.js +42 -42
  260. package/lib/tests/unit/InputMoney.test.d.ts +1 -1
  261. package/lib/tests/unit/InputMoney.test.js +22 -22
  262. package/lib/tests/unit/InputNumber.test.d.ts +1 -1
  263. package/lib/tests/unit/InputNumber.test.js +211 -211
  264. package/lib/tests/unit/InputPassword.test.d.ts +1 -1
  265. package/lib/tests/unit/InputPassword.test.js +28 -28
  266. package/lib/tests/unit/InputSelect.test.d.ts +1 -1
  267. package/lib/tests/unit/InputSelect.test.js +241 -241
  268. package/lib/tests/unit/NavItemImage.test.d.ts +1 -1
  269. package/lib/tests/unit/NavItemImage.test.js +26 -26
  270. package/lib/tests/unit/NumberPicker.test.d.ts +1 -1
  271. package/lib/tests/unit/NumberPicker.test.js +49 -49
  272. package/lib/tests/unit/PopoverConfirm.test.d.ts +1 -1
  273. package/lib/tests/unit/PopoverConfirm.test.js +36 -36
  274. package/lib/tests/unit/ProgressControl.test.d.ts +1 -1
  275. package/lib/tests/unit/ProgressControl.test.js +77 -77
  276. package/lib/tests/unit/Rating.test.d.ts +1 -1
  277. package/lib/tests/unit/Rating.test.js +21 -21
  278. package/lib/tests/unit/Select.test.d.ts +1 -1
  279. package/lib/tests/unit/Select.test.js +84 -84
  280. package/lib/tests/unit/Spinner.test.d.ts +1 -1
  281. package/lib/tests/unit/Spinner.test.js +31 -31
  282. package/lib/tests/unit/StatusText.test.d.ts +1 -1
  283. package/lib/tests/unit/StatusText.test.js +23 -23
  284. package/lib/tests/unit/Switch.test.d.ts +1 -1
  285. package/lib/tests/unit/Switch.test.js +25 -25
  286. package/lib/tests/unit/TextEditor.test.d.ts +1 -1
  287. package/lib/tests/unit/TextEditor.test.js +40 -40
  288. package/lib/tests/unit/TimePicker.test.d.ts +1 -1
  289. package/lib/tests/unit/TimePicker.test.js +144 -144
  290. package/lib/tests/unit/Typography/Base.test.d.ts +1 -1
  291. package/lib/tests/unit/Typography/Base.test.js +71 -71
  292. package/lib/tests/unit/Typography/ContentEditable.test.d.ts +1 -1
  293. package/lib/tests/unit/Typography/ContentEditable.test.js +13 -13
  294. package/lib/types.d.ts +28 -28
  295. package/lib/types.js +1 -1
  296. package/lib/utils/id.d.ts +3 -3
  297. package/lib/utils/id.js +37 -37
  298. package/lib/utils/isEmptyModel.d.ts +1 -1
  299. package/lib/utils/isEmptyModel.js +6 -6
  300. package/lib/utils/parseFormatter.d.ts +16 -16
  301. package/lib/utils/parseFormatter.js +96 -96
  302. package/package.json +201 -201
  303. package/lib/display/Filter/Buttons.d.ts +0 -11
  304. package/lib/display/Filter/Buttons.js +0 -13
  305. package/lib/display/Filter/Buttons.js.map +0 -1
  306. package/lib/display/Filter/Filter.d.ts +0 -8
  307. package/lib/display/Filter/Filter.js +0 -19
  308. package/lib/display/Filter/Filter.js.map +0 -1
@@ -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 {};