@devtron-labs/devtron-fe-common-lib 0.0.53-beta-1 → 0.0.53-beta-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 (525) hide show
  1. package/.eslintignore +96 -0
  2. package/.eslintrc.js +109 -0
  3. package/.github/pull_request_template.md +25 -0
  4. package/.github/workflows/ci.yml +31 -0
  5. package/.github/workflows/release-package.yml +48 -0
  6. package/.husky/pre-commit +5 -0
  7. package/.lintstagedrc +3 -0
  8. package/.nvmrc +1 -0
  9. package/.prettierrc.js +7 -0
  10. package/dist/Common/AddCDButton/AddCDButton.d.ts +3 -3
  11. package/dist/Common/AddCDButton/index.d.ts +2 -2
  12. package/dist/Common/AddCDButton/types.d.ts +26 -26
  13. package/dist/Common/AddCDButton/utils.d.ts +2 -2
  14. package/dist/Common/Api.d.ts +5 -5
  15. package/dist/Common/AppStatus/AppStatus.d.ts +3 -3
  16. package/dist/Common/AppStatus/constants.d.ts +51 -51
  17. package/dist/Common/AppStatus/index.d.ts +1 -1
  18. package/dist/Common/AppStatus/types.d.ts +12 -12
  19. package/dist/Common/AppStatus/utils.d.ts +1 -1
  20. package/dist/Common/BreadCrumb/BreadCrumb.d.ts +5 -5
  21. package/dist/Common/BreadCrumb/BreadcrumbStore.d.ts +17 -17
  22. package/dist/Common/BreadCrumb/Types.d.ts +28 -28
  23. package/dist/Common/CIPipeline.Types.d.ts +265 -265
  24. package/dist/Common/ChartVersionAndTypeSelector.d.ts +4 -3
  25. package/dist/Common/Checkbox.d.ts +5 -5
  26. package/dist/Common/ClipboardButton/ClipboardButton.d.ts +10 -10
  27. package/dist/Common/ClipboardButton/types.d.ts +8 -8
  28. package/dist/Common/Common.service.d.ts +20 -20
  29. package/dist/Common/Constants.d.ts +67 -73
  30. package/dist/Common/CustomInput/CustomInput.d.ts +3 -3
  31. package/dist/Common/CustomInput/Types.d.ts +29 -29
  32. package/dist/Common/CustomInput/index.d.ts +2 -2
  33. package/dist/Common/CustomTagSelector/PropagateTagInfo.d.ts +4 -4
  34. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +3 -3
  35. package/dist/Common/CustomTagSelector/TagDetails.d.ts +3 -2
  36. package/dist/Common/CustomTagSelector/TagLabelSelect.d.ts +3 -2
  37. package/dist/Common/CustomTagSelector/TagLabelValueSelector.d.ts +3 -2
  38. package/dist/Common/CustomTagSelector/TagSelector.utils.d.ts +12 -12
  39. package/dist/Common/CustomTagSelector/Types.d.ts +68 -68
  40. package/dist/Common/CustomTagSelector/ValidationRules.d.ts +10 -10
  41. package/dist/Common/CustomTagSelector/index.d.ts +6 -6
  42. package/dist/Common/DebouncedSearch/DebouncedSearch.d.ts +17 -15
  43. package/dist/Common/DebouncedSearch/Types.d.ts +14 -14
  44. package/dist/Common/DebouncedSearch/Utils.d.ts +1 -1
  45. package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +4 -4
  46. package/dist/Common/DeleteComponentModal/types.d.ts +15 -15
  47. package/dist/Common/DevtronProgressing/DevtronProgressing.d.ts +3 -3
  48. package/dist/Common/DevtronProgressing/index.d.ts +1 -1
  49. package/dist/Common/DevtronProgressing/types.d.ts +4 -4
  50. package/dist/Common/Dialogs/ConfirmationDialog.d.ts +9 -9
  51. package/dist/Common/Dialogs/DeleteDialog.d.ts +5 -5
  52. package/dist/Common/Dialogs/DialogForm.d.ts +14 -14
  53. package/dist/Common/Dialogs/ForceDeleteDialog.d.ts +3 -3
  54. package/dist/Common/Dialogs/Types.d.ts +45 -45
  55. package/dist/Common/Dialogs/index.d.ts +4 -4
  56. package/dist/Common/DraggableWrapper/DraggableButton.d.ts +3 -3
  57. package/dist/Common/DraggableWrapper/DraggableWrapper.d.ts +9 -9
  58. package/dist/Common/DraggableWrapper/index.d.ts +3 -3
  59. package/dist/Common/DraggableWrapper/types.d.ts +23 -23
  60. package/dist/Common/Drawer/Drawer.d.ts +16 -14
  61. package/dist/Common/EmptyState/EmptyState.d.ts +25 -24
  62. package/dist/Common/EmptyState/GenericEmptyState.d.ts +5 -4
  63. package/dist/Common/Error.d.ts +17 -17
  64. package/dist/Common/ErrorScreenNotFound.d.ts +3 -3
  65. package/dist/Common/Grid/Grid.d.ts +3 -3
  66. package/dist/Common/Grid/types.d.ts +10 -10
  67. package/dist/Common/Helper.d.ts +64 -61
  68. package/dist/Common/Hooks/UseClickOutside/UseClickOutside.d.ts +1 -1
  69. package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.d.ts +6 -6
  70. package/dist/Common/Hooks/UseSuperAdmin/types.d.ts +3 -3
  71. package/dist/Common/Hooks/UseWindowSize/UseWindowSize.d.ts +4 -4
  72. package/dist/Common/Hooks/index.d.ts +3 -3
  73. package/dist/Common/ImageTags.Types.d.ts +40 -40
  74. package/dist/Common/ImageTags.d.ts +4 -3
  75. package/dist/Common/InfoColorBar/InfoColourbar.d.ts +5 -4
  76. package/dist/Common/Modals/Modal.d.ts +3 -3
  77. package/dist/Common/Modals/OpaqueModal.d.ts +12 -12
  78. package/dist/Common/Modals/VisibleModal.d.ts +15 -15
  79. package/dist/Common/Modals/VisibleModal2.d.ts +12 -12
  80. package/dist/Common/MultiSelectCustomization.d.ts +37 -37
  81. package/dist/Common/Policy.Types.d.ts +56 -56
  82. package/dist/Common/PopupMenu.d.ts +8 -8
  83. package/dist/Common/Progressing.d.ts +4 -4
  84. package/dist/Common/RJSF/Form.d.ts +4 -2
  85. package/dist/Common/RJSF/common/FieldRow.d.ts +6 -5
  86. package/dist/Common/RJSF/common/types.d.ts +8 -8
  87. package/dist/Common/RJSF/config.d.ts +4 -4
  88. package/dist/Common/RJSF/constants.d.ts +7 -7
  89. package/dist/Common/RJSF/index.d.ts +3 -3
  90. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +3 -2
  91. package/dist/Common/RJSF/templates/ArrayFieldTemplate.d.ts +3 -2
  92. package/dist/Common/RJSF/templates/BaseInput.d.ts +3 -2
  93. package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +3 -2
  94. package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.d.ts +3 -2
  95. package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.d.ts +3 -2
  96. package/dist/Common/RJSF/templates/ButtonTemplates/index.d.ts +3 -3
  97. package/dist/Common/RJSF/templates/Description.d.ts +3 -2
  98. package/dist/Common/RJSF/templates/Field.d.ts +3 -2
  99. package/dist/Common/RJSF/templates/FieldErrorTemplate.d.ts +3 -2
  100. package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +3 -2
  101. package/dist/Common/RJSF/templates/TitleField.d.ts +3 -2
  102. package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.d.ts +3 -2
  103. package/dist/Common/RJSF/templates/index.d.ts +10 -10
  104. package/dist/Common/RJSF/types.d.ts +3 -3
  105. package/dist/Common/RJSF/utils.d.ts +26 -25
  106. package/dist/Common/RJSF/widgets/Checkbox.d.ts +3 -2
  107. package/dist/Common/RJSF/widgets/Select.d.ts +3 -2
  108. package/dist/Common/RJSF/widgets/index.d.ts +2 -2
  109. package/dist/Common/RadioGroup/RadioGroup.d.ts +17 -16
  110. package/dist/Common/RadioGroup.d.ts +8 -8
  111. package/dist/Common/Reload.d.ts +3 -3
  112. package/dist/Common/ResizableTextarea.d.ts +3 -3
  113. package/dist/Common/SearchBar/SearchBar.component.d.ts +8 -0
  114. package/dist/Common/SearchBar/types.d.ts +35 -0
  115. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +4 -3
  116. package/dist/Common/ServerError.d.ts +15 -15
  117. package/dist/Common/TippyCustomized.d.ts +4 -3
  118. package/dist/Common/ToastBody.d.ts +23 -23
  119. package/dist/Common/Toggle/Toggle.d.ts +14 -12
  120. package/dist/Common/Types.d.ts +677 -677
  121. package/dist/Common/index.d.ts +49 -50
  122. package/dist/index.d.ts +1 -1
  123. package/dist/index.js +28717 -218
  124. package/package.json +26 -31
  125. package/rollup.config.js +31 -0
  126. package/src/Assets/Icon/ic-add.svg +3 -0
  127. package/src/Assets/Icon/ic-appstatus-cancelled.svg +6 -0
  128. package/src/Assets/Icon/ic-arrow-counter-clockwise.svg +5 -0
  129. package/src/Assets/Icon/ic-check.svg +5 -0
  130. package/src/Assets/Icon/ic-chevron-down.svg +5 -0
  131. package/src/Assets/Icon/ic-copy.svg +3 -0
  132. package/src/Assets/Icon/ic-cross.svg +3 -0
  133. package/src/Assets/Icon/ic-drag.svg +8 -0
  134. package/src/Assets/Icon/ic-enter.svg +3 -0
  135. package/src/Assets/Icon/ic-error-cross.svg +8 -0
  136. package/src/Assets/Icon/ic-error-exclamation.svg +6 -0
  137. package/src/Assets/Icon/ic-error-medium.svg +6 -0
  138. package/src/Assets/Icon/ic-help-outline.svg +3 -0
  139. package/src/Assets/Icon/ic-help.svg +3 -0
  140. package/src/Assets/Icon/ic-info-filled.svg +7 -0
  141. package/src/Assets/Icon/ic-info-outlined.svg +13 -0
  142. package/src/Assets/Icon/ic-minus.svg +3 -0
  143. package/src/Assets/Icon/ic-pencil.svg +3 -0
  144. package/src/Assets/Icon/ic-progressing.svg +6 -0
  145. package/src/Assets/Icon/ic-rotate-devtron.svg +103 -0
  146. package/src/Assets/Icon/ic-search.svg +6 -0
  147. package/src/Assets/Icon/ic-warning.svg +7 -0
  148. package/src/Assets/Icon/inject-tag.svg +5 -0
  149. package/src/Assets/Img/app-not-deployed.png +0 -0
  150. package/src/Assets/Img/delete-medium.svg +15 -0
  151. package/src/Assets/Img/ic-empty-error@2x.png +0 -0
  152. package/src/Assets/Img/ic-loading-failure.png +0 -0
  153. package/src/Assets/Img/ic-not-authorized.svg +62 -0
  154. package/src/Common/AddCDButton/AddCDButton.tsx +68 -0
  155. package/src/Common/AddCDButton/index.ts +2 -0
  156. package/src/Common/AddCDButton/types.ts +38 -0
  157. package/src/Common/AddCDButton/utils.tsx +35 -0
  158. package/src/Common/Api.ts +230 -0
  159. package/src/Common/AppStatus/AppStatus.tsx +64 -0
  160. package/src/Common/AppStatus/constants.ts +53 -0
  161. package/src/Common/AppStatus/index.ts +1 -0
  162. package/src/Common/AppStatus/types.ts +12 -0
  163. package/src/Common/AppStatus/utils.ts +14 -0
  164. package/src/Common/BreadCrumb/BreadCrumb.tsx +105 -0
  165. package/src/Common/BreadCrumb/BreadcrumbStore.tsx +25 -0
  166. package/src/Common/BreadCrumb/Types.ts +30 -0
  167. package/src/Common/CIPipeline.Types.ts +277 -0
  168. package/src/Common/ChartVersionAndTypeSelector.tsx +78 -0
  169. package/src/Common/Checkbox.tsx +36 -0
  170. package/src/Common/ClipboardButton/ClipboardButton.tsx +61 -0
  171. package/src/Common/ClipboardButton/__tests__/ClipboardButton.test.tsx +43 -0
  172. package/src/Common/ClipboardButton/types.ts +7 -0
  173. package/src/Common/Common.service.ts +315 -0
  174. package/src/Common/Constants.ts +245 -0
  175. package/src/Common/CustomInput/CustomInput.tsx +131 -0
  176. package/src/Common/CustomInput/Types.ts +30 -0
  177. package/src/Common/CustomInput/index.ts +2 -0
  178. package/src/Common/CustomTagSelector/PropagateTagInfo.tsx +46 -0
  179. package/src/Common/CustomTagSelector/ResizableTagTextArea.tsx +84 -0
  180. package/src/Common/CustomTagSelector/TagDetails.tsx +76 -0
  181. package/src/Common/CustomTagSelector/TagLabelSelect.tsx +61 -0
  182. package/src/Common/CustomTagSelector/TagLabelValueSelector.tsx +198 -0
  183. package/src/Common/CustomTagSelector/TagSelector.utils.ts +71 -0
  184. package/src/Common/CustomTagSelector/Types.ts +72 -0
  185. package/src/Common/CustomTagSelector/ValidationRules.ts +58 -0
  186. package/src/Common/CustomTagSelector/index.ts +6 -0
  187. package/src/Common/DebouncedSearch/DebouncedSearch.tsx +78 -0
  188. package/src/Common/DebouncedSearch/Types.ts +13 -0
  189. package/src/Common/DebouncedSearch/Utils.ts +19 -0
  190. package/src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx +61 -0
  191. package/src/Common/DeleteComponentModal/DeleteComponent.tsx +95 -0
  192. package/src/Common/DeleteComponentModal/types.ts +15 -0
  193. package/src/Common/DevtronProgressing/DevtronProgressing.tsx +11 -0
  194. package/src/Common/DevtronProgressing/index.ts +1 -0
  195. package/src/Common/DevtronProgressing/types.ts +4 -0
  196. package/src/Common/Dialogs/ConfirmationDialog.tsx +34 -0
  197. package/src/Common/Dialogs/DeleteDialog.tsx +69 -0
  198. package/src/Common/Dialogs/DialogForm.tsx +86 -0
  199. package/src/Common/Dialogs/ForceDeleteDialog.tsx +19 -0
  200. package/src/Common/Dialogs/Types.ts +47 -0
  201. package/src/Common/Dialogs/index.ts +4 -0
  202. package/src/Common/DraggableWrapper/DraggableButton.tsx +14 -0
  203. package/src/Common/DraggableWrapper/DraggableWrapper.tsx +116 -0
  204. package/src/Common/DraggableWrapper/index.ts +3 -0
  205. package/src/Common/DraggableWrapper/types.ts +27 -0
  206. package/src/Common/Drawer/Drawer.scss +40 -0
  207. package/src/Common/Drawer/Drawer.tsx +49 -0
  208. package/src/Common/EmptyState/EmptyState.tsx +42 -0
  209. package/src/Common/EmptyState/GenericEmptyState.tsx +49 -0
  210. package/src/Common/EmptyState/emptyState.scss +74 -0
  211. package/src/Common/Error.tsx +61 -0
  212. package/src/Common/ErrorScreenNotFound.tsx +31 -0
  213. package/src/Common/Grid/Grid.tsx +44 -0
  214. package/src/Common/Grid/types.ts +11 -0
  215. package/src/Common/Helper.tsx +576 -0
  216. package/src/Common/Hooks/UseClickOutside/UseClickOutside.tsx +15 -0
  217. package/src/Common/Hooks/UseSuperAdmin/UseSuperAdmin.tsx +24 -0
  218. package/src/Common/Hooks/UseSuperAdmin/types.ts +3 -0
  219. package/src/Common/Hooks/UseWindowSize/UseWindowSize.tsx +31 -0
  220. package/src/Common/Hooks/index.ts +3 -0
  221. package/src/Common/ImageTags.Types.ts +44 -0
  222. package/src/Common/ImageTags.tsx +586 -0
  223. package/src/Common/InfoColorBar/InfoColourbar.tsx +80 -0
  224. package/src/Common/InfoColorBar/infoColourBar.scss +28 -0
  225. package/src/Common/Modals/Modal.tsx +68 -0
  226. package/src/Common/Modals/OpaqueModal.tsx +36 -0
  227. package/src/Common/Modals/VisibleModal.tsx +55 -0
  228. package/src/Common/Modals/VisibleModal2.tsx +35 -0
  229. package/src/Common/MultiSelectCustomization.tsx +148 -0
  230. package/src/Common/Policy.Types.ts +63 -0
  231. package/src/Common/PopupMenu.tsx +199 -0
  232. package/src/Common/Progressing.tsx +53 -0
  233. package/src/Common/RJSF/Form.tsx +29 -0
  234. package/src/Common/RJSF/common/FieldRow.tsx +35 -0
  235. package/src/Common/RJSF/common/types.ts +9 -0
  236. package/src/Common/RJSF/config.ts +37 -0
  237. package/src/Common/RJSF/constants.ts +10 -0
  238. package/src/Common/RJSF/index.ts +3 -0
  239. package/src/Common/RJSF/rjsfForm.scss +18 -0
  240. package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +31 -0
  241. package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +78 -0
  242. package/src/Common/RJSF/templates/BaseInput.tsx +16 -0
  243. package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +18 -0
  244. package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +10 -0
  245. package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +18 -0
  246. package/src/Common/RJSF/templates/ButtonTemplates/index.ts +3 -0
  247. package/src/Common/RJSF/templates/Description.tsx +12 -0
  248. package/src/Common/RJSF/templates/Field.tsx +30 -0
  249. package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +25 -0
  250. package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +105 -0
  251. package/src/Common/RJSF/templates/TitleField.tsx +9 -0
  252. package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +51 -0
  253. package/src/Common/RJSF/templates/index.ts +10 -0
  254. package/src/Common/RJSF/types.ts +4 -0
  255. package/src/Common/RJSF/utils.ts +123 -0
  256. package/src/Common/RJSF/widgets/Checkbox.tsx +44 -0
  257. package/src/Common/RJSF/widgets/Select.tsx +77 -0
  258. package/src/Common/RJSF/widgets/index.ts +2 -0
  259. package/src/Common/RadioGroup/RadioGroup.tsx +105 -0
  260. package/src/Common/RadioGroup/radioGroup.scss +46 -0
  261. package/src/Common/RadioGroup.tsx +53 -0
  262. package/src/Common/Reload.tsx +23 -0
  263. package/src/Common/ResizableTextarea.tsx +73 -0
  264. package/src/Common/SearchBar/SearchBar.component.tsx +79 -0
  265. package/src/Common/SearchBar/searchBar.scss +65 -0
  266. package/src/Common/SearchBar/types.ts +36 -0
  267. package/src/Common/Security/ScanVulnerabilitiesTable.tsx +55 -0
  268. package/src/Common/Security/scanVulnerabilities.css +69 -0
  269. package/src/Common/ServerError.ts +31 -0
  270. package/src/Common/TippyCustomized.tsx +172 -0
  271. package/src/Common/ToastBody.tsx +62 -0
  272. package/src/Common/Toggle/Toggle.scss +78 -0
  273. package/src/Common/Toggle/Toggle.tsx +50 -0
  274. package/src/Common/Types.ts +750 -0
  275. package/src/Common/index.ts +49 -0
  276. package/src/custom.d.ts +13 -0
  277. package/src/index.ts +1 -0
  278. package/tsconfig.json +40 -0
  279. package/dist/BaseInput-8101e714.js +0 -1686
  280. package/dist/CodeEditor-68cd2e5b.js +0 -103676
  281. package/dist/Common/AddCDButton/AddCDButton.js +0 -61
  282. package/dist/Common/AddCDButton/index.js +0 -6
  283. package/dist/Common/AddCDButton/types.js +0 -1
  284. package/dist/Common/AddCDButton/utils.js +0 -19
  285. package/dist/Common/Api.js +0 -167
  286. package/dist/Common/AppStatus/AppStatus.js +0 -37
  287. package/dist/Common/AppStatus/constants.js +0 -37
  288. package/dist/Common/AppStatus/index.js +0 -4
  289. package/dist/Common/AppStatus/types.js +0 -1
  290. package/dist/Common/AppStatus/utils.js +0 -8
  291. package/dist/Common/BreadCrumb/BreadCrumb.js +0 -71
  292. package/dist/Common/BreadCrumb/BreadcrumbStore.js +0 -22
  293. package/dist/Common/BreadCrumb/Types.js +0 -1
  294. package/dist/Common/CIPipeline.Types.js +0 -10
  295. package/dist/Common/ChartVersionAndTypeSelector.js +0 -61
  296. package/dist/Common/Checkbox.js +0 -28
  297. package/dist/Common/ClipboardButton/ClipboardButton.js +0 -40
  298. package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.d.ts +0 -1
  299. package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.js +0 -27
  300. package/dist/Common/ClipboardButton/types.js +0 -1
  301. package/dist/Common/CodeEditor/CodeEditor.d.ts +0 -47
  302. package/dist/Common/CodeEditor/CodeEditor.js +0 -15
  303. package/dist/Common/Common.service.js +0 -191
  304. package/dist/Common/Constants.js +0 -234
  305. package/dist/Common/CustomInput/CustomInput.js +0 -80
  306. package/dist/Common/CustomInput/Types.js +0 -1
  307. package/dist/Common/CustomInput/index.js +0 -4
  308. package/dist/Common/CustomTagSelector/PropagateTagInfo.js +0 -43
  309. package/dist/Common/CustomTagSelector/ResizableTagTextArea.js +0 -58
  310. package/dist/Common/CustomTagSelector/TagDetails.js +0 -65
  311. package/dist/Common/CustomTagSelector/TagLabelSelect.js +0 -50
  312. package/dist/Common/CustomTagSelector/TagLabelValueSelector.js +0 -121
  313. package/dist/Common/CustomTagSelector/TagSelector.utils.js +0 -61
  314. package/dist/Common/CustomTagSelector/Types.js +0 -1
  315. package/dist/Common/CustomTagSelector/ValidationRules.js +0 -35
  316. package/dist/Common/CustomTagSelector/index.js +0 -12
  317. package/dist/Common/DebouncedSearch/DebouncedSearch.js +0 -7
  318. package/dist/Common/DebouncedSearch/Types.js +0 -1
  319. package/dist/Common/DebouncedSearch/Utils.js +0 -19
  320. package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.d.ts +0 -1
  321. package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.js +0 -33
  322. package/dist/Common/DeleteComponentModal/DeleteComponent.js +0 -63
  323. package/dist/Common/DeleteComponentModal/types.js +0 -1
  324. package/dist/Common/DevtronProgressing/DevtronProgressing.js +0 -98
  325. package/dist/Common/DevtronProgressing/index.js +0 -4
  326. package/dist/Common/DevtronProgressing/types.js +0 -1
  327. package/dist/Common/Dialogs/ConfirmationDialog.js +0 -24
  328. package/dist/Common/Dialogs/DeleteDialog.js +0 -49
  329. package/dist/Common/Dialogs/DialogForm.js +0 -63
  330. package/dist/Common/Dialogs/ForceDeleteDialog.js +0 -23
  331. package/dist/Common/Dialogs/Types.js +0 -1
  332. package/dist/Common/Dialogs/index.js +0 -11
  333. package/dist/Common/DraggableWrapper/DraggableButton.js +0 -16
  334. package/dist/Common/DraggableWrapper/DraggableWrapper.js +0 -1499
  335. package/dist/Common/DraggableWrapper/index.js +0 -8
  336. package/dist/Common/DraggableWrapper/types.js +0 -4
  337. package/dist/Common/Drawer/Drawer.js +0 -22
  338. package/dist/Common/EmptyState/EmptyState.js +0 -32
  339. package/dist/Common/EmptyState/GenericEmptyState.js +0 -52
  340. package/dist/Common/Error.js +0 -49
  341. package/dist/Common/ErrorScreenNotFound.js +0 -23
  342. package/dist/Common/Grid/Grid.js +0 -31
  343. package/dist/Common/Grid/types.js +0 -1
  344. package/dist/Common/Helper.js +0 -38
  345. package/dist/Common/Hooks/UseClickOutside/UseClickOutside.js +0 -14
  346. package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.js +0 -16
  347. package/dist/Common/Hooks/UseSuperAdmin/types.js +0 -1
  348. package/dist/Common/Hooks/UseWindowSize/UseWindowSize.js +0 -17
  349. package/dist/Common/Hooks/index.js +0 -8
  350. package/dist/Common/ImageTags.Types.js +0 -1
  351. package/dist/Common/ImageTags.js +0 -381
  352. package/dist/Common/InfoColorBar/InfoColourbar.js +0 -65
  353. package/dist/Common/Modals/Modal.js +0 -48
  354. package/dist/Common/Modals/OpaqueModal.js +0 -32
  355. package/dist/Common/Modals/VisibleModal.js +0 -31
  356. package/dist/Common/Modals/VisibleModal2.js +0 -31
  357. package/dist/Common/MultiSelectCustomization.js +0 -97
  358. package/dist/Common/Policy.Types.js +0 -6
  359. package/dist/Common/PopupMenu.js +0 -148
  360. package/dist/Common/Progressing.js +0 -52
  361. package/dist/Common/RJSF/Form.js +0 -9888
  362. package/dist/Common/RJSF/common/FieldRow.js +0 -25
  363. package/dist/Common/RJSF/common/types.js +0 -1
  364. package/dist/Common/RJSF/config.js +0 -33
  365. package/dist/Common/RJSF/constants.js +0 -10
  366. package/dist/Common/RJSF/index.js +0 -7
  367. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.js +0 -30
  368. package/dist/Common/RJSF/templates/ArrayFieldTemplate.js +0 -63
  369. package/dist/Common/RJSF/templates/BaseInput.js +0 -8
  370. package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.js +0 -18
  371. package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.js +0 -6
  372. package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.js +0 -19
  373. package/dist/Common/RJSF/templates/ButtonTemplates/index.js +0 -8
  374. package/dist/Common/RJSF/templates/Description.js +0 -9
  375. package/dist/Common/RJSF/templates/Field.js +0 -21
  376. package/dist/Common/RJSF/templates/FieldErrorTemplate.js +0 -15
  377. package/dist/Common/RJSF/templates/ObjectFieldTemplate.js +0 -76
  378. package/dist/Common/RJSF/templates/TitleField.js +0 -8
  379. package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.js +0 -44
  380. package/dist/Common/RJSF/templates/index.js +0 -26
  381. package/dist/Common/RJSF/types.js +0 -1
  382. package/dist/Common/RJSF/utils.js +0 -98
  383. package/dist/Common/RJSF/widgets/Checkbox.js +0 -39
  384. package/dist/Common/RJSF/widgets/Select.js +0 -56
  385. package/dist/Common/RJSF/widgets/index.js +0 -6
  386. package/dist/Common/RadioGroup/RadioGroup.js +0 -76
  387. package/dist/Common/RadioGroup.js +0 -47
  388. package/dist/Common/Reload.js +0 -16
  389. package/dist/Common/ResizableTextarea.js +0 -60
  390. package/dist/Common/Security/ScanVulnerabilitiesTable.js +0 -49
  391. package/dist/Common/Select/Select.d.ts +0 -4
  392. package/dist/Common/Select/Select.js +0 -131
  393. package/dist/Common/Select/types.d.ts +0 -29
  394. package/dist/Common/Select/types.js +0 -1
  395. package/dist/Common/ServerError.js +0 -26
  396. package/dist/Common/TippyCustomized.js +0 -10
  397. package/dist/Common/ToastBody.js +0 -41
  398. package/dist/Common/Toggle/Toggle.js +0 -40
  399. package/dist/Common/Types.js +0 -24
  400. package/dist/Common/UseWindowSize.d.ts +0 -4
  401. package/dist/Common/UseWindowSize.js +0 -20
  402. package/dist/Common/index.js +0 -219
  403. package/dist/DebouncedSearch-065f3ac2.js +0 -58
  404. package/dist/Helper-1f1cf2ba.js +0 -9824
  405. package/dist/TippyCustomized-0d0b9a6f.js +0 -124
  406. package/dist/_commonjsHelpers-c5d32002.js +0 -30
  407. package/dist/abap-9f67f57a.js +0 -1314
  408. package/dist/apex-ff62e532.js +0 -315
  409. package/dist/assets/CodeEditor.css +0 -1
  410. package/dist/assets/Drawer.css +0 -1
  411. package/dist/assets/Form.css +0 -1
  412. package/dist/assets/InfoColourbar.css +0 -1
  413. package/dist/assets/RadioGroup.css +0 -1
  414. package/dist/assets/ScanVulnerabilitiesTable.css +0 -1
  415. package/dist/assets/Select.css +0 -1
  416. package/dist/assets/TippyCustomized.css +0 -1
  417. package/dist/assets/Toggle.css +0 -1
  418. package/dist/assets/editor.worker-d26000ef.js +0 -9
  419. package/dist/assets/emptyState.css +0 -1
  420. package/dist/assets/json.worker-f23a4654.js +0 -40
  421. package/dist/assets/yaml.worker-64fecd27.js +0 -463
  422. package/dist/azcli-31e64a7f.js +0 -74
  423. package/dist/bat-0ffe897e.js +0 -95
  424. package/dist/bicep-3414a2b1.js +0 -108
  425. package/dist/cameligo-df1f3f25.js +0 -168
  426. package/dist/canExpand-ab1f6741.js +0 -10
  427. package/dist/clojure-65b0f010.js +0 -754
  428. package/dist/coffee-437f0fba.js +0 -228
  429. package/dist/cpp-66843dd5.js +0 -390
  430. package/dist/csharp-621d9a49.js +0 -320
  431. package/dist/csp-de0d5244.js +0 -57
  432. package/dist/css-7cd5ed4c.js +0 -186
  433. package/dist/cssMode-7289250b.js +0 -1446
  434. package/dist/cypher-70ad96fe.js +0 -262
  435. package/dist/dart-33ae3739.js +0 -270
  436. package/dist/dockerfile-f2274a50.js +0 -132
  437. package/dist/ecl-3b8294a3.js +0 -454
  438. package/dist/elixir-b9dcc73a.js +0 -489
  439. package/dist/englishStringTranslator-2c9a30fc.js +0 -17
  440. package/dist/enums-d0bd3f97.js +0 -6618
  441. package/dist/extends-70f3d2a3.js +0 -13
  442. package/dist/flow9-bdde8316.js +0 -141
  443. package/dist/freemarker2-3b903d5b.js +0 -643
  444. package/dist/fsharp-eac2e449.js +0 -210
  445. package/dist/getSubmitButtonOptions-a1be9bb0.js +0 -20
  446. package/dist/getTemplate-91d3260d.js +0 -11
  447. package/dist/getUiOptions-844b45a7.js +0 -10
  448. package/dist/go-d12ed8d4.js +0 -208
  449. package/dist/graphql-c7356b69.js +0 -141
  450. package/dist/handlebars-702717e9.js +0 -391
  451. package/dist/hcl-e883a0d4.js +0 -177
  452. package/dist/html-9a684e15.js +0 -281
  453. package/dist/htmlMode-3e336aa8.js +0 -1456
  454. package/dist/ic-add-4787ded5.js +0 -5
  455. package/dist/ic-chevron-down-eb7fd953.js +0 -6
  456. package/dist/ic-copy-118b83dc.js +0 -5
  457. package/dist/ic-cross-0e71861d.js +0 -6
  458. package/dist/ic-error-exclamation-5f9af461.js +0 -5
  459. package/dist/ic-info-filled-31a15add.js +0 -6
  460. package/dist/ic-info-outlined-8fa45e87.js +0 -5
  461. package/dist/ic-warning-42534af1.js +0 -5
  462. package/dist/idGenerators-0b33693c.js +0 -35
  463. package/dist/index-5a231705.js +0 -17417
  464. package/dist/index-c855d89c.js +0 -173
  465. package/dist/ini-425ab711.js +0 -68
  466. package/dist/inject-tag-824bf92c.js +0 -5
  467. package/dist/java-2bc0fd68.js +0 -221
  468. package/dist/javascript-101cb9b7.js +0 -75
  469. package/dist/jsonMode-006d8be9.js +0 -1867
  470. package/dist/julia-1c932615.js +0 -496
  471. package/dist/kotlin-1ab839c8.js +0 -245
  472. package/dist/less-6fe856f5.js +0 -168
  473. package/dist/lexon-4955ac52.js +0 -151
  474. package/dist/liquid-729ea99d.js +0 -238
  475. package/dist/lua-3cca0047.js +0 -157
  476. package/dist/m3-132e9cb6.js +0 -210
  477. package/dist/markdown-ea59a0c1.js +0 -202
  478. package/dist/mips-19811f4b.js +0 -194
  479. package/dist/msdax-69954a10.js +0 -377
  480. package/dist/mysql-82088e5d.js +0 -876
  481. package/dist/objective-c-1976eccc.js +0 -188
  482. package/dist/pascal-8ef177cb.js +0 -245
  483. package/dist/pascaligo-bc517b9e.js +0 -158
  484. package/dist/perl-8b93582c.js +0 -599
  485. package/dist/pgsql-00c11a6d.js +0 -847
  486. package/dist/php-4c8c276f.js +0 -471
  487. package/dist/pla-e9b4ffb1.js +0 -131
  488. package/dist/postiats-2071af8c.js +0 -544
  489. package/dist/powerquery-8e388ceb.js +0 -890
  490. package/dist/powershell-e35db398.js +0 -233
  491. package/dist/protobuf-a24b9176.js +0 -422
  492. package/dist/pug-2c94d9b8.js +0 -393
  493. package/dist/python-c9b92f72.js +0 -259
  494. package/dist/qsharp-d730d7fe.js +0 -282
  495. package/dist/r-be193556.js +0 -245
  496. package/dist/razor-c48ef378.js +0 -512
  497. package/dist/react-select.esm-fa95915b.js +0 -3992
  498. package/dist/react-toastify.esm-e28f7200.js +0 -798
  499. package/dist/react.esm-9335a421.js +0 -13150
  500. package/dist/redis-9690c6ac.js +0 -298
  501. package/dist/redshift-6bdcdeaa.js +0 -806
  502. package/dist/restructuredtext-a08c1d20.js +0 -162
  503. package/dist/ruby-2247692b.js +0 -444
  504. package/dist/rust-1dffb4d5.js +0 -337
  505. package/dist/sb-136598e9.js +0 -110
  506. package/dist/scala-b1100fed.js +0 -353
  507. package/dist/scheme-038c8094.js +0 -114
  508. package/dist/scss-700d1b52.js +0 -244
  509. package/dist/shell-86c16e0f.js +0 -224
  510. package/dist/solidity-c05fdf3c.js +0 -1351
  511. package/dist/sophia-cd645d71.js +0 -190
  512. package/dist/sparql-01d9ec9c.js +0 -193
  513. package/dist/sql-4c33df41.js +0 -818
  514. package/dist/st-52cf1408.js +0 -414
  515. package/dist/swift-13c792ba.js +0 -315
  516. package/dist/systemverilog-0bd8b730.js +0 -556
  517. package/dist/tcl-463d7c75.js +0 -232
  518. package/dist/tippy-react.esm-d5c56a0a.js +0 -2018
  519. package/dist/tsMode-da78a323.js +0 -811
  520. package/dist/twig-0d98f5ec.js +0 -323
  521. package/dist/typescript-bd6d35ce.js +0 -328
  522. package/dist/vb-3a2b0a51.js +0 -364
  523. package/dist/wgsl-b2ddb3e4.js +0 -420
  524. package/dist/xml-828eca7a.js +0 -95
  525. package/dist/yaml-89980d67.js +0 -184
@@ -1,1499 +0,0 @@
1
- import { jsx as ge } from "react/jsx-runtime";
2
- import Ie, { useRef as ze, useState as Ke, useEffect as Je } from "react";
3
- import { a as Ze, g as Qe } from "../../_commonjsHelpers-c5d32002.js";
4
- import { r as Xe } from "../../index-c855d89c.js";
5
- import { a as et, r as Ae } from "../../index-5a231705.js";
6
- import { c as tt } from "../../react-toastify.esm-e28f7200.js";
7
- import { DraggablePositionVariant as nt } from "./types.js";
8
- import "../../Helper-1f1cf2ba.js";
9
- import { MAX_Z_INDEX as rt } from "../Constants.js";
10
- import { useWindowSize as ot } from "../Hooks/UseWindowSize/UseWindowSize.js";
11
- var ce = { exports: {} }, Be = {}, Pe = { exports: {} }, ye, _e;
12
- function Ee() {
13
- if (_e)
14
- return ye;
15
- _e = 1;
16
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
17
- return ye = e, ye;
18
- }
19
- var ve, Me;
20
- function Ue() {
21
- return Me || (Me = 1, ve = Function.call.bind(Object.prototype.hasOwnProperty)), ve;
22
- }
23
- var me, Re;
24
- function it() {
25
- if (Re)
26
- return me;
27
- Re = 1;
28
- var e = function() {
29
- };
30
- if (process.env.NODE_ENV !== "production") {
31
- var t = Ee(), n = {}, r = Ue();
32
- e = function(a) {
33
- var f = "Warning: " + a;
34
- typeof console < "u" && console.error(f);
35
- try {
36
- throw new Error(f);
37
- } catch {
38
- }
39
- };
40
- }
41
- function i(a, f, l, d, O) {
42
- if (process.env.NODE_ENV !== "production") {
43
- for (var x in a)
44
- if (r(a, x)) {
45
- var W;
46
- try {
47
- if (typeof a[x] != "function") {
48
- var U = Error(
49
- (d || "React class") + ": " + l + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
50
- );
51
- throw U.name = "Invariant Violation", U;
52
- }
53
- W = a[x](f, x, d, l, null, t);
54
- } catch (C) {
55
- W = C;
56
- }
57
- if (W && !(W instanceof Error) && e(
58
- (d || "React class") + ": type specification of " + l + " `" + x + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof W + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
59
- ), W instanceof Error && !(W.message in n)) {
60
- n[W.message] = !0;
61
- var Y = O ? O() : "";
62
- e(
63
- "Failed " + l + " type: " + W.message + (Y ?? "")
64
- );
65
- }
66
- }
67
- }
68
- }
69
- return i.resetWarningCache = function() {
70
- process.env.NODE_ENV !== "production" && (n = {});
71
- }, me = i, me;
72
- }
73
- var be, Ne;
74
- function at() {
75
- if (Ne)
76
- return be;
77
- Ne = 1;
78
- var e = Xe, t = et(), n = Ee(), r = Ue(), i = it(), a = function() {
79
- };
80
- process.env.NODE_ENV !== "production" && (a = function(l) {
81
- var d = "Warning: " + l;
82
- typeof console < "u" && console.error(d);
83
- try {
84
- throw new Error(d);
85
- } catch {
86
- }
87
- });
88
- function f() {
89
- return null;
90
- }
91
- return be = function(l, d) {
92
- var O = typeof Symbol == "function" && Symbol.iterator, x = "@@iterator";
93
- function W(o) {
94
- var s = o && (O && o[O] || o[x]);
95
- if (typeof s == "function")
96
- return s;
97
- }
98
- var U = "<<anonymous>>", Y = {
99
- array: N("array"),
100
- bigint: N("bigint"),
101
- bool: N("boolean"),
102
- func: N("function"),
103
- number: N("number"),
104
- object: N("object"),
105
- string: N("string"),
106
- symbol: N("symbol"),
107
- any: u(),
108
- arrayOf: c,
109
- element: g(),
110
- elementType: h(),
111
- instanceOf: R,
112
- node: G(),
113
- objectOf: H,
114
- oneOf: D,
115
- oneOfType: Z,
116
- shape: ie,
117
- exact: he
118
- };
119
- function C(o, s) {
120
- return o === s ? o !== 0 || 1 / o === 1 / s : o !== o && s !== s;
121
- }
122
- function E(o, s) {
123
- this.message = o, this.data = s && typeof s == "object" ? s : {}, this.stack = "";
124
- }
125
- E.prototype = Error.prototype;
126
- function M(o) {
127
- if (process.env.NODE_ENV !== "production")
128
- var s = {}, b = 0;
129
- function v(w, y, m, S, P, T, j) {
130
- if (S = S || U, T = T || m, j !== n) {
131
- if (d) {
132
- var A = new Error(
133
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
134
- );
135
- throw A.name = "Invariant Violation", A;
136
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
137
- var ne = S + ":" + m;
138
- !s[ne] && // Avoid spamming the console because they are often not actionable except for lib authors
139
- b < 3 && (a(
140
- "You are manually calling a React.PropTypes validation function for the `" + T + "` prop on `" + S + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
141
- ), s[ne] = !0, b++);
142
- }
143
- }
144
- return y[m] == null ? w ? y[m] === null ? new E("The " + P + " `" + T + "` is marked as required " + ("in `" + S + "`, but its value is `null`.")) : new E("The " + P + " `" + T + "` is marked as required in " + ("`" + S + "`, but its value is `undefined`.")) : null : o(y, m, S, P, T);
145
- }
146
- var p = v.bind(null, !1);
147
- return p.isRequired = v.bind(null, !0), p;
148
- }
149
- function N(o) {
150
- function s(b, v, p, w, y, m) {
151
- var S = b[v], P = V(S);
152
- if (P !== o) {
153
- var T = z(S);
154
- return new E(
155
- "Invalid " + w + " `" + y + "` of type " + ("`" + T + "` supplied to `" + p + "`, expected ") + ("`" + o + "`."),
156
- { expectedType: o }
157
- );
158
- }
159
- return null;
160
- }
161
- return M(s);
162
- }
163
- function u() {
164
- return M(f);
165
- }
166
- function c(o) {
167
- function s(b, v, p, w, y) {
168
- if (typeof o != "function")
169
- return new E("Property `" + y + "` of component `" + p + "` has invalid PropType notation inside arrayOf.");
170
- var m = b[v];
171
- if (!Array.isArray(m)) {
172
- var S = V(m);
173
- return new E("Invalid " + w + " `" + y + "` of type " + ("`" + S + "` supplied to `" + p + "`, expected an array."));
174
- }
175
- for (var P = 0; P < m.length; P++) {
176
- var T = o(m, P, p, w, y + "[" + P + "]", n);
177
- if (T instanceof Error)
178
- return T;
179
- }
180
- return null;
181
- }
182
- return M(s);
183
- }
184
- function g() {
185
- function o(s, b, v, p, w) {
186
- var y = s[b];
187
- if (!l(y)) {
188
- var m = V(y);
189
- return new E("Invalid " + p + " `" + w + "` of type " + ("`" + m + "` supplied to `" + v + "`, expected a single ReactElement."));
190
- }
191
- return null;
192
- }
193
- return M(o);
194
- }
195
- function h() {
196
- function o(s, b, v, p, w) {
197
- var y = s[b];
198
- if (!e.isValidElementType(y)) {
199
- var m = V(y);
200
- return new E("Invalid " + p + " `" + w + "` of type " + ("`" + m + "` supplied to `" + v + "`, expected a single ReactElement type."));
201
- }
202
- return null;
203
- }
204
- return M(o);
205
- }
206
- function R(o) {
207
- function s(b, v, p, w, y) {
208
- if (!(b[v] instanceof o)) {
209
- var m = o.name || U, S = ue(b[v]);
210
- return new E("Invalid " + w + " `" + y + "` of type " + ("`" + S + "` supplied to `" + p + "`, expected ") + ("instance of `" + m + "`."));
211
- }
212
- return null;
213
- }
214
- return M(s);
215
- }
216
- function D(o) {
217
- if (!Array.isArray(o))
218
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
219
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
220
- ) : a("Invalid argument supplied to oneOf, expected an array.")), f;
221
- function s(b, v, p, w, y) {
222
- for (var m = b[v], S = 0; S < o.length; S++)
223
- if (C(m, o[S]))
224
- return null;
225
- var P = JSON.stringify(o, function(j, A) {
226
- var ne = z(A);
227
- return ne === "symbol" ? String(A) : A;
228
- });
229
- return new E("Invalid " + w + " `" + y + "` of value `" + String(m) + "` " + ("supplied to `" + p + "`, expected one of " + P + "."));
230
- }
231
- return M(s);
232
- }
233
- function H(o) {
234
- function s(b, v, p, w, y) {
235
- if (typeof o != "function")
236
- return new E("Property `" + y + "` of component `" + p + "` has invalid PropType notation inside objectOf.");
237
- var m = b[v], S = V(m);
238
- if (S !== "object")
239
- return new E("Invalid " + w + " `" + y + "` of type " + ("`" + S + "` supplied to `" + p + "`, expected an object."));
240
- for (var P in m)
241
- if (r(m, P)) {
242
- var T = o(m, P, p, w, y + "." + P, n);
243
- if (T instanceof Error)
244
- return T;
245
- }
246
- return null;
247
- }
248
- return M(s);
249
- }
250
- function Z(o) {
251
- if (!Array.isArray(o))
252
- return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), f;
253
- for (var s = 0; s < o.length; s++) {
254
- var b = o[s];
255
- if (typeof b != "function")
256
- return a(
257
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(b) + " at index " + s + "."
258
- ), f;
259
- }
260
- function v(p, w, y, m, S) {
261
- for (var P = [], T = 0; T < o.length; T++) {
262
- var j = o[T], A = j(p, w, y, m, S, n);
263
- if (A == null)
264
- return null;
265
- A.data && r(A.data, "expectedType") && P.push(A.data.expectedType);
266
- }
267
- var ne = P.length > 0 ? ", expected one of type [" + P.join(", ") + "]" : "";
268
- return new E("Invalid " + m + " `" + S + "` supplied to " + ("`" + y + "`" + ne + "."));
269
- }
270
- return M(v);
271
- }
272
- function G() {
273
- function o(s, b, v, p, w) {
274
- return ee(s[b]) ? null : new E("Invalid " + p + " `" + w + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
275
- }
276
- return M(o);
277
- }
278
- function Q(o, s, b, v, p) {
279
- return new E(
280
- (o || "React class") + ": " + s + " type `" + b + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + p + "`."
281
- );
282
- }
283
- function ie(o) {
284
- function s(b, v, p, w, y) {
285
- var m = b[v], S = V(m);
286
- if (S !== "object")
287
- return new E("Invalid " + w + " `" + y + "` of type `" + S + "` " + ("supplied to `" + p + "`, expected `object`."));
288
- for (var P in o) {
289
- var T = o[P];
290
- if (typeof T != "function")
291
- return Q(p, w, y, P, z(T));
292
- var j = T(m, P, p, w, y + "." + P, n);
293
- if (j)
294
- return j;
295
- }
296
- return null;
297
- }
298
- return M(s);
299
- }
300
- function he(o) {
301
- function s(b, v, p, w, y) {
302
- var m = b[v], S = V(m);
303
- if (S !== "object")
304
- return new E("Invalid " + w + " `" + y + "` of type `" + S + "` " + ("supplied to `" + p + "`, expected `object`."));
305
- var P = t({}, b[v], o);
306
- for (var T in P) {
307
- var j = o[T];
308
- if (r(o, T) && typeof j != "function")
309
- return Q(p, w, y, T, z(j));
310
- if (!j)
311
- return new E(
312
- "Invalid " + w + " `" + y + "` key `" + T + "` supplied to `" + p + "`.\nBad object: " + JSON.stringify(b[v], null, " ") + `
313
- Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
314
- );
315
- var A = j(m, T, p, w, y + "." + T, n);
316
- if (A)
317
- return A;
318
- }
319
- return null;
320
- }
321
- return M(s);
322
- }
323
- function ee(o) {
324
- switch (typeof o) {
325
- case "number":
326
- case "string":
327
- case "undefined":
328
- return !0;
329
- case "boolean":
330
- return !o;
331
- case "object":
332
- if (Array.isArray(o))
333
- return o.every(ee);
334
- if (o === null || l(o))
335
- return !0;
336
- var s = W(o);
337
- if (s) {
338
- var b = s.call(o), v;
339
- if (s !== o.entries) {
340
- for (; !(v = b.next()).done; )
341
- if (!ee(v.value))
342
- return !1;
343
- } else
344
- for (; !(v = b.next()).done; ) {
345
- var p = v.value;
346
- if (p && !ee(p[1]))
347
- return !1;
348
- }
349
- } else
350
- return !1;
351
- return !0;
352
- default:
353
- return !1;
354
- }
355
- }
356
- function ae(o, s) {
357
- return o === "symbol" ? !0 : s ? s["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && s instanceof Symbol : !1;
358
- }
359
- function V(o) {
360
- var s = typeof o;
361
- return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : ae(s, o) ? "symbol" : s;
362
- }
363
- function z(o) {
364
- if (typeof o > "u" || o === null)
365
- return "" + o;
366
- var s = V(o);
367
- if (s === "object") {
368
- if (o instanceof Date)
369
- return "date";
370
- if (o instanceof RegExp)
371
- return "regexp";
372
- }
373
- return s;
374
- }
375
- function se(o) {
376
- var s = z(o);
377
- switch (s) {
378
- case "array":
379
- case "object":
380
- return "an " + s;
381
- case "boolean":
382
- case "date":
383
- case "regexp":
384
- return "a " + s;
385
- default:
386
- return s;
387
- }
388
- }
389
- function ue(o) {
390
- return !o.constructor || !o.constructor.name ? U : o.constructor.name;
391
- }
392
- return Y.checkPropTypes = i, Y.resetWarningCache = i.resetWarningCache, Y.PropTypes = Y, Y;
393
- }, be;
394
- }
395
- var De, We;
396
- function st() {
397
- if (We)
398
- return De;
399
- We = 1;
400
- var e = Ee();
401
- function t() {
402
- }
403
- function n() {
404
- }
405
- return n.resetWarningCache = t, De = function() {
406
- function r(f, l, d, O, x, W) {
407
- if (W !== e) {
408
- var U = new Error(
409
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
410
- );
411
- throw U.name = "Invariant Violation", U;
412
- }
413
- }
414
- r.isRequired = r;
415
- function i() {
416
- return r;
417
- }
418
- var a = {
419
- array: r,
420
- bigint: r,
421
- bool: r,
422
- func: r,
423
- number: r,
424
- object: r,
425
- string: r,
426
- symbol: r,
427
- any: r,
428
- arrayOf: i,
429
- element: r,
430
- elementType: r,
431
- instanceOf: i,
432
- node: r,
433
- objectOf: i,
434
- oneOf: i,
435
- oneOfType: i,
436
- shape: i,
437
- exact: i,
438
- checkPropTypes: n,
439
- resetWarningCache: t
440
- };
441
- return a.PropTypes = a, a;
442
- }, De;
443
- }
444
- if (process.env.NODE_ENV !== "production") {
445
- var ut = Xe, lt = !0;
446
- Pe.exports = at()(ut.isElement, lt);
447
- } else
448
- Pe.exports = st()();
449
- var ke = Pe.exports;
450
- const ct = /* @__PURE__ */ Ze(tt);
451
- var _ = {}, $ = {};
452
- Object.defineProperty($, "__esModule", {
453
- value: !0
454
- });
455
- $.dontSetMe = gt;
456
- $.findInArray = ft;
457
- $.int = ht;
458
- $.isFunction = dt;
459
- $.isNum = pt;
460
- function ft(e, t) {
461
- for (let n = 0, r = e.length; n < r; n++)
462
- if (t.apply(t, [e[n], n, e]))
463
- return e[n];
464
- }
465
- function dt(e) {
466
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
467
- }
468
- function pt(e) {
469
- return typeof e == "number" && !isNaN(e);
470
- }
471
- function ht(e) {
472
- return parseInt(e, 10);
473
- }
474
- function gt(e, t, n) {
475
- if (e[t])
476
- return new Error("Invalid prop ".concat(t, " passed to ").concat(n, " - do not set this, set it on the child."));
477
- }
478
- var te = {};
479
- Object.defineProperty(te, "__esModule", {
480
- value: !0
481
- });
482
- te.browserPrefixToKey = je;
483
- te.browserPrefixToStyle = yt;
484
- te.default = void 0;
485
- te.getPrefix = qe;
486
- const we = ["Moz", "Webkit", "O", "ms"];
487
- function qe() {
488
- var e;
489
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
490
- if (typeof window > "u")
491
- return "";
492
- const n = (e = window.document) === null || e === void 0 || (e = e.documentElement) === null || e === void 0 ? void 0 : e.style;
493
- if (!n || t in n)
494
- return "";
495
- for (let r = 0; r < we.length; r++)
496
- if (je(t, we[r]) in n)
497
- return we[r];
498
- return "";
499
- }
500
- function je(e, t) {
501
- return t ? "".concat(t).concat(vt(e)) : e;
502
- }
503
- function yt(e, t) {
504
- return t ? "-".concat(t.toLowerCase(), "-").concat(e) : e;
505
- }
506
- function vt(e) {
507
- let t = "", n = !0;
508
- for (let r = 0; r < e.length; r++)
509
- n ? (t += e[r].toUpperCase(), n = !1) : e[r] === "-" ? n = !0 : t += e[r];
510
- return t;
511
- }
512
- te.default = qe();
513
- Object.defineProperty(_, "__esModule", {
514
- value: !0
515
- });
516
- _.addClassName = $e;
517
- _.addEvent = Dt;
518
- _.addUserSelectStyles = Rt;
519
- _.createCSSTransform = xt;
520
- _.createSVGTransform = Ct;
521
- _.getTouch = _t;
522
- _.getTouchIdentifier = Mt;
523
- _.getTranslation = Oe;
524
- _.innerHeight = Pt;
525
- _.innerWidth = Et;
526
- _.matchesSelector = He;
527
- _.matchesSelectorAndParentsTo = bt;
528
- _.offsetXYFromParent = Ot;
529
- _.outerHeight = St;
530
- _.outerWidth = Tt;
531
- _.removeClassName = Fe;
532
- _.removeEvent = wt;
533
- _.removeUserSelectStyles = Nt;
534
- var q = $, Ye = mt(te);
535
- function Le(e) {
536
- if (typeof WeakMap != "function")
537
- return null;
538
- var t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
539
- return (Le = function(r) {
540
- return r ? n : t;
541
- })(e);
542
- }
543
- function mt(e, t) {
544
- if (!t && e && e.__esModule)
545
- return e;
546
- if (e === null || typeof e != "object" && typeof e != "function")
547
- return { default: e };
548
- var n = Le(t);
549
- if (n && n.has(e))
550
- return n.get(e);
551
- var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
552
- for (var a in e)
553
- if (a !== "default" && Object.prototype.hasOwnProperty.call(e, a)) {
554
- var f = i ? Object.getOwnPropertyDescriptor(e, a) : null;
555
- f && (f.get || f.set) ? Object.defineProperty(r, a, f) : r[a] = e[a];
556
- }
557
- return r.default = e, n && n.set(e, r), r;
558
- }
559
- let le = "";
560
- function He(e, t) {
561
- return le || (le = (0, q.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(n) {
562
- return (0, q.isFunction)(e[n]);
563
- })), (0, q.isFunction)(e[le]) ? e[le](t) : !1;
564
- }
565
- function bt(e, t, n) {
566
- let r = e;
567
- do {
568
- if (He(r, t))
569
- return !0;
570
- if (r === n)
571
- return !1;
572
- r = r.parentNode;
573
- } while (r);
574
- return !1;
575
- }
576
- function Dt(e, t, n, r) {
577
- if (!e)
578
- return;
579
- const i = {
580
- capture: !0,
581
- ...r
582
- };
583
- e.addEventListener ? e.addEventListener(t, n, i) : e.attachEvent ? e.attachEvent("on" + t, n) : e["on" + t] = n;
584
- }
585
- function wt(e, t, n, r) {
586
- if (!e)
587
- return;
588
- const i = {
589
- capture: !0,
590
- ...r
591
- };
592
- e.removeEventListener ? e.removeEventListener(t, n, i) : e.detachEvent ? e.detachEvent("on" + t, n) : e["on" + t] = null;
593
- }
594
- function St(e) {
595
- let t = e.clientHeight;
596
- const n = e.ownerDocument.defaultView.getComputedStyle(e);
597
- return t += (0, q.int)(n.borderTopWidth), t += (0, q.int)(n.borderBottomWidth), t;
598
- }
599
- function Tt(e) {
600
- let t = e.clientWidth;
601
- const n = e.ownerDocument.defaultView.getComputedStyle(e);
602
- return t += (0, q.int)(n.borderLeftWidth), t += (0, q.int)(n.borderRightWidth), t;
603
- }
604
- function Pt(e) {
605
- let t = e.clientHeight;
606
- const n = e.ownerDocument.defaultView.getComputedStyle(e);
607
- return t -= (0, q.int)(n.paddingTop), t -= (0, q.int)(n.paddingBottom), t;
608
- }
609
- function Et(e) {
610
- let t = e.clientWidth;
611
- const n = e.ownerDocument.defaultView.getComputedStyle(e);
612
- return t -= (0, q.int)(n.paddingLeft), t -= (0, q.int)(n.paddingRight), t;
613
- }
614
- function Ot(e, t, n) {
615
- const i = t === t.ownerDocument.body ? {
616
- left: 0,
617
- top: 0
618
- } : t.getBoundingClientRect(), a = (e.clientX + t.scrollLeft - i.left) / n, f = (e.clientY + t.scrollTop - i.top) / n;
619
- return {
620
- x: a,
621
- y: f
622
- };
623
- }
624
- function xt(e, t) {
625
- const n = Oe(e, t, "px");
626
- return {
627
- [(0, Ye.browserPrefixToKey)("transform", Ye.default)]: n
628
- };
629
- }
630
- function Ct(e, t) {
631
- return Oe(e, t, "");
632
- }
633
- function Oe(e, t, n) {
634
- let {
635
- x: r,
636
- y: i
637
- } = e, a = "translate(".concat(r).concat(n, ",").concat(i).concat(n, ")");
638
- if (t) {
639
- const f = "".concat(typeof t.x == "string" ? t.x : t.x + n), l = "".concat(typeof t.y == "string" ? t.y : t.y + n);
640
- a = "translate(".concat(f, ", ").concat(l, ")") + a;
641
- }
642
- return a;
643
- }
644
- function _t(e, t) {
645
- return e.targetTouches && (0, q.findInArray)(e.targetTouches, (n) => t === n.identifier) || e.changedTouches && (0, q.findInArray)(e.changedTouches, (n) => t === n.identifier);
646
- }
647
- function Mt(e) {
648
- if (e.targetTouches && e.targetTouches[0])
649
- return e.targetTouches[0].identifier;
650
- if (e.changedTouches && e.changedTouches[0])
651
- return e.changedTouches[0].identifier;
652
- }
653
- function Rt(e) {
654
- if (!e)
655
- return;
656
- let t = e.getElementById("react-draggable-style-el");
657
- t || (t = e.createElement("style"), t.type = "text/css", t.id = "react-draggable-style-el", t.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
658
- `, t.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
659
- `, e.getElementsByTagName("head")[0].appendChild(t)), e.body && $e(e.body, "react-draggable-transparent-selection");
660
- }
661
- function Nt(e) {
662
- if (e)
663
- try {
664
- if (e.body && Fe(e.body, "react-draggable-transparent-selection"), e.selection)
665
- e.selection.empty();
666
- else {
667
- const t = (e.defaultView || window).getSelection();
668
- t && t.type !== "Caret" && t.removeAllRanges();
669
- }
670
- } catch {
671
- }
672
- }
673
- function $e(e, t) {
674
- e.classList ? e.classList.add(t) : e.className.match(new RegExp("(?:^|\\s)".concat(t, "(?!\\S)"))) || (e.className += " ".concat(t));
675
- }
676
- function Fe(e, t) {
677
- e.classList ? e.classList.remove(t) : e.className = e.className.replace(new RegExp("(?:^|\\s)".concat(t, "(?!\\S)"), "g"), "");
678
- }
679
- var F = {};
680
- Object.defineProperty(F, "__esModule", {
681
- value: !0
682
- });
683
- F.canDragX = It;
684
- F.canDragY = Xt;
685
- F.createCoreData = Bt;
686
- F.createDraggableData = Ut;
687
- F.getBoundPosition = Wt;
688
- F.getControlPosition = At;
689
- F.snapToGrid = Yt;
690
- var k = $, re = _;
691
- function Wt(e, t, n) {
692
- if (!e.props.bounds)
693
- return [t, n];
694
- let {
695
- bounds: r
696
- } = e.props;
697
- r = typeof r == "string" ? r : kt(r);
698
- const i = xe(e);
699
- if (typeof r == "string") {
700
- const {
701
- ownerDocument: a
702
- } = i, f = a.defaultView;
703
- let l;
704
- if (r === "parent" ? l = i.parentNode : l = a.querySelector(r), !(l instanceof f.HTMLElement))
705
- throw new Error('Bounds selector "' + r + '" could not find an element.');
706
- const d = l, O = f.getComputedStyle(i), x = f.getComputedStyle(d);
707
- r = {
708
- left: -i.offsetLeft + (0, k.int)(x.paddingLeft) + (0, k.int)(O.marginLeft),
709
- top: -i.offsetTop + (0, k.int)(x.paddingTop) + (0, k.int)(O.marginTop),
710
- right: (0, re.innerWidth)(d) - (0, re.outerWidth)(i) - i.offsetLeft + (0, k.int)(x.paddingRight) - (0, k.int)(O.marginRight),
711
- bottom: (0, re.innerHeight)(d) - (0, re.outerHeight)(i) - i.offsetTop + (0, k.int)(x.paddingBottom) - (0, k.int)(O.marginBottom)
712
- };
713
- }
714
- return (0, k.isNum)(r.right) && (t = Math.min(t, r.right)), (0, k.isNum)(r.bottom) && (n = Math.min(n, r.bottom)), (0, k.isNum)(r.left) && (t = Math.max(t, r.left)), (0, k.isNum)(r.top) && (n = Math.max(n, r.top)), [t, n];
715
- }
716
- function Yt(e, t, n) {
717
- const r = Math.round(t / e[0]) * e[0], i = Math.round(n / e[1]) * e[1];
718
- return [r, i];
719
- }
720
- function It(e) {
721
- return e.props.axis === "both" || e.props.axis === "x";
722
- }
723
- function Xt(e) {
724
- return e.props.axis === "both" || e.props.axis === "y";
725
- }
726
- function At(e, t, n) {
727
- const r = typeof t == "number" ? (0, re.getTouch)(e, t) : null;
728
- if (typeof t == "number" && !r)
729
- return null;
730
- const i = xe(n), a = n.props.offsetParent || i.offsetParent || i.ownerDocument.body;
731
- return (0, re.offsetXYFromParent)(r || e, a, n.props.scale);
732
- }
733
- function Bt(e, t, n) {
734
- const r = !(0, k.isNum)(e.lastX), i = xe(e);
735
- return r ? {
736
- node: i,
737
- deltaX: 0,
738
- deltaY: 0,
739
- lastX: t,
740
- lastY: n,
741
- x: t,
742
- y: n
743
- } : {
744
- node: i,
745
- deltaX: t - e.lastX,
746
- deltaY: n - e.lastY,
747
- lastX: e.lastX,
748
- lastY: e.lastY,
749
- x: t,
750
- y: n
751
- };
752
- }
753
- function Ut(e, t) {
754
- const n = e.props.scale;
755
- return {
756
- node: t.node,
757
- x: e.state.x + t.deltaX / n,
758
- y: e.state.y + t.deltaY / n,
759
- deltaX: t.deltaX / n,
760
- deltaY: t.deltaY / n,
761
- lastX: e.state.x,
762
- lastY: e.state.y
763
- };
764
- }
765
- function kt(e) {
766
- return {
767
- left: e.left,
768
- top: e.top,
769
- right: e.right,
770
- bottom: e.bottom
771
- };
772
- }
773
- function xe(e) {
774
- const t = e.findDOMNode();
775
- if (!t)
776
- throw new Error("<DraggableCore>: Unmounted during event!");
777
- return t;
778
- }
779
- var fe = {}, de = {};
780
- Object.defineProperty(de, "__esModule", {
781
- value: !0
782
- });
783
- de.default = qt;
784
- function qt() {
785
- }
786
- Object.defineProperty(fe, "__esModule", {
787
- value: !0
788
- });
789
- fe.default = void 0;
790
- var Se = Lt(Ie), B = Ce(ke), jt = Ce(Ae), I = _, K = F, Te = $, oe = Ce(de);
791
- function Ce(e) {
792
- return e && e.__esModule ? e : { default: e };
793
- }
794
- function Ve(e) {
795
- if (typeof WeakMap != "function")
796
- return null;
797
- var t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
798
- return (Ve = function(r) {
799
- return r ? n : t;
800
- })(e);
801
- }
802
- function Lt(e, t) {
803
- if (!t && e && e.__esModule)
804
- return e;
805
- if (e === null || typeof e != "object" && typeof e != "function")
806
- return { default: e };
807
- var n = Ve(t);
808
- if (n && n.has(e))
809
- return n.get(e);
810
- var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
811
- for (var a in e)
812
- if (a !== "default" && Object.prototype.hasOwnProperty.call(e, a)) {
813
- var f = i ? Object.getOwnPropertyDescriptor(e, a) : null;
814
- f && (f.get || f.set) ? Object.defineProperty(r, a, f) : r[a] = e[a];
815
- }
816
- return r.default = e, n && n.set(e, r), r;
817
- }
818
- function X(e, t, n) {
819
- return t = Ht(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
820
- }
821
- function Ht(e) {
822
- var t = $t(e, "string");
823
- return typeof t == "symbol" ? t : String(t);
824
- }
825
- function $t(e, t) {
826
- if (typeof e != "object" || e === null)
827
- return e;
828
- var n = e[Symbol.toPrimitive];
829
- if (n !== void 0) {
830
- var r = n.call(e, t || "default");
831
- if (typeof r != "object")
832
- return r;
833
- throw new TypeError("@@toPrimitive must return a primitive value.");
834
- }
835
- return (t === "string" ? String : Number)(e);
836
- }
837
- const L = {
838
- touch: {
839
- start: "touchstart",
840
- move: "touchmove",
841
- stop: "touchend"
842
- },
843
- mouse: {
844
- start: "mousedown",
845
- move: "mousemove",
846
- stop: "mouseup"
847
- }
848
- };
849
- let J = L.mouse, pe = class extends Se.Component {
850
- constructor() {
851
- super(...arguments), X(this, "dragging", !1), X(this, "lastX", NaN), X(this, "lastY", NaN), X(this, "touchIdentifier", null), X(this, "mounted", !1), X(this, "handleDragStart", (t) => {
852
- if (this.props.onMouseDown(t), !this.props.allowAnyClick && typeof t.button == "number" && t.button !== 0)
853
- return !1;
854
- const n = this.findDOMNode();
855
- if (!n || !n.ownerDocument || !n.ownerDocument.body)
856
- throw new Error("<DraggableCore> not mounted on DragStart!");
857
- const {
858
- ownerDocument: r
859
- } = n;
860
- if (this.props.disabled || !(t.target instanceof r.defaultView.Node) || this.props.handle && !(0, I.matchesSelectorAndParentsTo)(t.target, this.props.handle, n) || this.props.cancel && (0, I.matchesSelectorAndParentsTo)(t.target, this.props.cancel, n))
861
- return;
862
- t.type === "touchstart" && t.preventDefault();
863
- const i = (0, I.getTouchIdentifier)(t);
864
- this.touchIdentifier = i;
865
- const a = (0, K.getControlPosition)(t, i, this);
866
- if (a == null)
867
- return;
868
- const {
869
- x: f,
870
- y: l
871
- } = a, d = (0, K.createCoreData)(this, f, l);
872
- (0, oe.default)("DraggableCore: handleDragStart: %j", d), (0, oe.default)("calling", this.props.onStart), !(this.props.onStart(t, d) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, I.addUserSelectStyles)(r), this.dragging = !0, this.lastX = f, this.lastY = l, (0, I.addEvent)(r, J.move, this.handleDrag), (0, I.addEvent)(r, J.stop, this.handleDragStop));
873
- }), X(this, "handleDrag", (t) => {
874
- const n = (0, K.getControlPosition)(t, this.touchIdentifier, this);
875
- if (n == null)
876
- return;
877
- let {
878
- x: r,
879
- y: i
880
- } = n;
881
- if (Array.isArray(this.props.grid)) {
882
- let l = r - this.lastX, d = i - this.lastY;
883
- if ([l, d] = (0, K.snapToGrid)(this.props.grid, l, d), !l && !d)
884
- return;
885
- r = this.lastX + l, i = this.lastY + d;
886
- }
887
- const a = (0, K.createCoreData)(this, r, i);
888
- if ((0, oe.default)("DraggableCore: handleDrag: %j", a), this.props.onDrag(t, a) === !1 || this.mounted === !1) {
889
- try {
890
- this.handleDragStop(new MouseEvent("mouseup"));
891
- } catch {
892
- const d = document.createEvent("MouseEvents");
893
- d.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(d);
894
- }
895
- return;
896
- }
897
- this.lastX = r, this.lastY = i;
898
- }), X(this, "handleDragStop", (t) => {
899
- if (!this.dragging)
900
- return;
901
- const n = (0, K.getControlPosition)(t, this.touchIdentifier, this);
902
- if (n == null)
903
- return;
904
- let {
905
- x: r,
906
- y: i
907
- } = n;
908
- if (Array.isArray(this.props.grid)) {
909
- let d = r - this.lastX || 0, O = i - this.lastY || 0;
910
- [d, O] = (0, K.snapToGrid)(this.props.grid, d, O), r = this.lastX + d, i = this.lastY + O;
911
- }
912
- const a = (0, K.createCoreData)(this, r, i);
913
- if (this.props.onStop(t, a) === !1 || this.mounted === !1)
914
- return !1;
915
- const l = this.findDOMNode();
916
- l && this.props.enableUserSelectHack && (0, I.removeUserSelectStyles)(l.ownerDocument), (0, oe.default)("DraggableCore: handleDragStop: %j", a), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, l && ((0, oe.default)("DraggableCore: Removing handlers"), (0, I.removeEvent)(l.ownerDocument, J.move, this.handleDrag), (0, I.removeEvent)(l.ownerDocument, J.stop, this.handleDragStop));
917
- }), X(this, "onMouseDown", (t) => (J = L.mouse, this.handleDragStart(t))), X(this, "onMouseUp", (t) => (J = L.mouse, this.handleDragStop(t))), X(this, "onTouchStart", (t) => (J = L.touch, this.handleDragStart(t))), X(this, "onTouchEnd", (t) => (J = L.touch, this.handleDragStop(t)));
918
- }
919
- componentDidMount() {
920
- this.mounted = !0;
921
- const t = this.findDOMNode();
922
- t && (0, I.addEvent)(t, L.touch.start, this.onTouchStart, {
923
- passive: !1
924
- });
925
- }
926
- componentWillUnmount() {
927
- this.mounted = !1;
928
- const t = this.findDOMNode();
929
- if (t) {
930
- const {
931
- ownerDocument: n
932
- } = t;
933
- (0, I.removeEvent)(n, L.mouse.move, this.handleDrag), (0, I.removeEvent)(n, L.touch.move, this.handleDrag), (0, I.removeEvent)(n, L.mouse.stop, this.handleDragStop), (0, I.removeEvent)(n, L.touch.stop, this.handleDragStop), (0, I.removeEvent)(t, L.touch.start, this.onTouchStart, {
934
- passive: !1
935
- }), this.props.enableUserSelectHack && (0, I.removeUserSelectStyles)(n);
936
- }
937
- }
938
- // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
939
- // the underlying DOM node ourselves. See the README for more information.
940
- findDOMNode() {
941
- var t, n;
942
- return (t = this.props) !== null && t !== void 0 && t.nodeRef ? (n = this.props) === null || n === void 0 || (n = n.nodeRef) === null || n === void 0 ? void 0 : n.current : jt.default.findDOMNode(this);
943
- }
944
- render() {
945
- return /* @__PURE__ */ Se.cloneElement(Se.Children.only(this.props.children), {
946
- // Note: mouseMove handler is attached to document so it will still function
947
- // when the user drags quickly and leaves the bounds of the element.
948
- onMouseDown: this.onMouseDown,
949
- onMouseUp: this.onMouseUp,
950
- // onTouchStart is added on `componentDidMount` so they can be added with
951
- // {passive: false}, which allows it to cancel. See
952
- // https://developers.google.com/web/updates/2017/01/scrolling-intervention
953
- onTouchEnd: this.onTouchEnd
954
- });
955
- }
956
- };
957
- fe.default = pe;
958
- X(pe, "displayName", "DraggableCore");
959
- X(pe, "propTypes", {
960
- /**
961
- * `allowAnyClick` allows dragging using any mouse button.
962
- * By default, we only accept the left button.
963
- *
964
- * Defaults to `false`.
965
- */
966
- allowAnyClick: B.default.bool,
967
- children: B.default.node.isRequired,
968
- /**
969
- * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
970
- * with the exception of `onMouseDown`, will not fire.
971
- */
972
- disabled: B.default.bool,
973
- /**
974
- * By default, we add 'user-select:none' attributes to the document body
975
- * to prevent ugly text selection during drag. If this is causing problems
976
- * for your app, set this to `false`.
977
- */
978
- enableUserSelectHack: B.default.bool,
979
- /**
980
- * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
981
- * instead of using the parent node.
982
- */
983
- offsetParent: function(e, t) {
984
- if (e[t] && e[t].nodeType !== 1)
985
- throw new Error("Draggable's offsetParent must be a DOM Node.");
986
- },
987
- /**
988
- * `grid` specifies the x and y that dragging should snap to.
989
- */
990
- grid: B.default.arrayOf(B.default.number),
991
- /**
992
- * `handle` specifies a selector to be used as the handle that initiates drag.
993
- *
994
- * Example:
995
- *
996
- * ```jsx
997
- * let App = React.createClass({
998
- * render: function () {
999
- * return (
1000
- * <Draggable handle=".handle">
1001
- * <div>
1002
- * <div className="handle">Click me to drag</div>
1003
- * <div>This is some other content</div>
1004
- * </div>
1005
- * </Draggable>
1006
- * );
1007
- * }
1008
- * });
1009
- * ```
1010
- */
1011
- handle: B.default.string,
1012
- /**
1013
- * `cancel` specifies a selector to be used to prevent drag initialization.
1014
- *
1015
- * Example:
1016
- *
1017
- * ```jsx
1018
- * let App = React.createClass({
1019
- * render: function () {
1020
- * return(
1021
- * <Draggable cancel=".cancel">
1022
- * <div>
1023
- * <div className="cancel">You can't drag from here</div>
1024
- * <div>Dragging here works fine</div>
1025
- * </div>
1026
- * </Draggable>
1027
- * );
1028
- * }
1029
- * });
1030
- * ```
1031
- */
1032
- cancel: B.default.string,
1033
- /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
1034
- * Unfortunately, in order for <Draggable> to work properly, we need raw access
1035
- * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
1036
- * as in this example:
1037
- *
1038
- * function MyComponent() {
1039
- * const nodeRef = React.useRef(null);
1040
- * return (
1041
- * <Draggable nodeRef={nodeRef}>
1042
- * <div ref={nodeRef}>Example Target</div>
1043
- * </Draggable>
1044
- * );
1045
- * }
1046
- *
1047
- * This can be used for arbitrarily nested components, so long as the ref ends up
1048
- * pointing to the actual child DOM node and not a custom component.
1049
- */
1050
- nodeRef: B.default.object,
1051
- /**
1052
- * Called when dragging starts.
1053
- * If this function returns the boolean false, dragging will be canceled.
1054
- */
1055
- onStart: B.default.func,
1056
- /**
1057
- * Called while dragging.
1058
- * If this function returns the boolean false, dragging will be canceled.
1059
- */
1060
- onDrag: B.default.func,
1061
- /**
1062
- * Called when dragging stops.
1063
- * If this function returns the boolean false, the drag will remain active.
1064
- */
1065
- onStop: B.default.func,
1066
- /**
1067
- * A workaround option which can be passed if onMouseDown needs to be accessed,
1068
- * since it'll always be blocked (as there is internal use of onMouseDown)
1069
- */
1070
- onMouseDown: B.default.func,
1071
- /**
1072
- * `scale`, if set, applies scaling while dragging an element
1073
- */
1074
- scale: B.default.number,
1075
- /**
1076
- * These properties should be defined on the child, not here.
1077
- */
1078
- className: Te.dontSetMe,
1079
- style: Te.dontSetMe,
1080
- transform: Te.dontSetMe
1081
- });
1082
- X(pe, "defaultProps", {
1083
- allowAnyClick: !1,
1084
- // by default only accept left click
1085
- disabled: !1,
1086
- enableUserSelectHack: !0,
1087
- onStart: function() {
1088
- },
1089
- onDrag: function() {
1090
- },
1091
- onStop: function() {
1092
- },
1093
- onMouseDown: function() {
1094
- },
1095
- scale: 1
1096
- });
1097
- (function(e) {
1098
- Object.defineProperty(e, "__esModule", {
1099
- value: !0
1100
- }), Object.defineProperty(e, "DraggableCore", {
1101
- enumerable: !0,
1102
- get: function() {
1103
- return d.default;
1104
- }
1105
- }), e.default = void 0;
1106
- var t = U(Ie), n = x(ke), r = x(Ae), i = x(ct), a = _, f = F, l = $, d = x(fe), O = x(de);
1107
- function x(u) {
1108
- return u && u.__esModule ? u : { default: u };
1109
- }
1110
- function W(u) {
1111
- if (typeof WeakMap != "function")
1112
- return null;
1113
- var c = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap();
1114
- return (W = function(h) {
1115
- return h ? g : c;
1116
- })(u);
1117
- }
1118
- function U(u, c) {
1119
- if (!c && u && u.__esModule)
1120
- return u;
1121
- if (u === null || typeof u != "object" && typeof u != "function")
1122
- return { default: u };
1123
- var g = W(c);
1124
- if (g && g.has(u))
1125
- return g.get(u);
1126
- var h = {}, R = Object.defineProperty && Object.getOwnPropertyDescriptor;
1127
- for (var D in u)
1128
- if (D !== "default" && Object.prototype.hasOwnProperty.call(u, D)) {
1129
- var H = R ? Object.getOwnPropertyDescriptor(u, D) : null;
1130
- H && (H.get || H.set) ? Object.defineProperty(h, D, H) : h[D] = u[D];
1131
- }
1132
- return h.default = u, g && g.set(u, h), h;
1133
- }
1134
- function Y() {
1135
- return Y = Object.assign ? Object.assign.bind() : function(u) {
1136
- for (var c = 1; c < arguments.length; c++) {
1137
- var g = arguments[c];
1138
- for (var h in g)
1139
- Object.prototype.hasOwnProperty.call(g, h) && (u[h] = g[h]);
1140
- }
1141
- return u;
1142
- }, Y.apply(this, arguments);
1143
- }
1144
- function C(u, c, g) {
1145
- return c = E(c), c in u ? Object.defineProperty(u, c, { value: g, enumerable: !0, configurable: !0, writable: !0 }) : u[c] = g, u;
1146
- }
1147
- function E(u) {
1148
- var c = M(u, "string");
1149
- return typeof c == "symbol" ? c : String(c);
1150
- }
1151
- function M(u, c) {
1152
- if (typeof u != "object" || u === null)
1153
- return u;
1154
- var g = u[Symbol.toPrimitive];
1155
- if (g !== void 0) {
1156
- var h = g.call(u, c || "default");
1157
- if (typeof h != "object")
1158
- return h;
1159
- throw new TypeError("@@toPrimitive must return a primitive value.");
1160
- }
1161
- return (c === "string" ? String : Number)(u);
1162
- }
1163
- class N extends t.Component {
1164
- // React 16.3+
1165
- // Arity (props, state)
1166
- static getDerivedStateFromProps(c, g) {
1167
- let {
1168
- position: h
1169
- } = c, {
1170
- prevPropsPosition: R
1171
- } = g;
1172
- return h && (!R || h.x !== R.x || h.y !== R.y) ? ((0, O.default)("Draggable: getDerivedStateFromProps %j", {
1173
- position: h,
1174
- prevPropsPosition: R
1175
- }), {
1176
- x: h.x,
1177
- y: h.y,
1178
- prevPropsPosition: {
1179
- ...h
1180
- }
1181
- }) : null;
1182
- }
1183
- constructor(c) {
1184
- super(c), C(this, "onDragStart", (g, h) => {
1185
- if ((0, O.default)("Draggable: onDragStart: %j", h), this.props.onStart(g, (0, f.createDraggableData)(this, h)) === !1)
1186
- return !1;
1187
- this.setState({
1188
- dragging: !0,
1189
- dragged: !0
1190
- });
1191
- }), C(this, "onDrag", (g, h) => {
1192
- if (!this.state.dragging)
1193
- return !1;
1194
- (0, O.default)("Draggable: onDrag: %j", h);
1195
- const R = (0, f.createDraggableData)(this, h), D = {
1196
- x: R.x,
1197
- y: R.y,
1198
- slackX: 0,
1199
- slackY: 0
1200
- };
1201
- if (this.props.bounds) {
1202
- const {
1203
- x: Z,
1204
- y: G
1205
- } = D;
1206
- D.x += this.state.slackX, D.y += this.state.slackY;
1207
- const [Q, ie] = (0, f.getBoundPosition)(this, D.x, D.y);
1208
- D.x = Q, D.y = ie, D.slackX = this.state.slackX + (Z - D.x), D.slackY = this.state.slackY + (G - D.y), R.x = D.x, R.y = D.y, R.deltaX = D.x - this.state.x, R.deltaY = D.y - this.state.y;
1209
- }
1210
- if (this.props.onDrag(g, R) === !1)
1211
- return !1;
1212
- this.setState(D);
1213
- }), C(this, "onDragStop", (g, h) => {
1214
- if (!this.state.dragging || this.props.onStop(g, (0, f.createDraggableData)(this, h)) === !1)
1215
- return !1;
1216
- (0, O.default)("Draggable: onDragStop: %j", h);
1217
- const D = {
1218
- dragging: !1,
1219
- slackX: 0,
1220
- slackY: 0
1221
- };
1222
- if (!!this.props.position) {
1223
- const {
1224
- x: Z,
1225
- y: G
1226
- } = this.props.position;
1227
- D.x = Z, D.y = G;
1228
- }
1229
- this.setState(D);
1230
- }), this.state = {
1231
- // Whether or not we are currently dragging.
1232
- dragging: !1,
1233
- // Whether or not we have been dragged before.
1234
- dragged: !1,
1235
- // Current transform x and y.
1236
- x: c.position ? c.position.x : c.defaultPosition.x,
1237
- y: c.position ? c.position.y : c.defaultPosition.y,
1238
- prevPropsPosition: {
1239
- ...c.position
1240
- },
1241
- // Used for compensating for out-of-bounds drags
1242
- slackX: 0,
1243
- slackY: 0,
1244
- // Can only determine if SVG after mounting
1245
- isElementSVG: !1
1246
- }, c.position && !(c.onDrag || c.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
1247
- }
1248
- componentDidMount() {
1249
- typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
1250
- isElementSVG: !0
1251
- });
1252
- }
1253
- componentWillUnmount() {
1254
- this.setState({
1255
- dragging: !1
1256
- });
1257
- }
1258
- // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1259
- // the underlying DOM node ourselves. See the README for more information.
1260
- findDOMNode() {
1261
- var c, g;
1262
- return (c = (g = this.props) === null || g === void 0 || (g = g.nodeRef) === null || g === void 0 ? void 0 : g.current) !== null && c !== void 0 ? c : r.default.findDOMNode(this);
1263
- }
1264
- render() {
1265
- const {
1266
- axis: c,
1267
- bounds: g,
1268
- children: h,
1269
- defaultPosition: R,
1270
- defaultClassName: D,
1271
- defaultClassNameDragging: H,
1272
- defaultClassNameDragged: Z,
1273
- position: G,
1274
- positionOffset: Q,
1275
- scale: ie,
1276
- ...he
1277
- } = this.props;
1278
- let ee = {}, ae = null;
1279
- const z = !!!G || this.state.dragging, se = G || R, ue = {
1280
- // Set left if horizontal drag is enabled
1281
- x: (0, f.canDragX)(this) && z ? this.state.x : se.x,
1282
- // Set top if vertical drag is enabled
1283
- y: (0, f.canDragY)(this) && z ? this.state.y : se.y
1284
- };
1285
- this.state.isElementSVG ? ae = (0, a.createSVGTransform)(ue, Q) : ee = (0, a.createCSSTransform)(ue, Q);
1286
- const o = (0, i.default)(h.props.className || "", D, {
1287
- [H]: this.state.dragging,
1288
- [Z]: this.state.dragged
1289
- });
1290
- return /* @__PURE__ */ t.createElement(d.default, Y({}, he, {
1291
- onStart: this.onDragStart,
1292
- onDrag: this.onDrag,
1293
- onStop: this.onDragStop
1294
- }), /* @__PURE__ */ t.cloneElement(t.Children.only(h), {
1295
- className: o,
1296
- style: {
1297
- ...h.props.style,
1298
- ...ee
1299
- },
1300
- transform: ae
1301
- }));
1302
- }
1303
- }
1304
- e.default = N, C(N, "displayName", "Draggable"), C(N, "propTypes", {
1305
- // Accepts all props <DraggableCore> accepts.
1306
- ...d.default.propTypes,
1307
- /**
1308
- * `axis` determines which axis the draggable can move.
1309
- *
1310
- * Note that all callbacks will still return data as normal. This only
1311
- * controls flushing to the DOM.
1312
- *
1313
- * 'both' allows movement horizontally and vertically.
1314
- * 'x' limits movement to horizontal axis.
1315
- * 'y' limits movement to vertical axis.
1316
- * 'none' limits all movement.
1317
- *
1318
- * Defaults to 'both'.
1319
- */
1320
- axis: n.default.oneOf(["both", "x", "y", "none"]),
1321
- /**
1322
- * `bounds` determines the range of movement available to the element.
1323
- * Available values are:
1324
- *
1325
- * 'parent' restricts movement within the Draggable's parent node.
1326
- *
1327
- * Alternatively, pass an object with the following properties, all of which are optional:
1328
- *
1329
- * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
1330
- *
1331
- * All values are in px.
1332
- *
1333
- * Example:
1334
- *
1335
- * ```jsx
1336
- * let App = React.createClass({
1337
- * render: function () {
1338
- * return (
1339
- * <Draggable bounds={{right: 300, bottom: 300}}>
1340
- * <div>Content</div>
1341
- * </Draggable>
1342
- * );
1343
- * }
1344
- * });
1345
- * ```
1346
- */
1347
- bounds: n.default.oneOfType([n.default.shape({
1348
- left: n.default.number,
1349
- right: n.default.number,
1350
- top: n.default.number,
1351
- bottom: n.default.number
1352
- }), n.default.string, n.default.oneOf([!1])]),
1353
- defaultClassName: n.default.string,
1354
- defaultClassNameDragging: n.default.string,
1355
- defaultClassNameDragged: n.default.string,
1356
- /**
1357
- * `defaultPosition` specifies the x and y that the dragged item should start at
1358
- *
1359
- * Example:
1360
- *
1361
- * ```jsx
1362
- * let App = React.createClass({
1363
- * render: function () {
1364
- * return (
1365
- * <Draggable defaultPosition={{x: 25, y: 25}}>
1366
- * <div>I start with transformX: 25px and transformY: 25px;</div>
1367
- * </Draggable>
1368
- * );
1369
- * }
1370
- * });
1371
- * ```
1372
- */
1373
- defaultPosition: n.default.shape({
1374
- x: n.default.number,
1375
- y: n.default.number
1376
- }),
1377
- positionOffset: n.default.shape({
1378
- x: n.default.oneOfType([n.default.number, n.default.string]),
1379
- y: n.default.oneOfType([n.default.number, n.default.string])
1380
- }),
1381
- /**
1382
- * `position`, if present, defines the current position of the element.
1383
- *
1384
- * This is similar to how form elements in React work - if no `position` is supplied, the component
1385
- * is uncontrolled.
1386
- *
1387
- * Example:
1388
- *
1389
- * ```jsx
1390
- * let App = React.createClass({
1391
- * render: function () {
1392
- * return (
1393
- * <Draggable position={{x: 25, y: 25}}>
1394
- * <div>I start with transformX: 25px and transformY: 25px;</div>
1395
- * </Draggable>
1396
- * );
1397
- * }
1398
- * });
1399
- * ```
1400
- */
1401
- position: n.default.shape({
1402
- x: n.default.number,
1403
- y: n.default.number
1404
- }),
1405
- /**
1406
- * These properties should be defined on the child, not here.
1407
- */
1408
- className: l.dontSetMe,
1409
- style: l.dontSetMe,
1410
- transform: l.dontSetMe
1411
- }), C(N, "defaultProps", {
1412
- ...d.default.defaultProps,
1413
- axis: "both",
1414
- bounds: !1,
1415
- defaultClassName: "react-draggable",
1416
- defaultClassNameDragging: "react-draggable-dragging",
1417
- defaultClassNameDragged: "react-draggable-dragged",
1418
- defaultPosition: {
1419
- x: 0,
1420
- y: 0
1421
- },
1422
- scale: 1
1423
- });
1424
- })(Be);
1425
- const {
1426
- default: Ge,
1427
- DraggableCore: Ft
1428
- } = Be;
1429
- ce.exports = Ge;
1430
- ce.exports.default = Ge;
1431
- ce.exports.DraggableCore = Ft;
1432
- var Vt = ce.exports;
1433
- const Gt = /* @__PURE__ */ Qe(Vt);
1434
- function sn({
1435
- children: e,
1436
- zIndex: t = rt,
1437
- positionVariant: n,
1438
- dragSelector: r,
1439
- parentRef: i,
1440
- boundaryGap: a = 16,
1441
- childDivProps: f = {}
1442
- }) {
1443
- const l = ot(), d = ze(null), [O, x] = Ke({
1444
- x: 0,
1445
- y: 0
1446
- }), W = (Y) => {
1447
- const C = i?.current?.getBoundingClientRect() ?? {
1448
- width: 0,
1449
- height: 0,
1450
- top: 0,
1451
- left: 0,
1452
- bottom: 0
1453
- }, E = d.current?.getBoundingClientRect().height ?? 0, M = d.current?.getBoundingClientRect().width ?? 0;
1454
- switch (Y) {
1455
- case nt.PARENT_BOTTOM_CENTER: {
1456
- const N = (C.width - M) / 2, c = (C.height > l.height ? l.height - C.top : C.height) - E - a;
1457
- return { x: N, y: c };
1458
- }
1459
- default: {
1460
- const N = l.width / 2 - C.left - M / 2, u = l.height - C.top - E - a;
1461
- return { x: N, y: u };
1462
- }
1463
- }
1464
- };
1465
- Je(() => {
1466
- const Y = W(n);
1467
- x(Y);
1468
- }, [d, n, l]);
1469
- function U(Y, C) {
1470
- const E = i?.current?.getBoundingClientRect().left ?? 0, M = i?.current?.getBoundingClientRect().top ?? 0, N = d.current?.getBoundingClientRect().height ?? 0, u = d.current?.getBoundingClientRect().width ?? 0;
1471
- E + C.x + u + a > l.width || M + C.y + N + a > l.height || E + C.x < 0 || M + C.y < 0 || x({
1472
- x: C.x,
1473
- y: C.y
1474
- });
1475
- }
1476
- return /* @__PURE__ */ ge(
1477
- "div",
1478
- {
1479
- className: "dc__position-fixed",
1480
- style: {
1481
- zIndex: t
1482
- },
1483
- children: /* @__PURE__ */ ge(Gt, { handle: r, nodeRef: d, position: O, onDrag: U, children: /* @__PURE__ */ ge(
1484
- "div",
1485
- {
1486
- ref: d,
1487
- ...f,
1488
- style: {
1489
- zIndex: t
1490
- },
1491
- children: e
1492
- }
1493
- ) })
1494
- }
1495
- );
1496
- }
1497
- export {
1498
- sn as default
1499
- };