@iqworksai/common-components 0.1.21 → 0.1.23
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/_virtual/_commonjsHelpers.mjs +8 -0
- package/dist/_virtual/dayjs.min.mjs +4 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/_virtual/index2.mjs +4 -0
- package/dist/_virtual/jquery.mjs +4 -0
- package/dist/_virtual/jstree.mjs +4 -0
- package/dist/_virtual/papaparse.min.mjs +4 -0
- package/dist/_virtual/react-is.development.mjs +4 -0
- package/dist/_virtual/react-is.production.min.mjs +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.mjs +4 -0
- package/dist/_virtual/use-sync-external-store-shim.production.mjs +4 -0
- package/dist/_virtual/use-sync-external-store-with-selector.development.mjs +4 -0
- package/dist/_virtual/use-sync-external-store-with-selector.production.mjs +4 -0
- package/dist/_virtual/utc.mjs +4 -0
- package/dist/_virtual/with-selector.development.mjs +4 -0
- package/dist/_virtual/with-selector.mjs +4 -0
- package/dist/_virtual/with-selector.production.mjs +4 -0
- package/dist/_virtual/with-selector2.mjs +4 -0
- package/dist/assets/integrations/athena.svg.mjs +4 -0
- package/dist/assets/integrations/awsS3.svg.mjs +4 -0
- package/dist/assets/integrations/azureBlob.svg.mjs +4 -0
- package/dist/assets/integrations/bigquery.svg.mjs +4 -0
- package/dist/assets/integrations/box.svg.mjs +4 -0
- package/dist/assets/integrations/confluence.svg.mjs +4 -0
- package/dist/assets/integrations/databricks.svg.mjs +4 -0
- package/dist/assets/integrations/drive.svg.mjs +4 -0
- package/dist/assets/integrations/dropbox.svg.mjs +4 -0
- package/dist/assets/integrations/dynamics365.svg.mjs +4 -0
- package/dist/assets/integrations/dynamodb.svg.mjs +4 -0
- package/dist/assets/integrations/endpoints.svg.mjs +4 -0
- package/dist/assets/integrations/exchange.svg.mjs +4 -0
- package/dist/assets/integrations/github.svg.mjs +4 -0
- package/dist/assets/integrations/gitlab.svg.mjs +4 -0
- package/dist/assets/integrations/gmail.svg.mjs +4 -0
- package/dist/assets/integrations/googleCloudStorage.svg.mjs +4 -0
- package/dist/assets/integrations/hubspot.svg.mjs +4 -0
- package/dist/assets/integrations/jira.svg.mjs +4 -0
- package/dist/assets/integrations/mssql.svg.mjs +4 -0
- package/dist/assets/integrations/mysql.svg.mjs +4 -0
- package/dist/assets/integrations/netsuite.svg.mjs +4 -0
- package/dist/assets/integrations/oneDrive.svg.mjs +4 -0
- package/dist/assets/integrations/outlook.svg.mjs +4 -0
- package/dist/assets/integrations/postgres.svg.mjs +4 -0
- package/dist/assets/integrations/redshift.svg.mjs +4 -0
- package/dist/assets/integrations/salesforce.svg.mjs +4 -0
- package/dist/assets/integrations/sap.svg.mjs +4 -0
- package/dist/assets/integrations/servicenow.svg.mjs +4 -0
- package/dist/assets/integrations/sharedDrive.svg.mjs +4 -0
- package/dist/assets/integrations/sharepoint.svg.mjs +4 -0
- package/dist/assets/integrations/slack.svg.mjs +4 -0
- package/dist/assets/integrations/snowflake.svg.mjs +4 -0
- package/dist/assets/integrations/teams.svg.mjs +4 -0
- package/dist/assets/integrations/workday.svg.mjs +4 -0
- package/dist/assets/integrations/zendesk.svg.mjs +4 -0
- package/dist/assets/logos/aiq-logo.svg.mjs +4 -0
- package/dist/assets/logos/classify-iq-logo.svg.mjs +4 -0
- package/dist/assets/logos/comply-iq-logo.svg.mjs +4 -0
- package/dist/assets/logos/consent-iq-logo.svg.mjs +4 -0
- package/dist/assets/logos/discover-iq-logo.svg.mjs +4 -0
- package/dist/assets/logos/iqagent-logo.svg.mjs +4 -0
- package/dist/assets/logos/iqworks-icon.png.mjs +4 -0
- package/dist/assets/logos/iqworks-icon.svg.mjs +10 -0
- package/dist/assets/logos/iqworks-icon.svg2.mjs +4 -0
- package/dist/assets/logos/iqworks-logo.svg.mjs +4 -0
- package/dist/assets/logos/light/aiq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/classify-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/comply-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/consent-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/discover-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/iqagent-logo.svg.mjs +4 -0
- package/dist/assets/logos/light/iqworks-icon-light.png.mjs +4 -0
- package/dist/assets/logos/light/iqworks-icon-light.svg.mjs +10 -0
- package/dist/assets/logos/light/iqworks-icon-light.svg2.mjs +4 -0
- package/dist/assets/logos/light/iqworks-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/protect-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/retain-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/light/search-iq-logo-light.svg.mjs +4 -0
- package/dist/assets/logos/protect-iq-logo.svg.mjs +4 -0
- package/dist/assets/logos/retain-iq-logo.svg.mjs +4 -0
- package/dist/assets/logos/search-iq-logo.svg.mjs +4 -0
- package/dist/components/Alert/index.mjs +34 -0
- package/dist/components/CSVImporter/helpers.mjs +82 -0
- package/dist/components/CSVImporter/index.mjs +156 -0
- package/dist/components/Charts/ChartHeader/index.mjs +15 -0
- package/dist/components/Charts/CustomLegends/index.mjs +72 -0
- package/dist/components/Charts/DonutChart/index.mjs +120 -0
- package/dist/components/Charts/GaugeChart/index.mjs +229 -0
- package/dist/components/Charts/GeoChart/index.mjs +85 -0
- package/dist/components/Charts/HorizontalBarChart/index.mjs +118 -0
- package/dist/components/Charts/NoDataChart/index.mjs +19 -0
- package/dist/components/Charts/PieChart/index.mjs +120 -0
- package/dist/components/Charts/StorageChart/index.mjs +44 -0
- package/dist/components/Charts/VerticalBarChart/index.mjs +130 -0
- package/dist/components/ConfidenceScoreTooltip/index.mjs +113 -0
- package/dist/components/ConfirmationModal/index.mjs +96 -0
- package/dist/components/CountryBox/index.mjs +18 -0
- package/dist/components/DbSchemaBrowser/index.mjs +750 -0
- package/dist/components/Dropdown/index.mjs +59 -0
- package/dist/components/ErrorBoundary/ComponentErrorBoundary.mjs +43 -0
- package/dist/components/ErrorBoundary/index.mjs +184 -0
- package/dist/components/Favicons/index.d.ts +83 -0
- package/dist/components/Favicons/index.d.ts.map +1 -0
- package/dist/components/Favicons/index.mjs +67 -0
- package/dist/components/FileBrowser/index.mjs +706 -0
- package/dist/components/FileTypeIcon/index.mjs +12 -0
- package/dist/components/ImagePreviewModal/index.mjs +101 -0
- package/dist/components/InstallUpdateLoader/index.mjs +99 -0
- package/dist/components/IntegrationLogos/index.mjs +146 -0
- package/dist/components/Loader/index.mjs +30 -0
- package/dist/components/Logos/index.mjs +121 -0
- package/dist/components/Modal/index.mjs +126 -0
- package/dist/components/MultiSelect/index.mjs +236 -0
- package/dist/components/NoActiveAttributeWarning/index.mjs +9 -0
- package/dist/components/ResourceUsageBadge/index.mjs +47 -0
- package/dist/components/RiskScoreLabel/index.mjs +10 -0
- package/dist/components/ShowMultiData/index.mjs +32 -0
- package/dist/components/StatusBadge/index.mjs +39 -0
- package/dist/components/Table/index.mjs +732 -0
- package/dist/components/TaskResult/index.mjs +157 -0
- package/dist/components/Timer/index.mjs +33 -0
- package/dist/components/Toast/index.mjs +31 -0
- package/dist/components/ToggleSwitch/index.mjs +26 -0
- package/dist/components/ToolTip/index.mjs +63 -0
- package/dist/constants/browserConstants.mjs +9 -0
- package/dist/constants/enums.mjs +9 -0
- package/dist/constants/statusBadgeClasses.mjs +15 -0
- package/dist/context/ContextProvider.mjs +21 -0
- package/dist/context/LoaderContext.mjs +15 -0
- package/dist/context/ThemeContext.mjs +201 -0
- package/dist/context/ToastContext.mjs +24 -0
- package/dist/hooks/useApiCache.mjs +47 -0
- package/dist/hooks/useAssetPath.mjs +16 -0
- package/dist/hooks/useBodyScrollLock.mjs +13 -0
- package/dist/hooks/useClickOutside.mjs +21 -0
- package/dist/hooks/useDebounce.mjs +15 -0
- package/dist/hooks/useFilterCache.mjs +22 -0
- package/dist/hooks/useReduxHook.mjs +17 -0
- package/dist/{index-DuYopz3l.cjs → index-CUUuCzyM.cjs} +44 -32
- package/dist/{index-CM7jFsCE.cjs → index-DtVOjJk3.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +166 -100
- package/dist/jquery-BKuE7Afe.cjs +13 -0
- package/dist/{jstree-CXGKFWK1.cjs → jstree-CtrCtuMv.cjs} +3 -3
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.mjs +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.mjs +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.mjs +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.mjs +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/classCallCheck.mjs +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/createClass.mjs +15 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/createSuper.mjs +17 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.mjs +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.mjs +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.mjs +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/inherits.mjs +16 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.mjs +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.mjs +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.mjs +24 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.mjs +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.mjs +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.mjs +25 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.mjs +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.mjs +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.mjs +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.mjs +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.mjs +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.mjs +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.mjs +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.mjs +14 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.mjs +9 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.mjs +11 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.mjs +11 -0
- package/dist/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.mjs +245 -0
- package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.mjs +22 -0
- package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.mjs +9 -0
- package/dist/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.mjs +56 -0
- package/dist/node_modules/@emotion/react/dist/emotion-react.browser.esm.mjs +43 -0
- package/dist/node_modules/@emotion/serialize/dist/emotion-serialize.esm.mjs +127 -0
- package/dist/node_modules/@emotion/sheet/dist/emotion-sheet.esm.mjs +44 -0
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.mjs +53 -0
- package/dist/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.mjs +7 -0
- package/dist/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.mjs +34 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +392 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +400 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs +365 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs +13 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +176 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +136 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +129 -0
- package/dist/node_modules/@headlessui/react/dist/components/description/description.mjs +39 -0
- package/dist/node_modules/@headlessui/react/dist/components/keyboard.mjs +4 -0
- package/dist/node_modules/@headlessui/react/dist/components/label/label.mjs +61 -0
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.mjs +21 -0
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.mjs +120 -0
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu.mjs +205 -0
- package/dist/node_modules/@headlessui/react/dist/components/mouse.mjs +4 -0
- package/dist/node_modules/@headlessui/react/dist/components/portal/portal.mjs +51 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.mjs +14 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.mjs +52 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.mjs +38 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.mjs +12 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.mjs +33 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.mjs +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.mjs +15 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.mjs +26 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.mjs +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-handle-toggle.mjs +15 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.mjs +41 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.mjs +13 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.mjs +11 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-on-disappear.mjs +28 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-on-unmount.mjs +14 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.mjs +38 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.mjs +32 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.mjs +12 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.mjs +12 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.mjs +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-store.mjs +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.mjs +20 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-text-value.mjs +17 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.mjs +16 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.mjs +73 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.mjs +18 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.mjs +15 -0
- package/dist/node_modules/@headlessui/react/dist/internal/disabled.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/internal/floating.mjs +154 -0
- package/dist/node_modules/@headlessui/react/dist/internal/id.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.mjs +15 -0
- package/dist/node_modules/@headlessui/react/dist/internal/portal-force-root.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/machine.mjs +74 -0
- package/dist/node_modules/@headlessui/react/dist/machines/stack-machine.mjs +33 -0
- package/dist/node_modules/@headlessui/react/dist/react-glue.mjs +12 -0
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.mjs +19 -0
- package/dist/node_modules/@headlessui/react/dist/utils/calculate-active-index.mjs +40 -0
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.mjs +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/default-map.mjs +12 -0
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.mjs +40 -0
- package/dist/node_modules/@headlessui/react/dist/utils/dom.mjs +46 -0
- package/dist/node_modules/@headlessui/react/dist/utils/element-movement.mjs +21 -0
- package/dist/node_modules/@headlessui/react/dist/utils/env.mjs +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.mjs +97 -0
- package/dist/node_modules/@headlessui/react/dist/utils/get-text-value.mjs +31 -0
- package/dist/node_modules/@headlessui/react/dist/utils/match.mjs +11 -0
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.mjs +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/owner.mjs +22 -0
- package/dist/node_modules/@headlessui/react/dist/utils/platform.mjs +14 -0
- package/dist/node_modules/@headlessui/react/dist/utils/render.mjs +126 -0
- package/dist/node_modules/@headlessui/react/dist/utils/store.mjs +14 -0
- package/dist/node_modules/@kurkle/color/dist/color.esm.mjs +448 -0
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs +34 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.mjs +30 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.mjs +93 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.mjs +57 -0
- package/dist/node_modules/@react-aria/interactions/dist/useHover.mjs +86 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.mjs +66 -0
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs +27 -0
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.mjs +15 -0
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.mjs +45 -0
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.mjs +7 -0
- package/dist/node_modules/@react-aria/utils/dist/openLink.mjs +28 -0
- package/dist/node_modules/@react-aria/utils/dist/platform.mjs +47 -0
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs +34 -0
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.mjs +6 -0
- package/dist/node_modules/@react-stately/flags/dist/import.mjs +7 -0
- package/dist/node_modules/@reactflow/background/dist/esm/index.mjs +57 -0
- package/dist/node_modules/@reactflow/controls/dist/esm/index.mjs +96 -0
- package/dist/node_modules/@reactflow/core/dist/esm/index.mjs +2666 -0
- package/dist/node_modules/@reactflow/minimap/dist/esm/index.mjs +122 -0
- package/dist/node_modules/@reactflow/node-resizer/dist/esm/index.mjs +130 -0
- package/dist/node_modules/@reactflow/node-toolbar/dist/esm/index.mjs +72 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.mjs +100 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.mjs +1721 -0
- package/dist/node_modules/chart.js/auto/auto.mjs +51 -0
- package/dist/node_modules/chart.js/dist/chart.mjs +7174 -0
- package/dist/node_modules/chart.js/dist/chunks/helpers.dataset.mjs +1734 -0
- package/dist/node_modules/chartjs-chart-geo/build/index.mjs +874 -0
- package/dist/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.mjs +613 -0
- package/dist/node_modules/classcat/index.mjs +14 -0
- package/dist/node_modules/d3-array/src/fsum.mjs +27 -0
- package/dist/node_modules/d3-array/src/merge.mjs +10 -0
- package/dist/node_modules/d3-array/src/range.mjs +9 -0
- package/dist/node_modules/d3-color/src/color.mjs +305 -0
- package/dist/node_modules/d3-color/src/cubehelix.mjs +37 -0
- package/dist/node_modules/d3-color/src/define.mjs +12 -0
- package/dist/node_modules/d3-color/src/math.mjs +5 -0
- package/dist/node_modules/d3-dispatch/src/dispatch.mjs +64 -0
- package/dist/node_modules/d3-drag/src/constant.mjs +4 -0
- package/dist/node_modules/d3-drag/src/drag.mjs +121 -0
- package/dist/node_modules/d3-drag/src/event.mjs +33 -0
- package/dist/node_modules/d3-drag/src/nodrag.mjs +16 -0
- package/dist/node_modules/d3-drag/src/noevent.mjs +13 -0
- package/dist/node_modules/d3-ease/src/cubic.mjs +6 -0
- package/dist/node_modules/d3-geo/src/cartesian.mjs +33 -0
- package/dist/node_modules/d3-geo/src/circle.mjs +18 -0
- package/dist/node_modules/d3-geo/src/clip/antimeridian.mjs +45 -0
- package/dist/node_modules/d3-geo/src/clip/buffer.mjs +23 -0
- package/dist/node_modules/d3-geo/src/clip/circle.mjs +66 -0
- package/dist/node_modules/d3-geo/src/clip/index.mjs +67 -0
- package/dist/node_modules/d3-geo/src/clip/line.mjs +43 -0
- package/dist/node_modules/d3-geo/src/clip/rectangle.mjs +76 -0
- package/dist/node_modules/d3-geo/src/clip/rejoin.mjs +56 -0
- package/dist/node_modules/d3-geo/src/compose.mjs +11 -0
- package/dist/node_modules/d3-geo/src/contains.mjs +70 -0
- package/dist/node_modules/d3-geo/src/distance.mjs +8 -0
- package/dist/node_modules/d3-geo/src/graticule.mjs +68 -0
- package/dist/node_modules/d3-geo/src/identity.mjs +4 -0
- package/dist/node_modules/d3-geo/src/length.mjs +32 -0
- package/dist/node_modules/d3-geo/src/math.mjs +33 -0
- package/dist/node_modules/d3-geo/src/noop.mjs +5 -0
- package/dist/node_modules/d3-geo/src/path/area.mjs +33 -0
- package/dist/node_modules/d3-geo/src/path/bounds.mjs +18 -0
- package/dist/node_modules/d3-geo/src/path/centroid.mjs +48 -0
- package/dist/node_modules/d3-geo/src/path/context.mjs +43 -0
- package/dist/node_modules/d3-geo/src/path/index.mjs +41 -0
- package/dist/node_modules/d3-geo/src/path/measure.mjs +31 -0
- package/dist/node_modules/d3-geo/src/path/string.mjs +69 -0
- package/dist/node_modules/d3-geo/src/pointEqual.mjs +7 -0
- package/dist/node_modules/d3-geo/src/polygonContains.mjs +27 -0
- package/dist/node_modules/d3-geo/src/projection/albers.mjs +7 -0
- package/dist/node_modules/d3-geo/src/projection/albersUsa.mjs +65 -0
- package/dist/node_modules/d3-geo/src/projection/azimuthal.mjs +23 -0
- package/dist/node_modules/d3-geo/src/projection/azimuthalEqualArea.mjs +16 -0
- package/dist/node_modules/d3-geo/src/projection/azimuthalEquidistant.mjs +16 -0
- package/dist/node_modules/d3-geo/src/projection/conic.mjs +11 -0
- package/dist/node_modules/d3-geo/src/projection/conicConformal.mjs +26 -0
- package/dist/node_modules/d3-geo/src/projection/conicEqualArea.mjs +23 -0
- package/dist/node_modules/d3-geo/src/projection/conicEquidistant.mjs +22 -0
- package/dist/node_modules/d3-geo/src/projection/cylindricalEqualArea.mjs +13 -0
- package/dist/node_modules/d3-geo/src/projection/equalEarth.mjs +25 -0
- package/dist/node_modules/d3-geo/src/projection/equirectangular.mjs +12 -0
- package/dist/node_modules/d3-geo/src/projection/fit.mjs +33 -0
- package/dist/node_modules/d3-geo/src/projection/gnomonic.mjs +15 -0
- package/dist/node_modules/d3-geo/src/projection/index.mjs +104 -0
- package/dist/node_modules/d3-geo/src/projection/mercator.mjs +34 -0
- package/dist/node_modules/d3-geo/src/projection/naturalEarth1.mjs +27 -0
- package/dist/node_modules/d3-geo/src/projection/orthographic.mjs +14 -0
- package/dist/node_modules/d3-geo/src/projection/resample.mjs +62 -0
- package/dist/node_modules/d3-geo/src/projection/stereographic.mjs +17 -0
- package/dist/node_modules/d3-geo/src/projection/transverseMercator.mjs +20 -0
- package/dist/node_modules/d3-geo/src/rotation.mjs +48 -0
- package/dist/node_modules/d3-geo/src/stream.mjs +52 -0
- package/dist/node_modules/d3-geo/src/transform.mjs +33 -0
- package/dist/node_modules/d3-interpolate/src/basis.mjs +15 -0
- package/dist/node_modules/d3-interpolate/src/color.mjs +29 -0
- package/dist/node_modules/d3-interpolate/src/constant.mjs +4 -0
- package/dist/node_modules/d3-interpolate/src/cubehelix.mjs +19 -0
- package/dist/node_modules/d3-interpolate/src/number.mjs +8 -0
- package/dist/node_modules/d3-interpolate/src/rgb.mjs +28 -0
- package/dist/node_modules/d3-interpolate/src/string.mjs +24 -0
- package/dist/node_modules/d3-interpolate/src/transform/decompose.mjs +23 -0
- package/dist/node_modules/d3-interpolate/src/transform/index.mjs +37 -0
- package/dist/node_modules/d3-interpolate/src/transform/parse.mjs +13 -0
- package/dist/node_modules/d3-interpolate/src/zoom.mjs +42 -0
- package/dist/node_modules/d3-scale-chromatic/src/colors.mjs +7 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/BrBG.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/PRGn.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/PiYG.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/PuOr.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/RdBu.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/RdGy.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/diverging/Spectral.mjs +18 -0
- package/dist/node_modules/d3-scale-chromatic/src/ramp.mjs +5 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.mjs +6 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.mjs +6 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.mjs +13 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.mjs +9 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.mjs +6 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.mjs +15 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-single/Blues.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-single/Greens.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-single/Greys.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-single/Purples.mjs +16 -0
- package/dist/node_modules/d3-scale-chromatic/src/sequential-single/Reds.mjs +16 -0
- package/dist/node_modules/d3-selection/src/array.mjs +6 -0
- package/dist/node_modules/d3-selection/src/constant.mjs +8 -0
- package/dist/node_modules/d3-selection/src/creator.mjs +20 -0
- package/dist/node_modules/d3-selection/src/matcher.mjs +14 -0
- package/dist/node_modules/d3-selection/src/namespace.mjs +8 -0
- package/dist/node_modules/d3-selection/src/namespaces.mjs +12 -0
- package/dist/node_modules/d3-selection/src/pointer.mjs +18 -0
- package/dist/node_modules/d3-selection/src/select.mjs +7 -0
- package/dist/node_modules/d3-selection/src/selection/append.mjs +10 -0
- package/dist/node_modules/d3-selection/src/selection/attr.mjs +44 -0
- package/dist/node_modules/d3-selection/src/selection/call.mjs +7 -0
- package/dist/node_modules/d3-selection/src/selection/classed.mjs +54 -0
- package/dist/node_modules/d3-selection/src/selection/clone.mjs +14 -0
- package/dist/node_modules/d3-selection/src/selection/data.mjs +42 -0
- package/dist/node_modules/d3-selection/src/selection/datum.mjs +6 -0
- package/dist/node_modules/d3-selection/src/selection/dispatch.mjs +21 -0
- package/dist/node_modules/d3-selection/src/selection/each.mjs +9 -0
- package/dist/node_modules/d3-selection/src/selection/empty.mjs +6 -0
- package/dist/node_modules/d3-selection/src/selection/enter.mjs +27 -0
- package/dist/node_modules/d3-selection/src/selection/exit.mjs +8 -0
- package/dist/node_modules/d3-selection/src/selection/filter.mjs +12 -0
- package/dist/node_modules/d3-selection/src/selection/html.mjs +20 -0
- package/dist/node_modules/d3-selection/src/selection/index.mjs +87 -0
- package/dist/node_modules/d3-selection/src/selection/insert.mjs +14 -0
- package/dist/node_modules/d3-selection/src/selection/iterator.mjs +8 -0
- package/dist/node_modules/d3-selection/src/selection/join.mjs +7 -0
- package/dist/node_modules/d3-selection/src/selection/lower.mjs +9 -0
- package/dist/node_modules/d3-selection/src/selection/merge.mjs +12 -0
- package/dist/node_modules/d3-selection/src/selection/node.mjs +11 -0
- package/dist/node_modules/d3-selection/src/selection/nodes.mjs +6 -0
- package/dist/node_modules/d3-selection/src/selection/on.mjs +52 -0
- package/dist/node_modules/d3-selection/src/selection/order.mjs +9 -0
- package/dist/node_modules/d3-selection/src/selection/property.mjs +22 -0
- package/dist/node_modules/d3-selection/src/selection/raise.mjs +9 -0
- package/dist/node_modules/d3-selection/src/selection/remove.mjs +10 -0
- package/dist/node_modules/d3-selection/src/selection/select.mjs +12 -0
- package/dist/node_modules/d3-selection/src/selection/selectAll.mjs +18 -0
- package/dist/node_modules/d3-selection/src/selection/selectChild.mjs +16 -0
- package/dist/node_modules/d3-selection/src/selection/selectChildren.mjs +16 -0
- package/dist/node_modules/d3-selection/src/selection/size.mjs +8 -0
- package/dist/node_modules/d3-selection/src/selection/sort.mjs +19 -0
- package/dist/node_modules/d3-selection/src/selection/sparse.mjs +6 -0
- package/dist/node_modules/d3-selection/src/selection/style.mjs +27 -0
- package/dist/node_modules/d3-selection/src/selection/text.mjs +20 -0
- package/dist/node_modules/d3-selection/src/selector.mjs +10 -0
- package/dist/node_modules/d3-selection/src/selectorAll.mjs +11 -0
- package/dist/node_modules/d3-selection/src/sourceEvent.mjs +8 -0
- package/dist/node_modules/d3-selection/src/window.mjs +6 -0
- package/dist/node_modules/d3-timer/src/timeout.mjs +10 -0
- package/dist/node_modules/d3-timer/src/timer.mjs +62 -0
- package/dist/node_modules/d3-transition/src/interrupt.mjs +18 -0
- package/dist/node_modules/d3-transition/src/selection/index.mjs +5 -0
- package/dist/node_modules/d3-transition/src/selection/interrupt.mjs +9 -0
- package/dist/node_modules/d3-transition/src/selection/transition.mjs +28 -0
- package/dist/node_modules/d3-transition/src/transition/attr.mjs +49 -0
- package/dist/node_modules/d3-transition/src/transition/attrTween.mjs +38 -0
- package/dist/node_modules/d3-transition/src/transition/delay.mjs +18 -0
- package/dist/node_modules/d3-transition/src/transition/duration.mjs +18 -0
- package/dist/node_modules/d3-transition/src/transition/ease.mjs +14 -0
- package/dist/node_modules/d3-transition/src/transition/easeVarying.mjs +15 -0
- package/dist/node_modules/d3-transition/src/transition/end.mjs +16 -0
- package/dist/node_modules/d3-transition/src/transition/filter.mjs +12 -0
- package/dist/node_modules/d3-transition/src/transition/index.mjs +65 -0
- package/dist/node_modules/d3-transition/src/transition/interpolate.mjs +11 -0
- package/dist/node_modules/d3-transition/src/transition/merge.mjs +13 -0
- package/dist/node_modules/d3-transition/src/transition/on.mjs +21 -0
- package/dist/node_modules/d3-transition/src/transition/remove.mjs +13 -0
- package/dist/node_modules/d3-transition/src/transition/schedule.mjs +85 -0
- package/dist/node_modules/d3-transition/src/transition/select.mjs +14 -0
- package/dist/node_modules/d3-transition/src/transition/selectAll.mjs +18 -0
- package/dist/node_modules/d3-transition/src/transition/selection.mjs +8 -0
- package/dist/node_modules/d3-transition/src/transition/style.mjs +45 -0
- package/dist/node_modules/d3-transition/src/transition/styleTween.mjs +23 -0
- package/dist/node_modules/d3-transition/src/transition/text.mjs +18 -0
- package/dist/node_modules/d3-transition/src/transition/textTween.mjs +23 -0
- package/dist/node_modules/d3-transition/src/transition/transition.mjs +19 -0
- package/dist/node_modules/d3-transition/src/transition/tween.mjs +56 -0
- package/dist/node_modules/d3-zoom/src/constant.mjs +4 -0
- package/dist/node_modules/d3-zoom/src/event.mjs +17 -0
- package/dist/node_modules/d3-zoom/src/noevent.mjs +10 -0
- package/dist/node_modules/d3-zoom/src/transform.mjs +45 -0
- package/dist/node_modules/d3-zoom/src/zoom.mjs +233 -0
- package/dist/node_modules/dayjs/dayjs.min.mjs +282 -0
- package/dist/node_modules/dayjs/plugin/utc.mjs +79 -0
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.mjs +17 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.mjs +95 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.mjs +78 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.mjs +8 -0
- package/dist/node_modules/jquery/dist/jquery.mjs +3642 -0
- package/dist/{jstree-ETZgxxT1.js → node_modules/jstree/dist/jstree.mjs} +17 -17
- package/dist/node_modules/memoize-one/dist/memoize-one.esm.mjs +36 -0
- package/dist/node_modules/papaparse/papaparse.min.mjs +421 -0
- package/dist/node_modules/react-chartjs-2/dist/index.mjs +94 -0
- package/dist/node_modules/react-icons/ai/index.mjs +20 -0
- package/dist/node_modules/react-icons/fa/index.mjs +64 -0
- package/dist/node_modules/react-icons/fi/index.mjs +48 -0
- package/dist/node_modules/react-icons/go/index.mjs +8 -0
- package/dist/node_modules/react-icons/io/index.mjs +8 -0
- package/dist/node_modules/react-icons/io5/index.mjs +20 -0
- package/dist/node_modules/react-icons/lib/iconBase.mjs +108 -0
- package/dist/node_modules/react-icons/lib/iconContext.mjs +12 -0
- package/dist/node_modules/react-icons/md/index.mjs +56 -0
- package/dist/node_modules/react-select/creatable/dist/react-select-creatable.esm.mjs +17 -0
- package/dist/node_modules/react-select/dist/Select-ef7c0426.esm.mjs +1763 -0
- package/dist/node_modules/react-select/dist/index-641ee5b8.esm.mjs +867 -0
- package/dist/node_modules/react-select/dist/react-select.esm.mjs +19 -0
- package/dist/node_modules/react-select/dist/useCreatable-09aaeb9a.esm.mjs +62 -0
- package/dist/node_modules/react-select/dist/useStateManager-7e1e8489.esm.mjs +29 -0
- package/dist/node_modules/reactflow/dist/esm/index.mjs +77 -0
- package/dist/node_modules/stylis/src/Enum.mjs +12 -0
- package/dist/node_modules/stylis/src/Middleware.mjs +18 -0
- package/dist/node_modules/stylis/src/Parser.mjs +114 -0
- package/dist/node_modules/stylis/src/Serializer.mjs +27 -0
- package/dist/node_modules/stylis/src/Tokenizer.mjs +131 -0
- package/dist/node_modules/stylis/src/Utility.mjs +50 -0
- package/dist/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.mjs +5 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +67 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +66 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +67 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +55 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.mjs +66 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.mjs +65 -0
- package/dist/node_modules/use-sync-external-store/shim/index.mjs +10 -0
- package/dist/node_modules/use-sync-external-store/shim/with-selector.mjs +10 -0
- package/dist/node_modules/use-sync-external-store/with-selector.mjs +8 -0
- package/dist/node_modules/zustand/esm/shallow.mjs +30 -0
- package/dist/node_modules/zustand/esm/traditional.mjs +22 -0
- package/dist/node_modules/zustand/esm/vanilla.mjs +18 -0
- package/dist/types/table.mjs +14 -0
- package/dist/utils/classNames.mjs +26 -0
- package/dist/utils/dbSchemaBrowserUtils.mjs +86 -0
- package/dist/utils/fileBrowserUtils.mjs +66 -0
- package/dist/utils/formatBytes.mjs +8 -0
- package/dist/utils/memoUtils.mjs +29 -0
- package/dist/utils/riskScore.mjs +42 -0
- package/dist/utils/statusConfig.mjs +72 -0
- package/package.json +5 -1
- package/dist/index--e0eFmJz.js +0 -28717
- package/dist/index-Bsibz5yn.js +0 -5204
- package/dist/jquery-B5k82Ft4.js +0 -3622
- package/dist/jquery-DJhgA209.cjs +0 -13
- package/dist/jquery-DXFsjw95.js +0 -26
- package/dist/jquery-DeHtnyTt.cjs +0 -1
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useRef as D, useEffect as w, useMemo as k, useCallback as f } from "react";
|
|
3
|
+
import { Chart as L, ArcElement as H, Tooltip as J, Legend as K } from "../../../node_modules/chart.js/dist/chart.mjs";
|
|
4
|
+
import { Doughnut as Q } from "../../../node_modules/react-chartjs-2/dist/index.mjs";
|
|
5
|
+
L.register(H, J, K);
|
|
6
|
+
L.defaults.font.family = "'Rubik', 'Inter', sans-serif";
|
|
7
|
+
const Z = (n) => `
|
|
8
|
+
input[type=range] {
|
|
9
|
+
height: 4px;
|
|
10
|
+
-webkit-appearance: none;
|
|
11
|
+
width: 100%;
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
background: none;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Center thumbs vertically on the track */
|
|
21
|
+
input[type=range]::-webkit-slider-runnable-track {
|
|
22
|
+
height: 1px;
|
|
23
|
+
-webkit-appearance: none;
|
|
24
|
+
color: #13bba4;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
input[type=range]::-webkit-slider-thumb {
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
width: ${n}px;
|
|
30
|
+
height: ${n}px;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
background: #ffffff;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
|
35
|
+
border: 2px solid gray;
|
|
36
|
+
margin-top: -0.8rem;
|
|
37
|
+
pointer-events: all;
|
|
38
|
+
z-index: 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
input[type=range]::-moz-range-track {
|
|
42
|
+
height: 1px;
|
|
43
|
+
-moz-appearance: none;
|
|
44
|
+
color: #13bba4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
input[type=range]::-moz-range-thumb {
|
|
48
|
+
width: ${n}px;
|
|
49
|
+
height: ${n}px;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
background: #ffffff;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
|
54
|
+
border: 2px solid gray;
|
|
55
|
+
margin-top: -0.8rem;
|
|
56
|
+
pointer-events: all;
|
|
57
|
+
}
|
|
58
|
+
`, re = ({
|
|
59
|
+
title: n,
|
|
60
|
+
data: A,
|
|
61
|
+
maxValue: $,
|
|
62
|
+
minRange: g = 0,
|
|
63
|
+
maxRange: h = 10,
|
|
64
|
+
onMinRangeChange: i,
|
|
65
|
+
onMaxRangeChange: c,
|
|
66
|
+
showRangeSlider: I = !1,
|
|
67
|
+
sliderMin: o = 0,
|
|
68
|
+
sliderMax: b = 10,
|
|
69
|
+
sliderStep: N = 0.1,
|
|
70
|
+
formatSliderLabel: E = (P) => `${P.toFixed(1)}Y`,
|
|
71
|
+
hasData: d = !0
|
|
72
|
+
}) => {
|
|
73
|
+
const [P, W] = v(0), x = D(null), [a, S] = v(g), [l, C] = v(h), j = A, y = $ > 0 ? j / $ * 100 : 0, G = 25;
|
|
74
|
+
w(() => {
|
|
75
|
+
const t = () => {
|
|
76
|
+
if (x.current) {
|
|
77
|
+
const r = x.current.offsetWidth;
|
|
78
|
+
W((V) => V !== r ? r : V);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return window.addEventListener("resize", t), t(), () => window.removeEventListener("resize", t);
|
|
82
|
+
}, []), w(() => {
|
|
83
|
+
S(g);
|
|
84
|
+
}, [g]), w(() => {
|
|
85
|
+
C(h);
|
|
86
|
+
}, [h]);
|
|
87
|
+
const U = k(
|
|
88
|
+
() => ({
|
|
89
|
+
responsive: !0,
|
|
90
|
+
maintainAspectRatio: !1,
|
|
91
|
+
plugins: {
|
|
92
|
+
title: {
|
|
93
|
+
display: !1,
|
|
94
|
+
text: n || "Gauge Chart",
|
|
95
|
+
color: "#302d2eff",
|
|
96
|
+
font: { weight: "bold", size: 24 },
|
|
97
|
+
position: "top",
|
|
98
|
+
align: "start",
|
|
99
|
+
padding: {
|
|
100
|
+
top: 0
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
legend: { display: !1 },
|
|
104
|
+
tooltip: { enabled: !1 },
|
|
105
|
+
datalabels: {
|
|
106
|
+
display: !1
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
[n]
|
|
111
|
+
), X = k(
|
|
112
|
+
() => ({
|
|
113
|
+
datasets: [
|
|
114
|
+
{
|
|
115
|
+
data: d ? [y, 100 - y] : [0, 100],
|
|
116
|
+
backgroundColor: d ? [
|
|
117
|
+
getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim() || "#ff6503",
|
|
118
|
+
getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim() || "#dae0e8"
|
|
119
|
+
] : [
|
|
120
|
+
getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim() || "#dae0e8",
|
|
121
|
+
getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim() || "#dae0e8"
|
|
122
|
+
],
|
|
123
|
+
borderWidth: 0,
|
|
124
|
+
cutout: "75%",
|
|
125
|
+
circumference: 300,
|
|
126
|
+
rotation: -150
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}),
|
|
130
|
+
[y, d]
|
|
131
|
+
), _ = f(
|
|
132
|
+
(t) => {
|
|
133
|
+
const r = parseFloat(t.target.value);
|
|
134
|
+
S(r);
|
|
135
|
+
},
|
|
136
|
+
[]
|
|
137
|
+
), O = f(
|
|
138
|
+
(t) => {
|
|
139
|
+
const r = parseFloat(t.target.value);
|
|
140
|
+
C(r);
|
|
141
|
+
},
|
|
142
|
+
[]
|
|
143
|
+
), z = f(() => {
|
|
144
|
+
i == null || i(a);
|
|
145
|
+
}, [a, i]), T = f(() => {
|
|
146
|
+
c == null || c(l);
|
|
147
|
+
}, [l, c]), p = b - o, u = p > 0 ? (a - o) / p * 100 : 0, m = p > 0 ? (l - o) / p * 100 : 0, Y = `${u}%`, q = `${m}%`, B = k(() => {
|
|
148
|
+
const t = getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim() || "#dae0e8", r = getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim() || "#ff6503";
|
|
149
|
+
return {
|
|
150
|
+
background: `linear-gradient(to right, ${t} 0%, ${t} ${u}%,
|
|
151
|
+
${r} ${u}%, ${r} ${m}%, ${t} ${m}%, ${t} 100%)`
|
|
152
|
+
};
|
|
153
|
+
}, [u, m]);
|
|
154
|
+
return /* @__PURE__ */ s("div", { className: "retention flex flex-col items-center rounded-xl select-none p-3", children: [
|
|
155
|
+
/* @__PURE__ */ e("div", { className: "w-full flex flex-col items-center justify-center p-2 mb-4", children: /* @__PURE__ */ s("div", { className: "relative w-11/12 h-64 flex items-center justify-center", children: [
|
|
156
|
+
/* @__PURE__ */ e(Q, { data: X, options: U }),
|
|
157
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: d ? /* @__PURE__ */ s(F, { children: [
|
|
158
|
+
/* @__PURE__ */ e("span", { className: "text-xl font-bold", style: { color: "var(--chart-text-color)" }, children: j.toLocaleString() }),
|
|
159
|
+
/* @__PURE__ */ e("span", { className: "text-xs", style: { color: "var(--secondary-text-color)" }, children: n })
|
|
160
|
+
] }) : /* @__PURE__ */ s(F, { children: [
|
|
161
|
+
/* @__PURE__ */ e("span", { className: "text-lg font-medium", style: { color: "var(--secondary-text-color)" }, children: "No Data" }),
|
|
162
|
+
/* @__PURE__ */ e("span", { className: "text-xs", style: { color: "var(--secondary-text-color)" }, children: "Available" })
|
|
163
|
+
] }) })
|
|
164
|
+
] }) }),
|
|
165
|
+
I && /* @__PURE__ */ e("div", { className: "w-full px-6", children: /* @__PURE__ */ s("div", { className: "relative w-full", ref: x, children: [
|
|
166
|
+
/* @__PURE__ */ e("style", { children: Z(G) }),
|
|
167
|
+
/* @__PURE__ */ e("div", { className: "absolute top-0 w-full h-1 rounded-full", style: B }),
|
|
168
|
+
/* @__PURE__ */ e(
|
|
169
|
+
"input",
|
|
170
|
+
{
|
|
171
|
+
type: "range",
|
|
172
|
+
min: o,
|
|
173
|
+
max: b,
|
|
174
|
+
step: N,
|
|
175
|
+
value: a,
|
|
176
|
+
onChange: _,
|
|
177
|
+
onMouseUp: z,
|
|
178
|
+
onTouchEnd: z,
|
|
179
|
+
className: "w-full"
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ e(
|
|
183
|
+
"input",
|
|
184
|
+
{
|
|
185
|
+
type: "range",
|
|
186
|
+
min: o,
|
|
187
|
+
max: b,
|
|
188
|
+
step: N,
|
|
189
|
+
value: l,
|
|
190
|
+
onChange: O,
|
|
191
|
+
onMouseUp: T,
|
|
192
|
+
onTouchEnd: T,
|
|
193
|
+
className: "w-full"
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ e(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
className: "absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",
|
|
200
|
+
style: {
|
|
201
|
+
left: Y,
|
|
202
|
+
top: "-40px",
|
|
203
|
+
transform: "translateX(-50%)",
|
|
204
|
+
clipPath: "polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",
|
|
205
|
+
backgroundColor: "hsl(var(--brand-orange))"
|
|
206
|
+
},
|
|
207
|
+
children: E(a)
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ e(
|
|
211
|
+
"div",
|
|
212
|
+
{
|
|
213
|
+
className: "absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",
|
|
214
|
+
style: {
|
|
215
|
+
left: q,
|
|
216
|
+
top: "-40px",
|
|
217
|
+
transform: "translateX(-50%)",
|
|
218
|
+
clipPath: "polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",
|
|
219
|
+
backgroundColor: "hsl(var(--brand-dark))"
|
|
220
|
+
},
|
|
221
|
+
children: E(l)
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
] }) })
|
|
225
|
+
] });
|
|
226
|
+
};
|
|
227
|
+
export {
|
|
228
|
+
re as default
|
|
229
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useEffect as C } from "react";
|
|
3
|
+
import { Chart as S } from "../../../node_modules/react-chartjs-2/dist/index.mjs";
|
|
4
|
+
import { Chart as m, Tooltip as x, Legend as v, CategoryScale as E, LinearScale as P, BarElement as V } from "../../../node_modules/chart.js/dist/chart.mjs";
|
|
5
|
+
import { ChoroplethController as w, GeoFeature as j, ProjectionScale as k, ColorScale as A } from "../../../node_modules/chartjs-chart-geo/build/index.mjs";
|
|
6
|
+
m.register(w, j, k, A, x, v, E, P, V);
|
|
7
|
+
m.defaults.font.family = "'Rubik', 'Inter', sans-serif";
|
|
8
|
+
const _ = ({ data: l = /* @__PURE__ */ new Map(), defaultCountry: p = "India", geoData: i, dataLabel: f = "Data Points Found" }) => {
|
|
9
|
+
const [u, c] = d(null), [g, y] = d(0), s = i ? i.features.filter((e) => e.properties.name !== "Antarctica") : [];
|
|
10
|
+
if (C(() => {
|
|
11
|
+
if (l != null && l.size) {
|
|
12
|
+
let e = 0;
|
|
13
|
+
l.forEach((t, r) => {
|
|
14
|
+
u === r && (e = t);
|
|
15
|
+
}), y(e);
|
|
16
|
+
}
|
|
17
|
+
}, [u, l]), !i || s.length === 0)
|
|
18
|
+
return /* @__PURE__ */ a("div", { className: "geochart-container flex flex-col items-center justify-center p-8", style: { minHeight: "400px" }, children: /* @__PURE__ */ a("p", { style: { color: "var(--secondary-text-color)" }, children: "Geo data not provided. Please provide geoData prop." }) });
|
|
19
|
+
const h = {
|
|
20
|
+
datasets: [
|
|
21
|
+
{
|
|
22
|
+
label: "Data Distribution",
|
|
23
|
+
data: s.map((e) => ({
|
|
24
|
+
feature: e,
|
|
25
|
+
value: l.get(e.properties.name) || 0
|
|
26
|
+
})),
|
|
27
|
+
borderColor: "#fff",
|
|
28
|
+
borderWidth: 1,
|
|
29
|
+
backgroundColor: (e) => {
|
|
30
|
+
var n;
|
|
31
|
+
if (!((n = e == null ? void 0 : e.raw) != null && n.feature))
|
|
32
|
+
return getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim() || "#dae0e8";
|
|
33
|
+
const t = e.raw.feature.properties.name, r = getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim() || "#ff6503", o = getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim() || "#dae0e8";
|
|
34
|
+
return t === p ? r : u === t ? r + "99" : o;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}, b = {
|
|
39
|
+
responsive: !0,
|
|
40
|
+
maintainAspectRatio: !1,
|
|
41
|
+
scales: {
|
|
42
|
+
projection: {
|
|
43
|
+
axis: "x",
|
|
44
|
+
projection: "equirectangular"
|
|
45
|
+
},
|
|
46
|
+
color: {
|
|
47
|
+
axis: "x",
|
|
48
|
+
display: !1
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
plugins: {
|
|
52
|
+
legend: {
|
|
53
|
+
display: !1
|
|
54
|
+
},
|
|
55
|
+
tooltip: {
|
|
56
|
+
backgroundColor: getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim() || "#fff",
|
|
57
|
+
titleColor: getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim() || "#333",
|
|
58
|
+
bodyColor: getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim() || "#333",
|
|
59
|
+
borderColor: getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim() || "#e5e7eb",
|
|
60
|
+
borderWidth: 1,
|
|
61
|
+
callbacks: {
|
|
62
|
+
title: (e) => {
|
|
63
|
+
var t, r, o;
|
|
64
|
+
return e.length ? ((o = (r = (t = e[0].raw) == null ? void 0 : t.feature) == null ? void 0 : r.properties) == null ? void 0 : o.name) ?? "Unknown" : "";
|
|
65
|
+
},
|
|
66
|
+
label: () => `${f}: ${g}`
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
datalabels: {
|
|
70
|
+
display: !1
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
onHover: (e, t) => {
|
|
74
|
+
var r, o;
|
|
75
|
+
if (t.length > 0) {
|
|
76
|
+
const n = t[0].index;
|
|
77
|
+
c(((o = (r = s[n]) == null ? void 0 : r.properties) == null ? void 0 : o.name) || null);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return /* @__PURE__ */ a("div", { className: "geochart-container flex flex-col items-center", onMouseLeave: () => c(null), style: { minHeight: "400px" }, children: /* @__PURE__ */ a(S, { type: "choropleth", data: h, options: b, className: "w-full h-full" }) });
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
_ as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as S } from "react";
|
|
3
|
+
import { Chart as u, CategoryScale as k, LogarithmicScale as V, LinearScale as L, BarElement as E, Title as M, Tooltip as O, Legend as P } from "../../../node_modules/chart.js/dist/chart.mjs";
|
|
4
|
+
import { Bar as R } from "../../../node_modules/react-chartjs-2/dist/index.mjs";
|
|
5
|
+
import { ScaleType as i } from "../../../constants/enums.mjs";
|
|
6
|
+
import { useTheme as j } from "../../../context/ThemeContext.mjs";
|
|
7
|
+
u.register(k, V, L, E, M, O, P);
|
|
8
|
+
u.defaults.font.family = "'Rubik', 'Inter', sans-serif";
|
|
9
|
+
const N = ({ data: o, maxValue: c = 5e4, scaleType: a = i.LINEAR }) => {
|
|
10
|
+
const { theme: g } = j(), n = getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim() || (g === "dark" ? "#fff" : "#333333"), { processedData: p, computedMaxValue: f } = S(() => {
|
|
11
|
+
const e = Object.values(o);
|
|
12
|
+
let t = [...e], r = c;
|
|
13
|
+
if (a === i.NORMALISED) {
|
|
14
|
+
const l = Math.min(...e), s = Math.max(...e) - l;
|
|
15
|
+
t = e.map((C) => (C - l) / s * 100), r = 100;
|
|
16
|
+
} else a === i.LOG ? (t = e.map((l) => Math.max(l, 0.1)), r = c || Math.max(...t) * 1.1) : r = c || Math.max(...e) * 1.1;
|
|
17
|
+
return {
|
|
18
|
+
processedData: Object.keys(o).reduce(
|
|
19
|
+
(l, m, s) => (l[m] = t[s], l),
|
|
20
|
+
{}
|
|
21
|
+
),
|
|
22
|
+
computedMaxValue: r
|
|
23
|
+
};
|
|
24
|
+
}, [o, a, c]), b = Math.max(300, Object.keys(o).length * 50), h = (e) => a === i.NORMALISED ? `Value: ${o[Object.keys(o)[e.dataIndex]].toLocaleString()} (${e.raw.toFixed(2)}%)` : `Value: ${e.raw.toLocaleString()}`, y = {
|
|
25
|
+
indexAxis: "y",
|
|
26
|
+
responsive: !0,
|
|
27
|
+
maintainAspectRatio: !1,
|
|
28
|
+
plugins: {
|
|
29
|
+
legend: {
|
|
30
|
+
display: !1,
|
|
31
|
+
labels: {
|
|
32
|
+
color: n
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
display: !1
|
|
37
|
+
},
|
|
38
|
+
datalabels: {
|
|
39
|
+
color: "#ffff",
|
|
40
|
+
font: { weight: "bold", size: 14 },
|
|
41
|
+
anchor: "end",
|
|
42
|
+
align: "left",
|
|
43
|
+
formatter: (e, t) => t.dataset.label === "Blue Bar" ? e.toLocaleString() : ""
|
|
44
|
+
},
|
|
45
|
+
tooltip: {
|
|
46
|
+
backgroundColor: getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),
|
|
47
|
+
titleColor: n,
|
|
48
|
+
bodyColor: n,
|
|
49
|
+
borderColor: getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),
|
|
50
|
+
borderWidth: 1,
|
|
51
|
+
callbacks: {
|
|
52
|
+
label: (e) => h(e)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
scales: {
|
|
57
|
+
x: {
|
|
58
|
+
type: a === i.LOG ? "logarithmic" : "linear",
|
|
59
|
+
max: f,
|
|
60
|
+
grid: {
|
|
61
|
+
display: !1,
|
|
62
|
+
offset: !1,
|
|
63
|
+
color: getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()
|
|
64
|
+
},
|
|
65
|
+
ticks: {
|
|
66
|
+
font: {
|
|
67
|
+
size: 11.19,
|
|
68
|
+
weight: "400"
|
|
69
|
+
},
|
|
70
|
+
color: n
|
|
71
|
+
},
|
|
72
|
+
border: {
|
|
73
|
+
color: getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
y: {
|
|
77
|
+
grid: {
|
|
78
|
+
display: !1,
|
|
79
|
+
color: getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()
|
|
80
|
+
},
|
|
81
|
+
ticks: {
|
|
82
|
+
font: {
|
|
83
|
+
size: 10.33,
|
|
84
|
+
weight: "500"
|
|
85
|
+
},
|
|
86
|
+
color: n,
|
|
87
|
+
align: "center",
|
|
88
|
+
callback: function(e) {
|
|
89
|
+
const t = this.getLabelForValue(e), r = 25;
|
|
90
|
+
return t.length > r ? t.slice(0, r) + "..." : t;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
border: {
|
|
94
|
+
color: getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}, x = {
|
|
99
|
+
labels: Object.keys(o),
|
|
100
|
+
datasets: [
|
|
101
|
+
{
|
|
102
|
+
label: "Bar Chart",
|
|
103
|
+
data: Object.values(p),
|
|
104
|
+
backgroundColor: getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),
|
|
105
|
+
borderRadius: { topLeft: 0, topRight: 20, bottomLeft: 0, bottomRight: 20 },
|
|
106
|
+
barThickness: 25,
|
|
107
|
+
borderSkipped: !1,
|
|
108
|
+
grouped: !1,
|
|
109
|
+
maxBarThickness: 30,
|
|
110
|
+
stack: "foreground"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ d("div", { className: "horizontal-bar-chart-container", style: { height: `${b}px` }, children: /* @__PURE__ */ d(R, { options: y, data: x }) });
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
N as default
|
|
118
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { FiBarChart2 as l } from "../../../node_modules/react-icons/fi/index.mjs";
|
|
3
|
+
const c = ({ title: r }) => /* @__PURE__ */ t("div", { className: "nochartdata-container w-full h-full flex flex-col items-center justify-center text-center select-none", children: [
|
|
4
|
+
/* @__PURE__ */ e(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: "items-center top-0 left-0 p-[1.25rem] absolute justify-center select-none text-[18px] font-[600] p-3",
|
|
8
|
+
style: { color: "var(--chart-text-color)", fontFamily: "'Afacad', 'Rubik', sans-serif" },
|
|
9
|
+
children: r
|
|
10
|
+
}
|
|
11
|
+
),
|
|
12
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center w-full h-full", children: [
|
|
13
|
+
/* @__PURE__ */ e(l, { size: 80, style: { color: "var(--brand-color-orange)", opacity: 0.2 } }),
|
|
14
|
+
/* @__PURE__ */ e("span", { className: "mt-4 text-[1rem]", style: { color: "var(--secondary-text-color)" }, children: "No data to display" })
|
|
15
|
+
] })
|
|
16
|
+
] });
|
|
17
|
+
export {
|
|
18
|
+
c as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx as o, jsxs as l, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F } from "react";
|
|
3
|
+
import { Pie as $ } from "../../../node_modules/react-chartjs-2/dist/index.mjs";
|
|
4
|
+
import { Chart as u, ArcElement as j, Tooltip as M, Legend as R } from "../../../node_modules/chart.js/dist/chart.mjs";
|
|
5
|
+
import z from "../../../node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.mjs";
|
|
6
|
+
import P from "../../Modal/index.mjs";
|
|
7
|
+
import S from "../CustomLegends/index.mjs";
|
|
8
|
+
import { useTheme as T } from "../../../context/ThemeContext.mjs";
|
|
9
|
+
u.register(j, M, R, z);
|
|
10
|
+
u.defaults.font.family = "'Rubik', 'Inter', sans-serif";
|
|
11
|
+
const G = ({ labels: n, dataValues: r, colors: v, title: b = "", tableHeader: _ = "", renderLegendTable: f }) => {
|
|
12
|
+
const [d, p] = F(!1), { theme: C } = T(), i = ["#ff6503", "#ff8533", "#ffa366", "#3a3a3a", "#4a4a4a"], s = v || i.slice(0, n.length > i.length ? i.length : n.length), x = {
|
|
13
|
+
labels: n,
|
|
14
|
+
datasets: [
|
|
15
|
+
{
|
|
16
|
+
data: r,
|
|
17
|
+
backgroundColor: s,
|
|
18
|
+
hoverBackgroundColor: s.map((e) => e + "CC"),
|
|
19
|
+
borderColor: "var(--border-color)",
|
|
20
|
+
borderWidth: 1
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}, y = r.reduce((e, t) => e + t, 0), w = {
|
|
24
|
+
responsive: !0,
|
|
25
|
+
maintainAspectRatio: !1,
|
|
26
|
+
plugins: {
|
|
27
|
+
title: {
|
|
28
|
+
display: !1
|
|
29
|
+
},
|
|
30
|
+
legend: {
|
|
31
|
+
display: !1
|
|
32
|
+
},
|
|
33
|
+
datalabels: {
|
|
34
|
+
color: "#fff",
|
|
35
|
+
anchor: "center",
|
|
36
|
+
align: "center",
|
|
37
|
+
formatter: (e, t) => {
|
|
38
|
+
const a = t.chart.data.datasets[0].data.reduce((c, L) => {
|
|
39
|
+
const g = Number(L);
|
|
40
|
+
return isNaN(g) ? c : c + g;
|
|
41
|
+
}, 0);
|
|
42
|
+
return `${Math.round(e / a * 100) + "%"}`;
|
|
43
|
+
},
|
|
44
|
+
font: function(e) {
|
|
45
|
+
const t = e.chart.width, a = Math.round(t / 24);
|
|
46
|
+
return {
|
|
47
|
+
weight: "bold",
|
|
48
|
+
size: a > 14 ? 14 : a
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
tooltip: {
|
|
53
|
+
callbacks: {
|
|
54
|
+
label: (e) => {
|
|
55
|
+
const t = e.raw, a = r.reduce((m, c) => m + c, 0);
|
|
56
|
+
return ` ${(t / a * 100).toFixed(2)}% (${t})`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, h = n.map((e, t) => ({
|
|
62
|
+
id: t + 1,
|
|
63
|
+
label: e,
|
|
64
|
+
percentage: (r[t] / y * 100).toFixed(2) + "%",
|
|
65
|
+
value: r[t]
|
|
66
|
+
})), N = /* @__PURE__ */ o("div", { className: "space-y-2", children: h.map((e) => /* @__PURE__ */ l("div", { className: "flex items-center justify-between p-2 border-b", style: { borderColor: "var(--border-color)" }, children: [
|
|
67
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
style: {
|
|
72
|
+
width: "12px",
|
|
73
|
+
height: "12px",
|
|
74
|
+
borderRadius: "50%",
|
|
75
|
+
backgroundColor: s[e.id - 1]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ o("span", { style: { color: "var(--text-color)" }, children: e.label })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ l("div", { className: "flex gap-4", children: [
|
|
82
|
+
/* @__PURE__ */ o("span", { style: { color: "var(--secondary-text-color)" }, children: e.percentage }),
|
|
83
|
+
/* @__PURE__ */ l("span", { style: { color: "var(--secondary-text-color)" }, children: [
|
|
84
|
+
"(",
|
|
85
|
+
e.value,
|
|
86
|
+
")"
|
|
87
|
+
] })
|
|
88
|
+
] })
|
|
89
|
+
] }, e.id)) });
|
|
90
|
+
return /* @__PURE__ */ l(A, { children: [
|
|
91
|
+
/* @__PURE__ */ l("div", { className: "pie-chart-container flex flex-row flex-1 items-end", children: [
|
|
92
|
+
/* @__PURE__ */ o("div", { className: "w-2/3 h-64", children: /* @__PURE__ */ o($, { data: x, options: w }) }),
|
|
93
|
+
/* @__PURE__ */ o(
|
|
94
|
+
S,
|
|
95
|
+
{
|
|
96
|
+
legends: n,
|
|
97
|
+
colors: s,
|
|
98
|
+
dataValues: r,
|
|
99
|
+
showAllLegends: d,
|
|
100
|
+
onClick: () => p(!d)
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ o(
|
|
105
|
+
P,
|
|
106
|
+
{
|
|
107
|
+
isOpen: d,
|
|
108
|
+
onClose: () => {
|
|
109
|
+
p(!1);
|
|
110
|
+
},
|
|
111
|
+
title: `${b || "Chart"} Legends:`,
|
|
112
|
+
showFooter: !1,
|
|
113
|
+
body: f ? f(h) : N
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] });
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
G as default
|
|
120
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { formatBytes as m } from "../../../utils/formatBytes.mjs";
|
|
4
|
+
const h = ({ icon: l, value: e, isSize: r = !1, label: a }) => {
|
|
5
|
+
const o = n.useMemo(() => {
|
|
6
|
+
if (!r) return e;
|
|
7
|
+
const d = typeof e == "number" ? e : parseInt(e, 10), c = m(d).split(" ");
|
|
8
|
+
return {
|
|
9
|
+
size: c[0],
|
|
10
|
+
unit: c[1]
|
|
11
|
+
};
|
|
12
|
+
}, [e, r]);
|
|
13
|
+
return /* @__PURE__ */ s(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: "flex flex-col select-none items-center justify-center rounded-lg relative w-full shadow-sm !p-0",
|
|
17
|
+
style: { border: "1px solid var(--border-color)" },
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col flex-1 items-center justify-center p-0", children: [
|
|
20
|
+
/* @__PURE__ */ t("div", { className: "p-2", style: { color: "hsl(var(--brand-orange))" }, children: typeof l == "string" ? /* @__PURE__ */ t("img", { src: l, alt: a, className: "h-10 w-10 md:h-16 md:w-16 lg:h-20 lg:w-20 object-contain" }) : /* @__PURE__ */ t("div", { className: "text-4xl md:text-5xl lg:text-6xl", children: l }) }),
|
|
21
|
+
/* @__PURE__ */ s("div", { className: "font-bold text-center text-xl md:text-2xl lg:text-3xl mt-2", style: { color: "var(--chart-text-color)" }, children: [
|
|
22
|
+
r ? o.size : o,
|
|
23
|
+
r && /* @__PURE__ */ t("span", { className: "ml-1 text-sm md:text-base", style: { color: "var(--secondary-text-color)" }, children: o.unit })
|
|
24
|
+
] })
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ t(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: "flex items-center justify-center font-bold p-2 w-full text-center text-sm md:text-base border-t",
|
|
30
|
+
style: {
|
|
31
|
+
backgroundColor: "hsl(var(--brand-light))",
|
|
32
|
+
color: "hsl(var(--brand-dark))",
|
|
33
|
+
borderTopColor: "var(--border-color)"
|
|
34
|
+
},
|
|
35
|
+
children: a
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
h as default
|
|
44
|
+
};
|