bfg-common 1.5.92 → 1.5.94

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 (112) hide show
  1. package/assets/scss/common/normalize.scss +347 -347
  2. package/components/atoms/alert/Notification.vue +169 -169
  3. package/components/atoms/autocomplete/Autocomplete.vue +361 -362
  4. package/components/atoms/collapse/CollapseNav.vue +169 -169
  5. package/components/atoms/comboDropdownMenu/ComboDropdownMenu.vue +357 -357
  6. package/components/atoms/combobox/Combobox.vue +154 -154
  7. package/components/atoms/datepicker/Datepicker.vue +639 -639
  8. package/components/atoms/dropdown/Portlet.vue +113 -113
  9. package/components/atoms/dropdown/dropdown/Dropdown.vue +168 -168
  10. package/components/atoms/dropdown/tree/Tree.vue +137 -137
  11. package/components/atoms/list/SelectList.vue +63 -63
  12. package/components/atoms/list/dragDropList/DragDropList.vue +148 -148
  13. package/components/atoms/modal/Modal.vue +250 -250
  14. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  15. package/components/atoms/notificationBar/NotificationBar.vue +178 -178
  16. package/components/atoms/popover/Popover.vue +58 -58
  17. package/components/atoms/popover/lib/models/interfaces.ts +4 -4
  18. package/components/atoms/select/TheSelect.vue +187 -187
  19. package/components/atoms/stack/StackBlock.vue +185 -185
  20. package/components/atoms/stack/StackContent.vue +63 -63
  21. package/components/atoms/step/lib/models/verticalStepItem.ts +5 -5
  22. package/components/atoms/switch/Switch.vue +111 -111
  23. package/components/atoms/table/compact/Compact.vue +529 -529
  24. package/components/atoms/table/dataGrid/DataGrid.vue +1716 -1713
  25. package/components/atoms/table/dataGrid/DataGridPage.vue +195 -195
  26. package/components/atoms/table/info/Info.vue +2 -2
  27. package/components/atoms/table/simpleEvent/SimpleEvent.vue +98 -98
  28. package/components/atoms/table/simpleInfo/SimpleInfo.vue +73 -73
  29. package/components/atoms/tabs/Tabs.vue +217 -217
  30. package/components/atoms/wizard/Wizard.vue +341 -341
  31. package/components/common/accordion/Recursion.vue +222 -222
  32. package/components/common/adapterManager/AddAdapterModal.vue +561 -561
  33. package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +30 -30
  34. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  35. package/components/common/browse/BrowseNew.vue +237 -237
  36. package/components/common/browse/BrowseOld.vue +217 -217
  37. package/components/common/browse/blocks/TitleNew.vue +145 -145
  38. package/components/common/browse/blocks/TitleOld.vue +91 -91
  39. package/components/common/browse/blocks/contents/FilesOld.vue +72 -72
  40. package/components/common/chartOptionsModal/counters/timespan/form/FormNew.vue +262 -262
  41. package/components/common/context/Context.vue +111 -111
  42. package/components/common/context/recursion/RecursionOld.vue +228 -228
  43. package/components/common/details/DetailsItem.vue +109 -109
  44. package/components/common/feedback/Buttons.vue +229 -229
  45. package/components/common/feedback/Feedback.vue +270 -270
  46. package/components/common/feedback/Message.vue +519 -519
  47. package/components/common/graph/graphNew/GraphNew.vue +194 -194
  48. package/components/common/graph/lib/utils/renderGraph.ts +389 -389
  49. package/components/common/layout/theHeader/feedback/new/New.vue +227 -227
  50. package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +606 -606
  51. package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +98 -98
  52. package/components/common/layout/theHeader/feedback/new/description/Description.vue +59 -59
  53. package/components/common/layout/theHeader/feedback/new/email/Email.vue +43 -43
  54. package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +103 -103
  55. package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +112 -112
  56. package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +80 -80
  57. package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +1 -1
  58. package/components/common/layout/theHeader/modals/Reconnect.vue +2 -2
  59. package/components/common/layout/theHeader/modals/RedirectLogin.vue +3 -3
  60. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +1 -1
  61. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordNew.vue +8 -8
  62. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordOld.vue +3 -3
  63. package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesNew.vue +1 -1
  64. package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +1 -1
  65. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +1 -1
  66. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageNew.vue +1 -1
  67. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageOld.vue +2 -5
  68. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsoleOld.vue +1 -1
  69. package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/InventoryNew.vue +1 -1
  70. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +2 -2
  71. package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +1 -1
  72. package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +1 -1
  73. package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +2 -2
  74. package/components/common/modals/Rename.vue +2 -2
  75. package/components/common/modals/confirmByInput/ConfirmByInput.vue +2 -3
  76. package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +3 -3
  77. package/components/common/modals/confirmation/ConfirmationOld.vue +1 -1
  78. package/components/common/modals/unsavedChanges/UnsavedChanges.vue +1 -1
  79. package/components/common/monitor/advanced/Advanced.vue +1 -1
  80. package/components/common/monitor/advanced/AdvancedNew.vue +1 -1
  81. package/components/common/monitor/advanced/AdvancedOld.vue +1 -1
  82. package/components/common/monitor/advanced/graphView/GraphViewNew.vue +1 -1
  83. package/components/common/monitor/advanced/graphView/GraphViewOld.vue +1 -1
  84. package/components/common/monitor/advanced/table/Table.vue +1 -1
  85. package/components/common/monitor/advanced/table/tableNew/TableNew.vue +2 -2
  86. package/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable.ts +2 -2
  87. package/components/common/monitor/advanced/tools/ToolsOld.vue +2 -2
  88. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalOld.vue +1 -1
  89. package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationOld.vue +1 -1
  90. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsOld.vue +1 -1
  91. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +1 -1
  92. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersNew.vue +1 -1
  93. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableOld/lib/config/tableConfig.ts +2 -2
  94. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/config/objectTable.ts +10 -3
  95. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/ObjectNew.vue +1 -1
  96. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectOld/ObjectOld.vue +2 -2
  97. package/components/common/monitor/advanced/tools/lib/utils/countCores.ts +1 -1
  98. package/components/common/monitor/lib/models/interfaces.ts +1 -1
  99. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalOld.vue +3 -3
  100. package/components/common/monitor/overview/filters/customIntervalModal/customIntervalModalNew/CustomIntervalModalNew.vue +4 -3
  101. package/components/common/monitor/resourceAllocation/lib/models/interfaces.ts +8 -8
  102. package/components/common/monitor/resourceAllocation/resourceAllocation.vue +2 -2
  103. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +1 -1
  104. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/Notification.vue +1 -1
  105. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/SaveOptionsModal.vue +1 -1
  106. package/components/common/pages/hardwareHealth/tableView/lib/config/alertWarningTable.ts +1 -1
  107. package/components/common/pages/hardwareHealth/tableView/lib/config/historyTestimonyTable.ts +5 -5
  108. package/components/common/wizards/vm/migrate/Migrate.vue +39 -2
  109. package/components/common/wizards/vm/migrate/vmOrigin/VmOrigin.vue +92 -0
  110. package/components/common/wizards/vm/migrate/vmOrigin/lib/models/interfaces.ts +19 -0
  111. package/components/common/wizards/vm/migrate/vmOrigin/lib/utils/constructItems.ts +62 -0
  112. package/package.json +1 -1
@@ -1,262 +1,262 @@
1
- <template>
2
- <div class="timespan-form-container">
3
- <p class="block-title">{{ localization.inventoryMonitor.timespan }}</p>
4
- <ui-select
5
- v-model="localSelectedTimespanLocal"
6
- :items="constructedTimespanOptions"
7
- test-id="timespan-local"
8
- select-width="100%"
9
- size="md"
10
- :margin-between-trigger="4"
11
- />
12
-
13
- <div class="radio-container">
14
- <div class="ui-radio-block">
15
- <ui-radio
16
- v-model="localPeriodTypeLocal"
17
- :label="localization.common.last"
18
- :disabled="isDisabledCustomForm"
19
- test-id="last-from"
20
- value="last"
21
- size="md"
22
- />
23
- </div>
24
- <div class="row-container">
25
- <ui-input
26
- v-model="localLastLocal"
27
- :disabled="isDisabledCustomFormLast"
28
- :placeholder="localization.common.last"
29
- :error="props.errorLastInput"
30
- test-id="local-last"
31
- />
32
- <ui-select
33
- v-model="localSelectedCustomTimeLocal"
34
- :items="constructedCustomTimeOptions"
35
- :disabled="isDisabledCustomFormLast"
36
- :margin-between-trigger="4"
37
- test-id="custom-time"
38
- select-width="100%"
39
- size="md"
40
- />
41
- </div>
42
- </div>
43
- <div class="radio-container">
44
- <div class="ui-radio-block">
45
- <ui-radio
46
- v-model="localPeriodTypeLocal"
47
- :label="localization.common.timeRange"
48
- :disabled="isDisabledCustomForm"
49
- test-id="last-from"
50
- value="period"
51
- size="md"
52
- />
53
- </div>
54
-
55
- <ui-input-with-datepicker
56
- id="date-from"
57
- v-model="constructedDateFromLocal"
58
- :format="datepickerFormat"
59
- :disabled="isDisabledCustomFormRange"
60
- :error="props.errorDateFrom"
61
- :error-timepicker="props.errorTimeFrom"
62
- test-id="date-from"
63
- time-format="12"
64
- />
65
-
66
- <ui-input-with-datepicker
67
- id="date-to"
68
- v-model="constructedDateToLocal"
69
- :format="datepickerFormat"
70
- :disabled="isDisabledCustomFormRange"
71
- :error="props.errorDateTo"
72
- :error-timepicker="props.errorTimeTo"
73
- test-id="date-to"
74
- time-format="12"
75
- />
76
- </div>
77
- <p class="date-time-info">
78
- {{ localization.inventoryMonitor.dateTimeIsoFormat }}
79
- </p>
80
- </div>
81
- </template>
82
-
83
- <script setup lang="ts">
84
- import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
85
- import type { UI_I_Localization } from '~/lib/models/interfaces'
86
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
87
- import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
88
-
89
- const localSelectedTimespanLocal = defineModel<string>(
90
- 'localSelectedTimespan',
91
- { required: true }
92
- )
93
- const localPeriodTypeLocal = defineModel<string>('localPeriodType', {
94
- required: true,
95
- })
96
- const localLastLocal = defineModel<number>('localLast', {
97
- required: true,
98
- })
99
- const localSelectedCustomTimeLocal = defineModel<string>(
100
- 'localSelectedCustomTime',
101
- {
102
- required: true,
103
- }
104
- )
105
- const localCurrentDateFromLocal = defineModel<string>('localCurrentDateFrom', {
106
- required: true,
107
- })
108
- const currentTimeFromLocal = defineModel<string>('currentTimeFrom', {
109
- required: true,
110
- })
111
- const currentTimeToLocal = defineModel<string>('currentTimeTo', {
112
- required: true,
113
- })
114
- const currentDateToLocal = defineModel<string>('currentDateTo', {
115
- required: true,
116
- })
117
-
118
- const props = defineProps<{
119
- timespanOptions: UI_I_OptionItem[]
120
- customTimeOptions: UI_I_OptionItem[]
121
- language: string
122
- errorLastInput?: string
123
- errorDateFrom?: string
124
- errorTimeFrom?: string
125
- errorDateTo?: string
126
- errorTimeTo?: string
127
- }>()
128
-
129
- const {
130
- $isDate,
131
- $getUnixByDate,
132
- $formattedDate,
133
- $formattedTime,
134
- $getDateFormat,
135
- } = useNuxtApp()
136
-
137
- const localization = computed<UI_I_Localization>(() => useLocal())
138
-
139
- const isDisabledCustomForm = computed<boolean>(
140
- () => localSelectedTimespanLocal.value !== 'custom_interval'
141
- )
142
- const isDisabledCustomFormLast = computed<boolean>(
143
- () => isDisabledCustomForm.value || localPeriodTypeLocal.value !== 'last'
144
- )
145
- const isDisabledCustomFormRange = computed<boolean>(
146
- () => isDisabledCustomForm.value || localPeriodTypeLocal.value !== 'period'
147
- )
148
-
149
- const constructedTimespanOptions = computed<UI_I_Dropdown[]>(() =>
150
- props.timespanOptions.map((item) => {
151
- return {
152
- text: item.text,
153
- value: item.value,
154
- }
155
- })
156
- )
157
-
158
- const constructedCustomTimeOptions = computed<UI_I_Dropdown[]>(() =>
159
- props.customTimeOptions.map((item) => {
160
- return {
161
- text: item.text,
162
- value: item.value,
163
- }
164
- })
165
- )
166
-
167
- const datepickerFormat = computed<string>(() =>
168
- getUiDatepickerFormatByLanguage(props.language)
169
- )
170
- const dateFormatForUpdate = ref<string>($getDateFormat(props.language))
171
- const constructedDateFromLocal = computed<number>({
172
- get() {
173
- // TODO fix PM
174
- return $isDate(localCurrentDateFromLocal.value)
175
- ? $getUnixByDate(
176
- localCurrentDateFromLocal.value + ' ' + currentTimeFromLocal.value
177
- )
178
- : 0
179
- },
180
- set(newValue) {
181
- localCurrentDateFromLocal.value = $formattedDate(
182
- new Date(newValue),
183
- dateFormatForUpdate.value
184
- )
185
- currentTimeFromLocal.value = $formattedTime(newValue, '', true)
186
- },
187
- })
188
-
189
- const constructedDateToLocal = computed<number>({
190
- get() {
191
- // TODO fix PM
192
- return $isDate(currentDateToLocal.value)
193
- ? $getUnixByDate(
194
- currentDateToLocal.value + ' ' + currentTimeToLocal.value
195
- )
196
- : 0
197
- },
198
- set(newValue) {
199
- currentDateToLocal.value = $formattedDate(
200
- new Date(newValue),
201
- dateFormatForUpdate.value
202
- )
203
- currentTimeToLocal.value = $formattedTime(newValue, '', true)
204
- },
205
- })
206
- </script>
207
-
208
- <style>
209
- :root {
210
- --chart-options-timespan-blocks-bg: #ffffff;
211
- --chart-options-timespan-blocks-title-color: #4d5d69;
212
- }
213
- :root.dark-theme {
214
- --chart-options-timespan-blocks-bg: #334453;
215
- --chart-options-timespan-blocks-title-color: #e9eaec;
216
- }
217
- </style>
218
- <style scoped lang="scss">
219
- .timespan-form-container {
220
- padding: 12px;
221
- background: var(--chart-options-timespan-blocks-bg);
222
- box-shadow: 0 1px 4px 0 #00000014;
223
- border-radius: 8px;
224
-
225
- .block-title {
226
- color: var(--chart-options-timespan-blocks-title-color);
227
- font-size: 14px;
228
- font-weight: 500;
229
- margin-bottom: 16px;
230
- }
231
- .radio-container {
232
- display: flex;
233
- flex-direction: column;
234
- grid-gap: 12px;
235
- margin-top: 16px;
236
-
237
- .ui-radio-block {
238
- height: 20px;
239
- display: flex;
240
- }
241
- .row-container {
242
- display: grid;
243
- grid-template-columns: 1fr 1fr;
244
- grid-gap: 12px;
245
-
246
- :deep(.ui-input-with-datepicker) {
247
- grid-gap: 12px;
248
- }
249
- }
250
- :deep(.ui-input-with-datepicker) {
251
- grid-gap: 12px;
252
- }
253
- }
254
-
255
- .date-time-info {
256
- font-weight: 400;
257
- font-size: 12px;
258
- color: #9da6ad;
259
- margin-top: 16px;
260
- }
261
- }
262
- </style>
1
+ <template>
2
+ <div class="timespan-form-container">
3
+ <p class="block-title">{{ localization.inventoryMonitor.timespan }}</p>
4
+ <ui-select
5
+ v-model="localSelectedTimespanLocal"
6
+ :items="constructedTimespanOptions"
7
+ test-id="timespan-local"
8
+ select-width="100%"
9
+ size="md"
10
+ :margin-between-trigger="4"
11
+ />
12
+
13
+ <div class="radio-container">
14
+ <div class="ui-radio-block">
15
+ <ui-radio
16
+ v-model="localPeriodTypeLocal"
17
+ :label="localization.common.last"
18
+ :disabled="isDisabledCustomForm"
19
+ test-id="last-from"
20
+ value="last"
21
+ size="md"
22
+ />
23
+ </div>
24
+ <div class="row-container">
25
+ <ui-input
26
+ v-model="localLastLocal"
27
+ :disabled="isDisabledCustomFormLast"
28
+ :placeholder="localization.common.last"
29
+ :error="props.errorLastInput"
30
+ test-id="local-last"
31
+ />
32
+ <ui-select
33
+ v-model="localSelectedCustomTimeLocal"
34
+ :items="constructedCustomTimeOptions"
35
+ :disabled="isDisabledCustomFormLast"
36
+ :margin-between-trigger="4"
37
+ test-id="custom-time"
38
+ select-width="100%"
39
+ size="md"
40
+ />
41
+ </div>
42
+ </div>
43
+ <div class="radio-container">
44
+ <div class="ui-radio-block">
45
+ <ui-radio
46
+ v-model="localPeriodTypeLocal"
47
+ :label="localization.common.timeRange"
48
+ :disabled="isDisabledCustomForm"
49
+ test-id="last-from"
50
+ value="period"
51
+ size="md"
52
+ />
53
+ </div>
54
+
55
+ <ui-input-with-datepicker
56
+ id="date-from"
57
+ v-model="constructedDateFromLocal"
58
+ :format="datepickerFormat"
59
+ :disabled="isDisabledCustomFormRange"
60
+ :error="props.errorDateFrom"
61
+ :error-timepicker="props.errorTimeFrom"
62
+ test-id="date-from"
63
+ time-format="12"
64
+ />
65
+
66
+ <ui-input-with-datepicker
67
+ id="date-to"
68
+ v-model="constructedDateToLocal"
69
+ :format="datepickerFormat"
70
+ :disabled="isDisabledCustomFormRange"
71
+ :error="props.errorDateTo"
72
+ :error-timepicker="props.errorTimeTo"
73
+ test-id="date-to"
74
+ time-format="12"
75
+ />
76
+ </div>
77
+ <p class="date-time-info">
78
+ {{ localization.inventoryMonitor.dateTimeIsoFormat }}
79
+ </p>
80
+ </div>
81
+ </template>
82
+
83
+ <script setup lang="ts">
84
+ import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
85
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
86
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
87
+ import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
88
+
89
+ const localSelectedTimespanLocal = defineModel<string>(
90
+ 'localSelectedTimespan',
91
+ { required: true }
92
+ )
93
+ const localPeriodTypeLocal = defineModel<string>('localPeriodType', {
94
+ required: true,
95
+ })
96
+ const localLastLocal = defineModel<number>('localLast', {
97
+ required: true,
98
+ })
99
+ const localSelectedCustomTimeLocal = defineModel<string>(
100
+ 'localSelectedCustomTime',
101
+ {
102
+ required: true,
103
+ }
104
+ )
105
+ const localCurrentDateFromLocal = defineModel<string>('localCurrentDateFrom', {
106
+ required: true,
107
+ })
108
+ const currentTimeFromLocal = defineModel<string>('currentTimeFrom', {
109
+ required: true,
110
+ })
111
+ const currentTimeToLocal = defineModel<string>('currentTimeTo', {
112
+ required: true,
113
+ })
114
+ const currentDateToLocal = defineModel<string>('currentDateTo', {
115
+ required: true,
116
+ })
117
+
118
+ const props = defineProps<{
119
+ timespanOptions: UI_I_OptionItem[]
120
+ customTimeOptions: UI_I_OptionItem[]
121
+ language: string
122
+ errorLastInput?: string
123
+ errorDateFrom?: string
124
+ errorTimeFrom?: string
125
+ errorDateTo?: string
126
+ errorTimeTo?: string
127
+ }>()
128
+
129
+ const {
130
+ $isDate,
131
+ $getUnixByDate,
132
+ $formattedDate,
133
+ $formattedTime,
134
+ $getDateFormat,
135
+ } = useNuxtApp()
136
+
137
+ const localization = computed<UI_I_Localization>(() => useLocal())
138
+
139
+ const isDisabledCustomForm = computed<boolean>(
140
+ () => localSelectedTimespanLocal.value !== 'custom_interval'
141
+ )
142
+ const isDisabledCustomFormLast = computed<boolean>(
143
+ () => isDisabledCustomForm.value || localPeriodTypeLocal.value !== 'last'
144
+ )
145
+ const isDisabledCustomFormRange = computed<boolean>(
146
+ () => isDisabledCustomForm.value || localPeriodTypeLocal.value !== 'period'
147
+ )
148
+
149
+ const constructedTimespanOptions = computed<UI_I_Dropdown[]>(() =>
150
+ props.timespanOptions.map((item) => {
151
+ return {
152
+ text: item.text,
153
+ value: item.value,
154
+ }
155
+ })
156
+ )
157
+
158
+ const constructedCustomTimeOptions = computed<UI_I_Dropdown[]>(() =>
159
+ props.customTimeOptions.map((item) => {
160
+ return {
161
+ text: item.text,
162
+ value: item.value,
163
+ }
164
+ })
165
+ )
166
+
167
+ const datepickerFormat = computed<string>(() =>
168
+ getUiDatepickerFormatByLanguage(props.language)
169
+ )
170
+ const dateFormatForUpdate = ref<string>($getDateFormat(props.language))
171
+ const constructedDateFromLocal = computed<number>({
172
+ get() {
173
+ // TODO fix PM
174
+ return $isDate(localCurrentDateFromLocal.value)
175
+ ? $getUnixByDate(
176
+ localCurrentDateFromLocal.value + ' ' + currentTimeFromLocal.value
177
+ )
178
+ : 0
179
+ },
180
+ set(newValue) {
181
+ localCurrentDateFromLocal.value = $formattedDate(
182
+ new Date(newValue),
183
+ dateFormatForUpdate.value
184
+ )
185
+ currentTimeFromLocal.value = $formattedTime(newValue, '', true)
186
+ },
187
+ })
188
+
189
+ const constructedDateToLocal = computed<number>({
190
+ get() {
191
+ // TODO fix PM
192
+ return $isDate(currentDateToLocal.value)
193
+ ? $getUnixByDate(
194
+ currentDateToLocal.value + ' ' + currentTimeToLocal.value
195
+ )
196
+ : 0
197
+ },
198
+ set(newValue) {
199
+ currentDateToLocal.value = $formattedDate(
200
+ new Date(newValue),
201
+ dateFormatForUpdate.value
202
+ )
203
+ currentTimeToLocal.value = $formattedTime(newValue, '', true)
204
+ },
205
+ })
206
+ </script>
207
+
208
+ <style>
209
+ :root {
210
+ --chart-options-timespan-blocks-bg: #ffffff;
211
+ --chart-options-timespan-blocks-title-color: #4d5d69;
212
+ }
213
+ :root.dark-theme {
214
+ --chart-options-timespan-blocks-bg: #334453;
215
+ --chart-options-timespan-blocks-title-color: #e9eaec;
216
+ }
217
+ </style>
218
+ <style scoped lang="scss">
219
+ .timespan-form-container {
220
+ padding: 12px;
221
+ background: var(--chart-options-timespan-blocks-bg);
222
+ box-shadow: 0 1px 4px 0 #00000014;
223
+ border-radius: 8px;
224
+
225
+ .block-title {
226
+ color: var(--chart-options-timespan-blocks-title-color);
227
+ font-size: 14px;
228
+ font-weight: 500;
229
+ margin-bottom: 16px;
230
+ }
231
+ .radio-container {
232
+ display: flex;
233
+ flex-direction: column;
234
+ grid-gap: 12px;
235
+ margin-top: 16px;
236
+
237
+ .ui-radio-block {
238
+ height: 20px;
239
+ display: flex;
240
+ }
241
+ .row-container {
242
+ display: grid;
243
+ grid-template-columns: 1fr 1fr;
244
+ grid-gap: 12px;
245
+
246
+ :deep(.ui-input-with-datepicker) {
247
+ grid-gap: 12px;
248
+ }
249
+ }
250
+ :deep(.ui-input-with-datepicker) {
251
+ grid-gap: 12px;
252
+ }
253
+ }
254
+
255
+ .date-time-info {
256
+ font-weight: 400;
257
+ font-size: 12px;
258
+ color: #9da6ad;
259
+ margin-top: 16px;
260
+ }
261
+ }
262
+ </style>