@capillarytech/blaze-ui 6.3.0 → 6.4.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 (94) hide show
  1. package/CapDateRangePicker/index.d.ts.map +1 -1
  2. package/CapDateRangePicker/index.js +1 -5
  3. package/CapDateRangePicker/styles.css +0 -28
  4. package/CapDateRangePicker/styles.module.scss.js +1 -2
  5. package/CapDateRangePicker/styles.scss +0 -37
  6. package/CapDateRangePicker/types.d.ts +0 -5
  7. package/CapDateRangePicker/types.d.ts.map +1 -1
  8. package/CapDragAndDrop/index.d.ts +3 -19
  9. package/CapDragAndDrop/index.d.ts.map +1 -1
  10. package/CapDragAndDrop/index.js +24 -29
  11. package/CapDragAndDrop/messages.d.ts +25 -0
  12. package/CapDragAndDrop/messages.d.ts.map +1 -0
  13. package/CapDragAndDrop/messages.js +28 -0
  14. package/CapDragAndDrop/styles.css +17 -15
  15. package/CapDragAndDrop/styles.module.scss.js +21 -0
  16. package/CapDragAndDrop/styles.scss +18 -16
  17. package/CapDragAndDrop/types.d.ts +17 -0
  18. package/CapDragAndDrop/types.d.ts.map +1 -0
  19. package/CapMobileDateRangePicker/ReactMobileDatePickerModule.d.ts.map +1 -1
  20. package/CapMobileDateRangePicker/ReactMobileDatePickerModule.js +1 -2
  21. package/CapMobileDateRangePicker/index.d.ts +21 -5
  22. package/CapMobileDateRangePicker/index.d.ts.map +1 -1
  23. package/CapMobileDateRangePicker/index.js +309 -262
  24. package/CapMobileDateRangePicker/styles.css +144 -107
  25. package/CapMobileDateRangePicker/styles.scss +192 -188
  26. package/CapTimeline/CapTimelineCard.d.ts +4 -27
  27. package/CapTimeline/CapTimelineCard.d.ts.map +1 -1
  28. package/CapTimeline/CapTimelineCard.js +40 -157
  29. package/CapTimeline/CapTimelinePanesWrapper.d.ts +4 -25
  30. package/CapTimeline/CapTimelinePanesWrapper.d.ts.map +1 -1
  31. package/CapTimeline/CapTimelinePanesWrapper.js +24 -20
  32. package/CapTimeline/index.d.ts +2 -17
  33. package/CapTimeline/index.d.ts.map +1 -1
  34. package/CapTimeline/index.js +62 -23
  35. package/CapTimeline/messages.d.ts +21 -0
  36. package/CapTimeline/messages.d.ts.map +1 -0
  37. package/CapTimeline/messages.js +24 -0
  38. package/CapTimeline/styles.css +40 -40
  39. package/CapTimeline/styles.module.scss.js +30 -0
  40. package/CapTimeline/styles.scss +76 -57
  41. package/CapTimeline/tests/CapTimeline.mockData.d.ts +14 -0
  42. package/CapTimeline/tests/CapTimeline.mockData.d.ts.map +1 -0
  43. package/CapTimeline/types.d.ts +60 -0
  44. package/CapTimeline/types.d.ts.map +1 -0
  45. package/CapTimeline/types.js +1 -0
  46. package/index.d.ts +4 -2
  47. package/index.d.ts.map +1 -1
  48. package/index.js +99 -97
  49. package/package.json +1 -1
  50. package/utils/dayjs.d.ts +0 -29
  51. package/utils/dayjs.d.ts.map +1 -1
  52. package/utils/dayjs.js +0 -30
  53. package/utils/getCapThemeConfig.d.ts.map +1 -1
  54. package/utils/getCapThemeConfig.js +9 -1
  55. package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts +0 -7
  56. package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts.map +0 -1
  57. package/CapMobileDateRangePicker/DateRangeInputSelectors.js +0 -68
  58. package/CapMobileDateRangePicker/messages.d.ts +0 -17
  59. package/CapMobileDateRangePicker/messages.d.ts.map +0 -1
  60. package/CapMobileDateRangePicker/messages.js +0 -20
  61. package/CapMobileDateRangePicker/styles.module.scss.js +0 -21
  62. package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts +0 -18
  63. package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts.map +0 -1
  64. package/CapMobileDateRangePicker/types.d.ts +0 -95
  65. package/CapMobileDateRangePicker/types.d.ts.map +0 -1
  66. package/CapVirtualSelect/actions.d.ts +0 -16
  67. package/CapVirtualSelect/actions.d.ts.map +0 -1
  68. package/CapVirtualSelect/actions.js +0 -21
  69. package/CapVirtualSelect/constants.d.ts +0 -13
  70. package/CapVirtualSelect/constants.d.ts.map +0 -1
  71. package/CapVirtualSelect/constants.js +0 -26
  72. package/CapVirtualSelect/index.d.ts +0 -169
  73. package/CapVirtualSelect/index.d.ts.map +0 -1
  74. package/CapVirtualSelect/index.js +0 -409
  75. package/CapVirtualSelect/messages.d.ts +0 -9
  76. package/CapVirtualSelect/messages.d.ts.map +0 -1
  77. package/CapVirtualSelect/messages.js +0 -12
  78. package/CapVirtualSelect/reducer.d.ts +0 -4
  79. package/CapVirtualSelect/reducer.d.ts.map +0 -1
  80. package/CapVirtualSelect/reducer.js +0 -63
  81. package/CapVirtualSelect/saga.d.ts +0 -40
  82. package/CapVirtualSelect/saga.d.ts.map +0 -1
  83. package/CapVirtualSelect/saga.js +0 -91
  84. package/CapVirtualSelect/selectors.d.ts +0 -28
  85. package/CapVirtualSelect/selectors.d.ts.map +0 -1
  86. package/CapVirtualSelect/selectors.js +0 -30
  87. package/CapVirtualSelect/styles.css +0 -110
  88. package/CapVirtualSelect/styles.scss +0 -106
  89. package/CapVirtualSelect/tests/mockData.d.ts +0 -7
  90. package/CapVirtualSelect/tests/mockData.d.ts.map +0 -1
  91. package/CapVirtualSelect/utils.d.ts +0 -2
  92. package/CapVirtualSelect/utils.d.ts.map +0 -1
  93. package/CapVirtualSelect/utils.js +0 -12
  94. /package/{CapMobileDateRangePicker → CapDragAndDrop}/types.js +0 -0
@@ -1,221 +1,225 @@
1
- @import '../styles/_variables';
2
-
3
- $clsPrefix: 'cap-mobile-date-range-picker';
4
-
5
- $base-date-color: $cap-secondary-base;
6
- $base-date-color-range: $cap-pale-grey;
7
- $compare-date-color: $cap-pink;
8
- $compare-date-color-range: rgba($cap-pink, 0.1);
9
-
10
- @mixin cta-button {
11
- color: $FONT_COLOR_05 !important;
12
- cursor: pointer !important;
13
- font-size: $FONT_SIZE_M !important;
14
- }
15
-
16
- @mixin date-range-colors($color, $range-color) {
17
- .ant-picker-cell-range-start,
18
- .ant-picker-cell-range-end {
19
- .ant-picker-cell-inner {
20
- background-color: $color;
21
- }
22
-
23
- &::before {
24
- background-color: $range-color;
25
- }
26
- }
27
-
28
- .ant-picker-cell-in-range::before {
29
- background-color: $range-color;
30
- }
31
-
32
- .ant-picker-cell-today {
33
- .ant-picker-cell-inner::before {
34
- border-color: $color;
35
- }
36
- }
1
+ @mixin highlight-inputbox($color) {
2
+ border: 1px solid $color;
3
+ border-radius: 0.285rem;
4
+ height: 32px;
37
5
  }
38
-
39
- .#{$clsPrefix} {
40
- //modal overrides
41
- &-modal {
42
- &-header {
43
- margin-bottom: $CAP_SPACE_12 !important;
44
- }
45
-
46
- &-footer {
6
+ $modal-content-height: 38vh;
7
+ $daypicker-width: 80vw;
8
+ $base-date-color: rgb(36, 102, 234);
9
+ $base-date-color-range: rgb(233, 240, 254);
10
+ $compare-date-color: rgb(229, 31, 163);
11
+ $compare-date-color-range: rgba(229, 31, 163, 0.1);
12
+ .mobile-view{
13
+ .mobile-date-range-picker-modal{
14
+ .modal-footer {
47
15
  display: flex;
48
16
  justify-content: flex-end;
49
- width: inherit;
50
- padding: 1.714rem;
51
-
52
- &-cancel-button {
53
- @include cta-button;
54
-
55
- margin-right: $CAP_SPACE_24;
17
+ padding-right: 10px;
18
+ }
19
+ .ant-modal-content {
20
+ .ant-modal-body {
21
+ .cap-divider-v2 {
22
+ margin-top: 22px;
23
+ margin-bottom: 12px;
24
+ }
25
+ .compare-mobile-date-picker {
26
+ .datepicker {
27
+ .datepicker-wheel {
28
+ background: $compare-date-color-range;
29
+ }
30
+ .datepicker-scroll>li.selected {
31
+ color: $compare-date-color;
32
+ }
33
+ }
34
+ }
35
+ .datepicker {
36
+ position: static;
37
+ .datepicker-content {
38
+ background: #fff;
39
+ padding: 0.75em 0.25em;
40
+ }
41
+ .datepicker-viewport {
42
+ height: calc(#{$modal-content-height} - 12px);
43
+ }
44
+ .datepicker-scroll>li {
45
+ font-family: 'Roboto', sans-serif;
46
+ font-size: 14px;
47
+ }
48
+ .datepicker-scroll>li.selected {
49
+ color: $base-date-color;
50
+ }
51
+ .datepicker-wheel {
52
+ border-top: 0;
53
+ border-bottom: 0;
54
+ background: $base-date-color-range;
55
+ }
56
+ }
56
57
  }
57
-
58
- &-done-button {
59
- @include cta-button;
58
+ .ant-modal-footer {
59
+ padding-top: 1.714rem;
60
60
  }
61
61
  }
62
62
  }
63
-
64
- &-divider {
65
- margin: $CAP_SPACE_12 0;
66
- }
67
-
68
- //read-only inputs overrides
69
- &-inputs {
63
+ .mobile-dateRange-picker-inputs{
70
64
  display: flex;
71
65
  align-items: center;
72
-
73
- &-date-range-hyphen {
74
- margin-inline: $CAP_SPACE_08;
66
+ .cap-column-v2.ant-col-11 {
67
+ width: 45%;
75
68
  }
76
-
77
- &-date-range-hyphen-vertical-align {
78
- margin-top: 1rem;
69
+ .cap-column-v2.ant-col-2 {
70
+ width: 2%;
79
71
  }
80
-
81
- &-label {
82
- margin-bottom: $CAP_SPACE_04;
72
+ input{
73
+ margin-top: 5px;
74
+ max-width: 100px;
83
75
  }
84
-
85
- &-focused {
86
- :global {
87
- .ant-input {
88
- border: 1px solid $CAP_G01;
76
+ .focused .ant-input{
77
+ border: 1px solid #091e42;
78
+ }
79
+ .ant-input[disabled]{
80
+ background-color: transparent;
81
+ color: rgb(9, 30, 66);
82
+ -webkit-text-fill-color: rgb(9, 30, 66) !important;
83
+ }
84
+ .placeholder-text{
85
+ font-size: 12px;
86
+ color: rgb(94, 108, 132);
87
+ }
88
+ .date-range-hyphen{
89
+ margin-left: 10px;
90
+ margin-right: 10px;
91
+ }
92
+ .vertical-align{
93
+ margin-top: 28px;
94
+ }
95
+ .ant-input-affix-wrapper .ant-input:not(:last-child){
96
+ padding-right : 0;
97
+ }
98
+ }
99
+ .calender-only {
100
+ // height: $modal-content-height ;
101
+ margin-top: 8px;
102
+ .DayPicker_transitionContainer {
103
+ // height: $modal-content-height ;
104
+ max-width: $daypicker-width;
105
+ }
106
+ .DayPicker {
107
+ max-width: $daypicker-width;
108
+ }
109
+ .DateRangePicker {
110
+ .ant-select-dropdown.cap-select-v2-dropdown {
111
+ .ant-select-dropdown-menu {
112
+ li {
113
+ font-size: 14px;
114
+ padding: 4px 12px;
115
+ height: 36px;
116
+ line-height: 30px;
117
+ }
89
118
  }
90
119
  }
91
120
  }
92
-
93
- :global {
94
- .ant-input {
95
- font-size: $FONT_SIZE_S;
121
+ }
122
+ .DateRangePicker_picker {
123
+ .year-selector .cap-select-v2 .ant-select-selection {
124
+ height: 28px;
125
+ .ant-select-selection__rendered {
126
+ line-height: 26px;
127
+ }
128
+ .ant-select-selection-selected-value {
129
+ font-size: 14px;
96
130
  }
97
131
  }
98
132
  }
99
-
100
- //CTA links overrides
101
- &-reset-button {
102
- @include cta-button;
103
-
104
- margin-top: 1rem;
133
+ .calender-only.compare-mobile-date-range-picker .DateRangePicker_picker {
134
+ .CalendarDay__selected .calendar-day-content span {
135
+ background: $compare-date-color;
136
+ }
137
+ .CalendarDay__selected_span .calendar-day-content, .DateRangePicker_picker .CalendarDay__hovered_span .calendar-day-content {
138
+ background: $compare-date-color-range;
139
+ }
140
+ .CalendarDay__selected_start .calendar-day-content {
141
+ background: linear-gradient(90deg, #ffffff 50%, $compare-date-color-range 50%);
142
+ }
143
+ .CalendarDay__selected_end .calendar-day-content {
144
+ background: linear-gradient(90deg, $compare-date-color-range 50%, #ffffff 50%);
145
+ }
105
146
  }
106
-
107
- &-switch-label {
108
- @include cta-button;
109
-
147
+ .control-section{
148
+ .action-item{
149
+ padding-top: 8%;
150
+ margin-left: -6%;
151
+ width: 16%;
152
+ text-align: right;
153
+ }
154
+ .cap-column-v2.ant-col-11 {
155
+ width: 40%;
156
+ min-width: 100px;
157
+ }
158
+ .cap-column-v2.ant-col-2 {
159
+ width: 2%;
160
+ }
161
+ }
162
+ .toggle-text{
110
163
  text-align: right;
111
164
  margin: 0;
112
165
  }
113
-
114
- //calender-only overrides for date-range-picker
115
- &-calender-only {
116
- :global {
117
- .ant-picker-dropdown {
118
- position: static;
119
- width: 100%;
120
-
121
- .ant-picker-panel-container {
122
- border: none;
123
- box-shadow: none;
124
- background: transparent;
125
- width: inherit;
126
-
127
- .ant-picker-panel-layout {
128
- width: inherit;
129
-
130
- > div:first-of-type {
131
- width: inherit;
132
- }
133
-
134
- .ant-picker-panels {
135
- width: inherit;
136
-
137
- .ant-picker-panel {
138
- width: inherit;
139
-
140
- .ant-picker-date-panel {
141
- width: inherit;
142
-
143
- @include date-range-colors($base-date-color, $base-date-color-range);
144
- }
145
-
146
- .ant-picker-header-view {
147
- pointer-events: none;
148
- }
149
- }
150
- }
151
- }
152
- }
166
+ .DayPicker_weekHeader, .CalendarMonth {
167
+ padding: 0 6px !important;
168
+ }
169
+ .CalendarMonth {
170
+ .CalendarMonth_caption {
171
+ padding: 6px 0 10px;
172
+ line-height: 20px;
173
+ font-weight: 400;
174
+ font-size: 14px;
175
+ color: rgb(9, 30, 66);
176
+ .month-name {
177
+ padding-top: 3px;
178
+ }
179
+ .ant-select-lg {
180
+ width: 75px;
153
181
  }
154
182
  }
155
183
  }
156
-
157
- //scroller-datepicker overrides for react-mobile-datepicker
158
- &-scroller-datepicker {
159
- margin-top: $CAP_SPACE_16;
160
-
161
- :global {
162
- .datepicker {
163
- position: static;
164
- background: transparent;
165
-
166
- .datepicker-content {
167
- background: transparent;
168
- padding: 0.75em 0.25em;
169
- }
170
-
171
- .datepicker-scroll > li {
172
- font-family: $FONT_FAMILY;
173
- font-size: $FONT_SIZE_M;
174
- }
175
-
176
- .datepicker-scroll > li.selected {
177
- color: $base-date-color;
178
- }
179
-
180
- .datepicker-wheel {
181
- border-top: 0;
182
- border-bottom: 0;
183
- background: $base-date-color-range;
184
- }
185
- }
184
+ .DateRangePicker_picker {
185
+ left: -16px !important;
186
+ .calendar-day-content{
187
+ padding: 0 5px;
188
+ }
189
+ .DayPicker__withBorder{
190
+ box-shadow: none;
191
+ }
192
+ .month-nav-btn {
193
+ top: 6px;
194
+ margin-left: -2px;
195
+ margin-right: 14px;
196
+ }
197
+ .CalendarDay__selected_span .calendar-day-content, .DateRangePicker_picker .CalendarDay__hovered_span .calendar-day-content {
198
+ background: rgb(233, 240, 254),;
199
+ }
200
+ .CalendarDay__selected_start .calendar-day-content {
201
+ background: linear-gradient(90deg, #ffffff 50%, rgb(233, 240, 254), 50%);
202
+ }
203
+ .CalendarDay__selected_end .calendar-day-content {
204
+ background: linear-gradient(90deg, rgb(233, 240, 254), 50%, #ffffff 50%);
186
205
  }
187
206
  }
207
+ }
188
208
 
189
- //different color while comparing
190
- &-compare-mobile-date-picker {
191
- :global {
192
- .datepicker {
193
- .datepicker-scroll > li.selected {
194
- color: $compare-date-color;
195
- }
196
-
197
- .datepicker-wheel {
198
- background: $compare-date-color-range;
199
- }
200
- }
209
+ @media screen and (max-height: 930px) {
210
+ .calender-only {
211
+ height: 32vh !important;
212
+ .DayPicker_transitionContainer {
213
+ height: 32vh !important;
201
214
  }
202
215
  }
216
+ }
203
217
 
204
- &-compare-mobile-date-range-picker {
205
- :global {
206
- .ant-picker-dropdown {
207
- .ant-picker-panel-container {
208
- .ant-picker-panel-layout {
209
- .ant-picker-panels {
210
- .ant-picker-panel {
211
- .ant-picker-date-panel {
212
- @include date-range-colors($compare-date-color, $compare-date-color-range);
213
- }
214
- }
215
- }
216
- }
217
- }
218
- }
218
+ @media screen and (max-height: 854px) {
219
+ .calender-only {
220
+ height: 38.5vh !important;
221
+ .DayPicker_transitionContainer {
222
+ height: 38.5vh !important;
219
223
  }
220
224
  }
221
- }
225
+ }
@@ -1,30 +1,7 @@
1
- import PropTypes from 'prop-types';
2
1
  import React from 'react';
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">>;
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">>;
29
6
  export default _default;
30
7
  //# sourceMappingURL=CapTimelineCard.d.ts.map
@@ -1 +1 @@
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
+ {"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,19 +1,14 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Timeline } from "antd";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
3
2
  import classNames from "classnames";
4
- import PropTypes from "prop-types";
3
+ import { injectIntl } from "react-intl";
5
4
  import CapCard from "../CapCard/index.js";
6
- import CapIcon from "../CapIcon/index.js";
7
5
  import CapRow from "../CapRow/index.js";
8
6
  import CapTooltip from "../CapTooltip/index.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;
7
+ import messages from "./messages.js";
8
+ import styles from "./styles.module.scss.js";
13
9
  const clsPrefix = "cap-timeline-card-v1";
14
10
  const CapTimelineCard = (props) => {
15
11
  const {
16
- className,
17
12
  isSelected = false,
18
13
  handleClick = () => {
19
14
  },
@@ -25,170 +20,58 @@ const CapTimelineCard = (props) => {
25
20
  alwaysShowDescription = false,
26
21
  complete = false,
27
22
  configError = false,
28
- defaultConfiguringMessage,
29
23
  paneKey,
30
- isLastPane = false,
31
24
  width = 380,
32
- // texts from the translation file
33
- defaultNotConfiguredMessage,
34
- toConfigure,
35
- completePrevSteps,
36
- edited
25
+ intl: { formatMessage }
37
26
  } = 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);
38
31
  const getDescriptionForDisabled = () => {
39
- if (alwaysShowDescription) {
40
- return milestoneDescription;
41
- }
32
+ if (alwaysShowDescription) return milestoneDescription;
42
33
  return notConfiguredMessage ? notConfiguredMessage : defaultNotConfiguredMessage;
43
34
  };
44
35
  const getDescriptionForEnabled = () => {
45
- if (alwaysShowDescription) {
46
- return milestoneDescription;
47
- }
36
+ if (alwaysShowDescription) return milestoneDescription;
48
37
  return notConfiguredMessage ? configuringMessage : defaultConfiguringMessage;
49
38
  };
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,
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,
80
58
  {
59
+ style: { width },
81
60
  className: classNames(
82
- className,
83
- "no-wrap",
84
- !configError && `${clsPrefix}-division`,
85
- configError && `${clsPrefix}-warning-division`
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`]
86
66
  ),
87
- type: "flex",
88
- align: "middle",
89
- justify: "space-between",
90
67
  children: [
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
- )
68
+ milestoneHeader,
69
+ /* @__PURE__ */ jsx(CapRow, { className: styles[`${clsPrefix}-card-description`], children: isSelected ? getDescriptionForEnabled() : milestoneDescription })
166
70
  ]
167
71
  }
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
72
+ ) });
190
73
  };
191
- const CapTimelineCard$1 = LocaleHoc(CapTimelineCard, { key: "CapTimelineCard" });
74
+ const CapTimelineCard$1 = injectIntl(CapTimelineCard);
192
75
  export {
193
76
  CapTimelineCard,
194
77
  CapTimelineCard$1 as default