@spaziodati/atoka-design-system 2.1.6 → 2.1.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 (109) hide show
  1. package/AddableItems/index.js +1 -1050
  2. package/Alert/index.js +1 -321
  3. package/Badge/index.js +1 -285
  4. package/Bs4V3Wrapper/index.js +1 -253
  5. package/BubbleChart/index.js +2 -3424
  6. package/BubbleChart/index.js.LICENSE.txt +1 -0
  7. package/Button/index.js +1 -325
  8. package/ButtonDropdown/index.js +1 -601
  9. package/CardsPage/index.js +1 -2505
  10. package/CursorPagination/index.js +1 -948
  11. package/DatePicker/index.js +1 -449
  12. package/DetailPage/index.js +1 -1990
  13. package/Dropdown/index.js +1 -723
  14. package/EditableString/index.js +1 -3238
  15. package/EllipsableContent/index.js +1 -786
  16. package/EmptyState/index.js +1 -280
  17. package/Facet/index.js +1 -919
  18. package/FacetSection/index.js +1 -447
  19. package/FadeAnimation/index.js +1 -1157
  20. package/FeedbackButton/index.js +1 -400
  21. package/Form/index.js +1 -450
  22. package/Funnel/index.js +2 -3624
  23. package/Funnel/index.js.LICENSE.txt +1 -0
  24. package/GridCard/index.js +1 -1626
  25. package/HighlightableText/index.js +1 -625
  26. package/Histogram/index.js +1 -2346
  27. package/InlineStringEditor/index.js +1 -1862
  28. package/InputGroup/index.js +1 -279
  29. package/Jumbotron/index.js +1 -272
  30. package/Map/index.js +2 -5187
  31. package/Map/index.js.LICENSE.txt +10 -0
  32. package/Modal/index.js +1 -745
  33. package/Navbar/index.js +1 -3430
  34. package/Pagination/index.js +1 -990
  35. package/PieChart/index.js +1 -1971
  36. package/PublicFooter/index.js +1 -458
  37. package/PublicNavbar/index.js +1 -257
  38. package/RecordBit/index.js +1 -486
  39. package/ResultItemCard/index.js +1 -1073
  40. package/SelectDropdown/index.js +1 -1506
  41. package/Spinner/index.js +1 -327
  42. package/StatisticsItemCard/index.js +1 -1796
  43. package/StatisticsItemNumeric/index.js +1 -285
  44. package/StatisticsLegend/index.js +1 -1555
  45. package/StatisticsTooltip/index.js +1 -796
  46. package/Suggester/index.js +1 -1126
  47. package/SunBurst/index.js +1 -1166
  48. package/TabSwitcher/index.js +1 -1135
  49. package/Title/index.js +1 -304
  50. package/Toasts/index.js +1 -2285
  51. package/ToggleButtonGroup/index.js +1 -607
  52. package/Tooltip/index.js +1 -291
  53. package/Utils/index.js +2 -3002
  54. package/Utils/index.js.LICENSE.txt +1 -0
  55. package/{atoka-design-system-2.1.6.min.css → atoka-design-system-2.1.7.min.css} +0 -0
  56. package/index.js +2 -16819
  57. package/index.js.LICENSE.txt +10 -0
  58. package/package.json +1 -1
  59. package/AddableItems/index.js.map +0 -1
  60. package/Alert/index.js.map +0 -1
  61. package/Badge/index.js.map +0 -1
  62. package/Bs4V3Wrapper/index.js.map +0 -1
  63. package/BubbleChart/index.js.map +0 -1
  64. package/Button/index.js.map +0 -1
  65. package/ButtonDropdown/index.js.map +0 -1
  66. package/CardsPage/index.js.map +0 -1
  67. package/CursorPagination/index.js.map +0 -1
  68. package/DatePicker/index.js.map +0 -1
  69. package/DetailPage/index.js.map +0 -1
  70. package/Dropdown/index.js.map +0 -1
  71. package/EditableString/index.js.map +0 -1
  72. package/EllipsableContent/index.js.map +0 -1
  73. package/EmptyState/index.js.map +0 -1
  74. package/Facet/index.js.map +0 -1
  75. package/FacetSection/index.js.map +0 -1
  76. package/FadeAnimation/index.js.map +0 -1
  77. package/FeedbackButton/index.js.map +0 -1
  78. package/Form/index.js.map +0 -1
  79. package/Funnel/index.js.map +0 -1
  80. package/GridCard/index.js.map +0 -1
  81. package/HighlightableText/index.js.map +0 -1
  82. package/Histogram/index.js.map +0 -1
  83. package/InlineStringEditor/index.js.map +0 -1
  84. package/InputGroup/index.js.map +0 -1
  85. package/Jumbotron/index.js.map +0 -1
  86. package/Map/index.js.map +0 -1
  87. package/Modal/index.js.map +0 -1
  88. package/Navbar/index.js.map +0 -1
  89. package/Pagination/index.js.map +0 -1
  90. package/PieChart/index.js.map +0 -1
  91. package/PublicFooter/index.js.map +0 -1
  92. package/PublicNavbar/index.js.map +0 -1
  93. package/RecordBit/index.js.map +0 -1
  94. package/ResultItemCard/index.js.map +0 -1
  95. package/SelectDropdown/index.js.map +0 -1
  96. package/Spinner/index.js.map +0 -1
  97. package/StatisticsItemCard/index.js.map +0 -1
  98. package/StatisticsItemNumeric/index.js.map +0 -1
  99. package/StatisticsLegend/index.js.map +0 -1
  100. package/StatisticsTooltip/index.js.map +0 -1
  101. package/Suggester/index.js.map +0 -1
  102. package/SunBurst/index.js.map +0 -1
  103. package/TabSwitcher/index.js.map +0 -1
  104. package/Title/index.js.map +0 -1
  105. package/Toasts/index.js.map +0 -1
  106. package/ToggleButtonGroup/index.js.map +0 -1
  107. package/Tooltip/index.js.map +0 -1
  108. package/Utils/index.js.map +0 -1
  109. package/index.js.map +0 -1
package/SunBurst/index.js CHANGED
@@ -1,1166 +1 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("@fortawesome/react-fontawesome"), require("@nivo/sunburst"), require("classnames"), require("react"), require("react-bootstrap/Form"), require("react-bootstrap/FormControl"), require("react-bootstrap/FormText"));
4
- else if(typeof define === 'function' && define.amd)
5
- define("atoka-design-system", ["@fortawesome/react-fontawesome", "@nivo/sunburst", "classnames", "react", "react-bootstrap/Form", "react-bootstrap/FormControl", "react-bootstrap/FormText"], factory);
6
- else if(typeof exports === 'object')
7
- exports["atoka-design-system"] = factory(require("@fortawesome/react-fontawesome"), require("@nivo/sunburst"), require("classnames"), require("react"), require("react-bootstrap/Form"), require("react-bootstrap/FormControl"), require("react-bootstrap/FormText"));
8
- else
9
- root["atoka-design-system"] = factory(root["@fortawesome/react-fontawesome"], root["@nivo/sunburst"], root["classnames"], root["react"], root["react-bootstrap/Form"], root["react-bootstrap/FormControl"], root["react-bootstrap/FormText"]);
10
- })(self, function(__WEBPACK_EXTERNAL_MODULE__5692__, __WEBPACK_EXTERNAL_MODULE__9503__, __WEBPACK_EXTERNAL_MODULE__8310__, __WEBPACK_EXTERNAL_MODULE__8156__, __WEBPACK_EXTERNAL_MODULE__8721__, __WEBPACK_EXTERNAL_MODULE__1082__, __WEBPACK_EXTERNAL_MODULE__8763__) {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 6627:
16
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
-
18
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
- /* harmony export */ "MR": () => (/* binding */ boundMethod)
20
- /* harmony export */ });
21
- /* unused harmony exports boundClass, default */
22
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4329);
23
-
24
-
25
- function _typeof(obj) {
26
- if (typeof Symbol === "function" && (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(Symbol.iterator) === "symbol") {
27
- _typeof = function _typeof(obj) {
28
- return (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(obj);
29
- };
30
- } else {
31
- _typeof = function _typeof(obj) {
32
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(obj);
33
- };
34
- }
35
-
36
- return _typeof(obj);
37
- }
38
- /**
39
- * Return a descriptor removing the value and returning a getter
40
- * The getter will return a .bind version of the function
41
- * and memoize the result against a symbol on the instance
42
- */
43
-
44
-
45
- function boundMethod(target, key, descriptor) {
46
- var fn = descriptor.value;
47
-
48
- if (typeof fn !== 'function') {
49
- throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
50
- } // In IE11 calling Object.defineProperty has a side-effect of evaluating the
51
- // getter for the property which is being replaced. This causes infinite
52
- // recursion and an "Out of stack space" error.
53
-
54
-
55
- var definingProperty = false;
56
- return {
57
- configurable: true,
58
- get: function get() {
59
- // eslint-disable-next-line no-prototype-builtins
60
- if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
61
- return fn;
62
- }
63
-
64
- var boundFn = fn.bind(this);
65
- definingProperty = true;
66
- Object.defineProperty(this, key, {
67
- configurable: true,
68
- get: function get() {
69
- return boundFn;
70
- },
71
- set: function set(value) {
72
- fn = value;
73
- delete this[key];
74
- }
75
- });
76
- definingProperty = false;
77
- return boundFn;
78
- },
79
- set: function set(value) {
80
- fn = value;
81
- }
82
- };
83
- }
84
- /**
85
- * Use boundMethod to bind all methods on the target.prototype
86
- */
87
-
88
- function boundClass(target) {
89
- // (Using reflect to get all keys including symbols)
90
- var keys; // Use Reflect if exists
91
-
92
- if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
93
- keys = Reflect.ownKeys(target.prototype);
94
- } else {
95
- keys = Object.getOwnPropertyNames(target.prototype); // Use symbols if support is provided
96
-
97
- if (typeof Object.getOwnPropertySymbols === 'function') {
98
- keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
99
- }
100
- }
101
-
102
- keys.forEach(function (key) {
103
- // Ignore special case target method
104
- if (key === 'constructor') {
105
- return;
106
- }
107
-
108
- var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key); // Only methods need binding
109
-
110
- if (typeof descriptor.value === 'function') {
111
- Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
112
- }
113
- });
114
- return target;
115
- }
116
- function autobind() {
117
- if (arguments.length === 1) {
118
- return boundClass.apply(void 0, arguments);
119
- }
120
-
121
- return boundMethod.apply(void 0, arguments);
122
- }
123
-
124
- /***/ }),
125
-
126
- /***/ 8352:
127
- /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
128
-
129
-
130
- // UNUSED EXPORTS: Form
131
-
132
- // EXTERNAL MODULE: external "react"
133
- var external_react_ = __webpack_require__(8156);
134
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
135
- // EXTERNAL MODULE: external "classnames"
136
- var external_classnames_ = __webpack_require__(8310);
137
- var external_classnames_default = /*#__PURE__*/__webpack_require__.n(external_classnames_);
138
- // EXTERNAL MODULE: external "react-bootstrap/Form"
139
- var Form_ = __webpack_require__(8721);
140
- var Form_default = /*#__PURE__*/__webpack_require__.n(Form_);
141
- ;// CONCATENATED MODULE: ./src/components/Form/FormLabel.tsx
142
-
143
-
144
-
145
-
146
- var FormLabel = external_react_default().memo(function (props) {
147
- var className = external_classnames_default()(props === null || props === void 0 ? void 0 : props.className, 'atoka-form-label');
148
- return external_react_default().createElement((Form_default()).Label, { className: className }, props.children);
149
- });
150
- FormLabel.displayName = 'FormLabel';
151
-
152
- // EXTERNAL MODULE: ./src/components/Form/FormControl.tsx + 1 modules
153
- var FormControl = __webpack_require__(2048);
154
- ;// CONCATENATED MODULE: ./src/components/Form/FormCheckbox.tsx
155
- var __assign = (undefined && undefined.__assign) || function () {
156
- __assign = Object.assign || function(t) {
157
- for (var s, i = 1, n = arguments.length; i < n; i++) {
158
- s = arguments[i];
159
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
160
- t[p] = s[p];
161
- }
162
- return t;
163
- };
164
- return __assign.apply(this, arguments);
165
- };
166
-
167
-
168
-
169
-
170
- var FormCheckbox = function (props) {
171
- var _a;
172
- var className = external_classnames_default()('atoka-form-checkbox', props === null || props === void 0 ? void 0 : props.className);
173
- return external_react_default().createElement((Form_default()).Check, __assign({ type: 'checkbox' }, props, { custom: true, className: className, label: (_a = props.label) !== null && _a !== void 0 ? _a : '' }));
174
- };
175
- FormCheckbox.displayName = 'FormCheckbox';
176
-
177
- ;// CONCATENATED MODULE: ./src/components/Form/FormRadio.tsx
178
- var FormRadio_assign = (undefined && undefined.__assign) || function () {
179
- FormRadio_assign = Object.assign || function(t) {
180
- for (var s, i = 1, n = arguments.length; i < n; i++) {
181
- s = arguments[i];
182
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
183
- t[p] = s[p];
184
- }
185
- return t;
186
- };
187
- return FormRadio_assign.apply(this, arguments);
188
- };
189
-
190
-
191
-
192
-
193
- var FormRadio = function (props) {
194
- var _a;
195
- var className = external_classnames_default()(props === null || props === void 0 ? void 0 : props.className, 'atoka-form-radio');
196
- return external_react_default().createElement((Form_default()).Check, FormRadio_assign({ type: 'radio' }, props, { custom: true, className: className, label: (_a = props.label) !== null && _a !== void 0 ? _a : '' }));
197
- };
198
- FormRadio.displayName = 'FormRadio';
199
-
200
- // EXTERNAL MODULE: external "react-bootstrap/FormText"
201
- var FormText_ = __webpack_require__(8763);
202
- var FormText_default = /*#__PURE__*/__webpack_require__.n(FormText_);
203
- ;// CONCATENATED MODULE: ./src/components/Form/FormHelp.tsx
204
- var __rest = (undefined && undefined.__rest) || function (s, e) {
205
- var t = {};
206
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
207
- t[p] = s[p];
208
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
209
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
210
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
211
- t[p[i]] = s[p[i]];
212
- }
213
- return t;
214
- };
215
-
216
-
217
-
218
-
219
- var FormHelp = external_react_default().memo(function (_a) {
220
- var children = _a.children, props = __rest(_a, ["children"]);
221
- var className = external_classnames_default()('d-block', props === null || props === void 0 ? void 0 : props.className);
222
- return (external_react_default().createElement((FormText_default()), { bsPrefix: 'atoka-form-help', className: className }, children));
223
- });
224
- FormHelp.displayName = 'FormHelp';
225
-
226
- ;// CONCATENATED MODULE: ./src/components/Form/Form.tsx
227
- var Form_assign = (undefined && undefined.__assign) || function () {
228
- Form_assign = Object.assign || function(t) {
229
- for (var s, i = 1, n = arguments.length; i < n; i++) {
230
- s = arguments[i];
231
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
232
- t[p] = s[p];
233
- }
234
- return t;
235
- };
236
- return Form_assign.apply(this, arguments);
237
- };
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
- var Form = function (props) {
248
- var className = external_classnames_default()(props === null || props === void 0 ? void 0 : props.className, 'atoka-form');
249
- return (external_react_default().createElement((Form_default()), Form_assign({}, props, { className: className }), props.children));
250
- };
251
- Form.displayName = 'Form';
252
- Form.Control = FormControl/* FormControl */.N;
253
- Form.Label = FormLabel;
254
- Form.Checkbox = FormCheckbox;
255
- Form.Radio = FormRadio;
256
- Form.File = (Form_default()).File;
257
- Form.Switch = (Form_default()).Switch;
258
- Form.Help = FormHelp;
259
- Form.Group = (Form_default()).Group;
260
-
261
-
262
-
263
- /***/ }),
264
-
265
- /***/ 2048:
266
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
267
-
268
-
269
- // EXPORTS
270
- __webpack_require__.d(__webpack_exports__, {
271
- "N": () => (/* binding */ FormControl)
272
- });
273
-
274
- // EXTERNAL MODULE: external "react"
275
- var external_react_ = __webpack_require__(8156);
276
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
277
- // EXTERNAL MODULE: external "classnames"
278
- var external_classnames_ = __webpack_require__(8310);
279
- var external_classnames_default = /*#__PURE__*/__webpack_require__.n(external_classnames_);
280
- // EXTERNAL MODULE: external "react-bootstrap/FormControl"
281
- var FormControl_ = __webpack_require__(1082);
282
- var FormControl_default = /*#__PURE__*/__webpack_require__.n(FormControl_);
283
- ;// CONCATENATED MODULE: ./src/components/Form/FormControlFeedBack.tsx
284
- var __rest = (undefined && undefined.__rest) || function (s, e) {
285
- var t = {};
286
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
287
- t[p] = s[p];
288
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
289
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
290
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
291
- t[p[i]] = s[p[i]];
292
- }
293
- return t;
294
- };
295
-
296
-
297
-
298
- var FormControlFeedBack = external_react_default().memo(function (_a) {
299
- var _b = _a.show, show = _b === void 0 ? true : _b, props = __rest(_a, ["show"]);
300
- var className = external_classnames_default()(props === null || props === void 0 ? void 0 : props.className, 'atoka-form-control-feedback', {
301
- 'd-block': show,
302
- });
303
- return (external_react_default().createElement((FormControl_default()).Feedback, { type: props.type, className: className }, props.children));
304
- });
305
- FormControlFeedBack.displayName = ' FormControlFeedBack';
306
-
307
- ;// CONCATENATED MODULE: ./src/components/Form/FormControl.tsx
308
- var FormControl_rest = (undefined && undefined.__rest) || function (s, e) {
309
- var t = {};
310
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
311
- t[p] = s[p];
312
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
313
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
314
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
315
- t[p[i]] = s[p[i]];
316
- }
317
- return t;
318
- };
319
-
320
-
321
-
322
-
323
-
324
- var FormControlComponent = external_react_default().forwardRef(function (_a, ref) {
325
- var _b = _a.size, size = _b === void 0 ? 'md' : _b, props = FormControl_rest(_a, ["size"]);
326
- var className = external_classnames_default()('atoka-form-control', props === null || props === void 0 ? void 0 : props.className, {
327
- 'atoka-shadow': props.withShadow,
328
- 'disabled': props.disabled,
329
- });
330
- return (external_react_default().createElement((FormControl_default()), { as: props.as, rows: props.rows, cols: props.cols, placeholder: props.placeholder, className: className, disabled: props.disabled, readOnly: props.readOnly, value: props.value, onChange: props.onChange, onKeyPress: props.onKeyPress, onKeyDown: props.onKeyDown, defaultValue: props.defaultValue, size: size === 'md' ? undefined : size, type: props.type, id: props.id, isValid: props.isValid, isInvalid: props.isInvalid, ref: ref, autoComplete: 'off' }, props.children));
331
- });
332
- FormControlComponent.displayName = 'FormControlComponent';
333
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
334
- var FormControl = FormControlComponent;
335
- FormControl.FeedBack = FormControlFeedBack;
336
- FormControl.displayName = 'FormControl';
337
-
338
-
339
-
340
- /***/ }),
341
-
342
- /***/ 8007:
343
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
344
-
345
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
346
- /* harmony export */ "q": () => (/* binding */ getRenderStatisticsTooltip)
347
- /* harmony export */ });
348
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8156);
349
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
350
- /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4806);
351
- var __assign = (undefined && undefined.__assign) || function () {
352
- __assign = Object.assign || function(t) {
353
- for (var s, i = 1, n = arguments.length; i < n; i++) {
354
- s = arguments[i];
355
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
356
- t[p] = s[p];
357
- }
358
- return t;
359
- };
360
- return __assign.apply(this, arguments);
361
- };
362
-
363
-
364
- function getRenderStatisticsTooltip(_a) {
365
- var tooltipDataLabelKey = _a.tooltipDataLabelKey, tooltipDataValueKey = _a.tooltipDataValueKey, tooltipDataTitleKey = _a.tooltipDataTitleKey, otherId = _a.otherId, otherLabel = _a.otherLabel, numberToStringFormatter = _a.numberToStringFormatter, withColor = _a.withColor, _b = _a.className, className = _b === void 0 ? 'tooltip-background' : _b;
366
- // eslint-disable-next-line react/display-name
367
- return function (props) {
368
- var _a, _b, _c, _d;
369
- var tooltipData = __assign(__assign({}, props.data), { value: (_a = props.data) === null || _a === void 0 ? void 0 : _a['value'], label: (_b = props.data) === null || _b === void 0 ? void 0 : _b['label'], id: (_c = props.data) === null || _c === void 0 ? void 0 : _c['id'], percentage: (_d = props.data) === null || _d === void 0 ? void 0 : _d['percentage'] });
370
- return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_index__WEBPACK_IMPORTED_MODULE_1__.StatisticsTooltip, { otherId: otherId, otherLabel: otherLabel, numberToStringFormatter: numberToStringFormatter, data: tooltipData, tooltipDataLabelKey: tooltipDataLabelKey, tooltipDataTitleKey: tooltipDataTitleKey, tooltipDataValueKey: tooltipDataValueKey, className: className !== null && className !== void 0 ? className : '', color: withColor ? props.color : undefined }));
371
- };
372
- }
373
-
374
-
375
- /***/ }),
376
-
377
- /***/ 4806:
378
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
379
-
380
-
381
- // EXPORTS
382
- __webpack_require__.d(__webpack_exports__, {
383
- "StatisticsTooltip": () => (/* reexport */ StatisticsTooltip),
384
- "getRenderStatisticsTooltip": () => (/* reexport */ helpers/* getRenderStatisticsTooltip */.q)
385
- });
386
-
387
- // UNUSED EXPORTS: GetRenderStatisticsTooltipType
388
-
389
- // EXTERNAL MODULE: external "react"
390
- var external_react_ = __webpack_require__(8156);
391
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
392
- // EXTERNAL MODULE: external "classnames"
393
- var external_classnames_ = __webpack_require__(8310);
394
- var external_classnames_default = /*#__PURE__*/__webpack_require__.n(external_classnames_);
395
- // EXTERNAL MODULE: ./src/components/Utils/Statistics.ts
396
- var Statistics = __webpack_require__(5909);
397
- ;// CONCATENATED MODULE: ./src/components/StatisticsTooltip/StatisticsTooltip.tsx
398
-
399
-
400
-
401
- var StatisticsTooltip = external_react_default().memo(function (props) {
402
- // eslint-disable-next-line react/display-name
403
- function renderSubtitle() {
404
- var values = [
405
- { value: getLabel(), key: props.tooltipDataLabelKey, className: 'label' },
406
- { value: getValue(), key: props.tooltipDataValueKey, className: 'value' },
407
- ]
408
- .filter(function (el) { return el.value != null; })
409
- .map(function (el) { return (external_react_default().createElement("span", { key: el.key, className: el.className }, el.value)); });
410
- if (values.length === 0) {
411
- return null;
412
- }
413
- return external_react_default().createElement("div", { className: 'd-flex justify-content-between' }, values);
414
- }
415
- function getLabel() {
416
- var tooltipDataLabelKey = props.tooltipDataLabelKey, numberToStringFormatter = props.numberToStringFormatter, data = props.data, label = getValueFromData(tooltipDataLabelKey, data);
417
- if (label == null) {
418
- return undefined;
419
- }
420
- if (numberToStringFormatter == null) {
421
- return String(label);
422
- }
423
- if (typeof label == 'string') {
424
- return label;
425
- }
426
- return numberToStringFormatter(label);
427
- }
428
- function getValue() {
429
- var tooltipDataValueKey = props.tooltipDataValueKey, data = props.data, value = getValueFromData(tooltipDataValueKey, data);
430
- if (value == null) {
431
- return undefined;
432
- }
433
- if (typeof value == 'number') {
434
- return (0,Statistics/* normalizePercentage */.Ow)(value);
435
- }
436
- return value;
437
- }
438
- function getTitle() {
439
- var tooltipDataTitleKey = props.tooltipDataTitleKey, data = props.data, otherId = props.otherId, otherLabel = props.otherLabel, title = getValueFromData(tooltipDataTitleKey, data);
440
- if (title === otherId) {
441
- return otherLabel !== null && otherLabel !== void 0 ? otherLabel : otherId;
442
- }
443
- return title ? String(title) : undefined;
444
- }
445
- function getValueFromData(key, data) {
446
- return key == null ? undefined : data === null || data === void 0 ? void 0 : data[key];
447
- }
448
- var className = external_classnames_default()('statistics-tooltip', props === null || props === void 0 ? void 0 : props.className), colorRectangle = props.color == null ? null : external_react_default().createElement("span", { className: 'tooltip-rectangle', style: { background: props.color } });
449
- return (external_react_default().createElement("div", { className: className },
450
- external_react_default().createElement("div", { className: 'd-flex align-items-center' },
451
- colorRectangle,
452
- external_react_default().createElement("span", { className: 'text-left' }, getTitle())),
453
- renderSubtitle(),
454
- props.children));
455
- });
456
- StatisticsTooltip.displayName = 'StatisticsTooltip';
457
-
458
- // EXTERNAL MODULE: ./src/components/StatisticsTooltip/helpers.tsx
459
- var helpers = __webpack_require__(8007);
460
- ;// CONCATENATED MODULE: ./src/components/StatisticsTooltip/index.ts
461
-
462
-
463
-
464
-
465
- /***/ }),
466
-
467
- /***/ 3292:
468
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
469
-
470
- // ESM COMPAT FLAG
471
- __webpack_require__.r(__webpack_exports__);
472
-
473
- // EXPORTS
474
- __webpack_require__.d(__webpack_exports__, {
475
- "ComputedDatum": () => (/* reexport */ sunburst_.ComputedDatum),
476
- "SunBurst": () => (/* reexport */ SunBurst),
477
- "SunBurstItemData": () => (/* reexport */ SunBurst_namespaceObject.SunBurstItemData),
478
- "SunBurstProps": () => (/* reexport */ SunBurst_namespaceObject.SunBurstProps)
479
- });
480
-
481
- // NAMESPACE OBJECT: ./src/components/SunBurst/SunBurst.tsx
482
- var SunBurst_namespaceObject = {};
483
- __webpack_require__.r(SunBurst_namespaceObject);
484
- __webpack_require__.d(SunBurst_namespaceObject, {
485
- "X": () => (SunBurst)
486
- });
487
-
488
- // EXTERNAL MODULE: external "react"
489
- var external_react_ = __webpack_require__(8156);
490
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
491
- // EXTERNAL MODULE: ./node_modules/autobind-decorator/lib/esm/index.js
492
- var esm = __webpack_require__(6627);
493
- // EXTERNAL MODULE: external "@nivo/sunburst"
494
- var sunburst_ = __webpack_require__(9503);
495
- // EXTERNAL MODULE: external "classnames"
496
- var external_classnames_ = __webpack_require__(8310);
497
- var external_classnames_default = /*#__PURE__*/__webpack_require__.n(external_classnames_);
498
- // EXTERNAL MODULE: ./src/components/Utils/Utils.tsx
499
- var Utils = __webpack_require__(4915);
500
- // EXTERNAL MODULE: ./src/components/Utils/Style.ts
501
- var Style = __webpack_require__(7540);
502
- // EXTERNAL MODULE: ./src/components/Utils/Statistics.ts
503
- var Statistics = __webpack_require__(5909);
504
- // EXTERNAL MODULE: ./src/components/StatisticsTooltip/index.ts + 1 modules
505
- var StatisticsTooltip = __webpack_require__(4806);
506
- ;// CONCATENATED MODULE: ./src/components/SunBurst/SunBurst.tsx
507
- var __extends = (undefined && undefined.__extends) || (function () {
508
- var extendStatics = function (d, b) {
509
- extendStatics = Object.setPrototypeOf ||
510
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
511
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
512
- return extendStatics(d, b);
513
- };
514
- return function (d, b) {
515
- if (typeof b !== "function" && b !== null)
516
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
517
- extendStatics(d, b);
518
- function __() { this.constructor = d; }
519
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
520
- };
521
- })();
522
- var __assign = (undefined && undefined.__assign) || function () {
523
- __assign = Object.assign || function(t) {
524
- for (var s, i = 1, n = arguments.length; i < n; i++) {
525
- s = arguments[i];
526
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
527
- t[p] = s[p];
528
- }
529
- return t;
530
- };
531
- return __assign.apply(this, arguments);
532
- };
533
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
534
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
535
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
536
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
537
- return c > 3 && r && Object.defineProperty(target, key, r), r;
538
- };
539
- var __metadata = (undefined && undefined.__metadata) || function (k, v) {
540
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
541
- };
542
-
543
-
544
-
545
-
546
-
547
-
548
-
549
-
550
- /**
551
- * ### Overview
552
- *
553
- * The `Sunburst` is best suited to represent data structured as a tree.
554
- * If your data has no depth, maybe the `Piechart` can be of help!
555
- * */
556
- var SunBurst = /** @class */ (function (_super) {
557
- __extends(SunBurst, _super);
558
- function SunBurst() {
559
- var _this = _super !== null && _super.apply(this, arguments) || this;
560
- _this.state = {
561
- data: { id: '', children: [], label: '' },
562
- };
563
- return _this;
564
- }
565
- SunBurst.prototype.componentDidUpdate = function (prevProps) {
566
- if ((0,Utils/* deepEqual */.vZ)(prevProps, this.props)) {
567
- return;
568
- }
569
- this.setupComponent();
570
- };
571
- SunBurst.prototype.componentDidMount = function () {
572
- this.setupComponent();
573
- };
574
- SunBurst.prototype.setupComponent = function () {
575
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
576
- var _l = this.props, colors = _l.colors, maxSlicesNumber = _l.maxSlicesNumber;
577
- if (colors == null) {
578
- throw Error('What are the odds a developer voluntarily chooses to give the colors a null value with a default prop defined? Congrats!');
579
- }
580
- if (maxSlicesNumber && maxSlicesNumber + 1 !== colors.length) {
581
- throw Error('With a maxSliceNumber prop, maxSlicesNumber + 1 must be of the same length as the colors.length prop');
582
- }
583
- var children = (0,Statistics/* createDataWithOtherSlice */.xG)((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : [], (_c = this.props) === null || _c === void 0 ? void 0 : _c.otherId, (_d = this.props) === null || _d === void 0 ? void 0 : _d.otherLabel, (_f = (_e = this.props) === null || _e === void 0 ? void 0 : _e.maxSlicesNumber) !== null && _f !== void 0 ? _f : Infinity, (_g = this.props) === null || _g === void 0 ? void 0 : _g.total);
584
- this.renderTooltip = (0,StatisticsTooltip.getRenderStatisticsTooltip)({
585
- tooltipDataLabelKey: 'value',
586
- tooltipDataValueKey: 'percentage',
587
- tooltipDataTitleKey: 'label',
588
- otherId: this.props.otherId,
589
- withColor: true,
590
- numberToStringFormatter: (_h = this.props.tooltipValueFormat) !== null && _h !== void 0 ? _h : this.props.numberToStringFormatter,
591
- });
592
- this.setState({
593
- data: {
594
- id: (_j = this.props) === null || _j === void 0 ? void 0 : _j.id,
595
- label: (_k = this.props) === null || _k === void 0 ? void 0 : _k.id,
596
- children: children,
597
- },
598
- });
599
- };
600
- SunBurst.prototype.getRenderTooltip = function (props) {
601
- var _a, _b, _c;
602
- var tooltipFunction = (_a = this.props.renderTooltip) !== null && _a !== void 0 ? _a : this.renderTooltip,
603
- // the type of value or initialValue is unknown because it was in the function which creates
604
- // the other node which have unknown, but we know both can only be undefined or number
605
- value = ((_b = props.data) === null || _b === void 0 ? void 0 : _b.value) || ((_c = props.data) === null || _c === void 0 ? void 0 : _c.initialValue) || 0;
606
- return tooltipFunction(__assign(__assign({}, props), { data: __assign(__assign({}, props.data), { value: value }) }));
607
- };
608
- SunBurst.prototype.renderCenteredMetric = function (_a) {
609
- var _b, _c, _d;
610
- var nodes = _a.nodes, centerX = _a.centerX, centerY = _a.centerY;
611
- var total = nodes.reduce(function (totalValue, datum) { return totalValue + datum.value; }, 0);
612
- return (external_react_default().createElement("text", { x: centerX, y: centerY, textAnchor: 'middle', fontSize: '42px', fontWeight: '600', dominantBaseline: 'central', className: 'cursor-default' }, (_d = (_c = (_b = this.props) === null || _b === void 0 ? void 0 : _b.numberToStringFormatter) === null || _c === void 0 ? void 0 : _c.call(_b, total)) !== null && _d !== void 0 ? _d : total));
613
- };
614
- SunBurst.prototype.render = function () {
615
- var _a = this.props, colors = _a.colors, height = _a.height, withNumber = _a.withNumber, className = external_classnames_default()('sunburst-container', this.props.className);
616
- return (external_react_default().createElement("div", { id: this.props.id, style: { height: height, width: height }, ref: this.props.chartRef, className: className },
617
- external_react_default().createElement(sunburst_.ResponsiveSunburst, { tooltip: this.getRenderTooltip, data: this.state.data, margin: { top: 10, right: 10, bottom: 10, left: 10 }, cornerRadius: 0, borderColor: '#ffff', colors: colors, childColor: { from: 'color', modifiers: [['brighter', 0.5]] }, enableArcLabels: false, isInteractive: true, layers: withNumber ? ['arcs', 'arcLabels', this.renderCenteredMetric] : undefined, animate: this.props.animate })));
618
- };
619
- var _a, _b, _c;
620
- SunBurst.displayName = 'SunBurst';
621
- SunBurst.defaultProps = {
622
- colors: [Style/* blue100 */.qi, Style/* purple */.jk, Style/* viola */.Ef, Style/* pink200 */.u$, Style/* pink100 */.sf, Style/* salmon */.kr, Style/* gray400 */.de],
623
- otherId: 'other',
624
- height: '100%',
625
- animate: true,
626
- };
627
- __decorate([
628
- esm/* boundMethod */.MR,
629
- __metadata("design:type", Function),
630
- __metadata("design:paramtypes", [typeof (_a = typeof sunburst_.ComputedDatum !== "undefined" && sunburst_.ComputedDatum) === "function" ? _a : Object]),
631
- __metadata("design:returntype", typeof (_b = typeof JSX !== "undefined" && JSX.Element) === "function" ? _b : Object)
632
- ], SunBurst.prototype, "getRenderTooltip", null);
633
- __decorate([
634
- esm/* boundMethod */.MR,
635
- __metadata("design:type", Function),
636
- __metadata("design:paramtypes", [typeof (_c = typeof sunburst_.SunburstCustomLayerProps !== "undefined" && sunburst_.SunburstCustomLayerProps) === "function" ? _c : Object]),
637
- __metadata("design:returntype", void 0)
638
- ], SunBurst.prototype, "renderCenteredMetric", null);
639
- return SunBurst;
640
- }((external_react_default()).Component));
641
-
642
-
643
- ;// CONCATENATED MODULE: ./src/components/SunBurst/index.ts
644
-
645
-
646
-
647
-
648
- /***/ }),
649
-
650
- /***/ 5909:
651
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
652
-
653
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
654
- /* harmony export */ "xG": () => (/* binding */ createDataWithOtherSlice),
655
- /* harmony export */ "Ow": () => (/* binding */ normalizePercentage)
656
- /* harmony export */ });
657
- /* unused harmony export createCleanTree */
658
- /* harmony import */ var _Utils_Utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4915);
659
- var __values = (undefined && undefined.__values) || function(o) {
660
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
661
- if (m) return m.call(o);
662
- if (o && typeof o.length === "number") return {
663
- next: function () {
664
- if (o && i >= o.length) o = void 0;
665
- return { value: o && o[i++], done: !o };
666
- }
667
- };
668
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
669
- };
670
-
671
-
672
- function createDataWithOtherSlice(data, otherId, otherLabel, maxSlicesNumber, total, dataValueKey) {
673
- var _a, _b;
674
- if (maxSlicesNumber === void 0) { maxSlicesNumber = 0; }
675
- if (dataValueKey === void 0) { dataValueKey = 'value'; }
676
- var otherValue = 0, newOtherId = otherId !== null && otherId !== void 0 ? otherId : 'other',
677
- // We know it is defined but Typescript does not get it.
678
- newmaxSlicesNumber = maxSlicesNumber !== null && maxSlicesNumber !== void 0 ? maxSlicesNumber : 0, newData = [], maxToMinData = data === null || data === void 0 ? void 0 : data.sort((0,_Utils_Utils__WEBPACK_IMPORTED_MODULE_0__/* .sortObjDesc */ .kV)(dataValueKey));
679
- maxToMinData === null || maxToMinData === void 0 ? void 0 : maxToMinData.forEach(function (node, i) {
680
- var _a;
681
- if (i < newmaxSlicesNumber && node.id !== otherId) {
682
- newData.push(createCleanTree(node));
683
- }
684
- else {
685
- var nodeValue = (_a = Number(node === null || node === void 0 ? void 0 : node.value)) !== null && _a !== void 0 ? _a : 0;
686
- otherValue += nodeValue;
687
- }
688
- });
689
- var otherNode = {};
690
- otherNode['id'] = newOtherId;
691
- otherNode['value'] = parseFloat(otherValue.toFixed(2));
692
- otherNode['initialValue'] = parseFloat(otherValue.toFixed(2));
693
- otherNode['label'] = (_a = otherLabel !== null && otherLabel !== void 0 ? otherLabel : newOtherId) !== null && _a !== void 0 ? _a : '';
694
- if (((_b = data === null || data === void 0 ? void 0 : data[0]) === null || _b === void 0 ? void 0 : _b.percentage) != null && total != null) {
695
- otherNode['percentage'] = (otherValue / total) * 100;
696
- }
697
- if (maxSlicesNumber !== Infinity || otherValue !== 0) {
698
- newData.push(otherNode);
699
- }
700
- return newData;
701
- }
702
- function createCleanTree(node) {
703
- if (node.children == null) {
704
- return node;
705
- }
706
- var newNode = (0,_Utils_Utils__WEBPACK_IMPORTED_MODULE_0__/* .clone */ .d9)(node);
707
- removeValueIfChildren(newNode);
708
- return newNode;
709
- }
710
- // eslint-disable-next-line @typescript-eslint/ban-types
711
- function removeValueIfChildren(node) {
712
- var e_1, _a;
713
- var _b;
714
- var children = ((_b = node === null || node === void 0 ? void 0 : node['children']) !== null && _b !== void 0 ? _b : []);
715
- node['initialValue'] = node['value'];
716
- if (children.length > 0) {
717
- delete node['value'];
718
- }
719
- try {
720
- for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {
721
- var child = children_1_1.value;
722
- removeValueIfChildren(child);
723
- }
724
- }
725
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
726
- finally {
727
- try {
728
- if (children_1_1 && !children_1_1.done && (_a = children_1.return)) _a.call(children_1);
729
- }
730
- finally { if (e_1) throw e_1.error; }
731
- }
732
- }
733
- function normalizePercentage(value) {
734
- var _a;
735
- return "".concat(parseInt((_a = value === null || value === void 0 ? void 0 : value.toFixed) === null || _a === void 0 ? void 0 : _a.call(value, 0), 10), "%");
736
- }
737
-
738
-
739
- /***/ }),
740
-
741
- /***/ 7540:
742
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
743
-
744
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
745
- /* harmony export */ "qi": () => (/* binding */ blue100),
746
- /* harmony export */ "de": () => (/* binding */ gray400),
747
- /* harmony export */ "jk": () => (/* binding */ purple),
748
- /* harmony export */ "Ef": () => (/* binding */ viola),
749
- /* harmony export */ "sf": () => (/* binding */ pink100),
750
- /* harmony export */ "u$": () => (/* binding */ pink200),
751
- /* harmony export */ "kr": () => (/* binding */ salmon)
752
- /* harmony export */ });
753
- /* unused harmony exports calculateDomain, generateRangeColor, white, blue25, blue30, blue50, blue80, blue90, blue95, blue300, gray200, blue400, yellow, orange, red, green, gray100, gray300, black */
754
-
755
- function generateRangeColor(len, rangeColors) {
756
- if (rangeColors === void 0) { rangeColors = ['#82CA9D', '#f6ea25', '#F7977A']; }
757
- var generatedColors = [];
758
- if (len === 0) {
759
- return undefined;
760
- }
761
- var colors = scaleLinear(), domain = calculateDomain(rangeColors.length, rangeColors.length), targetDomain = calculateDomain(len, rangeColors.length);
762
- colors = colors.domain(domain).range(rangeColors);
763
- for (var i = 0; i < len; i++) {
764
- generatedColors.push(colors(targetDomain[i]));
765
- }
766
- return generatedColors;
767
- }
768
- function calculateDomain(len, rangeColorsLength) {
769
- var domain = [];
770
- domain.push(0);
771
- for (var i = 0; i < len - 2; i++) {
772
- var num = Number((rangeColorsLength / len) * (i + 1));
773
- domain.push(parseFloat(num.toFixed(2)));
774
- }
775
- domain.push(rangeColorsLength);
776
- return domain;
777
- }
778
- // Keep these in sync with variables.less
779
- var white = '#FFFFFF', blue25 = '#eef2f5', blue30 = '#CBD8E0', blue50 = '#AFD1E0', blue80 = '#8FB7CB', blue90 = '#94C2DA', blue95 = '#6E9DB5', blue100 = '#578EA8', blue300 = 'rgb(32, 88, 113)', // #205871
780
- blue400 = '#11455C', gray100 = '#FAFAFA', gray200 = '#EBEBEB', gray300 = '#B0B0B0', gray400 = '#717171', yellow = '#FFBB00', orange = '#F38522', red = '#F72200', green = '#309B0A', purple = '#63619F', viola = '#965DA3', pink200 = '#C55795', pink100 = '#E85778', salmon = '#F86752', black = '#222222';
781
-
782
-
783
-
784
- /***/ }),
785
-
786
- /***/ 4915:
787
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
788
-
789
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
790
- /* harmony export */ "kV": () => (/* binding */ sortObjDesc),
791
- /* harmony export */ "d9": () => (/* binding */ clone),
792
- /* harmony export */ "vZ": () => (/* binding */ deepEqual)
793
- /* harmony export */ });
794
- /* unused harmony exports findChildrenByComponent, findChildByComponent, hasChildIconOrCheckboxComponent, scrollToTop, zip, getDebouncer, rgbToHex */
795
- /* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5692);
796
- /* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_0__);
797
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8156);
798
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
799
- /* harmony import */ var _Form_Form__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8352);
800
- var __read = (undefined && undefined.__read) || function (o, n) {
801
- var m = typeof Symbol === "function" && o[Symbol.iterator];
802
- if (!m) return o;
803
- var i = m.call(o), r, ar = [], e;
804
- try {
805
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
806
- }
807
- catch (error) { e = { error: error }; }
808
- finally {
809
- try {
810
- if (r && !r.done && (m = i["return"])) m.call(i);
811
- }
812
- finally { if (e) throw e.error; }
813
- }
814
- return ar;
815
- };
816
-
817
-
818
-
819
- function findChildrenByComponent(children,
820
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
821
- component) {
822
- var ret = [];
823
- React.Children.forEach(children, function (element) {
824
- if ((element === null || element === void 0 ? void 0 : element.type) === component) {
825
- ret.push(element);
826
- }
827
- });
828
- return ret;
829
- }
830
- function findChildByComponent(children,
831
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
832
- component) {
833
- var _a, _b;
834
- return (_b = (_a = findChildrenByComponent(children, component)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;
835
- }
836
- function hasChildIconOrCheckboxComponent(children) {
837
- var ret = false;
838
- React.Children.forEach(children, function (element) {
839
- if ((element === null || element === void 0 ? void 0 : element.type) != null &&
840
- ((element === null || element === void 0 ? void 0 : element.type) === FontAwesomeIcon || (element === null || element === void 0 ? void 0 : element.type) === 'i' || (element === null || element === void 0 ? void 0 : element.type) === Form.Checkbox)) {
841
- ret = true;
842
- return;
843
- }
844
- });
845
- return ret;
846
- }
847
- function scrollToTop() {
848
- window.scrollTo(0, 0);
849
- }
850
- function zip(arr1, arr2) {
851
- var ret = [];
852
- var i = 0;
853
- while (arr1[i]) {
854
- ret.push(arr1[i]);
855
- ret.push(arr2[i++]);
856
- }
857
- return ret;
858
- }
859
- // eslint-disable-next-line @typescript-eslint/ban-types
860
- function sortObjDesc(accessor) {
861
- return function (a, b) {
862
- var leftVal = 0, rightVal = 0;
863
- if ((a === null || a === void 0 ? void 0 : a[accessor]) != null) {
864
- leftVal = a === null || a === void 0 ? void 0 : a[accessor];
865
- }
866
- if ((b === null || b === void 0 ? void 0 : b[accessor]) != null) {
867
- rightVal = b === null || b === void 0 ? void 0 : b[accessor];
868
- }
869
- return leftVal > rightVal ? -1 : 1;
870
- };
871
- }
872
- function clone(ob) {
873
- return JSON.parse(JSON.stringify(ob));
874
- }
875
- function getDebouncer(delay) {
876
- if (delay === void 0) { delay = 1; }
877
- var debounceTimeout = null;
878
- return function debounce(f) {
879
- if (debounceTimeout !== null) {
880
- clearTimeout(debounceTimeout);
881
- }
882
- debounceTimeout = window.setTimeout(f, delay);
883
- };
884
- }
885
- function isObject(obj) {
886
- return typeof obj === 'object' && obj != null;
887
- }
888
- function deepEqual(obj1, obj2) {
889
- if (obj1 === obj2) {
890
- return true;
891
- }
892
- if (isObject(obj1) && isObject(obj2)) {
893
- if (Object.keys(obj1).length !== Object.keys(obj2).length) {
894
- return false;
895
- }
896
- for (var prop in obj1) {
897
- if (!deepEqual(obj1[prop], obj2[prop])) {
898
- return false;
899
- }
900
- }
901
- return true;
902
- }
903
- return false;
904
- }
905
- function componentToHex(c) {
906
- if (isNaN(c)) {
907
- throw Error('The color has not been written correctly');
908
- }
909
- var hex = c.toString(16).toUpperCase();
910
- return hex.length === 1 ? '0' + hex : hex;
911
- }
912
- function cleanSingleColor(c) {
913
- return c.replace(/"|'/g, '').trim();
914
- }
915
- function rgbToHex(rgb) {
916
- if (rgb.includes('rgba')) {
917
- throw Error('not implemented');
918
- }
919
- var _a = __read(rgb
920
- .replace('rgb', '')
921
- .replace(/\(|\)/gi, '')
922
- .split(',')
923
- .map(function (c) { return parseInt(cleanSingleColor(c), 10); }), 3), _b = _a[0], r = _b === void 0 ? 0 : _b, _c = _a[1], g = _c === void 0 ? 0 : _c, _d = _a[2], b = _d === void 0 ? 0 : _d;
924
- return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
925
- }
926
-
927
-
928
- /***/ }),
929
-
930
- /***/ 5692:
931
- /***/ ((module) => {
932
-
933
- module.exports = __WEBPACK_EXTERNAL_MODULE__5692__;
934
-
935
- /***/ }),
936
-
937
- /***/ 9503:
938
- /***/ ((module) => {
939
-
940
- module.exports = __WEBPACK_EXTERNAL_MODULE__9503__;
941
-
942
- /***/ }),
943
-
944
- /***/ 8310:
945
- /***/ ((module) => {
946
-
947
- module.exports = __WEBPACK_EXTERNAL_MODULE__8310__;
948
-
949
- /***/ }),
950
-
951
- /***/ 8156:
952
- /***/ ((module) => {
953
-
954
- module.exports = __WEBPACK_EXTERNAL_MODULE__8156__;
955
-
956
- /***/ }),
957
-
958
- /***/ 8721:
959
- /***/ ((module) => {
960
-
961
- module.exports = __WEBPACK_EXTERNAL_MODULE__8721__;
962
-
963
- /***/ }),
964
-
965
- /***/ 1082:
966
- /***/ ((module) => {
967
-
968
- module.exports = __WEBPACK_EXTERNAL_MODULE__1082__;
969
-
970
- /***/ }),
971
-
972
- /***/ 8763:
973
- /***/ ((module) => {
974
-
975
- module.exports = __WEBPACK_EXTERNAL_MODULE__8763__;
976
-
977
- /***/ }),
978
-
979
- /***/ 4329:
980
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
981
-
982
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
983
- /* harmony export */ "Z": () => (/* binding */ _typeof)
984
- /* harmony export */ });
985
- function _typeof(obj) {
986
- "@babel/helpers - typeof";
987
-
988
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
989
- return typeof obj;
990
- } : function (obj) {
991
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
992
- }, _typeof(obj);
993
- }
994
-
995
- /***/ })
996
-
997
- /******/ });
998
- /************************************************************************/
999
- /******/ // The module cache
1000
- /******/ var __webpack_module_cache__ = {};
1001
- /******/
1002
- /******/ // The require function
1003
- /******/ function __webpack_require__(moduleId) {
1004
- /******/ // Check if module is in cache
1005
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
1006
- /******/ if (cachedModule !== undefined) {
1007
- /******/ return cachedModule.exports;
1008
- /******/ }
1009
- /******/ // Create a new module (and put it into the cache)
1010
- /******/ var module = __webpack_module_cache__[moduleId] = {
1011
- /******/ // no module.id needed
1012
- /******/ // no module.loaded needed
1013
- /******/ exports: {}
1014
- /******/ };
1015
- /******/
1016
- /******/ // Execute the module function
1017
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1018
- /******/
1019
- /******/ // Return the exports of the module
1020
- /******/ return module.exports;
1021
- /******/ }
1022
- /******/
1023
- /******/ // expose the modules object (__webpack_modules__)
1024
- /******/ __webpack_require__.m = __webpack_modules__;
1025
- /******/
1026
- /************************************************************************/
1027
- /******/ /* webpack/runtime/chunk loaded */
1028
- /******/ (() => {
1029
- /******/ var deferred = [];
1030
- /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
1031
- /******/ if(chunkIds) {
1032
- /******/ priority = priority || 0;
1033
- /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
1034
- /******/ deferred[i] = [chunkIds, fn, priority];
1035
- /******/ return;
1036
- /******/ }
1037
- /******/ var notFulfilled = Infinity;
1038
- /******/ for (var i = 0; i < deferred.length; i++) {
1039
- /******/ var [chunkIds, fn, priority] = deferred[i];
1040
- /******/ var fulfilled = true;
1041
- /******/ for (var j = 0; j < chunkIds.length; j++) {
1042
- /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
1043
- /******/ chunkIds.splice(j--, 1);
1044
- /******/ } else {
1045
- /******/ fulfilled = false;
1046
- /******/ if(priority < notFulfilled) notFulfilled = priority;
1047
- /******/ }
1048
- /******/ }
1049
- /******/ if(fulfilled) {
1050
- /******/ deferred.splice(i--, 1)
1051
- /******/ var r = fn();
1052
- /******/ if (r !== undefined) result = r;
1053
- /******/ }
1054
- /******/ }
1055
- /******/ return result;
1056
- /******/ };
1057
- /******/ })();
1058
- /******/
1059
- /******/ /* webpack/runtime/compat get default export */
1060
- /******/ (() => {
1061
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1062
- /******/ __webpack_require__.n = (module) => {
1063
- /******/ var getter = module && module.__esModule ?
1064
- /******/ () => (module['default']) :
1065
- /******/ () => (module);
1066
- /******/ __webpack_require__.d(getter, { a: getter });
1067
- /******/ return getter;
1068
- /******/ };
1069
- /******/ })();
1070
- /******/
1071
- /******/ /* webpack/runtime/define property getters */
1072
- /******/ (() => {
1073
- /******/ // define getter functions for harmony exports
1074
- /******/ __webpack_require__.d = (exports, definition) => {
1075
- /******/ for(var key in definition) {
1076
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1077
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1078
- /******/ }
1079
- /******/ }
1080
- /******/ };
1081
- /******/ })();
1082
- /******/
1083
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1084
- /******/ (() => {
1085
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1086
- /******/ })();
1087
- /******/
1088
- /******/ /* webpack/runtime/make namespace object */
1089
- /******/ (() => {
1090
- /******/ // define __esModule on exports
1091
- /******/ __webpack_require__.r = (exports) => {
1092
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1093
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1094
- /******/ }
1095
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1096
- /******/ };
1097
- /******/ })();
1098
- /******/
1099
- /******/ /* webpack/runtime/jsonp chunk loading */
1100
- /******/ (() => {
1101
- /******/ // no baseURI
1102
- /******/
1103
- /******/ // object to store loaded and loading chunks
1104
- /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
1105
- /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
1106
- /******/ var installedChunks = {
1107
- /******/ 6074: 0,
1108
- /******/ 9811: 0,
1109
- /******/ 5785: 0
1110
- /******/ };
1111
- /******/
1112
- /******/ // no chunk on demand loading
1113
- /******/
1114
- /******/ // no prefetching
1115
- /******/
1116
- /******/ // no preloaded
1117
- /******/
1118
- /******/ // no HMR
1119
- /******/
1120
- /******/ // no HMR manifest
1121
- /******/
1122
- /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
1123
- /******/
1124
- /******/ // install a JSONP callback for chunk loading
1125
- /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
1126
- /******/ var [chunkIds, moreModules, runtime] = data;
1127
- /******/ // add "moreModules" to the modules object,
1128
- /******/ // then flag all "chunkIds" as loaded and fire callback
1129
- /******/ var moduleId, chunkId, i = 0;
1130
- /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
1131
- /******/ for(moduleId in moreModules) {
1132
- /******/ if(__webpack_require__.o(moreModules, moduleId)) {
1133
- /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
1134
- /******/ }
1135
- /******/ }
1136
- /******/ if(runtime) var result = runtime(__webpack_require__);
1137
- /******/ }
1138
- /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
1139
- /******/ for(;i < chunkIds.length; i++) {
1140
- /******/ chunkId = chunkIds[i];
1141
- /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
1142
- /******/ installedChunks[chunkId][0]();
1143
- /******/ }
1144
- /******/ installedChunks[chunkIds[i]] = 0;
1145
- /******/ }
1146
- /******/ return __webpack_require__.O(result);
1147
- /******/ }
1148
- /******/
1149
- /******/ var chunkLoadingGlobal = self["webpackChunkatoka_design_system"] = self["webpackChunkatoka_design_system"] || [];
1150
- /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
1151
- /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
1152
- /******/ })();
1153
- /******/
1154
- /************************************************************************/
1155
- /******/
1156
- /******/ // startup
1157
- /******/ // Load entry module and return exports
1158
- /******/ // This entry module depends on other loaded chunks and execution need to be delayed
1159
- /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [5785], () => (__webpack_require__(3292)))
1160
- /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
1161
- /******/
1162
- /******/ return __webpack_exports__;
1163
- /******/ })()
1164
- ;
1165
- });
1166
- //# sourceMappingURL=index.js.map
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("@nivo/sunburst"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","@nivo/sunburst","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("@nivo/sunburst"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e["@nivo/sunburst"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,o,r,n,a,l){return(()=>{"use strict";var i,u={6627:(e,t,o)=>{o.d(t,{MR:()=>a});var r=o(4329);function n(e){return n="function"==typeof Symbol&&"symbol"===(0,r.Z)(Symbol.iterator)?function(e){return(0,r.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,r.Z)(e)},n(e)}function a(e,t,o){var r=o.value;if("function"!=typeof r)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(r)));var a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof r)return r;var o=r.bind(this);return a=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return o},set:function(e){r=e,delete this[t]}}),a=!1,o},set:function(e){r=e}}}},8352:(e,t,o)=>{var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(8721),u=o.n(i),s=n().memo((function(e){var t=l()(null==e?void 0:e.className,"atoka-form-label");return n().createElement(u().Label,{className:t},e.children)}));s.displayName="FormLabel";var c=o(2048),p=function(){return p=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},p.apply(this,arguments)},d=function(e){var t,o=l()("atoka-form-checkbox",null==e?void 0:e.className);return n().createElement(u().Check,p({type:"checkbox"},e,{custom:!0,className:o,label:null!==(t=e.label)&&void 0!==t?t:""}))};d.displayName="FormCheckbox";var f=function(){return f=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},f.apply(this,arguments)},m=function(e){var t,o=l()(null==e?void 0:e.className,"atoka-form-radio");return n().createElement(u().Check,f({type:"radio"},e,{custom:!0,className:o,label:null!==(t=e.label)&&void 0!==t?t:""}))};m.displayName="FormRadio";var v=o(8763),y=o.n(v),b=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},h=n().memo((function(e){var t=e.children,o=b(e,["children"]),r=l()("d-block",null==o?void 0:o.className);return n().createElement(y(),{bsPrefix:"atoka-form-help",className:r},t)}));h.displayName="FormHelp";var g=function(){return g=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},g.apply(this,arguments)},O=function(e){var t=l()(null==e?void 0:e.className,"atoka-form");return n().createElement(u(),g({},e,{className:t}),e.children)};O.displayName="Form",O.Control=c.N,O.Label=s,O.Checkbox=d,O.Radio=m,O.File=u().File,O.Switch=u().Switch,O.Help=h,O.Group=u().Group},2048:(e,t,o)=>{o.d(t,{N:()=>f});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(1082),u=o.n(i),s=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},c=n().memo((function(e){var t=e.show,o=void 0===t||t,r=s(e,["show"]),a=l()(null==r?void 0:r.className,"atoka-form-control-feedback",{"d-block":o});return n().createElement(u().Feedback,{type:r.type,className:a},r.children)}));c.displayName=" FormControlFeedBack";var p=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},d=n().forwardRef((function(e,t){var o=e.size,r=void 0===o?"md":o,a=p(e,["size"]),i=l()("atoka-form-control",null==a?void 0:a.className,{"atoka-shadow":a.withShadow,disabled:a.disabled});return n().createElement(u(),{as:a.as,rows:a.rows,cols:a.cols,placeholder:a.placeholder,className:i,disabled:a.disabled,readOnly:a.readOnly,value:a.value,onChange:a.onChange,onKeyPress:a.onKeyPress,onKeyDown:a.onKeyDown,defaultValue:a.defaultValue,size:"md"===r?void 0:r,type:a.type,id:a.id,isValid:a.isValid,isInvalid:a.isInvalid,ref:t,autoComplete:"off"},a.children)}));d.displayName="FormControlComponent";var f=d;f.FeedBack=c,f.displayName="FormControl"},8007:(e,t,o)=>{o.d(t,{q:()=>i});var r=o(8156),n=o.n(r),a=o(4806),l=function(){return l=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},l.apply(this,arguments)};function i(e){var t=e.tooltipDataLabelKey,o=e.tooltipDataValueKey,r=e.tooltipDataTitleKey,i=e.otherId,u=e.otherLabel,s=e.numberToStringFormatter,c=e.withColor,p=e.className,d=void 0===p?"tooltip-background":p;return function(e){var p,f,m,v,y=l(l({},e.data),{value:null===(p=e.data)||void 0===p?void 0:p.value,label:null===(f=e.data)||void 0===f?void 0:f.label,id:null===(m=e.data)||void 0===m?void 0:m.id,percentage:null===(v=e.data)||void 0===v?void 0:v.percentage});return n().createElement(a.StatisticsTooltip,{otherId:i,otherLabel:u,numberToStringFormatter:s,data:y,tooltipDataLabelKey:t,tooltipDataTitleKey:r,tooltipDataValueKey:o,className:null!=d?d:"",color:c?e.color:void 0})}}},4806:(e,t,o)=>{o.d(t,{StatisticsTooltip:()=>u,getRenderStatisticsTooltip:()=>s.q});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(5909),u=n().memo((function(e){function t(){var t=e.tooltipDataLabelKey,o=e.numberToStringFormatter,n=r(t,e.data);if(null!=n)return null==o?String(n):"string"==typeof n?n:o(n)}function o(){var t=r(e.tooltipDataValueKey,e.data);if(null!=t)return"number"==typeof t?(0,i.Ow)(t):t}function r(e,t){return null==e||null==t?void 0:t[e]}var a,u,s,c,p,d,f=l()("statistics-tooltip",null==e?void 0:e.className),m=null==e.color?null:n().createElement("span",{className:"tooltip-rectangle",style:{background:e.color}});return n().createElement("div",{className:f},n().createElement("div",{className:"d-flex align-items-center"},m,n().createElement("span",{className:"text-left"},(u=e.tooltipDataTitleKey,s=e.data,c=e.otherId,p=e.otherLabel,(d=r(u,s))===c?null!=p?p:c:d?String(d):void 0))),0===(a=[{value:t(),key:e.tooltipDataLabelKey,className:"label"},{value:o(),key:e.tooltipDataValueKey,className:"value"}].filter((function(e){return null!=e.value})).map((function(e){return n().createElement("span",{key:e.key,className:e.className},e.value)}))).length?null:n().createElement("div",{className:"d-flex justify-content-between"},a),e.children)}));u.displayName="StatisticsTooltip";var s=o(8007)},3292:(e,t,o)=>{o.r(t),o.d(t,{ComputedDatum:()=>u.ComputedDatum,SunBurst:()=>g,SunBurstItemData:()=>r.SunBurstItemData,SunBurstProps:()=>r.SunBurstProps});var r={};o.r(r),o.d(r,{X:()=>g});var n,a=o(8156),l=o.n(a),i=o(6627),u=o(9503),s=o(8310),c=o.n(s),p=o(4915),d=o(7540),f=o(5909),m=o(4806),v=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),y=function(){return y=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},y.apply(this,arguments)},b=function(e,t,o,r){var n,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(l=(a<3?n(l):a>3?n(t,o,l):n(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l},h=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={data:{id:"",children:[],label:""}},t}var o,r,n;return v(t,e),t.prototype.componentDidUpdate=function(e){(0,p.vZ)(e,this.props)||this.setupComponent()},t.prototype.componentDidMount=function(){this.setupComponent()},t.prototype.setupComponent=function(){var e,t,o,r,n,a,l,i,u,s,c=this.props,p=c.colors,d=c.maxSlicesNumber;if(null==p)throw Error("What are the odds a developer voluntarily chooses to give the colors a null value with a default prop defined? Congrats!");if(d&&d+1!==p.length)throw Error("With a maxSliceNumber prop, maxSlicesNumber + 1 must be of the same length as the colors.length prop");var v=(0,f.xG)(null!==(t=null===(e=this.props)||void 0===e?void 0:e.data)&&void 0!==t?t:[],null===(o=this.props)||void 0===o?void 0:o.otherId,null===(r=this.props)||void 0===r?void 0:r.otherLabel,null!==(a=null===(n=this.props)||void 0===n?void 0:n.maxSlicesNumber)&&void 0!==a?a:1/0,null===(l=this.props)||void 0===l?void 0:l.total);this.renderTooltip=(0,m.getRenderStatisticsTooltip)({tooltipDataLabelKey:"value",tooltipDataValueKey:"percentage",tooltipDataTitleKey:"label",otherId:this.props.otherId,withColor:!0,numberToStringFormatter:null!==(i=this.props.tooltipValueFormat)&&void 0!==i?i:this.props.numberToStringFormatter}),this.setState({data:{id:null===(u=this.props)||void 0===u?void 0:u.id,label:null===(s=this.props)||void 0===s?void 0:s.id,children:v}})},t.prototype.getRenderTooltip=function(e){var t,o,r,n=null!==(t=this.props.renderTooltip)&&void 0!==t?t:this.renderTooltip,a=(null===(o=e.data)||void 0===o?void 0:o.value)||(null===(r=e.data)||void 0===r?void 0:r.initialValue)||0;return n(y(y({},e),{data:y(y({},e.data),{value:a})}))},t.prototype.renderCenteredMetric=function(e){var t,o,r,n=e.nodes,a=e.centerX,i=e.centerY,u=n.reduce((function(e,t){return e+t.value}),0);return l().createElement("text",{x:a,y:i,textAnchor:"middle",fontSize:"42px",fontWeight:"600",dominantBaseline:"central",className:"cursor-default"},null!==(r=null===(o=null===(t=this.props)||void 0===t?void 0:t.numberToStringFormatter)||void 0===o?void 0:o.call(t,u))&&void 0!==r?r:u)},t.prototype.render=function(){var e=this.props,t=e.colors,o=e.height,r=e.withNumber,n=c()("sunburst-container",this.props.className);return l().createElement("div",{id:this.props.id,style:{height:o,width:o},ref:this.props.chartRef,className:n},l().createElement(u.ResponsiveSunburst,{tooltip:this.getRenderTooltip,data:this.state.data,margin:{top:10,right:10,bottom:10,left:10},cornerRadius:0,borderColor:"#ffff",colors:t,childColor:{from:"color",modifiers:[["brighter",.5]]},enableArcLabels:!1,isInteractive:!0,layers:r?["arcs","arcLabels",this.renderCenteredMetric]:void 0,animate:this.props.animate}))},t.displayName="SunBurst",t.defaultProps={colors:[d.qi,d.jk,d.Ef,d.u$,d.sf,d.kr,d.de],otherId:"other",height:"100%",animate:!0},b([i.MR,h("design:type",Function),h("design:paramtypes",["function"==typeof(o=void 0!==u.ComputedDatum&&u.ComputedDatum)?o:Object]),h("design:returntype","function"==typeof(r="undefined"!=typeof JSX&&JSX.Element)?r:Object)],t.prototype,"getRenderTooltip",null),b([i.MR,h("design:type",Function),h("design:paramtypes",["function"==typeof(n=void 0!==u.SunburstCustomLayerProps&&u.SunburstCustomLayerProps)?n:Object]),h("design:returntype",void 0)],t.prototype,"renderCenteredMetric",null),t}(l().Component)},5909:(e,t,o)=>{o.d(t,{xG:()=>a,Ow:()=>i});var r=o(4915),n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function a(e,t,o,n,a,i){var u,s;void 0===n&&(n=0),void 0===i&&(i="value");var c=0,p=null!=t?t:"other",d=null!=n?n:0,f=[],m=null==e?void 0:e.sort((0,r.kV)(i));null==m||m.forEach((function(e,o){var n;if(o<d&&e.id!==t)f.push(function(e){if(null==e.children)return e;var t=(0,r.d9)(e);return l(t),t}(e));else{var a=null!==(n=Number(null==e?void 0:e.value))&&void 0!==n?n:0;c+=a}}));var v={};return v.id=p,v.value=parseFloat(c.toFixed(2)),v.initialValue=parseFloat(c.toFixed(2)),v.label=null!==(u=null!=o?o:p)&&void 0!==u?u:"",null!=(null===(s=null==e?void 0:e[0])||void 0===s?void 0:s.percentage)&&null!=a&&(v.percentage=c/a*100),n===1/0&&0===c||f.push(v),f}function l(e){var t,o,r,a=null!==(r=null==e?void 0:e.children)&&void 0!==r?r:[];e.initialValue=e.value,a.length>0&&delete e.value;try{for(var i=n(a),u=i.next();!u.done;u=i.next()){l(u.value)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}}function i(e){var t;return"".concat(parseInt(null===(t=null==e?void 0:e.toFixed)||void 0===t?void 0:t.call(e,0),10),"%")}},7540:(e,t,o)=>{o.d(t,{qi:()=>r,de:()=>n,jk:()=>a,Ef:()=>l,sf:()=>u,u$:()=>i,kr:()=>s});var r="#578EA8",n="#717171",a="#63619F",l="#965DA3",i="#C55795",u="#E85778",s="#F86752"},4915:(e,t,o)=>{o.d(t,{kV:()=>r,d9:()=>n,vZ:()=>l});o(5692),o(8156),o(8352);function r(e){return function(t,o){var r=0,n=0;return null!=(null==t?void 0:t[e])&&(r=null==t?void 0:t[e]),null!=(null==o?void 0:o[e])&&(n=null==o?void 0:o[e]),r>n?-1:1}}function n(e){return JSON.parse(JSON.stringify(e))}function a(e){return"object"==typeof e&&null!=e}function l(e,t){if(e===t)return!0;if(a(e)&&a(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!l(e[o],t[o]))return!1;return!0}return!1}},5692:t=>{t.exports=e},9503:e=>{e.exports=t},8310:e=>{e.exports=o},8156:e=>{e.exports=r},8721:e=>{e.exports=n},1082:e=>{e.exports=a},8763:e=>{e.exports=l},4329:(e,t,o)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}o.d(t,{Z:()=>r})}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={exports:{}};return u[e](o,o.exports,c),o.exports}c.m=u,i=[],c.O=(e,t,o,r)=>{if(!t){var n=1/0;for(s=0;s<i.length;s++){for(var[t,o,r]=i[s],a=!0,l=0;l<t.length;l++)(!1&r||n>=r)&&Object.keys(c.O).every((e=>c.O[e](t[l])))?t.splice(l--,1):(a=!1,r<n&&(n=r));if(a){i.splice(s--,1);var u=o();void 0!==u&&(e=u)}}return e}r=r||0;for(var s=i.length;s>0&&i[s-1][2]>r;s--)i[s]=i[s-1];i[s]=[t,o,r]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6074:0,9811:0,8699:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[a,l,i]=o,u=0;if(a.some((t=>0!==e[t]))){for(r in l)c.o(l,r)&&(c.m[r]=l[r]);if(i)var s=i(c)}for(t&&t(o);u<a.length;u++)n=a[u],c.o(e,n)&&e[n]&&e[n][0](),e[a[u]]=0;return c.O(s)},o=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var p=c.O(void 0,[8699],(()=>c(3292)));return p=c.O(p)})()}));