@onereach/ui-components 3.0.4-beta.2486.0 → 3.0.4-beta.2487.0
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/v2/{OrCardCollection-ad2240ac.js → OrCardCollection-a10920a3.js} +1 -1
- package/dist/bundled/v2/{OrDateTimePicker-60e1a7ee.js → OrDateTimePicker-11b6d4dd.js} +261 -165
- package/dist/bundled/v2/{OrMenu-cbb0c2c8.js → OrMenu-0c2c348c.js} +6 -1
- package/dist/bundled/v2/{OrPagination-cf47d71c.js → OrPagination-00ab6954.js} +1 -1
- package/dist/bundled/v2/{OrTabs-10f7e668.js → OrTabs-f7c9f754.js} +1 -1
- package/dist/bundled/v2/components/index.js +5 -5
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/{or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
- package/dist/bundled/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/bundled/v2/components/or-menu-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-pagination-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-tabs-v3/index.js +2 -2
- package/dist/bundled/v2/index.js +6 -6
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-61f92c57.js → OrCardCollection.vue_vue_type_script_lang-93c84377.js} +2 -2
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-fb197c2f.js → OrDateTimePicker.vue_vue_type_script_lang-b9bc77aa.js} +243 -163
- package/dist/bundled/v3/{OrMenu-89afef68.js → OrMenu-101f1c62.js} +1 -1
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-f6748a99.js → OrMenu.vue_vue_type_script_lang-7ba15d1d.js} +6 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-7673a00e.js → OrPagination.vue_vue_type_script_lang-d3e6732f.js} +2 -2
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ebd2a59d.js → OrTabs.vue_vue_type_script_lang-513b1e98.js} +2 -2
- package/dist/bundled/v3/components/index.js +6 -6
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +5 -5
- package/dist/{esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
- package/dist/bundled/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/bundled/v3/components/or-menu-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-pagination-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tabs-v3/index.js +3 -3
- package/dist/bundled/v3/index.js +36 -22
- package/dist/esm/v2/{OrCardCollection-662d5727.js → OrCardCollection-54079e79.js} +1 -1
- package/dist/esm/v2/{OrDateTimePicker-4b650aca.js → OrDateTimePicker-7411ea1f.js} +266 -170
- package/dist/esm/v2/{OrMenu-47b319a6.js → OrMenu-18a7f179.js} +6 -1
- package/dist/esm/v2/{OrPagination-4d330d4f.js → OrPagination-16f6d75b.js} +1 -1
- package/dist/esm/v2/{OrTabs-f0e4db08.js → OrTabs-18df1ce9.js} +1 -1
- package/dist/esm/v2/components/index.js +5 -5
- package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +2 -2
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/{or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
- package/dist/esm/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-menu-v3/index.js +1 -1
- package/dist/esm/v2/components/or-pagination-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tabs-v3/index.js +2 -2
- package/dist/esm/v2/index.js +5 -5
- package/dist/esm/v3/{OrCardCollection-aa7f0c81.js → OrCardCollection-b937aa7a.js} +1 -1
- package/dist/esm/v3/{OrDateTimePicker-3e2dc067.js → OrDateTimePicker-966d5b1d.js} +267 -173
- package/dist/esm/v3/{OrMenu-053a9ab7.js → OrMenu-70cee836.js} +6 -1
- package/dist/esm/v3/{OrPagination-f2d104d9.js → OrPagination-7f4ed166.js} +1 -1
- package/dist/esm/v3/{OrTabs-d9e2a07e.js → OrTabs-0a5c80be.js} +1 -1
- package/dist/esm/v3/components/index.js +5 -5
- package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +2 -2
- package/dist/{bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
- package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/esm/v3/components/or-menu-v3/index.js +1 -1
- package/dist/esm/v3/components/or-pagination-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tabs-v3/index.js +2 -2
- package/dist/esm/v3/index.js +5 -5
- package/package.json +2 -2
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +17 -8
- package/src/components/or-date-time-picker-v3/hooks/useDefaultDate.ts +3 -0
- package/src/components/or-date-time-picker-v3/hooks/useDefaultHours.ts +3 -0
- package/src/components/or-date-time-picker-v3/hooks/useDefaultMinutes.ts +3 -0
- package/src/components/or-date-time-picker-v3/hooks/useDefaultMonth.ts +3 -0
- package/src/components/or-date-time-picker-v3/hooks/useDefaultYear.ts +3 -0
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue +162 -0
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.ts +28 -0
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue +101 -79
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue +58 -42
- package/src/components/or-menu-v3/OrMenu.vue +3 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue +0 -63
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.ts +0 -10
|
@@ -2,8 +2,8 @@ import { resolveComponent, openBlock, createBlock, normalizeClass, defineCompone
|
|
|
2
2
|
import './OrIconButton-55238a89.js';
|
|
3
3
|
import { s as script$3 } from './OrIconButton.vue_vue_type_script_lang-3aeb76ac.js';
|
|
4
4
|
import './OrButton-7b1eac5d.js';
|
|
5
|
-
import './OrMenu-
|
|
6
|
-
import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-
|
|
5
|
+
import './OrMenu-101f1c62.js';
|
|
6
|
+
import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
|
|
7
7
|
import './OrMenuItem-a90b0369.js';
|
|
8
8
|
import { s as script$6 } from './OrMenuItem.vue_vue_type_script_lang-d65eec51.js';
|
|
9
9
|
import './OrIcon-a670d8e9.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass,
|
|
2
|
-
import './OrLabel-4da10c50.js';
|
|
3
|
-
import { s as script$7 } from './OrLabel.vue_vue_type_script_lang-5ba2b33c.js';
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode, renderSlot, reactive, watch } from 'vue';
|
|
4
2
|
import './OrButton-7b1eac5d.js';
|
|
3
|
+
import { s as script$7 } from './OrButton.vue_vue_type_script_lang-ed1524cf.js';
|
|
4
|
+
import './OrLabel-4da10c50.js';
|
|
5
|
+
import { s as script$8 } from './OrLabel.vue_vue_type_script_lang-5ba2b33c.js';
|
|
5
6
|
import './OrIcon-a670d8e9.js';
|
|
6
7
|
import './OrIconButton-55238a89.js';
|
|
7
|
-
import './OrMenu-
|
|
8
|
+
import './OrMenu-101f1c62.js';
|
|
8
9
|
import './OrMenuItem-a90b0369.js';
|
|
9
|
-
import { s as script$8 } from './OrButton.vue_vue_type_script_lang-ed1524cf.js';
|
|
10
10
|
import { s as script$9 } from './OrIcon.vue_vue_type_script_lang-859d76fb.js';
|
|
11
11
|
import { s as script$a } from './OrIconButton.vue_vue_type_script_lang-3aeb76ac.js';
|
|
12
|
-
import { s as script$b } from './OrMenu.vue_vue_type_script_lang-
|
|
12
|
+
import { s as script$b } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
|
|
13
13
|
import { s as script$c } from './OrMenuItem.vue_vue_type_script_lang-d65eec51.js';
|
|
14
14
|
import './OrHint-fcd2563e.js';
|
|
15
15
|
import './OrInputBox-688eb48b.js';
|
|
@@ -23,14 +23,47 @@ import { s as script$f } from './OrInputBox.vue_vue_type_script_lang-0e3ff329.js
|
|
|
23
23
|
import { s as script$g } from './OrPopover.vue_vue_type_script_lang-9bf2361c.js';
|
|
24
24
|
import { I as InputBoxSize } from './props-c966ae5f.js';
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
function useDefaultDate() {
|
|
27
|
+
return new Date().getUTCDate();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function useDefaultHours() {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function useDefaultMinutes() {
|
|
35
|
+
return 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function useDefaultMonth() {
|
|
39
|
+
return new Date().getUTCMonth();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function useDefaultYear() {
|
|
43
|
+
return new Date().getUTCFullYear();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const DateTimePickerDaySelect = [
|
|
27
47
|
// Layout
|
|
28
48
|
'layout-column',
|
|
29
49
|
// Spacing
|
|
30
50
|
'px-md', 'py-md', 'gap-sm'];
|
|
51
|
+
const DateTimePickerDaySelectButtonGroup = [
|
|
52
|
+
// Layout
|
|
53
|
+
'grid', 'grid-cols-7'];
|
|
54
|
+
const DateTimePickerDaySelectButtonGroupItem = [
|
|
55
|
+
// Box
|
|
56
|
+
'min-w-fit',
|
|
57
|
+
// Spacing
|
|
58
|
+
'!px-sm', '!py-sm',
|
|
59
|
+
// Typography
|
|
60
|
+
'typography-caption-regular'];
|
|
31
61
|
|
|
32
62
|
var script$6 = defineComponent({
|
|
33
|
-
name: '
|
|
63
|
+
name: 'OrDateTimePickerDaySelect',
|
|
64
|
+
components: {
|
|
65
|
+
OrButton: script$7
|
|
66
|
+
},
|
|
34
67
|
model: {
|
|
35
68
|
prop: 'modelValue',
|
|
36
69
|
event: 'update:modelValue'
|
|
@@ -47,31 +80,77 @@ var script$6 = defineComponent({
|
|
|
47
80
|
// Refs
|
|
48
81
|
const root = ref();
|
|
49
82
|
// Styles
|
|
50
|
-
const rootStyles = computed(() => ['or-date-time-picker-
|
|
83
|
+
const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
|
|
84
|
+
const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
|
|
85
|
+
const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
|
|
51
86
|
// State
|
|
52
87
|
const proxyModelValue = computed({
|
|
53
|
-
get: () =>
|
|
88
|
+
get: () => {
|
|
89
|
+
var _a;
|
|
90
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
91
|
+
},
|
|
54
92
|
set: value => {
|
|
55
93
|
context.emit('update:modelValue', value);
|
|
56
94
|
}
|
|
57
95
|
});
|
|
96
|
+
const dayOptions = computed(() => {
|
|
97
|
+
const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
98
|
+
const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
99
|
+
const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
|
|
100
|
+
const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
|
|
101
|
+
return (() => {
|
|
102
|
+
let options = [],
|
|
103
|
+
value = calendarStartDate;
|
|
104
|
+
while (Number(value) !== Number(calendarEndDate)) {
|
|
105
|
+
options = [...options, value];
|
|
106
|
+
value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
|
|
107
|
+
}
|
|
108
|
+
return options;
|
|
109
|
+
})();
|
|
110
|
+
});
|
|
111
|
+
// Methods
|
|
112
|
+
function formatDay(value) {
|
|
113
|
+
return value.toLocaleString('default', {
|
|
114
|
+
day: 'numeric',
|
|
115
|
+
timeZone: 'UTC'
|
|
116
|
+
});
|
|
117
|
+
}
|
|
58
118
|
return {
|
|
59
119
|
root,
|
|
60
120
|
rootStyles,
|
|
61
|
-
|
|
121
|
+
buttonGroupStyles,
|
|
122
|
+
buttonGroupItemStyles,
|
|
123
|
+
proxyModelValue,
|
|
124
|
+
dayOptions,
|
|
125
|
+
formatDay
|
|
62
126
|
};
|
|
63
127
|
}
|
|
64
128
|
});
|
|
65
129
|
|
|
66
130
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
131
|
+
const _component_OrButton = resolveComponent("OrButton");
|
|
67
132
|
return openBlock(), createElementBlock("div", {
|
|
68
133
|
ref: "root",
|
|
69
134
|
class: normalizeClass(_ctx.rootStyles)
|
|
70
|
-
}, "
|
|
135
|
+
}, [createElementVNode("div", {
|
|
136
|
+
class: normalizeClass(_ctx.buttonGroupStyles)
|
|
137
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dayOptions, value => {
|
|
138
|
+
return openBlock(), createBlock(_component_OrButton, {
|
|
139
|
+
key: Number(value),
|
|
140
|
+
class: normalizeClass(_ctx.buttonGroupItemStyles),
|
|
141
|
+
variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
|
|
142
|
+
color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
|
|
143
|
+
onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
|
|
144
|
+
}, {
|
|
145
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDay(value)), 1 /* TEXT */)]),
|
|
146
|
+
|
|
147
|
+
_: 2 /* DYNAMIC */
|
|
148
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
|
|
149
|
+
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
|
|
71
150
|
}
|
|
72
151
|
|
|
73
152
|
script$6.render = render$5;
|
|
74
|
-
script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-
|
|
153
|
+
script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue";
|
|
75
154
|
|
|
76
155
|
const DateTimePickerMobileControl = [
|
|
77
156
|
// Layout
|
|
@@ -87,7 +166,7 @@ const DateTimePickerMobileControlContent = [
|
|
|
87
166
|
var script$5 = defineComponent({
|
|
88
167
|
name: 'OrDateTimePickerMobileControl',
|
|
89
168
|
components: {
|
|
90
|
-
OrLabel: script$
|
|
169
|
+
OrLabel: script$8
|
|
91
170
|
},
|
|
92
171
|
props: {
|
|
93
172
|
label: {
|
|
@@ -136,7 +215,7 @@ const DateTimePickerMonthSelect = [
|
|
|
136
215
|
var script$4 = defineComponent({
|
|
137
216
|
name: 'OrDateTimePickerMonthSelect',
|
|
138
217
|
components: {
|
|
139
|
-
OrButton: script$
|
|
218
|
+
OrButton: script$7,
|
|
140
219
|
OrIcon: script$9,
|
|
141
220
|
OrIconButton: script$a,
|
|
142
221
|
OrMenu: script$b,
|
|
@@ -157,107 +236,99 @@ var script$4 = defineComponent({
|
|
|
157
236
|
setup(props, context) {
|
|
158
237
|
// Refs
|
|
159
238
|
const root = ref();
|
|
160
|
-
const monthButton = ref();
|
|
161
239
|
const yearButton = ref();
|
|
240
|
+
const monthButton = ref();
|
|
241
|
+
const yearButtonRoot = computed(() => {
|
|
242
|
+
var _a;
|
|
243
|
+
return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
244
|
+
});
|
|
162
245
|
const monthButtonRoot = computed(() => {
|
|
163
246
|
var _a;
|
|
164
247
|
return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
165
248
|
});
|
|
166
|
-
const
|
|
249
|
+
const yearMenu = ref();
|
|
250
|
+
const monthMenu = ref();
|
|
251
|
+
const yearMenuState = computed(() => {
|
|
167
252
|
var _a;
|
|
168
|
-
return (_a =
|
|
253
|
+
return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
254
|
+
});
|
|
255
|
+
const monthMenuState = computed(() => {
|
|
256
|
+
var _a;
|
|
257
|
+
return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
169
258
|
});
|
|
170
|
-
const monthMenu = ref();
|
|
171
|
-
const yearMenu = ref();
|
|
172
|
-
// const monthMenuState = computed(() => monthMenu.value?.state);
|
|
173
|
-
// const yearMenuState = computed(() => yearMenu.value?.state);
|
|
174
259
|
// Styles
|
|
175
260
|
const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
|
|
176
261
|
// State
|
|
177
262
|
const proxyModelValue = computed({
|
|
178
|
-
get: () => props.modelValue,
|
|
179
|
-
set: value => {
|
|
180
|
-
context.emit('update:modelValue', value);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
const yearValue = computed({
|
|
184
|
-
get: () => {
|
|
185
|
-
var _a, _b;
|
|
186
|
-
return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : new Date().getUTCFullYear();
|
|
187
|
-
},
|
|
188
|
-
set: value => {
|
|
189
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
190
|
-
proxyModelValue.value = new Date(Date.UTC(value, (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMonth()) !== null && _b !== void 0 ? _b : monthValue.value, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCDate()) !== null && _d !== void 0 ? _d : 1, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCHours()) !== null && _f !== void 0 ? _f : 0, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : 0));
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
const monthValue = computed({
|
|
194
263
|
get: () => {
|
|
195
|
-
var _a
|
|
196
|
-
return (
|
|
264
|
+
var _a;
|
|
265
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
197
266
|
},
|
|
198
267
|
set: value => {
|
|
199
|
-
|
|
200
|
-
proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : yearValue.value, value, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCDate()) !== null && _d !== void 0 ? _d : 1, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCHours()) !== null && _f !== void 0 ? _f : 0, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : 0));
|
|
268
|
+
context.emit('update:modelValue', value);
|
|
201
269
|
}
|
|
202
270
|
});
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
value
|
|
213
|
-
}) => value === monthValue.value)) === null || _a === void 0 ? void 0 : _a.label;
|
|
271
|
+
const yearOptions = computed(() => {
|
|
272
|
+
return Array.from({
|
|
273
|
+
length: 11
|
|
274
|
+
}).map((_value, index, {
|
|
275
|
+
length
|
|
276
|
+
}) => {
|
|
277
|
+
const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
|
|
278
|
+
return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
279
|
+
});
|
|
214
280
|
});
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
value
|
|
221
|
-
|
|
222
|
-
year: 'numeric'
|
|
223
|
-
})
|
|
224
|
-
};
|
|
225
|
-
});
|
|
226
|
-
const monthOptions = Array.from({
|
|
227
|
-
length: 12
|
|
228
|
-
}, (_value, index) => {
|
|
229
|
-
const month = index;
|
|
230
|
-
return {
|
|
231
|
-
value: month,
|
|
232
|
-
label: new Date(yearValue.value, month).toLocaleString([], {
|
|
233
|
-
month: 'long'
|
|
234
|
-
})
|
|
235
|
-
};
|
|
281
|
+
const monthOptions = computed(() => {
|
|
282
|
+
return Array.from({
|
|
283
|
+
length: 12
|
|
284
|
+
}, (_value, index) => {
|
|
285
|
+
const value = index;
|
|
286
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
287
|
+
});
|
|
236
288
|
});
|
|
289
|
+
// Methods
|
|
290
|
+
function goToNextMonth() {
|
|
291
|
+
proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
292
|
+
}
|
|
293
|
+
function goToPreviousMonth() {
|
|
294
|
+
proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
295
|
+
}
|
|
296
|
+
function formatYear(value) {
|
|
297
|
+
return value.toLocaleString('default', {
|
|
298
|
+
year: 'numeric',
|
|
299
|
+
timeZone: 'UTC'
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function formatMonth(value) {
|
|
303
|
+
return value.toLocaleString('default', {
|
|
304
|
+
month: 'long',
|
|
305
|
+
timeZone: 'UTC'
|
|
306
|
+
});
|
|
307
|
+
}
|
|
237
308
|
return {
|
|
238
309
|
root,
|
|
239
|
-
monthButton,
|
|
240
310
|
yearButton,
|
|
241
|
-
|
|
311
|
+
monthButton,
|
|
242
312
|
yearButtonRoot,
|
|
243
|
-
|
|
313
|
+
monthButtonRoot,
|
|
244
314
|
yearMenu,
|
|
245
|
-
|
|
246
|
-
|
|
315
|
+
monthMenu,
|
|
316
|
+
yearMenuState,
|
|
317
|
+
monthMenuState,
|
|
247
318
|
rootStyles,
|
|
248
319
|
proxyModelValue,
|
|
249
|
-
yearValue,
|
|
250
|
-
monthValue,
|
|
251
|
-
yearLabel,
|
|
252
|
-
monthLabel,
|
|
253
320
|
yearOptions,
|
|
254
|
-
monthOptions
|
|
321
|
+
monthOptions,
|
|
322
|
+
goToNextMonth,
|
|
323
|
+
goToPreviousMonth,
|
|
324
|
+
formatYear,
|
|
325
|
+
formatMonth
|
|
255
326
|
};
|
|
256
327
|
}
|
|
257
328
|
});
|
|
258
329
|
|
|
259
330
|
const _hoisted_1 = {
|
|
260
|
-
class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-md'])
|
|
331
|
+
class: /*#__PURE__*/normalizeClass(['layout-row-reverse', 'gap-md'])
|
|
261
332
|
};
|
|
262
333
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
263
334
|
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
@@ -270,68 +341,70 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
270
341
|
class: normalizeClass(_ctx.rootStyles)
|
|
271
342
|
}, [createVNode(_component_OrIconButton, {
|
|
272
343
|
icon: 'chevron_left',
|
|
273
|
-
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.
|
|
344
|
+
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.goToPreviousMonth(), ["stop"]))
|
|
274
345
|
}), createElementVNode("div", _hoisted_1, [createVNode(_component_OrButton, {
|
|
275
|
-
ref: "
|
|
346
|
+
ref: "yearButton",
|
|
276
347
|
variant: 'link',
|
|
277
348
|
color: 'inherit',
|
|
278
|
-
onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.
|
|
349
|
+
onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
|
|
279
350
|
}, {
|
|
280
|
-
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.
|
|
281
|
-
icon: 'arrow_drop_down'
|
|
282
|
-
})]),
|
|
351
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
|
|
352
|
+
icon: _ctx.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
353
|
+
}, null, 8 /* PROPS */, ["icon"])]),
|
|
283
354
|
_: 1 /* STABLE */
|
|
284
355
|
}, 512 /* NEED_PATCH */), createVNode(_component_OrButton, {
|
|
285
|
-
ref: "
|
|
356
|
+
ref: "monthButton",
|
|
286
357
|
variant: 'link',
|
|
287
358
|
color: 'inherit',
|
|
288
|
-
onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.
|
|
359
|
+
onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
|
|
289
360
|
}, {
|
|
290
|
-
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.
|
|
291
|
-
icon: 'arrow_drop_down'
|
|
292
|
-
})]),
|
|
361
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
|
|
362
|
+
icon: _ctx.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
363
|
+
}, null, 8 /* PROPS */, ["icon"])]),
|
|
293
364
|
_: 1 /* STABLE */
|
|
294
365
|
}, 512 /* NEED_PATCH */), createVNode(_component_OrMenu, {
|
|
295
|
-
ref: "
|
|
296
|
-
trigger: _ctx.
|
|
366
|
+
ref: "yearMenu",
|
|
367
|
+
trigger: _ctx.yearButtonRoot
|
|
297
368
|
}, {
|
|
298
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.
|
|
369
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, value => {
|
|
299
370
|
return openBlock(), createBlock(_component_OrMenuItem, {
|
|
300
|
-
key:
|
|
371
|
+
key: Number(value),
|
|
372
|
+
selected: Number(value) === Number(_ctx.proxyModelValue),
|
|
301
373
|
onClick: withModifiers($event => {
|
|
302
|
-
_ctx.
|
|
303
|
-
_ctx.
|
|
374
|
+
_ctx.proxyModelValue = value;
|
|
375
|
+
_ctx.yearMenu.close();
|
|
304
376
|
}, ["stop"])
|
|
305
377
|
}, {
|
|
306
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
378
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(value)), 1 /* TEXT */)]),
|
|
307
379
|
|
|
308
380
|
_: 2 /* DYNAMIC */
|
|
309
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
381
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
|
|
310
382
|
}), 128 /* KEYED_FRAGMENT */))]),
|
|
311
383
|
|
|
312
384
|
_: 1 /* STABLE */
|
|
313
385
|
}, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrMenu, {
|
|
314
|
-
ref: "
|
|
315
|
-
trigger: _ctx.
|
|
386
|
+
ref: "monthMenu",
|
|
387
|
+
trigger: _ctx.monthButtonRoot
|
|
316
388
|
}, {
|
|
317
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.
|
|
389
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, value => {
|
|
318
390
|
return openBlock(), createBlock(_component_OrMenuItem, {
|
|
319
|
-
key:
|
|
391
|
+
key: Number(value),
|
|
392
|
+
selected: Number(value) === Number(_ctx.proxyModelValue),
|
|
320
393
|
onClick: withModifiers($event => {
|
|
321
|
-
_ctx.
|
|
322
|
-
_ctx.
|
|
394
|
+
_ctx.proxyModelValue = value;
|
|
395
|
+
_ctx.monthMenu.close();
|
|
323
396
|
}, ["stop"])
|
|
324
397
|
}, {
|
|
325
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
398
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(value)), 1 /* TEXT */)]),
|
|
326
399
|
|
|
327
400
|
_: 2 /* DYNAMIC */
|
|
328
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
401
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
|
|
329
402
|
}), 128 /* KEYED_FRAGMENT */))]),
|
|
330
403
|
|
|
331
404
|
_: 1 /* STABLE */
|
|
332
405
|
}, 8 /* PROPS */, ["trigger"])]), createVNode(_component_OrIconButton, {
|
|
333
406
|
icon: 'chevron_right',
|
|
334
|
-
onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.
|
|
407
|
+
onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.goToNextMonth(), ["stop"]))
|
|
335
408
|
})], 2 /* CLASS */);
|
|
336
409
|
}
|
|
337
410
|
|
|
@@ -349,7 +422,7 @@ const DateTimePickerPopoverFooter = [
|
|
|
349
422
|
var script$3 = defineComponent({
|
|
350
423
|
name: 'OrDateTimePickerPopoverFooter',
|
|
351
424
|
components: {
|
|
352
|
-
OrButton: script$
|
|
425
|
+
OrButton: script$7
|
|
353
426
|
},
|
|
354
427
|
emits: ['resolve', 'reject'],
|
|
355
428
|
expose: ['root'],
|
|
@@ -442,7 +515,7 @@ const DateTimePickerTimeSelectButtonGroupItem = [
|
|
|
442
515
|
var script$1 = defineComponent({
|
|
443
516
|
name: 'OrDateTimePickerTimeSelect',
|
|
444
517
|
components: {
|
|
445
|
-
OrButton: script$
|
|
518
|
+
OrButton: script$7
|
|
446
519
|
},
|
|
447
520
|
model: {
|
|
448
521
|
prop: 'modelValue',
|
|
@@ -465,53 +538,53 @@ var script$1 = defineComponent({
|
|
|
465
538
|
const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
|
|
466
539
|
// State
|
|
467
540
|
const proxyModelValue = computed({
|
|
468
|
-
get: () => props.modelValue,
|
|
469
|
-
set: value => {
|
|
470
|
-
context.emit('update:modelValue', value);
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
const hoursValue = computed({
|
|
474
541
|
get: () => {
|
|
475
|
-
var _a
|
|
476
|
-
return (
|
|
542
|
+
var _a;
|
|
543
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
477
544
|
},
|
|
478
545
|
set: value => {
|
|
479
|
-
|
|
480
|
-
proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : 1970, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCMonth()) !== null && _d !== void 0 ? _d : 0, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCDate()) !== null && _f !== void 0 ? _f : 1, value, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : minutesValue.value));
|
|
546
|
+
context.emit('update:modelValue', value);
|
|
481
547
|
}
|
|
482
548
|
});
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : 1970, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCMonth()) !== null && _d !== void 0 ? _d : 0, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCDate()) !== null && _f !== void 0 ? _f : 1, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCHours()) !== null && _h !== void 0 ? _h : hoursValue.value, value));
|
|
491
|
-
}
|
|
549
|
+
const hoursOptions = computed(() => {
|
|
550
|
+
return Array.from({
|
|
551
|
+
length: 24
|
|
552
|
+
}, (_value, index) => {
|
|
553
|
+
const value = index;
|
|
554
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
|
|
555
|
+
});
|
|
492
556
|
});
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
557
|
+
const minutesOptions = computed(() => {
|
|
558
|
+
return Array.from({
|
|
559
|
+
length: 60
|
|
560
|
+
}, (_value, index) => {
|
|
561
|
+
const value = index;
|
|
562
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
|
|
563
|
+
});
|
|
564
|
+
});
|
|
565
|
+
// Methods
|
|
566
|
+
function formatHours(value) {
|
|
567
|
+
return value.toLocaleString('default', {
|
|
568
|
+
hour: '2-digit',
|
|
569
|
+
timeZone: 'UTC'
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
function formatMinutes(value) {
|
|
573
|
+
return value.toLocaleString('default', {
|
|
574
|
+
minute: '2-digit',
|
|
575
|
+
timeZone: 'UTC'
|
|
576
|
+
});
|
|
577
|
+
}
|
|
505
578
|
return {
|
|
506
579
|
root,
|
|
507
580
|
rootStyles,
|
|
508
581
|
buttonGroupStyles,
|
|
509
582
|
buttonGroupItemStyles,
|
|
510
583
|
proxyModelValue,
|
|
511
|
-
hoursValue,
|
|
512
|
-
minutesValue,
|
|
513
584
|
hoursOptions,
|
|
514
|
-
minutesOptions
|
|
585
|
+
minutesOptions,
|
|
586
|
+
formatHours,
|
|
587
|
+
formatMinutes
|
|
515
588
|
};
|
|
516
589
|
}
|
|
517
590
|
});
|
|
@@ -523,29 +596,29 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
523
596
|
class: normalizeClass(_ctx.rootStyles)
|
|
524
597
|
}, [createElementVNode("div", {
|
|
525
598
|
class: normalizeClass(_ctx.buttonGroupStyles)
|
|
526
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions,
|
|
599
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, value => {
|
|
527
600
|
return openBlock(), createBlock(_component_OrButton, {
|
|
528
|
-
key:
|
|
601
|
+
key: Number(value),
|
|
529
602
|
class: normalizeClass(_ctx.buttonGroupItemStyles),
|
|
530
|
-
variant:
|
|
531
|
-
color:
|
|
532
|
-
onClick: withModifiers($event => _ctx.
|
|
603
|
+
variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
|
|
604
|
+
color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
|
|
605
|
+
onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
|
|
533
606
|
}, {
|
|
534
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
607
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatHours(value)), 1 /* TEXT */)]),
|
|
535
608
|
|
|
536
609
|
_: 2 /* DYNAMIC */
|
|
537
610
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
|
|
538
611
|
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createTextVNode(" : "), createElementVNode("div", {
|
|
539
612
|
class: normalizeClass(_ctx.buttonGroupStyles)
|
|
540
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions,
|
|
613
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, value => {
|
|
541
614
|
return openBlock(), createBlock(_component_OrButton, {
|
|
542
|
-
key:
|
|
615
|
+
key: Number(value),
|
|
543
616
|
class: normalizeClass(_ctx.buttonGroupItemStyles),
|
|
544
|
-
variant:
|
|
545
|
-
color:
|
|
546
|
-
onClick: withModifiers($event => _ctx.
|
|
617
|
+
variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
|
|
618
|
+
color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
|
|
619
|
+
onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
|
|
547
620
|
}, {
|
|
548
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
621
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMinutes(value)), 1 /* TEXT */)]),
|
|
549
622
|
|
|
550
623
|
_: 2 /* DYNAMIC */
|
|
551
624
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
|
|
@@ -567,7 +640,7 @@ const DateTimePickerControl = [
|
|
|
567
640
|
var script = defineComponent({
|
|
568
641
|
name: 'OrDateTimePicker',
|
|
569
642
|
components: {
|
|
570
|
-
|
|
643
|
+
OrDateTimePickerDaySelect: script$6,
|
|
571
644
|
OrDateTimePickerMobileControl: script$5,
|
|
572
645
|
OrDateTimePickerMonthSelect: script$4,
|
|
573
646
|
OrDateTimePickerPopoverFooter: script$3,
|
|
@@ -577,7 +650,7 @@ var script = defineComponent({
|
|
|
577
650
|
OrHint: script$e,
|
|
578
651
|
OrIconButton: script$a,
|
|
579
652
|
OrInputBox: script$f,
|
|
580
|
-
OrLabel: script$
|
|
653
|
+
OrLabel: script$8,
|
|
581
654
|
OrPopover: script$g
|
|
582
655
|
},
|
|
583
656
|
directives: {
|
|
@@ -658,6 +731,12 @@ var script = defineComponent({
|
|
|
658
731
|
context.emit('update:modelValue', value);
|
|
659
732
|
}
|
|
660
733
|
});
|
|
734
|
+
const draftModelValue = ref();
|
|
735
|
+
watch(proxyModelValue, value => {
|
|
736
|
+
draftModelValue.value = value;
|
|
737
|
+
}, {
|
|
738
|
+
immediate: true
|
|
739
|
+
});
|
|
661
740
|
// Methods
|
|
662
741
|
function toggleDatePopover() {
|
|
663
742
|
if (!props.readonly && !props.disabled) {
|
|
@@ -707,6 +786,7 @@ var script = defineComponent({
|
|
|
707
786
|
controlStyles,
|
|
708
787
|
controlAttributes,
|
|
709
788
|
proxyModelValue,
|
|
789
|
+
draftModelValue,
|
|
710
790
|
toggleDatePopover,
|
|
711
791
|
toggleTimePopover,
|
|
712
792
|
closeDatePopover,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as script } from './OrMenu.vue_vue_type_script_lang-
|
|
1
|
+
import { s as script } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
|
|
2
2
|
import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, mergeProps, withModifiers, renderSlot } from 'vue';
|
|
3
3
|
|
|
4
4
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|