@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, reactive } from 'vue-demi';
|
|
1
|
+
import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
|
|
2
2
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
3
3
|
import { _ as __vue_component__$f } from './OrInputBox-0f4e8500.js';
|
|
4
4
|
import { I as InputBoxSize } from './OrInputBox.vue_rollup-plugin-vue_script-b2d0c353.js';
|
|
@@ -9,22 +9,55 @@ import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34
|
|
|
9
9
|
import { _ as __vue_component__$d } from './OrError-4ffc1c39.js';
|
|
10
10
|
import { _ as __vue_component__$e } from './OrHint-aa221198.js';
|
|
11
11
|
import { _ as __vue_component__$a } from './OrIconButton-ec2e21aa.js';
|
|
12
|
-
import { _ as __vue_component__$
|
|
12
|
+
import { _ as __vue_component__$8 } from './OrLabel-63380256.js';
|
|
13
13
|
import { _ as __vue_component__$g } from './OrPopover-83c885d0.js';
|
|
14
|
+
import { _ as __vue_component__$7 } from './OrButton-2283df1c.js';
|
|
14
15
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
15
|
-
import { _ as __vue_component__$8 } from './OrButton-2283df1c.js';
|
|
16
16
|
import { _ as __vue_component__$9 } from './OrIcon-d35a84d8.js';
|
|
17
17
|
import { _ as __vue_component__$c } from './OrMenuItem-6f9b8a93.js';
|
|
18
|
-
import { _ as __vue_component__$b } from './OrMenu-
|
|
18
|
+
import { _ as __vue_component__$b } from './OrMenu-18a7f179.js';
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function useDefaultDate() {
|
|
21
|
+
return new Date().getUTCDate();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function useDefaultHours() {
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function useDefaultMinutes() {
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function useDefaultMonth() {
|
|
33
|
+
return new Date().getUTCMonth();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function useDefaultYear() {
|
|
37
|
+
return new Date().getUTCFullYear();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const DateTimePickerDaySelect = [
|
|
21
41
|
// Layout
|
|
22
42
|
'layout-column',
|
|
23
43
|
// Spacing
|
|
24
44
|
'px-md', 'py-md', 'gap-sm'];
|
|
45
|
+
const DateTimePickerDaySelectButtonGroup = [
|
|
46
|
+
// Layout
|
|
47
|
+
'grid', 'grid-cols-7'];
|
|
48
|
+
const DateTimePickerDaySelectButtonGroupItem = [
|
|
49
|
+
// Box
|
|
50
|
+
'min-w-fit',
|
|
51
|
+
// Spacing
|
|
52
|
+
'!px-sm', '!py-sm',
|
|
53
|
+
// Typography
|
|
54
|
+
'typography-caption-regular'];
|
|
25
55
|
|
|
26
56
|
var script$6 = defineComponent({
|
|
27
|
-
name: '
|
|
57
|
+
name: 'OrDateTimePickerDaySelect',
|
|
58
|
+
components: {
|
|
59
|
+
OrButton: __vue_component__$7
|
|
60
|
+
},
|
|
28
61
|
model: {
|
|
29
62
|
prop: 'modelValue',
|
|
30
63
|
event: 'update:modelValue'
|
|
@@ -41,18 +74,49 @@ var script$6 = defineComponent({
|
|
|
41
74
|
// Refs
|
|
42
75
|
const root = ref();
|
|
43
76
|
// Styles
|
|
44
|
-
const rootStyles = computed(() => ['or-date-time-picker-
|
|
77
|
+
const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
|
|
78
|
+
const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
|
|
79
|
+
const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
|
|
45
80
|
// State
|
|
46
81
|
const proxyModelValue = computed({
|
|
47
|
-
get: () =>
|
|
82
|
+
get: () => {
|
|
83
|
+
var _a;
|
|
84
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
85
|
+
},
|
|
48
86
|
set: value => {
|
|
49
87
|
context.emit('update:modelValue', value);
|
|
50
88
|
}
|
|
51
89
|
});
|
|
90
|
+
const dayOptions = computed(() => {
|
|
91
|
+
const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
92
|
+
const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
93
|
+
const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
|
|
94
|
+
const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
|
|
95
|
+
return (() => {
|
|
96
|
+
let options = [],
|
|
97
|
+
value = calendarStartDate;
|
|
98
|
+
while (Number(value) !== Number(calendarEndDate)) {
|
|
99
|
+
options = [...options, value];
|
|
100
|
+
value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
|
|
101
|
+
}
|
|
102
|
+
return options;
|
|
103
|
+
})();
|
|
104
|
+
});
|
|
105
|
+
// Methods
|
|
106
|
+
function formatDay(value) {
|
|
107
|
+
return value.toLocaleString('default', {
|
|
108
|
+
day: 'numeric',
|
|
109
|
+
timeZone: 'UTC'
|
|
110
|
+
});
|
|
111
|
+
}
|
|
52
112
|
return {
|
|
53
113
|
root,
|
|
54
114
|
rootStyles,
|
|
55
|
-
|
|
115
|
+
buttonGroupStyles,
|
|
116
|
+
buttonGroupItemStyles,
|
|
117
|
+
proxyModelValue,
|
|
118
|
+
dayOptions,
|
|
119
|
+
formatDay
|
|
56
120
|
};
|
|
57
121
|
}
|
|
58
122
|
});
|
|
@@ -68,7 +132,24 @@ var __vue_render__$6 = function () {
|
|
|
68
132
|
return _c('div', {
|
|
69
133
|
ref: "root",
|
|
70
134
|
class: _vm.rootStyles
|
|
71
|
-
}, [
|
|
135
|
+
}, [_c('div', {
|
|
136
|
+
class: _vm.buttonGroupStyles
|
|
137
|
+
}, _vm._l(_vm.dayOptions, function (value) {
|
|
138
|
+
return _c('OrButton', {
|
|
139
|
+
key: Number(value),
|
|
140
|
+
class: _vm.buttonGroupItemStyles,
|
|
141
|
+
attrs: {
|
|
142
|
+
"variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
|
|
143
|
+
"color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit'
|
|
144
|
+
},
|
|
145
|
+
on: {
|
|
146
|
+
"click": function ($event) {
|
|
147
|
+
$event.stopPropagation();
|
|
148
|
+
_vm.proxyModelValue = value;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatDay(value)) + "\n ")]);
|
|
152
|
+
}), 1)]);
|
|
72
153
|
};
|
|
73
154
|
var __vue_staticRenderFns__$6 = [];
|
|
74
155
|
|
|
@@ -105,7 +186,7 @@ const DateTimePickerMobileControlContent = [
|
|
|
105
186
|
var script$5 = defineComponent({
|
|
106
187
|
name: 'OrDateTimePickerMobileControl',
|
|
107
188
|
components: {
|
|
108
|
-
OrLabel: __vue_component__$
|
|
189
|
+
OrLabel: __vue_component__$8
|
|
109
190
|
},
|
|
110
191
|
props: {
|
|
111
192
|
label: {
|
|
@@ -173,7 +254,7 @@ const DateTimePickerMonthSelect = [
|
|
|
173
254
|
var script$4 = defineComponent({
|
|
174
255
|
name: 'OrDateTimePickerMonthSelect',
|
|
175
256
|
components: {
|
|
176
|
-
OrButton: __vue_component__$
|
|
257
|
+
OrButton: __vue_component__$7,
|
|
177
258
|
OrIcon: __vue_component__$9,
|
|
178
259
|
OrIconButton: __vue_component__$a,
|
|
179
260
|
OrMenu: __vue_component__$b,
|
|
@@ -194,101 +275,93 @@ var script$4 = defineComponent({
|
|
|
194
275
|
setup(props, context) {
|
|
195
276
|
// Refs
|
|
196
277
|
const root = ref();
|
|
197
|
-
const monthButton = ref();
|
|
198
278
|
const yearButton = ref();
|
|
279
|
+
const monthButton = ref();
|
|
280
|
+
const yearButtonRoot = computed(() => {
|
|
281
|
+
var _a;
|
|
282
|
+
return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
283
|
+
});
|
|
199
284
|
const monthButtonRoot = computed(() => {
|
|
200
285
|
var _a;
|
|
201
286
|
return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
202
287
|
});
|
|
203
|
-
const
|
|
288
|
+
const yearMenu = ref();
|
|
289
|
+
const monthMenu = ref();
|
|
290
|
+
const yearMenuState = computed(() => {
|
|
204
291
|
var _a;
|
|
205
|
-
return (_a =
|
|
292
|
+
return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
293
|
+
});
|
|
294
|
+
const monthMenuState = computed(() => {
|
|
295
|
+
var _a;
|
|
296
|
+
return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
206
297
|
});
|
|
207
|
-
const monthMenu = ref();
|
|
208
|
-
const yearMenu = ref();
|
|
209
|
-
// const monthMenuState = computed(() => monthMenu.value?.state);
|
|
210
|
-
// const yearMenuState = computed(() => yearMenu.value?.state);
|
|
211
298
|
// Styles
|
|
212
299
|
const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
|
|
213
300
|
// State
|
|
214
301
|
const proxyModelValue = computed({
|
|
215
|
-
get: () => props.modelValue,
|
|
216
|
-
set: value => {
|
|
217
|
-
context.emit('update:modelValue', value);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
const yearValue = computed({
|
|
221
|
-
get: () => {
|
|
222
|
-
var _a, _b;
|
|
223
|
-
return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : new Date().getUTCFullYear();
|
|
224
|
-
},
|
|
225
|
-
set: value => {
|
|
226
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
227
|
-
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));
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
const monthValue = computed({
|
|
231
302
|
get: () => {
|
|
232
|
-
var _a
|
|
233
|
-
return (
|
|
303
|
+
var _a;
|
|
304
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
234
305
|
},
|
|
235
306
|
set: value => {
|
|
236
|
-
|
|
237
|
-
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));
|
|
307
|
+
context.emit('update:modelValue', value);
|
|
238
308
|
}
|
|
239
309
|
});
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
value
|
|
250
|
-
}) => value === monthValue.value)) === null || _a === void 0 ? void 0 : _a.label;
|
|
251
|
-
});
|
|
252
|
-
const yearOptions = Array.from({
|
|
253
|
-
length: 100
|
|
254
|
-
}, (_value, index) => {
|
|
255
|
-
const year = new Date().getUTCFullYear() - index;
|
|
256
|
-
return {
|
|
257
|
-
value: year,
|
|
258
|
-
label: new Date(year, monthValue.value).toLocaleString([], {
|
|
259
|
-
year: 'numeric'
|
|
260
|
-
})
|
|
261
|
-
};
|
|
310
|
+
const yearOptions = computed(() => {
|
|
311
|
+
return Array.from({
|
|
312
|
+
length: 11
|
|
313
|
+
}).map((_value, index, {
|
|
314
|
+
length
|
|
315
|
+
}) => {
|
|
316
|
+
const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
|
|
317
|
+
return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
318
|
+
});
|
|
262
319
|
});
|
|
263
|
-
const monthOptions =
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
value
|
|
269
|
-
|
|
270
|
-
month: 'long'
|
|
271
|
-
})
|
|
272
|
-
};
|
|
320
|
+
const monthOptions = computed(() => {
|
|
321
|
+
return Array.from({
|
|
322
|
+
length: 12
|
|
323
|
+
}, (_value, index) => {
|
|
324
|
+
const value = index;
|
|
325
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
326
|
+
});
|
|
273
327
|
});
|
|
328
|
+
// Methods
|
|
329
|
+
function goToNextMonth() {
|
|
330
|
+
proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
331
|
+
}
|
|
332
|
+
function goToPreviousMonth() {
|
|
333
|
+
proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
334
|
+
}
|
|
335
|
+
function formatYear(value) {
|
|
336
|
+
return value.toLocaleString('default', {
|
|
337
|
+
year: 'numeric',
|
|
338
|
+
timeZone: 'UTC'
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
function formatMonth(value) {
|
|
342
|
+
return value.toLocaleString('default', {
|
|
343
|
+
month: 'long',
|
|
344
|
+
timeZone: 'UTC'
|
|
345
|
+
});
|
|
346
|
+
}
|
|
274
347
|
return {
|
|
275
348
|
root,
|
|
276
|
-
monthButton,
|
|
277
349
|
yearButton,
|
|
278
|
-
|
|
350
|
+
monthButton,
|
|
279
351
|
yearButtonRoot,
|
|
280
|
-
|
|
352
|
+
monthButtonRoot,
|
|
281
353
|
yearMenu,
|
|
282
|
-
|
|
283
|
-
|
|
354
|
+
monthMenu,
|
|
355
|
+
yearMenuState,
|
|
356
|
+
monthMenuState,
|
|
284
357
|
rootStyles,
|
|
285
358
|
proxyModelValue,
|
|
286
|
-
yearValue,
|
|
287
|
-
monthValue,
|
|
288
|
-
yearLabel,
|
|
289
|
-
monthLabel,
|
|
290
359
|
yearOptions,
|
|
291
|
-
monthOptions
|
|
360
|
+
monthOptions,
|
|
361
|
+
goToNextMonth,
|
|
362
|
+
goToPreviousMonth,
|
|
363
|
+
formatYear,
|
|
364
|
+
formatMonth
|
|
292
365
|
};
|
|
293
366
|
}
|
|
294
367
|
});
|
|
@@ -311,13 +384,13 @@ var __vue_render__$4 = function () {
|
|
|
311
384
|
on: {
|
|
312
385
|
"click": function ($event) {
|
|
313
386
|
$event.stopPropagation();
|
|
314
|
-
|
|
387
|
+
return _vm.goToPreviousMonth();
|
|
315
388
|
}
|
|
316
389
|
}
|
|
317
390
|
}), _vm._v(" "), _c('div', {
|
|
318
|
-
class: ['layout-row', 'gap-md']
|
|
391
|
+
class: ['layout-row-reverse', 'gap-md']
|
|
319
392
|
}, [_c('OrButton', {
|
|
320
|
-
ref: "
|
|
393
|
+
ref: "yearButton",
|
|
321
394
|
attrs: {
|
|
322
395
|
"variant": 'link',
|
|
323
396
|
"color": 'inherit'
|
|
@@ -325,15 +398,15 @@ var __vue_render__$4 = function () {
|
|
|
325
398
|
on: {
|
|
326
399
|
"click": function ($event) {
|
|
327
400
|
$event.stopPropagation();
|
|
328
|
-
return _vm.
|
|
401
|
+
return _vm.yearMenu.open();
|
|
329
402
|
}
|
|
330
403
|
}
|
|
331
|
-
}, [_vm._v("\n " + _vm._s(_vm.
|
|
404
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatYear(_vm.proxyModelValue)) + " "), _c('OrIcon', {
|
|
332
405
|
attrs: {
|
|
333
|
-
"icon": 'arrow_drop_down'
|
|
406
|
+
"icon": _vm.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
334
407
|
}
|
|
335
408
|
})], 1), _vm._v(" "), _c('OrButton', {
|
|
336
|
-
ref: "
|
|
409
|
+
ref: "monthButton",
|
|
337
410
|
attrs: {
|
|
338
411
|
"variant": 'link',
|
|
339
412
|
"color": 'inherit'
|
|
@@ -341,45 +414,51 @@ var __vue_render__$4 = function () {
|
|
|
341
414
|
on: {
|
|
342
415
|
"click": function ($event) {
|
|
343
416
|
$event.stopPropagation();
|
|
344
|
-
return _vm.
|
|
417
|
+
return _vm.monthMenu.open();
|
|
345
418
|
}
|
|
346
419
|
}
|
|
347
|
-
}, [_vm._v("\n " + _vm._s(_vm.
|
|
420
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatMonth(_vm.proxyModelValue)) + " "), _c('OrIcon', {
|
|
348
421
|
attrs: {
|
|
349
|
-
"icon": 'arrow_drop_down'
|
|
422
|
+
"icon": _vm.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
350
423
|
}
|
|
351
424
|
})], 1), _vm._v(" "), _c('OrMenu', {
|
|
352
|
-
ref: "
|
|
425
|
+
ref: "yearMenu",
|
|
353
426
|
attrs: {
|
|
354
|
-
"trigger": _vm.
|
|
427
|
+
"trigger": _vm.yearButtonRoot
|
|
355
428
|
}
|
|
356
|
-
}, _vm._l(_vm.
|
|
429
|
+
}, _vm._l(_vm.yearOptions, function (value) {
|
|
357
430
|
return _c('OrMenuItem', {
|
|
358
|
-
key:
|
|
431
|
+
key: Number(value),
|
|
432
|
+
attrs: {
|
|
433
|
+
"selected": Number(value) === Number(_vm.proxyModelValue)
|
|
434
|
+
},
|
|
359
435
|
on: {
|
|
360
436
|
"click": function ($event) {
|
|
361
437
|
$event.stopPropagation();
|
|
362
|
-
_vm.
|
|
363
|
-
_vm.
|
|
438
|
+
_vm.proxyModelValue = value;
|
|
439
|
+
_vm.yearMenu.close();
|
|
364
440
|
}
|
|
365
441
|
}
|
|
366
|
-
}, [_vm._v("\n " + _vm._s(
|
|
442
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatYear(value)) + "\n ")]);
|
|
367
443
|
}), 1), _vm._v(" "), _c('OrMenu', {
|
|
368
|
-
ref: "
|
|
444
|
+
ref: "monthMenu",
|
|
369
445
|
attrs: {
|
|
370
|
-
"trigger": _vm.
|
|
446
|
+
"trigger": _vm.monthButtonRoot
|
|
371
447
|
}
|
|
372
|
-
}, _vm._l(_vm.
|
|
448
|
+
}, _vm._l(_vm.monthOptions, function (value) {
|
|
373
449
|
return _c('OrMenuItem', {
|
|
374
|
-
key:
|
|
450
|
+
key: Number(value),
|
|
451
|
+
attrs: {
|
|
452
|
+
"selected": Number(value) === Number(_vm.proxyModelValue)
|
|
453
|
+
},
|
|
375
454
|
on: {
|
|
376
455
|
"click": function ($event) {
|
|
377
456
|
$event.stopPropagation();
|
|
378
|
-
_vm.
|
|
379
|
-
_vm.
|
|
457
|
+
_vm.proxyModelValue = value;
|
|
458
|
+
_vm.monthMenu.close();
|
|
380
459
|
}
|
|
381
460
|
}
|
|
382
|
-
}, [_vm._v("\n " + _vm._s(
|
|
461
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatMonth(value)) + "\n ")]);
|
|
383
462
|
}), 1)], 1), _vm._v(" "), _c('OrIconButton', {
|
|
384
463
|
attrs: {
|
|
385
464
|
"icon": 'chevron_right'
|
|
@@ -387,7 +466,7 @@ var __vue_render__$4 = function () {
|
|
|
387
466
|
on: {
|
|
388
467
|
"click": function ($event) {
|
|
389
468
|
$event.stopPropagation();
|
|
390
|
-
|
|
469
|
+
return _vm.goToNextMonth();
|
|
391
470
|
}
|
|
392
471
|
}
|
|
393
472
|
})], 1);
|
|
@@ -424,7 +503,7 @@ const DateTimePickerPopoverFooter = [
|
|
|
424
503
|
var script$3 = defineComponent({
|
|
425
504
|
name: 'OrDateTimePickerPopoverFooter',
|
|
426
505
|
components: {
|
|
427
|
-
OrButton: __vue_component__$
|
|
506
|
+
OrButton: __vue_component__$7
|
|
428
507
|
},
|
|
429
508
|
emits: ['resolve', 'reject'],
|
|
430
509
|
expose: ['root'],
|
|
@@ -572,7 +651,7 @@ const DateTimePickerTimeSelectButtonGroupItem = [
|
|
|
572
651
|
var script$1 = defineComponent({
|
|
573
652
|
name: 'OrDateTimePickerTimeSelect',
|
|
574
653
|
components: {
|
|
575
|
-
OrButton: __vue_component__$
|
|
654
|
+
OrButton: __vue_component__$7
|
|
576
655
|
},
|
|
577
656
|
model: {
|
|
578
657
|
prop: 'modelValue',
|
|
@@ -595,53 +674,53 @@ var script$1 = defineComponent({
|
|
|
595
674
|
const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
|
|
596
675
|
// State
|
|
597
676
|
const proxyModelValue = computed({
|
|
598
|
-
get: () => props.modelValue,
|
|
599
|
-
set: value => {
|
|
600
|
-
context.emit('update:modelValue', value);
|
|
601
|
-
}
|
|
602
|
-
});
|
|
603
|
-
const hoursValue = computed({
|
|
604
677
|
get: () => {
|
|
605
|
-
var _a
|
|
606
|
-
return (
|
|
678
|
+
var _a;
|
|
679
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
607
680
|
},
|
|
608
681
|
set: value => {
|
|
609
|
-
|
|
610
|
-
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));
|
|
682
|
+
context.emit('update:modelValue', value);
|
|
611
683
|
}
|
|
612
684
|
});
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
685
|
+
const hoursOptions = computed(() => {
|
|
686
|
+
return Array.from({
|
|
687
|
+
length: 24
|
|
688
|
+
}, (_value, index) => {
|
|
689
|
+
const value = index;
|
|
690
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
|
|
691
|
+
});
|
|
692
|
+
});
|
|
693
|
+
const minutesOptions = computed(() => {
|
|
694
|
+
return Array.from({
|
|
695
|
+
length: 60
|
|
696
|
+
}, (_value, index) => {
|
|
697
|
+
const value = index;
|
|
698
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
|
|
699
|
+
});
|
|
622
700
|
});
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
701
|
+
// Methods
|
|
702
|
+
function formatHours(value) {
|
|
703
|
+
return value.toLocaleString('default', {
|
|
704
|
+
hour: '2-digit',
|
|
705
|
+
timeZone: 'UTC'
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
function formatMinutes(value) {
|
|
709
|
+
return value.toLocaleString('default', {
|
|
710
|
+
minute: '2-digit',
|
|
711
|
+
timeZone: 'UTC'
|
|
712
|
+
});
|
|
713
|
+
}
|
|
635
714
|
return {
|
|
636
715
|
root,
|
|
637
716
|
rootStyles,
|
|
638
717
|
buttonGroupStyles,
|
|
639
718
|
buttonGroupItemStyles,
|
|
640
719
|
proxyModelValue,
|
|
641
|
-
hoursValue,
|
|
642
|
-
minutesValue,
|
|
643
720
|
hoursOptions,
|
|
644
|
-
minutesOptions
|
|
721
|
+
minutesOptions,
|
|
722
|
+
formatHours,
|
|
723
|
+
formatMinutes
|
|
645
724
|
};
|
|
646
725
|
}
|
|
647
726
|
});
|
|
@@ -659,38 +738,38 @@ var __vue_render__$1 = function () {
|
|
|
659
738
|
class: _vm.rootStyles
|
|
660
739
|
}, [_c('div', {
|
|
661
740
|
class: _vm.buttonGroupStyles
|
|
662
|
-
}, _vm._l(_vm.hoursOptions, function (
|
|
741
|
+
}, _vm._l(_vm.hoursOptions, function (value) {
|
|
663
742
|
return _c('OrButton', {
|
|
664
|
-
key:
|
|
743
|
+
key: Number(value),
|
|
665
744
|
class: _vm.buttonGroupItemStyles,
|
|
666
745
|
attrs: {
|
|
667
|
-
"variant":
|
|
668
|
-
"color":
|
|
746
|
+
"variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
|
|
747
|
+
"color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit'
|
|
669
748
|
},
|
|
670
749
|
on: {
|
|
671
750
|
"click": function ($event) {
|
|
672
751
|
$event.stopPropagation();
|
|
673
|
-
_vm.
|
|
752
|
+
_vm.proxyModelValue = value;
|
|
674
753
|
}
|
|
675
754
|
}
|
|
676
|
-
}, [_vm._v("\n " + _vm._s(
|
|
755
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatHours(value)) + "\n ")]);
|
|
677
756
|
}), 1), _vm._v("\n\n :\n\n "), _c('div', {
|
|
678
757
|
class: _vm.buttonGroupStyles
|
|
679
|
-
}, _vm._l(_vm.minutesOptions, function (
|
|
758
|
+
}, _vm._l(_vm.minutesOptions, function (value) {
|
|
680
759
|
return _c('OrButton', {
|
|
681
|
-
key:
|
|
760
|
+
key: Number(value),
|
|
682
761
|
class: _vm.buttonGroupItemStyles,
|
|
683
762
|
attrs: {
|
|
684
|
-
"variant":
|
|
685
|
-
"color":
|
|
763
|
+
"variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
|
|
764
|
+
"color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit'
|
|
686
765
|
},
|
|
687
766
|
on: {
|
|
688
767
|
"click": function ($event) {
|
|
689
768
|
$event.stopPropagation();
|
|
690
|
-
_vm.
|
|
769
|
+
_vm.proxyModelValue = value;
|
|
691
770
|
}
|
|
692
771
|
}
|
|
693
|
-
}, [_vm._v("\n " + _vm._s(
|
|
772
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatMinutes(value)) + "\n ")]);
|
|
694
773
|
}), 1)]);
|
|
695
774
|
};
|
|
696
775
|
var __vue_staticRenderFns__$1 = [];
|
|
@@ -726,7 +805,7 @@ const DateTimePickerControl = [
|
|
|
726
805
|
var script = defineComponent({
|
|
727
806
|
name: 'OrDateTimePicker',
|
|
728
807
|
components: {
|
|
729
|
-
|
|
808
|
+
OrDateTimePickerDaySelect: __vue_component__$6,
|
|
730
809
|
OrDateTimePickerMobileControl: __vue_component__$5,
|
|
731
810
|
OrDateTimePickerMonthSelect: __vue_component__$4,
|
|
732
811
|
OrDateTimePickerPopoverFooter: __vue_component__$3,
|
|
@@ -736,7 +815,7 @@ var script = defineComponent({
|
|
|
736
815
|
OrHint: __vue_component__$e,
|
|
737
816
|
OrIconButton: __vue_component__$a,
|
|
738
817
|
OrInputBox: __vue_component__$f,
|
|
739
|
-
OrLabel: __vue_component__$
|
|
818
|
+
OrLabel: __vue_component__$8,
|
|
740
819
|
OrPopover: __vue_component__$g
|
|
741
820
|
},
|
|
742
821
|
directives: {
|
|
@@ -817,6 +896,12 @@ var script = defineComponent({
|
|
|
817
896
|
context.emit('update:modelValue', value);
|
|
818
897
|
}
|
|
819
898
|
});
|
|
899
|
+
const draftModelValue = ref();
|
|
900
|
+
watch(proxyModelValue, value => {
|
|
901
|
+
draftModelValue.value = value;
|
|
902
|
+
}, {
|
|
903
|
+
immediate: true
|
|
904
|
+
});
|
|
820
905
|
// Methods
|
|
821
906
|
function toggleDatePopover() {
|
|
822
907
|
if (!props.readonly && !props.disabled) {
|
|
@@ -866,6 +951,7 @@ var script = defineComponent({
|
|
|
866
951
|
controlStyles,
|
|
867
952
|
controlAttributes,
|
|
868
953
|
proxyModelValue,
|
|
954
|
+
draftModelValue,
|
|
869
955
|
toggleDatePopover,
|
|
870
956
|
toggleTimePopover,
|
|
871
957
|
closeDatePopover,
|
|
@@ -874,7 +960,7 @@ var script = defineComponent({
|
|
|
874
960
|
}
|
|
875
961
|
});
|
|
876
962
|
|
|
877
|
-
var css_248z = "input[data-v-
|
|
963
|
+
var css_248z = "input[data-v-0bec0f54]{min-width:0;background:0 0;outline:0}input[type=date][data-v-0bec0f54]::-webkit-datetime-edit-day-field,input[type=date][data-v-0bec0f54]::-webkit-datetime-edit-month-field,input[type=date][data-v-0bec0f54]::-webkit-datetime-edit-year-field{display:none}input[type=time][data-v-0bec0f54]::-webkit-datetime-edit-ampm-field,input[type=time][data-v-0bec0f54]::-webkit-datetime-edit-hour-field,input[type=time][data-v-0bec0f54]::-webkit-datetime-edit-minute-field{display:none}input[type=date][data-v-0bec0f54]::-webkit-datetime-edit-text,input[type=time][data-v-0bec0f54]::-webkit-datetime-edit-text{display:none}input[type=date][data-v-0bec0f54]::-webkit-calendar-picker-indicator,input[type=time][data-v-0bec0f54]::-webkit-calendar-picker-indicator{display:none}";
|
|
878
964
|
styleInject(css_248z);
|
|
879
965
|
|
|
880
966
|
/* script */
|
|
@@ -977,24 +1063,29 @@ var __vue_render__ = function () {
|
|
|
977
1063
|
}
|
|
978
1064
|
}, [_vm._v("\n 9:07\n ")])], 1), _vm._v(" "), _c('OrDateTimePickerMonthSelect', {
|
|
979
1065
|
model: {
|
|
980
|
-
value: _vm.
|
|
1066
|
+
value: _vm.draftModelValue,
|
|
981
1067
|
callback: function ($$v) {
|
|
982
|
-
_vm.
|
|
1068
|
+
_vm.draftModelValue = $$v;
|
|
983
1069
|
},
|
|
984
|
-
expression: "
|
|
1070
|
+
expression: "draftModelValue"
|
|
985
1071
|
}
|
|
986
|
-
}), _vm._v(" "), _c('
|
|
1072
|
+
}), _vm._v(" "), _c('OrDateTimePickerDaySelect', {
|
|
987
1073
|
model: {
|
|
988
|
-
value: _vm.
|
|
1074
|
+
value: _vm.draftModelValue,
|
|
989
1075
|
callback: function ($$v) {
|
|
990
|
-
_vm.
|
|
1076
|
+
_vm.draftModelValue = $$v;
|
|
991
1077
|
},
|
|
992
|
-
expression: "
|
|
1078
|
+
expression: "draftModelValue"
|
|
993
1079
|
}
|
|
994
1080
|
}), _vm._v(" "), _c('OrDateTimePickerPopoverFooter', {
|
|
995
1081
|
on: {
|
|
1082
|
+
"resolve": function ($event) {
|
|
1083
|
+
_vm.proxyModelValue = _vm.draftModelValue;
|
|
1084
|
+
_vm.datePopover.close();
|
|
1085
|
+
},
|
|
996
1086
|
"reject": function ($event) {
|
|
997
|
-
|
|
1087
|
+
_vm.draftModelValue = _vm.proxyModelValue;
|
|
1088
|
+
_vm.datePopover.close();
|
|
998
1089
|
}
|
|
999
1090
|
}
|
|
1000
1091
|
})], 1), _vm._v(" "), _c('OrPopover', {
|
|
@@ -1014,16 +1105,21 @@ var __vue_render__ = function () {
|
|
|
1014
1105
|
}
|
|
1015
1106
|
}, [_vm._v("\n 9:07\n ")])], 1), _vm._v(" "), _c('OrDateTimePickerTimeSelect', {
|
|
1016
1107
|
model: {
|
|
1017
|
-
value: _vm.
|
|
1108
|
+
value: _vm.draftModelValue,
|
|
1018
1109
|
callback: function ($$v) {
|
|
1019
|
-
_vm.
|
|
1110
|
+
_vm.draftModelValue = $$v;
|
|
1020
1111
|
},
|
|
1021
|
-
expression: "
|
|
1112
|
+
expression: "draftModelValue"
|
|
1022
1113
|
}
|
|
1023
1114
|
}), _vm._v(" "), _c('OrDateTimePickerPopoverFooter', {
|
|
1024
1115
|
on: {
|
|
1116
|
+
"resolve": function ($event) {
|
|
1117
|
+
_vm.proxyModelValue = _vm.draftModelValue;
|
|
1118
|
+
_vm.timePopover.close();
|
|
1119
|
+
},
|
|
1025
1120
|
"reject": function ($event) {
|
|
1026
|
-
|
|
1121
|
+
_vm.draftModelValue = _vm.proxyModelValue;
|
|
1122
|
+
_vm.timePopover.close();
|
|
1027
1123
|
}
|
|
1028
1124
|
}
|
|
1029
1125
|
})], 1), _vm._v(" "), _c('div', {
|
|
@@ -1057,7 +1153,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
1057
1153
|
/* style */
|
|
1058
1154
|
const __vue_inject_styles__ = undefined;
|
|
1059
1155
|
/* scoped */
|
|
1060
|
-
const __vue_scope_id__ = "data-v-
|
|
1156
|
+
const __vue_scope_id__ = "data-v-0bec0f54";
|
|
1061
1157
|
/* module identifier */
|
|
1062
1158
|
const __vue_module_identifier__ = undefined;
|
|
1063
1159
|
/* functional template */
|