@ironsource/shared-ui 2.1.12-rc.3 → 2.1.12-rc.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_adb49e50_lang.css +1 -0
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_852be7ec_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_fa533a3d_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_38354f10_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_8e8df067_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_55dd36a7_lang.css +1 -0
- package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
- package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
- package/Link.vue_vue_type_style_index_0_scoped_ad98fe7b_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_0287cebf_lang.css +1 -0
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
- package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
- package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_2076b5ab_lang.css +1 -0
- package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
- package/components/appIcon/index.d.ts +3 -3
- package/components/banner/Banner.vue.d.ts +3 -3
- package/components/banner/index.d.ts +7 -7
- package/components/button/common/consts.d.ts +1 -0
- package/components/button/v3/Button.vue.d.ts +3 -3
- package/components/button/v3/ButtonBase.vue.d.ts +3 -3
- package/components/button/v3/IconButton.vue.d.ts +3 -3
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.d.ts +5 -3
- package/components/button/v4/ButtonV4.vue.js +4 -4
- package/components/button/v4/ButtonV4.vue2.js +28 -27
- package/components/button/v4/ToggleButtonGroupAB.vue.js +3 -3
- package/components/button/v4/ToggleButtonGroupAB.vue2.js +40 -44
- package/components/chart/Chart.vue.d.ts +158 -37
- package/components/chart/Chart.vue.js +2 -2
- package/components/chart/Chart.vue2.js +150 -297
- package/components/chart/ChartHeader.vue.d.ts +50 -11
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +73 -54
- package/components/chart/ChartHeaderTrend.vue.d.ts +48 -0
- package/components/chart/ChartHeaderTrend.vue.js +7 -0
- package/components/chart/ChartHeaderTrend.vue2.js +96 -0
- package/components/chart/ChartLegend.vue.d.ts +24 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +82 -63
- package/components/chart/ChartPlane.vue.d.ts +226 -0
- package/components/chart/ChartPlane.vue.js +7 -0
- package/components/chart/ChartPlane.vue2.js +370 -0
- package/components/chart/ChartStoryArgs.d.ts +184 -0
- package/components/chart/ChartTooltip.vue.d.ts +22 -2
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +50 -55
- package/components/chart/LegendSorting.vue.d.ts +37 -0
- package/components/chart/LegendSorting.vue.js +45 -0
- package/components/chart/LegendSorting.vue2.js +4 -0
- package/components/chart/SettingsHeader.vue.d.ts +1 -0
- package/components/chart/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +17 -16
- package/components/chart/SubHeader.vue.d.ts +52 -0
- package/components/chart/SubHeader.vue.js +7 -0
- package/components/chart/SubHeader.vue2.js +61 -0
- package/components/chart/TooltipHeader.vue.d.ts +50 -0
- package/components/chart/TooltipHeader.vue.js +7 -0
- package/components/chart/TooltipHeader.vue2.js +69 -0
- package/components/chart/colorPalette.d.ts +5 -0
- package/components/chart/colorPalette.js +68 -0
- package/components/chart/composables/useChartHeight.d.ts +5 -0
- package/components/chart/composables/useChartHeight.js +24 -0
- package/components/chart/composables/useColorsMap.d.ts +12 -0
- package/components/chart/composables/useColorsMap.js +48 -0
- package/components/chart/composables/useTooltipPosition.d.ts +1 -1
- package/components/chart/composables/useTooltipPosition.js +11 -15
- package/components/chart/consts.d.ts +29 -7
- package/components/chart/consts.js +41 -21
- package/components/chart/index.d.ts +554 -119
- package/components/chart/mockData.d.ts +44 -5
- package/components/chart/types.d.ts +38 -6
- package/components/chart/types.js +5 -2
- package/components/chart/utils/formatNumber.d.ts +0 -1
- package/components/chart/utils/highlightUtils.d.ts +3 -0
- package/components/chart/utils/highlightUtils.js +18 -0
- package/components/chart/utils/utils.d.ts +3 -3
- package/components/chart/utils/utils.js +19 -10
- package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
- package/components/checkbox/v3/index.d.ts +7 -7
- package/components/dateRange/common/DateRange.common.js +81 -75
- package/components/dateRange/common/DateServices.common.d.ts +7 -1
- package/components/dateRange/common/DateServices.common.js +88 -92
- package/components/dateRange/common/consts.common.d.ts +5 -0
- package/components/dateRange/common/consts.common.js +9 -3
- package/components/dateRange/v3/DateRange.vue.d.ts +3 -3
- package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
- package/components/dateRange/v3/index.d.ts +7 -7
- package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
- package/components/dateRange/v4/DateRangeV4.vue.d.ts +3 -3
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
- package/components/dateRange/v4/index.d.ts +7 -7
- package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
- package/components/dialog/v4/DialogV4.vue.js +4 -4
- package/components/dialog/v4/DialogV4.vue2.js +1 -1
- package/components/dialog/v4/index.d.ts +7 -7
- package/components/dropdown/common/Dropdown.common.d.ts +1 -0
- package/components/dropdown/common/Dropdown.common.js +172 -160
- package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
- package/components/dropdown/v3/index.d.ts +20 -20
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -0
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +16 -13
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +5 -0
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +64 -54
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +22 -9
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +151 -129
- package/components/dropdown/v4/DropdownV4.vue.d.ts +34 -1
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +241 -189
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
- package/components/dropdown/v4/OptionV4.vue.d.ts +18 -5
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +140 -108
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
- package/components/dropdown/v4/index.d.ts +682 -162
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
- package/components/emptyState/v4/index.d.ts +7 -7
- package/components/forms/FormRow.vue.d.ts +9 -2
- package/components/forms/FormRow.vue.js +3 -3
- package/components/forms/FormRow.vue2.js +25 -14
- package/components/forms/index.d.ts +25 -5
- package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
- package/components/includeExclude/index.d.ts +40 -40
- package/components/link/Link.vue.d.ts +70 -0
- package/components/link/Link.vue.js +7 -0
- package/components/link/Link.vue2.js +43 -0
- package/components/link/index.d.ts +201 -0
- package/components/link/index.js +6 -0
- package/components/search/v3/index.d.ts +3 -3
- package/components/shared/FieldLabel.vue.d.ts +19 -7
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +50 -37
- package/components/switch/v4/SwitchV4.vue.d.ts +16 -0
- package/components/switch/v4/SwitchV4.vue.js +3 -3
- package/components/switch/v4/SwitchV4.vue2.js +39 -24
- package/components/switch/v4/index.d.ts +29 -0
- package/components/table/common/Table.common.d.ts +0 -1
- package/components/table/common/Table.common.js +38 -39
- package/components/table/common/Table.types.d.ts +2 -0
- package/components/table/common/consts.d.ts +1 -0
- package/components/table/common/consts.js +2 -1
- package/components/table/v4/DataGrid.vue.d.ts +15 -4
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +288 -230
- package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
- package/components/table/v4/index.d.ts +50 -15
- package/components/table/v4/storyUtils.d.ts +2 -0
- package/components/tabs/v3/Tabs.vue.d.ts +3 -3
- package/components/tabs/v3/index.d.ts +7 -7
- package/components/tooltip/common/Tooltip.types.d.ts +1 -0
- package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
- package/components/tooltip/v3/Tooltip.vue.js +2 -2
- package/components/tooltip/v3/Tooltip.vue2.js +1 -1
- package/components/tooltip/v3/index.d.ts +7 -7
- package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
- package/components/tooltip/v4/index.d.ts +7 -7
- package/components/typography/Text.vue.d.ts +3 -3
- package/components/typography/index.d.ts +7 -7
- package/composables/useDateService.d.ts +7 -0
- package/composables/useDateService.js +10 -0
- package/composables/useFormValidation.d.ts +1 -0
- package/composables/useFormValidation.js +32 -27
- package/composables/useFullPageHeight.d.ts +10 -0
- package/composables/useFullPageHeight.js +15 -0
- package/consts/common.d.ts +1 -0
- package/consts/common.js +4 -0
- package/consts/regex.d.ts +1 -0
- package/consts/regex.js +2 -1
- package/index.d.ts +1601 -425
- package/index.js +148 -136
- package/mocks/apps.d.ts +1 -0
- package/mocks/optionsWithIcons.d.ts +2 -0
- package/package.json +9 -1
- package/testids/index.d.ts +4 -0
- package/testids/index.js +31 -30
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +19 -6
- package/utils/index.js +7 -0
- package/utils/text.d.ts +3 -0
- package/utils/text.js +24 -5
- package/utils/totals.d.ts +5 -0
- package/utils/totals.js +9 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +4 -0
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_c2e356f5_lang.css +0 -1
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +0 -1
- package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
- package/components/chart/composables/useChartValues.d.ts +0 -12
- package/components/chart/composables/useChartValues.js +0 -32
- package/components/chart/utils/formatNumber.js +0 -11
|
@@ -1,30 +1,53 @@
|
|
|
1
1
|
export declare const SINGLE_DATASET_DATE: {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
data: {
|
|
5
|
+
date: string;
|
|
6
|
+
value: number;
|
|
7
|
+
}[];
|
|
8
|
+
}[];
|
|
9
|
+
export declare const SINGLE_DATASET_DATE_MONTHLY: {
|
|
10
|
+
id: string;
|
|
2
11
|
label: string;
|
|
3
12
|
data: {
|
|
4
13
|
date: string;
|
|
5
14
|
value: number;
|
|
6
15
|
}[];
|
|
7
|
-
color: string;
|
|
8
16
|
}[];
|
|
9
17
|
export declare const SINGLE_DATASET_COUNTRY: {
|
|
18
|
+
id: string;
|
|
19
|
+
countryFlag: string;
|
|
10
20
|
label: string;
|
|
11
21
|
data: {
|
|
12
|
-
country: string;
|
|
13
22
|
value: number;
|
|
23
|
+
value2: number;
|
|
24
|
+
value3: number;
|
|
14
25
|
}[];
|
|
15
26
|
}[];
|
|
16
|
-
export declare const
|
|
27
|
+
export declare const SINGLE_DATASET_APP: {
|
|
17
28
|
id: string;
|
|
18
29
|
label: string;
|
|
30
|
+
icon: string;
|
|
31
|
+
image: string;
|
|
32
|
+
data: {
|
|
33
|
+
app: string;
|
|
34
|
+
value: number;
|
|
35
|
+
}[];
|
|
36
|
+
}[];
|
|
37
|
+
export declare const MULTIPLE_DATASETS_DATE: ({
|
|
38
|
+
id: number;
|
|
39
|
+
label: string;
|
|
19
40
|
caption: string;
|
|
20
41
|
icon: string;
|
|
21
42
|
data: {
|
|
22
43
|
date: string;
|
|
23
44
|
value: number;
|
|
45
|
+
value2: number;
|
|
46
|
+
value3: number;
|
|
24
47
|
}[];
|
|
25
48
|
iconType?: undefined;
|
|
26
49
|
} | {
|
|
27
|
-
id:
|
|
50
|
+
id: number;
|
|
28
51
|
label: string;
|
|
29
52
|
caption: string;
|
|
30
53
|
icon: string;
|
|
@@ -32,14 +55,30 @@ export declare const MULTIPLE_DATASETS_DATE: ({
|
|
|
32
55
|
data: {
|
|
33
56
|
date: string;
|
|
34
57
|
value: number;
|
|
58
|
+
value2: number;
|
|
59
|
+
value3: number;
|
|
35
60
|
}[];
|
|
36
61
|
})[];
|
|
37
62
|
export declare const MULTIPLE_DATASETS_SINGLE_DATE: {
|
|
38
|
-
id:
|
|
63
|
+
id: number;
|
|
39
64
|
label: string;
|
|
40
65
|
data: {
|
|
41
66
|
date: string;
|
|
42
67
|
value: number;
|
|
68
|
+
value2: number;
|
|
69
|
+
value3: number;
|
|
43
70
|
}[];
|
|
44
71
|
}[];
|
|
45
72
|
export declare const generateMockData: (numSeries?: number) => any[];
|
|
73
|
+
export declare const metricOptions: {
|
|
74
|
+
id: string;
|
|
75
|
+
label: string;
|
|
76
|
+
}[];
|
|
77
|
+
export declare const breakdownsOptions: {
|
|
78
|
+
id: string;
|
|
79
|
+
label: string;
|
|
80
|
+
}[];
|
|
81
|
+
export declare const LEGEND_SORTING_OPTIONS: {
|
|
82
|
+
id: string;
|
|
83
|
+
label: string;
|
|
84
|
+
}[];
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { UseVirtualListItem } from '@vueuse/core';
|
|
3
3
|
import { IconTypes } from '../icon/v4/Icon.types';
|
|
4
|
-
import { ChartTypeRegistry, TooltipItem } from 'chart.js';
|
|
4
|
+
import { ChartDataset, ChartTypeRegistry, TooltipItem } from 'chart.js';
|
|
5
5
|
export declare enum ChartType {
|
|
6
6
|
Line = "line",
|
|
7
7
|
Bar = "bar",
|
|
8
8
|
StackedLine = "stackedLine",
|
|
9
9
|
StackedBar = "stackedBar"
|
|
10
10
|
}
|
|
11
|
+
export declare enum DateInterval {
|
|
12
|
+
DAILY = "daily",
|
|
13
|
+
WEEKLY = "weekly",
|
|
14
|
+
MONTHLY = "monthly"
|
|
15
|
+
}
|
|
11
16
|
export type ChartDataRecord = Record<string, unknown>;
|
|
12
17
|
export type ChartDataSet = {
|
|
13
18
|
id: string | number;
|
|
14
19
|
label: string;
|
|
15
20
|
data: ChartDataRecord[];
|
|
16
21
|
caption?: string;
|
|
17
|
-
color?:
|
|
22
|
+
color?: HexColor;
|
|
18
23
|
icon?: string;
|
|
19
24
|
iconType?: IconTypes;
|
|
25
|
+
countryFlag?: string;
|
|
26
|
+
image?: string;
|
|
20
27
|
};
|
|
21
28
|
export type ChartParsingConfig = {
|
|
22
29
|
xAxisKey: string;
|
|
@@ -32,10 +39,7 @@ export type LegendItem = {
|
|
|
32
39
|
iconType?: IconTypes;
|
|
33
40
|
};
|
|
34
41
|
export interface MyTooltipItem<T extends keyof ChartTypeRegistry = keyof ChartTypeRegistry> extends TooltipItem<T> {
|
|
35
|
-
dataset:
|
|
36
|
-
icon?: string;
|
|
37
|
-
iconType?: IconTypes;
|
|
38
|
-
} & TooltipItem<T>['dataset'];
|
|
42
|
+
dataset: ChartDataSet & TooltipItem<T>['dataset'];
|
|
39
43
|
}
|
|
40
44
|
export type UseVirtualListResult = {
|
|
41
45
|
list: Ref<UseVirtualListItem<LegendItem>[]>;
|
|
@@ -55,3 +59,31 @@ export type DropdownTypeOption = {
|
|
|
55
59
|
id: ChartType;
|
|
56
60
|
name: string;
|
|
57
61
|
};
|
|
62
|
+
export type UseChartHeightArgs = {
|
|
63
|
+
chartPlanesCount: Ref<number>;
|
|
64
|
+
useFullHeight: boolean;
|
|
65
|
+
bottomSpacing?: number;
|
|
66
|
+
};
|
|
67
|
+
export type HexColor = `#${string}`;
|
|
68
|
+
export type DataSetConfig = ChartDataset<'line'> & ChartDataSet;
|
|
69
|
+
export interface Font {
|
|
70
|
+
size: number;
|
|
71
|
+
weight: number;
|
|
72
|
+
family: string;
|
|
73
|
+
}
|
|
74
|
+
export type PrepareTicksLabelArgs = {
|
|
75
|
+
label: string;
|
|
76
|
+
format: ValueFormat;
|
|
77
|
+
availableSpace: number;
|
|
78
|
+
truncate?: boolean;
|
|
79
|
+
};
|
|
80
|
+
export declare enum TooltipOrder {
|
|
81
|
+
Legend = "legend",
|
|
82
|
+
YAxis = "yAxis"
|
|
83
|
+
}
|
|
84
|
+
export declare enum TrendDirection {
|
|
85
|
+
UP = "up",
|
|
86
|
+
DOWN = "down",
|
|
87
|
+
NEUTRAL = "right"
|
|
88
|
+
}
|
|
89
|
+
export type ColorVariant = 'default' | 'mediation';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e = /* @__PURE__ */ ((L) => (L.Line = "line", L.Bar = "bar", L.StackedLine = "stackedLine", L.StackedBar = "stackedBar", L))(e || {}), r = /* @__PURE__ */ ((L) => (L.DAILY = "daily", L.WEEKLY = "weekly", L.MONTHLY = "monthly", L))(r || {}), a = /* @__PURE__ */ ((L) => (L.Legend = "legend", L.YAxis = "yAxis", L))(a || {}), n = /* @__PURE__ */ ((L) => (L.UP = "up", L.DOWN = "down", L.NEUTRAL = "right", L))(n || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
e as ChartType,
|
|
4
|
+
r as DateInterval,
|
|
5
|
+
a as TooltipOrder,
|
|
6
|
+
n as TrendDirection
|
|
4
7
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const _ = [
|
|
2
|
+
"borderColor",
|
|
3
|
+
"backgroundColor",
|
|
4
|
+
"pointBackgroundColor",
|
|
5
|
+
"pointHoverBorderColor"
|
|
6
|
+
], l = (o) => {
|
|
7
|
+
_.forEach((r) => {
|
|
8
|
+
o[`___${r}`] = o[r];
|
|
9
|
+
});
|
|
10
|
+
}, n = (o) => {
|
|
11
|
+
_.forEach((r) => {
|
|
12
|
+
o[`___${r}`] && (o[r] = o[`___${r}`], delete o[`___${r}`]);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
n as restoreOriginalDatasetColors,
|
|
17
|
+
l as storeOriginalDatasetColors
|
|
18
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ValueFormat } from '@/components/chart/types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { PrepareTicksLabelArgs, ValueFormat } from '@/components/chart/types';
|
|
2
|
+
export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat, formatLowDigits?: boolean) => string;
|
|
3
|
+
export declare const prepareTickLabel: ({ label, format, availableSpace, truncate, }: PrepareTicksLabelArgs) => string | string[];
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { format as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { format as e } from "date-fns";
|
|
2
|
+
import { TICK_LABEL_FONT as p } from "../consts.js";
|
|
3
|
+
import { nFormatter as E } from "../../../utils/formatNumbers.js";
|
|
4
|
+
import { truncateTextToFit as a } from "../../../utils/text.js";
|
|
5
|
+
import { REGEX_LINEBREAK as m } from "../../../consts/regex.js";
|
|
6
|
+
const c = (r, t, n = !1) => t === "day" ? e(new Date(r), "EEEE") : t === "number" ? E(r, n) : t === "date" ? e(new Date(r), "MMM dd") : t === "dateLong" ? e(new Date(r), "MMM dd, yyyy") : String(r), w = ({
|
|
7
|
+
label: r,
|
|
8
|
+
format: t,
|
|
9
|
+
availableSpace: n,
|
|
10
|
+
truncate: i = !1
|
|
11
|
+
}) => {
|
|
12
|
+
const s = m.test(r), o = (d) => {
|
|
13
|
+
const f = c(d, t);
|
|
14
|
+
return i && n > 0 ? a(f, p, n) : f;
|
|
15
|
+
};
|
|
16
|
+
return s ? r.split(m).map(o) : o(r);
|
|
17
|
+
};
|
|
9
18
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
c as formatValue,
|
|
20
|
+
w as prepareTickLabel
|
|
12
21
|
};
|
|
@@ -2,7 +2,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
2
2
|
isChecked: boolean;
|
|
3
3
|
isIndeterminate?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "md" | "sm" | "lg";
|
|
6
6
|
label?: string;
|
|
7
7
|
testId?: string;
|
|
8
8
|
}>, {
|
|
@@ -16,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
16
16
|
isChecked: boolean;
|
|
17
17
|
isIndeterminate?: boolean;
|
|
18
18
|
disabled?: boolean;
|
|
19
|
-
size?: "
|
|
19
|
+
size?: "md" | "sm" | "lg";
|
|
20
20
|
label?: string;
|
|
21
21
|
testId?: string;
|
|
22
22
|
}>, {
|
|
@@ -29,7 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
29
29
|
}, {
|
|
30
30
|
label: string;
|
|
31
31
|
testId: string;
|
|
32
|
-
size: "
|
|
32
|
+
size: "md" | "sm" | "lg";
|
|
33
33
|
}>, {
|
|
34
34
|
default?(_: {}): any;
|
|
35
35
|
}>;
|
|
@@ -5,7 +5,7 @@ declare const CheckboxTypes: () => ({
|
|
|
5
5
|
$props: Partial<{
|
|
6
6
|
label: string;
|
|
7
7
|
testId: string;
|
|
8
|
-
size: "
|
|
8
|
+
size: "md" | "sm" | "lg";
|
|
9
9
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
10
10
|
label: {
|
|
11
11
|
type: import("vue").PropType<string>;
|
|
@@ -19,7 +19,7 @@ declare const CheckboxTypes: () => ({
|
|
|
19
19
|
type: import("vue").PropType<boolean>;
|
|
20
20
|
};
|
|
21
21
|
size: {
|
|
22
|
-
type: import("vue").PropType<"
|
|
22
|
+
type: import("vue").PropType<"md" | "sm" | "lg">;
|
|
23
23
|
default: string;
|
|
24
24
|
};
|
|
25
25
|
isIndeterminate: {
|
|
@@ -59,7 +59,7 @@ declare const CheckboxTypes: () => ({
|
|
|
59
59
|
type: import("vue").PropType<boolean>;
|
|
60
60
|
};
|
|
61
61
|
size: {
|
|
62
|
-
type: import("vue").PropType<"
|
|
62
|
+
type: import("vue").PropType<"md" | "sm" | "lg">;
|
|
63
63
|
default: string;
|
|
64
64
|
};
|
|
65
65
|
isIndeterminate: {
|
|
@@ -78,7 +78,7 @@ declare const CheckboxTypes: () => ({
|
|
|
78
78
|
}, string, {
|
|
79
79
|
label: string;
|
|
80
80
|
testId: string;
|
|
81
|
-
size: "
|
|
81
|
+
size: "md" | "sm" | "lg";
|
|
82
82
|
}, {}, string> & {
|
|
83
83
|
beforeCreate?: (() => void) | (() => void)[];
|
|
84
84
|
created?: (() => void) | (() => void)[];
|
|
@@ -112,7 +112,7 @@ declare const CheckboxTypes: () => ({
|
|
|
112
112
|
type: import("vue").PropType<boolean>;
|
|
113
113
|
};
|
|
114
114
|
size: {
|
|
115
|
-
type: import("vue").PropType<"
|
|
115
|
+
type: import("vue").PropType<"md" | "sm" | "lg">;
|
|
116
116
|
default: string;
|
|
117
117
|
};
|
|
118
118
|
isIndeterminate: {
|
|
@@ -142,7 +142,7 @@ declare const CheckboxTypes: () => ({
|
|
|
142
142
|
type: import("vue").PropType<boolean>;
|
|
143
143
|
};
|
|
144
144
|
size: {
|
|
145
|
-
type: import("vue").PropType<"
|
|
145
|
+
type: import("vue").PropType<"md" | "sm" | "lg">;
|
|
146
146
|
default: string;
|
|
147
147
|
};
|
|
148
148
|
isIndeterminate: {
|
|
@@ -161,7 +161,7 @@ declare const CheckboxTypes: () => ({
|
|
|
161
161
|
}, string, {
|
|
162
162
|
label: string;
|
|
163
163
|
testId: string;
|
|
164
|
-
size: "
|
|
164
|
+
size: "md" | "sm" | "lg";
|
|
165
165
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
166
166
|
$slots: {
|
|
167
167
|
default?(_: {}): any;
|
|
@@ -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
|
|
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
|
|
8
|
-
const N = 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
|
-
|
|
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
|
|
20
|
+
const c = new Date(t, e, 1).getDay();
|
|
21
21
|
let v = 1;
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const
|
|
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 &&
|
|
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
|
-
},
|
|
32
|
+
}, T = () => {
|
|
33
33
|
let e = m.getCurrentTimeUTC();
|
|
34
|
-
if (
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
50
|
+
w.value = e;
|
|
51
51
|
let a = e;
|
|
52
|
-
e === "date" && (a = o.datePresetList), E.value = he[a], t && (
|
|
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 = "",
|
|
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
|
-
|
|
60
|
-
},
|
|
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),
|
|
63
|
-
|
|
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(
|
|
65
|
+
), S.value.to = X(s.value.toEnd, o.dateFormat), !0);
|
|
66
66
|
}, F = () => {
|
|
67
|
-
|
|
67
|
+
i.value === "custom" ? P.value = m.getDateRangeString(s.value) : P.value = J.value, y("currentDateChanged", P.value);
|
|
68
68
|
}, te = () => {
|
|
69
|
-
if (
|
|
70
|
-
|
|
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
|
-
|
|
75
|
-
from:
|
|
76
|
-
to:
|
|
77
|
-
preset:
|
|
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 = "",
|
|
82
|
+
let l = "", h = null, c = null;
|
|
83
83
|
switch (e) {
|
|
84
84
|
case V:
|
|
85
|
-
Object.keys(
|
|
86
|
-
const
|
|
87
|
-
|
|
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
|
|
91
|
-
}), t =
|
|
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(
|
|
98
|
-
const
|
|
99
|
-
|
|
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
|
|
103
|
-
}), t =
|
|
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 (
|
|
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
|
|
162
|
+
const h = k.value[l];
|
|
157
163
|
if (l !== "custom" && !t && n.indexOf(l) !== -1) {
|
|
158
|
-
const
|
|
159
|
-
|
|
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
|
-
(
|
|
169
|
+
(h) => h.id === i.value
|
|
164
170
|
);
|
|
165
171
|
y("dateRangePresetNameChanged", l.name);
|
|
166
172
|
} else
|
|
167
|
-
y("dateRangePresetNameChanged", null),
|
|
168
|
-
|
|
173
|
+
y("dateRangePresetNameChanged", null), i.value = "custom";
|
|
174
|
+
p.value = i.value;
|
|
169
175
|
}, A = (e, t, a) => {
|
|
170
|
-
if (!
|
|
171
|
-
|
|
172
|
-
{ from:
|
|
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 =
|
|
177
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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),
|
|
202
|
+
o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), M(o.range), T(), F());
|
|
197
203
|
};
|
|
198
|
-
|
|
204
|
+
de(() => {
|
|
199
205
|
Y();
|
|
200
|
-
}),
|
|
206
|
+
}), ce(() => {
|
|
201
207
|
const e = (t) => {
|
|
202
|
-
t.key === "Escape" &&
|
|
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),
|
|
216
|
+
e && e !== t && (x.value ? ($(e), M(e), F()) : Y());
|
|
211
217
|
}
|
|
212
|
-
), Q(
|
|
213
|
-
e || (
|
|
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 ===
|
|
223
|
+
(t) => t.id === i.value
|
|
218
224
|
);
|
|
219
225
|
return e ? e.name : "";
|
|
220
|
-
}), re = b(() => `datepicker${o.uniqueId}`),
|
|
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:
|
|
233
|
+
getMaxAllowedDate: se,
|
|
228
234
|
selectedPresetName: J,
|
|
229
|
-
selectedPreset:
|
|
230
|
-
displayError:
|
|
231
|
-
rangeType:
|
|
232
|
-
selectedRange:
|
|
235
|
+
selectedPreset: i,
|
|
236
|
+
displayError: C,
|
|
237
|
+
rangeType: w,
|
|
238
|
+
selectedRange: s,
|
|
233
239
|
placement: j,
|
|
234
|
-
currentDate:
|
|
240
|
+
currentDate: P,
|
|
235
241
|
error: O,
|
|
236
242
|
presets: E,
|
|
237
|
-
isOpen:
|
|
243
|
+
isOpen: D,
|
|
238
244
|
popup: q,
|
|
239
|
-
selectionStart:
|
|
245
|
+
selectionStart: d,
|
|
240
246
|
initialized: x,
|
|
241
247
|
textDates: S,
|
|
242
|
-
currentMonths:
|
|
248
|
+
currentMonths: u,
|
|
243
249
|
displayedMonthsKeys: g,
|
|
244
|
-
initMonths:
|
|
250
|
+
initMonths: T,
|
|
245
251
|
changeType: z,
|
|
246
252
|
presetChanged: ee,
|
|
247
|
-
initRange:
|
|
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
|
-
|
|
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;
|