@sis-cc/dotstatsuite-visions 6.6.0 → 6.6.4

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 (293) hide show
  1. package/es/Alert/Alert.js +135 -66
  2. package/es/Alert/index.js +1 -0
  3. package/es/ApiQueries/ApiQueries.js +79 -45
  4. package/es/ApiQueries/Query.js +105 -65
  5. package/es/ApiQueries/index.js +1 -0
  6. package/es/AuthDialog/index.js +103 -62
  7. package/es/Breadcrumbs/Breadcrumbs.js +38 -21
  8. package/es/Breadcrumbs/index.js +1 -0
  9. package/es/Button/Button.js +28 -11
  10. package/es/Button/index.js +1 -0
  11. package/es/ChartsConfig/Axis.js +76 -72
  12. package/es/ChartsConfig/ButtonGroup.js +51 -29
  13. package/es/ChartsConfig/ChartsConfig.js +187 -87
  14. package/es/ChartsConfig/ContainerTitle.js +36 -15
  15. package/es/ChartsConfig/Focus.js +48 -37
  16. package/es/ChartsConfig/Frequency.js +36 -24
  17. package/es/ChartsConfig/Series.js +43 -28
  18. package/es/ChartsConfig/Size.js +50 -36
  19. package/es/ChartsConfig/index.js +1 -0
  20. package/es/ChartsConfig/styles.js +4 -4
  21. package/es/ChartsConfig/utils.js +5 -1
  22. package/es/Chips/Chips.js +154 -99
  23. package/es/Chips/index.js +1 -0
  24. package/es/CollapseButtons/CollapseButtons.js +101 -61
  25. package/es/CollapseButtons/Item.js +70 -45
  26. package/es/CollapseButtons/Paper.js +21 -7
  27. package/es/CollapseButtons/index.js +1 -0
  28. package/es/DataEdit/DataEdit.js +124 -67
  29. package/es/DataEdit/Input.js +58 -27
  30. package/es/DataEdit/index.js +1 -0
  31. package/es/DataFooter/DataFooter.js +115 -68
  32. package/es/DataFooter/index.js +1 -0
  33. package/es/DataHeader/DataHeader.js +113 -75
  34. package/es/DataHeader/Flags.js +21 -8
  35. package/es/DataHeader/Title.js +15 -2
  36. package/es/DataHeader/TooltipHeader.js +63 -33
  37. package/es/DataHeader/index.js +1 -0
  38. package/es/DataHeader/utils.js +8 -8
  39. package/es/Dataflow/Dataflow.js +226 -132
  40. package/es/Dataflow/index.js +1 -0
  41. package/es/ExpansionPanel/ExpansionPanel.js +79 -42
  42. package/es/ExpansionPanel/index.js +1 -0
  43. package/es/ExpansionPanel/styles.js +5 -3
  44. package/es/Icons/AccessibilityFilled.js +8 -6
  45. package/es/Icons/AccessibilityOutlined.js +8 -6
  46. package/es/Icons/AccountFilled.js +8 -6
  47. package/es/Icons/AccountOutlined.js +8 -6
  48. package/es/Icons/Api.js +8 -6
  49. package/es/Icons/Asterisk.js +8 -6
  50. package/es/Icons/Bar.js +8 -6
  51. package/es/Icons/CopyContent.js +8 -6
  52. package/es/Icons/Cross.js +8 -6
  53. package/es/Icons/HSymbol.js +8 -6
  54. package/es/Icons/Row.js +8 -6
  55. package/es/Icons/Scatter.js +8 -6
  56. package/es/Icons/StackedBar.js +8 -6
  57. package/es/Icons/StackedRow.js +8 -6
  58. package/es/Icons/Timeline.js +8 -6
  59. package/es/Icons/VSymbol.js +8 -6
  60. package/es/Icons/Warning.js +14 -11
  61. package/es/Icons/index.js +1 -0
  62. package/es/Input/Input.js +56 -26
  63. package/es/Input/index.js +1 -0
  64. package/es/Input/with-input.js +25 -30
  65. package/es/InputNumber/InputNumber.js +51 -31
  66. package/es/InputNumber/index.js +1 -0
  67. package/es/LabelDivider/LabelDivider.js +18 -7
  68. package/es/LabelDivider/index.js +1 -0
  69. package/es/Loading/Loading.js +18 -9
  70. package/es/Loading/index.js +1 -0
  71. package/es/Logo/Logo.js +17 -11
  72. package/es/Logo/index.js +1 -0
  73. package/es/NoData/NoData.js +25 -17
  74. package/es/NoData/index.js +1 -0
  75. package/es/Pagination/Pagination.js +114 -70
  76. package/es/Pagination/index.js +1 -0
  77. package/es/PeriodPicker/PeriodPicker.js +124 -101
  78. package/es/PeriodPicker/constants.js +13 -78
  79. package/es/PeriodPicker/index.js +1 -0
  80. package/es/PeriodPicker/lib.js +23 -37
  81. package/es/PeriodPicker/styles.js +1 -0
  82. package/es/ScopeList/Header.js +60 -41
  83. package/es/ScopeList/Item.js +144 -98
  84. package/es/ScopeList/ScopeList.js +184 -132
  85. package/es/ScopeList/Selection.js +93 -51
  86. package/es/ScopeList/index.js +1 -0
  87. package/es/ScopeList/styles.js +3 -2
  88. package/es/ScopeList/with-scope-list.js +88 -151
  89. package/es/Select/Select.js +60 -44
  90. package/es/Select/index.js +1 -0
  91. package/es/Share/Form.js +88 -58
  92. package/es/Share/Mode.js +98 -36
  93. package/es/Share/Share.js +64 -41
  94. package/es/Share/index.js +10 -1
  95. package/es/SisccFooter/SisccFooter.js +36 -29
  96. package/es/SisccFooter/index.js +1 -0
  97. package/es/Spotlight/Fields.js +71 -37
  98. package/es/Spotlight/Spotlight.js +92 -51
  99. package/es/Spotlight/index.js +1 -0
  100. package/es/Spotlight/useSpotlight.js +13 -33
  101. package/es/Spotlight/useStyles.js +4 -2
  102. package/es/Table/Table.js +71 -50
  103. package/es/Table/header.js +50 -36
  104. package/es/Table/index.js +1 -0
  105. package/es/Table/itemCell.js +25 -13
  106. package/es/Table/row-header.js +50 -31
  107. package/es/Table/section-header.js +55 -30
  108. package/es/Table/section-rows.js +62 -38
  109. package/es/Table/styles.js +8 -2
  110. package/es/Table/tableCell.js +17 -7
  111. package/es/Table/tooltip.js +41 -21
  112. package/es/Table/useStyles.js +3 -2
  113. package/es/Table/valueCell.js +41 -26
  114. package/es/TableFooter/TableFooter.js +70 -42
  115. package/es/TableFooter/index.js +1 -0
  116. package/es/TableHeader/TableHeader.js +36 -18
  117. package/es/TableHeader/index.js +1 -0
  118. package/es/TableHtml5/TableHtml5.js +72 -60
  119. package/es/TableHtml5/cell.js +55 -35
  120. package/es/TableHtml5/flags.js +58 -29
  121. package/es/TableHtml5/header.js +85 -53
  122. package/es/TableHtml5/index.js +1 -0
  123. package/es/TableHtml5/section.js +131 -86
  124. package/es/TableHtml5/sectionHeader.js +72 -45
  125. package/es/TableHtml5/subHeader.js +70 -47
  126. package/es/TableLayout/Box.js +66 -33
  127. package/es/TableLayout/DnDItem.js +68 -37
  128. package/es/TableLayout/TableLayout.js +177 -105
  129. package/es/TableLayout/constants.js +2 -0
  130. package/es/TableLayout/index.js +1 -0
  131. package/es/TableLayout/lib.js +3 -1
  132. package/es/TablePreview/TablePreview.js +176 -99
  133. package/es/TablePreview/index.js +1 -0
  134. package/es/TablePreview/lib.js +4 -5
  135. package/es/TablePreview/styles.js +1 -0
  136. package/es/Tag/Tag.js +21 -5
  137. package/es/Tag/index.js +1 -0
  138. package/es/ToggleButton/ToggleButton.js +29 -17
  139. package/es/ToggleButton/index.js +1 -0
  140. package/es/Tooltip/Tooltip.js +32 -20
  141. package/es/Tooltip/index.js +1 -0
  142. package/es/VerticalButton/VerticalButton.js +22 -17
  143. package/es/VerticalButton/index.js +1 -0
  144. package/es/index.js +4 -2
  145. package/es/theme.js +14 -22
  146. package/es/utils.js +14 -16
  147. package/lib/Alert/Alert.js +168 -87
  148. package/lib/Alert/index.js +12 -7
  149. package/lib/ApiQueries/ApiQueries.js +105 -61
  150. package/lib/ApiQueries/Query.js +132 -85
  151. package/lib/ApiQueries/index.js +12 -7
  152. package/lib/AuthDialog/index.js +137 -82
  153. package/lib/Breadcrumbs/Breadcrumbs.js +68 -39
  154. package/lib/Breadcrumbs/index.js +12 -7
  155. package/lib/Button/Button.js +47 -28
  156. package/lib/Button/index.js +12 -7
  157. package/lib/ChartsConfig/Axis.js +100 -88
  158. package/lib/ChartsConfig/ButtonGroup.js +74 -43
  159. package/lib/ChartsConfig/ChartsConfig.js +236 -113
  160. package/lib/ChartsConfig/ContainerTitle.js +59 -30
  161. package/lib/ChartsConfig/Focus.js +71 -53
  162. package/lib/ChartsConfig/Frequency.js +59 -39
  163. package/lib/ChartsConfig/Series.js +70 -45
  164. package/lib/ChartsConfig/Size.js +77 -53
  165. package/lib/ChartsConfig/index.js +12 -7
  166. package/lib/ChartsConfig/styles.js +11 -16
  167. package/lib/ChartsConfig/utils.js +13 -14
  168. package/lib/Chips/Chips.js +192 -122
  169. package/lib/Chips/index.js +12 -7
  170. package/lib/CollapseButtons/CollapseButtons.js +134 -84
  171. package/lib/CollapseButtons/Item.js +98 -64
  172. package/lib/CollapseButtons/Paper.js +41 -19
  173. package/lib/CollapseButtons/index.js +12 -7
  174. package/lib/DataEdit/DataEdit.js +156 -88
  175. package/lib/DataEdit/Input.js +82 -42
  176. package/lib/DataEdit/index.js +12 -7
  177. package/lib/DataFooter/DataFooter.js +144 -88
  178. package/lib/DataFooter/index.js +12 -7
  179. package/lib/DataHeader/DataHeader.js +158 -106
  180. package/lib/DataHeader/Flags.js +34 -18
  181. package/lib/DataHeader/Title.js +27 -11
  182. package/lib/DataHeader/TooltipHeader.js +79 -48
  183. package/lib/DataHeader/index.js +12 -7
  184. package/lib/DataHeader/utils.js +10 -16
  185. package/lib/Dataflow/Dataflow.js +277 -159
  186. package/lib/Dataflow/index.js +12 -7
  187. package/lib/ExpansionPanel/ExpansionPanel.js +116 -63
  188. package/lib/ExpansionPanel/index.js +12 -7
  189. package/lib/ExpansionPanel/styles.js +12 -15
  190. package/lib/Icons/AccessibilityFilled.js +17 -15
  191. package/lib/Icons/AccessibilityOutlined.js +17 -15
  192. package/lib/Icons/AccountFilled.js +17 -15
  193. package/lib/Icons/AccountOutlined.js +17 -15
  194. package/lib/Icons/Api.js +17 -15
  195. package/lib/Icons/Asterisk.js +17 -15
  196. package/lib/Icons/Bar.js +17 -15
  197. package/lib/Icons/CopyContent.js +17 -15
  198. package/lib/Icons/Cross.js +17 -15
  199. package/lib/Icons/HSymbol.js +17 -15
  200. package/lib/Icons/Row.js +17 -15
  201. package/lib/Icons/Scatter.js +17 -15
  202. package/lib/Icons/StackedBar.js +17 -15
  203. package/lib/Icons/StackedRow.js +17 -15
  204. package/lib/Icons/Timeline.js +17 -15
  205. package/lib/Icons/VSymbol.js +17 -15
  206. package/lib/Icons/Warning.js +31 -27
  207. package/lib/Icons/index.js +152 -68
  208. package/lib/Input/Input.js +85 -47
  209. package/lib/Input/index.js +12 -7
  210. package/lib/Input/with-input.js +35 -38
  211. package/lib/InputNumber/InputNumber.js +80 -50
  212. package/lib/InputNumber/index.js +12 -7
  213. package/lib/LabelDivider/LabelDivider.js +37 -23
  214. package/lib/LabelDivider/index.js +12 -7
  215. package/lib/Loading/Loading.js +35 -20
  216. package/lib/Loading/index.js +12 -7
  217. package/lib/Logo/Logo.js +28 -20
  218. package/lib/Logo/index.js +12 -7
  219. package/lib/NoData/NoData.js +42 -28
  220. package/lib/NoData/index.js +12 -7
  221. package/lib/Pagination/Pagination.js +150 -91
  222. package/lib/Pagination/index.js +12 -7
  223. package/lib/PeriodPicker/PeriodPicker.js +150 -121
  224. package/lib/PeriodPicker/constants.js +37 -126
  225. package/lib/PeriodPicker/index.js +12 -7
  226. package/lib/PeriodPicker/lib.js +61 -99
  227. package/lib/PeriodPicker/styles.js +4 -7
  228. package/lib/ScopeList/Header.js +88 -58
  229. package/lib/ScopeList/Item.js +177 -116
  230. package/lib/ScopeList/ScopeList.js +234 -160
  231. package/lib/ScopeList/Selection.js +131 -70
  232. package/lib/ScopeList/index.js +12 -7
  233. package/lib/ScopeList/styles.js +9 -10
  234. package/lib/ScopeList/with-scope-list.js +108 -199
  235. package/lib/Select/Select.js +80 -59
  236. package/lib/Select/index.js +12 -7
  237. package/lib/Share/Form.js +119 -77
  238. package/lib/Share/Mode.js +130 -54
  239. package/lib/Share/Share.js +91 -59
  240. package/lib/Share/index.js +12 -7
  241. package/lib/SisccFooter/SisccFooter.js +63 -44
  242. package/lib/SisccFooter/index.js +12 -7
  243. package/lib/Spotlight/Fields.js +100 -54
  244. package/lib/Spotlight/Spotlight.js +136 -75
  245. package/lib/Spotlight/index.js +12 -7
  246. package/lib/Spotlight/useSpotlight.js +20 -44
  247. package/lib/Spotlight/useStyles.js +12 -15
  248. package/lib/Table/Table.js +102 -69
  249. package/lib/Table/header.js +70 -51
  250. package/lib/Table/index.js +12 -7
  251. package/lib/Table/itemCell.js +41 -25
  252. package/lib/Table/row-header.js +75 -49
  253. package/lib/Table/section-header.js +82 -50
  254. package/lib/Table/section-rows.js +94 -60
  255. package/lib/Table/styles.js +25 -23
  256. package/lib/Table/tableCell.js +37 -19
  257. package/lib/Table/tooltip.js +54 -36
  258. package/lib/Table/useStyles.js +8 -11
  259. package/lib/Table/valueCell.js +59 -39
  260. package/lib/TableFooter/TableFooter.js +93 -57
  261. package/lib/TableFooter/index.js +12 -7
  262. package/lib/TableHeader/TableHeader.js +56 -32
  263. package/lib/TableHeader/index.js +12 -7
  264. package/lib/TableHtml5/TableHtml5.js +100 -78
  265. package/lib/TableHtml5/cell.js +84 -52
  266. package/lib/TableHtml5/flags.js +82 -48
  267. package/lib/TableHtml5/header.js +115 -70
  268. package/lib/TableHtml5/index.js +17 -8
  269. package/lib/TableHtml5/section.js +171 -109
  270. package/lib/TableHtml5/sectionHeader.js +102 -64
  271. package/lib/TableHtml5/subHeader.js +98 -65
  272. package/lib/TableLayout/Box.js +97 -54
  273. package/lib/TableLayout/DnDItem.js +98 -58
  274. package/lib/TableLayout/TableLayout.js +232 -140
  275. package/lib/TableLayout/constants.js +6 -8
  276. package/lib/TableLayout/index.js +12 -7
  277. package/lib/TableLayout/lib.js +9 -14
  278. package/lib/TablePreview/TablePreview.js +205 -118
  279. package/lib/TablePreview/index.js +12 -7
  280. package/lib/TablePreview/lib.js +19 -30
  281. package/lib/TablePreview/styles.js +6 -7
  282. package/lib/Tag/Tag.js +38 -19
  283. package/lib/Tag/index.js +12 -7
  284. package/lib/ToggleButton/ToggleButton.js +55 -33
  285. package/lib/ToggleButton/index.js +12 -7
  286. package/lib/Tooltip/Tooltip.js +50 -34
  287. package/lib/Tooltip/index.js +12 -7
  288. package/lib/VerticalButton/VerticalButton.js +46 -40
  289. package/lib/VerticalButton/index.js +12 -7
  290. package/lib/index.js +304 -137
  291. package/lib/theme.js +17 -31
  292. package/lib/utils.js +31 -46
  293. package/package.json +10 -2
package/es/index.js CHANGED
@@ -1,6 +1,8 @@
1
- import meta from '../package.json'; // eslint-disable-next-line no-console
1
+ import meta from '../package.json';
2
+
3
+ // eslint-disable-next-line no-console
4
+ if (process.env.NODE_ENV !== 'test') console.info(meta.name + '@' + meta.version);
2
5
 
3
- if (process.env.NODE_ENV !== 'test') console.info(meta.name + "@" + meta.version);
4
6
  export { default as Alert } from './Alert';
5
7
  export { default as ApiQueries } from './ApiQueries';
6
8
  export { default as Breadcrumbs } from './Breadcrumbs';
package/es/theme.js CHANGED
@@ -10,14 +10,17 @@ export var innerPalette = {
10
10
  textLight: '#444444',
11
11
  textDark: '#182026'
12
12
  };
13
+
13
14
  export var sisccTheme = function sisccTheme(_ref) {
14
15
  var rtl = _ref.rtl,
15
16
  isA11y = _ref.isA11y,
16
17
  _ref$outerPalette = _ref.outerPalette,
17
- outerPalette = _ref$outerPalette === void 0 ? {} : _ref$outerPalette;
18
+ outerPalette = _ref$outerPalette === undefined ? {} : _ref$outerPalette;
19
+
18
20
  var focus = {
19
21
  outlineColor: outerPalette.highlight1 || innerPalette.highlight1
20
22
  };
23
+
21
24
  var buttonBaseFocus = {
22
25
  borderColor: outerPalette.highlight1 || innerPalette.highlight1,
23
26
  '&:focus': {
@@ -26,11 +29,13 @@ export var sisccTheme = function sisccTheme(_ref) {
26
29
  outlineStyle: 'auto'
27
30
  }
28
31
  };
32
+
29
33
  var spotlightFocus = {
30
34
  outlineColor: outerPalette.highlight1 || innerPalette.highlight1,
31
35
  outlineStyle: 'auto',
32
36
  outlineWidth: 1
33
37
  };
38
+
34
39
  return {
35
40
  direction: rtl,
36
41
  props: {
@@ -78,7 +83,7 @@ export var sisccTheme = function sisccTheme(_ref) {
78
83
  },
79
84
  textPrimary: {
80
85
  '&:hover': {
81
- backgroundColor: "" + (outerPalette.hover || innerPalette.hover)
86
+ backgroundColor: '' + (outerPalette.hover || innerPalette.hover)
82
87
  }
83
88
  }
84
89
  },
@@ -194,28 +199,14 @@ export var sisccTheme = function sisccTheme(_ref) {
194
199
  fontFamily: "'Segoe UI'",
195
200
  fontSize: 12
196
201
  },
197
- annotation: {
198
- fontSize: 11
199
- },
200
- axis: {
201
- color: '#575757'
202
- },
203
- axisLegend: {
204
- color: '#7A7A7A'
205
- },
206
- legend: {
207
- fontSize: 14
208
- },
209
- mapLegend: {
210
- color: '#575757',
211
- fontSize: 10
212
- },
202
+ annotation: { fontSize: 11 },
203
+ axis: { color: '#575757' },
204
+ axisLegend: { color: '#7A7A7A' },
205
+ legend: { fontSize: 14 },
206
+ mapLegend: { color: '#575757', fontSize: 10 },
213
207
  tooltip: {
214
208
  primary: {},
215
- secondary: {
216
- fontSize: 16,
217
- fontWeight: 'bold'
218
- }
209
+ secondary: { fontSize: 16, fontWeight: 'bold' }
219
210
  }
220
211
  },
221
212
  chartsConfig: {
@@ -325,6 +316,7 @@ export var sisccTheme = function sisccTheme(_ref) {
325
316
  }
326
317
  };
327
318
  };
319
+
328
320
  export var T4_BREAKPOINTS = {
329
321
  xs: 120,
330
322
  xs2: 250,
package/es/utils.js CHANGED
@@ -1,4 +1,5 @@
1
- import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
1
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
+
2
3
  import React from 'react';
3
4
  import * as R from 'ramda';
4
5
  import dateFns from 'date-fns';
@@ -15,54 +16,51 @@ var spotlightHandler = function spotlightHandler(_ref) {
15
16
  };
16
17
  };
17
18
 
18
- export var reduceChildren = function reduceChildren(node, itemsIndexById, func, acc) {
19
- if (func === void 0) {
20
- func = R.flip(R.prepend);
21
- }
22
-
23
- if (acc === void 0) {
24
- acc = [];
25
- }
19
+ export var reduceChildren = function reduceChildren(node, itemsIndexById) {
20
+ var func = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : R.flip(R.prepend);
21
+ var acc = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
26
22
 
27
23
  if (R.isNil(node.parentId)) return acc;
28
24
  var nextNode = R.prop(node.parentId)(itemsIndexById);
29
25
  if (R.isNil(nextNode)) return acc;
30
26
  return reduceChildren(nextNode, itemsIndexById, func, func(acc, nextNode));
31
27
  };
28
+
32
29
  export var spotlightScopeListEngine = function spotlightScopeListEngine(_ref2) {
33
30
  var _ref2$term = _ref2.term,
34
- term = _ref2$term === void 0 ? '' : _ref2$term,
31
+ term = _ref2$term === undefined ? '' : _ref2$term,
35
32
  fields = _ref2.fields,
36
33
  items = _ref2.items,
37
34
  itemsById = _ref2.itemsById,
38
35
  noPath = _ref2.noPath,
39
36
  hasPath = _ref2.hasPath;
37
+
40
38
  var isSelected = R.pipe(R.prop('isSelected'), R.equals(true));
41
39
  var getFields = R.pipe(R.defaultTo([]), R.filter(isSelected), R.values);
40
+
42
41
  return R.reduce(function (acc, item) {
43
- if (spotlightHandler({
44
- term: term,
45
- fields: getFields(fields)
46
- })(item)) {
42
+ if (spotlightHandler({ term: term, fields: getFields(fields) })(item)) {
47
43
  if (noPath) return [].concat(acc, [item]);
48
44
  return [].concat(acc, [_extends({}, item, {
49
45
  nodePath: hasPath ? R.propOr([], 'path')(item) : reduceChildren(item, itemsById)
50
46
  })]);
51
47
  }
52
-
53
48
  return acc;
54
49
  }, [])(items);
55
50
  };
51
+
56
52
  export var withBlank = function withBlank(func) {
57
53
  return function (Component) {
58
54
  return function (props) {
59
55
  if (R.pipe(func, R.prop('isBlank'))(props)) return null;
60
- return /*#__PURE__*/React.createElement(Component, props);
56
+ return React.createElement(Component, props);
61
57
  };
62
58
  };
63
59
  };
60
+
64
61
  export var getLight = R.path(['palette', 'tertiary', 'light']);
65
62
  export var getDark = R.path(['palette', 'tertiary', 'dark']);
63
+
66
64
  export var getIsRtl = function getIsRtl(theme) {
67
65
  return R.equals('rtl', R.prop('direction', theme));
68
66
  };
@@ -1,50 +1,70 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
1
+ 'use strict';
4
2
 
5
3
  exports.__esModule = true;
6
- exports.styles = exports.default = void 0;
4
+ exports.styles = undefined;
5
+
6
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
7
+
8
+ var _react = require('react');
9
+
10
+ var _react2 = _interopRequireDefault(_react);
11
+
12
+ var _propTypes = require('prop-types');
13
+
14
+ var _propTypes2 = _interopRequireDefault(_propTypes);
15
+
16
+ var _clsx = require('clsx');
17
+
18
+ var _clsx2 = _interopRequireDefault(_clsx);
19
+
20
+ var _styles = require('@material-ui/core/styles');
7
21
 
8
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"));
22
+ var _Paper = require('@material-ui/core/Paper');
9
23
 
10
- var _extends2 = _interopRequireDefault(require("/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends"));
24
+ var _Paper2 = _interopRequireDefault(_Paper);
11
25
 
12
- var _react = _interopRequireDefault(require("react"));
26
+ var _CheckCircleOutlineOutlined = require('@material-ui/icons/CheckCircleOutlineOutlined');
13
27
 
14
- var _clsx = _interopRequireDefault(require("clsx"));
28
+ var _CheckCircleOutlineOutlined2 = _interopRequireDefault(_CheckCircleOutlineOutlined);
15
29
 
16
- var _styles = require("@material-ui/core/styles");
30
+ var _ReportProblemOutlined = require('@material-ui/icons/ReportProblemOutlined');
17
31
 
18
- var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
32
+ var _ReportProblemOutlined2 = _interopRequireDefault(_ReportProblemOutlined);
19
33
 
20
- var _CheckCircleOutlineOutlined = _interopRequireDefault(require("@material-ui/icons/CheckCircleOutlineOutlined"));
34
+ var _ErrorOutline = require('@material-ui/icons/ErrorOutline');
21
35
 
22
- var _ReportProblemOutlined = _interopRequireDefault(require("@material-ui/icons/ReportProblemOutlined"));
36
+ var _ErrorOutline2 = _interopRequireDefault(_ErrorOutline);
23
37
 
24
- var _ErrorOutline = _interopRequireDefault(require("@material-ui/icons/ErrorOutline"));
38
+ var _InfoOutlined = require('@material-ui/icons/InfoOutlined');
25
39
 
26
- var _InfoOutlined = _interopRequireDefault(require("@material-ui/icons/InfoOutlined"));
40
+ var _InfoOutlined2 = _interopRequireDefault(_InfoOutlined);
27
41
 
28
- var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
42
+ var _Close = require('@material-ui/icons/Close');
29
43
 
30
- var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
44
+ var _Close2 = _interopRequireDefault(_Close);
31
45
 
32
- var _utils = require("@material-ui/core/utils");
46
+ var _IconButton = require('@material-ui/core/IconButton');
33
47
 
34
- var _excluded = ["action", "children", "classes", "className", "closeText", "color", "icon", "iconMapping", "onClose", "role", "severity", "variant"];
48
+ var _IconButton2 = _interopRequireDefault(_IconButton);
35
49
 
36
- var styles = function styles(theme) {
50
+ var _utils = require('@material-ui/core/utils');
51
+
52
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53
+
54
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
55
+
56
+ var styles = exports.styles = function styles(theme) {
37
57
  var getColor = theme.palette.type === 'light' ? _styles.darken : _styles.lighten;
38
58
  var getBackgroundColor = theme.palette.type === 'light' ? _styles.lighten : _styles.darken;
59
+
39
60
  return {
40
61
  /* Styles applied to the root element. */
41
- root: (0, _extends2.default)({}, theme.typography.body2, {
62
+ root: _extends({}, theme.typography.body2, {
42
63
  borderRadius: theme.shape.borderRadius,
43
64
  backgroundColor: 'transparent',
44
65
  display: 'flex',
45
66
  padding: '6px 16px'
46
67
  }),
47
-
48
68
  /* Styles applied to the root element if `variant="standard"` and `color="success"`. */
49
69
  standardSuccess: {
50
70
  color: getColor(theme.palette.success.main, 0.6),
@@ -53,7 +73,6 @@ var styles = function styles(theme) {
53
73
  color: theme.palette.success.main
54
74
  }
55
75
  },
56
-
57
76
  /* Styles applied to the root element if `variant="standard"` and `color="info"`. */
58
77
  standardInfo: {
59
78
  color: getColor(theme.palette.info.main, 0.6),
@@ -62,7 +81,6 @@ var styles = function styles(theme) {
62
81
  color: theme.palette.info.main
63
82
  }
64
83
  },
65
-
66
84
  /* Styles applied to the root element if `variant="standard"` and `color="warning"`. */
67
85
  standardWarning: {
68
86
  color: getColor(theme.palette.warning.main, 0.6),
@@ -71,7 +89,6 @@ var styles = function styles(theme) {
71
89
  color: theme.palette.warning.main
72
90
  }
73
91
  },
74
-
75
92
  /* Styles applied to the root element if `variant="standard"` and `color="error"`. */
76
93
  standardError: {
77
94
  color: getColor(theme.palette.error.main, 0.6),
@@ -80,71 +97,62 @@ var styles = function styles(theme) {
80
97
  color: theme.palette.error.main
81
98
  }
82
99
  },
83
-
84
100
  /* Styles applied to the root element if `variant="outlined"` and `color="success"`. */
85
101
  outlinedSuccess: {
86
102
  color: getColor(theme.palette.success.main, 0.6),
87
- border: "1px solid " + theme.palette.success.main,
103
+ border: '1px solid ' + theme.palette.success.main,
88
104
  '& $icon': {
89
105
  color: theme.palette.success.main
90
106
  }
91
107
  },
92
-
93
108
  /* Styles applied to the root element if `variant="outlined"` and `color="info"`. */
94
109
  outlinedInfo: {
95
110
  color: getColor(theme.palette.info.main, 0.6),
96
- border: "1px solid " + theme.palette.info.main,
111
+ border: '1px solid ' + theme.palette.info.main,
97
112
  '& $icon': {
98
113
  color: theme.palette.info.main
99
114
  }
100
115
  },
101
-
102
116
  /* Styles applied to the root element if `variant="outlined"` and `color="warning"`. */
103
117
  outlinedWarning: {
104
118
  color: getColor(theme.palette.warning.main, 0.6),
105
- border: "1px solid " + theme.palette.warning.main,
119
+ border: '1px solid ' + theme.palette.warning.main,
106
120
  '& $icon': {
107
121
  color: theme.palette.warning.main
108
122
  }
109
123
  },
110
-
111
124
  /* Styles applied to the root element if `variant="outlined"` and `color="error"`. */
112
125
  outlinedError: {
113
126
  color: getColor(theme.palette.error.main, 0.6),
114
- border: "1px solid " + theme.palette.error.main,
127
+ border: '1px solid ' + theme.palette.error.main,
115
128
  '& $icon': {
116
129
  color: theme.palette.error.main
117
130
  }
118
131
  },
119
-
120
132
  /* Styles applied to the root element if `variant="filled"` and `color="success"`. */
121
133
  filledSuccess: {
122
134
  color: '#fff',
123
135
  fontWeight: theme.typography.fontWeightMedium,
124
136
  backgroundColor: theme.palette.success.main
125
137
  },
126
-
127
138
  /* Styles applied to the root element if `variant="filled"` and `color="info"`. */
128
139
  filledInfo: {
129
140
  color: '#fff',
130
141
  fontWeight: theme.typography.fontWeightMedium,
131
142
  backgroundColor: theme.palette.info.main
132
143
  },
133
-
134
144
  /* Styles applied to the root element if `variant="filled"` and `color="warning"`. */
135
145
  filledWarning: {
136
146
  color: '#fff',
137
147
  fontWeight: theme.typography.fontWeightMedium,
138
148
  backgroundColor: theme.palette.warning.main
139
149
  },
140
-
141
150
  /* Styles applied to the root element if `variant="filled"` and `color="error"`. */
142
151
  filledError: {
143
152
  color: '#fff',
144
153
  fontWeight: theme.typography.fontWeightMedium,
145
154
  backgroundColor: theme.palette.error.main
146
155
  },
147
-
148
156
  /* Styles applied to the icon wrapper element. */
149
157
  icon: {
150
158
  marginRight: 12,
@@ -153,7 +161,6 @@ var styles = function styles(theme) {
153
161
  fontSize: 22,
154
162
  opacity: 0.9
155
163
  },
156
-
157
164
  /* Styles applied to the message wrapper element. */
158
165
  message: {
159
166
  padding: '8px 0',
@@ -161,7 +168,6 @@ var styles = function styles(theme) {
161
168
  flexDirection: 'column',
162
169
  justifyContent: 'center'
163
170
  },
164
-
165
171
  /* Styles applied to the action wrapper element if `action` is provided. */
166
172
  action: {
167
173
  display: 'flex',
@@ -173,68 +179,143 @@ var styles = function styles(theme) {
173
179
  };
174
180
  };
175
181
 
176
- exports.styles = styles;
177
182
  var defaultIconMapping = {
178
- success: /*#__PURE__*/_react.default.createElement(_CheckCircleOutlineOutlined.default, {
179
- fontSize: "inherit"
180
- }),
181
- warning: /*#__PURE__*/_react.default.createElement(_ReportProblemOutlined.default, {
182
- fontSize: "inherit"
183
- }),
184
- error: /*#__PURE__*/_react.default.createElement(_ErrorOutline.default, {
185
- fontSize: "inherit"
186
- }),
187
- info: /*#__PURE__*/_react.default.createElement(_InfoOutlined.default, {
188
- fontSize: "inherit"
189
- })
183
+ success: _react2.default.createElement(_CheckCircleOutlineOutlined2.default, { fontSize: 'inherit' }),
184
+ warning: _react2.default.createElement(_ReportProblemOutlined2.default, { fontSize: 'inherit' }),
185
+ error: _react2.default.createElement(_ErrorOutline2.default, { fontSize: 'inherit' }),
186
+ info: _react2.default.createElement(_InfoOutlined2.default, { fontSize: 'inherit' })
190
187
  };
191
188
 
192
- var Alert = _react.default.forwardRef(function Alert(props, ref) {
189
+ var Alert = _react2.default.forwardRef(function Alert(props, ref) {
193
190
  var action = props.action,
194
191
  children = props.children,
195
192
  classes = props.classes,
196
193
  className = props.className,
197
194
  _props$closeText = props.closeText,
198
- closeText = _props$closeText === void 0 ? 'Close' : _props$closeText,
195
+ closeText = _props$closeText === undefined ? 'Close' : _props$closeText,
199
196
  color = props.color,
200
197
  icon = props.icon,
201
198
  _props$iconMapping = props.iconMapping,
202
- iconMapping = _props$iconMapping === void 0 ? defaultIconMapping : _props$iconMapping,
199
+ iconMapping = _props$iconMapping === undefined ? defaultIconMapping : _props$iconMapping,
203
200
  onClose = props.onClose,
204
201
  _props$role = props.role,
205
- role = _props$role === void 0 ? 'alert' : _props$role,
202
+ role = _props$role === undefined ? 'alert' : _props$role,
206
203
  _props$severity = props.severity,
207
- severity = _props$severity === void 0 ? 'success' : _props$severity,
204
+ severity = _props$severity === undefined ? 'success' : _props$severity,
208
205
  _props$variant = props.variant,
209
- variant = _props$variant === void 0 ? 'standard' : _props$variant,
210
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
211
- return /*#__PURE__*/_react.default.createElement(_Paper.default, (0, _extends2.default)({
212
- role: role,
213
- square: true,
214
- elevation: 0,
215
- className: (0, _clsx.default)(classes.root, classes["" + variant + (0, _utils.capitalize)(color || severity)], className),
216
- ref: ref
217
- }, other), icon !== false ? /*#__PURE__*/_react.default.createElement("div", {
218
- className: classes.icon
219
- }, icon || iconMapping[severity] || defaultIconMapping[severity]) : null, /*#__PURE__*/_react.default.createElement("div", {
220
- className: classes.message
221
- }, children), action != null ? /*#__PURE__*/_react.default.createElement("div", {
222
- className: classes.action
223
- }, action) : null, action == null && onClose ? /*#__PURE__*/_react.default.createElement("div", {
224
- className: classes.action
225
- }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
226
- size: "small",
227
- "aria-label": closeText,
228
- title: closeText,
229
- color: "inherit",
230
- onClick: onClose
231
- }, /*#__PURE__*/_react.default.createElement(_Close.default, {
232
- fontSize: "small"
233
- }))) : null);
206
+ variant = _props$variant === undefined ? 'standard' : _props$variant,
207
+ other = _objectWithoutProperties(props, ['action', 'children', 'classes', 'className', 'closeText', 'color', 'icon', 'iconMapping', 'onClose', 'role', 'severity', 'variant']);
208
+
209
+ return _react2.default.createElement(
210
+ _Paper2.default,
211
+ _extends({
212
+ role: role,
213
+ square: true,
214
+ elevation: 0,
215
+ className: (0, _clsx2.default)(classes.root, classes['' + variant + (0, _utils.capitalize)(color || severity)], className),
216
+ ref: ref
217
+ }, other),
218
+ icon !== false ? _react2.default.createElement(
219
+ 'div',
220
+ { className: classes.icon },
221
+ icon || iconMapping[severity] || defaultIconMapping[severity]
222
+ ) : null,
223
+ _react2.default.createElement(
224
+ 'div',
225
+ { className: classes.message },
226
+ children
227
+ ),
228
+ action != null ? _react2.default.createElement(
229
+ 'div',
230
+ { className: classes.action },
231
+ action
232
+ ) : null,
233
+ action == null && onClose ? _react2.default.createElement(
234
+ 'div',
235
+ { className: classes.action },
236
+ _react2.default.createElement(
237
+ _IconButton2.default,
238
+ {
239
+ size: 'small',
240
+ 'aria-label': closeText,
241
+ title: closeText,
242
+ color: 'inherit',
243
+ onClick: onClose
244
+ },
245
+ _react2.default.createElement(_Close2.default, { fontSize: 'small' })
246
+ )
247
+ ) : null
248
+ );
234
249
  });
235
250
 
236
- var _default = (0, _styles.withStyles)(styles, {
237
- name: 'MuiAlert'
238
- })(Alert);
239
-
240
- exports.default = _default;
251
+ Alert.propTypes = process.env.NODE_ENV !== "production" ? {
252
+ // ----------------------------- Warning --------------------------------
253
+ // | These PropTypes are generated from the TypeScript type definitions |
254
+ // | To update them edit the d.ts file and run "yarn proptypes" |
255
+ // ----------------------------------------------------------------------
256
+ /**
257
+ * The action to display. It renders after the message, at the end of the alert.
258
+ */
259
+ action: _propTypes2.default.node,
260
+ /**
261
+ * The content of the component.
262
+ */
263
+ children: _propTypes2.default.node,
264
+ /**
265
+ * Override or extend the styles applied to the component.
266
+ * See [CSS API](#css) below for more details.
267
+ */
268
+ classes: _propTypes2.default.object,
269
+ /**
270
+ * @ignore
271
+ */
272
+ className: _propTypes2.default.string,
273
+ /**
274
+ * Override the default label for the *close popup* icon button.
275
+ *
276
+ * For localization purposes, you can use the provided [translations](/guides/localization/).
277
+ */
278
+ closeText: _propTypes2.default.string,
279
+ /**
280
+ * The main color for the alert. Unless provided, the value is taken from the `severity` prop.
281
+ */
282
+ color: _propTypes2.default.oneOf(['error', 'info', 'success', 'warning']),
283
+ /**
284
+ * Override the icon displayed before the children.
285
+ * Unless provided, the icon is mapped to the value of the `severity` prop.
286
+ */
287
+ icon: _propTypes2.default.node,
288
+ /**
289
+ * The component maps the `severity` prop to a range of different icons,
290
+ * for instance success to `<SuccessOutlined>`.
291
+ * If you wish to change this mapping, you can provide your own.
292
+ * Alternatively, you can use the `icon` prop to override the icon displayed.
293
+ */
294
+ iconMapping: _propTypes2.default.shape({
295
+ error: _propTypes2.default.node,
296
+ info: _propTypes2.default.node,
297
+ success: _propTypes2.default.node,
298
+ warning: _propTypes2.default.node
299
+ }),
300
+ /**
301
+ * Callback fired when the component requests to be closed.
302
+ * When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
303
+ *
304
+ * @param {object} event The event source of the callback.
305
+ */
306
+ onClose: _propTypes2.default.func,
307
+ /**
308
+ * The ARIA role attribute of the element.
309
+ */
310
+ role: _propTypes2.default.string,
311
+ /**
312
+ * The severity of the alert. This defines the color and icon used.
313
+ */
314
+ severity: _propTypes2.default.oneOf(['error', 'info', 'success', 'warning']),
315
+ /**
316
+ * The variant to use.
317
+ */
318
+ variant: _propTypes2.default.oneOf(['filled', 'outlined', 'standard'])
319
+ } : {};
320
+
321
+ exports.default = (0, _styles.withStyles)(styles, { name: 'MuiAlert' })(Alert);
@@ -1,11 +1,16 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
1
+ 'use strict';
4
2
 
5
3
  exports.__esModule = true;
6
- exports.default = void 0;
7
4
 
8
- var _Alert = _interopRequireDefault(require("./Alert"));
5
+ var _Alert = require('./Alert');
6
+
7
+ Object.defineProperty(exports, 'default', {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _interopRequireDefault(_Alert).default;
11
+ }
12
+ });
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
15
 
10
- exports.default = _Alert.default;
11
- module.exports = exports.default;
16
+ module.exports = exports['default'];