@webitel/ui-sdk 25.4.50 → 25.4.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.4.50",
3
+ "version": "25.4.51",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -17,16 +17,19 @@
17
17
  </slot>
18
18
  </wt-label>
19
19
  <div class="wt-timepicker__wrapper">
20
- <wt-time-input
21
- v-if="isDay"
22
- :disabled="disabled"
23
- :label="labelDays"
24
- :max-value="dateMode ? null : 365"
25
- :v="v"
26
- :value="day"
27
- hide-input-info
28
- @input="day = $event"
29
- />
20
+
21
+ <!-- [https://webitel.atlassian.net/browse/WTEL-6651]-->
22
+
23
+ <!-- <wt-time-input-->
24
+ <!-- v-if="isDay"-->
25
+ <!-- :disabled="disabled"-->
26
+ <!-- :label="labelDays"-->
27
+ <!-- :max-value="dateMode ? null : 365"-->
28
+ <!-- :v="v"-->
29
+ <!-- :value="day"-->
30
+ <!-- hide-input-info-->
31
+ <!-- @input="day = $event"-->
32
+ <!-- />-->
30
33
  <wt-time-input
31
34
  v-if="isHour"
32
35
  :disabled="disabled"
@@ -35,8 +38,8 @@
35
38
  :v="v"
36
39
  :value="hour"
37
40
  hide-input-info
38
- @input="hour = $event"
39
41
  @blur="onHoursBlurEvent"
42
+ @input="hour = $event"
40
43
  />
41
44
  <wt-time-input
42
45
  v-if="isMin"
@@ -71,7 +74,7 @@
71
74
  <script>
72
75
  import validationMixin from '../../mixins/validationMixin/validationMixin.js';
73
76
 
74
- const SEC_IN_DAY = 60 * 60 * 24;
77
+ // const SEC_IN_DAY = 60 * 60 * 24;
75
78
  const SEC_IN_HOUR = 60 * 60;
76
79
  const SEC_IN_MIN = 60;
77
80
 
@@ -108,7 +111,7 @@ export default {
108
111
  },
109
112
 
110
113
  /**
111
- * Time format, can be "dd:hh:mm:ss", "hh:mm:ss", "mm:ss", "ss"
114
+ * Time format, can be "hh:mm:ss", "mm:ss", "ss"
112
115
  */
113
116
  format: {
114
117
  type: String,
@@ -139,9 +142,9 @@ export default {
139
142
  },
140
143
 
141
144
  computed: {
142
- isDay() {
143
- return this.format.includes('dd');
144
- },
145
+ // isDay() {
146
+ // return this.format.includes('dd');
147
+ // },
145
148
  isHour() {
146
149
  return this.format.includes('hh');
147
150
  },
@@ -151,10 +154,10 @@ export default {
151
154
  isSec() {
152
155
  return this.format.includes('ss');
153
156
  },
154
- labelDays() {
155
- if (this.noLabel) return null;
156
- return this.label ? null : this.$t('webitelUI.timepicker.day');
157
- },
157
+ // labelDays() {
158
+ // if (this.noLabel) return null;
159
+ // return this.label ? null : this.$t('webitelUI.timepicker.day');
160
+ // },
158
161
  labelHours() {
159
162
  if (this.noLabel) return null;
160
163
  return this.label ? null : this.$t('webitelUI.timepicker.hour');
@@ -167,24 +170,29 @@ export default {
167
170
  if (this.noLabel) return null;
168
171
  return this.label ? null : this.$t('webitelUI.timepicker.sec');
169
172
  },
170
- day: {
171
- get() {
172
- return this.dateMode
173
- ? new Date(+this.value).getDay()
174
- : Math.floor(this.value / SEC_IN_DAY);
175
- },
176
- set(value) {
177
- const newValue = this.dateMode
178
- ? new Date(this.value).setDate(value)
179
- : this.value - this.day * SEC_IN_DAY + value * SEC_IN_DAY;
180
- this.$emit('input', newValue);
181
- },
182
- },
173
+
174
+ // https://webitel.atlassian.net/browse/WTEL-6651?focusedCommentId=664296
175
+ // There is no need to enter days at the moment, but functionality is reserved for future
176
+
177
+ // day: {
178
+ // get() {
179
+ // return this.dateMode
180
+ // ? new Date(+this.value).getDay()
181
+ // : Math.floor(this.value / SEC_IN_DAY);
182
+ // },
183
+ // set(value) {
184
+ // const newValue = this.dateMode
185
+ // ? new Date(this.value).setDate(value)
186
+ // : this.value - this.day * SEC_IN_DAY + value * SEC_IN_DAY;
187
+ // this.$emit('input', newValue);
188
+ // },
189
+ // },
183
190
  hour: {
184
191
  get() {
185
192
  return this.dateMode
186
193
  ? new Date(+this.value).getHours()
187
- : Math.floor((this.value % SEC_IN_DAY) / SEC_IN_HOUR);
194
+ : Math.floor(this.value / SEC_IN_HOUR);
195
+ // : Math.floor((this.value % SEC_IN_DAY) / SEC_IN_HOUR);
188
196
  },
189
197
  set(value) {
190
198
  const newValue = this.dateMode
@@ -256,8 +264,8 @@ export default {
256
264
  }
257
265
 
258
266
  .wt-time-input {
259
- margin-right: var(--timepicker-input-margin);
260
267
  width: var(--timepicker-input-width);
268
+ margin-right: var(--timepicker-input-margin);
261
269
 
262
270
  &:last-child {
263
271
  margin-right: 0;