@devtron-labs/devtron-fe-common-lib 0.0.51 → 0.0.52-beta-1
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.
- package/dist/BaseInput-8101e714.js +1686 -0
- package/dist/CodeEditor-68cd2e5b.js +103676 -0
- package/dist/Common/AddCDButton/AddCDButton.d.ts +3 -3
- package/dist/Common/AddCDButton/AddCDButton.js +61 -0
- package/dist/Common/AddCDButton/index.d.ts +2 -2
- package/dist/Common/AddCDButton/index.js +6 -0
- package/dist/Common/AddCDButton/types.d.ts +26 -26
- package/dist/Common/AddCDButton/types.js +1 -0
- package/dist/Common/AddCDButton/utils.d.ts +2 -2
- package/dist/Common/AddCDButton/utils.js +19 -0
- package/dist/Common/Api.d.ts +5 -5
- package/dist/Common/Api.js +167 -0
- package/dist/Common/AppStatus/AppStatus.d.ts +3 -3
- package/dist/Common/AppStatus/AppStatus.js +37 -0
- package/dist/Common/AppStatus/constants.d.ts +51 -51
- package/dist/Common/AppStatus/constants.js +37 -0
- package/dist/Common/AppStatus/index.d.ts +1 -1
- package/dist/Common/AppStatus/index.js +4 -0
- package/dist/Common/AppStatus/types.d.ts +12 -12
- package/dist/Common/AppStatus/types.js +1 -0
- package/dist/Common/AppStatus/utils.d.ts +1 -1
- package/dist/Common/AppStatus/utils.js +8 -0
- package/dist/Common/BreadCrumb/BreadCrumb.d.ts +5 -5
- package/dist/Common/BreadCrumb/BreadCrumb.js +71 -0
- package/dist/Common/BreadCrumb/BreadcrumbStore.d.ts +17 -17
- package/dist/Common/BreadCrumb/BreadcrumbStore.js +22 -0
- package/dist/Common/BreadCrumb/Types.d.ts +28 -28
- package/dist/Common/BreadCrumb/Types.js +1 -0
- package/dist/Common/CIPipeline.Types.d.ts +265 -265
- package/dist/Common/CIPipeline.Types.js +10 -0
- package/dist/Common/ChartVersionAndTypeSelector.d.ts +3 -4
- package/dist/Common/ChartVersionAndTypeSelector.js +61 -0
- package/dist/Common/Checkbox.d.ts +5 -5
- package/dist/Common/Checkbox.js +28 -0
- package/dist/Common/ClipboardButton/ClipboardButton.d.ts +10 -10
- package/dist/Common/ClipboardButton/ClipboardButton.js +40 -0
- package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.d.ts +1 -0
- package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.js +27 -0
- package/dist/Common/ClipboardButton/types.d.ts +8 -8
- package/dist/Common/ClipboardButton/types.js +1 -0
- package/dist/Common/CodeEditor/CodeEditor.d.ts +47 -0
- package/dist/Common/CodeEditor/CodeEditor.js +15 -0
- package/dist/Common/Common.service.d.ts +20 -20
- package/dist/Common/Common.service.js +191 -0
- package/dist/Common/Constants.d.ts +73 -66
- package/dist/Common/Constants.js +234 -0
- package/dist/Common/CustomInput/CustomInput.d.ts +3 -3
- package/dist/Common/CustomInput/CustomInput.js +80 -0
- package/dist/Common/CustomInput/Types.d.ts +29 -29
- package/dist/Common/CustomInput/Types.js +1 -0
- package/dist/Common/CustomInput/index.d.ts +2 -2
- package/dist/Common/CustomInput/index.js +4 -0
- package/dist/Common/CustomTagSelector/PropagateTagInfo.d.ts +4 -4
- package/dist/Common/CustomTagSelector/PropagateTagInfo.js +43 -0
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +3 -3
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.js +58 -0
- package/dist/Common/CustomTagSelector/TagDetails.d.ts +2 -3
- package/dist/Common/CustomTagSelector/TagDetails.js +65 -0
- package/dist/Common/CustomTagSelector/TagLabelSelect.d.ts +2 -3
- package/dist/Common/CustomTagSelector/TagLabelSelect.js +50 -0
- package/dist/Common/CustomTagSelector/TagLabelValueSelector.d.ts +2 -3
- package/dist/Common/CustomTagSelector/TagLabelValueSelector.js +121 -0
- package/dist/Common/CustomTagSelector/TagSelector.utils.d.ts +12 -12
- package/dist/Common/CustomTagSelector/TagSelector.utils.js +61 -0
- package/dist/Common/CustomTagSelector/Types.d.ts +68 -68
- package/dist/Common/CustomTagSelector/Types.js +1 -0
- package/dist/Common/CustomTagSelector/ValidationRules.d.ts +10 -10
- package/dist/Common/CustomTagSelector/ValidationRules.js +35 -0
- package/dist/Common/CustomTagSelector/index.d.ts +6 -6
- package/dist/Common/CustomTagSelector/index.js +12 -0
- package/dist/Common/DebouncedSearch/DebouncedSearch.d.ts +15 -15
- package/dist/Common/DebouncedSearch/DebouncedSearch.js +7 -0
- package/dist/Common/DebouncedSearch/Types.d.ts +14 -14
- package/dist/Common/DebouncedSearch/Types.js +1 -0
- package/dist/Common/DebouncedSearch/Utils.d.ts +1 -1
- package/dist/Common/DebouncedSearch/Utils.js +19 -0
- package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.d.ts +1 -0
- package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.js +33 -0
- package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +4 -4
- package/dist/Common/DeleteComponentModal/DeleteComponent.js +63 -0
- package/dist/Common/DeleteComponentModal/types.d.ts +15 -15
- package/dist/Common/DeleteComponentModal/types.js +1 -0
- package/dist/Common/DevtronProgressing/DevtronProgressing.d.ts +3 -3
- package/dist/Common/DevtronProgressing/DevtronProgressing.js +98 -0
- package/dist/Common/DevtronProgressing/index.d.ts +1 -1
- package/dist/Common/DevtronProgressing/index.js +4 -0
- package/dist/Common/DevtronProgressing/types.d.ts +4 -4
- package/dist/Common/DevtronProgressing/types.js +1 -0
- package/dist/Common/Dialogs/ConfirmationDialog.d.ts +9 -9
- package/dist/Common/Dialogs/ConfirmationDialog.js +24 -0
- package/dist/Common/Dialogs/DeleteDialog.d.ts +5 -5
- package/dist/Common/Dialogs/DeleteDialog.js +49 -0
- package/dist/Common/Dialogs/DialogForm.d.ts +14 -14
- package/dist/Common/Dialogs/DialogForm.js +63 -0
- package/dist/Common/Dialogs/ForceDeleteDialog.d.ts +3 -3
- package/dist/Common/Dialogs/ForceDeleteDialog.js +23 -0
- package/dist/Common/Dialogs/Types.d.ts +45 -45
- package/dist/Common/Dialogs/Types.js +1 -0
- package/dist/Common/Dialogs/index.d.ts +4 -4
- package/dist/Common/Dialogs/index.js +11 -0
- package/dist/Common/DraggableWrapper/DraggableButton.d.ts +3 -0
- package/dist/Common/DraggableWrapper/DraggableButton.js +16 -0
- package/dist/Common/DraggableWrapper/DraggableWrapper.d.ts +9 -0
- package/dist/Common/DraggableWrapper/DraggableWrapper.js +1499 -0
- package/dist/Common/DraggableWrapper/index.d.ts +3 -0
- package/dist/Common/DraggableWrapper/index.js +8 -0
- package/dist/Common/DraggableWrapper/types.d.ts +23 -0
- package/dist/Common/DraggableWrapper/types.js +4 -0
- package/dist/Common/Drawer/Drawer.d.ts +14 -16
- package/dist/Common/Drawer/Drawer.js +22 -0
- package/dist/Common/EmptyState/EmptyState.d.ts +24 -25
- package/dist/Common/EmptyState/EmptyState.js +32 -0
- package/dist/Common/EmptyState/GenericEmptyState.d.ts +4 -5
- package/dist/Common/EmptyState/GenericEmptyState.js +52 -0
- package/dist/Common/Error.d.ts +17 -17
- package/dist/Common/Error.js +49 -0
- package/dist/Common/ErrorScreenNotFound.d.ts +3 -3
- package/dist/Common/ErrorScreenNotFound.js +23 -0
- package/dist/Common/Grid/Grid.d.ts +3 -3
- package/dist/Common/Grid/Grid.js +31 -0
- package/dist/Common/Grid/types.d.ts +10 -10
- package/dist/Common/Grid/types.js +1 -0
- package/dist/Common/Helper.d.ts +61 -60
- package/dist/Common/Helper.js +38 -0
- package/dist/Common/Hooks/UseClickOutside/UseClickOutside.d.ts +1 -1
- package/dist/Common/Hooks/UseClickOutside/UseClickOutside.js +14 -0
- package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.d.ts +6 -6
- package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.js +16 -0
- package/dist/Common/Hooks/UseSuperAdmin/types.d.ts +3 -3
- package/dist/Common/Hooks/UseSuperAdmin/types.js +1 -0
- package/dist/Common/Hooks/UseWindowSize/UseWindowSize.d.ts +4 -0
- package/dist/Common/Hooks/UseWindowSize/UseWindowSize.js +17 -0
- package/dist/Common/Hooks/index.d.ts +3 -2
- package/dist/Common/Hooks/index.js +8 -0
- package/dist/Common/ImageTags.Types.d.ts +40 -40
- package/dist/Common/ImageTags.Types.js +1 -0
- package/dist/Common/ImageTags.d.ts +3 -4
- package/dist/Common/ImageTags.js +381 -0
- package/dist/Common/InfoColorBar/InfoColourbar.d.ts +4 -5
- package/dist/Common/InfoColorBar/InfoColourbar.js +65 -0
- package/dist/Common/Modals/Modal.d.ts +3 -3
- package/dist/Common/Modals/Modal.js +48 -0
- package/dist/Common/Modals/OpaqueModal.d.ts +12 -12
- package/dist/Common/Modals/OpaqueModal.js +32 -0
- package/dist/Common/Modals/VisibleModal.d.ts +15 -15
- package/dist/Common/Modals/VisibleModal.js +31 -0
- package/dist/Common/Modals/VisibleModal2.d.ts +12 -12
- package/dist/Common/Modals/VisibleModal2.js +31 -0
- package/dist/Common/MultiSelectCustomization.d.ts +37 -37
- package/dist/Common/MultiSelectCustomization.js +97 -0
- package/dist/Common/Policy.Types.d.ts +56 -56
- package/dist/Common/Policy.Types.js +6 -0
- package/dist/Common/PopupMenu.d.ts +8 -8
- package/dist/Common/PopupMenu.js +148 -0
- package/dist/Common/Progressing.d.ts +4 -4
- package/dist/Common/Progressing.js +52 -0
- package/dist/Common/RJSF/Form.d.ts +2 -4
- package/dist/Common/RJSF/Form.js +9888 -0
- package/dist/Common/RJSF/common/FieldRow.d.ts +5 -6
- package/dist/Common/RJSF/common/FieldRow.js +25 -0
- package/dist/Common/RJSF/common/types.d.ts +8 -8
- package/dist/Common/RJSF/common/types.js +1 -0
- package/dist/Common/RJSF/config.d.ts +4 -4
- package/dist/Common/RJSF/config.js +33 -0
- package/dist/Common/RJSF/constants.d.ts +7 -7
- package/dist/Common/RJSF/constants.js +10 -0
- package/dist/Common/RJSF/index.d.ts +3 -3
- package/dist/Common/RJSF/index.js +7 -0
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.d.ts +2 -3
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.js +30 -0
- package/dist/Common/RJSF/templates/ArrayFieldTemplate.d.ts +2 -3
- package/dist/Common/RJSF/templates/ArrayFieldTemplate.js +63 -0
- package/dist/Common/RJSF/templates/BaseInput.d.ts +2 -3
- package/dist/Common/RJSF/templates/BaseInput.js +8 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +2 -3
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.js +18 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.d.ts +2 -3
- package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.js +6 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.d.ts +2 -3
- package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.js +19 -0
- package/dist/Common/RJSF/templates/ButtonTemplates/index.d.ts +3 -3
- package/dist/Common/RJSF/templates/ButtonTemplates/index.js +8 -0
- package/dist/Common/RJSF/templates/Description.d.ts +2 -3
- package/dist/Common/RJSF/templates/Description.js +9 -0
- package/dist/Common/RJSF/templates/Field.d.ts +2 -3
- package/dist/Common/RJSF/templates/Field.js +21 -0
- package/dist/Common/RJSF/templates/FieldErrorTemplate.d.ts +2 -3
- package/dist/Common/RJSF/templates/FieldErrorTemplate.js +15 -0
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.d.ts +2 -3
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.js +76 -0
- package/dist/Common/RJSF/templates/TitleField.d.ts +2 -3
- package/dist/Common/RJSF/templates/TitleField.js +8 -0
- package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.d.ts +2 -3
- package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.js +44 -0
- package/dist/Common/RJSF/templates/index.d.ts +10 -10
- package/dist/Common/RJSF/templates/index.js +26 -0
- package/dist/Common/RJSF/types.d.ts +3 -3
- package/dist/Common/RJSF/types.js +1 -0
- package/dist/Common/RJSF/utils.d.ts +25 -26
- package/dist/Common/RJSF/utils.js +98 -0
- package/dist/Common/RJSF/widgets/Checkbox.d.ts +2 -3
- package/dist/Common/RJSF/widgets/Checkbox.js +39 -0
- package/dist/Common/RJSF/widgets/Select.d.ts +2 -3
- package/dist/Common/RJSF/widgets/Select.js +56 -0
- package/dist/Common/RJSF/widgets/index.d.ts +2 -2
- package/dist/Common/RJSF/widgets/index.js +6 -0
- package/dist/Common/RadioGroup/RadioGroup.d.ts +16 -17
- package/dist/Common/RadioGroup/RadioGroup.js +76 -0
- package/dist/Common/RadioGroup.d.ts +8 -8
- package/dist/Common/RadioGroup.js +47 -0
- package/dist/Common/Reload.d.ts +3 -3
- package/dist/Common/Reload.js +16 -0
- package/dist/Common/ResizableTextarea.d.ts +3 -3
- package/dist/Common/ResizableTextarea.js +60 -0
- package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +3 -4
- package/dist/Common/Security/ScanVulnerabilitiesTable.js +49 -0
- package/dist/Common/Select/Select.d.ts +4 -0
- package/dist/Common/Select/Select.js +131 -0
- package/dist/Common/Select/types.d.ts +29 -0
- package/dist/Common/Select/types.js +1 -0
- package/dist/Common/ServerError.d.ts +15 -15
- package/dist/Common/ServerError.js +26 -0
- package/dist/Common/TippyCustomized.d.ts +3 -4
- package/dist/Common/TippyCustomized.js +10 -0
- package/dist/Common/ToastBody.d.ts +23 -23
- package/dist/Common/ToastBody.js +41 -0
- package/dist/Common/Toggle/Toggle.d.ts +12 -14
- package/dist/Common/Toggle/Toggle.js +40 -0
- package/dist/Common/Types.d.ts +677 -677
- package/dist/Common/Types.js +24 -0
- package/dist/Common/UseWindowSize.d.ts +4 -0
- package/dist/Common/UseWindowSize.js +20 -0
- package/dist/Common/index.d.ts +50 -47
- package/dist/Common/index.js +219 -0
- package/dist/DebouncedSearch-065f3ac2.js +58 -0
- package/dist/Helper-1f1cf2ba.js +9824 -0
- package/dist/TippyCustomized-0d0b9a6f.js +124 -0
- package/dist/_commonjsHelpers-c5d32002.js +30 -0
- package/dist/abap-9f67f57a.js +1314 -0
- package/dist/apex-ff62e532.js +315 -0
- package/dist/assets/CodeEditor.css +1 -0
- package/dist/assets/Drawer.css +1 -0
- package/dist/assets/Form.css +1 -0
- package/dist/assets/InfoColourbar.css +1 -0
- package/dist/assets/RadioGroup.css +1 -0
- package/dist/assets/ScanVulnerabilitiesTable.css +1 -0
- package/dist/assets/Select.css +1 -0
- package/dist/assets/TippyCustomized.css +1 -0
- package/dist/assets/Toggle.css +1 -0
- package/dist/assets/editor.worker-d26000ef.js +9 -0
- package/dist/assets/emptyState.css +1 -0
- package/dist/assets/json.worker-f23a4654.js +40 -0
- package/dist/assets/yaml.worker-64fecd27.js +463 -0
- package/dist/azcli-31e64a7f.js +74 -0
- package/dist/bat-0ffe897e.js +95 -0
- package/dist/bicep-3414a2b1.js +108 -0
- package/dist/cameligo-df1f3f25.js +168 -0
- package/dist/canExpand-ab1f6741.js +10 -0
- package/dist/clojure-65b0f010.js +754 -0
- package/dist/coffee-437f0fba.js +228 -0
- package/dist/cpp-66843dd5.js +390 -0
- package/dist/csharp-621d9a49.js +320 -0
- package/dist/csp-de0d5244.js +57 -0
- package/dist/css-7cd5ed4c.js +186 -0
- package/dist/cssMode-7289250b.js +1446 -0
- package/dist/cypher-70ad96fe.js +262 -0
- package/dist/dart-33ae3739.js +270 -0
- package/dist/dockerfile-f2274a50.js +132 -0
- package/dist/ecl-3b8294a3.js +454 -0
- package/dist/elixir-b9dcc73a.js +489 -0
- package/dist/englishStringTranslator-2c9a30fc.js +17 -0
- package/dist/enums-d0bd3f97.js +6618 -0
- package/dist/extends-70f3d2a3.js +13 -0
- package/dist/flow9-bdde8316.js +141 -0
- package/dist/freemarker2-3b903d5b.js +643 -0
- package/dist/fsharp-eac2e449.js +210 -0
- package/dist/getSubmitButtonOptions-a1be9bb0.js +20 -0
- package/dist/getTemplate-91d3260d.js +11 -0
- package/dist/getUiOptions-844b45a7.js +10 -0
- package/dist/go-d12ed8d4.js +208 -0
- package/dist/graphql-c7356b69.js +141 -0
- package/dist/handlebars-702717e9.js +391 -0
- package/dist/hcl-e883a0d4.js +177 -0
- package/dist/html-9a684e15.js +281 -0
- package/dist/htmlMode-3e336aa8.js +1456 -0
- package/dist/ic-add-4787ded5.js +5 -0
- package/dist/ic-chevron-down-eb7fd953.js +6 -0
- package/dist/ic-copy-118b83dc.js +5 -0
- package/dist/ic-cross-0e71861d.js +6 -0
- package/dist/ic-error-exclamation-5f9af461.js +5 -0
- package/dist/ic-info-filled-31a15add.js +6 -0
- package/dist/ic-info-outlined-8fa45e87.js +5 -0
- package/dist/ic-warning-42534af1.js +5 -0
- package/dist/idGenerators-0b33693c.js +35 -0
- package/dist/index-5a231705.js +17417 -0
- package/dist/index-c855d89c.js +173 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +218 -28498
- package/dist/ini-425ab711.js +68 -0
- package/dist/inject-tag-824bf92c.js +5 -0
- package/dist/java-2bc0fd68.js +221 -0
- package/dist/javascript-101cb9b7.js +75 -0
- package/dist/jsonMode-006d8be9.js +1867 -0
- package/dist/julia-1c932615.js +496 -0
- package/dist/kotlin-1ab839c8.js +245 -0
- package/dist/less-6fe856f5.js +168 -0
- package/dist/lexon-4955ac52.js +151 -0
- package/dist/liquid-729ea99d.js +238 -0
- package/dist/lua-3cca0047.js +157 -0
- package/dist/m3-132e9cb6.js +210 -0
- package/dist/markdown-ea59a0c1.js +202 -0
- package/dist/mips-19811f4b.js +194 -0
- package/dist/msdax-69954a10.js +377 -0
- package/dist/mysql-82088e5d.js +876 -0
- package/dist/objective-c-1976eccc.js +188 -0
- package/dist/pascal-8ef177cb.js +245 -0
- package/dist/pascaligo-bc517b9e.js +158 -0
- package/dist/perl-8b93582c.js +599 -0
- package/dist/pgsql-00c11a6d.js +847 -0
- package/dist/php-4c8c276f.js +471 -0
- package/dist/pla-e9b4ffb1.js +131 -0
- package/dist/postiats-2071af8c.js +544 -0
- package/dist/powerquery-8e388ceb.js +890 -0
- package/dist/powershell-e35db398.js +233 -0
- package/dist/protobuf-a24b9176.js +422 -0
- package/dist/pug-2c94d9b8.js +393 -0
- package/dist/python-c9b92f72.js +259 -0
- package/dist/qsharp-d730d7fe.js +282 -0
- package/dist/r-be193556.js +245 -0
- package/dist/razor-c48ef378.js +512 -0
- package/dist/react-select.esm-fa95915b.js +3992 -0
- package/dist/react-toastify.esm-e28f7200.js +798 -0
- package/dist/react.esm-9335a421.js +13150 -0
- package/dist/redis-9690c6ac.js +298 -0
- package/dist/redshift-6bdcdeaa.js +806 -0
- package/dist/restructuredtext-a08c1d20.js +162 -0
- package/dist/ruby-2247692b.js +444 -0
- package/dist/rust-1dffb4d5.js +337 -0
- package/dist/sb-136598e9.js +110 -0
- package/dist/scala-b1100fed.js +353 -0
- package/dist/scheme-038c8094.js +114 -0
- package/dist/scss-700d1b52.js +244 -0
- package/dist/shell-86c16e0f.js +224 -0
- package/dist/solidity-c05fdf3c.js +1351 -0
- package/dist/sophia-cd645d71.js +190 -0
- package/dist/sparql-01d9ec9c.js +193 -0
- package/dist/sql-4c33df41.js +818 -0
- package/dist/st-52cf1408.js +414 -0
- package/dist/swift-13c792ba.js +315 -0
- package/dist/systemverilog-0bd8b730.js +556 -0
- package/dist/tcl-463d7c75.js +232 -0
- package/dist/tippy-react.esm-d5c56a0a.js +2018 -0
- package/dist/tsMode-da78a323.js +811 -0
- package/dist/twig-0d98f5ec.js +323 -0
- package/dist/typescript-bd6d35ce.js +328 -0
- package/dist/vb-3a2b0a51.js +364 -0
- package/dist/wgsl-b2ddb3e4.js +420 -0
- package/dist/xml-828eca7a.js +95 -0
- package/dist/yaml-89980d67.js +184 -0
- package/package.json +33 -10
- package/.eslintrc.js +0 -41
- package/.github/workflows/release-package.yml +0 -49
- package/.prettierrc.js +0 -7
- package/rollup.config.js +0 -31
- package/src/Assets/Icon/ic-add.svg +0 -3
- package/src/Assets/Icon/ic-appstatus-cancelled.svg +0 -6
- package/src/Assets/Icon/ic-arrow-counter-clockwise.svg +0 -5
- package/src/Assets/Icon/ic-check.svg +0 -5
- package/src/Assets/Icon/ic-chevron-down.svg +0 -5
- package/src/Assets/Icon/ic-copy.svg +0 -3
- package/src/Assets/Icon/ic-cross.svg +0 -3
- package/src/Assets/Icon/ic-enter.svg +0 -3
- package/src/Assets/Icon/ic-error-cross.svg +0 -8
- package/src/Assets/Icon/ic-error-exclamation.svg +0 -6
- package/src/Assets/Icon/ic-error-medium.svg +0 -6
- package/src/Assets/Icon/ic-help-outline.svg +0 -3
- package/src/Assets/Icon/ic-help.svg +0 -3
- package/src/Assets/Icon/ic-info-filled.svg +0 -7
- package/src/Assets/Icon/ic-info-outlined.svg +0 -13
- package/src/Assets/Icon/ic-minus.svg +0 -3
- package/src/Assets/Icon/ic-pencil.svg +0 -3
- package/src/Assets/Icon/ic-progressing.svg +0 -6
- package/src/Assets/Icon/ic-rotate-devtron.svg +0 -103
- package/src/Assets/Icon/ic-warning.svg +0 -7
- package/src/Assets/Icon/inject-tag.svg +0 -5
- package/src/Assets/Img/app-not-deployed.png +0 -0
- package/src/Assets/Img/delete-medium.svg +0 -15
- package/src/Assets/Img/ic-empty-error@2x.png +0 -0
- package/src/Assets/Img/ic-loading-failure.png +0 -0
- package/src/Assets/Img/ic-not-authorized.svg +0 -62
- package/src/Common/AddCDButton/AddCDButton.tsx +0 -68
- package/src/Common/AddCDButton/index.ts +0 -2
- package/src/Common/AddCDButton/types.ts +0 -38
- package/src/Common/AddCDButton/utils.tsx +0 -35
- package/src/Common/Api.ts +0 -230
- package/src/Common/AppStatus/AppStatus.tsx +0 -64
- package/src/Common/AppStatus/constants.ts +0 -53
- package/src/Common/AppStatus/index.ts +0 -1
- package/src/Common/AppStatus/types.ts +0 -12
- package/src/Common/AppStatus/utils.ts +0 -14
- package/src/Common/BreadCrumb/BreadCrumb.tsx +0 -105
- package/src/Common/BreadCrumb/BreadcrumbStore.tsx +0 -25
- package/src/Common/BreadCrumb/Types.ts +0 -30
- package/src/Common/CIPipeline.Types.ts +0 -277
- package/src/Common/ChartVersionAndTypeSelector.tsx +0 -78
- package/src/Common/Checkbox.tsx +0 -36
- package/src/Common/ClipboardButton/ClipboardButton.tsx +0 -61
- package/src/Common/ClipboardButton/__tests__/ClipboardButton.test.tsx +0 -43
- package/src/Common/ClipboardButton/types.ts +0 -7
- package/src/Common/Common.service.ts +0 -315
- package/src/Common/Constants.ts +0 -243
- package/src/Common/CustomInput/CustomInput.tsx +0 -131
- package/src/Common/CustomInput/Types.ts +0 -30
- package/src/Common/CustomInput/index.ts +0 -2
- package/src/Common/CustomTagSelector/PropagateTagInfo.tsx +0 -46
- package/src/Common/CustomTagSelector/ResizableTagTextArea.tsx +0 -84
- package/src/Common/CustomTagSelector/TagDetails.tsx +0 -76
- package/src/Common/CustomTagSelector/TagLabelSelect.tsx +0 -61
- package/src/Common/CustomTagSelector/TagLabelValueSelector.tsx +0 -198
- package/src/Common/CustomTagSelector/TagSelector.utils.ts +0 -71
- package/src/Common/CustomTagSelector/Types.ts +0 -72
- package/src/Common/CustomTagSelector/ValidationRules.ts +0 -58
- package/src/Common/CustomTagSelector/index.ts +0 -6
- package/src/Common/DebouncedSearch/DebouncedSearch.tsx +0 -76
- package/src/Common/DebouncedSearch/Types.ts +0 -13
- package/src/Common/DebouncedSearch/Utils.ts +0 -19
- package/src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx +0 -61
- package/src/Common/DeleteComponentModal/DeleteComponent.tsx +0 -95
- package/src/Common/DeleteComponentModal/types.ts +0 -15
- package/src/Common/DevtronProgressing/DevtronProgressing.tsx +0 -11
- package/src/Common/DevtronProgressing/index.ts +0 -1
- package/src/Common/DevtronProgressing/types.ts +0 -4
- package/src/Common/Dialogs/ConfirmationDialog.tsx +0 -34
- package/src/Common/Dialogs/DeleteDialog.tsx +0 -69
- package/src/Common/Dialogs/DialogForm.tsx +0 -86
- package/src/Common/Dialogs/ForceDeleteDialog.tsx +0 -19
- package/src/Common/Dialogs/Types.ts +0 -47
- package/src/Common/Dialogs/index.ts +0 -4
- package/src/Common/Drawer/Drawer.scss +0 -40
- package/src/Common/Drawer/Drawer.tsx +0 -49
- package/src/Common/EmptyState/EmptyState.tsx +0 -42
- package/src/Common/EmptyState/GenericEmptyState.tsx +0 -49
- package/src/Common/EmptyState/emptyState.scss +0 -74
- package/src/Common/Error.tsx +0 -61
- package/src/Common/ErrorScreenNotFound.tsx +0 -31
- package/src/Common/Grid/Grid.tsx +0 -39
- package/src/Common/Grid/types.ts +0 -9
- package/src/Common/Helper.tsx +0 -561
- package/src/Common/Hooks/UseClickOutside/UseClickOutside.tsx +0 -15
- package/src/Common/Hooks/UseSuperAdmin/UseSuperAdmin.tsx +0 -24
- package/src/Common/Hooks/UseSuperAdmin/types.ts +0 -3
- package/src/Common/Hooks/index.ts +0 -2
- package/src/Common/ImageTags.Types.ts +0 -44
- package/src/Common/ImageTags.tsx +0 -586
- package/src/Common/InfoColorBar/InfoColourbar.tsx +0 -80
- package/src/Common/InfoColorBar/infoColourBar.scss +0 -28
- package/src/Common/Modals/Modal.tsx +0 -68
- package/src/Common/Modals/OpaqueModal.tsx +0 -36
- package/src/Common/Modals/VisibleModal.tsx +0 -55
- package/src/Common/Modals/VisibleModal2.tsx +0 -35
- package/src/Common/MultiSelectCustomization.tsx +0 -148
- package/src/Common/Policy.Types.ts +0 -63
- package/src/Common/PopupMenu.tsx +0 -199
- package/src/Common/Progressing.tsx +0 -53
- package/src/Common/RJSF/Form.tsx +0 -29
- package/src/Common/RJSF/common/FieldRow.tsx +0 -35
- package/src/Common/RJSF/common/types.ts +0 -9
- package/src/Common/RJSF/config.ts +0 -37
- package/src/Common/RJSF/constants.ts +0 -10
- package/src/Common/RJSF/index.ts +0 -3
- package/src/Common/RJSF/rjsfForm.scss +0 -18
- package/src/Common/RJSF/templates/ArrayFieldItemTemplate.tsx +0 -31
- package/src/Common/RJSF/templates/ArrayFieldTemplate.tsx +0 -78
- package/src/Common/RJSF/templates/BaseInput.tsx +0 -16
- package/src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx +0 -18
- package/src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx +0 -10
- package/src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx +0 -18
- package/src/Common/RJSF/templates/ButtonTemplates/index.ts +0 -3
- package/src/Common/RJSF/templates/Description.tsx +0 -12
- package/src/Common/RJSF/templates/Field.tsx +0 -30
- package/src/Common/RJSF/templates/FieldErrorTemplate.tsx +0 -25
- package/src/Common/RJSF/templates/ObjectFieldTemplate.tsx +0 -105
- package/src/Common/RJSF/templates/TitleField.tsx +0 -9
- package/src/Common/RJSF/templates/WrapIfAdditionalTemplate.tsx +0 -51
- package/src/Common/RJSF/templates/index.ts +0 -10
- package/src/Common/RJSF/types.ts +0 -4
- package/src/Common/RJSF/utils.ts +0 -123
- package/src/Common/RJSF/widgets/Checkbox.tsx +0 -44
- package/src/Common/RJSF/widgets/Select.tsx +0 -77
- package/src/Common/RJSF/widgets/index.ts +0 -2
- package/src/Common/RadioGroup/RadioGroup.tsx +0 -105
- package/src/Common/RadioGroup/radioGroup.scss +0 -46
- package/src/Common/RadioGroup.tsx +0 -53
- package/src/Common/Reload.tsx +0 -23
- package/src/Common/ResizableTextarea.tsx +0 -73
- package/src/Common/Security/ScanVulnerabilitiesTable.tsx +0 -55
- package/src/Common/Security/scanVulnerabilities.css +0 -69
- package/src/Common/ServerError.ts +0 -31
- package/src/Common/TippyCustomized.tsx +0 -172
- package/src/Common/ToastBody.tsx +0 -62
- package/src/Common/Toggle/Toggle.scss +0 -78
- package/src/Common/Toggle/Toggle.tsx +0 -50
- package/src/Common/Types.ts +0 -750
- package/src/Common/index.ts +0 -47
- package/src/custom.d.ts +0 -13
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -40
|
@@ -0,0 +1,1499 @@
|
|
|
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
|
+
};
|