@devtron-labs/devtron-fe-common-lib 1.21.0-beta-1 → 1.21.0-beta-3
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/{@code-editor-Db3cFxL2.js → @code-editor-Y6MpEL3Z.js} +11387 -9831
- package/dist/{@common-rjsf-4dkL5TGO.js → @common-rjsf-DR5BfKgV.js} +30 -30
- package/dist/{@framer-motion-s0JmPZws.js → @framer-motion-BHpgn0v_.js} +196 -194
- package/dist/{@moment-CGWt8tF2.js → @moment-CwOqp704.js} +493 -524
- package/dist/{@react-select-oQ7yDO_E.js → @react-select-DjXUormN.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-jv4XRZlA.js → @react-virtualized-sticky-tree-BcREO5hN.js} +1 -1
- package/dist/{@vendor-x0E6hada.js → @vendor-Dg_U8cQV.js} +33775 -28795
- package/dist/Common/API/reactQueryHooks.d.ts +1 -1
- package/dist/Common/API/types.d.ts +1 -1
- package/dist/Common/BreadCrumb/NestedBreadCrumb.d.ts +2 -0
- package/dist/Common/BreadCrumb/Types.d.ts +20 -0
- package/dist/Common/ClipboardButton/ClipboardButton.d.ts +2 -2
- package/dist/Common/ClipboardButton/types.d.ts +12 -2
- package/dist/Common/Common.service.d.ts +4 -1
- package/dist/Common/Constants.d.ts +70 -21
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +1 -0
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +8 -0
- package/dist/Common/SegmentedBarChart/types.d.ts +10 -2
- package/dist/Common/SegmentedBarChart/utils.d.ts +2 -0
- package/dist/Common/SegmentedControl/Segment.d.ts +1 -1
- package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
- package/dist/Common/SegmentedControl/index.d.ts +1 -1
- package/dist/Common/SegmentedControl/types.d.ts +13 -9
- package/dist/Common/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Common/Types.d.ts +64 -5
- package/dist/Common/index.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +0 -2
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +13 -7
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/VirtualClusterSidebar.d.ts +2 -0
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/index.d.ts +1 -1
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +3 -3
- package/dist/Pages/ResourceBrowser/constants.d.ts +8 -8
- package/dist/Pages/ResourceBrowser/types.d.ts +2 -1
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/ApplicationManagementIcon/ApplicationManagementIcon.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/ApplicationManagementIcon/index.d.ts +2 -0
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/ApplicationManagementIcon/utils.d.ts +6 -0
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/ApplicationManagement/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/Automation&Enablement/Overview/Overview.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/Automation&Enablement/Overview/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/Automation&Enablement/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/CostVisibility/Overview/Overview.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/CostVisibility/Overview/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/CostVisibility/Shared/constants.d.ts +4 -0
- package/dist/Pages-Devtron-2.0/CostVisibility/Shared/index.d.ts +2 -0
- package/dist/Pages-Devtron-2.0/CostVisibility/Shared/types.d.ts +31 -0
- package/dist/Pages-Devtron-2.0/CostVisibility/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/DataProtectionManagement/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/DataProtectionManagement/types.d.ts +8 -0
- package/dist/Pages-Devtron-2.0/GlobalConfiguration/Overview/Overview.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/GlobalConfiguration/Overview/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/GlobalConfiguration/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/GlobalOverview/GlobalOverview.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/GlobalOverview/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/InfrastructureManagementIcon/InfrastructureManagementIcon.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/InfrastructureManagementIcon/index.d.ts +2 -0
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/InfrastructureManagementIcon/utils.d.ts +6 -0
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/utils.d.ts +11 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/SecurityCenterIcon.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/utils.d.ts +6 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SoftwareReleaseManagement/Overview/Overview.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SoftwareReleaseManagement/Overview/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SoftwareReleaseManagement/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/index.d.ts +5 -0
- package/dist/Shared/Components/ActionMenu/types.d.ts +3 -0
- package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +2 -2
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/types.d.ts +1 -1
- package/dist/Shared/Components/Badge/utils.d.ts +2 -1
- package/dist/Shared/Components/Button/Button.component.d.ts +12 -12
- package/dist/Shared/Components/Card/Card.component.d.ts +3 -0
- package/dist/Shared/Components/Card/constants.d.ts +4 -0
- package/dist/Shared/Components/Card/index.d.ts +2 -0
- package/dist/Shared/Components/Card/types.d.ts +25 -0
- package/dist/Shared/Components/Charts/Chart.component.d.ts +121 -0
- package/dist/Shared/Components/Charts/constants.d.ts +10 -0
- package/dist/Shared/Components/Charts/index.d.ts +4 -0
- package/dist/Shared/Components/Charts/plugins.d.ts +7 -0
- package/dist/Shared/Components/Charts/types.d.ts +135 -0
- package/dist/Shared/Components/Charts/utils.d.ts +30 -0
- package/dist/Shared/Components/ClusterStatusIcon/ClusterStatusIcon.d.ts +3 -0
- package/dist/Shared/Components/ClusterStatusIcon/index.d.ts +1 -0
- package/dist/Shared/Components/ClusterStatusIcon/types.d.ts +5 -0
- package/dist/Shared/Components/ClusterStatusIcon/utils.d.ts +2 -0
- package/dist/Shared/Components/DTFocusTrap/DTFocusTrap.d.ts +1 -1
- package/dist/Shared/Components/DTFocusTrap/types.d.ts +2 -1
- package/dist/Shared/Components/DatePicker/DateTimePicker.d.ts +1 -1
- package/dist/Shared/Components/DatePicker/constants.d.ts +2 -101
- package/dist/Shared/Components/DatePicker/index.d.ts +0 -2
- package/dist/Shared/Components/DatePicker/types.d.ts +34 -30
- package/dist/Shared/Components/DatePicker/utils.d.ts +1 -13
- package/dist/Shared/Components/DocLink/constants.d.ts +3 -0
- package/dist/Shared/Components/FeatureDescription/types.d.ts +1 -1
- package/dist/Shared/Components/FramerComponents/index.d.ts +2 -2
- package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +2 -1
- package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +21 -5
- package/dist/Shared/Components/Header/HeaderWithCreateButton/HeaderWithCreateButon.d.ts +1 -1
- package/dist/Shared/Components/Header/HeaderWithCreateButton/types.d.ts +1 -3
- package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
- package/dist/Shared/Components/Header/types.d.ts +2 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +69 -4
- package/dist/Shared/Components/Icon/IconBase.d.ts +1 -1
- package/dist/Shared/Components/Icon/types.d.ts +6 -0
- package/dist/Shared/Components/Illustration/Illustration.d.ts +6 -0
- package/dist/Shared/Components/KeyboardShortcut/KeyboardShortcut.component.d.ts +3 -0
- package/dist/Shared/Components/KeyboardShortcut/constants.d.ts +3 -0
- package/dist/Shared/Components/KeyboardShortcut/index.d.ts +1 -0
- package/dist/Shared/Components/KeyboardShortcut/types.d.ts +4 -0
- package/dist/Shared/Components/PrometheusConfigurations/PrometheusConfigCard.d.ts +3 -0
- package/dist/Shared/Components/PrometheusConfigurations/index.d.ts +2 -0
- package/dist/Shared/Components/PrometheusConfigurations/types.d.ts +20 -0
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +3 -3
- package/dist/Shared/Components/Security/constants.d.ts +2 -0
- package/dist/Shared/Components/Security/index.d.ts +3 -0
- package/dist/Shared/Components/Security/types.d.ts +10 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/index.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +3 -1
- package/dist/Shared/Components/SelectPicker/utils.d.ts +1 -0
- package/dist/Shared/Components/SideNavigation/SideNavigation.d.ts +2 -0
- package/dist/Shared/Components/SideNavigation/index.d.ts +2 -0
- package/dist/Shared/Components/SideNavigation/types.d.ts +19 -0
- package/dist/Shared/Components/Table/InternalTable.d.ts +1 -1
- package/dist/Shared/Components/Table/TableContent.d.ts +1 -1
- package/dist/Shared/Components/Table/types.d.ts +12 -6
- package/dist/Shared/Components/TrailingItem/types.d.ts +4 -0
- package/dist/Shared/Components/TreeView/TreeView.component.d.ts +1 -1
- package/dist/Shared/Components/TreeView/TreeViewNodeContent.d.ts +1 -1
- package/dist/Shared/Components/TreeView/constants.d.ts +3 -0
- package/dist/Shared/Components/TreeView/types.d.ts +17 -3
- package/dist/Shared/Components/WorkflowOptionsModal/utils.d.ts +3 -3
- package/dist/Shared/Components/index.d.ts +6 -0
- package/dist/Shared/Helpers.d.ts +11 -0
- package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +0 -5
- package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +5 -20
- package/dist/Shared/Hooks/useUserPreferences/service.d.ts +1 -1
- package/dist/Shared/Hooks/useUserPreferences/types.d.ts +32 -2
- package/dist/Shared/Providers/MainContextProvider/types.d.ts +9 -0
- package/dist/Shared/Services/common.service.d.ts +3 -0
- package/dist/Shared/Services/types.d.ts +10 -1
- package/dist/Shared/constants.d.ts +3 -16
- package/dist/Shared/types.d.ts +22 -11
- package/dist/Shared/validations.d.ts +2 -0
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/@vendor.css +1 -1
- package/dist/assets/create-backup-schedule.bbac4a86.webp +0 -0
- package/dist/assets/create-backup-snapshot.c794f612.webp +0 -0
- package/dist/assets/ic-ai.25e44e0c.svg +3 -0
- package/dist/assets/ic-alibaba.518d61a4.svg +3 -0
- package/dist/assets/ic-application-group.4b448cca.svg +3 -0
- package/dist/assets/ic-application-management.7fb9e3a0.svg +3 -0
- package/dist/assets/ic-application-template.212d14f1.svg +3 -0
- package/dist/assets/ic-application.4c80bfcf.svg +3 -0
- package/dist/assets/ic-argocd-app.9c5eba79.svg +61 -0
- package/dist/assets/ic-arrow-line-down.b6a98848.svg +3 -0
- package/dist/assets/ic-aws.eb2d0124.svg +12 -0
- package/dist/assets/ic-backup-and-schedule.51b7d3dd.svg +3 -0
- package/dist/assets/ic-backup-color.dc62e9d5.svg +6 -0
- package/dist/assets/ic-backup-location.ebaf1148.svg +3 -0
- package/dist/assets/ic-backup-schedule-color.a16c34b0.svg +5 -0
- package/dist/assets/ic-bg-backup-schedule.9ef9bc39.svg +19 -0
- package/dist/assets/ic-bg-backups.396e99bd.svg +19 -0
- package/dist/assets/ic-bg-build.8609d0ea.svg +13 -0
- package/dist/assets/ic-bg-cpu.15ec70f0.svg +11 -0
- package/dist/assets/ic-bg-deploy.266711fe.svg +22 -0
- package/dist/assets/ic-bg-memory.5373a125.svg +11 -0
- package/dist/assets/ic-bg-pause-schedule.6edcc1d4.svg +14 -0
- package/dist/assets/ic-bg-production-pipelines.2951cdc0.svg +22 -0
- package/dist/assets/ic-bg-project.84658405.svg +12 -0
- package/dist/assets/ic-bg-ransomware-vulnerable-cluster.1b25a5d0.svg +7 -0
- package/dist/assets/ic-bg-restore.4fa13869.svg +33 -0
- package/dist/assets/ic-bg-scan.2249360c.svg +28 -0
- package/dist/assets/ic-bg-storage-locations.894070b0.svg +22 -0
- package/dist/assets/ic-bg-webhook.b455152d.svg +13 -0
- package/dist/assets/ic-bot.65f403dd.svg +3 -0
- package/dist/assets/ic-building.2405d07b.svg +3 -0
- package/dist/assets/ic-chart-line-up.7ab47f4e.svg +3 -0
- package/dist/assets/ic-check-circle.af18cd7e.svg +3 -0
- package/dist/assets/ic-circle-small.a0740b0e.svg +3 -0
- package/dist/assets/ic-clipboard.2869fa7d.svg +3 -0
- package/dist/assets/ic-clock-counterclockwise.3d7c2ef1.svg +3 -0
- package/dist/assets/ic-cloud-upload.55d9c163.svg +3 -0
- package/dist/assets/ic-coins-color-animated.fe11cdc3.svg +112 -0
- package/dist/assets/ic-coins.2c15f406.svg +3 -0
- package/dist/assets/ic-cost-visibility.5595009f.svg +3 -0
- package/dist/assets/ic-database-backup.b9e7c558.svg +3 -0
- package/dist/assets/ic-devtron-text.67a413b6.svg +3 -0
- package/dist/assets/ic-edit-lines.57927b07.svg +3 -0
- package/dist/assets/ic-file-download.ca57c068.svg +5 -0
- package/dist/assets/ic-files-changed.04e6de3f.svg +3 -0
- package/dist/assets/ic-floppy-disk.6d392bcd.svg +3 -0
- package/dist/assets/ic-fluxcd-app.7bf7dce5.svg +22 -0
- package/dist/assets/ic-global-overview.56ba9dc0.svg +3 -0
- package/dist/assets/ic-google-cloud.3077a8dd.svg +6 -0
- package/dist/assets/ic-infrastructure-management.4b052d41.svg +3 -0
- package/dist/assets/ic-kubernetes.7e04c3d2.svg +4 -0
- package/dist/assets/ic-magic-wand.2c29cd4e.svg +10 -0
- package/dist/assets/ic-oracle-cloud.5a8ee45d.svg +3 -0
- package/dist/assets/ic-otc-cloud.43b31bd8.svg +5 -0
- package/dist/assets/ic-party.cfc7e7c6.svg +4 -0
- package/dist/assets/ic-pause.4e5c6056.svg +4 -0
- package/dist/assets/ic-priority-medium-fill.7bab0ff8.svg +4 -0
- package/dist/assets/ic-release-hub.25b9707a.svg +3 -0
- package/dist/assets/ic-resource-browser.4ff3e571.svg +3 -0
- package/dist/assets/ic-resource-watcher.7cce5305.svg +3 -0
- package/dist/assets/ic-right-panel-collapse.0ecf8ceb.svg +3 -0
- package/dist/assets/ic-security-fixable.168b5bf8.svg +12 -0
- package/dist/assets/ic-security-not-fixable.be099f65.svg +12 -0
- package/dist/assets/ic-security-policy.874568da.svg +3 -0
- package/dist/assets/ic-security-scan.3ae78d50.svg +3 -0
- package/dist/assets/ic-security-vulnerability.c954b87a.svg +4 -0
- package/dist/assets/ic-software-release-management.dceedf80.svg +3 -0
- package/dist/assets/ic-symbol-greater-than.8f71342d.svg +3 -0
- package/dist/assets/ic-tenants.4f997b9a.svg +3 -0
- package/dist/assets/ic-trend-up.5752ef30.svg +3 -0
- package/dist/assets/ic-warning-stroke.fc850a4a.svg +3 -0
- package/dist/assets/img-folder-empty.8e898c33.svg +33 -0
- package/dist/assets/img-no-backup-location.0e8699c5.svg +180 -0
- package/dist/assets/img-no-restores.f26cb7db.svg +114 -0
- package/dist/assets/no-cluster-cost-enabled.038c73db.webp +0 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.js +1020 -967
- package/package.json +5 -7
- package/dist/@react-dates-C-SIZ4x1.js +0 -7634
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/types.d.ts +0 -8
- package/dist/Shared/Components/DatePicker/DayPickerRangeController.d.ts +0 -2
- package/dist/Shared/Components/DatePicker/SingleDatePickerComponent.d.ts +0 -11
- package/dist/assets/@react-dates.css +0 -1
- package/dist/assets/ic-bg-cloud-vms.7241e97c.svg +0 -4
- package/dist/assets/ic-bg-healthy-vms.653e8abc.svg +0 -4
- package/dist/assets/ic-bg-running-vms.e469929a.svg +0 -4
- package/dist/assets/ic-bg-tenants.d0369094.svg +0 -4
- package/dist/assets/ic-calender-blank.963e3423.svg +0 -19
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
import { TooltipOptions, TooltipPositionerFunction } from 'chart.js';
|
|
3
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
|
4
|
+
import { AppThemeType } from '../../Providers';
|
|
5
|
+
import { Never } from '../../types';
|
|
6
|
+
export type ChartType = 'area' | 'pie' | 'semiPie' | 'stackedBar' | 'stackedBarHorizontal' | 'line';
|
|
7
|
+
export type ColorTokensType = 'DeepPlum' | 'Magenta' | 'Slate' | 'Lavender' | 'SkyBlue' | 'AquaTeal' | 'LimeGreen' | 'CoralRed' | 'GoldenYellow' | 'CharcoalGray' | 'Gray' | 'SunsetOrange';
|
|
8
|
+
export type VariantsType = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
9
|
+
export type ChartColorKey = `${ColorTokensType}${VariantsType}`;
|
|
10
|
+
export type ChartTypeWithoutPie = Exclude<ChartType, 'pie' | 'semiPie'>;
|
|
11
|
+
interface BaseSimpleDataset {
|
|
12
|
+
datasetName: string;
|
|
13
|
+
yAxisValues: number[];
|
|
14
|
+
}
|
|
15
|
+
export interface SimpleDataset extends BaseSimpleDataset {
|
|
16
|
+
color: ChartColorKey;
|
|
17
|
+
isClickable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface SimpleDatasetForLineAndArea extends Omit<SimpleDataset, 'isClickable'> {
|
|
20
|
+
isDashed?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface SimpleDatasetForPie extends BaseSimpleDataset {
|
|
23
|
+
colors: Array<ChartColorKey>;
|
|
24
|
+
isClickable?: boolean[];
|
|
25
|
+
}
|
|
26
|
+
export interface ReferenceLineConfigType {
|
|
27
|
+
strokeWidth?: number;
|
|
28
|
+
color?: ChartColorKey;
|
|
29
|
+
value: number;
|
|
30
|
+
}
|
|
31
|
+
export interface CenterTextConfig {
|
|
32
|
+
text: string;
|
|
33
|
+
fontSize?: number;
|
|
34
|
+
fontWeight?: string | number;
|
|
35
|
+
color?: string;
|
|
36
|
+
fontFamily?: string;
|
|
37
|
+
}
|
|
38
|
+
type XYAxisMax = {
|
|
39
|
+
xAxisMax?: number;
|
|
40
|
+
yAxisMax?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Optional reference lines to draw across the chart
|
|
43
|
+
*/
|
|
44
|
+
referenceLines?: ReferenceLineConfigType[];
|
|
45
|
+
};
|
|
46
|
+
type OnChartClickHandler = (datasetName: string, value: number) => void;
|
|
47
|
+
type ScaleTickFormatCallbacks = Partial<{
|
|
48
|
+
xScaleTickFormat: (label: string, index: number) => string | string[] | number | number[];
|
|
49
|
+
yScaleTickFormat: (value: number, index: number) => string | string[] | number | number[];
|
|
50
|
+
}>;
|
|
51
|
+
export type TypeAndDatasetsType = ({
|
|
52
|
+
type: 'pie' | 'semiPie';
|
|
53
|
+
/**
|
|
54
|
+
* Needs to be memoized
|
|
55
|
+
*/
|
|
56
|
+
datasets: SimpleDatasetForPie;
|
|
57
|
+
onChartClick?: OnChartClickHandler;
|
|
58
|
+
/** Configuration for center text (only for doughnut/pie charts) */
|
|
59
|
+
centerText?: CenterTextConfig;
|
|
60
|
+
} & Never<XYAxisMax> & Never<ScaleTickFormatCallbacks>) | ({
|
|
61
|
+
type: 'line';
|
|
62
|
+
datasets: SimpleDatasetForLineAndArea[];
|
|
63
|
+
onChartClick?: never;
|
|
64
|
+
centerText?: never;
|
|
65
|
+
} & XYAxisMax & ScaleTickFormatCallbacks) | ({
|
|
66
|
+
type: 'area';
|
|
67
|
+
datasets: SimpleDatasetForLineAndArea;
|
|
68
|
+
onChartClick?: never;
|
|
69
|
+
centerText?: never;
|
|
70
|
+
} & XYAxisMax & ScaleTickFormatCallbacks) | ({
|
|
71
|
+
type: Exclude<ChartType, 'pie' | 'semiPie' | 'line' | 'area'>;
|
|
72
|
+
datasets: SimpleDataset[];
|
|
73
|
+
onChartClick?: OnChartClickHandler;
|
|
74
|
+
centerText?: never;
|
|
75
|
+
} & XYAxisMax & ScaleTickFormatCallbacks);
|
|
76
|
+
export type ChartProps = {
|
|
77
|
+
id: string;
|
|
78
|
+
/**
|
|
79
|
+
* The x-axis labels. Needs to be memoized
|
|
80
|
+
*/
|
|
81
|
+
xAxisLabels: string[];
|
|
82
|
+
/**
|
|
83
|
+
* Hide the x and y axis and grid lines
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
hideAxis?: boolean;
|
|
87
|
+
hideXAxisLabels?: boolean;
|
|
88
|
+
tooltipConfig?: {
|
|
89
|
+
getTooltipContent?: (args: Parameters<TooltipOptions['external']>[0]) => ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* @default 'top'
|
|
92
|
+
*/
|
|
93
|
+
placement?: TooltipProps['placement'];
|
|
94
|
+
datasetValueFormatter?: (value: number) => string | number;
|
|
95
|
+
};
|
|
96
|
+
/** A title for x axis */
|
|
97
|
+
xScaleTitle?: string;
|
|
98
|
+
/** A title for y axis */
|
|
99
|
+
yScaleTitle?: string;
|
|
100
|
+
} & TypeAndDatasetsType;
|
|
101
|
+
export type TransformDatasetProps = {
|
|
102
|
+
appTheme: AppThemeType;
|
|
103
|
+
} & ({
|
|
104
|
+
type: 'pie' | 'semiPie';
|
|
105
|
+
dataset: SimpleDatasetForPie;
|
|
106
|
+
} | {
|
|
107
|
+
type: 'line' | 'area';
|
|
108
|
+
dataset: SimpleDatasetForLineAndArea;
|
|
109
|
+
} | {
|
|
110
|
+
type: Exclude<ChartType, 'pie' | 'semiPie' | 'line' | 'area'>;
|
|
111
|
+
dataset: SimpleDataset;
|
|
112
|
+
});
|
|
113
|
+
export type GetBackgroundAndBorderColorProps = TransformDatasetProps;
|
|
114
|
+
export type TransformDataForChartProps = {
|
|
115
|
+
appTheme: AppThemeType;
|
|
116
|
+
} & TypeAndDatasetsType;
|
|
117
|
+
export interface GetDefaultOptionsParams {
|
|
118
|
+
chartProps: ChartProps;
|
|
119
|
+
appTheme: AppThemeType;
|
|
120
|
+
externalTooltipHandler: TooltipOptions['external'];
|
|
121
|
+
setTooltipVisible: Dispatch<SetStateAction<boolean>>;
|
|
122
|
+
}
|
|
123
|
+
declare module 'chart.js' {
|
|
124
|
+
interface TooltipPositionerMap {
|
|
125
|
+
barElementCenterPositioner: TooltipPositionerFunction<'bar'>;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export interface HTMLLegendProps {
|
|
129
|
+
backgroundColor: string;
|
|
130
|
+
label: string;
|
|
131
|
+
onClick: () => void;
|
|
132
|
+
strikeThrough: boolean;
|
|
133
|
+
variant: 'line' | 'square';
|
|
134
|
+
}
|
|
135
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ChartDataset, ChartOptions, ChartType as ChartJSChartType, Point, TooltipOptions } from 'chart.js';
|
|
3
|
+
import { ChartType, GetDefaultOptionsParams, TransformDataForChartProps } from './types';
|
|
4
|
+
export declare const getChartJSType: (type: ChartType) => ChartJSChartType;
|
|
5
|
+
export declare const getDefaultOptions: ({ chartProps, appTheme, externalTooltipHandler, setTooltipVisible, }: GetDefaultOptionsParams) => ChartOptions;
|
|
6
|
+
export declare const transformDataForChart: (props: TransformDataForChartProps) => (ChartDataset<"line"> | {
|
|
7
|
+
backgroundColor?: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color) | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[];
|
|
8
|
+
borderColor?: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color) | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[];
|
|
9
|
+
pointBackgroundColor?: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color) | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[];
|
|
10
|
+
pointBorderColor?: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color) | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[];
|
|
11
|
+
label: string;
|
|
12
|
+
data: number[];
|
|
13
|
+
} | {
|
|
14
|
+
backgroundColor: string[];
|
|
15
|
+
hoverBackgroundColor: string[];
|
|
16
|
+
borderColor: string;
|
|
17
|
+
borderWidth: number;
|
|
18
|
+
label: string;
|
|
19
|
+
data: number[];
|
|
20
|
+
} | {
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
hoverBackgroundColor: string;
|
|
23
|
+
borderColor: string;
|
|
24
|
+
borderWidth?: undefined;
|
|
25
|
+
label: string;
|
|
26
|
+
data: number[];
|
|
27
|
+
})[];
|
|
28
|
+
export declare function chartColorGenerator(): Generator<"DeepPlum500" | "DeepPlum300" | "DeepPlum100" | "DeepPlum50" | "DeepPlum600" | "DeepPlum400" | "DeepPlum200" | "DeepPlum700" | "DeepPlum800" | "DeepPlum900" | "DeepPlum950" | "Magenta500" | "Magenta300" | "Magenta100" | "Magenta50" | "Magenta600" | "Magenta400" | "Magenta200" | "Magenta700" | "Magenta800" | "Magenta900" | "Magenta950" | "Slate500" | "Slate300" | "Slate100" | "Slate50" | "Slate600" | "Slate400" | "Slate200" | "Slate700" | "Slate800" | "Slate900" | "Slate950" | "Lavender500" | "Lavender300" | "Lavender100" | "Lavender50" | "Lavender600" | "Lavender400" | "Lavender200" | "Lavender700" | "Lavender800" | "Lavender900" | "Lavender950" | "SkyBlue500" | "SkyBlue300" | "SkyBlue100" | "SkyBlue50" | "SkyBlue600" | "SkyBlue400" | "SkyBlue200" | "SkyBlue700" | "SkyBlue800" | "SkyBlue900" | "SkyBlue950" | "AquaTeal500" | "AquaTeal300" | "AquaTeal100" | "AquaTeal50" | "AquaTeal600" | "AquaTeal400" | "AquaTeal200" | "AquaTeal700" | "AquaTeal800" | "AquaTeal900" | "AquaTeal950" | "LimeGreen500" | "LimeGreen300" | "LimeGreen100" | "LimeGreen50" | "LimeGreen600" | "LimeGreen400" | "LimeGreen200" | "LimeGreen700" | "LimeGreen800" | "LimeGreen900" | "LimeGreen950" | "CoralRed500" | "CoralRed300" | "CoralRed100" | "CoralRed50" | "CoralRed600" | "CoralRed400" | "CoralRed200" | "CoralRed700" | "CoralRed800" | "CoralRed900" | "CoralRed950" | "GoldenYellow500" | "GoldenYellow300" | "GoldenYellow100" | "GoldenYellow50" | "GoldenYellow600" | "GoldenYellow400" | "GoldenYellow200" | "GoldenYellow700" | "GoldenYellow800" | "GoldenYellow900" | "GoldenYellow950" | "CharcoalGray500" | "CharcoalGray300" | "CharcoalGray100" | "CharcoalGray50" | "CharcoalGray600" | "CharcoalGray400" | "CharcoalGray200" | "CharcoalGray700" | "CharcoalGray800" | "CharcoalGray900" | "CharcoalGray950" | "Gray500" | "Gray300" | "Gray100" | "Gray50" | "Gray600" | "Gray400" | "Gray200" | "Gray700" | "Gray800" | "Gray900" | "Gray950" | "SunsetOrange500" | "SunsetOrange300" | "SunsetOrange100" | "SunsetOrange50" | "SunsetOrange600" | "SunsetOrange400" | "SunsetOrange200" | "SunsetOrange700" | "SunsetOrange800" | "SunsetOrange900" | "SunsetOrange950", void, unknown>;
|
|
29
|
+
export declare const buildChartTooltipFromContext: ({ title, body, labelColors: labelColorsProp, }: Pick<Parameters<TooltipOptions["external"]>[0]["tooltip"], "title" | "body" | "labelColors">) => ReactNode;
|
|
30
|
+
export declare const distanceBetweenPoints: (pt1: Point, pt2: Point) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ClusterStatusIcon } from './ClusterStatusIcon';
|
|
@@ -4,5 +4,5 @@ export declare const useFocusTrapControl: () => {
|
|
|
4
4
|
disableFocusTrap: typeof noop;
|
|
5
5
|
resumeFocusTrap: typeof noop;
|
|
6
6
|
};
|
|
7
|
-
declare const DTFocusTrap: ({ onEscape, deactivateFocusOnEscape, children, initialFocus, }: DTFocusTrapType) => JSX.Element;
|
|
7
|
+
declare const DTFocusTrap: ({ onEscape, deactivateFocusOnEscape, children, initialFocus, returnFocusOnDeactivate, }: DTFocusTrapType) => JSX.Element;
|
|
8
8
|
export default DTFocusTrap;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { Props as FocusTrapProps } from 'focus-trap-react';
|
|
2
3
|
type FocusTargetValue = HTMLElement | SVGElement | string;
|
|
3
4
|
type FocusTargetValueOrFalse = FocusTargetValue | false;
|
|
4
5
|
/**
|
|
@@ -7,7 +8,7 @@ type FocusTargetValueOrFalse = FocusTargetValue | false;
|
|
|
7
8
|
* an opt-out, or a function that returns a DOM node or `false`.
|
|
8
9
|
*/
|
|
9
10
|
type FocusTargetOrFalse = FocusTargetValueOrFalse | (() => FocusTargetValueOrFalse);
|
|
10
|
-
export interface DTFocusTrapType {
|
|
11
|
+
export interface DTFocusTrapType extends Pick<FocusTrapProps['focusTrapOptions'], 'returnFocusOnDeactivate'> {
|
|
11
12
|
/**
|
|
12
13
|
* Callback function that gets triggered when the Escape key is pressed. \
|
|
13
14
|
* Should be wrapped in useCallback to prevent unnecessary re-renders.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DateTimePickerProps } from './types';
|
|
2
|
-
declare const DateTimePicker: ({ date: dateObject, onChange, timePickerProps, disabled, id, label, required, hideTimeSelect, readOnly,
|
|
2
|
+
declare const DateTimePicker: ({ date: dateObject, dateRange, onChange, timePickerProps, disabled, id, label, required, hideTimeSelect, readOnly, dataTestIdForTime, error, isRangePicker, isTodayBlocked, blockPreviousDates, isOutsideRange, rangeShortcutOptions, }: DateTimePickerProps) => JSX.Element;
|
|
3
3
|
export default DateTimePicker;
|
|
@@ -1,63 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const selectedStyles: {
|
|
3
|
-
background: string;
|
|
4
|
-
color: string;
|
|
5
|
-
hover: {
|
|
6
|
-
background: string;
|
|
7
|
-
color: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const selectedSpanStyles: {
|
|
11
|
-
background: string;
|
|
12
|
-
color: string;
|
|
13
|
-
hover: {
|
|
14
|
-
background: string;
|
|
15
|
-
color: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare const hoveredSpanStyles: {
|
|
19
|
-
background: string;
|
|
20
|
-
color: string;
|
|
21
|
-
};
|
|
22
|
-
export declare const customDayStyles: {
|
|
23
|
-
selectedStartStyles: {
|
|
24
|
-
background: string;
|
|
25
|
-
color: string;
|
|
26
|
-
hover: {
|
|
27
|
-
background: string;
|
|
28
|
-
color: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
selectedEndStyles: {
|
|
32
|
-
background: string;
|
|
33
|
-
color: string;
|
|
34
|
-
hover: {
|
|
35
|
-
background: string;
|
|
36
|
-
color: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
hoveredSpanStyles: {
|
|
40
|
-
background: string;
|
|
41
|
-
color: string;
|
|
42
|
-
};
|
|
43
|
-
selectedSpanStyles: {
|
|
44
|
-
background: string;
|
|
45
|
-
color: string;
|
|
46
|
-
hover: {
|
|
47
|
-
background: string;
|
|
48
|
-
color: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
selectedStyles: {
|
|
52
|
-
background: string;
|
|
53
|
-
color: string;
|
|
54
|
-
hover: {
|
|
55
|
-
background: string;
|
|
56
|
-
color: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
border: string;
|
|
60
|
-
};
|
|
1
|
+
import { CustomComponents } from 'react-day-picker';
|
|
61
2
|
export declare const MONTHLY_DATES_CONFIG: {
|
|
62
3
|
'Day 1': string;
|
|
63
4
|
'Day 2': string;
|
|
@@ -153,44 +94,4 @@ export declare const DATE_PICKER_IDS: {
|
|
|
153
94
|
MONTH: string;
|
|
154
95
|
TIME: string;
|
|
155
96
|
};
|
|
156
|
-
export declare const
|
|
157
|
-
PresetDateRangePicker_panel: {
|
|
158
|
-
padding: string;
|
|
159
|
-
width: string;
|
|
160
|
-
height: string;
|
|
161
|
-
};
|
|
162
|
-
PresetDateRangePicker_button: {
|
|
163
|
-
width: string;
|
|
164
|
-
background: string;
|
|
165
|
-
border: string;
|
|
166
|
-
color: string;
|
|
167
|
-
padding: string;
|
|
168
|
-
font: string;
|
|
169
|
-
fontWeight: number;
|
|
170
|
-
lineHeight: string;
|
|
171
|
-
overflow: string;
|
|
172
|
-
cursor: string;
|
|
173
|
-
':active': {
|
|
174
|
-
outline: number;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
DayPicker__horizontal: {
|
|
178
|
-
borderRadius: string;
|
|
179
|
-
};
|
|
180
|
-
PresetDateRangePicker_button__selected: {
|
|
181
|
-
color: string;
|
|
182
|
-
fontWeight: number;
|
|
183
|
-
background: string;
|
|
184
|
-
outline: string;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
export declare const DayPickerCalendarInfoHorizontal: {
|
|
188
|
-
width: string;
|
|
189
|
-
boxShadow: string;
|
|
190
|
-
};
|
|
191
|
-
export declare const DayPickerRangeControllerPresets: {
|
|
192
|
-
text: string;
|
|
193
|
-
endDate: moment.Moment;
|
|
194
|
-
startDate: moment.Moment;
|
|
195
|
-
endStr: string;
|
|
196
|
-
}[];
|
|
97
|
+
export declare const DATE_PICKER_CUSTOM_COMPONENTS: Partial<CustomComponents>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
2
|
export { default as DateTimePicker } from './DateTimePicker';
|
|
3
|
-
export { DatePickerRangeController } from './DayPickerRangeController';
|
|
4
3
|
export * from './MonthlySelect';
|
|
5
|
-
export { default as SingleDatePickerComponent } from './SingleDatePickerComponent';
|
|
6
4
|
export * from './TimeSelect';
|
|
7
5
|
export * from './types';
|
|
8
6
|
export * from './utils';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SingleDatePickerShape } from 'react-dates';
|
|
2
1
|
import { SelectInstance } from 'react-select';
|
|
3
2
|
import { Moment } from 'moment';
|
|
4
3
|
import { SelectPickerOptionType } from '../SelectPicker';
|
|
@@ -81,11 +80,13 @@ export interface TimeSelectProps {
|
|
|
81
80
|
*/
|
|
82
81
|
selectedTimeOption: DateSelectPickerType;
|
|
83
82
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
interface DateRangeType {
|
|
84
|
+
from: Date;
|
|
85
|
+
to?: Date;
|
|
86
|
+
}
|
|
87
|
+
export type UpdateDateRangeType = (dateRange: DateRangeType) => void;
|
|
88
|
+
export type UpdateSingleDateType = (date: Date) => void;
|
|
89
|
+
export type DateTimePickerProps = Pick<TimeSelectProps, 'timePickerProps' | 'error' | 'disabled' | 'dataTestIdForTime'> & {
|
|
89
90
|
/**
|
|
90
91
|
* Id for the component
|
|
91
92
|
*/
|
|
@@ -98,10 +99,6 @@ export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'tim
|
|
|
98
99
|
* If true, the field is required and asterisk is shown
|
|
99
100
|
*/
|
|
100
101
|
required?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* To hide time selector
|
|
103
|
-
*/
|
|
104
|
-
hideTimeSelect?: boolean;
|
|
105
102
|
/**
|
|
106
103
|
* To make the field read only
|
|
107
104
|
*/
|
|
@@ -110,25 +107,32 @@ export interface DateTimePickerProps extends Pick<TimeSelectProps, 'date' | 'tim
|
|
|
110
107
|
* To block today's date
|
|
111
108
|
*/
|
|
112
109
|
isTodayBlocked?: boolean;
|
|
110
|
+
blockPreviousDates?: boolean;
|
|
111
|
+
isOutsideRange?: (day: Date) => boolean;
|
|
112
|
+
} & ({
|
|
113
|
+
isRangePicker: true;
|
|
114
|
+
hideTimeSelect: true;
|
|
115
|
+
dateRange: DateRangeType;
|
|
116
|
+
onChange: UpdateDateRangeType;
|
|
117
|
+
rangeShortcutOptions?: ({
|
|
118
|
+
label: string;
|
|
119
|
+
onClick: () => void;
|
|
120
|
+
value?: never;
|
|
121
|
+
} | {
|
|
122
|
+
label: string;
|
|
123
|
+
onClick?: never;
|
|
124
|
+
value: DateRangeType;
|
|
125
|
+
})[];
|
|
126
|
+
date?: never;
|
|
127
|
+
} | {
|
|
128
|
+
isRangePicker?: false;
|
|
129
|
+
date: TimeSelectProps['date'];
|
|
130
|
+
onChange: UpdateSingleDateType;
|
|
113
131
|
/**
|
|
114
|
-
*
|
|
115
|
-
*/
|
|
116
|
-
dataTestidForDate?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Function to handle date change
|
|
132
|
+
* To hide time selector
|
|
119
133
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
calendarInputs: any;
|
|
126
|
-
focusedInput: any;
|
|
127
|
-
handleFocusChange: any;
|
|
128
|
-
handleDatesChange: any;
|
|
129
|
-
handleCalendarInputs?: any;
|
|
130
|
-
calendarValue: string;
|
|
131
|
-
handlePredefinedRange: (start: Moment, end: Moment, endStr: string) => void;
|
|
132
|
-
handleDateInput: (key: 'startDate' | 'endDate', value: string) => void;
|
|
133
|
-
handleApply: (...args: any[]) => void;
|
|
134
|
-
}
|
|
134
|
+
hideTimeSelect?: boolean;
|
|
135
|
+
dateRange?: never;
|
|
136
|
+
rangeShortcutOptions?: never;
|
|
137
|
+
});
|
|
138
|
+
export {};
|
|
@@ -10,7 +10,7 @@ export declare const MONTHLY_DATE_OPTIONS: {
|
|
|
10
10
|
* Return the options for the time in label and value format
|
|
11
11
|
* @type {SelectPickerOptionType[]}
|
|
12
12
|
*/
|
|
13
|
-
export declare const DEFAULT_TIME_OPTIONS: SelectPickerOptionType[];
|
|
13
|
+
export declare const DEFAULT_TIME_OPTIONS: SelectPickerOptionType<string>[];
|
|
14
14
|
/**
|
|
15
15
|
* Get the time value from the date object in the format: `hh:mm:ss`
|
|
16
16
|
*/
|
|
@@ -32,15 +32,3 @@ export declare const updateDate: (currentDateObj: Date, newDate: Date) => Date;
|
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
34
|
export declare const getDefaultDateFromTimeToLive: (timeToLive: string, isTomorrow?: boolean) => Date;
|
|
35
|
-
/**
|
|
36
|
-
* Returns a string representing the range of dates
|
|
37
|
-
* given by the start and end dates. If the end date
|
|
38
|
-
* is 'now' and the start date includes 'now',
|
|
39
|
-
* it will return the corresponding range from the
|
|
40
|
-
* DayPickerRangeControllerPresets array.
|
|
41
|
-
* @param startDateStr - the start date string
|
|
42
|
-
* @param endDateStr - the end date string
|
|
43
|
-
* @returns - a string representing the range of dates
|
|
44
|
-
*/
|
|
45
|
-
export declare const getCalendarValue: (startDateStr: string, endDateStr: string) => string;
|
|
46
|
-
export declare const getTimestampFromDateIfAvailable: (dateString: string) => string;
|
|
@@ -93,6 +93,9 @@ export declare const DOCUMENTATION: {
|
|
|
93
93
|
readonly SOFTWARE_DISTRIBUTION_HUB: "usage/software-distribution-hub";
|
|
94
94
|
readonly RELEASE_TRACKS: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
|
|
95
95
|
readonly RELEASES: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
|
|
96
|
+
readonly RELEASE_HUB: "usage/software-distribution-hub/release-hub";
|
|
96
97
|
readonly TENANTS: "usage/software-distribution-hub/tenants#adding-installation";
|
|
97
98
|
readonly TENANTS_INSTALLATION: "usage/software-distribution-hub/tenants";
|
|
99
|
+
readonly AUTOSCALER_DETECTION: "user-guide/infra-management/infrastructure-overview#troubleshooting-autoscaler-detection";
|
|
100
|
+
readonly COST_CALCULATION: "user-guide/finops/overview-cost-visibility#how-is-the-cost-calculated";
|
|
98
101
|
};
|
|
@@ -31,7 +31,7 @@ type FeatureDescriptionModalWithTabsConfig = {
|
|
|
31
31
|
imageStyles?: never;
|
|
32
32
|
};
|
|
33
33
|
export type FeatureDescriptionModalProps = {
|
|
34
|
-
title:
|
|
34
|
+
title: React.ReactNode;
|
|
35
35
|
closeModalText?: string;
|
|
36
36
|
closeModal?: () => void;
|
|
37
37
|
} & ((BaseFeatureDescriptionModalProps & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { animate, AnimatePresence, motion, useAnimationControls, useMotionTemplate, useMotionValue } from 'framer-motion';
|
|
2
|
-
export { animate, AnimatePresence, motion, useAnimationControls, useMotionTemplate, useMotionValue };
|
|
1
|
+
import { animate, AnimatePresence, motion, useAnimation, useAnimationControls, useMotionTemplate, useMotionValue } from 'framer-motion';
|
|
2
|
+
export { animate, AnimatePresence, motion, useAnimation, useAnimationControls, useMotionTemplate, useMotionValue };
|
package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonComponentType } from '../Button';
|
|
1
2
|
import { GenericSectionErrorStateProps } from './types';
|
|
2
|
-
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, progressingProps, }: GenericSectionErrorStateProps) => JSX.Element;
|
|
3
|
+
declare const GenericSectionErrorState: <T extends ButtonComponentType = ButtonComponentType.button>({ reload, buttonProps, customIcon, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, progressingProps, }: GenericSectionErrorStateProps<T>) => JSX.Element;
|
|
3
4
|
export default GenericSectionErrorState;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonComponentType, ButtonProps } from '../Button';
|
|
2
3
|
import { IconsProps } from '../Icon';
|
|
3
|
-
export type GenericSectionErrorStateProps = {
|
|
4
|
-
/**
|
|
5
|
-
* Handler for reloading the section
|
|
6
|
-
*/
|
|
7
|
-
reload?: () => void;
|
|
4
|
+
export type GenericSectionErrorStateProps<ButtonType extends ButtonComponentType = ButtonComponentType.button> = {
|
|
8
5
|
/**
|
|
9
6
|
* If true, border is added to the section
|
|
10
7
|
*
|
|
@@ -37,6 +34,7 @@ export type GenericSectionErrorStateProps = {
|
|
|
37
34
|
*/
|
|
38
35
|
progressingProps: Omit<IconsProps, 'name'>;
|
|
39
36
|
useInfoIcon?: false;
|
|
37
|
+
customIcon?: never;
|
|
40
38
|
} | {
|
|
41
39
|
progressingProps?: never;
|
|
42
40
|
/**
|
|
@@ -45,7 +43,25 @@ export type GenericSectionErrorStateProps = {
|
|
|
45
43
|
* @default false
|
|
46
44
|
*/
|
|
47
45
|
useInfoIcon: true;
|
|
46
|
+
customIcon?: never;
|
|
47
|
+
} | {
|
|
48
|
+
progressingProps?: never;
|
|
49
|
+
useInfoIcon?: never;
|
|
50
|
+
customIcon?: never;
|
|
48
51
|
} | {
|
|
52
|
+
customIcon: JSX.Element;
|
|
49
53
|
progressingProps?: never;
|
|
50
54
|
useInfoIcon?: never;
|
|
55
|
+
}) & ({
|
|
56
|
+
/**
|
|
57
|
+
* Handler for reloading the section
|
|
58
|
+
*/
|
|
59
|
+
reload: () => void;
|
|
60
|
+
buttonProps?: never;
|
|
61
|
+
} | {
|
|
62
|
+
reload?: never;
|
|
63
|
+
buttonProps: ButtonProps<ButtonType>;
|
|
64
|
+
} | {
|
|
65
|
+
reload?: never;
|
|
66
|
+
buttonProps?: never;
|
|
51
67
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HeaderWithCreateButtonProps } from './types';
|
|
2
|
-
export declare const HeaderWithCreateButton: ({
|
|
2
|
+
export declare const HeaderWithCreateButton: ({ viewType }: HeaderWithCreateButtonProps) => JSX.Element;
|
|
3
3
|
export default HeaderWithCreateButton;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ActionMenuProps } from '../../ActionMenu';
|
|
2
|
-
import { PageHeaderType } from '../types';
|
|
3
2
|
export interface HeaderWithCreateButtonProps {
|
|
4
|
-
|
|
5
|
-
additionalHeaderInfo: PageHeaderType['additionalHeaderInfo'];
|
|
3
|
+
viewType?: 'jobs' | 'apps' | 'infra-apps';
|
|
6
4
|
}
|
|
7
5
|
export declare enum CreateActionMenuItems {
|
|
8
6
|
CUSTOM_APP = "create-custom-app",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PageHeaderType } from './types';
|
|
2
|
-
declare const PageHeader: ({ headerName, headerImage, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, onClose, tippyProps, }: PageHeaderType) => JSX.Element;
|
|
2
|
+
declare const PageHeader: ({ headerName, headerImage, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, onClose, tippyProps, closeIcon, }: PageHeaderType) => JSX.Element;
|
|
3
3
|
export default PageHeader;
|
|
@@ -17,8 +17,10 @@ export interface PageHeaderType {
|
|
|
17
17
|
TippyIcon?: React.FunctionComponent<any>;
|
|
18
18
|
tippyMessage?: string;
|
|
19
19
|
onClickTippyButton?: () => void;
|
|
20
|
+
tippyHeader?: string;
|
|
20
21
|
};
|
|
21
22
|
onClose?: () => void;
|
|
23
|
+
closeIcon?: JSX.Element;
|
|
22
24
|
}
|
|
23
25
|
export interface ServerInfo {
|
|
24
26
|
currentVersion: string;
|