@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.
Files changed (109) hide show
  1. package/CapDateRangePicker/index.d.ts.map +1 -1
  2. package/CapDateRangePicker/index.js +5 -1
  3. package/CapDateRangePicker/styles.css +28 -0
  4. package/CapDateRangePicker/styles.module.scss.js +2 -1
  5. package/CapDateRangePicker/styles.scss +37 -0
  6. package/CapDateRangePicker/types.d.ts +5 -0
  7. package/CapDateRangePicker/types.d.ts.map +1 -1
  8. package/CapDragAndDrop/index.d.ts +19 -3
  9. package/CapDragAndDrop/index.d.ts.map +1 -1
  10. package/CapDragAndDrop/index.js +29 -24
  11. package/CapDragAndDrop/styles.css +15 -17
  12. package/CapDragAndDrop/styles.scss +16 -18
  13. package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts +7 -0
  14. package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts.map +1 -0
  15. package/CapMobileDateRangePicker/DateRangeInputSelectors.js +68 -0
  16. package/CapMobileDateRangePicker/ReactMobileDatePickerModule.d.ts.map +1 -1
  17. package/CapMobileDateRangePicker/ReactMobileDatePickerModule.js +2 -1
  18. package/CapMobileDateRangePicker/index.d.ts +5 -21
  19. package/CapMobileDateRangePicker/index.d.ts.map +1 -1
  20. package/CapMobileDateRangePicker/index.js +256 -309
  21. package/CapMobileDateRangePicker/messages.d.ts +17 -0
  22. package/CapMobileDateRangePicker/messages.d.ts.map +1 -0
  23. package/CapMobileDateRangePicker/messages.js +20 -0
  24. package/CapMobileDateRangePicker/styles.css +107 -144
  25. package/CapMobileDateRangePicker/styles.module.scss.js +21 -0
  26. package/CapMobileDateRangePicker/styles.scss +188 -192
  27. package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts +18 -0
  28. package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts.map +1 -0
  29. package/CapMobileDateRangePicker/types.d.ts +95 -0
  30. package/CapMobileDateRangePicker/types.d.ts.map +1 -0
  31. package/CapMobileDateRangePicker/utils.d.ts +3 -0
  32. package/CapMobileDateRangePicker/utils.d.ts.map +1 -0
  33. package/CapMobileDateRangePicker/utils.js +5 -0
  34. package/CapPopoverTree/index.d.ts +3 -40
  35. package/CapPopoverTree/index.d.ts.map +1 -1
  36. package/CapPopoverTree/index.js +72 -82
  37. package/CapPopoverTree/style.d.ts +5 -1
  38. package/CapPopoverTree/style.d.ts.map +1 -1
  39. package/CapPopoverTree/styles.css +119 -18
  40. package/CapPopoverTree/styles.module.scss.js +26 -0
  41. package/CapPopoverTree/styles.scss +179 -31
  42. package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts +22 -0
  43. package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts.map +1 -0
  44. package/CapPopoverTree/types.d.ts +62 -0
  45. package/CapPopoverTree/types.d.ts.map +1 -0
  46. package/CapTimeline/CapTimelineCard.d.ts +27 -4
  47. package/CapTimeline/CapTimelineCard.d.ts.map +1 -1
  48. package/CapTimeline/CapTimelineCard.js +157 -40
  49. package/CapTimeline/CapTimelinePanesWrapper.d.ts +25 -4
  50. package/CapTimeline/CapTimelinePanesWrapper.d.ts.map +1 -1
  51. package/CapTimeline/CapTimelinePanesWrapper.js +20 -24
  52. package/CapTimeline/index.d.ts +17 -2
  53. package/CapTimeline/index.d.ts.map +1 -1
  54. package/CapTimeline/index.js +23 -62
  55. package/CapTimeline/styles.css +40 -40
  56. package/CapTimeline/styles.scss +57 -76
  57. package/CapVirtualSelect/actions.d.ts +16 -0
  58. package/CapVirtualSelect/actions.d.ts.map +1 -0
  59. package/CapVirtualSelect/actions.js +21 -0
  60. package/CapVirtualSelect/constants.d.ts +13 -0
  61. package/CapVirtualSelect/constants.d.ts.map +1 -0
  62. package/CapVirtualSelect/constants.js +26 -0
  63. package/CapVirtualSelect/index.d.ts +169 -0
  64. package/CapVirtualSelect/index.d.ts.map +1 -0
  65. package/CapVirtualSelect/index.js +409 -0
  66. package/CapVirtualSelect/messages.d.ts +9 -0
  67. package/CapVirtualSelect/messages.d.ts.map +1 -0
  68. package/CapVirtualSelect/messages.js +12 -0
  69. package/CapVirtualSelect/reducer.d.ts +4 -0
  70. package/CapVirtualSelect/reducer.d.ts.map +1 -0
  71. package/CapVirtualSelect/reducer.js +63 -0
  72. package/CapVirtualSelect/saga.d.ts +40 -0
  73. package/CapVirtualSelect/saga.d.ts.map +1 -0
  74. package/CapVirtualSelect/saga.js +91 -0
  75. package/CapVirtualSelect/selectors.d.ts +28 -0
  76. package/CapVirtualSelect/selectors.d.ts.map +1 -0
  77. package/CapVirtualSelect/selectors.js +30 -0
  78. package/CapVirtualSelect/styles.css +110 -0
  79. package/CapVirtualSelect/styles.scss +106 -0
  80. package/CapVirtualSelect/tests/mockData.d.ts +7 -0
  81. package/CapVirtualSelect/tests/mockData.d.ts.map +1 -0
  82. package/CapVirtualSelect/utils.d.ts +2 -0
  83. package/CapVirtualSelect/utils.d.ts.map +1 -0
  84. package/CapVirtualSelect/utils.js +12 -0
  85. package/index.d.ts +2 -4
  86. package/index.d.ts.map +1 -1
  87. package/index.js +97 -99
  88. package/package.json +1 -1
  89. package/utils/dayjs.d.ts +29 -0
  90. package/utils/dayjs.d.ts.map +1 -1
  91. package/utils/dayjs.js +30 -0
  92. package/utils/getCapThemeConfig.d.ts.map +1 -1
  93. package/utils/getCapThemeConfig.js +1 -9
  94. package/CapDragAndDrop/messages.d.ts +0 -25
  95. package/CapDragAndDrop/messages.d.ts.map +0 -1
  96. package/CapDragAndDrop/messages.js +0 -28
  97. package/CapDragAndDrop/styles.module.scss.js +0 -21
  98. package/CapDragAndDrop/types.d.ts +0 -17
  99. package/CapDragAndDrop/types.d.ts.map +0 -1
  100. package/CapTimeline/messages.d.ts +0 -21
  101. package/CapTimeline/messages.d.ts.map +0 -1
  102. package/CapTimeline/messages.js +0 -24
  103. package/CapTimeline/styles.module.scss.js +0 -30
  104. package/CapTimeline/tests/CapTimeline.mockData.d.ts +0 -14
  105. package/CapTimeline/tests/CapTimeline.mockData.d.ts.map +0 -1
  106. package/CapTimeline/types.d.ts +0 -60
  107. package/CapTimeline/types.d.ts.map +0 -1
  108. /package/{CapDragAndDrop → CapMobileDateRangePicker}/types.js +0 -0
  109. /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 type { WrappedComponentProps } from 'react-intl';
3
- import type { CapTimelineCardProps } from './types';
4
- export declare const CapTimelineCard: (props: CapTimelineCardProps & WrappedComponentProps) => import("react/jsx-runtime").JSX.Element;
5
- declare const _default: React.ComponentType<Omit<CapTimelineCardProps & WrappedComponentProps, "intl">>;
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":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAQxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIpD,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,GAAG,qBAAqB,4CAyElF,CAAC;;AAEF,wBAA2C"}
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 { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Timeline } from "antd";
2
3
  import classNames from "classnames";
3
- import { injectIntl } from "react-intl";
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 messages from "./messages.js";
8
- import styles from "./styles.module.scss.js";
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
- intl: { formatMessage }
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) return milestoneDescription;
39
+ if (alwaysShowDescription) {
40
+ return milestoneDescription;
41
+ }
33
42
  return notConfiguredMessage ? notConfiguredMessage : defaultNotConfiguredMessage;
34
43
  };
35
44
  const getDescriptionForEnabled = () => {
36
- if (alwaysShowDescription) return milestoneDescription;
45
+ if (alwaysShowDescription) {
46
+ return milestoneDescription;
47
+ }
37
48
  return notConfiguredMessage ? configuringMessage : defaultConfiguringMessage;
38
49
  };
39
- if (disabled) {
40
- return /* @__PURE__ */ jsx(CapTooltip, { placement: "right", title: `${toConfigure} ${paneKey}, ${completePrevSteps}`, children: /* @__PURE__ */ jsx(CapRow, { className: styles[`${clsPrefix}-disabled-card`], onClick: handleClick, children: /* @__PURE__ */ jsxs(
41
- CapCard,
42
- {
43
- style: { width },
44
- className: classNames(
45
- styles[`${clsPrefix}-card-body`],
46
- styles[`${clsPrefix}-incomplete-card`],
47
- configError && styles[`${clsPrefix}-warning-card`]
48
- ),
49
- children: [
50
- milestoneHeader,
51
- /* @__PURE__ */ jsx(CapRow, { className: styles[`${clsPrefix}-card-description`], children: getDescriptionForDisabled() })
52
- ]
53
- }
54
- ) }) });
55
- }
56
- return /* @__PURE__ */ jsx(CapRow, { onClick: handleClick, children: /* @__PURE__ */ jsxs(
57
- CapCard,
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
- isSelected && styles[`${clsPrefix}-pane-selected`],
62
- styles[`${clsPrefix}-enabled-card`],
63
- styles[`${clsPrefix}-card-body`],
64
- !complete && styles[`${clsPrefix}-incomplete-card`],
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
- milestoneHeader,
69
- /* @__PURE__ */ jsx(CapRow, { className: styles[`${clsPrefix}-card-description`], children: isSelected ? getDescriptionForEnabled() : milestoneDescription })
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 = injectIntl(CapTimelineCard);
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 type { WrappedComponentProps } from 'react-intl';
3
- import type { CapTimelinePanesWrapperProps } from './types';
4
- export declare const CapTimelinePanesWrapper: ({ className, isReviewScreen, activeTab, timelineLeftPaneContents, timelineRightCards, timelineClassName, }: CapTimelinePanesWrapperProps & WrappedComponentProps) => import("react/jsx-runtime").JSX.Element;
5
- declare const _default: React.ComponentType<Omit<CapTimelinePanesWrapperProps & WrappedComponentProps, "intl">>;
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":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAOxD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAI5D,eAAO,MAAM,uBAAuB,GAAI,4GAOrC,4BAA4B,GAAG,qBAAqB,4CA+CtD,CAAC;;AAEF,wBAAmD"}
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 { injectIntl } from "react-intl";
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 styles from "./styles.module.scss.js";
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 paneClassName = activeTab === key || isReviewScreen ? styles[`${clsPrefix}-active-pane`] : styles[`${clsPrefix}-inactive-pane`];
21
- return /* @__PURE__ */ jsx(CapRow, { className: classNames(paneClassName), id: key, children: timelineLeftPaneContents[key] }, index);
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, styles[`${clsPrefix}-pane-wrapper`]), children: [
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
- const CapTimelinePanesWrapper$1 = injectIntl(CapTimelinePanesWrapper);
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
@@ -3,7 +3,22 @@
3
3
  * CapTimeline
4
4
  *
5
5
  */
6
- import type { CapTimelineProps } from './types';
7
- declare const CapTimeline: ({ className, timelinePanes, activeTab, isReviewScreen, width, }: CapTimelineProps) => import("react/jsx-runtime").JSX.Element;
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;AAaH,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,SAAS,CAAC;AAMlE,QAAA,MAAM,WAAW,GAAI,iEAMlB,gBAAgB,4CAoHlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
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"}
@@ -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 CapIcon from "../CapIcon/index.js";
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 from "./styles.module.scss.js";
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
- const isSelected = activeTab === key;
38
- const isLastPane = index === (timelinePanes == null ? void 0 : timelinePanes.length) - 1;
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
- isLastPane,
79
- width
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