@ironsource/shared-ui 2.1.12-rc.3 → 2.1.12-rc.31

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 (280) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_adb49e50_lang.css +1 -0
  2. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
  3. package/ButtonV4.vue_vue_type_style_index_0_scoped_852be7ec_lang.css +1 -0
  4. package/Chart.vue_vue_type_style_index_0_scoped_fa533a3d_lang.css +1 -0
  5. package/ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css +1 -0
  6. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +1 -0
  7. package/ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css +1 -0
  8. package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +1 -0
  9. package/ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css +1 -0
  10. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_38354f10_lang.css +1 -0
  11. package/ColumnPicker.vue_vue_type_style_index_0_scoped_ea8c7024_lang.css +1 -0
  12. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +1 -0
  13. package/DataGrid.vue_vue_type_style_index_0_scoped_8e8df067_lang.css +1 -0
  14. package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
  15. package/DialogFooter.vue_vue_type_style_index_0_scoped_8b7f64fe_lang.css +1 -0
  16. package/DialogHeader.vue_vue_type_style_index_0_scoped_9a814ec3_lang.css +1 -0
  17. package/DialogV4.vue_vue_type_style_index_0_scoped_cc99f1e3_lang.css +1 -0
  18. package/DropdownV4.vue_vue_type_style_index_0_scoped_55dd36a7_lang.css +1 -0
  19. package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
  20. package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
  21. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
  22. package/Link.vue_vue_type_style_index_0_scoped_ad98fe7b_lang.css +1 -0
  23. package/OptionChip.vue_vue_type_style_index_0_scoped_538e4a21_lang.css +1 -0
  24. package/OptionV4.vue_vue_type_style_index_0_scoped_752a357d_lang.css +1 -0
  25. package/RemoveButton.vue_vue_type_style_index_0_scoped_ca7fc11d_lang.css +1 -0
  26. package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
  27. package/SortableItem.vue_vue_type_style_index_0_scoped_800cd503_lang.css +1 -0
  28. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_a534c7af_lang.css +1 -0
  29. package/SortableList.vue_vue_type_style_index_0_scoped_84dc8525_lang.css +1 -0
  30. package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
  31. package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
  32. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_2076b5ab_lang.css +1 -0
  33. package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
  34. package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
  35. package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +1 -0
  36. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  37. package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
  38. package/components/appIcon/index.d.ts +3 -3
  39. package/components/banner/Banner.vue.d.ts +3 -3
  40. package/components/banner/index.d.ts +7 -7
  41. package/components/button/common/consts.d.ts +1 -0
  42. package/components/button/v3/Button.vue.d.ts +3 -3
  43. package/components/button/v3/ButtonBase.vue.d.ts +3 -3
  44. package/components/button/v3/IconButton.vue.d.ts +3 -3
  45. package/components/button/v3/index.d.ts +14 -14
  46. package/components/button/v4/ButtonV4.vue.d.ts +5 -3
  47. package/components/button/v4/ButtonV4.vue.js +4 -4
  48. package/components/button/v4/ButtonV4.vue2.js +28 -27
  49. package/components/button/v4/ToggleButtonGroupAB.vue.js +3 -3
  50. package/components/button/v4/ToggleButtonGroupAB.vue2.js +40 -44
  51. package/components/chart/Chart.vue.d.ts +158 -37
  52. package/components/chart/Chart.vue.js +2 -2
  53. package/components/chart/Chart.vue2.js +150 -297
  54. package/components/chart/ChartHeader.vue.d.ts +50 -11
  55. package/components/chart/ChartHeader.vue.js +3 -3
  56. package/components/chart/ChartHeader.vue2.js +73 -54
  57. package/components/chart/ChartHeaderTrend.vue.d.ts +48 -0
  58. package/components/chart/ChartHeaderTrend.vue.js +7 -0
  59. package/components/chart/ChartHeaderTrend.vue2.js +96 -0
  60. package/components/chart/ChartLegend.vue.d.ts +24 -0
  61. package/components/chart/ChartLegend.vue.js +3 -3
  62. package/components/chart/ChartLegend.vue2.js +82 -63
  63. package/components/chart/ChartPlane.vue.d.ts +226 -0
  64. package/components/chart/ChartPlane.vue.js +7 -0
  65. package/components/chart/ChartPlane.vue2.js +370 -0
  66. package/components/chart/ChartStoryArgs.d.ts +184 -0
  67. package/components/chart/ChartTooltip.vue.d.ts +22 -2
  68. package/components/chart/ChartTooltip.vue.js +2 -2
  69. package/components/chart/ChartTooltip.vue2.js +50 -55
  70. package/components/chart/LegendSorting.vue.d.ts +37 -0
  71. package/components/chart/LegendSorting.vue.js +45 -0
  72. package/components/chart/LegendSorting.vue2.js +4 -0
  73. package/components/chart/SettingsHeader.vue.d.ts +1 -0
  74. package/components/chart/SettingsHeader.vue.js +3 -3
  75. package/components/chart/SettingsHeader.vue2.js +17 -16
  76. package/components/chart/SubHeader.vue.d.ts +52 -0
  77. package/components/chart/SubHeader.vue.js +7 -0
  78. package/components/chart/SubHeader.vue2.js +61 -0
  79. package/components/chart/TooltipHeader.vue.d.ts +50 -0
  80. package/components/chart/TooltipHeader.vue.js +7 -0
  81. package/components/chart/TooltipHeader.vue2.js +69 -0
  82. package/components/chart/colorPalette.d.ts +5 -0
  83. package/components/chart/colorPalette.js +68 -0
  84. package/components/chart/composables/useChartHeight.d.ts +5 -0
  85. package/components/chart/composables/useChartHeight.js +24 -0
  86. package/components/chart/composables/useColorsMap.d.ts +12 -0
  87. package/components/chart/composables/useColorsMap.js +48 -0
  88. package/components/chart/composables/useTooltipPosition.d.ts +1 -1
  89. package/components/chart/composables/useTooltipPosition.js +11 -15
  90. package/components/chart/consts.d.ts +29 -7
  91. package/components/chart/consts.js +41 -21
  92. package/components/chart/index.d.ts +554 -119
  93. package/components/chart/mockData.d.ts +44 -5
  94. package/components/chart/types.d.ts +38 -6
  95. package/components/chart/types.js +5 -2
  96. package/components/chart/utils/formatNumber.d.ts +0 -1
  97. package/components/chart/utils/highlightUtils.d.ts +3 -0
  98. package/components/chart/utils/highlightUtils.js +18 -0
  99. package/components/chart/utils/utils.d.ts +3 -3
  100. package/components/chart/utils/utils.js +19 -10
  101. package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
  102. package/components/checkbox/v3/index.d.ts +7 -7
  103. package/components/columnPicker/ColumnPicker.vue.d.ts +119 -0
  104. package/components/columnPicker/ColumnPicker.vue.js +7 -0
  105. package/components/columnPicker/ColumnPicker.vue2.js +322 -0
  106. package/components/columnPicker/OptionChip.vue.d.ts +53 -0
  107. package/components/columnPicker/OptionChip.vue.js +7 -0
  108. package/components/columnPicker/OptionChip.vue2.js +46 -0
  109. package/components/columnPicker/RemoveButton.vue.d.ts +38 -0
  110. package/components/columnPicker/RemoveButton.vue.js +7 -0
  111. package/components/columnPicker/RemoveButton.vue2.js +35 -0
  112. package/components/columnPicker/index.d.ts +388 -0
  113. package/components/columnPicker/index.js +6 -0
  114. package/components/columnPicker/mockData.d.ts +8 -0
  115. package/components/dateRange/common/DateRange.common.js +81 -75
  116. package/components/dateRange/common/DateServices.common.d.ts +7 -1
  117. package/components/dateRange/common/DateServices.common.js +88 -92
  118. package/components/dateRange/common/consts.common.d.ts +5 -0
  119. package/components/dateRange/common/consts.common.js +9 -3
  120. package/components/dateRange/v3/DateRange.vue.d.ts +3 -3
  121. package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
  122. package/components/dateRange/v3/index.d.ts +7 -7
  123. package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
  124. package/components/dateRange/v4/DateRangeV4.vue.d.ts +3 -3
  125. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  126. package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
  127. package/components/dateRange/v4/index.d.ts +7 -7
  128. package/components/dialog/v3/Dialog.vue.d.ts +3 -3
  129. package/components/dialog/v3/index.d.ts +46 -46
  130. package/components/dialog/v4/DialogFooter.vue.d.ts +78 -0
  131. package/components/dialog/v4/DialogFooter.vue.js +7 -0
  132. package/components/dialog/v4/DialogFooter.vue2.js +60 -0
  133. package/components/dialog/v4/DialogHeader.vue.d.ts +60 -0
  134. package/components/dialog/v4/DialogHeader.vue.js +7 -0
  135. package/components/dialog/v4/DialogHeader.vue2.js +58 -0
  136. package/components/dialog/v4/DialogV4.vue.d.ts +13 -12
  137. package/components/dialog/v4/DialogV4.vue.js +4 -4
  138. package/components/dialog/v4/DialogV4.vue2.js +65 -107
  139. package/components/dialog/v4/index.d.ts +164 -164
  140. package/components/dropdown/common/Dropdown.common.d.ts +1 -0
  141. package/components/dropdown/common/Dropdown.common.js +172 -160
  142. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  143. package/components/dropdown/v3/index.d.ts +20 -20
  144. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -0
  145. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
  146. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +16 -13
  147. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  148. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +1 -1
  149. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +5 -0
  150. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  151. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +64 -54
  152. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +22 -9
  153. package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
  154. package/components/dropdown/v4/ConditionalDropdown.vue2.js +151 -129
  155. package/components/dropdown/v4/DropdownV4.vue.d.ts +34 -1
  156. package/components/dropdown/v4/DropdownV4.vue.js +2 -2
  157. package/components/dropdown/v4/DropdownV4.vue2.js +241 -189
  158. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
  159. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
  160. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
  161. package/components/dropdown/v4/OptionV4.vue.d.ts +23 -5
  162. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  163. package/components/dropdown/v4/OptionV4.vue2.js +162 -117
  164. package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
  165. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  166. package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
  167. package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
  168. package/components/dropdown/v4/index.d.ts +701 -162
  169. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
  170. package/components/emptyState/v4/index.d.ts +7 -7
  171. package/components/forms/FormRow.vue.d.ts +9 -2
  172. package/components/forms/FormRow.vue.js +3 -3
  173. package/components/forms/FormRow.vue2.js +25 -14
  174. package/components/forms/index.d.ts +25 -5
  175. package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
  176. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
  177. package/components/includeExclude/index.d.ts +40 -40
  178. package/components/link/Link.vue.d.ts +70 -0
  179. package/components/link/Link.vue.js +7 -0
  180. package/components/link/Link.vue2.js +43 -0
  181. package/components/link/index.d.ts +201 -0
  182. package/components/link/index.js +6 -0
  183. package/components/search/v3/index.d.ts +3 -3
  184. package/components/shared/FieldLabel.vue.d.ts +19 -7
  185. package/components/shared/FieldLabel.vue.js +3 -3
  186. package/components/shared/FieldLabel.vue2.js +50 -37
  187. package/components/sortableList/SortableItem.vue.d.ts +17 -2
  188. package/components/sortableList/SortableItem.vue.js +3 -3
  189. package/components/sortableList/SortableItem.vue2.js +86 -70
  190. package/components/sortableList/SortableItemLabel.vue.js +3 -3
  191. package/components/sortableList/SortableItemLabel.vue2.js +26 -23
  192. package/components/sortableList/SortableList.types.d.ts +1 -0
  193. package/components/sortableList/SortableList.vue.d.ts +10 -0
  194. package/components/sortableList/SortableList.vue.js +3 -3
  195. package/components/sortableList/SortableList.vue2.js +104 -96
  196. package/components/sortableList/composables/useHoverEffect.js +1 -1
  197. package/components/sortableList/index.d.ts +39 -1
  198. package/components/switch/v4/SwitchV4.vue.d.ts +16 -0
  199. package/components/switch/v4/SwitchV4.vue.js +3 -3
  200. package/components/switch/v4/SwitchV4.vue2.js +39 -24
  201. package/components/switch/v4/index.d.ts +29 -0
  202. package/components/table/common/Table.common.d.ts +0 -1
  203. package/components/table/common/Table.common.js +38 -39
  204. package/components/table/common/Table.types.d.ts +2 -0
  205. package/components/table/common/consts.d.ts +1 -0
  206. package/components/table/common/consts.js +2 -1
  207. package/components/table/v4/DataGrid.vue.d.ts +15 -4
  208. package/components/table/v4/DataGrid.vue.js +4 -4
  209. package/components/table/v4/DataGrid.vue2.js +288 -230
  210. package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
  211. package/components/table/v4/index.d.ts +50 -15
  212. package/components/table/v4/storyUtils.d.ts +19 -0
  213. package/components/tabs/v3/Tabs.vue.d.ts +3 -3
  214. package/components/tabs/v3/index.d.ts +7 -7
  215. package/components/tooltip/common/Tooltip.types.d.ts +1 -0
  216. package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
  217. package/components/tooltip/v3/Tooltip.vue.js +2 -2
  218. package/components/tooltip/v3/Tooltip.vue2.js +1 -1
  219. package/components/tooltip/v3/index.d.ts +7 -7
  220. package/components/tooltip/v4/TooltipV4.vue.d.ts +9 -4
  221. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  222. package/components/tooltip/v4/TooltipV4.vue2.js +18 -17
  223. package/components/tooltip/v4/index.d.ts +27 -8
  224. package/components/typography/Text.vue.d.ts +3 -3
  225. package/components/typography/index.d.ts +7 -7
  226. package/composables/useDateService.d.ts +7 -0
  227. package/composables/useDateService.js +10 -0
  228. package/composables/useFormValidation.d.ts +1 -0
  229. package/composables/useFormValidation.js +32 -27
  230. package/composables/useFullPageHeight.d.ts +10 -0
  231. package/composables/useFullPageHeight.js +15 -0
  232. package/consts/common.d.ts +1 -0
  233. package/consts/common.js +4 -0
  234. package/consts/regex.d.ts +1 -0
  235. package/consts/regex.js +2 -1
  236. package/index.d.ts +2068 -739
  237. package/index.js +148 -132
  238. package/mocks/apps.d.ts +1 -0
  239. package/mocks/optionsWithIcons.d.ts +2 -0
  240. package/package.json +13 -1
  241. package/testids/index.d.ts +8 -0
  242. package/testids/index.js +35 -33
  243. package/utils/formatNumbers.d.ts +1 -1
  244. package/utils/formatNumbers.js +19 -6
  245. package/utils/index.js +7 -0
  246. package/utils/text.d.ts +3 -0
  247. package/utils/text.js +24 -5
  248. package/utils/totals.d.ts +5 -0
  249. package/utils/totals.js +9 -0
  250. package/utils/utils.d.ts +1 -0
  251. package/utils/utils.js +4 -0
  252. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
  253. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_lang.css +0 -1
  254. package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
  255. package/Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css +0 -1
  256. package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +0 -1
  257. package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +0 -1
  258. package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +0 -1
  259. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +0 -1
  260. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css +0 -1
  261. package/DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css +0 -1
  262. package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
  263. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
  264. package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
  265. package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
  266. package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
  267. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
  268. package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
  269. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
  270. package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +0 -1
  271. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +0 -1
  272. package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +0 -1
  273. package/SwitchV4.vue_vue_type_style_index_0_scoped_c2e356f5_lang.css +0 -1
  274. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +0 -1
  275. package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
  276. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
  277. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
  278. package/components/chart/composables/useChartValues.d.ts +0 -12
  279. package/components/chart/composables/useChartValues.js +0 -32
  280. package/components/chart/utils/formatNumber.js +0 -11
@@ -1,13 +1,13 @@
1
1
  import { onClickOutside as ie } from "@vueuse/core";
2
2
  import { useToggle as fe } from "../../../composables/useToggle.js";
3
- import { ref as r, computed as b, onMounted as ce, onBeforeMount as de, onUnmounted as ve, watch as Q } from "vue";
3
+ import { ref as r, computed as b, onMounted as de, onBeforeMount as ce, onUnmounted as ve, watch as Q } from "vue";
4
4
  import { min as me, addDays as ge, format as X } from "date-fns";
5
5
  import { presetsList as he, formatError as De, mandatoryValuesError as Me, navigatePrev as Z, navigateNext as V } from "./consts.common.js";
6
6
  import m from "./DateServices.common.js";
7
- const Te = (o, y) => {
8
- const N = r(null), c = r({ started: !1, date: null }), x = r(!1), _ = 2, S = r({ from: null, to: null }), s = r({}), g = r([]), k = r(null), f = r({}), T = r({}), w = r(!1), P = r(null), u = r(null), j = r("left"), p = r(null), O = r(null), E = r([]), K = r(null), [h] = fe({ initialValue: !1 }), q = r(null);
7
+ const pe = (o, y) => {
8
+ const N = r(null), d = r({ started: !1, date: null }), x = r(!1), _ = 2, S = r({ from: null, to: null }), u = r({}), g = r([]), k = r(null), i = r({}), p = r({}), C = r(!1), w = r(null), s = r(null), j = r("left"), P = r(null), O = r(null), E = r([]), K = r(null), [D] = fe({ initialValue: !1 }), q = r(null);
9
9
  ie(q, () => {
10
- h.value = !1;
10
+ D.value = !1;
11
11
  });
12
12
  const L = (e, t) => {
13
13
  const a = {
@@ -17,27 +17,27 @@ const Te = (o, y) => {
17
17
  year: t
18
18
  };
19
19
  let n, l;
20
- const d = new Date(t, e, 1).getDay();
20
+ const c = new Date(t, e, 1).getDay();
21
21
  let v = 1;
22
- const i = /* @__PURE__ */ new Date();
23
- i.setHours(0, 0, 0, 0);
24
- const se = m.daysInMonth(e, t);
22
+ const f = /* @__PURE__ */ new Date();
23
+ f.setHours(0, 0, 0, 0);
24
+ const ue = m.daysInMonth(e, t);
25
25
  for (let I = 0; I < 6; I++) {
26
26
  l = [];
27
27
  for (let H = 0; H < 7; H++)
28
- n = {}, I === 0 && d > 0 && H < d && (n.value = 0), v > se && (n.value = 0), !n.value && n.value !== 0 && (n.value = v, v += 1, a.days[n.value] = n, n.date = new Date(t, e, n.value), i < n.date ? n.isFuture = !0 : n.date.getTime() === i.getTime() && (n.isToday = !0, o.includeToday || (n.disabled = !0))), l.push(n);
28
+ n = {}, I === 0 && c > 0 && H < c && (n.value = 0), v > ue && (n.value = 0), !n.value && n.value !== 0 && (n.value = v, v += 1, a.days[n.value] = n, n.date = new Date(t, e, n.value), f < n.date ? n.isFuture = !0 : n.date.getTime() === f.getTime() && (n.isToday = !0, o.includeToday || (n.disabled = !0))), l.push(n);
29
29
  a.weeks.push(l);
30
30
  }
31
31
  return a;
32
- }, C = () => {
32
+ }, T = () => {
33
33
  let e = m.getCurrentTimeUTC();
34
- if (u.value && u.value.toEnd ? e = u.value.toEnd : o.range && o.range.to && (e = o.range.to), !s.value[`${e.getFullYear().toString()}_${e.getMonth().toString()}`]) {
35
- s.value = {}, g.value = [];
34
+ if (s.value && s.value.toEnd ? e = s.value.toEnd : o.range && o.range.to && (e = o.range.to), !u.value[`${e.getFullYear().toString()}_${e.getMonth().toString()}`]) {
35
+ u.value = {}, g.value = [];
36
36
  for (let t = 0; t < _; t++) {
37
37
  const a = new Date(e);
38
38
  a.setDate(1), a.setMonth(e.getMonth() - t);
39
39
  const n = `${a.getFullYear().toString()}_${a.getMonth().toString()}`;
40
- s.value[n] = {
40
+ u.value[n] = {
41
41
  parsedMonth: L(
42
42
  a.getMonth(),
43
43
  a.getFullYear()
@@ -47,60 +47,60 @@ const Te = (o, y) => {
47
47
  }
48
48
  }
49
49
  }, z = (e, t) => {
50
- P.value = e;
50
+ w.value = e;
51
51
  let a = e;
52
- e === "date" && (a = o.datePresetList), E.value = he[a], t && (u.value = {
52
+ e === "date" && (a = o.datePresetList), E.value = he[a], t && (s.value = {
53
53
  fromStart: null,
54
54
  fromEnd: null,
55
55
  toStart: null,
56
56
  toEnd: null
57
- }, S.value.from = "", S.value.to = "", c.value = { started: !1, date: null }, f.value = "custom"), y("rangeTypeChanged", P.value);
57
+ }, S.value.from = "", S.value.to = "", d.value = { started: !1, date: null }, i.value = "custom"), y("rangeTypeChanged", w.value);
58
58
  }, ee = (e) => {
59
- f.value = e.id, D(k.value[e.id].dates()), C();
60
- }, D = (e, t = !1) => {
59
+ i.value = e.id, M(k.value[e.id].dates()), T();
60
+ }, M = (e, t = !1) => {
61
61
  let a = e;
62
- return (!e || !e.from && !e.to) && (a = k.value[E.value[0]]), o.maxDaysInRange && (K.value = t ? ge(a.from, o.maxDaysInRange) : null), w.value = !1, !a.from || !a.to || !(a.from instanceof Date) || !(a.to instanceof Date) ? (O.value = De, w.value = !0, !1) : a.from > a.to ? (O.value = `"From" date can't be bigger than "To" date`, w.value = !0, !1) : (u.value = R(a), S.value.from = X(
63
- u.value.fromStart,
62
+ return !e.from && !e.to && e.preset ? a = k.value[e.preset]?.dates() : (!e || !e.from && !e.to) && (a = k.value[E.value[0]]), o.maxDaysInRange && (K.value = t ? ge(a.from, o.maxDaysInRange) : null), C.value = !1, !a.from || !a.to || !(a.from instanceof Date) || !(a.to instanceof Date) ? (O.value = De, C.value = !0, !1) : a.from > a.to ? (O.value = `"From" date can't be bigger than "To" date`, C.value = !0, !1) : (s.value = R(a), S.value.from = X(
63
+ s.value.fromStart,
64
64
  o.dateFormat
65
- ), S.value.to = X(u.value.toEnd, o.dateFormat), !0);
65
+ ), S.value.to = X(s.value.toEnd, o.dateFormat), !0);
66
66
  }, F = () => {
67
- f.value === "custom" ? p.value = m.getDateRangeString(u.value) : p.value = J.value, y("currentDateChanged", p.value);
67
+ i.value === "custom" ? P.value = m.getDateRangeString(s.value) : P.value = J.value, y("currentDateChanged", P.value);
68
68
  }, te = () => {
69
- if (u.value.fromStart == null || u.value.toEnd == null) {
70
- w.value = !0, O.value = Me;
69
+ if (s.value.fromStart == null || s.value.toEnd == null) {
70
+ C.value = !0, O.value = Me;
71
71
  return;
72
72
  }
73
73
  const e = m.getCurrentTimeUTC();
74
- u.value.toEnd > e && (u.value.toEnd = e), F(), T.value = f.value, y("rangeChanged", {
75
- from: u.value.fromStart,
76
- to: u.value.toEnd,
77
- preset: T.value
74
+ s.value.toEnd > e && (s.value.toEnd = e), F(), p.value = i.value, y("rangeChanged", {
75
+ from: s.value.fromStart,
76
+ to: s.value.toEnd,
77
+ preset: p.value
78
78
  }), W(!1);
79
79
  }, ae = (e, t) => e ? Z : t ? V : null, ne = (e) => {
80
80
  let t = null, a = null;
81
81
  const n = _ - 1;
82
- let l = "", M = null, d = null;
82
+ let l = "", h = null, c = null;
83
83
  switch (e) {
84
84
  case V:
85
- Object.keys(s.value).forEach((v) => {
86
- const i = s.value[v];
87
- i.order === 0 && (M = i), i.order === n ? (g.value.splice(
85
+ Object.keys(u.value).forEach((v) => {
86
+ const f = u.value[v];
87
+ f.order === 0 && (h = f), f.order === n ? (g.value.splice(
88
88
  g.value.indexOf(v),
89
89
  1
90
- ), delete s.value[v]) : i.order += 1;
91
- }), t = M.parsedMonth.month + 1, a = M.parsedMonth.year, t > 11 && (t = 0, a += 1), l = `${a.toString()}_${t.toString()}`, s.value[l] = {
90
+ ), delete u.value[v]) : f.order += 1;
91
+ }), t = h.parsedMonth.month + 1, a = h.parsedMonth.year, t > 11 && (t = 0, a += 1), l = `${a.toString()}_${t.toString()}`, u.value[l] = {
92
92
  parsedMonth: L(t, a),
93
93
  order: 0
94
94
  }, g.value.push(l);
95
95
  break;
96
96
  case Z:
97
- Object.keys(s.value).forEach((v) => {
98
- const i = s.value[v];
99
- i.order === n && (d = i), i.order === 0 ? (g.value.splice(
97
+ Object.keys(u.value).forEach((v) => {
98
+ const f = u.value[v];
99
+ f.order === n && (c = f), f.order === 0 ? (g.value.splice(
100
100
  g.value.indexOf(v),
101
101
  1
102
- ), delete s.value[v]) : i.order -= 1;
103
- }), t = d.parsedMonth.month - 1, a = d.parsedMonth.year, t < 0 && (t = 11, a -= 1), l = `${a.toString()}_${t.toString()}`, s.value[l] = {
102
+ ), delete u.value[v]) : f.order -= 1;
103
+ }), t = c.parsedMonth.month - 1, a = c.parsedMonth.year, t < 0 && (t = 11, a -= 1), l = `${a.toString()}_${t.toString()}`, u.value[l] = {
104
104
  parsedMonth: L(t, a),
105
105
  order: n
106
106
  }, g.value.unshift(l);
@@ -108,7 +108,7 @@ const Te = (o, y) => {
108
108
  }
109
109
  }, R = (e) => {
110
110
  let t;
111
- switch (P.value) {
111
+ switch (w.value) {
112
112
  case "week":
113
113
  t = {
114
114
  fromStart: m.getFirstDayOfWeek(e.from),
@@ -146,6 +146,12 @@ const Te = (o, y) => {
146
146
  return t;
147
147
  }, U = (e, t) => e.getUTCFullYear() === t.getUTCFullYear() && e.getUTCMonth() === t.getUTCMonth() && e.getUTCDate() === t.getUTCDate(), $ = (e) => {
148
148
  let t = !1;
149
+ if (!e.from && !e.to && e.preset) {
150
+ const l = E.value.find(
151
+ (h) => h.id === e.preset
152
+ );
153
+ i.value = l.id, t = !0;
154
+ }
149
155
  const a = {
150
156
  from: new Date(e.from),
151
157
  to: new Date(e.to)
@@ -153,53 +159,53 @@ const Te = (o, y) => {
153
159
  a.from.setHours(0, 0, 0, 0), a.to.setHours(0, 0, 0, 0);
154
160
  const n = E.value.map((l) => l.id);
155
161
  if (Object.keys(k.value).forEach((l) => {
156
- const M = k.value[l];
162
+ const h = k.value[l];
157
163
  if (l !== "custom" && !t && n.indexOf(l) !== -1) {
158
- const d = M.dates();
159
- d.from.setHours(0, 0, 0, 0), d.to.setHours(0, 0, 0, 0), U(d.from, a.from) && U(d.to, a.to) && (f.value = l, t = !0);
164
+ const c = h.dates();
165
+ c.from.setHours(0, 0, 0, 0), c.to.setHours(0, 0, 0, 0), U(c.from, a.from) && U(c.to, a.to) && (i.value = l, t = !0);
160
166
  }
161
167
  }), t) {
162
168
  const l = E.value.find(
163
- (M) => M.id === f.value
169
+ (h) => h.id === i.value
164
170
  );
165
171
  y("dateRangePresetNameChanged", l.name);
166
172
  } else
167
- y("dateRangePresetNameChanged", null), f.value = "custom";
168
- T.value = f.value;
173
+ y("dateRangePresetNameChanged", null), i.value = "custom";
174
+ p.value = i.value;
169
175
  }, A = (e, t, a) => {
170
- if (!c.value.started)
171
- f.value = "custom", c.value.started = !0, c.value.date = new Date(a, t, e.value), D(
172
- { from: c.value.date, to: c.value.date },
176
+ if (!d.value.started)
177
+ i.value = "custom", d.value.started = !0, d.value.date = new Date(a, t, e.value), M(
178
+ { from: d.value.date, to: d.value.date },
173
179
  !0
174
180
  );
175
181
  else {
176
- const n = new Date(a, t, e.value), l = c.value.date;
177
- c.value.started = !1, c.value.date = null, n < l ? A(e, t, a) : D({ from: l, to: n });
182
+ const n = new Date(a, t, e.value), l = d.value.date;
183
+ d.value.started = !1, d.value.date = null, n < l ? A(e, t, a) : M({ from: l, to: n });
178
184
  }
179
185
  }, B = () => {
180
186
  const e = N.value.offsetLeft;
181
187
  return window.innerWidth - e > 930 ? "left" : "right";
182
188
  }, W = (e = !0) => {
183
- h.value = !h.value, h.value ? (j.value = B(), D(o.range), C(), y("opened")) : (D(o.range), C(), f.value = T.value, e && y("dismissed"));
189
+ D.value = !D.value, D.value ? (j.value = B(), M(o.range), T(), y("opened")) : (M(o.range), T(), i.value = p.value, e && y("dismissed"));
184
190
  }, G = () => {
185
- h.value && W();
191
+ D.value && W();
186
192
  }, le = () => {
187
193
  k.value = m.getPresetsFunctions(o.includeToday), k.value.custom = {
188
194
  dates: () => o.range
189
195
  };
190
196
  }, oe = b(() => (g.value || []).reduce((e, t) => {
191
- const n = s.value[t].parsedMonth.weeks[s.value[t].parsedMonth.weeks.length - 1].filter(
197
+ const n = u.value[t].parsedMonth.weeks[u.value[t].parsedMonth.weeks.length - 1].filter(
192
198
  (l) => l.value !== 0
193
199
  ).length;
194
200
  return e && !n;
195
201
  }, !0)), Y = () => {
196
- o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), D(o.range), C(), F());
202
+ o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), M(o.range), T(), F());
197
203
  };
198
- ce(() => {
204
+ de(() => {
199
205
  Y();
200
- }), de(() => {
206
+ }), ce(() => {
201
207
  const e = (t) => {
202
- t.key === "Escape" && h.value && G();
208
+ t.key === "Escape" && D.value && G();
203
209
  };
204
210
  document.addEventListener("keyup", e), ve(() => {
205
211
  document.removeEventListener("keyup", e);
@@ -207,44 +213,44 @@ const Te = (o, y) => {
207
213
  }), Q(
208
214
  () => o.range,
209
215
  (e, t) => {
210
- e && e !== t && (x.value ? ($(e), D(e), F()) : Y());
216
+ e && e !== t && (x.value ? ($(e), M(e), F()) : Y());
211
217
  }
212
- ), Q(h, (e) => {
213
- e || (c.value.started = !1);
218
+ ), Q(D, (e) => {
219
+ e || (d.value.started = !1);
214
220
  });
215
221
  const J = b(() => {
216
222
  const e = E.value.find(
217
- (t) => t.id === f.value
223
+ (t) => t.id === i.value
218
224
  );
219
225
  return e ? e.name : "";
220
- }), re = b(() => `datepicker${o.uniqueId}`), ue = b(() => {
226
+ }), re = b(() => `datepicker${o.uniqueId}`), se = b(() => {
221
227
  const e = [o.maxDate, K.value].filter((t) => t);
222
228
  return e.length ? me(e) : null;
223
229
  });
224
230
  return {
225
231
  datePicker: N,
226
232
  datePickerId: re,
227
- getMaxAllowedDate: ue,
233
+ getMaxAllowedDate: se,
228
234
  selectedPresetName: J,
229
- selectedPreset: f,
230
- displayError: w,
231
- rangeType: P,
232
- selectedRange: u,
235
+ selectedPreset: i,
236
+ displayError: C,
237
+ rangeType: w,
238
+ selectedRange: s,
233
239
  placement: j,
234
- currentDate: p,
240
+ currentDate: P,
235
241
  error: O,
236
242
  presets: E,
237
- isOpen: h,
243
+ isOpen: D,
238
244
  popup: q,
239
- selectionStart: c,
245
+ selectionStart: d,
240
246
  initialized: x,
241
247
  textDates: S,
242
- currentMonths: s,
248
+ currentMonths: u,
243
249
  displayedMonthsKeys: g,
244
- initMonths: C,
250
+ initMonths: T,
245
251
  changeType: z,
246
252
  presetChanged: ee,
247
- initRange: D,
253
+ initRange: M,
248
254
  setCurrentDate: F,
249
255
  apply: te,
250
256
  getNavigation: ae,
@@ -261,5 +267,5 @@ const Te = (o, y) => {
261
267
  };
262
268
  };
263
269
  export {
264
- Te as dateRangeCommon
270
+ pe as dateRangeCommon
265
271
  };
@@ -6,7 +6,7 @@ export type Day = {
6
6
  disabled?: boolean;
7
7
  };
8
8
  export type Week = Day[];
9
- declare class DateServices {
9
+ export declare class DateServices {
10
10
  getCurrentTimeUTC(): Date;
11
11
  daysInMonth(month: any, year: any): number;
12
12
  getDateRangeString(dateRange: any): string;
@@ -117,6 +117,12 @@ declare class DateServices {
117
117
  to?: Date;
118
118
  };
119
119
  };
120
+ last9months: {
121
+ dates(): {
122
+ from?: Date;
123
+ to?: Date;
124
+ };
125
+ };
120
126
  last12months: {
121
127
  dates(): {
122
128
  from?: Date;
@@ -1,6 +1,6 @@
1
- import { isSameDay as C, format as l } from "date-fns";
2
- const m = "MMM d, yyyy", u = 7;
3
- class c {
1
+ import { isSameDay as g, format as m } from "date-fns";
2
+ const y = "MMM d, yyyy", D = 7;
3
+ class C {
4
4
  // eslint-disable-next-line class-methods-use-this
5
5
  getCurrentTimeUTC() {
6
6
  const n = /* @__PURE__ */ new Date();
@@ -12,23 +12,23 @@ class c {
12
12
  }
13
13
  // eslint-disable-next-line consistent-return
14
14
  getDateRangeString(n) {
15
- if (C(n.fromStart, n.toEnd))
16
- return l(n.fromStart, m);
15
+ if (g(n.fromStart, n.toEnd))
16
+ return m(n.fromStart, y);
17
17
  if (n.fromStart && n.toEnd)
18
- return `${l(n.fromStart, m)} - ${l(
18
+ return `${m(n.fromStart, y)} - ${m(
19
19
  n.toEnd,
20
- m
20
+ y
21
21
  )}`;
22
22
  }
23
23
  // eslint-disable-next-line class-methods-use-this
24
24
  getFirstDayOfWeek(n) {
25
- const a = new Date(n), r = a.getDay(), s = a.getDate() - r;
26
- return a.setDate(s), a;
25
+ const a = new Date(n), r = a.getDay(), e = a.getDate() - r;
26
+ return a.setDate(e), a;
27
27
  }
28
28
  getLastDayOfWeek(n) {
29
29
  let a = new Date(n);
30
- const r = a.getDay(), s = a.getDate() + (6 - r);
31
- a.setDate(s);
30
+ const r = a.getDay(), e = a.getDate() + (6 - r);
31
+ a.setDate(e);
32
32
  const t = this.getCurrentTimeUTC();
33
33
  return a > t && (a = t), a;
34
34
  }
@@ -37,33 +37,40 @@ class c {
37
37
  let r = new Date(n.getFullYear(), n.getMonth() + 1, 0);
38
38
  return r > a && (r = a), r;
39
39
  }
40
- createMonth(n, a, r = !0, e = !0) {
41
- const s = {
40
+ createMonth(n, a, r = !0, o = !0) {
41
+ const e = {
42
42
  weeks: [],
43
43
  days: {},
44
44
  month: n,
45
45
  year: a
46
46
  };
47
- let t, o;
48
- const T = new Date(a, n, 1).getDay();
49
- let D = 1;
50
- const i = /* @__PURE__ */ new Date();
51
- i.setHours(0, 0, 0, 0);
52
- const g = this.daysInMonth(n, a);
53
- for (let d = 0; d < 6; d++) {
54
- o = [];
55
- for (let f = 0; f < 7; f++)
56
- t = {}, d === 0 && T > 0 && f < T && (t.value = 0), D > g && (t.value = 0), !t.value && t.value !== 0 && (t.value = D, D += 1, s.days[t.value] = t, t.date = new Date(a, n, t.value), i < t.date && e ? t.isFuture = !0 : t.date.getTime() === i.getTime() && (t.isToday = !0, r || (t.disabled = !0))), o.push(t);
57
- this.isWeekEmpty(o) || s.weeks.push(o);
47
+ let t, s;
48
+ const c = new Date(a, n, 1).getDay();
49
+ let i = 1;
50
+ const d = /* @__PURE__ */ new Date();
51
+ d.setHours(0, 0, 0, 0);
52
+ const T = this.daysInMonth(n, a);
53
+ for (let f = 0; f < 6; f++) {
54
+ s = [];
55
+ for (let l = 0; l < 7; l++)
56
+ t = {}, f === 0 && c > 0 && l < c && (t.value = 0), i > T && (t.value = 0), !t.value && t.value !== 0 && (t.value = i, i += 1, e.days[t.value] = t, t.date = new Date(a, n, t.value), d < t.date && o ? t.isFuture = !0 : t.date.getTime() === d.getTime() && (t.isToday = !0, r || (t.disabled = !0))), s.push(t);
57
+ this.isWeekEmpty(s) || e.weeks.push(s);
58
58
  }
59
- return s;
59
+ return e;
60
60
  }
61
61
  isWeekEmpty(n) {
62
62
  return n.every((a) => !a.value);
63
63
  }
64
64
  // eslint-disable-next-line class-methods-use-this
65
65
  getPresetsFunctions(n = !0) {
66
- const a = n, r = this;
66
+ const a = n, r = this, o = (e) => {
67
+ const t = {}, s = r.getCurrentTimeUTC(), u = new Date(
68
+ s.getFullYear(),
69
+ s.getMonth() - (e - 1),
70
+ 1
71
+ );
72
+ return (t.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0), t.from = u, t;
73
+ };
67
74
  return {
68
75
  today: {
69
76
  dates() {
@@ -82,167 +89,156 @@ class c {
82
89
  last7days: {
83
90
  dates() {
84
91
  const e = {};
85
- let s = 0, t = 6 * 24 * 3600 * 1e3;
86
- return a || (s = 24 * 3600 * 1e3, t = 7 * 24 * 3600 * 1e3), e.from = new Date(
87
- r.getCurrentTimeUTC() - t
92
+ let t = 0, s = 6 * 24 * 3600 * 1e3;
93
+ return a || (t = 24 * 3600 * 1e3, s = 7 * 24 * 3600 * 1e3), e.from = new Date(
94
+ r.getCurrentTimeUTC() - s
88
95
  ), e.to = new Date(
89
- r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - s
96
+ r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - t
90
97
  ), e;
91
98
  }
92
99
  },
93
100
  last14days: {
94
101
  dates() {
95
102
  const e = {};
96
- let s = 0, t = 13 * 24 * 3600 * 1e3;
97
- return a || (s = 24 * 3600 * 1e3, t = 14 * 24 * 3600 * 1e3), e.from = new Date(
98
- r.getCurrentTimeUTC() - t
103
+ let t = 0, s = 13 * 24 * 3600 * 1e3;
104
+ return a || (t = 24 * 3600 * 1e3, s = 14 * 24 * 3600 * 1e3), e.from = new Date(
105
+ r.getCurrentTimeUTC() - s
99
106
  ), e.to = new Date(
100
- r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - s
107
+ r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - t
101
108
  ), e;
102
109
  }
103
110
  },
104
111
  last30days: {
105
112
  dates() {
106
113
  const e = {};
107
- let s = 0, t = 29 * 24 * 3600 * 1e3;
108
- return a || (s = 24 * 3600 * 1e3, t = 30 * 24 * 3600 * 1e3), e.from = new Date(
109
- r.getCurrentTimeUTC() - t
114
+ let t = 0, s = 29 * 24 * 3600 * 1e3;
115
+ return a || (t = 24 * 3600 * 1e3, s = 30 * 24 * 3600 * 1e3), e.from = new Date(
116
+ r.getCurrentTimeUTC() - s
110
117
  ), e.to = new Date(
111
- r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - s
118
+ r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - t
112
119
  ), e;
113
120
  }
114
121
  },
115
122
  last31days: {
116
123
  dates() {
117
124
  const e = {};
118
- let s = 0, t = 30 * 24 * 3600 * 1e3;
119
- return a || (s = 24 * 3600 * 1e3, t = 31 * 24 * 3600 * 1e3), e.from = new Date(
120
- r.getCurrentTimeUTC() - t
125
+ let t = 0, s = 30 * 24 * 3600 * 1e3;
126
+ return a || (t = 24 * 3600 * 1e3, s = 31 * 24 * 3600 * 1e3), e.from = new Date(
127
+ r.getCurrentTimeUTC() - s
121
128
  ), e.to = new Date(
122
- r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - s
129
+ r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - t
123
130
  ), e;
124
131
  }
125
132
  },
126
133
  last60days: {
127
134
  dates() {
128
135
  const e = {};
129
- let s = 0, t = 59 * 24 * 3600 * 1e3;
130
- return a || (s = 24 * 3600 * 1e3, t = 60 * 24 * 3600 * 1e3), e.from = new Date(
131
- r.getCurrentTimeUTC() - t
136
+ let t = 0, s = 59 * 24 * 3600 * 1e3;
137
+ return a || (t = 24 * 3600 * 1e3, s = 60 * 24 * 3600 * 1e3), e.from = new Date(
138
+ r.getCurrentTimeUTC() - s
132
139
  ), e.to = new Date(
133
- r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - s
140
+ r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - t
134
141
  ), e;
135
142
  }
136
143
  },
137
144
  last90days: {
138
145
  dates() {
139
146
  const e = {};
140
- let s = 0, t = 89 * 24 * 3600 * 1e3;
141
- return a || (s = 24 * 3600 * 1e3, t = 90 * 24 * 3600 * 1e3), e.from = new Date(
142
- r.getCurrentTimeUTC() - t
147
+ let t = 0, s = 89 * 24 * 3600 * 1e3;
148
+ return a || (t = 24 * 3600 * 1e3, s = 90 * 24 * 3600 * 1e3), e.from = new Date(
149
+ r.getCurrentTimeUTC() - s
143
150
  ), e.to = new Date(
144
- r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - s
151
+ r.getCurrentTimeUTC().setHours(23, 59, 59, 0) - t
145
152
  ), e;
146
153
  }
147
154
  },
148
155
  thisMonth: {
149
156
  dates() {
150
- const e = {}, s = /* @__PURE__ */ new Date(), t = new Date(s.getFullYear(), s.getMonth(), 1);
157
+ const e = {}, t = /* @__PURE__ */ new Date(), s = new Date(t.getFullYear(), t.getMonth(), 1);
151
158
  if (a)
152
159
  (e.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0);
153
160
  else {
154
- const o = new Date(
161
+ const u = new Date(
155
162
  r.getCurrentTimeUTC().setHours(0, 0, 0, 0) - 864e5
156
163
  );
157
- o < t ? e.to = t : e.to = o;
164
+ u < s ? e.to = s : e.to = u;
158
165
  }
159
- return e.from = t, e;
166
+ return e.from = s, e;
160
167
  }
161
168
  },
162
169
  lastMonth: {
163
170
  dates() {
164
- const e = {}, s = /* @__PURE__ */ new Date();
165
- return e.from = new Date(s.getFullYear(), s.getMonth() - 1, 1), e.to = new Date(s.getFullYear(), s.getMonth(), 0), e;
171
+ const e = {}, t = /* @__PURE__ */ new Date();
172
+ return e.from = new Date(t.getFullYear(), t.getMonth() - 1, 1), e.to = new Date(t.getFullYear(), t.getMonth(), 0), e;
166
173
  }
167
174
  },
168
175
  last4weeks: {
169
176
  dates() {
170
- const e = {}, s = r.getCurrentTimeUTC(), t = r.getFirstDayOfWeek(s);
177
+ const e = {}, t = r.getCurrentTimeUTC(), s = r.getFirstDayOfWeek(t);
171
178
  return e.from = new Date(
172
- t.setDate(t.getDate() - u * 3)
173
- ), e.to = new Date(s.setHours(23, 59, 59, 0)), e;
179
+ s.setDate(s.getDate() - D * 3)
180
+ ), e.to = new Date(t.setHours(23, 59, 59, 0)), e;
174
181
  }
175
182
  },
176
183
  last12weeks: {
177
184
  dates() {
178
- const e = {}, s = r.getCurrentTimeUTC(), t = r.getFirstDayOfWeek(s);
185
+ const e = {}, t = r.getCurrentTimeUTC(), s = r.getFirstDayOfWeek(t);
179
186
  return e.from = new Date(
180
- t.setDate(t.getDate() - u * 11)
181
- ), e.to = new Date(s.setHours(23, 59, 59, 0)), e;
187
+ s.setDate(s.getDate() - D * 11)
188
+ ), e.to = new Date(t.setHours(23, 59, 59, 0)), e;
182
189
  }
183
190
  },
184
191
  last26weeks: {
185
192
  dates() {
186
- const e = {}, s = r.getCurrentTimeUTC(), t = r.getFirstDayOfWeek(s);
193
+ const e = {}, t = r.getCurrentTimeUTC(), s = r.getFirstDayOfWeek(t);
187
194
  return e.from = new Date(
188
- t.setDate(t.getDate() - u * 25)
189
- ), e.to = new Date(s.setHours(23, 59, 59, 0)), e;
195
+ s.setDate(s.getDate() - D * 25)
196
+ ), e.to = new Date(t.setHours(23, 59, 59, 0)), e;
190
197
  }
191
198
  },
192
199
  last52weeks: {
193
200
  dates() {
194
- const e = {}, s = r.getCurrentTimeUTC(), t = r.getFirstDayOfWeek(s);
201
+ const e = {}, t = r.getCurrentTimeUTC(), s = r.getFirstDayOfWeek(t);
195
202
  return e.from = new Date(
196
- t.setDate(t.getDate() - u * 51)
197
- ), e.to = new Date(s.setHours(23, 59, 59, 0)), e;
203
+ s.setDate(s.getDate() - D * 51)
204
+ ), e.to = new Date(t.setHours(23, 59, 59, 0)), e;
198
205
  }
199
206
  },
200
207
  last3months: {
201
208
  dates() {
202
- const e = {}, s = r.getCurrentTimeUTC(), t = new Date(s.getFullYear(), s.getMonth() - 2, 1);
203
- return (e.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0), e.from = t, e;
209
+ return o(3);
204
210
  }
205
211
  },
206
212
  last6months: {
207
213
  dates() {
208
- const e = {}, s = r.getCurrentTimeUTC(), t = new Date(s.getFullYear(), s.getMonth() - 5, 1);
209
- return (e.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0), e.from = t, e;
214
+ return o(6);
215
+ }
216
+ },
217
+ last9months: {
218
+ dates() {
219
+ return o(9);
210
220
  }
211
221
  },
212
222
  last12months: {
213
223
  dates() {
214
- const e = {}, s = r.getCurrentTimeUTC(), t = new Date(
215
- s.getFullYear(),
216
- s.getMonth() - 11,
217
- 1
218
- );
219
- return (e.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0), e.from = t, e;
224
+ return o(12);
220
225
  }
221
226
  },
222
227
  last24months: {
223
228
  dates() {
224
- const e = {}, s = r.getCurrentTimeUTC(), t = new Date(
225
- s.getFullYear(),
226
- s.getMonth() - 23,
227
- 1
228
- );
229
- return (e.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0), e.from = t, e;
229
+ return o(24);
230
230
  }
231
231
  },
232
232
  last36months: {
233
233
  dates() {
234
- const e = {}, s = r.getCurrentTimeUTC(), t = new Date(
235
- s.getFullYear(),
236
- s.getMonth() - 35,
237
- 1
238
- );
239
- return (e.to = r.getCurrentTimeUTC()).setHours(0, 0, 0, 0), e.from = t, e;
234
+ return o(36);
240
235
  }
241
236
  }
242
237
  };
243
238
  }
244
239
  }
245
- const h = new c();
240
+ const U = new C();
246
241
  export {
247
- h as default
242
+ C as DateServices,
243
+ U as default
248
244
  };
@@ -51,4 +51,9 @@ export declare const presetsList: {
51
51
  id: string;
52
52
  numid: number;
53
53
  }[];
54
+ 'month-3-6-9-12': {
55
+ name: string;
56
+ id: string;
57
+ numid: number;
58
+ }[];
54
59
  };