@onereach/ui-components-vue2 18.1.0-beta.4926.0 → 18.2.1
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/dist/bundled/{OrDateTimePickerTimeSelect-9323d799.js → OrDateTimePickerTimeSelect-08982514.js} +34 -27
- package/dist/bundled/components/OrDateTimePickerV3/OrDateTimePicker.js +12 -2
- package/dist/bundled/components/OrDateTimePickerV3/index.js +1 -1
- package/dist/bundled/components/OrIconButtonV3/OrIconButton.js +46 -24
- package/dist/bundled/components/OrTimePickerV3/OrTimePicker.js +11 -1
- package/dist/bundled/components/OrTimeRangePickerV3/OrTimeRangePicker.js +13 -1
- package/dist/bundled/components/index.js +1 -1
- package/dist/bundled/index.js +1 -1
- package/dist/esm/{OrDateTimePicker-8538e810.js → OrDateTimePicker-a35cc5b7.js} +4 -2
- package/dist/esm/{OrDateTimePicker.vue_rollup-plugin-vue_script-b00eee5d.js → OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js} +8 -0
- package/dist/esm/components/index.js +3 -3
- package/dist/esm/components/or-data-grid-v3/index.js +3 -3
- package/dist/esm/components/or-data-grid-v3/partials/index.js +3 -3
- package/dist/esm/components/or-date-format-v3/index.js +1 -1
- package/dist/esm/components/or-date-picker-v3/index.js +1 -1
- package/dist/esm/components/or-date-range-picker-v3/index.js +1 -1
- package/dist/esm/components/or-date-time-format-v3/index.js +1 -1
- package/dist/esm/components/or-date-time-picker-v3/index.js +2 -2
- package/dist/esm/components/or-date-time-picker-v3/partials/index.js +34 -27
- package/dist/esm/components/or-icon-button-v3/index.js +46 -24
- package/dist/esm/components/or-time-format-v3/index.js +1 -1
- package/dist/esm/components/or-time-picker-v3/index.js +11 -1
- package/dist/esm/components/or-time-range-picker-v3/index.js +13 -1
- package/dist/esm/{index-e01016f0.js → index-4e09dbe7.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/package.json +4 -3
|
@@ -183,6 +183,14 @@ var script = defineComponent({
|
|
|
183
183
|
type: Function,
|
|
184
184
|
default: undefined
|
|
185
185
|
},
|
|
186
|
+
hourStep: {
|
|
187
|
+
type: Number,
|
|
188
|
+
default: 1
|
|
189
|
+
},
|
|
190
|
+
minuteStep: {
|
|
191
|
+
type: Number,
|
|
192
|
+
default: 1
|
|
193
|
+
},
|
|
186
194
|
isActive: {
|
|
187
195
|
type: Boolean,
|
|
188
196
|
default: false
|
|
@@ -194,8 +202,8 @@ var script = defineComponent({
|
|
|
194
202
|
var _a;
|
|
195
203
|
// Refs & Styles
|
|
196
204
|
const root = ref();
|
|
197
|
-
const
|
|
198
|
-
const
|
|
205
|
+
const hoursButtons = ref([]);
|
|
206
|
+
const minutesButtons = ref([]);
|
|
199
207
|
const rootStyles = computed(() => ['or-date-time-picker-time-select-v3', ...DateTimePickerTimeSelect]);
|
|
200
208
|
const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
|
|
201
209
|
const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
|
|
@@ -220,15 +228,17 @@ var script = defineComponent({
|
|
|
220
228
|
if (!isActive || !model.value) {
|
|
221
229
|
return;
|
|
222
230
|
}
|
|
223
|
-
|
|
231
|
+
const activeHourButton = getActiveButton(hoursButtons.value, hoursOptions.value);
|
|
232
|
+
const activeMinuteButton = getActiveButton(minutesButtons.value, minutesOptions.value);
|
|
233
|
+
if (activeHourButton) {
|
|
224
234
|
// scroll to the active hour button within the hours container.
|
|
225
|
-
|
|
235
|
+
activeHourButton.scrollIntoView({
|
|
226
236
|
block: 'center'
|
|
227
237
|
});
|
|
228
238
|
}
|
|
229
|
-
if (
|
|
239
|
+
if (activeMinuteButton) {
|
|
230
240
|
// scroll to the active minute button within the minutes container.
|
|
231
|
-
|
|
241
|
+
activeMinuteButton.scrollIntoView({
|
|
232
242
|
block: 'center'
|
|
233
243
|
});
|
|
234
244
|
}
|
|
@@ -248,11 +258,12 @@ var script = defineComponent({
|
|
|
248
258
|
return props.format;
|
|
249
259
|
});
|
|
250
260
|
const hoursOptions = computed(() => {
|
|
261
|
+
const hourStep = props.hourStep > 0 ? props.hourStep : 1;
|
|
251
262
|
return Array.from({
|
|
252
|
-
length: 24
|
|
263
|
+
length: Math.ceil(24 / hourStep)
|
|
253
264
|
}, (_value, index) => {
|
|
254
265
|
var _a, _b, _c, _d;
|
|
255
|
-
const value = index;
|
|
266
|
+
const value = index * hourStep;
|
|
256
267
|
return new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), value, ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCMinutes()));
|
|
257
268
|
}).filter(value => {
|
|
258
269
|
if (proxyTimeFormat.value === TimeFormat.H23) {
|
|
@@ -267,11 +278,12 @@ var script = defineComponent({
|
|
|
267
278
|
});
|
|
268
279
|
});
|
|
269
280
|
const minutesOptions = computed(() => {
|
|
281
|
+
const minuteStep = props.minuteStep > 0 ? props.minuteStep : 1;
|
|
270
282
|
return Array.from({
|
|
271
|
-
length: 60
|
|
283
|
+
length: Math.ceil(60 / minuteStep)
|
|
272
284
|
}, (_value, index) => {
|
|
273
285
|
var _a, _b, _c, _d;
|
|
274
|
-
const value = index;
|
|
286
|
+
const value = index * minuteStep;
|
|
275
287
|
return new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCHours(), value));
|
|
276
288
|
});
|
|
277
289
|
});
|
|
@@ -286,19 +298,20 @@ var script = defineComponent({
|
|
|
286
298
|
function formatMinutes(value) {
|
|
287
299
|
return String(value.getUTCMinutes()).padStart(2, '0');
|
|
288
300
|
}
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
301
|
+
function sortElementsByPosition(elements) {
|
|
302
|
+
return [...elements].sort((a, b) => {
|
|
303
|
+
return a.root.compareDocumentPosition(b.root) & 2 ? 1 : -1;
|
|
304
|
+
});
|
|
293
305
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
306
|
+
function getActiveButton(buttons, options) {
|
|
307
|
+
var _a;
|
|
308
|
+
return (_a = sortElementsByPosition(buttons).find((button, index) => Number(model.value) === Number(options[index]))) === null || _a === void 0 ? void 0 : _a.root;
|
|
298
309
|
}
|
|
299
310
|
return {
|
|
300
311
|
root,
|
|
301
312
|
rootStyles,
|
|
313
|
+
hoursButtons,
|
|
314
|
+
minutesButtons,
|
|
302
315
|
buttonGroupStyles,
|
|
303
316
|
buttonGroupItemStyles,
|
|
304
317
|
model,
|
|
@@ -307,9 +320,7 @@ var script = defineComponent({
|
|
|
307
320
|
hoursOptions,
|
|
308
321
|
minutesOptions,
|
|
309
322
|
formatHours,
|
|
310
|
-
formatMinutes
|
|
311
|
-
setActiveHourButtonRef,
|
|
312
|
-
setActiveMinuteButtonRef
|
|
323
|
+
formatMinutes
|
|
313
324
|
};
|
|
314
325
|
}
|
|
315
326
|
});
|
|
@@ -330,9 +341,7 @@ var __vue_render__ = function () {
|
|
|
330
341
|
}, _vm._l(_vm.hoursOptions, function (value) {
|
|
331
342
|
return _c('OrButton', {
|
|
332
343
|
key: Number(value),
|
|
333
|
-
ref:
|
|
334
|
-
return _vm.setActiveHourButtonRef(el, value);
|
|
335
|
-
},
|
|
344
|
+
ref: 'hoursButtons',
|
|
336
345
|
refInFor: true,
|
|
337
346
|
class: _vm.buttonGroupItemStyles,
|
|
338
347
|
attrs: {
|
|
@@ -352,9 +361,7 @@ var __vue_render__ = function () {
|
|
|
352
361
|
}, _vm._l(_vm.minutesOptions, function (value) {
|
|
353
362
|
return _c('OrButton', {
|
|
354
363
|
key: Number(value),
|
|
355
|
-
ref:
|
|
356
|
-
return _vm.setActiveMinuteButtonRef(el, value);
|
|
357
|
-
},
|
|
364
|
+
ref: 'minutesButtons',
|
|
358
365
|
refInFor: true,
|
|
359
366
|
class: _vm.buttonGroupItemStyles,
|
|
360
367
|
attrs: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
|
|
2
2
|
import { O as OrDateTimePickerDateControl, a as OrDateTimePickerDateSelect, b as OrDateTimePickerMonthSelect } from '../../OrDateTimePickerMonthSelect-ae771d05.js';
|
|
3
3
|
import { O as OrDateTimePickerMobileControl, a as OrDateTimePickerPopoverFooter, b as OrDateTimePickerPopoverHeader } from '../../OrDateTimePickerPopoverHeader-4cf1ef26.js';
|
|
4
|
-
import { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-
|
|
4
|
+
import { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-08982514.js';
|
|
5
5
|
import { DateTimePicker, DateTimePickerDatePopover, DateTimePickerTimePopover } from './styles.js';
|
|
6
6
|
import __vue_component__$1 from '../OrErrorV3/OrError.js';
|
|
7
7
|
import __vue_component__$2 from '../OrHintV3/OrHint.js';
|
|
@@ -86,6 +86,14 @@ var script = defineComponent({
|
|
|
86
86
|
type: Function,
|
|
87
87
|
default: undefined
|
|
88
88
|
},
|
|
89
|
+
hourStep: {
|
|
90
|
+
type: Number,
|
|
91
|
+
default: 1
|
|
92
|
+
},
|
|
93
|
+
minuteStep: {
|
|
94
|
+
type: Number,
|
|
95
|
+
default: 1
|
|
96
|
+
},
|
|
89
97
|
variant: {
|
|
90
98
|
type: String,
|
|
91
99
|
default: undefined
|
|
@@ -481,7 +489,9 @@ var __vue_render__ = function () {
|
|
|
481
489
|
"locale": _vm.resolvedLocale,
|
|
482
490
|
"hours-filter": _vm.hoursFilter,
|
|
483
491
|
"minutes-filter": _vm.minutesFilter,
|
|
484
|
-
"is-active": _vm.timePopover && _vm.timePopover.state === 'open'
|
|
492
|
+
"is-active": _vm.timePopover && _vm.timePopover.state === 'open',
|
|
493
|
+
"hour-step": _vm.hourStep,
|
|
494
|
+
"minute-step": _vm.minuteStep
|
|
485
495
|
},
|
|
486
496
|
model: {
|
|
487
497
|
value: _vm.draft,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as OrDateTimePickerV3 } from './OrDateTimePicker.js';
|
|
2
2
|
export { O as OrDateTimePickerDateControl, a as OrDateTimePickerDateSelect, b as OrDateTimePickerMonthSelect } from '../../OrDateTimePickerMonthSelect-ae771d05.js';
|
|
3
3
|
export { O as OrDateTimePickerMobileControl, a as OrDateTimePickerPopoverFooter, b as OrDateTimePickerPopoverHeader } from '../../OrDateTimePickerPopoverHeader-4cf1ef26.js';
|
|
4
|
-
export { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-
|
|
4
|
+
export { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-08982514.js';
|
|
5
5
|
export { formatDate } from './utils/formatDate.js';
|
|
6
6
|
export { formatMobileDate } from './utils/formatMobileDate.js';
|
|
7
7
|
export { formatMobileTime } from './utils/formatMobileTime.js';
|
|
@@ -4,7 +4,7 @@ import { IconButtonColor } from './props.js';
|
|
|
4
4
|
import { IconButton, IconButtonColors } from './styles.js';
|
|
5
5
|
import __vue_component__$1 from '../OrIconV3/OrIcon.js';
|
|
6
6
|
import __vue_component__$2 from '../OrTooltipV3/OrTooltip.js';
|
|
7
|
-
import { IconSize } from '../OrIconV3/props.js';
|
|
7
|
+
import { IconSize, IconVariant } from '../OrIconV3/props.js';
|
|
8
8
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
9
9
|
|
|
10
10
|
var script = defineComponent({
|
|
@@ -13,7 +13,6 @@ var script = defineComponent({
|
|
|
13
13
|
OrIcon: __vue_component__$1,
|
|
14
14
|
OrTooltip: __vue_component__$2
|
|
15
15
|
},
|
|
16
|
-
inheritAttrs: false,
|
|
17
16
|
props: {
|
|
18
17
|
// TODO: Remove after migration to Vue 3
|
|
19
18
|
additionalStyles: {
|
|
@@ -50,11 +49,31 @@ var script = defineComponent({
|
|
|
50
49
|
setup(props) {
|
|
51
50
|
// Refs
|
|
52
51
|
const root = ref();
|
|
52
|
+
const tooltipRef = ref();
|
|
53
|
+
const iconProps = computed(() => {
|
|
54
|
+
return typeof props.icon === 'string' ? {
|
|
55
|
+
icon: props.icon,
|
|
56
|
+
variant: IconVariant.Inherit,
|
|
57
|
+
size: props.size
|
|
58
|
+
} : {
|
|
59
|
+
variant: IconVariant.Inherit,
|
|
60
|
+
size: props.size,
|
|
61
|
+
...props.icon
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
const tooltipProps = computed(() => {
|
|
65
|
+
return typeof props.tooltip === 'string' ? {
|
|
66
|
+
content: props.tooltip
|
|
67
|
+
} : props.tooltip;
|
|
68
|
+
});
|
|
53
69
|
// Styles
|
|
54
|
-
const rootStyles = computed(() => ['or-icon-button-v3', ...IconButton, ...IconButtonColors[props.color]]);
|
|
70
|
+
const rootStyles = computed(() => ['or-icon-button-v3', ...IconButton, ...IconButtonColors[props.color], ...props.additionalStyles]);
|
|
55
71
|
return {
|
|
56
72
|
root,
|
|
73
|
+
tooltipRef,
|
|
57
74
|
rootStyles,
|
|
75
|
+
iconProps,
|
|
76
|
+
tooltipProps,
|
|
58
77
|
isVue3
|
|
59
78
|
};
|
|
60
79
|
}
|
|
@@ -68,25 +87,23 @@ var __vue_render__ = function () {
|
|
|
68
87
|
var _vm = this;
|
|
69
88
|
var _h = _vm.$createElement;
|
|
70
89
|
var _c = _vm._self._c || _h;
|
|
71
|
-
return _c('
|
|
72
|
-
scopedSlots: _vm._u([_vm.$slots.tooltipContent ? {
|
|
73
|
-
key: "content",
|
|
74
|
-
fn: function () {
|
|
75
|
-
return [_vm._t("tooltipContent")];
|
|
76
|
-
},
|
|
77
|
-
proxy: true
|
|
78
|
-
} : null], null, true)
|
|
79
|
-
}, 'OrTooltip', typeof _vm.tooltip === 'string' ? {
|
|
80
|
-
content: _vm.tooltip
|
|
81
|
-
} : _vm.tooltip, false), [_c('button', _vm._g(_vm._b({
|
|
90
|
+
return _c('button', _vm._g({
|
|
82
91
|
ref: 'root',
|
|
83
|
-
class:
|
|
92
|
+
class: _vm.rootStyles,
|
|
84
93
|
attrs: {
|
|
85
94
|
"type": 'button',
|
|
86
95
|
"selected": _vm.selected,
|
|
87
96
|
"disabled": _vm.disabled
|
|
97
|
+
},
|
|
98
|
+
on: {
|
|
99
|
+
"mouseover": function ($event) {
|
|
100
|
+
_vm.tooltipRef && _vm.tooltipRef.open();
|
|
101
|
+
},
|
|
102
|
+
"mouseout": function ($event) {
|
|
103
|
+
_vm.tooltipRef && _vm.tooltipRef.close();
|
|
104
|
+
}
|
|
88
105
|
}
|
|
89
|
-
},
|
|
106
|
+
}, Object.assign({}, _vm.isVue3 ? {} : _vm.$listeners, {
|
|
90
107
|
click: function (e) {
|
|
91
108
|
return _vm.$emit('click', e);
|
|
92
109
|
},
|
|
@@ -96,14 +113,19 @@ var __vue_render__ = function () {
|
|
|
96
113
|
blur: function (e) {
|
|
97
114
|
return _vm.$emit('blur', e);
|
|
98
115
|
}
|
|
99
|
-
})), [_c('OrIcon', _vm._b({}, 'OrIcon',
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
})), [_c('OrIcon', _vm._b({}, 'OrIcon', _vm.iconProps, false)), _vm._v(" "), _c('OrTooltip', _vm._b({
|
|
117
|
+
ref: "tooltipRef",
|
|
118
|
+
attrs: {
|
|
119
|
+
"trigger": _vm.root
|
|
120
|
+
},
|
|
121
|
+
scopedSlots: _vm._u([_vm.$slots.tooltipContent ? {
|
|
122
|
+
key: "content",
|
|
123
|
+
fn: function () {
|
|
124
|
+
return [_vm._t("tooltipContent")];
|
|
125
|
+
},
|
|
126
|
+
proxy: true
|
|
127
|
+
} : null], null, true)
|
|
128
|
+
}, 'OrTooltip', _vm.tooltipProps, false))], 1);
|
|
107
129
|
};
|
|
108
130
|
var __vue_staticRenderFns__ = [];
|
|
109
131
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
|
|
2
2
|
import { TimePicker, TimePickerPopover } from './styles.js';
|
|
3
|
-
import { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-
|
|
3
|
+
import { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-08982514.js';
|
|
4
4
|
import { O as OrDateTimePickerMobileControl, a as OrDateTimePickerPopoverFooter, b as OrDateTimePickerPopoverHeader } from '../../OrDateTimePickerPopoverHeader-4cf1ef26.js';
|
|
5
5
|
import __vue_component__$1 from '../OrErrorV3/OrError.js';
|
|
6
6
|
import __vue_component__$2 from '../OrHintV3/OrHint.js';
|
|
@@ -64,6 +64,14 @@ var script = defineComponent({
|
|
|
64
64
|
type: Function,
|
|
65
65
|
default: undefined
|
|
66
66
|
},
|
|
67
|
+
hourStep: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 1
|
|
70
|
+
},
|
|
71
|
+
minuteStep: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 1
|
|
74
|
+
},
|
|
67
75
|
variant: {
|
|
68
76
|
type: String,
|
|
69
77
|
default: undefined
|
|
@@ -316,6 +324,8 @@ var __vue_render__ = function () {
|
|
|
316
324
|
"locale": _vm.resolvedLocale,
|
|
317
325
|
"hours-filter": _vm.hoursFilter,
|
|
318
326
|
"minutes-filter": _vm.minutesFilter,
|
|
327
|
+
"hour-step": _vm.hourStep,
|
|
328
|
+
"minute-step": _vm.minuteStep,
|
|
319
329
|
"is-active": _vm.popover && _vm.popover.state === 'open'
|
|
320
330
|
},
|
|
321
331
|
model: {
|
|
@@ -9,7 +9,7 @@ import __vue_component__$6 from '../OrLabelV3/OrLabel.js';
|
|
|
9
9
|
import __vue_component__$7 from '../OrPopoverV3/OrPopover.js';
|
|
10
10
|
import useResponsive from '../../hooks/useResponsive/useResponsive.js';
|
|
11
11
|
import { O as OrDateTimePickerMobileControl, a as OrDateTimePickerPopoverFooter, b as OrDateTimePickerPopoverHeader } from '../../OrDateTimePickerPopoverHeader-4cf1ef26.js';
|
|
12
|
-
import { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-
|
|
12
|
+
import { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../../OrDateTimePickerTimeSelect-08982514.js';
|
|
13
13
|
import { DropdownClose } from '../../directives/dropdown-close.js';
|
|
14
14
|
import { DropdownOpen } from '../../directives/dropdown-open.js';
|
|
15
15
|
import { a as InputBoxVariant } from '../../types-98e9a758.js';
|
|
@@ -57,6 +57,14 @@ var script = defineComponent({
|
|
|
57
57
|
type: String,
|
|
58
58
|
default: undefined
|
|
59
59
|
},
|
|
60
|
+
hourStep: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 1
|
|
63
|
+
},
|
|
64
|
+
minuteStep: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 1
|
|
67
|
+
},
|
|
60
68
|
variant: {
|
|
61
69
|
type: String,
|
|
62
70
|
default: undefined
|
|
@@ -390,6 +398,8 @@ var __vue_render__ = function () {
|
|
|
390
398
|
"initial-value": _vm.initialValueFrom,
|
|
391
399
|
"format": _vm.resolvedFormat,
|
|
392
400
|
"locale": _vm.resolvedLocale,
|
|
401
|
+
"hour-step": _vm.hourStep,
|
|
402
|
+
"minute-step": _vm.minuteStep,
|
|
393
403
|
"is-active": _vm.popover && _vm.popover.state === 'open'
|
|
394
404
|
},
|
|
395
405
|
model: {
|
|
@@ -405,6 +415,8 @@ var __vue_render__ = function () {
|
|
|
405
415
|
"initial-value": _vm.initialValueTo,
|
|
406
416
|
"format": _vm.resolvedFormat,
|
|
407
417
|
"locale": _vm.resolvedLocale,
|
|
418
|
+
"hour-step": _vm.hourStep,
|
|
419
|
+
"minute-step": _vm.minuteStep,
|
|
408
420
|
"is-active": _vm.popover && _vm.popover.state === 'open'
|
|
409
421
|
},
|
|
410
422
|
model: {
|
|
@@ -54,7 +54,7 @@ export { DEFAULT_TEXT, OrDateTimePickerItemTypes, OrDateTimePickerTypes } from '
|
|
|
54
54
|
export { default as OrDateTimePickerV3 } from './OrDateTimePickerV3/OrDateTimePicker.js';
|
|
55
55
|
export { O as OrDateTimePickerDateControl, a as OrDateTimePickerDateSelect, b as OrDateTimePickerMonthSelect } from '../OrDateTimePickerMonthSelect-ae771d05.js';
|
|
56
56
|
export { O as OrDateTimePickerMobileControl, a as OrDateTimePickerPopoverFooter, b as OrDateTimePickerPopoverHeader } from '../OrDateTimePickerPopoverHeader-4cf1ef26.js';
|
|
57
|
-
export { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../OrDateTimePickerTimeSelect-
|
|
57
|
+
export { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from '../OrDateTimePickerTimeSelect-08982514.js';
|
|
58
58
|
export { formatDate } from './OrDateTimePickerV3/utils/formatDate.js';
|
|
59
59
|
export { formatMobileDate } from './OrDateTimePickerV3/utils/formatMobileDate.js';
|
|
60
60
|
export { formatMobileTime } from './OrDateTimePickerV3/utils/formatMobileTime.js';
|
package/dist/bundled/index.js
CHANGED
|
@@ -113,7 +113,7 @@ export { ConfirmType } from './components/OrConfirmV3/props.js';
|
|
|
113
113
|
export { DEFAULT_TEXT, OrDateTimePickerItemTypes, OrDateTimePickerTypes } from './components/OrDateTimePicker/constants.js';
|
|
114
114
|
export { O as OrDateTimePickerDateControl, a as OrDateTimePickerDateSelect, b as OrDateTimePickerMonthSelect } from './OrDateTimePickerMonthSelect-ae771d05.js';
|
|
115
115
|
export { O as OrDateTimePickerMobileControl, a as OrDateTimePickerPopoverFooter, b as OrDateTimePickerPopoverHeader } from './OrDateTimePickerPopoverHeader-4cf1ef26.js';
|
|
116
|
-
export { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from './OrDateTimePickerTimeSelect-
|
|
116
|
+
export { O as OrDateTimePickerTimeControl, a as OrDateTimePickerTimeSelect } from './OrDateTimePickerTimeSelect-08982514.js';
|
|
117
117
|
export { formatDate } from './components/OrDateTimePickerV3/utils/formatDate.js';
|
|
118
118
|
export { formatMobileDate } from './components/OrDateTimePickerV3/utils/formatMobileDate.js';
|
|
119
119
|
export { formatMobileTime } from './components/OrDateTimePickerV3/utils/formatMobileTime.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as script } from './OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
1
|
+
import { s as script } from './OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
2
2
|
import { n as normalizeComponent } from './normalize-component-cf2db48b.js';
|
|
3
3
|
|
|
4
4
|
/* script */
|
|
@@ -225,7 +225,9 @@ var __vue_render__ = function () {
|
|
|
225
225
|
"locale": _vm.resolvedLocale,
|
|
226
226
|
"hours-filter": _vm.hoursFilter,
|
|
227
227
|
"minutes-filter": _vm.minutesFilter,
|
|
228
|
-
"is-active": _vm.timePopover && _vm.timePopover.state === 'open'
|
|
228
|
+
"is-active": _vm.timePopover && _vm.timePopover.state === 'open',
|
|
229
|
+
"hour-step": _vm.hourStep,
|
|
230
|
+
"minute-step": _vm.minuteStep
|
|
229
231
|
},
|
|
230
232
|
model: {
|
|
231
233
|
value: _vm.draft,
|
|
@@ -35,13 +35,13 @@ export { OrConfirm } from './or-confirm/index.js';
|
|
|
35
35
|
export { ConfirmType, OrConfirmV3 } from './or-confirm-v3/index.js';
|
|
36
36
|
export { OrContextMenuV3 } from './or-context-menu-v3/index.js';
|
|
37
37
|
export { OrDataGridV3 } from './or-data-grid-v3/index.js';
|
|
38
|
-
export { D as DataGridVariant } from '../index-
|
|
38
|
+
export { D as DataGridVariant } from '../index-4e09dbe7.js';
|
|
39
39
|
export { OrDateFormatV3 } from './or-date-format-v3/index.js';
|
|
40
40
|
export { OrDatePickerV3 } from './or-date-picker-v3/index.js';
|
|
41
41
|
export { OrDateRangePickerV3 } from './or-date-range-picker-v3/index.js';
|
|
42
42
|
export { OrDateTimeFormatV3 } from './or-date-time-format-v3/index.js';
|
|
43
43
|
export { DEFAULT_TEXT, OrDateTimePicker, OrDateTimePickerItemTypes, OrDateTimePickerTypes } from './or-date-time-picker/index.js';
|
|
44
|
-
export { _ as OrDateTimePickerV3 } from '../OrDateTimePicker-
|
|
44
|
+
export { _ as OrDateTimePickerV3 } from '../OrDateTimePicker-a35cc5b7.js';
|
|
45
45
|
export { OrDateTimePickerDateControl, OrDateTimePickerDateSelect, OrDateTimePickerMobileControl, OrDateTimePickerMonthSelect, OrDateTimePickerPopoverFooter, OrDateTimePickerPopoverHeader, OrDateTimePickerTimeControl, OrDateTimePickerTimeSelect } from './or-date-time-picker-v3/partials/index.js';
|
|
46
46
|
export { f as formatDate, a as formatTime } from '../formatTime-a1de80d6.js';
|
|
47
47
|
export { f as formatMobileDate, a as formatMobileTime, g as getCurrentDate } from '../getCurrentDate-9b88f8a8.js';
|
|
@@ -193,7 +193,7 @@ import '../styles-b98d8bf7.js';
|
|
|
193
193
|
import '../OrSkeletonRect.vue_rollup-plugin-vue_script-99ae0828.js';
|
|
194
194
|
import '../useTimeFormat-d9b2ba33.js';
|
|
195
195
|
import '../tokens/index.js';
|
|
196
|
-
import '../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
196
|
+
import '../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
197
197
|
import '../directives/index.js';
|
|
198
198
|
import 'lodash/padStart';
|
|
199
199
|
import '../useTimeMask-4bcbb554.js';
|
|
@@ -5,7 +5,7 @@ import { OrSearchV3 as __vue_component__$h } from '../or-search-v3/index.js';
|
|
|
5
5
|
import '../../OrSkeletonCircle.vue_rollup-plugin-vue_script-373399b7.js';
|
|
6
6
|
import '../../OrSkeletonRect.vue_rollup-plugin-vue_script-99ae0828.js';
|
|
7
7
|
import { OrSkeletonTextV3 as __vue_component__$i } from '../or-skeleton-v3/or-skeleton-text-v3/index.js';
|
|
8
|
-
import { _ as __vue_component__$2, a as __vue_component__$3, b as __vue_component__$4, c as __vue_component__$5, d as __vue_component__$6, e as __vue_component__$7, f as __vue_component__$8, g as __vue_component__$9, h as __vue_component__$a, i as __vue_component__$b, j as __vue_component__$c, k as __vue_component__$d, l as __vue_component__$e, m as __vue_component__$f, D as DataGridVariant } from '../../index-
|
|
8
|
+
import { _ as __vue_component__$2, a as __vue_component__$3, b as __vue_component__$4, c as __vue_component__$5, d as __vue_component__$6, e as __vue_component__$7, f as __vue_component__$8, g as __vue_component__$9, h as __vue_component__$a, i as __vue_component__$b, j as __vue_component__$c, k as __vue_component__$d, l as __vue_component__$e, m as __vue_component__$f, D as DataGridVariant } from '../../index-4e09dbe7.js';
|
|
9
9
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
10
10
|
import '../../useIdAttribute-524b67c6.js';
|
|
11
11
|
import '../../types/index.js';
|
|
@@ -56,12 +56,12 @@ import '../or-date-picker-v3/index.js';
|
|
|
56
56
|
import '../../directives/index.js';
|
|
57
57
|
import '../../useTimeFormat-d9b2ba33.js';
|
|
58
58
|
import '../../tokens/index.js';
|
|
59
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
59
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
60
60
|
import '../or-date-time-picker-v3/partials/index.js';
|
|
61
61
|
import '../../useTimeMask-4bcbb554.js';
|
|
62
62
|
import '../../formatTime-a1de80d6.js';
|
|
63
63
|
import '../../getCurrentDate-9b88f8a8.js';
|
|
64
|
-
import '../../OrDateTimePicker-
|
|
64
|
+
import '../../OrDateTimePicker-a35cc5b7.js';
|
|
65
65
|
import '../or-rating-v3/index.js';
|
|
66
66
|
import '../or-select-v3/index.js';
|
|
67
67
|
import '../../isString-f8e938a3.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrDataGridFooter, a as OrDataGridHeader, b as OrDataGridTable, c as OrDataGridTableContent, d as OrDataGridTableContentCell, e as OrDataGridTableContentRow, f as OrDataGridTableFooter, g as OrDataGridTableFooterCell, h as OrDataGridTableFooterRow, i as OrDataGridTableHeader, j as OrDataGridTableHeaderCell, k as OrDataGridTableHeaderRow, l as OrDataGridTablePlaceholder, m as OrDataGridToolbar } from '../../../index-
|
|
1
|
+
export { _ as OrDataGridFooter, a as OrDataGridHeader, b as OrDataGridTable, c as OrDataGridTableContent, d as OrDataGridTableContentCell, e as OrDataGridTableContentRow, f as OrDataGridTableFooter, g as OrDataGridTableFooterCell, h as OrDataGridTableFooterRow, i as OrDataGridTableHeader, j as OrDataGridTableHeaderCell, k as OrDataGridTableHeaderRow, l as OrDataGridTablePlaceholder, m as OrDataGridToolbar } from '../../../index-4e09dbe7.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../../normalize-component-cf2db48b.js';
|
|
4
4
|
import '../../../types/index.js';
|
|
@@ -19,7 +19,7 @@ import '../../or-date-picker-v3/index.js';
|
|
|
19
19
|
import '../../../directives/index.js';
|
|
20
20
|
import '../../../useTimeFormat-d9b2ba33.js';
|
|
21
21
|
import '../../../tokens/index.js';
|
|
22
|
-
import '../../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
22
|
+
import '../../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
23
23
|
import '../../or-error-v3/index.js';
|
|
24
24
|
import '../../or-hint-v3/index.js';
|
|
25
25
|
import '../../or-icon-button-v3/index.js';
|
|
@@ -50,7 +50,7 @@ import '../../or-loader-v3/index.js';
|
|
|
50
50
|
import '../../or-menu-item-v3/index.js';
|
|
51
51
|
import '../../or-menu-v3/index.js';
|
|
52
52
|
import '../../../getCurrentDate-9b88f8a8.js';
|
|
53
|
-
import '../../../OrDateTimePicker-
|
|
53
|
+
import '../../../OrDateTimePicker-a35cc5b7.js';
|
|
54
54
|
import '../../or-input-v3/index.js';
|
|
55
55
|
import '../../../useValidationAttributes-4631a740.js';
|
|
56
56
|
import '../../../style-inject.es-87955792.js';
|
|
@@ -5,7 +5,7 @@ import '@vueuse/core';
|
|
|
5
5
|
import '@onereach/styles/screens.json';
|
|
6
6
|
import '@onereach/styles/tailwind.config.json';
|
|
7
7
|
import '../../types/index.js';
|
|
8
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
8
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
9
9
|
import '../or-date-time-picker-v3/partials/index.js';
|
|
10
10
|
import { f as formatDate } from '../../formatTime-a1de80d6.js';
|
|
11
11
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
@@ -7,7 +7,7 @@ import { u as useProxyModelValue } from '../../useProxyModelValue-42e265dd.js';
|
|
|
7
7
|
import '@onereach/styles/screens.json';
|
|
8
8
|
import '@onereach/styles/tailwind.config.json';
|
|
9
9
|
import '../../types/index.js';
|
|
10
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
10
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
11
11
|
import { OrDateTimePickerDateControl as __vue_component__$1, OrDateTimePickerDateSelect as __vue_component__$2, OrDateTimePickerMobileControl as __vue_component__$3, OrDateTimePickerMonthSelect as __vue_component__$4, OrDateTimePickerPopoverFooter as __vue_component__$5, OrDateTimePickerPopoverHeader as __vue_component__$6 } from '../or-date-time-picker-v3/partials/index.js';
|
|
12
12
|
import { g as getCurrentDate, f as formatMobileDate } from '../../getCurrentDate-9b88f8a8.js';
|
|
13
13
|
import { OrErrorV3 as __vue_component__$7 } from '../or-error-v3/index.js';
|
|
@@ -7,7 +7,7 @@ import { u as useProxyModelValue } from '../../useProxyModelValue-42e265dd.js';
|
|
|
7
7
|
import { useResponsive } from '../../hooks/useResponsive/index.js';
|
|
8
8
|
import '@onereach/styles/tailwind.config.json';
|
|
9
9
|
import '../../types/index.js';
|
|
10
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
10
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
11
11
|
import { OrDateTimePickerDateControl as __vue_component__$1, OrDateTimePickerDateSelect as __vue_component__$2, OrDateTimePickerMobileControl as __vue_component__$3, OrDateTimePickerMonthSelect as __vue_component__$4, OrDateTimePickerPopoverFooter as __vue_component__$5, OrDateTimePickerPopoverHeader as __vue_component__$6 } from '../or-date-time-picker-v3/partials/index.js';
|
|
12
12
|
import { g as getCurrentDate, f as formatMobileDate } from '../../getCurrentDate-9b88f8a8.js';
|
|
13
13
|
import { getNextMonthDate } from '../or-date-time-picker-v3/utils/index.js';
|
|
@@ -5,7 +5,7 @@ import '@vueuse/core';
|
|
|
5
5
|
import '@onereach/styles/screens.json';
|
|
6
6
|
import '@onereach/styles/tailwind.config.json';
|
|
7
7
|
import '../../types/index.js';
|
|
8
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
8
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
9
9
|
import '../or-date-time-picker-v3/partials/index.js';
|
|
10
10
|
import { f as formatDate, a as formatTime } from '../../formatTime-a1de80d6.js';
|
|
11
11
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { _ as OrDateTimePickerV3 } from '../../OrDateTimePicker-
|
|
1
|
+
export { _ as OrDateTimePickerV3 } from '../../OrDateTimePicker-a35cc5b7.js';
|
|
2
2
|
export { OrDateTimePickerDateControl, OrDateTimePickerDateSelect, OrDateTimePickerMobileControl, OrDateTimePickerMonthSelect, OrDateTimePickerPopoverFooter, OrDateTimePickerPopoverHeader, OrDateTimePickerTimeControl, OrDateTimePickerTimeSelect } from './partials/index.js';
|
|
3
3
|
export { f as formatDate, a as formatTime } from '../../formatTime-a1de80d6.js';
|
|
4
4
|
export { f as formatMobileDate, a as formatMobileTime, g as getCurrentDate } from '../../getCurrentDate-9b88f8a8.js';
|
|
5
5
|
export { getNextMonthDate } from './utils/index.js';
|
|
6
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
6
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
7
7
|
import 'vue-demi';
|
|
8
8
|
import '../../directives/index.js';
|
|
9
9
|
import '../../useTimeFormat-d9b2ba33.js';
|
|
@@ -1014,6 +1014,14 @@ var script = defineComponent({
|
|
|
1014
1014
|
type: Function,
|
|
1015
1015
|
default: undefined
|
|
1016
1016
|
},
|
|
1017
|
+
hourStep: {
|
|
1018
|
+
type: Number,
|
|
1019
|
+
default: 1
|
|
1020
|
+
},
|
|
1021
|
+
minuteStep: {
|
|
1022
|
+
type: Number,
|
|
1023
|
+
default: 1
|
|
1024
|
+
},
|
|
1017
1025
|
isActive: {
|
|
1018
1026
|
type: Boolean,
|
|
1019
1027
|
default: false
|
|
@@ -1025,8 +1033,8 @@ var script = defineComponent({
|
|
|
1025
1033
|
var _a;
|
|
1026
1034
|
// Refs & Styles
|
|
1027
1035
|
const root = ref();
|
|
1028
|
-
const
|
|
1029
|
-
const
|
|
1036
|
+
const hoursButtons = ref([]);
|
|
1037
|
+
const minutesButtons = ref([]);
|
|
1030
1038
|
const rootStyles = computed(() => ['or-date-time-picker-time-select-v3', ...DateTimePickerTimeSelect]);
|
|
1031
1039
|
const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
|
|
1032
1040
|
const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
|
|
@@ -1051,15 +1059,17 @@ var script = defineComponent({
|
|
|
1051
1059
|
if (!isActive || !model.value) {
|
|
1052
1060
|
return;
|
|
1053
1061
|
}
|
|
1054
|
-
|
|
1062
|
+
const activeHourButton = getActiveButton(hoursButtons.value, hoursOptions.value);
|
|
1063
|
+
const activeMinuteButton = getActiveButton(minutesButtons.value, minutesOptions.value);
|
|
1064
|
+
if (activeHourButton) {
|
|
1055
1065
|
// scroll to the active hour button within the hours container.
|
|
1056
|
-
|
|
1066
|
+
activeHourButton.scrollIntoView({
|
|
1057
1067
|
block: 'center'
|
|
1058
1068
|
});
|
|
1059
1069
|
}
|
|
1060
|
-
if (
|
|
1070
|
+
if (activeMinuteButton) {
|
|
1061
1071
|
// scroll to the active minute button within the minutes container.
|
|
1062
|
-
|
|
1072
|
+
activeMinuteButton.scrollIntoView({
|
|
1063
1073
|
block: 'center'
|
|
1064
1074
|
});
|
|
1065
1075
|
}
|
|
@@ -1079,11 +1089,12 @@ var script = defineComponent({
|
|
|
1079
1089
|
return props.format;
|
|
1080
1090
|
});
|
|
1081
1091
|
const hoursOptions = computed(() => {
|
|
1092
|
+
const hourStep = props.hourStep > 0 ? props.hourStep : 1;
|
|
1082
1093
|
return Array.from({
|
|
1083
|
-
length: 24
|
|
1094
|
+
length: Math.ceil(24 / hourStep)
|
|
1084
1095
|
}, (_value, index) => {
|
|
1085
1096
|
var _a, _b, _c, _d;
|
|
1086
|
-
const value = index;
|
|
1097
|
+
const value = index * hourStep;
|
|
1087
1098
|
return new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), value, ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCMinutes()));
|
|
1088
1099
|
}).filter(value => {
|
|
1089
1100
|
if (proxyTimeFormat.value === TimeFormat.H23) {
|
|
@@ -1098,11 +1109,12 @@ var script = defineComponent({
|
|
|
1098
1109
|
});
|
|
1099
1110
|
});
|
|
1100
1111
|
const minutesOptions = computed(() => {
|
|
1112
|
+
const minuteStep = props.minuteStep > 0 ? props.minuteStep : 1;
|
|
1101
1113
|
return Array.from({
|
|
1102
|
-
length: 60
|
|
1114
|
+
length: Math.ceil(60 / minuteStep)
|
|
1103
1115
|
}, (_value, index) => {
|
|
1104
1116
|
var _a, _b, _c, _d;
|
|
1105
|
-
const value = index;
|
|
1117
|
+
const value = index * minuteStep;
|
|
1106
1118
|
return new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCHours(), value));
|
|
1107
1119
|
});
|
|
1108
1120
|
});
|
|
@@ -1117,19 +1129,20 @@ var script = defineComponent({
|
|
|
1117
1129
|
function formatMinutes(value) {
|
|
1118
1130
|
return String(value.getUTCMinutes()).padStart(2, '0');
|
|
1119
1131
|
}
|
|
1120
|
-
function
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
}
|
|
1132
|
+
function sortElementsByPosition(elements) {
|
|
1133
|
+
return [...elements].sort((a, b) => {
|
|
1134
|
+
return a.root.compareDocumentPosition(b.root) & 2 ? 1 : -1;
|
|
1135
|
+
});
|
|
1124
1136
|
}
|
|
1125
|
-
function
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
}
|
|
1137
|
+
function getActiveButton(buttons, options) {
|
|
1138
|
+
var _a;
|
|
1139
|
+
return (_a = sortElementsByPosition(buttons).find((button, index) => Number(model.value) === Number(options[index]))) === null || _a === void 0 ? void 0 : _a.root;
|
|
1129
1140
|
}
|
|
1130
1141
|
return {
|
|
1131
1142
|
root,
|
|
1132
1143
|
rootStyles,
|
|
1144
|
+
hoursButtons,
|
|
1145
|
+
minutesButtons,
|
|
1133
1146
|
buttonGroupStyles,
|
|
1134
1147
|
buttonGroupItemStyles,
|
|
1135
1148
|
model,
|
|
@@ -1138,9 +1151,7 @@ var script = defineComponent({
|
|
|
1138
1151
|
hoursOptions,
|
|
1139
1152
|
minutesOptions,
|
|
1140
1153
|
formatHours,
|
|
1141
|
-
formatMinutes
|
|
1142
|
-
setActiveHourButtonRef,
|
|
1143
|
-
setActiveMinuteButtonRef
|
|
1154
|
+
formatMinutes
|
|
1144
1155
|
};
|
|
1145
1156
|
}
|
|
1146
1157
|
});
|
|
@@ -1161,9 +1172,7 @@ var __vue_render__ = function () {
|
|
|
1161
1172
|
}, _vm._l(_vm.hoursOptions, function (value) {
|
|
1162
1173
|
return _c('OrButton', {
|
|
1163
1174
|
key: Number(value),
|
|
1164
|
-
ref:
|
|
1165
|
-
return _vm.setActiveHourButtonRef(el, value);
|
|
1166
|
-
},
|
|
1175
|
+
ref: 'hoursButtons',
|
|
1167
1176
|
refInFor: true,
|
|
1168
1177
|
class: _vm.buttonGroupItemStyles,
|
|
1169
1178
|
attrs: {
|
|
@@ -1183,9 +1192,7 @@ var __vue_render__ = function () {
|
|
|
1183
1192
|
}, _vm._l(_vm.minutesOptions, function (value) {
|
|
1184
1193
|
return _c('OrButton', {
|
|
1185
1194
|
key: Number(value),
|
|
1186
|
-
ref:
|
|
1187
|
-
return _vm.setActiveMinuteButtonRef(el, value);
|
|
1188
|
-
},
|
|
1195
|
+
ref: 'minutesButtons',
|
|
1189
1196
|
refInFor: true,
|
|
1190
1197
|
class: _vm.buttonGroupItemStyles,
|
|
1191
1198
|
attrs: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed } from 'vue-demi';
|
|
2
2
|
import { i as isVue3 } from '../../constants-873d04a2.js';
|
|
3
|
-
import { OrIconV3 as __vue_component__$1, IconSize } from '../or-icon-v3/index.js';
|
|
3
|
+
import { OrIconV3 as __vue_component__$1, IconSize, IconVariant } from '../or-icon-v3/index.js';
|
|
4
4
|
import { OrTooltipV3 as __vue_component__$2 } from '../or-tooltip-v3/index.js';
|
|
5
5
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
6
6
|
import '../../types/index.js';
|
|
@@ -98,7 +98,6 @@ var script = defineComponent({
|
|
|
98
98
|
OrIcon: __vue_component__$1,
|
|
99
99
|
OrTooltip: __vue_component__$2
|
|
100
100
|
},
|
|
101
|
-
inheritAttrs: false,
|
|
102
101
|
props: {
|
|
103
102
|
// TODO: Remove after migration to Vue 3
|
|
104
103
|
additionalStyles: {
|
|
@@ -135,11 +134,31 @@ var script = defineComponent({
|
|
|
135
134
|
setup(props) {
|
|
136
135
|
// Refs
|
|
137
136
|
const root = ref();
|
|
137
|
+
const tooltipRef = ref();
|
|
138
|
+
const iconProps = computed(() => {
|
|
139
|
+
return typeof props.icon === 'string' ? {
|
|
140
|
+
icon: props.icon,
|
|
141
|
+
variant: IconVariant.Inherit,
|
|
142
|
+
size: props.size
|
|
143
|
+
} : {
|
|
144
|
+
variant: IconVariant.Inherit,
|
|
145
|
+
size: props.size,
|
|
146
|
+
...props.icon
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
const tooltipProps = computed(() => {
|
|
150
|
+
return typeof props.tooltip === 'string' ? {
|
|
151
|
+
content: props.tooltip
|
|
152
|
+
} : props.tooltip;
|
|
153
|
+
});
|
|
138
154
|
// Styles
|
|
139
|
-
const rootStyles = computed(() => ['or-icon-button-v3', ...IconButton, ...IconButtonColors[props.color]]);
|
|
155
|
+
const rootStyles = computed(() => ['or-icon-button-v3', ...IconButton, ...IconButtonColors[props.color], ...props.additionalStyles]);
|
|
140
156
|
return {
|
|
141
157
|
root,
|
|
158
|
+
tooltipRef,
|
|
142
159
|
rootStyles,
|
|
160
|
+
iconProps,
|
|
161
|
+
tooltipProps,
|
|
143
162
|
isVue3
|
|
144
163
|
};
|
|
145
164
|
}
|
|
@@ -153,25 +172,23 @@ var __vue_render__ = function () {
|
|
|
153
172
|
var _vm = this;
|
|
154
173
|
var _h = _vm.$createElement;
|
|
155
174
|
var _c = _vm._self._c || _h;
|
|
156
|
-
return _c('
|
|
157
|
-
scopedSlots: _vm._u([_vm.$slots.tooltipContent ? {
|
|
158
|
-
key: "content",
|
|
159
|
-
fn: function () {
|
|
160
|
-
return [_vm._t("tooltipContent")];
|
|
161
|
-
},
|
|
162
|
-
proxy: true
|
|
163
|
-
} : null], null, true)
|
|
164
|
-
}, 'OrTooltip', typeof _vm.tooltip === 'string' ? {
|
|
165
|
-
content: _vm.tooltip
|
|
166
|
-
} : _vm.tooltip, false), [_c('button', _vm._g(_vm._b({
|
|
175
|
+
return _c('button', _vm._g({
|
|
167
176
|
ref: 'root',
|
|
168
|
-
class:
|
|
177
|
+
class: _vm.rootStyles,
|
|
169
178
|
attrs: {
|
|
170
179
|
"type": 'button',
|
|
171
180
|
"selected": _vm.selected,
|
|
172
181
|
"disabled": _vm.disabled
|
|
182
|
+
},
|
|
183
|
+
on: {
|
|
184
|
+
"mouseover": function ($event) {
|
|
185
|
+
_vm.tooltipRef && _vm.tooltipRef.open();
|
|
186
|
+
},
|
|
187
|
+
"mouseout": function ($event) {
|
|
188
|
+
_vm.tooltipRef && _vm.tooltipRef.close();
|
|
189
|
+
}
|
|
173
190
|
}
|
|
174
|
-
},
|
|
191
|
+
}, Object.assign({}, _vm.isVue3 ? {} : _vm.$listeners, {
|
|
175
192
|
click: function (e) {
|
|
176
193
|
return _vm.$emit('click', e);
|
|
177
194
|
},
|
|
@@ -181,14 +198,19 @@ var __vue_render__ = function () {
|
|
|
181
198
|
blur: function (e) {
|
|
182
199
|
return _vm.$emit('blur', e);
|
|
183
200
|
}
|
|
184
|
-
})), [_c('OrIcon', _vm._b({}, 'OrIcon',
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
201
|
+
})), [_c('OrIcon', _vm._b({}, 'OrIcon', _vm.iconProps, false)), _vm._v(" "), _c('OrTooltip', _vm._b({
|
|
202
|
+
ref: "tooltipRef",
|
|
203
|
+
attrs: {
|
|
204
|
+
"trigger": _vm.root
|
|
205
|
+
},
|
|
206
|
+
scopedSlots: _vm._u([_vm.$slots.tooltipContent ? {
|
|
207
|
+
key: "content",
|
|
208
|
+
fn: function () {
|
|
209
|
+
return [_vm._t("tooltipContent")];
|
|
210
|
+
},
|
|
211
|
+
proxy: true
|
|
212
|
+
} : null], null, true)
|
|
213
|
+
}, 'OrTooltip', _vm.tooltipProps, false))], 1);
|
|
192
214
|
};
|
|
193
215
|
var __vue_staticRenderFns__ = [];
|
|
194
216
|
|
|
@@ -5,7 +5,7 @@ import { b as useTimeFormat, a as useLocale } from '../../useTimeFormat-d9b2ba33
|
|
|
5
5
|
import '@vueuse/core';
|
|
6
6
|
import '@onereach/styles/screens.json';
|
|
7
7
|
import '@onereach/styles/tailwind.config.json';
|
|
8
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
8
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
9
9
|
import '../or-date-time-picker-v3/partials/index.js';
|
|
10
10
|
import { a as formatTime } from '../../formatTime-a1de80d6.js';
|
|
11
11
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
@@ -7,7 +7,7 @@ import '@vueuse/core';
|
|
|
7
7
|
import { u as useProxyModelValue } from '../../useProxyModelValue-42e265dd.js';
|
|
8
8
|
import '@onereach/styles/screens.json';
|
|
9
9
|
import '@onereach/styles/tailwind.config.json';
|
|
10
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
10
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
11
11
|
import { OrDateTimePickerMobileControl as __vue_component__$1, OrDateTimePickerPopoverFooter as __vue_component__$2, OrDateTimePickerPopoverHeader as __vue_component__$3, OrDateTimePickerTimeControl as __vue_component__$4, OrDateTimePickerTimeSelect as __vue_component__$5 } from '../or-date-time-picker-v3/partials/index.js';
|
|
12
12
|
import { g as getCurrentDate, a as formatMobileTime } from '../../getCurrentDate-9b88f8a8.js';
|
|
13
13
|
import { OrErrorV3 as __vue_component__$6 } from '../or-error-v3/index.js';
|
|
@@ -96,6 +96,14 @@ var script = defineComponent({
|
|
|
96
96
|
type: Function,
|
|
97
97
|
default: undefined
|
|
98
98
|
},
|
|
99
|
+
hourStep: {
|
|
100
|
+
type: Number,
|
|
101
|
+
default: 1
|
|
102
|
+
},
|
|
103
|
+
minuteStep: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: 1
|
|
106
|
+
},
|
|
99
107
|
variant: {
|
|
100
108
|
type: String,
|
|
101
109
|
default: undefined
|
|
@@ -348,6 +356,8 @@ var __vue_render__ = function () {
|
|
|
348
356
|
"locale": _vm.resolvedLocale,
|
|
349
357
|
"hours-filter": _vm.hoursFilter,
|
|
350
358
|
"minutes-filter": _vm.minutesFilter,
|
|
359
|
+
"hour-step": _vm.hourStep,
|
|
360
|
+
"minute-step": _vm.minuteStep,
|
|
351
361
|
"is-active": _vm.popover && _vm.popover.state === 'open'
|
|
352
362
|
},
|
|
353
363
|
model: {
|
|
@@ -7,7 +7,7 @@ import '@vueuse/core';
|
|
|
7
7
|
import { u as useProxyModelValue } from '../../useProxyModelValue-42e265dd.js';
|
|
8
8
|
import { useResponsive } from '../../hooks/useResponsive/index.js';
|
|
9
9
|
import '@onereach/styles/tailwind.config.json';
|
|
10
|
-
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
10
|
+
import '../../OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
11
11
|
import { OrDateTimePickerMobileControl as __vue_component__$1, OrDateTimePickerPopoverFooter as __vue_component__$2, OrDateTimePickerPopoverHeader as __vue_component__$3, OrDateTimePickerTimeControl as __vue_component__$4, OrDateTimePickerTimeSelect as __vue_component__$5 } from '../or-date-time-picker-v3/partials/index.js';
|
|
12
12
|
import { g as getCurrentDate, a as formatMobileTime } from '../../getCurrentDate-9b88f8a8.js';
|
|
13
13
|
import { OrErrorV3 as __vue_component__$6 } from '../or-error-v3/index.js';
|
|
@@ -88,6 +88,14 @@ var script = defineComponent({
|
|
|
88
88
|
type: String,
|
|
89
89
|
default: undefined
|
|
90
90
|
},
|
|
91
|
+
hourStep: {
|
|
92
|
+
type: Number,
|
|
93
|
+
default: 1
|
|
94
|
+
},
|
|
95
|
+
minuteStep: {
|
|
96
|
+
type: Number,
|
|
97
|
+
default: 1
|
|
98
|
+
},
|
|
91
99
|
variant: {
|
|
92
100
|
type: String,
|
|
93
101
|
default: undefined
|
|
@@ -421,6 +429,8 @@ var __vue_render__ = function () {
|
|
|
421
429
|
"initial-value": _vm.initialValueFrom,
|
|
422
430
|
"format": _vm.resolvedFormat,
|
|
423
431
|
"locale": _vm.resolvedLocale,
|
|
432
|
+
"hour-step": _vm.hourStep,
|
|
433
|
+
"minute-step": _vm.minuteStep,
|
|
424
434
|
"is-active": _vm.popover && _vm.popover.state === 'open'
|
|
425
435
|
},
|
|
426
436
|
model: {
|
|
@@ -436,6 +446,8 @@ var __vue_render__ = function () {
|
|
|
436
446
|
"initial-value": _vm.initialValueTo,
|
|
437
447
|
"format": _vm.resolvedFormat,
|
|
438
448
|
"locale": _vm.resolvedLocale,
|
|
449
|
+
"hour-step": _vm.hourStep,
|
|
450
|
+
"minute-step": _vm.minuteStep,
|
|
439
451
|
"is-active": _vm.popover && _vm.popover.state === 'open'
|
|
440
452
|
},
|
|
441
453
|
model: {
|
|
@@ -8,7 +8,7 @@ import '@onereach/styles/screens.json';
|
|
|
8
8
|
import '@onereach/styles/tailwind.config.json';
|
|
9
9
|
import { OrCheckboxV3 as __vue_component__$e } from './components/or-checkbox-v3/index.js';
|
|
10
10
|
import { OrDatePickerV3 as __vue_component__$f } from './components/or-date-picker-v3/index.js';
|
|
11
|
-
import { _ as __vue_component__$g } from './OrDateTimePicker-
|
|
11
|
+
import { _ as __vue_component__$g } from './OrDateTimePicker-a35cc5b7.js';
|
|
12
12
|
import './components/or-date-time-picker-v3/partials/index.js';
|
|
13
13
|
import { OrInputV3 as __vue_component__$h } from './components/or-input-v3/index.js';
|
|
14
14
|
import { OrRatingV3 as __vue_component__$i } from './components/or-rating-v3/index.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -35,13 +35,13 @@ export { OrConfirm } from './components/or-confirm/index.js';
|
|
|
35
35
|
export { ConfirmType, OrConfirmV3 } from './components/or-confirm-v3/index.js';
|
|
36
36
|
export { OrContextMenuV3 } from './components/or-context-menu-v3/index.js';
|
|
37
37
|
export { OrDataGridV3 } from './components/or-data-grid-v3/index.js';
|
|
38
|
-
export { D as DataGridVariant } from './index-
|
|
38
|
+
export { D as DataGridVariant } from './index-4e09dbe7.js';
|
|
39
39
|
export { OrDateFormatV3 } from './components/or-date-format-v3/index.js';
|
|
40
40
|
export { OrDatePickerV3 } from './components/or-date-picker-v3/index.js';
|
|
41
41
|
export { OrDateRangePickerV3 } from './components/or-date-range-picker-v3/index.js';
|
|
42
42
|
export { OrDateTimeFormatV3 } from './components/or-date-time-format-v3/index.js';
|
|
43
43
|
export { DEFAULT_TEXT, OrDateTimePicker, OrDateTimePickerItemTypes, OrDateTimePickerTypes } from './components/or-date-time-picker/index.js';
|
|
44
|
-
export { _ as OrDateTimePickerV3 } from './OrDateTimePicker-
|
|
44
|
+
export { _ as OrDateTimePickerV3 } from './OrDateTimePicker-a35cc5b7.js';
|
|
45
45
|
export { OrDateTimePickerDateControl, OrDateTimePickerDateSelect, OrDateTimePickerMobileControl, OrDateTimePickerMonthSelect, OrDateTimePickerPopoverFooter, OrDateTimePickerPopoverHeader, OrDateTimePickerTimeControl, OrDateTimePickerTimeSelect } from './components/or-date-time-picker-v3/partials/index.js';
|
|
46
46
|
export { f as formatDate, a as formatTime } from './formatTime-a1de80d6.js';
|
|
47
47
|
export { f as formatMobileDate, a as formatMobileTime, g as getCurrentDate } from './getCurrentDate-9b88f8a8.js';
|
|
@@ -205,7 +205,7 @@ import '@vueuse/math';
|
|
|
205
205
|
import './OrSkeletonCircle.vue_rollup-plugin-vue_script-373399b7.js';
|
|
206
206
|
import './styles-b98d8bf7.js';
|
|
207
207
|
import './OrSkeletonRect.vue_rollup-plugin-vue_script-99ae0828.js';
|
|
208
|
-
import './OrDateTimePicker.vue_rollup-plugin-vue_script-
|
|
208
|
+
import './OrDateTimePicker.vue_rollup-plugin-vue_script-aba23066.js';
|
|
209
209
|
import 'lodash/padStart';
|
|
210
210
|
import './components/or-editor-tabs-v3/partials/index.js';
|
|
211
211
|
import '@floating-ui/dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "18.1
|
|
3
|
+
"version": "18.2.1",
|
|
4
4
|
"npmUnpacked": "4.15.2",
|
|
5
5
|
"description": "Vue components library for v2",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@codemirror/view": "^6",
|
|
36
36
|
"@floating-ui/dom": "1.5.3",
|
|
37
37
|
"@lezer/highlight": "*",
|
|
38
|
-
"@onereach/styles": "^18.1
|
|
38
|
+
"@onereach/styles": "^18.2.1",
|
|
39
39
|
"@splidejs/splide": "4.0.6",
|
|
40
40
|
"@tiptap/core": "2.0.3",
|
|
41
41
|
"@tiptap/extension-blockquote": "2.0.3",
|
|
@@ -133,5 +133,6 @@
|
|
|
133
133
|
"types": "./dist/bundled/components/*/index.d.ts",
|
|
134
134
|
"default": "./dist/bundled/components/*/index.js"
|
|
135
135
|
}
|
|
136
|
-
}
|
|
136
|
+
},
|
|
137
|
+
"gitHead": "7c2077bda5ba61575fd2e0def542bad5f86b8755"
|
|
137
138
|
}
|