@capillarytech/blaze-ui 6.0.0 → 6.0.4

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 (271) hide show
  1. package/CapActionBar/styles.module.scss.js +1 -1
  2. package/CapAdvancedIcon/styles.module.scss.js +1 -1
  3. package/CapAlert/styles.module.scss.js +1 -1
  4. package/CapAppNotEnabled/styles.module.scss.js +1 -1
  5. package/CapAskAira/AudienceFilterBot/styles.module.scss.js +1 -1
  6. package/CapAskAira/CapAiMediaGeneration/styles.module.scss.js +1 -1
  7. package/CapAskAira/ConfigurationBot/PromptAttachmentButton.js +1 -1
  8. package/CapAskAira/ConfigurationBot/styles.module.scss.js +1 -1
  9. package/CapAskAira/ContentGenerationBot/styles.module.scss.js +1 -1
  10. package/CapAskAira/DocumentationBot/styles.module.scss.js +1 -1
  11. package/CapAskAira/DocumentationChatBot/styles.module.scss.js +1 -1
  12. package/CapAskAira/RuleGenerationBot/styles.module.scss.js +1 -1
  13. package/CapAskAira/RuleSummarizationBot/styles.module.scss.js +1 -1
  14. package/CapAskAira/styles.module.scss.js +1 -1
  15. package/CapBanner/styles.module.scss.js +1 -1
  16. package/CapBlock/styles.module.scss.js +1 -1
  17. package/CapButton/styles.module.scss.js +1 -1
  18. package/CapCSVFileUploader/styles.module.scss.js +1 -1
  19. package/CapCalendarDatePicker/styles.module.scss.js +1 -1
  20. package/CapCard/styles.module.scss.js +1 -1
  21. package/CapCardBox/styles.module.scss.js +1 -1
  22. package/CapCarousel/styles.module.scss.js +1 -1
  23. package/CapCheckbox/styles.module.scss.js +1 -1
  24. package/CapColorPicker/styles.module.scss.js +1 -1
  25. package/CapColoredTag/styles.module.scss.js +1 -1
  26. package/CapColumn/styles.module.scss.js +1 -1
  27. package/CapConditionPreview/styles.module.scss.js +1 -1
  28. package/CapCustomCard/styles.module.scss.js +1 -1
  29. package/CapCustomCarousel/styles.module.scss.js +1 -1
  30. package/CapCustomCheckboxList/styles.module.scss.js +1 -1
  31. package/CapCustomList/styles.module.scss.js +1 -1
  32. package/CapCustomSelect/styles.module.scss.js +1 -1
  33. package/CapDatePicker/styles.module.scss.js +1 -1
  34. package/CapDateRangePicker/styles.module.scss.js +1 -1
  35. package/CapDateTimePicker/styles.module.scss.js +1 -1
  36. package/CapDateTimeRangePicker/styles.module.scss.js +1 -1
  37. package/CapDnDGraph/reportingBlock.js +1 -1
  38. package/CapDropdown/styles.module.scss.js +1 -1
  39. package/CapEmptyDivWithBorder/styles.module.scss.js +1 -1
  40. package/CapError/styles.module.scss.js +1 -1
  41. package/CapErrorBoundary/styles.module.scss.js +1 -1
  42. package/CapErrorStateIllustration/styles.module.scss.js +1 -1
  43. package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.css +21 -0
  44. package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.module.scss.js +8 -0
  45. package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.scss +17 -0
  46. package/CapEventCalendar/CalendarCanvas/index.d.ts +3 -52
  47. package/CapEventCalendar/CalendarCanvas/index.d.ts.map +1 -1
  48. package/CapEventCalendar/CalendarCanvas/index.js +31 -50
  49. package/CapEventCalendar/CalendarCanvas/utils.d.ts +5 -9
  50. package/CapEventCalendar/CalendarCanvas/utils.d.ts.map +1 -1
  51. package/CapEventCalendar/CalendarCanvas/utils.js +6 -6
  52. package/CapEventCalendar/components/DayDropdown/index.d.ts +3 -13
  53. package/CapEventCalendar/components/DayDropdown/index.d.ts.map +1 -1
  54. package/CapEventCalendar/components/DayDropdown/index.js +32 -14
  55. package/CapEventCalendar/components/MonthHeader/index.d.ts +3 -9
  56. package/CapEventCalendar/components/MonthHeader/index.d.ts.map +1 -1
  57. package/CapEventCalendar/components/MonthHeader/index.js +4 -9
  58. package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.css +20 -0
  59. package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.module.scss.js +7 -0
  60. package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.scss +15 -0
  61. package/CapEventCalendar/drawUtils.d.ts +9 -71
  62. package/CapEventCalendar/drawUtils.d.ts.map +1 -1
  63. package/CapEventCalendar/drawUtils.js +12 -4
  64. package/CapEventCalendar/index.d.ts +4 -80
  65. package/CapEventCalendar/index.d.ts.map +1 -1
  66. package/CapEventCalendar/index.js +60 -85
  67. package/CapEventCalendar/messages.d.ts +25 -0
  68. package/CapEventCalendar/messages.d.ts.map +1 -0
  69. package/CapEventCalendar/messages.js +28 -0
  70. package/CapEventCalendar/styles.css +9 -81
  71. package/CapEventCalendar/styles.module.scss.js +12 -0
  72. package/CapEventCalendar/styles.scss +34 -107
  73. package/CapEventCalendar/tests/types.d.ts +26 -0
  74. package/CapEventCalendar/tests/types.d.ts.map +1 -0
  75. package/CapEventCalendar/types.d.ts +188 -0
  76. package/CapEventCalendar/types.d.ts.map +1 -0
  77. package/CapEventCalendar/types.js +1 -0
  78. package/CapEventCalendar/utils.d.ts +11 -9
  79. package/CapEventCalendar/utils.d.ts.map +1 -1
  80. package/CapEventCalendar/utils.js +10 -7
  81. package/CapExpressionEditor/styles.module.scss.js +1 -1
  82. package/CapForm/styles.module.scss.js +1 -1
  83. package/CapFormItem/styles.module.scss.js +1 -1
  84. package/CapGraph/styles.module.scss.js +1 -1
  85. package/CapHamburgerMenu/styles.module.scss.js +1 -1
  86. package/CapHeader/styles.module.scss.js +1 -1
  87. package/CapHeading/styles.module.scss.js +1 -1
  88. package/CapIcon/styles.module.scss.js +1 -1
  89. package/CapIllustration/styles.module.scss.js +1 -1
  90. package/CapImage/styles.module.scss.js +1 -1
  91. package/CapImportMFEComponent/styles.module.scss.js +1 -1
  92. package/CapInfoNote/styles.module.scss.js +1 -1
  93. package/CapInput/styles.module.scss.js +1 -1
  94. package/CapLabel/styles.module.scss.js +1 -1
  95. package/CapLanguageProvider/index.d.ts +0 -1
  96. package/CapLanguageProvider/index.d.ts.map +1 -1
  97. package/CapLanguageProvider/index.js +0 -3
  98. package/CapLevelGraphRenderer/styles.module.scss.js +1 -1
  99. package/CapLink/styles.module.scss.js +1 -1
  100. package/CapList/styles.module.scss.js +1 -1
  101. package/CapListLayout/styles.module.scss.js +1 -1
  102. package/CapLogin/styles.module.scss.js +1 -1
  103. package/CapMenu/styles.module.scss.js +1 -1
  104. package/CapModal/styles.module.scss.js +1 -1
  105. package/CapMultiSelect/styles.module.scss.js +1 -1
  106. package/CapMultiSelectDatePicker/styles.module.scss.js +1 -1
  107. package/CapNavigation/styles.module.scss.js +1 -1
  108. package/CapNotification/styles.module.scss.js +1 -1
  109. package/CapNotificationDropdown/styles.module.scss.js +1 -1
  110. package/CapPopover/styles.module.scss.js +1 -1
  111. package/CapProgress/styles.module.scss.js +1 -1
  112. package/CapRadio/styles.module.scss.js +1 -1
  113. package/CapRadioButton/styles.module.scss.js +1 -1
  114. package/CapRadioCard/styles.module.scss.js +1 -1
  115. package/CapRadioGroup/styles.module.scss.js +1 -1
  116. package/CapReorderComponent/styles.module.scss.js +1 -1
  117. package/CapRoadMap/styles.module.scss.js +1 -1
  118. package/CapRow/styles.module.scss.js +1 -1
  119. package/CapSKUUploader/styles.module.scss.js +1 -1
  120. package/CapSecondaryTopBar/styles.module.scss.js +1 -1
  121. package/CapSelect/styles.module.scss.js +1 -1
  122. package/CapSelectFilter/{styles.module.css → styles.css} +3 -3
  123. package/CapSelectFilter/styles.module.scss.js +1 -1
  124. package/CapSelectFilter/styles.scss +3 -3
  125. package/CapShape/styles.module.scss.js +1 -1
  126. package/CapSideBar/_menuSearch.module.scss.js +1 -1
  127. package/CapSideBar/styles.module.scss.js +1 -1
  128. package/CapSlideBox/styles.module.scss.js +1 -1
  129. package/CapSlider/styles.module.scss.js +1 -1
  130. package/CapSnackBar/styles.module.scss.js +1 -1
  131. package/CapSomethingWentWrong/styles.module.scss.js +1 -1
  132. package/CapSplit/styles.module.scss.js +1 -1
  133. package/CapStatisticCard/styles.module.scss.js +1 -1
  134. package/CapStatus/styles.module.scss.js +1 -1
  135. package/CapSteps/styles.module.scss.js +1 -1
  136. package/CapStepsAccordian/styles.module.scss.js +1 -1
  137. package/CapSupportVideosWrapper/index.js +1 -1
  138. package/CapSupportVideosWrapper/styles.module.scss.js +1 -1
  139. package/CapSwitch/styles.module.scss.js +1 -1
  140. package/CapTab/styles.module.scss.js +1 -1
  141. package/CapTabV3/styles.module.scss.js +1 -1
  142. package/CapTabV3/tests/CapTabV3.mockData.d.ts +26 -26
  143. package/CapTabV3/tests/CapTabV3.mockData.d.ts.map +1 -1
  144. package/CapTable/styles.module.scss.js +1 -1
  145. package/CapTag/styles.module.scss.js +1 -1
  146. package/CapTagDropdown/styles.module.scss.js +1 -1
  147. package/CapTimePicker/styles.module.scss.js +1 -1
  148. package/CapTooltip/styles.module.scss.js +1 -1
  149. package/CapTooltipWithInfo/styles.module.scss.js +1 -1
  150. package/CapTopBar/CapOrgSelect.module.scss.js +1 -1
  151. package/CapTopBar/styles.module.scss.js +1 -1
  152. package/CapTree/styles.module.scss.js +1 -1
  153. package/CapTreeSelect/styles.module.scss.js +1 -1
  154. package/CapUnifiedSelect/styles.module.scss.js +1 -1
  155. package/CapUploader/styles.module.scss.js +1 -1
  156. package/CapUserProfile/styles.module.scss.js +1 -1
  157. package/assets/HOCs/ComponentWithLabelHOC/styles.module.scss.js +1 -1
  158. package/index.d.ts +2 -0
  159. package/index.d.ts.map +1 -1
  160. package/index.js +223 -221
  161. package/package.json +1 -2
  162. package/utils/dayjs.d.ts +1 -0
  163. package/utils/dayjs.d.ts.map +1 -1
  164. package/utils/dayjs.js +1 -0
  165. /package/CapActionBar/{styles.module.css → styles.css} +0 -0
  166. /package/CapAdvancedIcon/{styles.module.css → styles.css} +0 -0
  167. /package/CapAlert/{styles.module.css → styles.css} +0 -0
  168. /package/CapAppNotEnabled/{styles.module.css → styles.css} +0 -0
  169. /package/CapAskAira/AudienceFilterBot/{styles.module.css → styles.css} +0 -0
  170. /package/CapAskAira/CapAiMediaGeneration/{styles.module.css → styles.css} +0 -0
  171. /package/CapAskAira/ConfigurationBot/{styles.module.css → styles.css} +0 -0
  172. /package/CapAskAira/ContentGenerationBot/{styles.module.css → styles.css} +0 -0
  173. /package/CapAskAira/DocumentationBot/{styles.module.css → styles.css} +0 -0
  174. /package/CapAskAira/DocumentationChatBot/{styles.module.css → styles.css} +0 -0
  175. /package/CapAskAira/RuleGenerationBot/{styles.module.css → styles.css} +0 -0
  176. /package/CapAskAira/RuleSummarizationBot/{styles.module.css → styles.css} +0 -0
  177. /package/CapAskAira/{styles.module.css → styles.css} +0 -0
  178. /package/CapBanner/{styles.module.css → styles.css} +0 -0
  179. /package/CapBlock/{styles.module.css → styles.css} +0 -0
  180. /package/CapButton/{styles.module.css → styles.css} +0 -0
  181. /package/CapCSVFileUploader/{styles.module.css → styles.css} +0 -0
  182. /package/CapCalendarDatePicker/{styles.module.css → styles.css} +0 -0
  183. /package/CapCard/{styles.module.css → styles.css} +0 -0
  184. /package/CapCardBox/{styles.module.css → styles.css} +0 -0
  185. /package/CapCarousel/{styles.module.css → styles.css} +0 -0
  186. /package/CapCheckbox/{styles.module.css → styles.css} +0 -0
  187. /package/CapColorPicker/{styles.module.css → styles.css} +0 -0
  188. /package/CapColoredTag/{styles.module.css → styles.css} +0 -0
  189. /package/CapColumn/{styles.module.css → styles.css} +0 -0
  190. /package/CapConditionPreview/{styles.module.css → styles.css} +0 -0
  191. /package/CapCustomCard/{styles.module.css → styles.css} +0 -0
  192. /package/CapCustomCarousel/{styles.module.css → styles.css} +0 -0
  193. /package/CapCustomCheckboxList/{styles.module.css → styles.css} +0 -0
  194. /package/CapCustomList/{styles.module.css → styles.css} +0 -0
  195. /package/CapCustomSelect/{styles.module.css → styles.css} +0 -0
  196. /package/CapDatePicker/{styles.module.css → styles.css} +0 -0
  197. /package/CapDateRangePicker/{styles.module.css → styles.css} +0 -0
  198. /package/CapDateTimePicker/{styles.module.css → styles.css} +0 -0
  199. /package/CapDateTimeRangePicker/{styles.module.css → styles.css} +0 -0
  200. /package/CapDropdown/{styles.module.css → styles.css} +0 -0
  201. /package/CapEmptyDivWithBorder/{styles.module.css → styles.css} +0 -0
  202. /package/CapError/{styles.module.css → styles.css} +0 -0
  203. /package/CapErrorBoundary/{styles.module.css → styles.css} +0 -0
  204. /package/CapErrorStateIllustration/{styles.module.css → styles.css} +0 -0
  205. /package/CapExpressionEditor/{styles.module.css → styles.css} +0 -0
  206. /package/CapForm/{styles.module.css → styles.css} +0 -0
  207. /package/CapFormItem/{styles.module.css → styles.css} +0 -0
  208. /package/CapGraph/{styles.module.css → styles.css} +0 -0
  209. /package/CapHamburgerMenu/{styles.module.css → styles.css} +0 -0
  210. /package/CapHeader/{styles.module.css → styles.css} +0 -0
  211. /package/CapHeading/{styles.module.css → styles.css} +0 -0
  212. /package/CapIcon/{styles.module.css → styles.css} +0 -0
  213. /package/CapIllustration/{styles.module.css → styles.css} +0 -0
  214. /package/CapImage/{styles.module.css → styles.css} +0 -0
  215. /package/CapImportMFEComponent/{styles.module.css → styles.css} +0 -0
  216. /package/CapInfoNote/{styles.module.css → styles.css} +0 -0
  217. /package/CapInput/{styles.module.css → styles.css} +0 -0
  218. /package/CapLabel/{styles.module.css → styles.css} +0 -0
  219. /package/CapLevelGraphRenderer/{styles.module.css → styles.css} +0 -0
  220. /package/CapLink/{styles.module.css → styles.css} +0 -0
  221. /package/CapList/{styles.module.css → styles.css} +0 -0
  222. /package/CapListLayout/{styles.module.css → styles.css} +0 -0
  223. /package/CapLogin/{styles.module.css → styles.css} +0 -0
  224. /package/CapModal/{styles.module.css → styles.css} +0 -0
  225. /package/CapMultiSelect/{styles.module.css → styles.css} +0 -0
  226. /package/CapMultiSelectDatePicker/{styles.module.css → styles.css} +0 -0
  227. /package/CapNavigation/{styles.module.css → styles.css} +0 -0
  228. /package/CapNotification/{styles.module.css → styles.css} +0 -0
  229. /package/CapNotificationDropdown/{styles.module.css → styles.css} +0 -0
  230. /package/CapPopover/{styles.module.css → styles.css} +0 -0
  231. /package/CapProgress/{styles.module.css → styles.css} +0 -0
  232. /package/CapRadio/{styles.module.css → styles.css} +0 -0
  233. /package/CapRadioButton/{styles.module.css → styles.css} +0 -0
  234. /package/CapRadioCard/{styles.module.css → styles.css} +0 -0
  235. /package/CapRadioGroup/{styles.module.css → styles.css} +0 -0
  236. /package/CapReorderComponent/{styles.module.css → styles.css} +0 -0
  237. /package/CapRoadMap/{styles.module.css → styles.css} +0 -0
  238. /package/CapRow/{styles.module.css → styles.css} +0 -0
  239. /package/CapSKUUploader/{styles.module.css → styles.css} +0 -0
  240. /package/CapSecondaryTopBar/{styles.module.css → styles.css} +0 -0
  241. /package/CapSelect/{styles.module.css → styles.css} +0 -0
  242. /package/CapShape/{styles.module.css → styles.css} +0 -0
  243. /package/CapSideBar/{_menuSearch.module.css → _menuSearch.css} +0 -0
  244. /package/CapSideBar/{styles.module.css → styles.css} +0 -0
  245. /package/CapSlideBox/{styles.module.css → styles.css} +0 -0
  246. /package/CapSlider/{styles.module.css → styles.css} +0 -0
  247. /package/CapSnackBar/{styles.module.css → styles.css} +0 -0
  248. /package/CapSomethingWentWrong/{styles.module.css → styles.css} +0 -0
  249. /package/CapSplit/{styles.module.css → styles.css} +0 -0
  250. /package/CapStatisticCard/{styles.module.css → styles.css} +0 -0
  251. /package/CapStatus/{styles.module.css → styles.css} +0 -0
  252. /package/CapSteps/{styles.module.css → styles.css} +0 -0
  253. /package/CapStepsAccordian/{styles.module.css → styles.css} +0 -0
  254. /package/CapSupportVideosWrapper/{styles.module.css → styles.css} +0 -0
  255. /package/CapSwitch/{styles.module.css → styles.css} +0 -0
  256. /package/CapTab/{styles.module.css → styles.css} +0 -0
  257. /package/CapTabV3/{styles.module.css → styles.css} +0 -0
  258. /package/CapTable/{styles.module.css → styles.css} +0 -0
  259. /package/CapTag/{styles.module.css → styles.css} +0 -0
  260. /package/CapTagDropdown/{styles.module.css → styles.css} +0 -0
  261. /package/CapTimePicker/{styles.module.css → styles.css} +0 -0
  262. /package/CapTooltip/{styles.module.css → styles.css} +0 -0
  263. /package/CapTooltipWithInfo/{styles.module.css → styles.css} +0 -0
  264. /package/CapTopBar/{CapOrgSelect.module.css → CapOrgSelect.css} +0 -0
  265. /package/CapTopBar/{styles.module.css → styles.css} +0 -0
  266. /package/CapTree/{styles.module.css → styles.css} +0 -0
  267. /package/CapTreeSelect/{styles.module.css → styles.css} +0 -0
  268. /package/CapUnifiedSelect/{styles.module.css → styles.css} +0 -0
  269. /package/CapUploader/{styles.module.css → styles.css} +0 -0
  270. /package/CapUserProfile/{styles.module.css → styles.css} +0 -0
  271. /package/assets/HOCs/ComponentWithLabelHOC/{styles.module.css → styles.css} +0 -0
@@ -0,0 +1,25 @@
1
+ export declare const scope = "app.commonUtils.capUiLibrary.CapEventCalendar";
2
+ declare const _default: {
3
+ calendarGridLineLabel: {
4
+ id: string;
5
+ defaultMessage: string;
6
+ };
7
+ emptyStateTitle: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ };
11
+ emptyStateDescription: {
12
+ id: string;
13
+ defaultMessage: string;
14
+ };
15
+ emptyStateButtonLabel: {
16
+ id: string;
17
+ defaultMessage: string;
18
+ };
19
+ todayLabel: {
20
+ id: string;
21
+ defaultMessage: string;
22
+ };
23
+ };
24
+ export default _default;
25
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapEventCalendar/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,kDAAkD,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAErE,wBAqBG"}
@@ -0,0 +1,28 @@
1
+ import { defineMessages } from "react-intl";
2
+ const scope = "app.commonUtils.capUiLibrary.CapEventCalendar";
3
+ const messages = defineMessages({
4
+ calendarGridLineLabel: {
5
+ id: `${scope}.calendarGridLineLabel`,
6
+ defaultMessage: "Calendar Grid Line"
7
+ },
8
+ emptyStateTitle: {
9
+ id: `${scope}.emptyStateTitle`,
10
+ defaultMessage: "You have no events for this quarter"
11
+ },
12
+ emptyStateDescription: {
13
+ id: `${scope}.emptyStateDescription`,
14
+ defaultMessage: "Please create an event to view it here"
15
+ },
16
+ emptyStateButtonLabel: {
17
+ id: `${scope}.emptyStateButtonLabel`,
18
+ defaultMessage: "Create Event"
19
+ },
20
+ todayLabel: {
21
+ id: `${scope}.todayLabel`,
22
+ defaultMessage: "Today"
23
+ }
24
+ });
25
+ export {
26
+ messages as default,
27
+ scope
28
+ };
@@ -7,7 +7,7 @@
7
7
  /* Transition */
8
8
  /* Timezones Footer */
9
9
  .event-calendar {
10
- height: 700px;
10
+ height: 50rem;
11
11
  }
12
12
  .event-calendar__header {
13
13
  display: flex;
@@ -19,94 +19,22 @@
19
19
  padding-top: 0.571rem;
20
20
  }
21
21
  .event-calendar__header__left .quarter-label {
22
- width: 152px;
22
+ width: fit-content;
23
23
  height: 1.428rem;
24
- margin: 2px 0 2px 0.571rem;
25
- font-size: 1.143rem;
26
- font-weight: 500;
27
- font-stretch: normal;
28
- font-style: normal;
29
- line-height: 1.25;
30
- letter-spacing: normal;
31
- color: #091e42;
24
+ margin: 0.142rem 0 0.142rem 0.571rem;
25
+ gap: 0.857rem;
32
26
  }
33
- .event-calendar__header__left .quarter-label span {
34
- margin-right: 10px;
27
+ .event-calendar__header__left .quarter-label__text {
28
+ font-size: 1.143rem;
35
29
  }
36
30
  .event-calendar__header__left .disable-left {
37
- color: grey;
31
+ color: #97a0af !important;
38
32
  cursor: not-allowed;
39
33
  pointer-events: none;
40
34
  }
41
35
  .event-calendar__header__left .carousel-icon {
42
36
  cursor: pointer;
43
37
  }
44
- .event-calendar__header__right .grid-label {
45
- width: 111px;
46
- height: 1.428rem;
47
- margin: 9px 0.571rem 11px 0;
48
- font-size: 1rem;
49
- font-weight: 500;
50
- font-stretch: normal;
51
- font-style: normal;
52
- line-height: 1.43;
53
- letter-spacing: normal;
54
- color: #091e42;
55
- }
56
- .event-calendar__header .ant-btn-flat {
57
- width: 140px !important;
58
- height: 2.857rem !important;
59
- margin: 0 0 0 0.571rem !important;
60
- padding: 0.571rem !important;
61
- border-radius: 0.285rem !important;
62
- border: solid 1px #b3bac5 !important;
63
- color: #091e42;
64
- font-weight: normal;
65
- }
66
- .event-calendar__header .ant-btn-flat .cap-button-v2-suffix {
67
- position: absolute;
68
- right: 0.571rem;
69
- }
70
- .event-calendar__header .flat-btn:hover {
71
- background-color: #ffffff !important;
72
- }
73
- .event-calendar__month-header {
74
- display: flex;
75
- justify-content: center;
76
- position: relative;
77
- text-align: center;
78
- top: 0;
79
- margin-bottom: 10px;
80
- margin-top: 25px;
81
- }
82
- .event-calendar__month-header__label {
83
- width: 33.33%;
84
- height: 1.428rem;
85
- text-align: center;
86
- color: #091e42;
87
- font-size: 1rem;
88
- font-weight: 500;
89
- font-stretch: normal;
90
- font-style: normal;
91
- line-height: 1.43;
92
- letter-spacing: normal;
93
- }
94
- .ant-dropdown-placement-bottomCenter .ant-dropdown-menu-item {
95
- height: 2.857rem !important;
96
- padding: 9px 0.571rem 11px 1.142rem !important;
97
- background-color: #ffffff !important;
98
- color: #091e42 !important;
99
- font-size: 1rem;
100
- }
101
- .ant-dropdown-placement-bottomCenter .ant-dropdown-menu-item:hover {
102
- background-color: #fefcf0 !important;
103
- }
104
- .ant-dropdown-placement-bottomCenter .ant-dropdown-menu-item-selected {
105
- background-color: #e9f0fe !important;
106
- border-left: 1px solid #2466ea !important;
107
- color: #091e42 !important;
108
- }
109
- .ant-dropdown-placement-bottomCenter .ant-dropdown-menu-vertical {
110
- width: 140px !important;
111
- margin-left: 35px !important;
38
+ .event-calendar__header__right {
39
+ gap: 0.857rem;
112
40
  }
@@ -0,0 +1,12 @@
1
+ import './styles.css';const styles = {
2
+ "event-calendar__header": "event-calendar__header",
3
+ "event-calendar__header__left": "event-calendar__header__left",
4
+ "quarter-label": "quarter-label",
5
+ "quarter-label__text": "quarter-label__text",
6
+ "disable-left": "disable-left",
7
+ "carousel-icon": "carousel-icon",
8
+ "event-calendar__header__right": "event-calendar__header__right"
9
+ };
10
+ export {
11
+ styles as default
12
+ };
@@ -1,114 +1,41 @@
1
+ @import '../styles/_variables.scss';
1
2
 
2
- @import "../styles/_variables.scss";
3
+ .event-calendar {
4
+ height: 50rem;
3
5
 
4
- .event-calendar{
5
- height: 700px;
6
- &__header{
7
- display: flex;
8
- position: relative;
9
- justify-content: space-between;
10
- &__left{
11
- display: flex;
12
- padding-top: $CAP_SPACE_08;
13
- .quarter-label{
14
- width: 152px;
15
- height: $CAP_SPACE_20;
16
- margin: 2px 0 2px $CAP_SPACE_08;
17
- font-size: $FONT_SIZE_L;
18
- font-weight: $FONT_WEIGHT_MEDIUM;
19
- font-stretch: normal;
20
- font-style: normal;
21
- line-height: 1.25;
22
- letter-spacing: normal;
23
- color: $FONT_COLOR_01;
24
- span{
25
- margin-right: 10px;
26
- }
27
- }
28
- .disable-left{
29
- color:grey;
30
- cursor: not-allowed;
31
- pointer-events: none;
32
- }
33
- .carousel-icon{
34
- cursor: pointer;
35
- }
36
- }
37
- &__right{
38
- .grid-label{
39
- width: 111px;
40
- height: $CAP_SPACE_20;
41
- margin: 9px $CAP_SPACE_08 11px 0;
42
- font-size: $FONT_SIZE_M;
43
- font-weight: $FONT_WEIGHT_MEDIUM;
44
- font-stretch: normal;
45
- font-style: normal;
46
- line-height: 1.43;
47
- letter-spacing: normal;
48
- color: $FONT_COLOR_01;
49
- }
50
- }
51
- .ant-btn-flat{
52
- width: 140px !important;
53
- height: $CAP_SPACE_40 !important;
54
- margin: 0 0 0 $CAP_SPACE_08 !important;
55
- padding: $CAP_SPACE_08 !important;
56
- border-radius: $CAP_SPACE_04 !important;
57
- border: solid 1px $CAP_G06 !important;
58
- color: $FONT_COLOR_01;
59
- font-weight: normal;
60
- .cap-button-v2-suffix{
61
- position: absolute;
62
- right: $CAP_SPACE_08;
63
- }
64
- }
65
- .flat-btn:hover{
66
- background-color: $CAP_WHITE!important;
67
- }
68
- }
69
- &__month-header{
70
- display: flex;
71
- justify-content: center;
72
- position: relative;
73
- text-align: center;
74
- top: 0;
75
- margin-bottom: 10px;
76
- margin-top: 25px;
77
- &__label{
78
- width: 33.33%;
79
- height: $CAP_SPACE_20;
80
- text-align: center;
81
- color: $FONT_COLOR_01;
82
- font-size:$FONT_SIZE_M ;
83
- font-weight: $FONT_WEIGHT_MEDIUM;
84
- font-stretch: normal;
85
- font-style: normal;
86
- line-height: 1.43;
87
- letter-spacing: normal;
6
+ &__header {
7
+ display: flex;
8
+ position: relative;
9
+ justify-content: space-between;
10
+
11
+ &__left {
12
+ display: flex;
13
+ padding-top: $CAP_SPACE_08;
14
+
15
+ .quarter-label {
16
+ width: fit-content;
17
+ height: $CAP_SPACE_20;
18
+ margin: 0.142rem 0 0.142rem $CAP_SPACE_08;
19
+ gap: $CAP_SPACE_12;
20
+
21
+ &__text {
22
+ font-size: $FONT_SIZE_L;
88
23
  }
89
- }
90
- }
24
+ }
91
25
 
92
- .ant-dropdown-placement-bottomCenter{
93
- .ant-dropdown-menu-item{
94
- height: $CAP_SPACE_40 !important;
95
- padding: 9px $CAP_SPACE_08 11px $CAP_SPACE_16 !important;
96
- background-color: $CAP_WHITE !important;
97
- color: $FONT_COLOR_01 !important;
98
- font-size: $FONT_SIZE_M;
99
- }
100
- .ant-dropdown-menu-item:hover{
101
- background-color: $BG_02 !important;
102
- }
103
- .ant-dropdown-menu-item-selected{
104
- background-color: $CAP_PALE_GREY !important;
105
- border-left: 1px solid $FONT_COLOR_05 !important;
106
- color: $FONT_COLOR_01 !important;
26
+ .disable-left {
27
+ color: $FONT_COLOR_03 !important;
28
+ cursor: not-allowed;
29
+ pointer-events: none;
30
+ }
31
+
32
+ .carousel-icon {
33
+ cursor: pointer;
34
+ }
107
35
  }
108
- .ant-dropdown-menu-vertical{
109
- width: 140px !important;
110
- margin-left: 35px !important;
36
+
37
+ &__right {
38
+ gap: $CAP_SPACE_12;
111
39
  }
40
+ }
112
41
  }
113
-
114
-
@@ -0,0 +1,26 @@
1
+ export type MockCanvasContext = {
2
+ beginPath: jest.Mock;
3
+ closePath: jest.Mock;
4
+ fillStyle: string;
5
+ strokeStyle: string;
6
+ textAlign: string;
7
+ measureText: jest.Mock<(text: string) => {
8
+ width: number;
9
+ actualBoundingBoxAscent?: number;
10
+ actualBoundingBoxDescent?: number;
11
+ }>;
12
+ fillRect: jest.Mock;
13
+ fillText: jest.Mock;
14
+ arc: jest.Mock;
15
+ fill: jest.Mock;
16
+ setLineDash: jest.Mock;
17
+ moveTo: jest.Mock;
18
+ lineTo: jest.Mock;
19
+ stroke: jest.Mock;
20
+ quadraticCurveTo: jest.Mock;
21
+ rect: jest.Mock;
22
+ isPointInPath: jest.Mock<() => boolean>;
23
+ font: string;
24
+ };
25
+ export declare const createMockContext: () => MockCanvasContext;
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/CapEventCalendar/tests/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,IAAI,CAAC,IAAI,CACpB,CAAC,IAAI,EAAE,MAAM,KAAK;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC,CACF,CAAC;IACF,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC;IACpB,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IAClB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IAClB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IAClB,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO,CAAC,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,eAAO,MAAM,iBAAiB,QAAO,iBAuBnC,CAAC"}
@@ -0,0 +1,188 @@
1
+ import type { PopoverProps } from 'antd-v5';
2
+ import type { Dayjs } from 'dayjs';
3
+ import React from 'react';
4
+ import type { MutableRefObject } from 'react';
5
+ import type { Root } from 'react-dom/client';
6
+ import { WrappedComponentProps } from 'react-intl';
7
+ export interface CapEventCalendarEvent {
8
+ event_id: string | number;
9
+ start: string;
10
+ end: string;
11
+ title: string;
12
+ backgroundColor: string;
13
+ popoverProps?: Record<string, unknown>;
14
+ }
15
+ export interface CapEventCalendarProps extends WrappedComponentProps {
16
+ calendarDate?: string;
17
+ events?: CapEventCalendarEvent[];
18
+ popoverContent?: React.ComponentType<Record<string, unknown>>;
19
+ onQuarterChange?: (quarterNum: number, date: Dayjs) => void;
20
+ selectedQuarter?: 'JFM' | 'AMJ' | 'JAS' | 'OND';
21
+ calendarGridLineLabel?: string;
22
+ dayLabels?: string[];
23
+ allQuartersLabel?: string[];
24
+ monthLabels?: string[];
25
+ todayTooltipProps?: Record<string, unknown>;
26
+ dashLineOffsetY?: number;
27
+ eventHeight?: number;
28
+ eventRowGap?: number;
29
+ textPadding?: number;
30
+ eventStartYOffset?: number;
31
+ minCanvasHeight?: number;
32
+ canvasFont?: string;
33
+ popoverPlacement?: PopoverProps['placement'];
34
+ emptyState?: boolean;
35
+ emptyStateTitle?: string;
36
+ emptyStateDescription?: string;
37
+ emptyStateButtonLabel?: string;
38
+ onEmptyStateButtonClick?: () => void;
39
+ isButtonDisabled?: boolean;
40
+ }
41
+ export interface MonthDisplayItem {
42
+ name: string;
43
+ start: string;
44
+ end: string;
45
+ daysInMonth: number;
46
+ month: number;
47
+ }
48
+ export interface FormattedEvent {
49
+ event_id: string | number;
50
+ start: string;
51
+ end: string;
52
+ title: string;
53
+ backgroundColor: string;
54
+ popoverProps?: Record<string, unknown>;
55
+ }
56
+ export interface CalendarCanvasProps {
57
+ displayMonths: MonthDisplayItem[];
58
+ dayGrid: number;
59
+ formattedEvents: FormattedEvent[][];
60
+ todayTooltipProps?: Record<string, unknown>;
61
+ dashLineOffsetY?: number;
62
+ eventHeight?: number;
63
+ eventRowGap?: number;
64
+ textPadding?: number;
65
+ eventStartYOffset?: number;
66
+ minCanvasHeight?: number;
67
+ canvasFont?: string;
68
+ popoverPlacement?: PopoverProps['placement'];
69
+ carouselDate: string;
70
+ popoverContent?: React.ComponentType<Record<string, unknown>>;
71
+ }
72
+ export interface DayDropdownProps {
73
+ fetchDay: (day: number) => void;
74
+ day: number;
75
+ dayLabels: string[];
76
+ }
77
+ export interface MonthHeaderProps {
78
+ displayMonths: MonthDisplayItem[];
79
+ }
80
+ export interface DayRectObject {
81
+ x: number;
82
+ y: number;
83
+ midX: number;
84
+ width: number;
85
+ height: number;
86
+ isCont?: boolean;
87
+ }
88
+ export interface DrawState {
89
+ day: Record<string, DayRectObject>;
90
+ }
91
+ export interface HoverEvent {
92
+ event: FormattedEvent;
93
+ startRect: DayRectObject;
94
+ endRect: DayRectObject;
95
+ eventStartY: number;
96
+ eventHeight: number;
97
+ isNewEvent: boolean;
98
+ }
99
+ export interface MouseCoords {
100
+ mouseX?: number;
101
+ mouseY?: number;
102
+ }
103
+ export interface ToggleTooltipArgs {
104
+ visible: unknown;
105
+ isTooltipVisible: MutableRefObject<boolean | null>;
106
+ todayTooltipProps: Record<string, unknown>;
107
+ rootTooltipRef: MutableRefObject<Root | null>;
108
+ }
109
+ export interface TogglePopoverArgs {
110
+ visible: boolean;
111
+ rootPopoverRef: MutableRefObject<Root | null>;
112
+ isPopoverVisible: MutableRefObject<boolean | null>;
113
+ popoverContent?: React.ComponentType<Record<string, unknown>>;
114
+ popoverPlacement?: PopoverProps['placement'];
115
+ popoverContentProps?: Record<string, unknown>;
116
+ }
117
+ export interface DrawHeadingTextParams {
118
+ context: CanvasRenderingContext2D;
119
+ x: number;
120
+ y: number;
121
+ height: number;
122
+ text: string;
123
+ }
124
+ export interface DrawCircleParams {
125
+ context: CanvasRenderingContext2D;
126
+ x: number;
127
+ y: number;
128
+ radius: number;
129
+ color: string;
130
+ }
131
+ export interface DrawDashedLinesParams {
132
+ context: CanvasRenderingContext2D;
133
+ x: number;
134
+ y: number;
135
+ x1: number;
136
+ y1: number;
137
+ }
138
+ export interface DrawTodayLineParams {
139
+ context: CanvasRenderingContext2D;
140
+ x: number;
141
+ y: number;
142
+ x1: number;
143
+ y1: number;
144
+ mouseX?: number;
145
+ mouseY?: number;
146
+ }
147
+ export interface DrawLineSeperatorParams {
148
+ context: CanvasRenderingContext2D;
149
+ x: number;
150
+ y: number;
151
+ x1: number;
152
+ y1: number;
153
+ }
154
+ export interface DrawRoundRectParams {
155
+ context: CanvasRenderingContext2D;
156
+ x: number;
157
+ y: number;
158
+ width: number;
159
+ height: number;
160
+ radius: number;
161
+ openLeft?: boolean;
162
+ openRight?: boolean;
163
+ fillStyle: string;
164
+ mouseX?: number;
165
+ mouseY?: number;
166
+ }
167
+ export interface DoEllipsisParams {
168
+ context: CanvasRenderingContext2D;
169
+ text: string;
170
+ maxWidth: number;
171
+ }
172
+ export interface DrawRoundRectWithTextParams {
173
+ context: CanvasRenderingContext2D;
174
+ x: number;
175
+ y: number;
176
+ width: number;
177
+ height: number;
178
+ bgColor: string;
179
+ borderRadius?: number;
180
+ text: string;
181
+ color: string;
182
+ textPadding: number;
183
+ openLeft?: boolean;
184
+ openRight?: boolean;
185
+ mouseX?: number;
186
+ mouseY?: number;
187
+ }
188
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 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;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1 @@
1
+
@@ -1,5 +1,7 @@
1
- export declare const getQuarterForDate: (date: any) => number;
2
- export declare const splitMonthsArrayToQuarterChunks: (monthLabels?: string[]) => any[];
1
+ import type { Dayjs } from 'dayjs';
2
+ import type { CapEventCalendarEvent, FormattedEvent, MonthDisplayItem } from './types';
3
+ export declare const getQuarterForDate: (date: string | Dayjs) => number;
4
+ export declare const splitMonthsArrayToQuarterChunks: (monthLabels?: string[]) => string[][];
3
5
  /**
4
6
  * The start and end of the months is calculated along with other information needed for month
5
7
  * This is being used for drawing the canvas via the displayMonths state value in CapEventCalendar
@@ -7,13 +9,13 @@ export declare const splitMonthsArrayToQuarterChunks: (monthLabels?: string[]) =
7
9
  * @param {*} monthNames this is for localization of month strings when displaying the month names in the header
8
10
  * @returns
9
11
  */
10
- export declare const getMonthsForQuarter: (quarter: any, monthNames: any) => any[];
12
+ export declare const getMonthsForQuarter: (quarter: number, monthNames: string[][]) => MonthDisplayItem[];
11
13
  /**
12
14
  * To display the dates in the header and caculate the rectangles to be drawn in the canvas
13
15
  * @param {*} date
14
16
  * @returns
15
17
  */
16
- export declare const getDaysOfMonth: (date: any) => string[];
18
+ export declare const getDaysOfMonth: (date: string | Dayjs) => string[];
17
19
  /**
18
20
  * Checks if the date lies between start and end or
19
21
  * if it is same as start date or end date
@@ -24,7 +26,7 @@ export declare const getDaysOfMonth: (date: any) => string[];
24
26
  * @param {*} end
25
27
  * @returns
26
28
  */
27
- export declare const checkIfDateIsInRange: (date: any, start: any, end: any) => boolean;
29
+ export declare const checkIfDateIsInRange: (date: string | Dayjs, start: string | Dayjs, end: string | Dayjs) => boolean;
28
30
  /**
29
31
  * This is to check if the given event spans a longer duration( quarter long or spans multiple quarter)
30
32
  * So as to create a new array for such events
@@ -32,7 +34,7 @@ export declare const checkIfDateIsInRange: (date: any, start: any, end: any) =>
32
34
  * @param {*} newEvent
33
35
  * @returns
34
36
  */
35
- export declare const isEventLong: (eventInRow: any, newEvent: any) => boolean;
37
+ export declare const isEventLong: (eventInRow: CapEventCalendarEvent | FormattedEvent, newEvent: CapEventCalendarEvent | FormattedEvent) => boolean;
36
38
  /**
37
39
  * In order to decide if events are to be displayed in new row, we follow rules
38
40
  * 1- event start and end dates should not be in-between/same of any existing event in the row
@@ -41,8 +43,8 @@ export declare const isEventLong: (eventInRow: any, newEvent: any) => boolean;
41
43
  * @param {Number} chosenQuarter
42
44
  * @returns
43
45
  */
44
- export declare const formatDataToSuitCanvas: (events: any) => any[];
45
- export declare const getFirstDateOfQuarter: (quarter: any, year: any) => string;
46
+ export declare const formatDataToSuitCanvas: (events: CapEventCalendarEvent[]) => FormattedEvent[][];
47
+ export declare const getFirstDateOfQuarter: (quarter: number, year: number) => string;
46
48
  /**
47
49
  * Check if the year needs to be incremented/decremented based on the following rules
48
50
  * For decrement:
@@ -59,5 +61,5 @@ export declare const getFirstDateOfQuarter: (quarter: any, year: any) => string;
59
61
  * @param {String} referenceDate
60
62
  * @returns
61
63
  */
62
- export declare const handleYearChange: (quarter: any, date: any, increment: any, referenceDate: any) => false | any[];
64
+ export declare const handleYearChange: (quarter: number, date: string, increment: boolean, referenceDate?: string) => [number, string, boolean?] | false;
63
65
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../components/CapEventCalendar/utils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,GAAI,SAAI,WAA0B,CAAC;AAEjE,eAAO,MAAM,+BAA+B,GAAI,sBAA0B,UAQzE,CAAC;AAEF;;;;;;GAMG;AACH,eA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