@deviceinsight/ng-ui-basic-components 3.16.0 → 4.0.0-alpha.2

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 (274) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.js +725 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/style.css +1 -0
  6. package/{lib/esm → dist/types}/components/accordion/Accordion.d.ts +3 -3
  7. package/dist/types/components/accordion/Accordion.d.ts.map +1 -0
  8. package/{lib/cjs → dist/types}/components/accordionComponents/AccordionItem.d.ts +3 -3
  9. package/dist/types/components/accordionComponents/AccordionItem.d.ts.map +1 -0
  10. package/{lib/esm → dist/types}/components/bubble/Bubble.d.ts +4 -16
  11. package/dist/types/components/bubble/Bubble.d.ts.map +1 -0
  12. package/dist/types/components/bubble/Bubble.stories.d.ts +17 -0
  13. package/dist/types/components/bubble/Bubble.stories.d.ts.map +1 -0
  14. package/{lib/cjs → dist/types}/components/button/Button.d.ts +3 -3
  15. package/dist/types/components/button/Button.d.ts.map +1 -0
  16. package/{lib/cjs → dist/types}/components/button/ButtonRow.d.ts +2 -2
  17. package/dist/types/components/button/ButtonRow.d.ts.map +1 -0
  18. package/{lib/esm → dist/types}/components/confirm/Confirm.d.ts +2 -2
  19. package/dist/types/components/confirm/Confirm.d.ts.map +1 -0
  20. package/{lib/esm → dist/types}/components/confirm/ConfirmProvider.d.ts +2 -2
  21. package/{lib/cjs → dist/types}/components/confirm/ConfirmProvider.d.ts.map +1 -1
  22. package/dist/types/components/confirm/useConfirm.d.ts +8 -0
  23. package/{lib/cjs → dist/types}/components/confirm/useConfirm.d.ts.map +1 -1
  24. package/{lib/cjs → dist/types}/components/confirm/withConfirm.d.ts +2 -2
  25. package/dist/types/components/confirm/withConfirm.d.ts.map +1 -0
  26. package/{lib/esm → dist/types}/components/icon/Icon.d.ts +3 -3
  27. package/dist/types/components/icon/Icon.d.ts.map +1 -0
  28. package/{lib/cjs → dist/types}/components/input/Checkbox.d.ts +1 -1
  29. package/dist/types/components/input/Checkbox.d.ts.map +1 -0
  30. package/{lib/esm → dist/types}/components/input/SearchBox.d.ts +3 -4
  31. package/dist/types/components/input/SearchBox.d.ts.map +1 -0
  32. package/{lib/esm → dist/types}/components/label/Label.d.ts +1 -1
  33. package/{lib/cjs → dist/types}/components/label/Label.d.ts.map +1 -1
  34. package/{lib/esm → dist/types}/components/modal/Modal.d.ts +1 -2
  35. package/dist/types/components/modal/Modal.d.ts.map +1 -0
  36. package/dist/types/components/modal/Modal.stories.d.ts +18 -0
  37. package/dist/types/components/modal/Modal.stories.d.ts.map +1 -0
  38. package/dist/types/components/modalComponents/ModalContainer.d.ts +6 -0
  39. package/{lib/cjs → dist/types}/components/modalComponents/ModalContainer.d.ts.map +1 -1
  40. package/dist/types/components/modalComponents/ModalWindow.d.ts +4 -0
  41. package/dist/types/components/modalComponents/ModalWindow.d.ts.map +1 -0
  42. package/dist/types/components/popup/Popup.d.ts +30 -0
  43. package/dist/types/components/popup/Popup.d.ts.map +1 -0
  44. package/dist/types/components/popup/Popup.stories.d.ts +27 -0
  45. package/dist/types/components/popup/Popup.stories.d.ts.map +1 -0
  46. package/{lib/esm → dist/types}/components/spinner/Spinner.d.ts +2 -2
  47. package/dist/types/components/spinner/Spinner.d.ts.map +1 -0
  48. package/{lib/cjs → dist/types}/components/spinner/SpinnerContainer.d.ts +2 -2
  49. package/dist/types/components/spinner/SpinnerContainer.d.ts.map +1 -0
  50. package/{lib/esm → dist/types}/components/tabs/Tabs.d.ts +4 -4
  51. package/dist/types/components/tabs/Tabs.d.ts.map +1 -0
  52. package/{lib/esm → dist/types}/components/tooltip/Tooltip.d.ts +4 -13
  53. package/dist/types/components/tooltip/Tooltip.d.ts.map +1 -0
  54. package/dist/types/components/tooltip/Tooltip.stories.d.ts +16 -0
  55. package/dist/types/components/tooltip/Tooltip.stories.d.ts.map +1 -0
  56. package/dist/types/hooks/useOutsideClick.d.ts.map +1 -0
  57. package/{lib/cjs → dist/types}/index.d.ts +1 -0
  58. package/{lib/cjs → dist/types}/index.d.ts.map +1 -1
  59. package/dist/types/types/i18n.d.ts +5 -0
  60. package/dist/types/types/i18n.d.ts.map +1 -0
  61. package/package.json +55 -48
  62. package/lib/cjs/__mocks__/react-i18next.d.ts +0 -2
  63. package/lib/cjs/__mocks__/react-i18next.d.ts.map +0 -1
  64. package/lib/cjs/__mocks__/react-i18next.js +0 -18
  65. package/lib/cjs/assets/img/icon-arrow-back.png +0 -0
  66. package/lib/cjs/assets/img/icon_folder_closed.png +0 -0
  67. package/lib/cjs/assets/img/icon_folder_closed_light.png +0 -0
  68. package/lib/cjs/assets/img/icon_folder_open.png +0 -0
  69. package/lib/cjs/assets/img/icon_folder_open_light.png +0 -0
  70. package/lib/cjs/assets/img/icon_help_light_24.png +0 -0
  71. package/lib/cjs/assets/img/icon_variablenode.png +0 -0
  72. package/lib/cjs/assets/img/icon_variablenode_light.png +0 -0
  73. package/lib/cjs/assets/img/toastify_msg_error_24.png +0 -0
  74. package/lib/cjs/assets/img/toastify_msg_success_24.png +0 -0
  75. package/lib/cjs/assets/search-box.css +0 -29
  76. package/lib/cjs/assets/style.css +0 -219
  77. package/lib/cjs/assets/svg/icon_add.svg +0 -3
  78. package/lib/cjs/assets/svg/icon_calendar.svg +0 -50
  79. package/lib/cjs/assets/svg/icon_chevron_left.svg +0 -6
  80. package/lib/cjs/assets/svg/icon_chevron_right.svg +0 -6
  81. package/lib/cjs/assets/svg/icon_cross.svg +0 -3
  82. package/lib/cjs/assets/svg/icon_download.svg +0 -5
  83. package/lib/cjs/assets/svg/icon_duplicate.svg +0 -10
  84. package/lib/cjs/assets/svg/icon_edit.svg +0 -6
  85. package/lib/cjs/assets/svg/icon_folder_loading.svg +0 -21
  86. package/lib/cjs/assets/svg/icon_fullscreen.svg +0 -6
  87. package/lib/cjs/assets/svg/icon_gear.svg +0 -5
  88. package/lib/cjs/assets/svg/icon_help_light.svg +0 -3
  89. package/lib/cjs/assets/svg/icon_key.svg +0 -3
  90. package/lib/cjs/assets/svg/icon_lupe.svg +0 -14
  91. package/lib/cjs/assets/svg/icon_menu_horizontal.svg +0 -5
  92. package/lib/cjs/assets/svg/icon_menu_vertical.svg +0 -5
  93. package/lib/cjs/assets/svg/icon_reload.svg +0 -6
  94. package/lib/cjs/assets/svg/icon_star.svg +0 -4
  95. package/lib/cjs/assets/svg/icon_upload.svg +0 -7
  96. package/lib/cjs/assets/svg/icon_warning_triangle.svg +0 -12
  97. package/lib/cjs/assets/svg/triangle_down.svg +0 -3
  98. package/lib/cjs/assets/svg/triangle_left.svg +0 -3
  99. package/lib/cjs/assets/svg/triangle_right.svg +0 -3
  100. package/lib/cjs/assets/svg/triangle_up.svg +0 -3
  101. package/lib/cjs/assets/svg/triangle_up_and_down.svg +0 -4
  102. package/lib/cjs/components/accordion/Accordion.d.ts +0 -25
  103. package/lib/cjs/components/accordion/Accordion.d.ts.map +0 -1
  104. package/lib/cjs/components/accordion/Accordion.js +0 -60
  105. package/lib/cjs/components/accordionComponents/AccordionItem.d.ts.map +0 -1
  106. package/lib/cjs/components/accordionComponents/AccordionItem.js +0 -50
  107. package/lib/cjs/components/bubble/Bubble.d.ts +0 -35
  108. package/lib/cjs/components/bubble/Bubble.d.ts.map +0 -1
  109. package/lib/cjs/components/bubble/Bubble.js +0 -42
  110. package/lib/cjs/components/button/Button.d.ts.map +0 -1
  111. package/lib/cjs/components/button/Button.js +0 -22
  112. package/lib/cjs/components/button/ButtonRow.d.ts.map +0 -1
  113. package/lib/cjs/components/button/ButtonRow.js +0 -35
  114. package/lib/cjs/components/confirm/Confirm.d.ts +0 -19
  115. package/lib/cjs/components/confirm/Confirm.d.ts.map +0 -1
  116. package/lib/cjs/components/confirm/Confirm.js +0 -49
  117. package/lib/cjs/components/confirm/ConfirmProvider.d.ts +0 -14
  118. package/lib/cjs/components/confirm/ConfirmProvider.js +0 -63
  119. package/lib/cjs/components/confirm/useConfirm.d.ts +0 -9
  120. package/lib/cjs/components/confirm/useConfirm.js +0 -13
  121. package/lib/cjs/components/confirm/utils.js +0 -11
  122. package/lib/cjs/components/confirm/withConfirm.d.ts.map +0 -1
  123. package/lib/cjs/components/confirm/withConfirm.js +0 -43
  124. package/lib/cjs/components/icon/Icon.d.ts +0 -24
  125. package/lib/cjs/components/icon/Icon.d.ts.map +0 -1
  126. package/lib/cjs/components/icon/Icon.js +0 -116
  127. package/lib/cjs/components/input/Checkbox.d.ts.map +0 -1
  128. package/lib/cjs/components/input/Checkbox.js +0 -75
  129. package/lib/cjs/components/input/SearchBox.d.ts +0 -21
  130. package/lib/cjs/components/input/SearchBox.d.ts.map +0 -1
  131. package/lib/cjs/components/input/SearchBox.js +0 -90
  132. package/lib/cjs/components/label/Label.d.ts +0 -23
  133. package/lib/cjs/components/label/Label.js +0 -24
  134. package/lib/cjs/components/modal/Modal.d.ts +0 -29
  135. package/lib/cjs/components/modal/Modal.d.ts.map +0 -1
  136. package/lib/cjs/components/modal/Modal.js +0 -65
  137. package/lib/cjs/components/modalComponents/ModalContainer.d.ts +0 -6
  138. package/lib/cjs/components/modalComponents/ModalContainer.js +0 -12
  139. package/lib/cjs/components/modalComponents/ModalWindow.d.ts +0 -4
  140. package/lib/cjs/components/modalComponents/ModalWindow.d.ts.map +0 -1
  141. package/lib/cjs/components/modalComponents/ModalWindow.js +0 -50
  142. package/lib/cjs/components/popup/Popup.d.ts +0 -38
  143. package/lib/cjs/components/popup/Popup.d.ts.map +0 -1
  144. package/lib/cjs/components/popup/Popup.js +0 -78
  145. package/lib/cjs/components/popupComponents/PopupArea.d.ts +0 -18
  146. package/lib/cjs/components/popupComponents/PopupArea.d.ts.map +0 -1
  147. package/lib/cjs/components/popupComponents/PopupArea.js +0 -46
  148. package/lib/cjs/components/spinner/Spinner.d.ts +0 -20
  149. package/lib/cjs/components/spinner/Spinner.d.ts.map +0 -1
  150. package/lib/cjs/components/spinner/Spinner.js +0 -34
  151. package/lib/cjs/components/spinner/SpinnerContainer.d.ts.map +0 -1
  152. package/lib/cjs/components/spinner/SpinnerContainer.js +0 -24
  153. package/lib/cjs/components/tabs/Tabs.d.ts +0 -34
  154. package/lib/cjs/components/tabs/Tabs.d.ts.map +0 -1
  155. package/lib/cjs/components/tabs/Tabs.js +0 -75
  156. package/lib/cjs/components/tooltip/Tooltip.d.ts +0 -28
  157. package/lib/cjs/components/tooltip/Tooltip.d.ts.map +0 -1
  158. package/lib/cjs/components/tooltip/Tooltip.js +0 -39
  159. package/lib/cjs/hooks/useOutsideClick.d.ts.map +0 -1
  160. package/lib/cjs/hooks/useOutsideClick.js +0 -42
  161. package/lib/cjs/index.js +0 -46
  162. package/lib/cjs/types/i18n.d.ts +0 -5
  163. package/lib/cjs/types/i18n.d.ts.map +0 -1
  164. package/lib/cjs/types/i18n.js +0 -2
  165. package/lib/esm/__mocks__/react-i18next.d.ts +0 -2
  166. package/lib/esm/__mocks__/react-i18next.d.ts.map +0 -1
  167. package/lib/esm/__mocks__/react-i18next.js +0 -17
  168. package/lib/esm/assets/img/icon-arrow-back.png +0 -0
  169. package/lib/esm/assets/img/icon_folder_closed.png +0 -0
  170. package/lib/esm/assets/img/icon_folder_closed_light.png +0 -0
  171. package/lib/esm/assets/img/icon_folder_open.png +0 -0
  172. package/lib/esm/assets/img/icon_folder_open_light.png +0 -0
  173. package/lib/esm/assets/img/icon_help_light_24.png +0 -0
  174. package/lib/esm/assets/img/icon_variablenode.png +0 -0
  175. package/lib/esm/assets/img/icon_variablenode_light.png +0 -0
  176. package/lib/esm/assets/img/toastify_msg_error_24.png +0 -0
  177. package/lib/esm/assets/img/toastify_msg_success_24.png +0 -0
  178. package/lib/esm/assets/search-box.css +0 -29
  179. package/lib/esm/assets/style.css +0 -219
  180. package/lib/esm/assets/svg/icon_add.svg +0 -3
  181. package/lib/esm/assets/svg/icon_calendar.svg +0 -50
  182. package/lib/esm/assets/svg/icon_chevron_left.svg +0 -6
  183. package/lib/esm/assets/svg/icon_chevron_right.svg +0 -6
  184. package/lib/esm/assets/svg/icon_cross.svg +0 -3
  185. package/lib/esm/assets/svg/icon_download.svg +0 -5
  186. package/lib/esm/assets/svg/icon_duplicate.svg +0 -10
  187. package/lib/esm/assets/svg/icon_edit.svg +0 -6
  188. package/lib/esm/assets/svg/icon_folder_loading.svg +0 -21
  189. package/lib/esm/assets/svg/icon_fullscreen.svg +0 -6
  190. package/lib/esm/assets/svg/icon_gear.svg +0 -5
  191. package/lib/esm/assets/svg/icon_help_light.svg +0 -3
  192. package/lib/esm/assets/svg/icon_key.svg +0 -3
  193. package/lib/esm/assets/svg/icon_lupe.svg +0 -14
  194. package/lib/esm/assets/svg/icon_menu_horizontal.svg +0 -5
  195. package/lib/esm/assets/svg/icon_menu_vertical.svg +0 -5
  196. package/lib/esm/assets/svg/icon_reload.svg +0 -6
  197. package/lib/esm/assets/svg/icon_star.svg +0 -4
  198. package/lib/esm/assets/svg/icon_upload.svg +0 -7
  199. package/lib/esm/assets/svg/icon_warning_triangle.svg +0 -12
  200. package/lib/esm/assets/svg/triangle_down.svg +0 -3
  201. package/lib/esm/assets/svg/triangle_left.svg +0 -3
  202. package/lib/esm/assets/svg/triangle_right.svg +0 -3
  203. package/lib/esm/assets/svg/triangle_up.svg +0 -3
  204. package/lib/esm/assets/svg/triangle_up_and_down.svg +0 -4
  205. package/lib/esm/components/accordion/Accordion.d.ts.map +0 -1
  206. package/lib/esm/components/accordion/Accordion.js +0 -34
  207. package/lib/esm/components/accordionComponents/AccordionItem.d.ts +0 -32
  208. package/lib/esm/components/accordionComponents/AccordionItem.d.ts.map +0 -1
  209. package/lib/esm/components/accordionComponents/AccordionItem.js +0 -24
  210. package/lib/esm/components/bubble/Bubble.d.ts.map +0 -1
  211. package/lib/esm/components/bubble/Bubble.js +0 -36
  212. package/lib/esm/components/button/Button.d.ts +0 -33
  213. package/lib/esm/components/button/Button.d.ts.map +0 -1
  214. package/lib/esm/components/button/Button.js +0 -17
  215. package/lib/esm/components/button/ButtonRow.d.ts +0 -23
  216. package/lib/esm/components/button/ButtonRow.d.ts.map +0 -1
  217. package/lib/esm/components/button/ButtonRow.js +0 -10
  218. package/lib/esm/components/confirm/Confirm.d.ts.map +0 -1
  219. package/lib/esm/components/confirm/Confirm.js +0 -20
  220. package/lib/esm/components/confirm/ConfirmProvider.d.ts.map +0 -1
  221. package/lib/esm/components/confirm/ConfirmProvider.js +0 -34
  222. package/lib/esm/components/confirm/useConfirm.d.ts +0 -9
  223. package/lib/esm/components/confirm/useConfirm.d.ts.map +0 -1
  224. package/lib/esm/components/confirm/useConfirm.js +0 -10
  225. package/lib/esm/components/confirm/utils.d.ts +0 -4
  226. package/lib/esm/components/confirm/utils.d.ts.map +0 -1
  227. package/lib/esm/components/confirm/utils.js +0 -7
  228. package/lib/esm/components/confirm/withConfirm.d.ts +0 -7
  229. package/lib/esm/components/confirm/withConfirm.d.ts.map +0 -1
  230. package/lib/esm/components/confirm/withConfirm.js +0 -37
  231. package/lib/esm/components/icon/Icon.d.ts.map +0 -1
  232. package/lib/esm/components/icon/Icon.js +0 -110
  233. package/lib/esm/components/input/Checkbox.d.ts +0 -29
  234. package/lib/esm/components/input/Checkbox.d.ts.map +0 -1
  235. package/lib/esm/components/input/Checkbox.js +0 -50
  236. package/lib/esm/components/input/SearchBox.d.ts.map +0 -1
  237. package/lib/esm/components/input/SearchBox.js +0 -62
  238. package/lib/esm/components/label/Label.d.ts.map +0 -1
  239. package/lib/esm/components/label/Label.js +0 -18
  240. package/lib/esm/components/modal/Modal.d.ts.map +0 -1
  241. package/lib/esm/components/modal/Modal.js +0 -59
  242. package/lib/esm/components/modalComponents/ModalContainer.d.ts +0 -6
  243. package/lib/esm/components/modalComponents/ModalContainer.d.ts.map +0 -1
  244. package/lib/esm/components/modalComponents/ModalContainer.js +0 -6
  245. package/lib/esm/components/modalComponents/ModalWindow.d.ts +0 -4
  246. package/lib/esm/components/modalComponents/ModalWindow.d.ts.map +0 -1
  247. package/lib/esm/components/modalComponents/ModalWindow.js +0 -21
  248. package/lib/esm/components/popup/Popup.d.ts +0 -38
  249. package/lib/esm/components/popup/Popup.d.ts.map +0 -1
  250. package/lib/esm/components/popup/Popup.js +0 -49
  251. package/lib/esm/components/popupComponents/PopupArea.d.ts +0 -18
  252. package/lib/esm/components/popupComponents/PopupArea.d.ts.map +0 -1
  253. package/lib/esm/components/popupComponents/PopupArea.js +0 -17
  254. package/lib/esm/components/spinner/Spinner.d.ts.map +0 -1
  255. package/lib/esm/components/spinner/Spinner.js +0 -28
  256. package/lib/esm/components/spinner/SpinnerContainer.d.ts +0 -23
  257. package/lib/esm/components/spinner/SpinnerContainer.d.ts.map +0 -1
  258. package/lib/esm/components/spinner/SpinnerContainer.js +0 -18
  259. package/lib/esm/components/tabs/Tabs.d.ts.map +0 -1
  260. package/lib/esm/components/tabs/Tabs.js +0 -46
  261. package/lib/esm/components/tooltip/Tooltip.d.ts.map +0 -1
  262. package/lib/esm/components/tooltip/Tooltip.js +0 -33
  263. package/lib/esm/hooks/useOutsideClick.d.ts +0 -3
  264. package/lib/esm/hooks/useOutsideClick.d.ts.map +0 -1
  265. package/lib/esm/hooks/useOutsideClick.js +0 -40
  266. package/lib/esm/index.d.ts +0 -22
  267. package/lib/esm/index.d.ts.map +0 -1
  268. package/lib/esm/index.js +0 -21
  269. package/lib/esm/types/i18n.d.ts +0 -5
  270. package/lib/esm/types/i18n.d.ts.map +0 -1
  271. package/lib/esm/types/i18n.js +0 -1
  272. /package/{lib/cjs → dist/types}/components/confirm/utils.d.ts +0 -0
  273. /package/{lib/cjs → dist/types}/components/confirm/utils.d.ts.map +0 -0
  274. /package/{lib/cjs → dist/types}/hooks/useOutsideClick.d.ts +0 -0
package/dist/index.js ADDED
@@ -0,0 +1,725 @@
1
+ import { jsx as a, jsxs as m, Fragment as R } from "react/jsx-runtime";
2
+ import * as w from "react";
3
+ import T, { useRef as V, useEffect as N, useState as y, createContext as q, useContext as X } from "react";
4
+ import g from "classnames";
5
+ import { withTranslation as M, Trans as k, useTranslation as Y } from "react-i18next";
6
+ import G from "react-dom";
7
+ import J from "react-draggable";
8
+ import { useFloating as Q, size as ee, offset as te, shift as ne, arrow as ie, autoUpdate as L, useClick as se, useHover as ae, safePolygon as oe, useFocus as re, useDismiss as ce, useInteractions as le, FloatingPortal as de } from "@floating-ui/react";
9
+ class qe extends w.Component {
10
+ state = {
11
+ currentPageIndex: -1
12
+ };
13
+ componentDidMount() {
14
+ const { defaultOpenPageIndex: e } = this.props;
15
+ e != null && this.handleAccordionToggle(e);
16
+ }
17
+ handleAccordionToggle = (e) => {
18
+ const { onPageChange: n } = this.props, i = this.state.currentPageIndex !== e ? e : -1;
19
+ this.setState({
20
+ currentPageIndex: i
21
+ }), n && n(i);
22
+ };
23
+ render() {
24
+ const { children: e, accordionClass: n } = this.props, { currentPageIndex: i } = this.state;
25
+ return /* @__PURE__ */ a("div", { className: n ? `di accordion ${n}` : "di accordion", children: e && e.map(
26
+ (s, o) => s ? /* @__PURE__ */ a(
27
+ s.type,
28
+ {
29
+ index: o,
30
+ isOpen: i === o,
31
+ toggle: () => this.handleAccordionToggle(o),
32
+ ...s.props
33
+ },
34
+ o
35
+ ) : null
36
+ ) });
37
+ }
38
+ }
39
+ class Xe extends w.PureComponent {
40
+ render() {
41
+ const { badge: e, children: n, isOpen: i, info1: s, itemClasses: o, title: r, titleTooltip: c, toggle: l, tools: u, ...h } = this.props, d = ["item"];
42
+ return o && d.push(o), i && d.push("open"), /* @__PURE__ */ m("div", { className: d.join(" "), children: [
43
+ /* @__PURE__ */ m("div", { className: "head", children: [
44
+ /* @__PURE__ */ m("span", { className: "title", onClick: l, "data-testid": h["data-testid"], children: [
45
+ /* @__PURE__ */ a("h1", { title: c, children: r }),
46
+ e && /* @__PURE__ */ a(
47
+ "span",
48
+ {
49
+ className: "di label",
50
+ style: {
51
+ margin: "0 0 0 10px",
52
+ backgroundColor: "#ddd",
53
+ borderColor: "transparent"
54
+ },
55
+ children: e
56
+ }
57
+ ),
58
+ s && /* @__PURE__ */ a("span", { style: s.cssStyle, children: s.text })
59
+ ] }),
60
+ /* @__PURE__ */ a("span", { className: "tools", children: u && u.map((p, f) => /* @__PURE__ */ a("span", { className: "tool", children: p }, f)) })
61
+ ] }),
62
+ /* @__PURE__ */ a("div", { className: "cont", children: n })
63
+ ] });
64
+ }
65
+ }
66
+ function ue({
67
+ children: t,
68
+ title: e,
69
+ type: n,
70
+ disabled: i,
71
+ onClick: s,
72
+ style: o,
73
+ tabIndex: r,
74
+ t: c,
75
+ primary: l,
76
+ danger: u,
77
+ naked: h,
78
+ className: d,
79
+ small: p,
80
+ ...f
81
+ }) {
82
+ let v = e;
83
+ return e && typeof e != "string" && (v = c(e.id, {
84
+ defaultValue: e.defaultValue
85
+ })), /* @__PURE__ */ a(
86
+ "button",
87
+ {
88
+ "data-testid": f["data-testid"],
89
+ type: n || "button",
90
+ className: g("di button", d, { small: p, primary: l, danger: u, link: h }),
91
+ title: typeof v == "string" ? v : void 0,
92
+ disabled: i,
93
+ onClick: s,
94
+ style: o,
95
+ tabIndex: r,
96
+ children: t
97
+ }
98
+ );
99
+ }
100
+ const x = M()(ue), he = ({ children: t, dividing: e, className: n, style: i }) => /* @__PURE__ */ a("div", { style: i, className: `di button-row ${e ? "dividing" : ""} ${n || ""}`, children: t });
101
+ he.defaultProps = {
102
+ dividing: !1
103
+ };
104
+ const pe = (t) => !!t.touches, me = (t, e) => {
105
+ const n = t.getBoundingClientRect();
106
+ let i, s;
107
+ return pe(e) ? (i = e.touches[0].pageX, s = e.touches[0].pageY) : (i = e.pageX, s = e.pageY), n.left <= i && n.right >= i && n.top <= s && n.bottom >= s;
108
+ }, fe = (t, e) => {
109
+ const n = V(e);
110
+ N(() => {
111
+ n.current = e;
112
+ }, [e]), N(() => {
113
+ const i = (s) => {
114
+ t.filter((r) => r != null).every(
115
+ (r) => r !== s.target && !r.contains(s.target) && !me(r, s)
116
+ ) && n.current(s);
117
+ };
118
+ return document.addEventListener("mousedown", i, !0), document.addEventListener("touchstart", i, !0), () => {
119
+ document.removeEventListener("mousedown", i, !0), document.removeEventListener("touchstart", i, !0);
120
+ };
121
+ }, [t]);
122
+ };
123
+ function ge({ className: t, width: e, header: n, content: i, footer: s, onOutsideClick: o }) {
124
+ const r = V(null), [c, l] = y(null);
125
+ return N(() => {
126
+ l(r.current);
127
+ }, []), fe([c], () => {
128
+ o && o();
129
+ }), /* @__PURE__ */ a(J, { handle: ".modal-header", nodeRef: r, children: /* @__PURE__ */ m(
130
+ "div",
131
+ {
132
+ ref: r,
133
+ className: `modal-window ${t || ""}`,
134
+ style: {
135
+ maxWidth: e
136
+ },
137
+ children: [
138
+ n && /* @__PURE__ */ a("div", { className: "modal-header", children: n }),
139
+ i && /* @__PURE__ */ a("div", { className: "modal-content", children: i }),
140
+ s && /* @__PURE__ */ a("div", { className: "modal-footer", children: s })
141
+ ]
142
+ }
143
+ ) });
144
+ }
145
+ class ve extends T.Component {
146
+ static defaultProps = {
147
+ width: "60%"
148
+ };
149
+ container;
150
+ modalRoot;
151
+ timeoutId;
152
+ constructor(e) {
153
+ super(e), this.state = {
154
+ className: "di modal"
155
+ };
156
+ }
157
+ componentDidMount() {
158
+ this.container = document.createElement("div"), this.modalRoot = document.getElementById("modal-root"), this.modalRoot ? this.modalRoot.appendChild(this.container) : document.body && document.body.appendChild(this.container), this.props.onOutsideClick && window.addEventListener("keydown", this.keyEventHandler), this.timeoutId = setTimeout(
159
+ () => this.setState({
160
+ className: `di modal show ${this.props.className || ""}`
161
+ }),
162
+ 10
163
+ );
164
+ }
165
+ componentWillUnmount() {
166
+ this.container && (this.modalRoot ? this.modalRoot.removeChild(this.container) : document.body && document.body.removeChild(this.container)), this.props.onOutsideClick && window.removeEventListener("keydown", this.keyEventHandler), this.timeoutId && clearTimeout(this.timeoutId);
167
+ }
168
+ keyEventHandler = (e) => {
169
+ e.key === "Escape" && this.props.onOutsideClick && this.props.onOutsideClick(e);
170
+ };
171
+ render() {
172
+ return this.container ? G.createPortal(
173
+ /* @__PURE__ */ a("div", { className: this.state.className, onMouseDown: this.props.onMouseDown, children: /* @__PURE__ */ a(ge, { ...this.props }) }),
174
+ this.container
175
+ ) : null;
176
+ }
177
+ }
178
+ class Ye extends T.PureComponent {
179
+ render() {
180
+ return /* @__PURE__ */ a("div", { id: "modal-root" });
181
+ }
182
+ }
183
+ class we extends T.Component {
184
+ static defaultProps = {
185
+ size: 56,
186
+ center: !1
187
+ };
188
+ render() {
189
+ const { size: e = 56, center: n, ...i } = this.props;
190
+ let s = {
191
+ width: e,
192
+ height: e
193
+ };
194
+ return n && (s = {
195
+ ...s,
196
+ position: "absolute",
197
+ top: "50%",
198
+ left: "50%",
199
+ marginTop: -e / 2,
200
+ marginLeft: -e / 2
201
+ }), /* @__PURE__ */ a("div", { className: "di spinner", style: s, ...i });
202
+ }
203
+ }
204
+ class Ge extends T.Component {
205
+ static defaultProps = {
206
+ size: 56
207
+ };
208
+ render() {
209
+ const { show: e, size: n, children: i, className: s } = this.props, o = `di spinner-wrapper ${s || ""}`;
210
+ return /* @__PURE__ */ m("div", { className: o, children: [
211
+ /* @__PURE__ */ a(
212
+ "div",
213
+ {
214
+ className: `di spinner-container ${e ? "visible" : ""}`,
215
+ "data-testid": this.props["data-testid"],
216
+ children: /* @__PURE__ */ a(we, { size: n, center: !0 })
217
+ }
218
+ ),
219
+ i
220
+ ] });
221
+ }
222
+ }
223
+ const ye = (t, e) => {
224
+ switch (t) {
225
+ case "checkbox":
226
+ case "radio":
227
+ return "di checkbox";
228
+ case "toggle":
229
+ return e ? "di toggle toggle-small" : "di toggle";
230
+ default:
231
+ throw Error(`type not support: ${t}`);
232
+ }
233
+ }, xe = (t, e) => {
234
+ switch (t) {
235
+ case "checkbox":
236
+ return "box";
237
+ case "radio":
238
+ return "radio";
239
+ case "toggle":
240
+ return e ? "switch switch-small" : "switch";
241
+ default:
242
+ throw Error(`type not support: ${t}`);
243
+ }
244
+ }, be = ({
245
+ type: t = "checkbox",
246
+ value: e,
247
+ onChange: n,
248
+ title: i,
249
+ label: s,
250
+ disabled: o = !1,
251
+ toggleSmall: r = !1,
252
+ toggleColor: c = "#259b23",
253
+ t: l,
254
+ ...u
255
+ }) => {
256
+ const h = t === "toggle" ? {
257
+ backgroundColor: e ? c : "gray"
258
+ } : {}, d = i ? l(i.id, {
259
+ defaultValue: i.defaultValue
260
+ }) : void 0, p = s ? l(s.id, {
261
+ defaultValue: s.defaultValue
262
+ }) : null;
263
+ return /* @__PURE__ */ m(
264
+ "label",
265
+ {
266
+ title: d,
267
+ className: ye(t, r),
268
+ "data-testid": u["wrapper-data-testid"],
269
+ children: [
270
+ /* @__PURE__ */ a(
271
+ "input",
272
+ {
273
+ type: "checkbox",
274
+ checked: e,
275
+ disabled: o,
276
+ onChange: () => n(!e),
277
+ "data-testid": u["data-testid"]
278
+ }
279
+ ),
280
+ /* @__PURE__ */ a(
281
+ "div",
282
+ {
283
+ className: xe(t, r),
284
+ style: h,
285
+ "data-testid": u["innerdiv-data-testid"]
286
+ }
287
+ ),
288
+ s && /* @__PURE__ */ a("span", { className: "textlabel", children: p })
289
+ ]
290
+ }
291
+ );
292
+ }, Je = M()(be);
293
+ function P(t) {
294
+ const e = typeof t == "object" && typeof t.id == "string" && typeof t.defaultValue == "string";
295
+ return e && console.warn(
296
+ "Please use strings instead of TranslationDescriptors to initialize the Confirm modal, because TranslationDescriptors are deprecated"
297
+ ), e;
298
+ }
299
+ function C(t) {
300
+ return P(t) ? /* @__PURE__ */ a(k, { i18nKey: t.id, children: t.defaultValue }) : t;
301
+ }
302
+ function Ce({
303
+ title: t,
304
+ message: e,
305
+ onAccept: n,
306
+ onDecline: i,
307
+ acceptButtonLabel: s,
308
+ declineButtonLabel: o,
309
+ acceptButtonStyle: r = "primary"
310
+ }) {
311
+ return /* @__PURE__ */ a(
312
+ ve,
313
+ {
314
+ header: C(t),
315
+ content: C(e),
316
+ footer: /* @__PURE__ */ m("div", { children: [
317
+ /* @__PURE__ */ a(
318
+ x,
319
+ {
320
+ primary: r === "primary",
321
+ danger: r === "danger",
322
+ onClick: n,
323
+ children: s ? C(s) : /* @__PURE__ */ a(k, { i18nKey: "form.accept", children: "Accept" })
324
+ }
325
+ ),
326
+ /* @__PURE__ */ a(x, { onClick: i, children: o ? C(o) : /* @__PURE__ */ a(k, { i18nKey: "form.decline", children: "Decline" }) })
327
+ ] }),
328
+ width: 500
329
+ }
330
+ );
331
+ }
332
+ const Z = q({
333
+ confirm: () => Promise.reject(new Error("ConfirmProvider is missing!"))
334
+ });
335
+ function Ne({ children: t }) {
336
+ const [e, n] = y(!1), [i, s] = y({
337
+ title: "",
338
+ message: "",
339
+ onAccept: () => {
340
+ },
341
+ onDecline: () => {
342
+ }
343
+ });
344
+ async function o(r) {
345
+ return new Promise((c) => {
346
+ n(!0), s({
347
+ ...r,
348
+ onAccept: () => {
349
+ n(!1), c(!0);
350
+ },
351
+ onDecline: () => {
352
+ n(!1), c(!1);
353
+ }
354
+ });
355
+ });
356
+ }
357
+ return /* @__PURE__ */ m(Z.Provider, { value: { confirm: o }, children: [
358
+ t,
359
+ e && /* @__PURE__ */ a(Ce, { ...i })
360
+ ] });
361
+ }
362
+ function ke() {
363
+ const t = X(Z);
364
+ if (!t)
365
+ throw new Error("ConfirmProvider is missing");
366
+ const { confirm: e } = t;
367
+ return e;
368
+ }
369
+ function Qe(t) {
370
+ function e(n) {
371
+ const i = ke(), { t: s } = Y();
372
+ function o(c) {
373
+ return P(c) ? s(c.id, { defaultValue: c.defaultValue }) : c;
374
+ }
375
+ async function r(c, l, u, h, d, p) {
376
+ const f = await i({
377
+ title: o(c),
378
+ message: P(l) ? o(l) : l,
379
+ acceptButtonLabel: u ? o(u) : void 0,
380
+ declineButtonLabel: h ? o(h) : void 0,
381
+ acceptButtonStyle: p
382
+ });
383
+ if (d)
384
+ return f;
385
+ if (!f)
386
+ return new Promise(() => {
387
+ });
388
+ }
389
+ return /* @__PURE__ */ a(t, { ...n, confirm: r });
390
+ }
391
+ return function(i) {
392
+ return /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a(e, { ...i }) });
393
+ };
394
+ }
395
+ const Ae = "data:image/svg+xml,%3csvg%20id='icon-add_24_sga'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpolygon%20id='plus'%20points='20%2010%2014%2010%2014%204%2010%204%2010%2010%204%2010%204%2014%2010%2014%2010%2020%2014%2020%2014%2014%2020%2014%2020%2010'/%3e%3c/svg%3e", Te = "data:image/svg+xml,%3csvg%20id='icon-cross_24_sga'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpolygon%20id='icon-cross_24'%20points='20%206.28%2017.87%204%2012%209.78%206.13%204%204%206.28%209.78%2011.97%204%2017.66%206.13%2019.93%2012%2014.15%2017.87%2019.93%2020%2017.66%2014.22%2011.97%2020%206.28'/%3e%3c/svg%3e", Pe = "data:image/svg+xml,%3csvg%20id='icon-edit-24_sga'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20id='stift'%3e%3cpath%20d='M7.35,12.65a.5.5,0,0,0,0,.7l3.3,3.3a.5.5,0,0,0,.7,0l8.3-8.3A1.4,1.4,0,0,0,20,7.5v-1a1.4,1.4,0,0,0-.35-.85l-1.3-1.3A1.4,1.4,0,0,0,17.5,4h-1a1.4,1.4,0,0,0-.85.35Z'/%3e%3c/g%3e%3cpath%20d='M5.9,14.49c.06-.27.26-.33.45-.14l3.3,3.3c.19.19.13.39-.14.45l-4,.8a.3.3,0,0,1-.39-.39Z'/%3e%3c/svg%3e", Ve = "data:image/svg+xml,%3csvg%20id='icon-gear-24_sga'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20id='icon-gear-24_sga-2'%20data-name='icon-gear-24_sga'%3e%3cpath%20d='M22.82,14.06A1.25,1.25,0,0,0,24,13,7.66,7.66,0,0,0,24,12,7.66,7.66,0,0,0,24,11a1.25,1.25,0,0,0-1.13-1l-1.09,0A1.49,1.49,0,0,1,20.44,9c-.15-.47-.44-2-.07-2.37l.74-.81a1.16,1.16,0,0,0,0-1.5L19.7,2.87a1.16,1.16,0,0,0-1.5,0l-.81.74a1.5,1.5,0,0,1-1.54.27c-.44-.23-1.72-1.08-1.74-1.63l0-1.09A1.25,1.25,0,0,0,13,.05a7.66,7.66,0,0,0-1,0,7.66,7.66,0,0,0-1,.05,1.25,1.25,0,0,0-1,1.13l0,1.09A1.52,1.52,0,0,1,9,3.56c-.47.15-2,.44-2.37.07L5.8,2.89a1.16,1.16,0,0,0-1.5,0L2.86,4.3a1.18,1.18,0,0,0,0,1.5l.74.81A1.5,1.5,0,0,1,3.9,8.15c-.23.44-1.08,1.72-1.63,1.74l-1.09,0A1.25,1.25,0,0,0,.05,11a7.66,7.66,0,0,0,0,1,7.66,7.66,0,0,0,.05,1,1.25,1.25,0,0,0,1.13,1l1.09,0A1.47,1.47,0,0,1,3.55,15c.16.48.45,2,.08,2.37l-.74.81a1.16,1.16,0,0,0,0,1.5L4.3,21.13a1.16,1.16,0,0,0,1.5,0l.81-.74a1.5,1.5,0,0,1,1.54-.27c.44.23,1.72,1.08,1.75,1.63l0,1.09A1.25,1.25,0,0,0,11,24,7.66,7.66,0,0,0,12,24,7.66,7.66,0,0,0,13,24a1.25,1.25,0,0,0,1-1.13l0-1.09A1.49,1.49,0,0,1,15,20.44c.47-.15,2-.44,2.37-.07l.81.74a1.16,1.16,0,0,0,1.5,0l1.43-1.43a1.16,1.16,0,0,0,0-1.5l-.74-.81a1.5,1.5,0,0,1-.27-1.54c.23-.44,1.08-1.72,1.63-1.74ZM12,15.5A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z'/%3e%3c/g%3e%3c/svg%3e", Me = "data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%3e%3cpath%20d='M22.1,4.91a3,3,0,0,0-3-3H6.44a2.4,2.4,0,0,1,1.34-.4h12.6A2.12,2.12,0,0,1,22.5,3.62V17.26a1.42,1.42,0,0,1-.4,1Z'/%3e%3cpath%20d='M20.38,1H7.78A3,3,0,0,0,5.26,2.4H19.09A2.51,2.51,0,0,1,21.6,4.91V19.12A1.94,1.94,0,0,0,23,17.26V3.62A2.62,2.62,0,0,0,20.38,1Z'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M4,21.5A1.5,1.5,0,0,1,2.5,20V5.8A1.5,1.5,0,0,1,4,4.3H18.2a1.5,1.5,0,0,1,1.5,1.5V20a1.5,1.5,0,0,1-1.5,1.5ZM9.5,18a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V14.5H16a.5.5,0,0,0,.5-.5V12a.5.5,0,0,0-.5-.5H12.5V8a.5.5,0,0,0-.5-.5H10a.5.5,0,0,0-.5.5v3.5H6a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5H9.5Z'/%3e%3cpath%20d='M18.2,4.8a1,1,0,0,1,1,1V20a1,1,0,0,1-1,1H4a1,1,0,0,1-1-1V5.8a1,1,0,0,1,1-1H18.2M9,11H6a1,1,0,0,0-1,1v2a1,1,0,0,0,1,1H9v3a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1V15h3a1,1,0,0,0,1-1V12a1,1,0,0,0-1-1H13V8a1,1,0,0,0-1-1H10A1,1,0,0,0,9,8v3m9.2-7.2H4a2,2,0,0,0-2,2V20a2,2,0,0,0,2,2H18.2a2,2,0,0,0,2-2V5.8a2,2,0,0,0-2-2ZM6,14V12h4V8h2v4h4v2H12v4H10V14Z'/%3e%3c/g%3e%3c/svg%3e", Ee = "data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpolygon%20points='7.92%2012%202.84%207%2013%207%207.92%2012'/%3e%3crect%20x='5'%20y='2'%20width='6'%20height='5'/%3e%3crect%20x='2'%20y='14'%20width='12'%20height='1'/%3e%3c/svg%3e", Be = "data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%23fff;%20}%20%3c/style%3e%3c/defs%3e%3cg%3e%3ccircle%20class='cls-1'%20cx='5.5'%20cy='5.5'%20r='4.5'/%3e%3cpath%20d='M5.5,2A3.5,3.5,0,1,1,2,5.5,3.5,3.5,0,0,1,5.5,2m0-1A4.5,4.5,0,1,0,10,5.5,4.49,4.49,0,0,0,5.5,1Z'/%3e%3c/g%3e%3crect%20x='6.79'%20y='10.04'%20width='7.74'%20height='2.16'%20transform='translate(10.98%20-4.28)%20rotate(45)'/%3e%3c/svg%3e", He = "data:image/svg+xml,%3csvg%20data-name='icon_key'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2027.02%2027'%3e%3cpath%20d='M35.07,16.5a8.52,8.52,0,0,0-7.69,12L17.2,38.8a2.46,2.46,0,0,0,0,3.46,2.41,2.41,0,0,0,3.42,0l1.69-1.7,2.91,2.94L31,37.63l-2.92-3,2.44-2.46a8.31,8.31,0,0,0,4.51,1.33,8.53,8.53,0,0,0,0-17Zm0,3.91A4.62,4.62,0,1,1,30.5,25,4.6,4.6,0,0,1,35.07,20.41Z'%20transform='translate(-16.49%20-16.5)'/%3e%3c/svg%3e", Le = "data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20id='Pfeilende'%3e%3cpath%20d='M24,10H15l9-8.93Z'/%3e%3c/g%3e%3cpath%20d='M18.45,18.78A9.33,9.33,0,0,1,2.62,14.86,9.8,9.8,0,0,1,8.89,2.69,9.42,9.42,0,0,1,20.72,9.14H23A11.72,11.72,0,0,0,11.68,0,11.74,11.74,0,0,0,.34,9.14,12,12,0,0,0,8.89,23.65a11.43,11.43,0,0,0,11.16-3.31Z'/%3e%3c/svg%3e", _e = "data:image/svg+xml,%3csvg%20data-name='icon_fullscreen_sga'%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpolygon%20id='ecke'%20points='2%2014%202%2010%200%2010%200%2016%206%2016%206%2014%202%2014'/%3e%3cpolygon%20id='ecke-2'%20data-name='ecke'%20points='2%202%206%202%206%200%200%200%200%206%202%206%202%202'/%3e%3cpolygon%20id='ecke-3'%20data-name='ecke'%20points='14%2014%2010%2014%2010%2016%2016%2016%2016%2010%2014%2010%2014%2014'/%3e%3cpolygon%20id='ecke-4'%20data-name='ecke'%20points='10%200%2010%202%2014%202%2014%206%2016%206%2016%200%2010%200'/%3e%3c/svg%3e", $e = "data:image/svg+xml,%3csvg%20id='Icon_help'%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20id='icon_help-2'%20data-name='icon_help'%20d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm1,16H11V15h2Zm1.7-6.26a4.85,4.85,0,0,1-.49.81l-1,1.37a1.36,1.36,0,0,0-.18.34,1,1,0,0,0-.07.38L13,14H11l.1-.49a2,2,0,0,1,.13-.77,3.18,3.18,0,0,1,.4-.69l1-1.33a3.21,3.21,0,0,0,.29-.46,1.19,1.19,0,0,0,.11-.47,1.17,1.17,0,0,0-.3-.82,1.07,1.07,0,0,0-.83-.33A1,1,0,0,0,11.1,9a1.25,1.25,0,0,0-.28.83H9a2.94,2.94,0,0,1,.23-1.17,2.45,2.45,0,0,1,.63-.88,2.9,2.9,0,0,1,.93-.55A3.13,3.13,0,0,1,11.94,7a3.31,3.31,0,0,1,1.13.19,2.82,2.82,0,0,1,.94.54,2.62,2.62,0,0,1,.65.88A3,3,0,0,1,14.9,9.8,2.16,2.16,0,0,1,14.7,10.74Z'%20style='opacity:%200.2'/%3e%3c/svg%3e", Re = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='icon_star_16'%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20id='star'%20d='M8,0l2.45,4.97,5.55,.76-4.04,3.83,.99,5.44-4.94-2.61-4.94,2.61,.99-5.44L0,5.73l5.55-.76L8,0Z'/%3e%3c/svg%3e";
396
+ function Ze(t) {
397
+ const { add: e, del: n, edit: i, config: s, duplicate: o, search: r, download: c, sync: l, fullscreen: u, iconKey: h, documentation: d, star: p } = t;
398
+ if (e)
399
+ return Ae;
400
+ if (n)
401
+ return Te;
402
+ if (i)
403
+ return Pe;
404
+ if (s)
405
+ return Ve;
406
+ if (o)
407
+ return Me;
408
+ if (r)
409
+ return Be;
410
+ if (c)
411
+ return Ee;
412
+ if (l)
413
+ return Le;
414
+ if (u)
415
+ return _e;
416
+ if (h)
417
+ return He;
418
+ if (d)
419
+ return $e;
420
+ if (p)
421
+ return Re;
422
+ throw Error("getSrc: no icon type specified");
423
+ }
424
+ function Ie(t) {
425
+ const { add: e, del: n, edit: i, config: s, duplicate: o, search: r, download: c, sync: l, fullscreen: u, iconKey: h, documentation: d, star: p } = t;
426
+ if (e)
427
+ return "icon add";
428
+ if (n)
429
+ return "icon delete";
430
+ if (i)
431
+ return "icon edit";
432
+ if (s)
433
+ return "icon config";
434
+ if (o)
435
+ return "icon duplicate";
436
+ if (r)
437
+ return "icon search";
438
+ if (c)
439
+ return "icon download";
440
+ if (l)
441
+ return "icon sync";
442
+ if (u)
443
+ return "icon fullscreen";
444
+ if (h)
445
+ return "icon iconKey";
446
+ if (d)
447
+ return "icon documentation";
448
+ if (p)
449
+ return "icon star";
450
+ throw Error("getAlt: no icon type specified");
451
+ }
452
+ function A(t) {
453
+ let e;
454
+ return t.large ? e = { width: 24, height: 24 } : e = { width: 16, height: 16 }, t.inverted && (e = { ...e, filter: "invert(1)" }), /* @__PURE__ */ a("img", { src: Ze(t), className: `di icon ${t.className || ""}`, alt: Ie(t), style: e });
455
+ }
456
+ function et({
457
+ text: t,
458
+ small: e = !1,
459
+ large: n = !1,
460
+ onDelete: i,
461
+ className: s,
462
+ onClick: o,
463
+ children: r,
464
+ ...c
465
+ }) {
466
+ function l(u) {
467
+ u.stopPropagation(), i && i();
468
+ }
469
+ return /* @__PURE__ */ m(
470
+ "span",
471
+ {
472
+ onClick: o,
473
+ className: g("di label", s, { large: n, small: e, removable: i, clickable: !!o }),
474
+ "data-testid": c["data-testid"],
475
+ children: [
476
+ typeof t == "string" ? t : t && /* @__PURE__ */ a(k, { i18nKey: t.id, children: t.defaultValue }),
477
+ /* @__PURE__ */ a(R, { children: r }),
478
+ i && /* @__PURE__ */ a("span", { "data-testid": c["delete-button-data-testid"], className: "remove", onClick: l, children: /* @__PURE__ */ a(A, { del: !0, inverted: !0 }) })
479
+ ]
480
+ }
481
+ );
482
+ }
483
+ const _ = 16;
484
+ function I({
485
+ placement: t = "bottom",
486
+ mode: e = ["click"],
487
+ disabled: n,
488
+ handler: i,
489
+ handlerWrapperClassName: s,
490
+ preventDestroyContentOnHide: o,
491
+ open: r,
492
+ onOpenChange: c,
493
+ className: l,
494
+ children: u
495
+ }) {
496
+ const h = V(null), { elements: d, update: p, refs: f, floatingStyles: v, context: b, middlewareData: E } = Q({
497
+ placement: t,
498
+ open: r,
499
+ onOpenChange: c,
500
+ whileElementsMounted: o ? void 0 : L,
501
+ middleware: [
502
+ ee({
503
+ apply({ availableHeight: B, availableWidth: j, elements: H }) {
504
+ const z = `${Math.max(0, j - _)}px`, U = `${Math.max(0, B - _)}px`;
505
+ H.floating.style.maxWidth = z, H.floating.style.maxHeight = U;
506
+ }
507
+ }),
508
+ te({
509
+ mainAxis: 12
510
+ }),
511
+ ne(),
512
+ ie({
513
+ element: h
514
+ })
515
+ ]
516
+ });
517
+ N(() => {
518
+ if (o && r && d.reference && d.floating)
519
+ return L(d.reference, d.floating, p);
520
+ }, [d.floating, d.reference, r, p, o]);
521
+ const S = se(b, { enabled: !n && e.includes("click") }), D = ae(b, {
522
+ enabled: !n && e.includes("hover"),
523
+ handleClose: oe()
524
+ }), K = re(b, { enabled: !n && e.includes("focus") }), F = ce(b), { getReferenceProps: O, getFloatingProps: W } = le([S, D, K, F]);
525
+ return /* @__PURE__ */ m(R, { children: [
526
+ /* @__PURE__ */ a(
527
+ "span",
528
+ {
529
+ style: { display: "inline-block" },
530
+ className: g("popup-handler-wrapper", s),
531
+ ref: f.setReference,
532
+ ...O(),
533
+ children: i
534
+ }
535
+ ),
536
+ (r || o) && /* @__PURE__ */ a(de, { children: /* @__PURE__ */ a(
537
+ "div",
538
+ {
539
+ className: g("di popup-wrapper", { hidden: o && !r }),
540
+ ref: f.setFloating,
541
+ style: v,
542
+ ...W(),
543
+ children: /* @__PURE__ */ m("div", { className: g("di popup", t, l), children: [
544
+ /* @__PURE__ */ a(
545
+ "div",
546
+ {
547
+ className: g("popup-arrow", t),
548
+ ref: h,
549
+ style: { left: E.arrow?.x, top: E.arrow?.y }
550
+ }
551
+ ),
552
+ /* @__PURE__ */ a("div", { className: "popup-content", children: u })
553
+ ] })
554
+ }
555
+ ) })
556
+ ] });
557
+ }
558
+ function Se({ content: t, inverted: e, children: n, disabled: i, style: s, direction: o, className: r }) {
559
+ const [c, l] = y(!1);
560
+ return /* @__PURE__ */ a(
561
+ I,
562
+ {
563
+ open: c,
564
+ onOpenChange: l,
565
+ handler: n,
566
+ disabled: i,
567
+ mode: ["hover"],
568
+ placement: o || "top",
569
+ className: `bubble ${e ? "inverted" : ""} ${r || ""}`,
570
+ children: /* @__PURE__ */ a("span", { className: "bubble-content", style: s, children: t })
571
+ }
572
+ );
573
+ }
574
+ function tt({ content: t, children: e, className: n, direction: i, disabled: s }) {
575
+ const [o, r] = y(!1);
576
+ return /* @__PURE__ */ a(
577
+ I,
578
+ {
579
+ open: o,
580
+ disabled: s,
581
+ mode: ["hover"],
582
+ onOpenChange: r,
583
+ handler: e,
584
+ placement: i || "right",
585
+ className: `tooltip inverted ${n || ""}`,
586
+ children: /* @__PURE__ */ a("span", { className: "tooltip-content", children: t })
587
+ }
588
+ );
589
+ }
590
+ class nt extends w.Component {
591
+ state = {
592
+ currentTab: this.props.pages.length ? this.props.pages[0].name : null
593
+ };
594
+ handleClick = (e) => {
595
+ this.props.onChange ? this.props.onChange(e) : typeof this.props.currentTab > "u" && this.setState({
596
+ currentTab: e
597
+ });
598
+ };
599
+ currentTabPage = () => {
600
+ const e = typeof this.props.currentTab == "string" ? this.props.currentTab : this.state.currentTab;
601
+ return this.props.pages.find(({ name: n }) => e === n);
602
+ };
603
+ isCurrentTab = (e) => (typeof this.props.currentTab == "string" ? this.props.currentTab : this.state.currentTab) === e;
604
+ renderBody = () => {
605
+ const e = this.currentTabPage();
606
+ return e && typeof e.renderBody == "function" ? e.renderBody() : null;
607
+ };
608
+ render() {
609
+ const { pages: e, disabled: n } = this.props;
610
+ return /* @__PURE__ */ m("div", { children: [
611
+ /* @__PURE__ */ a("div", { className: "di tabs", children: e.map(
612
+ ({ name: i, renderHeading: s, tabDescription: o }) => o ? /* @__PURE__ */ a(Se, { inverted: !0, content: o, className: "bubble-tab-description", children: /* @__PURE__ */ a(
613
+ "button",
614
+ {
615
+ "data-testid": "tab-button",
616
+ className: `item ${n ? "disabled" : ""} ${this.isCurrentTab(i) ? "active" : ""}`,
617
+ onClick: () => !n && this.handleClick(i),
618
+ children: s()
619
+ }
620
+ ) }, i) : /* @__PURE__ */ a(
621
+ "button",
622
+ {
623
+ "data-testid": "tab-button",
624
+ className: `item ${n ? "disabled" : ""} ${this.isCurrentTab(i) ? "active" : ""}`,
625
+ onClick: () => !n && this.handleClick(i),
626
+ children: s()
627
+ },
628
+ i
629
+ )
630
+ ) }),
631
+ this.renderBody()
632
+ ] });
633
+ }
634
+ }
635
+ const $ = ({
636
+ onChange: t,
637
+ inputElement: e,
638
+ style: n
639
+ }) => /* @__PURE__ */ a(
640
+ x,
641
+ {
642
+ naked: !0,
643
+ onClick: () => {
644
+ t(""), e && e.focus();
645
+ },
646
+ style: n,
647
+ children: /* @__PURE__ */ a(A, { del: !0 })
648
+ }
649
+ );
650
+ class De extends w.Component {
651
+ state = {
652
+ query: this.props.initialValue || ""
653
+ };
654
+ input;
655
+ printPlaceholder() {
656
+ const { t: e, placeholder: n } = this.props;
657
+ return typeof n == "object" ? e(n.id, {
658
+ defaultValue: n.defaultValue
659
+ }) : n;
660
+ }
661
+ handleChange = (e) => {
662
+ const { onChange: n } = this.props;
663
+ this.setState({
664
+ query: e
665
+ }), n(e);
666
+ };
667
+ handleKeyUp = ({ key: e }) => {
668
+ const { onSubmit: n } = this.props, { query: i } = this.state;
669
+ e === "Enter" && typeof n == "function" && n(i);
670
+ };
671
+ render() {
672
+ const { onSubmit: e, style: n, clearable: i } = this.props, { query: s } = this.state;
673
+ return /* @__PURE__ */ m("div", { className: "search-box", style: n, children: [
674
+ /* @__PURE__ */ a(
675
+ "input",
676
+ {
677
+ ref: (o) => {
678
+ this.input = o;
679
+ },
680
+ type: "text",
681
+ value: s,
682
+ placeholder: this.printPlaceholder(),
683
+ onKeyUp: this.handleKeyUp,
684
+ onChange: ({ target: { value: o } }) => this.handleChange(o)
685
+ }
686
+ ),
687
+ typeof e == "function" ? /* @__PURE__ */ m(w.Fragment, { children: [
688
+ s && i && /* @__PURE__ */ a(
689
+ $,
690
+ {
691
+ onChange: this.handleChange,
692
+ inputElement: this.input,
693
+ style: {
694
+ right: 30
695
+ }
696
+ }
697
+ ),
698
+ /* @__PURE__ */ a(x, { naked: !0, onClick: () => e(s), children: /* @__PURE__ */ a(A, { search: !0 }) })
699
+ ] }) : s && i ? /* @__PURE__ */ a($, { onChange: this.handleChange, inputElement: this.input }) : /* @__PURE__ */ a(x, { naked: !0, disabled: !0, children: /* @__PURE__ */ a(A, { search: !0 }) })
700
+ ] });
701
+ }
702
+ }
703
+ const it = M()(De);
704
+ export {
705
+ qe as Accordion,
706
+ Xe as AccordionItem,
707
+ Se as Bubble,
708
+ x as Button,
709
+ he as ButtonRow,
710
+ Je as Checkbox,
711
+ Ne as ConfirmProvider,
712
+ A as Icon,
713
+ et as Label,
714
+ ve as Modal,
715
+ Ye as ModalContainer,
716
+ I as Popup,
717
+ it as SearchBox,
718
+ we as Spinner,
719
+ Ge as SpinnerContainer,
720
+ nt as Tabs,
721
+ tt as Tooltip,
722
+ ke as useConfirm,
723
+ Qe as withConfirm
724
+ };
725
+ //# sourceMappingURL=index.js.map