@capillarytech/blaze-ui 6.4.0 → 6.5.0
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/CapDateRangePicker/index.d.ts.map +1 -1
- package/CapDateRangePicker/index.js +5 -1
- package/CapDateRangePicker/styles.css +28 -0
- package/CapDateRangePicker/styles.module.scss.js +2 -1
- package/CapDateRangePicker/styles.scss +37 -0
- package/CapDateRangePicker/types.d.ts +5 -0
- package/CapDateRangePicker/types.d.ts.map +1 -1
- package/CapDragAndDrop/index.d.ts +19 -3
- package/CapDragAndDrop/index.d.ts.map +1 -1
- package/CapDragAndDrop/index.js +29 -24
- package/CapDragAndDrop/styles.css +15 -17
- package/CapDragAndDrop/styles.scss +16 -18
- package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts +7 -0
- package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts.map +1 -0
- package/CapMobileDateRangePicker/DateRangeInputSelectors.js +68 -0
- package/CapMobileDateRangePicker/ReactMobileDatePickerModule.d.ts.map +1 -1
- package/CapMobileDateRangePicker/ReactMobileDatePickerModule.js +2 -1
- package/CapMobileDateRangePicker/index.d.ts +5 -21
- package/CapMobileDateRangePicker/index.d.ts.map +1 -1
- package/CapMobileDateRangePicker/index.js +256 -309
- package/CapMobileDateRangePicker/messages.d.ts +17 -0
- package/CapMobileDateRangePicker/messages.d.ts.map +1 -0
- package/CapMobileDateRangePicker/messages.js +20 -0
- package/CapMobileDateRangePicker/styles.css +107 -144
- package/CapMobileDateRangePicker/styles.module.scss.js +21 -0
- package/CapMobileDateRangePicker/styles.scss +188 -192
- package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts +18 -0
- package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts.map +1 -0
- package/CapMobileDateRangePicker/types.d.ts +95 -0
- package/CapMobileDateRangePicker/types.d.ts.map +1 -0
- package/CapMobileDateRangePicker/utils.d.ts +3 -0
- package/CapMobileDateRangePicker/utils.d.ts.map +1 -0
- package/CapMobileDateRangePicker/utils.js +5 -0
- package/CapPopoverTree/index.d.ts +3 -40
- package/CapPopoverTree/index.d.ts.map +1 -1
- package/CapPopoverTree/index.js +72 -82
- package/CapPopoverTree/style.d.ts +5 -1
- package/CapPopoverTree/style.d.ts.map +1 -1
- package/CapPopoverTree/styles.css +119 -18
- package/CapPopoverTree/styles.module.scss.js +26 -0
- package/CapPopoverTree/styles.scss +179 -31
- package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts +22 -0
- package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts.map +1 -0
- package/CapPopoverTree/types.d.ts +62 -0
- package/CapPopoverTree/types.d.ts.map +1 -0
- package/CapTimeline/CapTimelineCard.d.ts +27 -4
- package/CapTimeline/CapTimelineCard.d.ts.map +1 -1
- package/CapTimeline/CapTimelineCard.js +157 -40
- package/CapTimeline/CapTimelinePanesWrapper.d.ts +25 -4
- package/CapTimeline/CapTimelinePanesWrapper.d.ts.map +1 -1
- package/CapTimeline/CapTimelinePanesWrapper.js +20 -24
- package/CapTimeline/index.d.ts +17 -2
- package/CapTimeline/index.d.ts.map +1 -1
- package/CapTimeline/index.js +23 -62
- package/CapTimeline/styles.css +40 -40
- package/CapTimeline/styles.scss +57 -76
- package/CapVirtualSelect/actions.d.ts +16 -0
- package/CapVirtualSelect/actions.d.ts.map +1 -0
- package/CapVirtualSelect/actions.js +21 -0
- package/CapVirtualSelect/constants.d.ts +13 -0
- package/CapVirtualSelect/constants.d.ts.map +1 -0
- package/CapVirtualSelect/constants.js +26 -0
- package/CapVirtualSelect/index.d.ts +169 -0
- package/CapVirtualSelect/index.d.ts.map +1 -0
- package/CapVirtualSelect/index.js +409 -0
- package/CapVirtualSelect/messages.d.ts +9 -0
- package/CapVirtualSelect/messages.d.ts.map +1 -0
- package/CapVirtualSelect/messages.js +12 -0
- package/CapVirtualSelect/reducer.d.ts +4 -0
- package/CapVirtualSelect/reducer.d.ts.map +1 -0
- package/CapVirtualSelect/reducer.js +63 -0
- package/CapVirtualSelect/saga.d.ts +40 -0
- package/CapVirtualSelect/saga.d.ts.map +1 -0
- package/CapVirtualSelect/saga.js +91 -0
- package/CapVirtualSelect/selectors.d.ts +28 -0
- package/CapVirtualSelect/selectors.d.ts.map +1 -0
- package/CapVirtualSelect/selectors.js +30 -0
- package/CapVirtualSelect/styles.css +110 -0
- package/CapVirtualSelect/styles.scss +106 -0
- package/CapVirtualSelect/tests/mockData.d.ts +7 -0
- package/CapVirtualSelect/tests/mockData.d.ts.map +1 -0
- package/CapVirtualSelect/utils.d.ts +2 -0
- package/CapVirtualSelect/utils.d.ts.map +1 -0
- package/CapVirtualSelect/utils.js +12 -0
- package/index.d.ts +2 -4
- package/index.d.ts.map +1 -1
- package/index.js +97 -99
- package/package.json +1 -1
- package/utils/dayjs.d.ts +29 -0
- package/utils/dayjs.d.ts.map +1 -1
- package/utils/dayjs.js +30 -0
- package/utils/getCapThemeConfig.d.ts.map +1 -1
- package/utils/getCapThemeConfig.js +1 -9
- package/CapDragAndDrop/messages.d.ts +0 -25
- package/CapDragAndDrop/messages.d.ts.map +0 -1
- package/CapDragAndDrop/messages.js +0 -28
- package/CapDragAndDrop/styles.module.scss.js +0 -21
- package/CapDragAndDrop/types.d.ts +0 -17
- package/CapDragAndDrop/types.d.ts.map +0 -1
- package/CapTimeline/messages.d.ts +0 -21
- package/CapTimeline/messages.d.ts.map +0 -1
- package/CapTimeline/messages.js +0 -24
- package/CapTimeline/styles.module.scss.js +0 -30
- package/CapTimeline/tests/CapTimeline.mockData.d.ts +0 -14
- package/CapTimeline/tests/CapTimeline.mockData.d.ts.map +0 -1
- package/CapTimeline/types.d.ts +0 -60
- package/CapTimeline/types.d.ts.map +0 -1
- /package/{CapDragAndDrop → CapMobileDateRangePicker}/types.js +0 -0
- /package/{CapTimeline → CapPopoverTree}/types.js +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CapPopoverTreeProps, TreeNodeData } from '../types';
|
|
2
|
+
export declare const basicTreeData: TreeNodeData[];
|
|
3
|
+
export declare const treeDataWithIcons: TreeNodeData[];
|
|
4
|
+
export declare const singleNodeTreeData: TreeNodeData[];
|
|
5
|
+
export declare const emptyTreeData: TreeNodeData[];
|
|
6
|
+
export declare const nestedTreeData: TreeNodeData[];
|
|
7
|
+
export declare const mockOnSelect: jest.Mock<any, any, any>;
|
|
8
|
+
export declare const defaultProps: CapPopoverTreeProps;
|
|
9
|
+
export declare const propsWithSelectedKey: CapPopoverTreeProps;
|
|
10
|
+
export declare const propsWithDisabledTrigger: CapPopoverTreeProps;
|
|
11
|
+
export declare const propsWithTooltip: CapPopoverTreeProps;
|
|
12
|
+
export declare const propsWithLoading: CapPopoverTreeProps;
|
|
13
|
+
export declare const propsWithEmptyMessage: CapPopoverTreeProps;
|
|
14
|
+
export declare const propsWithSearchPlaceholder: CapPopoverTreeProps;
|
|
15
|
+
export declare const propsWithDefaultExpandAll: CapPopoverTreeProps;
|
|
16
|
+
export declare const propsWithCustomClassName: CapPopoverTreeProps;
|
|
17
|
+
export declare const propsWithRenderOnKeyChange: CapPopoverTreeProps;
|
|
18
|
+
export declare const propsWithTriggerProps: CapPopoverTreeProps;
|
|
19
|
+
export declare const propsWithPlacement: CapPopoverTreeProps;
|
|
20
|
+
export declare const propsWithTriggerHover: CapPopoverTreeProps;
|
|
21
|
+
export declare const propsWithTriggerFocus: CapPopoverTreeProps;
|
|
22
|
+
//# sourceMappingURL=CapPopoverTree.mockData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapPopoverTree.mockData.d.ts","sourceRoot":"","sources":["../../../components/CapPopoverTree/tests/CapPopoverTree.mockData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAElE,eAAO,MAAM,aAAa,EAAE,YAAY,EAcvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAW3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,EAM5C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAAY,EAAO,CAAC;AAEhD,eAAO,MAAM,cAAc,EAAE,YAAY,EAYxC,CAAC;AAEF,eAAO,MAAM,YAAY,0BAAY,CAAC;AAEtC,eAAO,MAAM,YAAY,EAAE,mBAK1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,mBAGlC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,mBAItC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,mBAG9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,mBAI9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBAInC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,mBAGxC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,mBAGvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,mBAItC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,mBAGxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBAGnC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,mBAGhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBAGnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBAGnC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { TreeProps } from 'antd-v5';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { CapPopoverProps } from '../CapPopover/types';
|
|
4
|
+
export interface TreeNodeData {
|
|
5
|
+
title: string | React.ReactNode;
|
|
6
|
+
key: string;
|
|
7
|
+
children?: TreeNodeData[];
|
|
8
|
+
icon?: string;
|
|
9
|
+
info?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Props for CapPopoverTree component
|
|
14
|
+
*
|
|
15
|
+
* @deprecated Props inherited from CapPopoverProps (Ant Design Popover component):
|
|
16
|
+
* - `overlayClassName` - Use `classNames.root` on CapPopover instead
|
|
17
|
+
* - `visible` - Use `open` instead (not recommended for public API - component manages popover state internally)
|
|
18
|
+
* - `onVisibleChange` - Use `onOpenChange` instead (not recommended for public API - component manages popover state internally)
|
|
19
|
+
*
|
|
20
|
+
* These deprecated props are handled internally by CapPopover with backward compatibility.
|
|
21
|
+
* They will show deprecation warnings in development mode.
|
|
22
|
+
*
|
|
23
|
+
* Note: `visible` and `onVisibleChange` are inherited from CapPopoverProps but are not recommended
|
|
24
|
+
* for use as the component manages popover state internally. Use `overlayClassName` if needed for styling.
|
|
25
|
+
*/
|
|
26
|
+
export interface CapPopoverTreeProps extends Omit<TreeProps, 'treeData' | 'onSelect' | 'className' | 'classNames' | 'styles' | 'motion'>, Omit<CapPopoverProps, 'content' | 'classNames' | 'motion'> {
|
|
27
|
+
/** Tree data structure */
|
|
28
|
+
treeData?: TreeNodeData[];
|
|
29
|
+
/** Component to use as trigger */
|
|
30
|
+
TriggerComponent?: React.ComponentType<Record<string, unknown>>;
|
|
31
|
+
/** Text to display in trigger component */
|
|
32
|
+
componentText?: string;
|
|
33
|
+
/** Props to pass to trigger component */
|
|
34
|
+
triggerProps?: Record<string, unknown>;
|
|
35
|
+
/** Whether trigger is disabled */
|
|
36
|
+
isTriggerDisabled?: boolean;
|
|
37
|
+
/** Text to show when trigger is disabled */
|
|
38
|
+
triggerDisabledText?: string;
|
|
39
|
+
/** Tooltip text */
|
|
40
|
+
tooltipText?: string;
|
|
41
|
+
/** Whether data is loading */
|
|
42
|
+
isLoadingData?: boolean;
|
|
43
|
+
/** Loading tip text */
|
|
44
|
+
loadingTip?: string;
|
|
45
|
+
/** Custom switcher icon */
|
|
46
|
+
switcherIcon?: React.ReactNode;
|
|
47
|
+
/** Additional CSS class name */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Expand all nodes by default */
|
|
50
|
+
defaultExpandAll?: boolean;
|
|
51
|
+
/** Callback when node is selected */
|
|
52
|
+
onSelect?: (selectedKey: string[]) => void;
|
|
53
|
+
/** Currently selected key */
|
|
54
|
+
selectedKey?: string[];
|
|
55
|
+
/** Message to show when tree data is empty */
|
|
56
|
+
emptyDataMessage?: string | React.ReactNode;
|
|
57
|
+
/** Placeholder text for search input */
|
|
58
|
+
searchPlaceholder?: string | React.ReactNode;
|
|
59
|
+
/** Whether to re-render tree on key change */
|
|
60
|
+
renderOnKeyChange?: boolean;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapPopoverTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBACf,SAAQ,IAAI,CACR,SAAS,EACT,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAC3E,EACD,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;IAC5D,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChE,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAC5C,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAC7C,8CAA8C;IAC9C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import './styles.scss';
|
|
4
|
+
export declare const CapTimelineCard: {
|
|
5
|
+
(props: any): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
propTypes: {
|
|
7
|
+
children: PropTypes.Requireable<any>;
|
|
8
|
+
className: PropTypes.Requireable<string>;
|
|
9
|
+
isSelected: PropTypes.Requireable<boolean>;
|
|
10
|
+
handleClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
milestoneHeader: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
12
|
+
milestoneDescription: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
13
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
14
|
+
configuringMessage: PropTypes.Requireable<string>;
|
|
15
|
+
notConfiguredMessage: PropTypes.Requireable<string>;
|
|
16
|
+
alwaysShowDescription: PropTypes.Requireable<boolean>;
|
|
17
|
+
complete: PropTypes.Requireable<boolean>;
|
|
18
|
+
configError: PropTypes.Requireable<boolean>;
|
|
19
|
+
defaultConfiguringMessage: PropTypes.Requireable<string>;
|
|
20
|
+
defaultNotConfiguredMessage: PropTypes.Requireable<string>;
|
|
21
|
+
toConfigure: PropTypes.Requireable<string>;
|
|
22
|
+
completePrevSteps: PropTypes.Requireable<string>;
|
|
23
|
+
paneKey: PropTypes.Requireable<any>;
|
|
24
|
+
isLastPane: PropTypes.Requireable<boolean>;
|
|
25
|
+
width: PropTypes.Requireable<number>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
declare const _default: React.ComponentType<Omit<any, "intl">>;
|
|
6
29
|
export default _default;
|
|
7
30
|
//# sourceMappingURL=CapTimelineCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapTimelineCard.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/CapTimelineCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CapTimelineCard.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/CapTimelineCard.tsx"],"names":[],"mappings":"AAOA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,eAAe,CAAC;AAMvB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;CA0K3B,CAAC;;AAwBF,wBAAsE"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Timeline } from "antd";
|
|
2
3
|
import classNames from "classnames";
|
|
3
|
-
import
|
|
4
|
+
import PropTypes from "prop-types";
|
|
4
5
|
import CapCard from "../CapCard/index.js";
|
|
6
|
+
import CapIcon from "../CapIcon/index.js";
|
|
5
7
|
import CapRow from "../CapRow/index.js";
|
|
6
8
|
import CapTooltip from "../CapTooltip/index.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
+
import LocaleHoc from "../LocaleHoc/index.js";
|
|
10
|
+
import * as styles__variables from "../styles/_variables.js";
|
|
11
|
+
import './styles.css';/* empty css */
|
|
12
|
+
const { FONT_SIZE_M, CAP_G04, CAP_RED } = styles__variables;
|
|
9
13
|
const clsPrefix = "cap-timeline-card-v1";
|
|
10
14
|
const CapTimelineCard = (props) => {
|
|
11
15
|
const {
|
|
16
|
+
className,
|
|
12
17
|
isSelected = false,
|
|
13
18
|
handleClick = () => {
|
|
14
19
|
},
|
|
@@ -20,58 +25,170 @@ const CapTimelineCard = (props) => {
|
|
|
20
25
|
alwaysShowDescription = false,
|
|
21
26
|
complete = false,
|
|
22
27
|
configError = false,
|
|
28
|
+
defaultConfiguringMessage,
|
|
23
29
|
paneKey,
|
|
30
|
+
isLastPane = false,
|
|
24
31
|
width = 380,
|
|
25
|
-
|
|
32
|
+
// texts from the translation file
|
|
33
|
+
defaultNotConfiguredMessage,
|
|
34
|
+
toConfigure,
|
|
35
|
+
completePrevSteps,
|
|
36
|
+
edited
|
|
26
37
|
} = props;
|
|
27
|
-
const defaultConfiguringMessage = formatMessage(messages.defaultConfiguringMessage);
|
|
28
|
-
const defaultNotConfiguredMessage = formatMessage(messages.defaultNotConfiguredMessage);
|
|
29
|
-
const toConfigure = formatMessage(messages.toConfigure);
|
|
30
|
-
const completePrevSteps = formatMessage(messages.completePrevSteps);
|
|
31
38
|
const getDescriptionForDisabled = () => {
|
|
32
|
-
if (alwaysShowDescription)
|
|
39
|
+
if (alwaysShowDescription) {
|
|
40
|
+
return milestoneDescription;
|
|
41
|
+
}
|
|
33
42
|
return notConfiguredMessage ? notConfiguredMessage : defaultNotConfiguredMessage;
|
|
34
43
|
};
|
|
35
44
|
const getDescriptionForEnabled = () => {
|
|
36
|
-
if (alwaysShowDescription)
|
|
45
|
+
if (alwaysShowDescription) {
|
|
46
|
+
return milestoneDescription;
|
|
47
|
+
}
|
|
37
48
|
return notConfiguredMessage ? configuringMessage : defaultConfiguringMessage;
|
|
38
49
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
const getTimelineIcon = () => {
|
|
51
|
+
if (configError) {
|
|
52
|
+
return /* @__PURE__ */ jsx(CapTooltip, { title: "Warning", children: /* @__PURE__ */ jsx(
|
|
53
|
+
CapIcon,
|
|
54
|
+
{
|
|
55
|
+
style: {
|
|
56
|
+
color: CAP_RED,
|
|
57
|
+
fontSize: FONT_SIZE_M
|
|
58
|
+
},
|
|
59
|
+
type: "warning",
|
|
60
|
+
size: "l"
|
|
61
|
+
}
|
|
62
|
+
) });
|
|
63
|
+
} else if (!complete || edited) {
|
|
64
|
+
return /* @__PURE__ */ jsx(CapTooltip, { title: "Pending", children: /* @__PURE__ */ jsx(
|
|
65
|
+
CapIcon,
|
|
66
|
+
{
|
|
67
|
+
style: {
|
|
68
|
+
color: CAP_G04,
|
|
69
|
+
fontSize: FONT_SIZE_M,
|
|
70
|
+
marginTop: "1px"
|
|
71
|
+
},
|
|
72
|
+
type: "exclamation-circle"
|
|
73
|
+
}
|
|
74
|
+
) });
|
|
75
|
+
}
|
|
76
|
+
return /* @__PURE__ */ jsx(CapTooltip, { title: "Completed", children: /* @__PURE__ */ jsx(CapRow, { className: classNames(`${clsPrefix}-icon-parent`), children: /* @__PURE__ */ jsx(CapIcon, { type: "check" }) }) });
|
|
77
|
+
};
|
|
78
|
+
return /* @__PURE__ */ jsxs(
|
|
79
|
+
CapRow,
|
|
58
80
|
{
|
|
59
|
-
style: { width },
|
|
60
81
|
className: classNames(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
configError && styles[`${clsPrefix}-warning-card`]
|
|
82
|
+
className,
|
|
83
|
+
"no-wrap",
|
|
84
|
+
!configError && `${clsPrefix}-division`,
|
|
85
|
+
configError && `${clsPrefix}-warning-division`
|
|
66
86
|
),
|
|
87
|
+
type: "flex",
|
|
88
|
+
align: "middle",
|
|
89
|
+
justify: "space-between",
|
|
67
90
|
children: [
|
|
68
|
-
|
|
69
|
-
|
|
91
|
+
disabled && /* @__PURE__ */ jsx(CapTooltip, { placement: "right", title: `${toConfigure} ${paneKey}, ${completePrevSteps}`, children: /* @__PURE__ */ jsx(
|
|
92
|
+
Timeline.Item,
|
|
93
|
+
{
|
|
94
|
+
dot: configError ? /* @__PURE__ */ jsx(
|
|
95
|
+
CapIcon,
|
|
96
|
+
{
|
|
97
|
+
style: {
|
|
98
|
+
color: CAP_RED,
|
|
99
|
+
fontSize: FONT_SIZE_M
|
|
100
|
+
},
|
|
101
|
+
type: "warning"
|
|
102
|
+
}
|
|
103
|
+
) : /* @__PURE__ */ jsx(
|
|
104
|
+
CapIcon,
|
|
105
|
+
{
|
|
106
|
+
style: {
|
|
107
|
+
color: CAP_G04,
|
|
108
|
+
fontSize: FONT_SIZE_M,
|
|
109
|
+
marginTop: "1px"
|
|
110
|
+
},
|
|
111
|
+
type: "exclamation-circle"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
className: classNames(
|
|
115
|
+
`${clsPrefix}-disabled-timeline-item`,
|
|
116
|
+
isLastPane && `${clsPrefix}-last-pane`
|
|
117
|
+
),
|
|
118
|
+
children: /* @__PURE__ */ jsx(CapRow, { className: classNames(`${clsPrefix}-disabled-card`), onClick: handleClick, children: /* @__PURE__ */ jsxs(
|
|
119
|
+
CapCard,
|
|
120
|
+
{
|
|
121
|
+
style: { width },
|
|
122
|
+
className: classNames(
|
|
123
|
+
`${clsPrefix}-card-body`,
|
|
124
|
+
`${clsPrefix}-incomplete-card`,
|
|
125
|
+
configError && `${clsPrefix}-warning-card`
|
|
126
|
+
),
|
|
127
|
+
children: [
|
|
128
|
+
milestoneHeader,
|
|
129
|
+
/* @__PURE__ */ jsx(CapRow, { className: classNames(`${clsPrefix}-card-description`), children: getDescriptionForDisabled() })
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
) })
|
|
133
|
+
}
|
|
134
|
+
) }),
|
|
135
|
+
!disabled && /* @__PURE__ */ jsx(
|
|
136
|
+
Timeline.Item,
|
|
137
|
+
{
|
|
138
|
+
dot: getTimelineIcon(),
|
|
139
|
+
className: classNames(
|
|
140
|
+
`${clsPrefix}-enabled-timeline-item`,
|
|
141
|
+
isLastPane && `${clsPrefix}-last-pane`,
|
|
142
|
+
complete && `${clsPrefix}-completed-tail`,
|
|
143
|
+
configError && `${clsPrefix}-warning-tail`,
|
|
144
|
+
configError && `${clsPrefix}-warning-card`,
|
|
145
|
+
complete && !isSelected && `${clsPrefix}-complete-head`
|
|
146
|
+
),
|
|
147
|
+
children: /* @__PURE__ */ jsx(CapRow, { onClick: handleClick, children: /* @__PURE__ */ jsxs(
|
|
148
|
+
CapCard,
|
|
149
|
+
{
|
|
150
|
+
style: { width },
|
|
151
|
+
className: classNames(
|
|
152
|
+
isSelected && `${clsPrefix}-pane-selected`,
|
|
153
|
+
`${clsPrefix}-enabled-card`,
|
|
154
|
+
`${clsPrefix}-card-body`,
|
|
155
|
+
!complete && `${clsPrefix}-incomplete-card`,
|
|
156
|
+
configError && `${clsPrefix}-warning-card`
|
|
157
|
+
),
|
|
158
|
+
children: [
|
|
159
|
+
milestoneHeader,
|
|
160
|
+
/* @__PURE__ */ jsx(CapRow, { className: classNames(`${clsPrefix}-card-description`), children: isSelected ? getDescriptionForEnabled() : milestoneDescription })
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
) })
|
|
164
|
+
}
|
|
165
|
+
)
|
|
70
166
|
]
|
|
71
167
|
}
|
|
72
|
-
)
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
CapTimelineCard.propTypes = {
|
|
171
|
+
children: PropTypes.any,
|
|
172
|
+
className: PropTypes.string,
|
|
173
|
+
isSelected: PropTypes.bool,
|
|
174
|
+
handleClick: PropTypes.func,
|
|
175
|
+
milestoneHeader: PropTypes.element,
|
|
176
|
+
milestoneDescription: PropTypes.element,
|
|
177
|
+
disabled: PropTypes.bool,
|
|
178
|
+
configuringMessage: PropTypes.string,
|
|
179
|
+
notConfiguredMessage: PropTypes.string,
|
|
180
|
+
alwaysShowDescription: PropTypes.bool,
|
|
181
|
+
complete: PropTypes.bool,
|
|
182
|
+
configError: PropTypes.bool,
|
|
183
|
+
defaultConfiguringMessage: PropTypes.string,
|
|
184
|
+
defaultNotConfiguredMessage: PropTypes.string,
|
|
185
|
+
toConfigure: PropTypes.string,
|
|
186
|
+
completePrevSteps: PropTypes.string,
|
|
187
|
+
paneKey: PropTypes.any,
|
|
188
|
+
isLastPane: PropTypes.bool,
|
|
189
|
+
width: PropTypes.number
|
|
73
190
|
};
|
|
74
|
-
const CapTimelineCard$1 =
|
|
191
|
+
const CapTimelineCard$1 = LocaleHoc(CapTimelineCard, { key: "CapTimelineCard" });
|
|
75
192
|
export {
|
|
76
193
|
CapTimelineCard,
|
|
77
194
|
CapTimelineCard$1 as default
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import './styles.scss';
|
|
4
|
+
export declare const CapTimelinePanesWrapper: {
|
|
5
|
+
({ className, isReviewScreen, activeTab, timelineLeftPaneContents, timelineRightCards, }: {
|
|
6
|
+
className: any;
|
|
7
|
+
isReviewScreen: any;
|
|
8
|
+
activeTab: any;
|
|
9
|
+
timelineLeftPaneContents: any;
|
|
10
|
+
timelineRightCards: any;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
propTypes: {
|
|
13
|
+
className: PropTypes.Requireable<string>;
|
|
14
|
+
isReviewScreen: PropTypes.Requireable<boolean>;
|
|
15
|
+
activeTab: PropTypes.Requireable<string>;
|
|
16
|
+
timelineLeftPaneContents: PropTypes.Requireable<object>;
|
|
17
|
+
timelineRightCards: PropTypes.Requireable<any[]>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare const _default: React.ComponentType<Omit<{
|
|
21
|
+
className: any;
|
|
22
|
+
isReviewScreen: any;
|
|
23
|
+
activeTab: any;
|
|
24
|
+
timelineLeftPaneContents: any;
|
|
25
|
+
timelineRightCards: any;
|
|
26
|
+
} & import("react-intl").WrappedComponentProps, "intl">>;
|
|
6
27
|
export default _default;
|
|
7
28
|
//# sourceMappingURL=CapTimelinePanesWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapTimelinePanesWrapper.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/CapTimelinePanesWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CapTimelinePanesWrapper.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/CapTimelinePanesWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,eAAe,CAAC;AAIvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAuCnC,CAAC;;;;;;;;AAUF,wBAEG"}
|
|
@@ -1,51 +1,47 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Timeline } from "antd-v5";
|
|
3
2
|
import classNames from "classnames";
|
|
4
|
-
import
|
|
3
|
+
import PropTypes from "prop-types";
|
|
5
4
|
import CapColumn from "../CapColumn/index.js";
|
|
6
5
|
import CapDivider from "../CapDivider/index.js";
|
|
7
6
|
import CapRow from "../CapRow/index.js";
|
|
8
|
-
import
|
|
7
|
+
import LocaleHoc from "../LocaleHoc/index.js";
|
|
8
|
+
import './styles.css';/* empty css */
|
|
9
9
|
const clsPrefix = "cap-timeline-panes-wrapper-v1";
|
|
10
10
|
const CapTimelinePanesWrapper = ({
|
|
11
11
|
className,
|
|
12
12
|
isReviewScreen,
|
|
13
13
|
activeTab,
|
|
14
14
|
timelineLeftPaneContents,
|
|
15
|
-
timelineRightCards
|
|
16
|
-
timelineClassName
|
|
15
|
+
timelineRightCards
|
|
17
16
|
}) => {
|
|
18
17
|
const renderActiveTabContent = () => {
|
|
19
18
|
return Object.keys(timelineLeftPaneContents).map((key, index) => {
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */ jsx(CapRow, { className: classNames(
|
|
19
|
+
const className2 = activeTab === key || isReviewScreen ? `${clsPrefix}-active-pane` : `${clsPrefix}-inactive-pane`;
|
|
20
|
+
return /* @__PURE__ */ jsx(CapRow, { className: classNames(className2), id: key, children: timelineLeftPaneContents[key] }, index);
|
|
22
21
|
});
|
|
23
22
|
};
|
|
24
|
-
return /* @__PURE__ */ jsxs(CapRow, { className: classNames(className,
|
|
23
|
+
return /* @__PURE__ */ jsxs(CapRow, { className: classNames(className, `${clsPrefix}-pane-wrapper`), children: [
|
|
24
|
+
/* @__PURE__ */ jsx(CapColumn, { className: classNames(`${clsPrefix}-left-pane-col`, `${clsPrefix}-custom-scroll`), children: timelineRightCards }),
|
|
25
|
+
/* @__PURE__ */ jsx(CapColumn, { className: classNames(`${clsPrefix}-divider-col`), children: /* @__PURE__ */ jsx(CapDivider, { className: `${clsPrefix}-timelinePane-divider`, type: "vertical" }) }),
|
|
25
26
|
/* @__PURE__ */ jsx(
|
|
26
27
|
CapColumn,
|
|
27
28
|
{
|
|
28
|
-
className: classNames(
|
|
29
|
-
styles[`${clsPrefix}-left-pane-col`],
|
|
30
|
-
styles[`${clsPrefix}-custom-scroll`]
|
|
31
|
-
),
|
|
32
|
-
children: /* @__PURE__ */ jsx(Timeline, { className: timelineClassName, children: timelineRightCards.map((item) => /* @__PURE__ */ jsx(Timeline.Item, { dot: item.icon, className: item.className, children: item.content }, item.key)) })
|
|
33
|
-
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ jsx(CapColumn, { className: classNames(styles[`${clsPrefix}-divider-col`]), children: /* @__PURE__ */ jsx(CapDivider, { className: styles[`${clsPrefix}-timelinePane-divider`], type: "vertical" }) }),
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
CapColumn,
|
|
38
|
-
{
|
|
39
|
-
className: classNames(
|
|
40
|
-
styles[`${clsPrefix}-right-pane-col`],
|
|
41
|
-
styles[`${clsPrefix}-custom-scroll`]
|
|
42
|
-
),
|
|
29
|
+
className: classNames(`${clsPrefix}-right-pane-col`, `${clsPrefix}-custom-scroll`),
|
|
43
30
|
children: renderActiveTabContent()
|
|
44
31
|
}
|
|
45
32
|
)
|
|
46
33
|
] });
|
|
47
34
|
};
|
|
48
|
-
|
|
35
|
+
CapTimelinePanesWrapper.propTypes = {
|
|
36
|
+
className: PropTypes.string,
|
|
37
|
+
isReviewScreen: PropTypes.bool,
|
|
38
|
+
activeTab: PropTypes.string,
|
|
39
|
+
timelineLeftPaneContents: PropTypes.object,
|
|
40
|
+
timelineRightCards: PropTypes.array
|
|
41
|
+
};
|
|
42
|
+
const CapTimelinePanesWrapper$1 = LocaleHoc(CapTimelinePanesWrapper, {
|
|
43
|
+
key: "CapTimelinePanesWrapper"
|
|
44
|
+
});
|
|
49
45
|
export {
|
|
50
46
|
CapTimelinePanesWrapper,
|
|
51
47
|
CapTimelinePanesWrapper$1 as default
|
package/CapTimeline/index.d.ts
CHANGED
|
@@ -3,7 +3,22 @@
|
|
|
3
3
|
* CapTimeline
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import './styles.scss';
|
|
8
|
+
declare const CapTimeline: {
|
|
9
|
+
({ className, timelinePanes, activeTab, isReviewScreen, width }: {
|
|
10
|
+
className: any;
|
|
11
|
+
timelinePanes: any;
|
|
12
|
+
activeTab: any;
|
|
13
|
+
isReviewScreen: any;
|
|
14
|
+
width: any;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
timelinePanes: PropTypes.Requireable<any[]>;
|
|
18
|
+
currentStep: PropTypes.Requireable<string>;
|
|
19
|
+
setCurrentStep: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
width: PropTypes.Requireable<number>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
8
23
|
export default CapTimeline;
|
|
9
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,OAAO,eAAe,CAAC;AAIvB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;CA6DhB,CAAC;AASF,eAAe,WAAW,CAAC"}
|
package/CapTimeline/index.js
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Timeline } from "antd";
|
|
2
3
|
import classNames from "classnames";
|
|
3
|
-
import
|
|
4
|
+
import PropTypes from "prop-types";
|
|
4
5
|
import CapRow from "../CapRow/index.js";
|
|
5
|
-
import CapTooltip from "../CapTooltip/index.js";
|
|
6
|
-
import * as styles__variables from "../styles/_variables.js";
|
|
7
6
|
import CapTimelineCard from "./CapTimelineCard.js";
|
|
8
7
|
import CapTimelinePanesWrapper from "./CapTimelinePanesWrapper.js";
|
|
9
|
-
import styles
|
|
10
|
-
const { FONT_SIZE_M, CAP_G04, CAP_RED } = styles__variables;
|
|
11
|
-
const clsCardPrefix = "cap-timeline-card-v1";
|
|
8
|
+
import './styles.css';/* empty css */
|
|
12
9
|
const clsPrefix = "cap-timeline-v1";
|
|
13
|
-
const CapTimeline = ({
|
|
14
|
-
className,
|
|
15
|
-
timelinePanes,
|
|
16
|
-
activeTab,
|
|
17
|
-
isReviewScreen,
|
|
18
|
-
width = 380
|
|
19
|
-
}) => {
|
|
10
|
+
const CapTimeline = ({ className, timelinePanes, activeTab, isReviewScreen, width }) => {
|
|
20
11
|
const { timelineLeftPaneContents, timelineRightCards } = timelinePanes.reduce(
|
|
21
12
|
(accumulator, {
|
|
22
13
|
milestoneHeader,
|
|
@@ -31,37 +22,10 @@ const CapTimeline = ({
|
|
|
31
22
|
content,
|
|
32
23
|
configError,
|
|
33
24
|
edited,
|
|
34
|
-
handleClick
|
|
35
|
-
}
|
|
25
|
+
handleClick
|
|
36
26
|
}, index) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
let icon;
|
|
40
|
-
if (disabled) {
|
|
41
|
-
icon = configError ? /* @__PURE__ */ jsx(CapIcon, { style: { color: CAP_RED, fontSize: FONT_SIZE_M }, type: "warning" }) : /* @__PURE__ */ jsx(
|
|
42
|
-
CapIcon,
|
|
43
|
-
{
|
|
44
|
-
style: { color: CAP_G04, fontSize: FONT_SIZE_M, marginTop: "1px" },
|
|
45
|
-
type: "exclamation-circle"
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
} else if (configError) {
|
|
49
|
-
icon = /* @__PURE__ */ jsx(CapTooltip, { title: "Warning", children: /* @__PURE__ */ jsx(CapIcon, { style: { color: CAP_RED, fontSize: FONT_SIZE_M }, type: "warning", size: "l" }) });
|
|
50
|
-
} else if (!complete || edited) {
|
|
51
|
-
icon = /* @__PURE__ */ jsx(CapTooltip, { title: "Pending", children: /* @__PURE__ */ jsx(
|
|
52
|
-
CapIcon,
|
|
53
|
-
{
|
|
54
|
-
style: { color: CAP_G04, fontSize: FONT_SIZE_M, marginTop: "1px" },
|
|
55
|
-
type: "exclamation-circle"
|
|
56
|
-
}
|
|
57
|
-
) });
|
|
58
|
-
} else {
|
|
59
|
-
icon = /* @__PURE__ */ jsx(CapTooltip, { title: "Completed", children: /* @__PURE__ */ jsx("span", { className: styles[`${clsCardPrefix}-icon-parent`], children: /* @__PURE__ */ jsx(CapIcon, { type: "check", style: { fontSize: FONT_SIZE_M } }) }) });
|
|
60
|
-
}
|
|
61
|
-
const item = {
|
|
62
|
-
key,
|
|
63
|
-
icon,
|
|
64
|
-
content: /* @__PURE__ */ jsx(
|
|
27
|
+
accumulator.timelineRightCards.push(
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
65
29
|
CapTimelineCard,
|
|
66
30
|
{
|
|
67
31
|
milestoneHeader,
|
|
@@ -73,23 +37,15 @@ const CapTimeline = ({
|
|
|
73
37
|
alwaysShowDescription,
|
|
74
38
|
complete,
|
|
75
39
|
configError,
|
|
40
|
+
isLastPane: index === (timelinePanes == null ? void 0 : timelinePanes.length) - 1 ? true : false,
|
|
41
|
+
width,
|
|
42
|
+
edited,
|
|
76
43
|
handleClick,
|
|
77
|
-
isSelected
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
className: classNames(
|
|
83
|
-
disabled ? styles[`${clsCardPrefix}-disabled-timeline-item`] : styles[`${clsCardPrefix}-enabled-timeline-item`],
|
|
84
|
-
isLastPane && styles[`${clsCardPrefix}-last-pane`],
|
|
85
|
-
!disabled && complete && styles[`${clsCardPrefix}-completed-tail`],
|
|
86
|
-
!disabled && configError && styles[`${clsCardPrefix}-warning-tail`],
|
|
87
|
-
!disabled && configError && styles[`${clsCardPrefix}-warning-card`],
|
|
88
|
-
!disabled && complete && !isSelected && styles[`${clsCardPrefix}-complete-head`],
|
|
89
|
-
!configError ? styles[`${clsCardPrefix}-division`] : styles[`${clsCardPrefix}-warning-division`]
|
|
44
|
+
isSelected: activeTab === key
|
|
45
|
+
},
|
|
46
|
+
key
|
|
90
47
|
)
|
|
91
|
-
|
|
92
|
-
accumulator.timelineRightCards.push(item);
|
|
48
|
+
);
|
|
93
49
|
accumulator.timelineLeftPaneContents[key] = content;
|
|
94
50
|
return accumulator;
|
|
95
51
|
},
|
|
@@ -98,16 +54,21 @@ const CapTimeline = ({
|
|
|
98
54
|
timelineRightCards: []
|
|
99
55
|
}
|
|
100
56
|
);
|
|
101
|
-
return /* @__PURE__ */ jsx(CapRow, { className, children: /* @__PURE__ */ jsx(
|
|
57
|
+
return /* @__PURE__ */ jsx(CapRow, { className, children: /* @__PURE__ */ jsx(Timeline, { className: classNames(`${clsPrefix}-body`), children: /* @__PURE__ */ jsx(
|
|
102
58
|
CapTimelinePanesWrapper,
|
|
103
59
|
{
|
|
104
60
|
activeTab,
|
|
105
61
|
timelineLeftPaneContents,
|
|
106
62
|
timelineRightCards,
|
|
107
|
-
isReviewScreen
|
|
108
|
-
timelineClassName: styles[`${clsPrefix}-body`]
|
|
63
|
+
isReviewScreen
|
|
109
64
|
}
|
|
110
|
-
) });
|
|
65
|
+
) }) });
|
|
66
|
+
};
|
|
67
|
+
CapTimeline.propTypes = {
|
|
68
|
+
timelinePanes: PropTypes.array,
|
|
69
|
+
currentStep: PropTypes.string,
|
|
70
|
+
setCurrentStep: PropTypes.func,
|
|
71
|
+
width: PropTypes.number
|
|
111
72
|
};
|
|
112
73
|
export {
|
|
113
74
|
CapTimeline as default
|