@ovh-ux/manager-pci-common 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +459 -0
- package/README.md +6 -0
- package/dist/index.js +41234 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/api/data/api-schema.d.ts +14 -0
- package/dist/types/api/data/availability.d.ts +27 -0
- package/dist/types/api/data/availability.spec.d.ts +1 -0
- package/dist/types/api/data/catalog.d.ts +154 -0
- package/dist/types/api/data/catalog.spec.d.ts +1 -0
- package/dist/types/api/data/dbaas-logs.d.ts +62 -0
- package/dist/types/api/data/dbaas-logs.spec.d.ts +1 -0
- package/dist/types/api/data/flavors.d.ts +39 -0
- package/dist/types/api/data/flavors.spec.d.ts +1 -0
- package/dist/types/api/data/index.d.ts +9 -0
- package/dist/types/api/data/instance.d.ts +30 -0
- package/dist/types/api/data/instance.spec.d.ts +1 -0
- package/dist/types/api/data/logs.d.ts +43 -0
- package/dist/types/api/data/operation.d.ts +19 -0
- package/dist/types/api/data/project.d.ts +73 -0
- package/dist/types/api/data/project.spec.d.ts +1 -0
- package/dist/types/api/data/regions.d.ts +13 -0
- package/dist/types/api/data/regions.spec.d.ts +1 -0
- package/dist/types/api/hook/index.d.ts +10 -0
- package/dist/types/api/hook/useApiSchema.d.ts +1 -0
- package/dist/types/api/hook/useAvailability.d.ts +6 -0
- package/dist/types/api/hook/useAvailability.spec.d.ts +1 -0
- package/dist/types/api/hook/useCatalog.d.ts +5 -0
- package/dist/types/api/hook/useCatalog.spec.d.ts +1 -0
- package/dist/types/api/hook/useDbaasLogs.d.ts +177 -0
- package/dist/types/api/hook/useDbaasLogs.spec.d.ts +1 -0
- package/dist/types/api/hook/useFlavors.d.ts +190 -0
- package/dist/types/api/hook/useFlavors.spec.d.ts +1 -0
- package/dist/types/api/hook/useInstance.d.ts +6 -0
- package/dist/types/api/hook/useLogs.d.ts +124 -0
- package/dist/types/api/hook/useOperation.d.ts +5 -0
- package/dist/types/api/hook/useProject.d.ts +29 -0
- package/dist/types/api/hook/useProject.spec.d.ts +1 -0
- package/dist/types/api/hook/useRegions.d.ts +5 -0
- package/dist/types/components/Pricing.d.ts +8 -0
- package/dist/types/components/accordion/Accordion.component.d.ts +8 -0
- package/dist/types/components/banner/announcement-banner/PciAnnouncementBanner.d.ts +5 -0
- package/dist/types/components/banner/announcement-banner/PciAnnouncementBanner.spec.d.ts +1 -0
- package/dist/types/components/banner/announcement-banner/useAnnouncementBanner.hook.d.ts +5 -0
- package/dist/types/components/banner/discovery-banner/PciDiscoveryBanner.d.ts +7 -0
- package/dist/types/components/banner/discovery-banner/PciDiscoveryBanner.spec.d.ts +1 -0
- package/dist/types/components/banner/free-local-zones-banner/PciFreeLocalZonesBanner.d.ts +30 -0
- package/dist/types/components/banner/free-local-zones-banner/PciFreeLocalZonesBanner.spec.d.ts +0 -0
- package/dist/types/components/banner/index.d.ts +6 -0
- package/dist/types/components/banner/trusted-zone-banner/PciTrustedZoneBanner.d.ts +1 -0
- package/dist/types/components/banner/trusted-zone-banner/useTrustedZoneBanner.hook.d.ts +5 -0
- package/dist/types/components/flavor-selector/FlavorLocalzoneChip.d.ts +4 -0
- package/dist/types/components/flavor-selector/FlavorSelector.component.d.ts +9 -0
- package/dist/types/components/flavor-selector/FlavorTile.component.d.ts +32 -0
- package/dist/types/components/flavor-selector/index.d.ts +1 -0
- package/dist/types/components/logs/BlinkingCursor.component.d.ts +1 -0
- package/dist/types/components/logs/DbaasLogsAccountSelector.component.d.ts +6 -0
- package/dist/types/components/logs/LogHowTo.component.d.ts +4 -0
- package/dist/types/components/logs/LogProvider.component.d.ts +18 -0
- package/dist/types/components/logs/LogTileUnsubscribeAction.component.d.ts +7 -0
- package/dist/types/components/logs/LogTiles.component.d.ts +4 -0
- package/dist/types/components/logs/LogsView.component.d.ts +4 -0
- package/dist/types/components/logs/StreamRetention.component.d.ts +14 -0
- package/dist/types/components/logs/StreamSubscriptions.component.d.ts +7 -0
- package/dist/types/components/logs/StreamsList.component.d.ts +6 -0
- package/dist/types/components/logs/TailLogs.component.d.ts +5 -0
- package/dist/types/components/logs/index.d.ts +6 -0
- package/dist/types/components/logs/useStreamsListColumns.d.ts +10 -0
- package/dist/types/components/modal/PciModal.component.d.ts +14 -0
- package/dist/types/components/modal/PciModal.component.spec.d.ts +1 -0
- package/dist/types/components/modal/deletion-modal/DeletionModal.component.d.ts +6 -0
- package/dist/types/components/modal/deletion-modal/DeletionModal.component.spec.d.ts +1 -0
- package/dist/types/components/modal/index.d.ts +2 -0
- package/dist/types/components/quantity-selector/QuantitySelector.component.d.ts +12 -0
- package/dist/types/components/quantity-selector/QuantitySelector.component.spec.d.ts +1 -0
- package/dist/types/components/quantity-selector/index.d.ts +1 -0
- package/dist/types/components/region-selector/RegionGlobalzoneChip.component.d.ts +1 -0
- package/dist/types/components/region-selector/RegionGlobalzoneChip.component.spec.d.ts +1 -0
- package/dist/types/components/region-selector/RegionList.component.d.ts +8 -0
- package/dist/types/components/region-selector/RegionList.component.spec.d.ts +1 -0
- package/dist/types/components/region-selector/RegionLocalzoneChip.component.d.ts +1 -0
- package/dist/types/components/region-selector/RegionLocalzoneChip.component.spec.d.ts +1 -0
- package/dist/types/components/region-selector/RegionSelector.component.d.ts +8 -0
- package/dist/types/components/region-selector/RegionSummary.component.d.ts +5 -0
- package/dist/types/components/region-selector/RegionSummary.component.spec.d.ts +1 -0
- package/dist/types/components/region-selector/RegionTile.d.ts +7 -0
- package/dist/types/components/region-selector/constants.d.ts +6 -0
- package/dist/types/components/region-selector/style.constants.d.ts +3 -0
- package/dist/types/components/region-selector/useRegionSelector.d.ts +178 -0
- package/dist/types/components/region-selector/useRegions.d.ts +20 -0
- package/dist/types/components/shape-input/ShapeInput.component.d.ts +69 -0
- package/dist/types/components/shape-input/constants.d.ts +1 -0
- package/dist/types/components/shape-input/default-components/default-shape.d.ts +7 -0
- package/dist/types/components/shape-input/default-components/group-label.d.ts +6 -0
- package/dist/types/components/shape-input/default-components/item-label.d.ts +5 -0
- package/dist/types/components/shape-input/default-components/stack-label.d.ts +6 -0
- package/dist/types/components/shape-input/default-components/stack-title.d.ts +3 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/constants/urls.d.ts +2 -0
- package/dist/types/hooks/bytes/useBytes.d.ts +3 -0
- package/dist/types/hooks/bytes/useBytes.spec.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/url/usePciUrl.d.ts +1 -0
- package/dist/types/hooks/usePricing.d.ts +25 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/translations/announcement-banner/Messages_de_DE.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_en_GB.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_es_ES.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_fr_CA.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_fr_FR.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_it_IT.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_pl_PL.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/Messages_pt_PT.json.d.ts +7 -0
- package/dist/types/translations/announcement-banner/index.d.ts +1 -0
- package/dist/types/translations/bytes/Messages_de_DE.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_en_GB.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_es_ES.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_fr_CA.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_fr_FR.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_it_IT.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_pl_PL.json.d.ts +22 -0
- package/dist/types/translations/bytes/Messages_pt_PT.json.d.ts +22 -0
- package/dist/types/translations/bytes/index.d.ts +1 -0
- package/dist/types/translations/catalog-price/Messages_de_DE.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_en_GB.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_es_ES.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_fr_CA.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_fr_FR.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_it_IT.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_pl_PL.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/Messages_pt_PT.json.d.ts +17 -0
- package/dist/types/translations/catalog-price/index.d.ts +1 -0
- package/dist/types/translations/common/Messages_de_DE.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_en_GB.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_es_ES.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_fr_CA.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_fr_FR.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_it_IT.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_pl_PL.json.d.ts +97 -0
- package/dist/types/translations/common/Messages_pt_PT.json.d.ts +97 -0
- package/dist/types/translations/common/index.d.ts +1 -0
- package/dist/types/translations/discovery-banner/Messages_de_DE.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_en_GB.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_es_ES.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_fr_CA.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_fr_FR.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_it_IT.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_pl_PL.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/Messages_pt_PT.json.d.ts +7 -0
- package/dist/types/translations/discovery-banner/index.d.ts +1 -0
- package/dist/types/translations/flavor-selector/Messages_de_DE.json.d.ts +34 -0
- package/dist/types/translations/flavor-selector/Messages_en_GB.json.d.ts +34 -0
- package/dist/types/translations/flavor-selector/Messages_es_ES.json.d.ts +34 -0
- package/dist/types/translations/flavor-selector/Messages_fr_CA.json.d.ts +36 -0
- package/dist/types/translations/flavor-selector/Messages_fr_FR.json.d.ts +36 -0
- package/dist/types/translations/flavor-selector/Messages_it_IT.json.d.ts +34 -0
- package/dist/types/translations/flavor-selector/Messages_pl_PL.json.d.ts +34 -0
- package/dist/types/translations/flavor-selector/Messages_pt_PT.json.d.ts +34 -0
- package/dist/types/translations/flavor-selector/index.d.ts +1 -0
- package/dist/types/translations/free-local-zones-banner/Messages_de_DE.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_en_GB.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_es_ES.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_fr_CA.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_fr_FR.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_it_IT.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_pl_PL.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/Messages_pt_PT.json.d.ts +8 -0
- package/dist/types/translations/free-local-zones-banner/index.d.ts +1 -0
- package/dist/types/translations/logs/Messages_de_DE.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_en_GB.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_es_ES.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_fr_CA.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_fr_FR.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_it_IT.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_pl_PL.json.d.ts +45 -0
- package/dist/types/translations/logs/Messages_pt_PT.json.d.ts +45 -0
- package/dist/types/translations/logs/index.d.ts +1 -0
- package/dist/types/translations/quantity-selector/Messages_de_DE.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_en_GB.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_es_ES.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_fr_CA.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_fr_FR.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_it_IT.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_pl_PL.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/Messages_pt_PT.json.d.ts +8 -0
- package/dist/types/translations/quantity-selector/index.d.ts +1 -0
- package/dist/types/translations/region-selector/Messages_de_DE.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_en_GB.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_es_ES.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_fr_CA.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_fr_FR.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_it_IT.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_pl_PL.json.d.ts +16 -0
- package/dist/types/translations/region-selector/Messages_pt_PT.json.d.ts +16 -0
- package/dist/types/translations/region-selector/index.d.ts +1 -0
- package/dist/types/translations/trusted-zone-banner/Messages_de_DE.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_en_GB.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_es_ES.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_fr_CA.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_fr_FR.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_it_IT.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_pl_PL.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/Messages_pt_PT.json.d.ts +6 -0
- package/dist/types/translations/trusted-zone-banner/index.d.ts +1 -0
- package/dist/types/wrapperRenders.d.ts +15 -0
- package/package.json +92 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface FlavorDiskType {
|
|
2
|
+
number: number;
|
|
3
|
+
capacity: number;
|
|
4
|
+
sizeUnit: string;
|
|
5
|
+
technology: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FlavorTileProps {
|
|
8
|
+
flavorName: string;
|
|
9
|
+
flavorSpecs: {
|
|
10
|
+
ram: number;
|
|
11
|
+
vcores: number;
|
|
12
|
+
frequency: number;
|
|
13
|
+
disk: FlavorDiskType[];
|
|
14
|
+
nvme: FlavorDiskType[];
|
|
15
|
+
bandwidth: number;
|
|
16
|
+
gpuNumber: number;
|
|
17
|
+
gpuModel: string;
|
|
18
|
+
};
|
|
19
|
+
flavorCompatibility: {
|
|
20
|
+
localzone: boolean;
|
|
21
|
+
globalzone: boolean;
|
|
22
|
+
};
|
|
23
|
+
flavorPrice: {
|
|
24
|
+
hourly: number;
|
|
25
|
+
monthly?: number;
|
|
26
|
+
};
|
|
27
|
+
isNewFlavor: boolean;
|
|
28
|
+
isSelected: boolean;
|
|
29
|
+
hasEnoughQuota?: boolean;
|
|
30
|
+
onClick: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function FlavorTile({ flavorName, flavorSpecs, flavorCompatibility, flavorPrice, isNewFlavor, isSelected, hasEnoughQuota, onClick, }: Readonly<FlavorTileProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FlavorSelector.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BlinkingCursor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TDbaasLog } from '../../api/data/dbaas-logs';
|
|
2
|
+
export interface DbaasLogsAccountSelectorProps {
|
|
3
|
+
account: TDbaasLog;
|
|
4
|
+
onAccountChange: (account: TDbaasLog) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function DbaasLogsAccountSelector({ account, onAccountChange, }: Readonly<DbaasLogsAccountSelectorProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LogProviderProps {
|
|
3
|
+
logsApiURL: string;
|
|
4
|
+
logsKeys: string[];
|
|
5
|
+
logsKind: string;
|
|
6
|
+
logsGuideURL?: string;
|
|
7
|
+
logsTracking?: {
|
|
8
|
+
graylogWatch?: string;
|
|
9
|
+
ldpDetails?: string;
|
|
10
|
+
subscribe?: string;
|
|
11
|
+
unsubscribe?: string;
|
|
12
|
+
createAccount?: string;
|
|
13
|
+
createDataStream?: string;
|
|
14
|
+
transfer?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const LogContext: React.Context<LogProviderProps>;
|
|
18
|
+
export declare function LogProvider({ logsApiURL, logsKeys, logsKind, logsGuideURL, children, }: React.PropsWithChildren<LogProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApiError } from '@ovh-ux/manager-core-api';
|
|
2
|
+
export interface LogTileUnsubscribeActionProps {
|
|
3
|
+
subscriptionId: string;
|
|
4
|
+
onSuccess: () => void;
|
|
5
|
+
onError: (err: ApiError) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function LogTileUnsubscribeAction({ subscriptionId, onSuccess, onError, }: Readonly<LogTileUnsubscribeActionProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface StreamRetentionProps {
|
|
2
|
+
serviceName: string;
|
|
3
|
+
clusterId: string;
|
|
4
|
+
retentionId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const parseRetentionDuration: (duration?: string) => {
|
|
7
|
+
years: number;
|
|
8
|
+
months: number;
|
|
9
|
+
days: number;
|
|
10
|
+
hours: number;
|
|
11
|
+
minutes: number;
|
|
12
|
+
seconds: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function StreamRetention({ serviceName, clusterId, retentionId, }: StreamRetentionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface StreamSubscriptionsProps {
|
|
2
|
+
account: string;
|
|
3
|
+
serviceName: string;
|
|
4
|
+
streamId: string;
|
|
5
|
+
subscriptionCount: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function StreamSubscriptions({ account, serviceName, streamId, subscriptionCount, }: Readonly<StreamSubscriptionsProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TDbaasLog } from '../../api/data/dbaas-logs';
|
|
2
|
+
export interface StreamListProps {
|
|
3
|
+
account: TDbaasLog;
|
|
4
|
+
serviceName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function StreamsList({ account, serviceName, }: Readonly<StreamListProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TDbaasLog, TDbaasStream } from '../../api/data/dbaas-logs';
|
|
2
|
+
export interface UseStreamsListColumnsProps {
|
|
3
|
+
account: TDbaasLog;
|
|
4
|
+
serviceName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const useStreamsListColumns: ({ account, serviceName, }: Readonly<UseStreamsListColumnsProps>) => {
|
|
7
|
+
id: string;
|
|
8
|
+
cell: (stream: TDbaasStream) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type PciModalProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
type?: 'warning' | 'default';
|
|
5
|
+
title: string;
|
|
6
|
+
isPending?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
submitText?: string;
|
|
10
|
+
onConfirm: () => void;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function PciModal({ children, type, title, cancelText, submitText, isPending, isDisabled, onConfirm, onClose, onCancel, }: Readonly<PciModalProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PciModalProps } from '../PciModal.component';
|
|
2
|
+
export type DeletionModalProps = PciModalProps & {
|
|
3
|
+
confirmationText?: string;
|
|
4
|
+
confirmationLabel?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function DeletionModal({ children, type, title, cancelText, submitText, isPending, onConfirm, onClose, onCancel, confirmationText, confirmationLabel, }: Readonly<DeletionModalProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface QuantitySelectorProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
labelHelpText?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
value: number;
|
|
6
|
+
onValueChange: (value: number) => void;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
contentClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function QuantitySelector({ label, labelHelpText, description, value, onValueChange, min, max, className, contentClassName, }: Readonly<QuantitySelectorProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './QuantitySelector.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RegionGlobalzoneChip(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TLocalisation } from './useRegions';
|
|
2
|
+
export interface RegionListProps {
|
|
3
|
+
regions: TLocalisation[];
|
|
4
|
+
selectedRegion: TLocalisation;
|
|
5
|
+
onClick: (region: TLocalisation) => void;
|
|
6
|
+
render: (region: TLocalisation, isSelected: boolean) => JSX.Element | string;
|
|
7
|
+
}
|
|
8
|
+
export declare function RegionList({ regions, selectedRegion, onClick, render, }: RegionListProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RegionLocalzoneChip(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TLocalisation } from './useRegions';
|
|
2
|
+
export interface RegionSelectorProps {
|
|
3
|
+
projectId: string;
|
|
4
|
+
onSelectRegion: (region?: TLocalisation) => void;
|
|
5
|
+
regionFilter?: (region: TLocalisation) => boolean;
|
|
6
|
+
compactMode?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function RegionSelector({ projectId, onSelectRegion, regionFilter, compactMode, }: Readonly<RegionSelectorProps>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TLocalisation } from './useRegions';
|
|
2
|
+
export interface RegionTileProps {
|
|
3
|
+
region: TLocalisation;
|
|
4
|
+
isSelected: boolean;
|
|
5
|
+
isCompact?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const RegionTile: ({ region, isSelected, isCompact, }: Readonly<RegionTileProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const regionContainer = "grid gap-6 list-none p-6 m-0 grid-cols-1 md:grid-cols-3";
|
|
2
|
+
export declare const regionTile = "cursor-pointer border-[--ods-color-blue-100] hover:bg-[--ods-color-blue-100] hover:border-[--ods-color-blue-600]";
|
|
3
|
+
export declare const regionTileSelected = "font-bold bg-[--ods-color-blue-100] border-[--ods-color-blue-600]";
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { TLocalisation } from './useRegions';
|
|
2
|
+
interface RegionSelectorProps {
|
|
3
|
+
projectId: string;
|
|
4
|
+
onSelectRegion: (region: TLocalisation) => void;
|
|
5
|
+
regionFilter?: (region: TLocalisation) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function useRegionSelector({ projectId, onSelectRegion, regionFilter, }: Readonly<RegionSelectorProps>): {
|
|
8
|
+
regions: TLocalisation[];
|
|
9
|
+
continents: import("./useRegions").TContinent[];
|
|
10
|
+
macroRegions: TLocalisation[];
|
|
11
|
+
microRegions: TLocalisation[];
|
|
12
|
+
selectContinent: import("react").Dispatch<any>;
|
|
13
|
+
selectMacroRegion: (region: TLocalisation) => void;
|
|
14
|
+
selectMicroRegion: (region: TLocalisation) => void;
|
|
15
|
+
selectedMacroRegion: any;
|
|
16
|
+
selectedMicroRegion: any;
|
|
17
|
+
data: import("./useRegions").ProjectLocalisation;
|
|
18
|
+
error: Error;
|
|
19
|
+
isError: true;
|
|
20
|
+
isPending: false;
|
|
21
|
+
isLoading: false;
|
|
22
|
+
isLoadingError: false;
|
|
23
|
+
isRefetchError: true;
|
|
24
|
+
isSuccess: false;
|
|
25
|
+
status: "error";
|
|
26
|
+
dataUpdatedAt: number;
|
|
27
|
+
errorUpdatedAt: number;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
errorUpdateCount: number;
|
|
31
|
+
isFetched: boolean;
|
|
32
|
+
isFetchedAfterMount: boolean;
|
|
33
|
+
isFetching: boolean;
|
|
34
|
+
isInitialLoading: boolean;
|
|
35
|
+
isPaused: boolean;
|
|
36
|
+
isPlaceholderData: boolean;
|
|
37
|
+
isRefetching: boolean;
|
|
38
|
+
isStale: boolean;
|
|
39
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("./useRegions").ProjectLocalisation, Error>>;
|
|
40
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
41
|
+
} | {
|
|
42
|
+
regions: TLocalisation[];
|
|
43
|
+
continents: import("./useRegions").TContinent[];
|
|
44
|
+
macroRegions: TLocalisation[];
|
|
45
|
+
microRegions: TLocalisation[];
|
|
46
|
+
selectContinent: import("react").Dispatch<any>;
|
|
47
|
+
selectMacroRegion: (region: TLocalisation) => void;
|
|
48
|
+
selectMicroRegion: (region: TLocalisation) => void;
|
|
49
|
+
selectedMacroRegion: any;
|
|
50
|
+
selectedMicroRegion: any;
|
|
51
|
+
data: import("./useRegions").ProjectLocalisation;
|
|
52
|
+
error: null;
|
|
53
|
+
isError: false;
|
|
54
|
+
isPending: false;
|
|
55
|
+
isLoading: false;
|
|
56
|
+
isLoadingError: false;
|
|
57
|
+
isRefetchError: false;
|
|
58
|
+
isSuccess: true;
|
|
59
|
+
status: "success";
|
|
60
|
+
dataUpdatedAt: number;
|
|
61
|
+
errorUpdatedAt: number;
|
|
62
|
+
failureCount: number;
|
|
63
|
+
failureReason: Error;
|
|
64
|
+
errorUpdateCount: number;
|
|
65
|
+
isFetched: boolean;
|
|
66
|
+
isFetchedAfterMount: boolean;
|
|
67
|
+
isFetching: boolean;
|
|
68
|
+
isInitialLoading: boolean;
|
|
69
|
+
isPaused: boolean;
|
|
70
|
+
isPlaceholderData: boolean;
|
|
71
|
+
isRefetching: boolean;
|
|
72
|
+
isStale: boolean;
|
|
73
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("./useRegions").ProjectLocalisation, Error>>;
|
|
74
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
75
|
+
} | {
|
|
76
|
+
regions: TLocalisation[];
|
|
77
|
+
continents: import("./useRegions").TContinent[];
|
|
78
|
+
macroRegions: TLocalisation[];
|
|
79
|
+
microRegions: TLocalisation[];
|
|
80
|
+
selectContinent: import("react").Dispatch<any>;
|
|
81
|
+
selectMacroRegion: (region: TLocalisation) => void;
|
|
82
|
+
selectMicroRegion: (region: TLocalisation) => void;
|
|
83
|
+
selectedMacroRegion: any;
|
|
84
|
+
selectedMicroRegion: any;
|
|
85
|
+
data: undefined;
|
|
86
|
+
error: Error;
|
|
87
|
+
isError: true;
|
|
88
|
+
isPending: false;
|
|
89
|
+
isLoading: false;
|
|
90
|
+
isLoadingError: true;
|
|
91
|
+
isRefetchError: false;
|
|
92
|
+
isSuccess: false;
|
|
93
|
+
status: "error";
|
|
94
|
+
dataUpdatedAt: number;
|
|
95
|
+
errorUpdatedAt: number;
|
|
96
|
+
failureCount: number;
|
|
97
|
+
failureReason: Error;
|
|
98
|
+
errorUpdateCount: number;
|
|
99
|
+
isFetched: boolean;
|
|
100
|
+
isFetchedAfterMount: boolean;
|
|
101
|
+
isFetching: boolean;
|
|
102
|
+
isInitialLoading: boolean;
|
|
103
|
+
isPaused: boolean;
|
|
104
|
+
isPlaceholderData: boolean;
|
|
105
|
+
isRefetching: boolean;
|
|
106
|
+
isStale: boolean;
|
|
107
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("./useRegions").ProjectLocalisation, Error>>;
|
|
108
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
109
|
+
} | {
|
|
110
|
+
regions: TLocalisation[];
|
|
111
|
+
continents: import("./useRegions").TContinent[];
|
|
112
|
+
macroRegions: TLocalisation[];
|
|
113
|
+
microRegions: TLocalisation[];
|
|
114
|
+
selectContinent: import("react").Dispatch<any>;
|
|
115
|
+
selectMacroRegion: (region: TLocalisation) => void;
|
|
116
|
+
selectMicroRegion: (region: TLocalisation) => void;
|
|
117
|
+
selectedMacroRegion: any;
|
|
118
|
+
selectedMicroRegion: any;
|
|
119
|
+
data: undefined;
|
|
120
|
+
error: null;
|
|
121
|
+
isError: false;
|
|
122
|
+
isPending: true;
|
|
123
|
+
isLoading: true;
|
|
124
|
+
isLoadingError: false;
|
|
125
|
+
isRefetchError: false;
|
|
126
|
+
isSuccess: false;
|
|
127
|
+
status: "pending";
|
|
128
|
+
dataUpdatedAt: number;
|
|
129
|
+
errorUpdatedAt: number;
|
|
130
|
+
failureCount: number;
|
|
131
|
+
failureReason: Error;
|
|
132
|
+
errorUpdateCount: number;
|
|
133
|
+
isFetched: boolean;
|
|
134
|
+
isFetchedAfterMount: boolean;
|
|
135
|
+
isFetching: boolean;
|
|
136
|
+
isInitialLoading: boolean;
|
|
137
|
+
isPaused: boolean;
|
|
138
|
+
isPlaceholderData: boolean;
|
|
139
|
+
isRefetching: boolean;
|
|
140
|
+
isStale: boolean;
|
|
141
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("./useRegions").ProjectLocalisation, Error>>;
|
|
142
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
143
|
+
} | {
|
|
144
|
+
regions: TLocalisation[];
|
|
145
|
+
continents: import("./useRegions").TContinent[];
|
|
146
|
+
macroRegions: TLocalisation[];
|
|
147
|
+
microRegions: TLocalisation[];
|
|
148
|
+
selectContinent: import("react").Dispatch<any>;
|
|
149
|
+
selectMacroRegion: (region: TLocalisation) => void;
|
|
150
|
+
selectMicroRegion: (region: TLocalisation) => void;
|
|
151
|
+
selectedMacroRegion: any;
|
|
152
|
+
selectedMicroRegion: any;
|
|
153
|
+
data: undefined;
|
|
154
|
+
error: null;
|
|
155
|
+
isError: false;
|
|
156
|
+
isPending: true;
|
|
157
|
+
isLoadingError: false;
|
|
158
|
+
isRefetchError: false;
|
|
159
|
+
isSuccess: false;
|
|
160
|
+
status: "pending";
|
|
161
|
+
dataUpdatedAt: number;
|
|
162
|
+
errorUpdatedAt: number;
|
|
163
|
+
failureCount: number;
|
|
164
|
+
failureReason: Error;
|
|
165
|
+
errorUpdateCount: number;
|
|
166
|
+
isFetched: boolean;
|
|
167
|
+
isFetchedAfterMount: boolean;
|
|
168
|
+
isFetching: boolean;
|
|
169
|
+
isLoading: boolean;
|
|
170
|
+
isInitialLoading: boolean;
|
|
171
|
+
isPaused: boolean;
|
|
172
|
+
isPlaceholderData: boolean;
|
|
173
|
+
isRefetching: boolean;
|
|
174
|
+
isStale: boolean;
|
|
175
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("./useRegions").ProjectLocalisation, Error>>;
|
|
176
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
177
|
+
};
|
|
178
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TRegion } from '../../api/data/regions';
|
|
2
|
+
export declare const useProjectRegions: (projectId: string) => import("@tanstack/react-query").UseQueryResult<TRegion[], Error>;
|
|
3
|
+
export interface TContinent {
|
|
4
|
+
id: string;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export type TLocalisation = TRegion & {
|
|
9
|
+
isMacro: boolean;
|
|
10
|
+
isLocalZone: boolean;
|
|
11
|
+
macro: string;
|
|
12
|
+
continentLabel: string;
|
|
13
|
+
macroLabel: string;
|
|
14
|
+
microLabel: string;
|
|
15
|
+
};
|
|
16
|
+
export interface ProjectLocalisation {
|
|
17
|
+
regions: TLocalisation[];
|
|
18
|
+
continents: TContinent[];
|
|
19
|
+
}
|
|
20
|
+
export declare const useProjectLocalisation: (projectId: string) => import("@tanstack/react-query").UseQueryResult<ProjectLocalisation, Error>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type TShapesInputProps<T> = {
|
|
2
|
+
items?: T[];
|
|
3
|
+
value?: T;
|
|
4
|
+
onInput?: (value: T) => void;
|
|
5
|
+
columnsCount?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
6
|
+
item?: {
|
|
7
|
+
LabelComponent?: ({ item, isItemSelected, isMobile, }: {
|
|
8
|
+
item: T;
|
|
9
|
+
isItemSelected: boolean;
|
|
10
|
+
isMobile: boolean;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
getId?: (item: T) => string;
|
|
13
|
+
isDisabled?: (item: T) => boolean;
|
|
14
|
+
};
|
|
15
|
+
stack?: {
|
|
16
|
+
by: (item: T) => string;
|
|
17
|
+
LabelComponent?: ({ stackKey, isStackSelected, stackItems, isMobile, }: {
|
|
18
|
+
stackKey: string;
|
|
19
|
+
isStackSelected: boolean;
|
|
20
|
+
stackItems: T[];
|
|
21
|
+
isMobile: boolean;
|
|
22
|
+
}) => JSX.Element;
|
|
23
|
+
TitleComponent?: ({ stackKey, stackItems, isMobile, }: {
|
|
24
|
+
stackKey?: string;
|
|
25
|
+
stackItems?: T[];
|
|
26
|
+
isMobile: boolean;
|
|
27
|
+
}) => JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
group?: {
|
|
30
|
+
by: (item: T) => string;
|
|
31
|
+
LabelComponent?: ({ groupName, isGroupSelected, groupItems, isMobile, }: {
|
|
32
|
+
groupName: string;
|
|
33
|
+
isGroupSelected: boolean;
|
|
34
|
+
groupItems: T[];
|
|
35
|
+
isMobile: boolean;
|
|
36
|
+
}) => JSX.Element;
|
|
37
|
+
};
|
|
38
|
+
isMobile?: boolean;
|
|
39
|
+
className?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* ShapesInputComponent
|
|
43
|
+
* An input component that allows the user to select an item from a list of items
|
|
44
|
+
* It's like a select, but items are displayed as shapes/tiles
|
|
45
|
+
* shapes can be grouped and stacked based on a common function value(common value), thus we can have group of inputs and stack of inputs
|
|
46
|
+
* The component is generic, meaning the items can be of any type
|
|
47
|
+
* @param items {Array} list of items to be displayed, default is an empty array
|
|
48
|
+
* @param value {Any} the selected item, default is undefined
|
|
49
|
+
* @param onInput {function} callback function to be called when the selected item changes,is optional
|
|
50
|
+
* @param columnsCount number of columns to display the items in,range from 1 to 12, default is 3
|
|
51
|
+
* @param item an optional object that contains the following properties:
|
|
52
|
+
* - LabelComponent: a component that will be used to display the item, is optional, a default component will be used if not provided
|
|
53
|
+
* - getId: a function that returns a unique id for the item, is optional, the index of the item will be used if not provided
|
|
54
|
+
* - isDisabled: a function that returns a boolean indicating if the item is disabled, is optional
|
|
55
|
+
* @param stack an optional object that contains the following properties:
|
|
56
|
+
* - by: a function that returns a common value for a group of items
|
|
57
|
+
* - LabelComponent: a component that will be used to display the stack, is optional, a default component will be used if not provided
|
|
58
|
+
* - TitleComponent: a component that will be used to display the title of the stack, is optional, a default component will be used if not provided
|
|
59
|
+
* If the stack is not provided, the items will be displayed as single items
|
|
60
|
+
* @param group an object that contains the following properties:
|
|
61
|
+
* - by: a function that returns a common value for a group of items
|
|
62
|
+
* - LabelComponent: a component that will be used to display the group, is optional, a default component will be used if not provided
|
|
63
|
+
* If the group is not provided, the items will be displayed as a single group
|
|
64
|
+
* @param className additional classes to be added to the component
|
|
65
|
+
* @param isMobile boolean indicating if the component is being displayed on a mobile device, default is false
|
|
66
|
+
* @param props additional props to be passed to the component
|
|
67
|
+
* @constructor Creates a ShapesInputComponent
|
|
68
|
+
*/
|
|
69
|
+
export declare const ShapesInputComponent: <T>({ items, value, onInput, columnsCount, item, stack, group, className, isMobile, ...props }: Readonly<TShapesInputProps<T>>) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GHOST_BUTTON_CLASS = "appearance-none bg-transparent border-0 cursor-pointer text-left";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './urls';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePciUrl: () => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TPricing } from '../api/data';
|
|
2
|
+
export interface PriceFormattingOptions {
|
|
3
|
+
decimals?: number;
|
|
4
|
+
unit?: number;
|
|
5
|
+
intervalUnit?: TPricing['intervalUnit'];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Primary & secondary price parts depends on user region.
|
|
9
|
+
* ASIA, FRENCH : primary = price without tax, secondary = price + tax
|
|
10
|
+
* GERMAN : primary : price + tax, secondary = none
|
|
11
|
+
* US, OTHER : primary: price without tax
|
|
12
|
+
*/
|
|
13
|
+
export interface PriceDetails {
|
|
14
|
+
primary: string;
|
|
15
|
+
secondary?: string;
|
|
16
|
+
interval?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Hook to facillitates price formatting coming from /order/catalog/public
|
|
20
|
+
*/
|
|
21
|
+
export declare function usePricing(): {
|
|
22
|
+
formatPrice: (price: number, options: PriceFormattingOptions) => string;
|
|
23
|
+
getPriceDetails: (pricing: TPricing, options?: Readonly<PriceFormattingOptions>) => PriceDetails;
|
|
24
|
+
getTextPrice: (pricing: TPricing, options?: Readonly<PriceFormattingOptions>) => string;
|
|
25
|
+
};
|