@onereach/ui-components 3.0.4-beta.2500.0 → 3.0.4-beta.2502.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.
Files changed (99) hide show
  1. package/dist/bundled/v2/OrDatePicker-19e467e2.js +330 -0
  2. package/dist/bundled/v2/OrDateTimePicker-1011dc69.js +440 -0
  3. package/dist/bundled/v2/OrDateTimePickerMonthSelect-9e64d257.js +408 -0
  4. package/dist/bundled/v2/OrDateTimePickerPopoverHeader-c8672c0d.js +239 -0
  5. package/dist/bundled/v2/OrDateTimePickerTimeSelect-158d717b.js +179 -0
  6. package/dist/bundled/v2/OrTimePicker-1b3a758a.js +318 -0
  7. package/dist/bundled/v2/components/index.d.ts +2 -0
  8. package/dist/bundled/v2/components/index.js +7 -2
  9. package/dist/bundled/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  10. package/dist/bundled/v2/components/or-date-picker-v3/index.d.ts +2 -0
  11. package/dist/bundled/v2/components/or-date-picker-v3/index.js +31 -0
  12. package/dist/bundled/v2/components/or-date-picker-v3/props.d.ts +1 -0
  13. package/dist/bundled/v2/components/or-date-picker-v3/styles.d.ts +2 -0
  14. package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +7 -5
  15. package/dist/bundled/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  16. package/dist/bundled/v2/components/or-time-picker-v3/index.d.ts +2 -0
  17. package/dist/bundled/v2/components/or-time-picker-v3/index.js +29 -0
  18. package/dist/bundled/v2/components/or-time-picker-v3/props.d.ts +1 -0
  19. package/dist/bundled/v2/components/or-time-picker-v3/styles.d.ts +2 -0
  20. package/dist/bundled/v2/index.js +7 -2
  21. package/dist/bundled/v3/OrDatePicker.vue_vue_type_script_lang-8eafbe6b.js +177 -0
  22. package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-b2a9ef8d.js +226 -0
  23. package/dist/bundled/v3/OrDateTimePickerMonthSelect-8989be5a.js +341 -0
  24. package/dist/bundled/v3/OrDateTimePickerPopoverHeader-caffcc00.js +162 -0
  25. package/dist/bundled/v3/OrDateTimePickerTimeSelect-e3a89bed.js +148 -0
  26. package/dist/bundled/v3/OrTimePicker.vue_vue_type_script_lang-f46eb37f.js +176 -0
  27. package/dist/bundled/v3/components/index.d.ts +2 -0
  28. package/dist/bundled/v3/components/index.js +8 -3
  29. package/dist/bundled/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  30. package/dist/bundled/v3/components/or-date-picker-v3/index.d.ts +2 -0
  31. package/dist/bundled/v3/components/or-date-picker-v3/index.js +37 -0
  32. package/dist/bundled/v3/components/or-date-picker-v3/props.d.ts +1 -0
  33. package/dist/bundled/v3/components/or-date-picker-v3/styles.d.ts +2 -0
  34. package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +7 -4
  35. package/dist/bundled/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  36. package/dist/bundled/v3/components/or-time-picker-v3/index.d.ts +2 -0
  37. package/dist/bundled/v3/components/or-time-picker-v3/index.js +33 -0
  38. package/dist/bundled/v3/components/or-time-picker-v3/props.d.ts +1 -0
  39. package/dist/bundled/v3/components/or-time-picker-v3/styles.d.ts +2 -0
  40. package/dist/bundled/v3/index.js +629 -402
  41. package/dist/esm/v2/OrDatePicker-454f5267.js +329 -0
  42. package/dist/esm/v2/OrDateTimePicker-3f533d0c.js +439 -0
  43. package/dist/esm/v2/OrDateTimePickerMonthSelect-380d9c90.js +406 -0
  44. package/dist/esm/v2/OrDateTimePickerPopoverHeader-e11d3222.js +235 -0
  45. package/dist/esm/v2/OrDateTimePickerTimeSelect-83dd1e81.js +177 -0
  46. package/dist/esm/v2/OrTimePicker-f23c8577.js +317 -0
  47. package/dist/esm/v2/components/index.d.ts +2 -0
  48. package/dist/esm/v2/components/index.js +8 -3
  49. package/dist/esm/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  50. package/dist/esm/v2/components/or-date-picker-v3/index.d.ts +2 -0
  51. package/dist/esm/v2/components/or-date-picker-v3/index.js +29 -0
  52. package/dist/esm/v2/components/or-date-picker-v3/props.d.ts +1 -0
  53. package/dist/esm/v2/components/or-date-picker-v3/styles.d.ts +2 -0
  54. package/dist/esm/v2/components/or-date-time-picker-v3/index.js +4 -2
  55. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  56. package/dist/esm/v2/components/or-time-picker-v3/index.d.ts +2 -0
  57. package/dist/esm/v2/components/or-time-picker-v3/index.js +27 -0
  58. package/dist/esm/v2/components/or-time-picker-v3/props.d.ts +1 -0
  59. package/dist/esm/v2/components/or-time-picker-v3/styles.d.ts +2 -0
  60. package/dist/esm/v2/index.js +8 -3
  61. package/dist/esm/v3/OrDatePicker-390f7f11.js +288 -0
  62. package/dist/esm/v3/OrDateTimePicker-54db4170.js +390 -0
  63. package/dist/esm/v3/OrDateTimePickerMonthSelect-709b673d.js +338 -0
  64. package/dist/esm/v3/OrDateTimePickerPopoverHeader-c771a251.js +161 -0
  65. package/dist/esm/v3/OrDateTimePickerTimeSelect-2c8a7f9c.js +148 -0
  66. package/dist/esm/v3/OrTimePicker-362ca566.js +282 -0
  67. package/dist/esm/v3/components/index.d.ts +2 -0
  68. package/dist/esm/v3/components/index.js +7 -2
  69. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  70. package/dist/esm/v3/components/or-date-picker-v3/index.d.ts +2 -0
  71. package/dist/esm/v3/components/or-date-picker-v3/index.js +27 -0
  72. package/dist/esm/v3/components/or-date-picker-v3/props.d.ts +1 -0
  73. package/dist/esm/v3/components/or-date-picker-v3/styles.d.ts +2 -0
  74. package/dist/esm/v3/components/or-date-time-picker-v3/index.js +4 -2
  75. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  76. package/dist/esm/v3/components/or-time-picker-v3/index.d.ts +2 -0
  77. package/dist/esm/v3/components/or-time-picker-v3/index.js +25 -0
  78. package/dist/esm/v3/components/or-time-picker-v3/props.d.ts +1 -0
  79. package/dist/esm/v3/components/or-time-picker-v3/styles.d.ts +2 -0
  80. package/dist/esm/v3/index.js +7 -2
  81. package/package.json +2 -2
  82. package/src/components/index.ts +2 -0
  83. package/src/components/or-date-picker-v3/OrDatePicker.docs.mdx +7 -0
  84. package/src/components/or-date-picker-v3/OrDatePicker.stories3.ts +160 -0
  85. package/src/components/or-date-picker-v3/OrDatePicker.vue +308 -0
  86. package/src/components/or-date-picker-v3/index.ts +2 -0
  87. package/src/components/or-date-picker-v3/props.ts +1 -0
  88. package/src/components/or-date-picker-v3/styles.ts +12 -0
  89. package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +0 -34
  90. package/src/components/or-time-picker-v3/OrTimePicker.docs.mdx +7 -0
  91. package/src/components/or-time-picker-v3/OrTimePicker.stories3.ts +160 -0
  92. package/src/components/or-time-picker-v3/OrTimePicker.vue +302 -0
  93. package/src/components/or-time-picker-v3/index.ts +2 -0
  94. package/src/components/or-time-picker-v3/props.ts +1 -0
  95. package/src/components/or-time-picker-v3/styles.ts +12 -0
  96. package/dist/bundled/v2/OrDateTimePicker-5a379f88.js +0 -1245
  97. package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-77c42110.js +0 -855
  98. package/dist/esm/v2/OrDateTimePicker-9b277e74.js +0 -1238
  99. package/dist/esm/v3/OrDateTimePicker-46b452b3.js +0 -1021
@@ -1,1245 +0,0 @@
1
- import './index-fa6eb4ca.js';
2
- import { O as OrButton } from './OrButton-28addda1.js';
3
- import { defineComponent, ref, computed, reactive, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
4
- import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
5
- import { O as OrLabel } from './OrLabel-761500d5.js';
6
- import { O as OrIcon } from './OrIcon-05d29a78.js';
7
- import { O as OrIconButton } from './OrIconButton-50f3e359.js';
8
- import { O as OrMenu } from './OrMenu-0c2c348c.js';
9
- import { O as OrMenuItem } from './OrMenuItem-7eb9d387.js';
10
- import { O as OrError } from './OrError-1186b62f.js';
11
- import { O as OrHint } from './OrHint-29b31ba4.js';
12
- import { O as OrInputBox } from './OrInputBox-11b6ac9f.js';
13
- import { O as OrPopover } from './OrPopover-f3d58fff.js';
14
- import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-10460fec.js';
15
- import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-cf61643f.js';
16
- import { u as useValidationAttributes } from './useValidationAttributes-6df7bcf9.js';
17
- import { I as InputBoxSize } from './props-c966ae5f.js';
18
- import { s as styleInject } from './style-inject.es-4c6f2515.js';
19
-
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 = [
41
- // Layout
42
- 'layout-column',
43
- // Spacing
44
- 'px-md', 'py-md', 'gap-sm'];
45
- const DateTimePickerDaySelectButtonGroup = [
46
- // Layout
47
- 'grid', 'grid-cols-7',
48
- // Spacing
49
- 'gap-xs'];
50
- const DateTimePickerDaySelectButtonGroupItem = [
51
- // Box
52
- 'min-w-fit',
53
- // Spacing
54
- '!px-sm', '!py-sm',
55
- // Typography
56
- 'typography-caption-regular'];
57
-
58
- var script$6 = defineComponent({
59
- name: 'OrDateTimePickerDaySelect',
60
- components: {
61
- OrButton
62
- },
63
- model: {
64
- prop: 'modelValue',
65
- event: 'update:modelValue'
66
- },
67
- props: {
68
- modelValue: {
69
- type: Date,
70
- default: undefined
71
- },
72
- filter: {
73
- type: Function,
74
- default: undefined
75
- }
76
- },
77
- emits: ['update:modelValue'],
78
- expose: ['root'],
79
- setup(props, context) {
80
- // Refs
81
- const root = ref();
82
- // Styles
83
- const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
84
- const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
85
- const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
86
- // State
87
- const proxyModelValue = computed({
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
- },
92
- set: value => {
93
- context.emit('update:modelValue', value);
94
- }
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
- }
118
- return {
119
- root,
120
- rootStyles,
121
- buttonGroupStyles,
122
- buttonGroupItemStyles,
123
- proxyModelValue,
124
- dayOptions,
125
- formatDay
126
- };
127
- }
128
- });
129
-
130
- /* script */
131
- const __vue_script__$6 = script$6;
132
-
133
- /* template */
134
- var __vue_render__$6 = function () {
135
- var _vm = this;
136
- var _h = _vm.$createElement;
137
- var _c = _vm._self._c || _h;
138
- return _c('div', {
139
- ref: "root",
140
- class: _vm.rootStyles
141
- }, [_c('div', {
142
- class: _vm.buttonGroupStyles
143
- }, _vm._l(_vm.dayOptions, function (value) {
144
- return _c('OrButton', {
145
- key: Number(value),
146
- class: _vm.buttonGroupItemStyles,
147
- attrs: {
148
- "variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
149
- "color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit',
150
- "disabled": _vm.filter && !_vm.filter(value)
151
- },
152
- on: {
153
- "click": function ($event) {
154
- $event.stopPropagation();
155
- _vm.proxyModelValue = value;
156
- }
157
- }
158
- }, [_vm._v("\n " + _vm._s(_vm.formatDay(value)) + "\n ")]);
159
- }), 1)]);
160
- };
161
- var __vue_staticRenderFns__$6 = [];
162
-
163
- /* style */
164
- const __vue_inject_styles__$6 = undefined;
165
- /* scoped */
166
- const __vue_scope_id__$6 = undefined;
167
- /* module identifier */
168
- const __vue_module_identifier__$6 = undefined;
169
- /* functional template */
170
- const __vue_is_functional_template__$6 = false;
171
- /* style inject */
172
-
173
- /* style inject SSR */
174
-
175
- /* style inject shadow dom */
176
-
177
- const __vue_component__$7 = /*#__PURE__*/normalizeComponent({
178
- render: __vue_render__$6,
179
- staticRenderFns: __vue_staticRenderFns__$6
180
- }, __vue_inject_styles__$6, __vue_script__$6, __vue_scope_id__$6, __vue_is_functional_template__$6, __vue_module_identifier__$6, false, undefined, undefined, undefined);
181
- var OrDateTimePickerDaySelect = __vue_component__$7;
182
-
183
- const DateTimePickerMobileControl = [
184
- // Layout
185
- 'layout-column',
186
- // Spacing
187
- 'gap-xs'];
188
- const DateTimePickerMobileControlContent = [
189
- // Typography
190
- 'typography-headline-1',
191
- // Theme
192
- 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
193
-
194
- var script$5 = defineComponent({
195
- name: 'OrDateTimePickerMobileControl',
196
- components: {
197
- OrLabel
198
- },
199
- props: {
200
- label: {
201
- type: String,
202
- required: true
203
- }
204
- },
205
- expose: ['root'],
206
- setup() {
207
- // Refs
208
- const root = ref();
209
- // Styles
210
- const rootStyles = computed(() => ['or-date-time-picker-mobile-control', ...DateTimePickerMobileControl]);
211
- const contentStyles = computed(() => [...DateTimePickerMobileControlContent]);
212
- return {
213
- root,
214
- rootStyles,
215
- contentStyles
216
- };
217
- }
218
- });
219
-
220
- /* script */
221
- const __vue_script__$5 = script$5;
222
-
223
- /* template */
224
- var __vue_render__$5 = function () {
225
- var _vm = this;
226
- var _h = _vm.$createElement;
227
- var _c = _vm._self._c || _h;
228
- return _c('div', {
229
- ref: "root",
230
- class: _vm.rootStyles
231
- }, [_c('OrLabel', [_vm._v(_vm._s(_vm.label))]), _vm._v(" "), _c('div', {
232
- class: _vm.contentStyles
233
- }, [_vm._t("default")], 2)], 1);
234
- };
235
- var __vue_staticRenderFns__$5 = [];
236
-
237
- /* style */
238
- const __vue_inject_styles__$5 = undefined;
239
- /* scoped */
240
- const __vue_scope_id__$5 = undefined;
241
- /* module identifier */
242
- const __vue_module_identifier__$5 = undefined;
243
- /* functional template */
244
- const __vue_is_functional_template__$5 = false;
245
- /* style inject */
246
-
247
- /* style inject SSR */
248
-
249
- /* style inject shadow dom */
250
-
251
- const __vue_component__$6 = /*#__PURE__*/normalizeComponent({
252
- render: __vue_render__$5,
253
- staticRenderFns: __vue_staticRenderFns__$5
254
- }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
255
- var OrDateTimePickerMobileControl = __vue_component__$6;
256
-
257
- const DateTimePickerMonthSelect = [
258
- // Layout
259
- 'layout-row justify-between',
260
- // Spacing
261
- 'px-md', 'py-md', 'gap-md'];
262
-
263
- var script$4 = defineComponent({
264
- name: 'OrDateTimePickerMonthSelect',
265
- components: {
266
- OrButton,
267
- OrIcon,
268
- OrIconButton,
269
- OrMenu,
270
- OrMenuItem
271
- },
272
- model: {
273
- prop: 'modelValue',
274
- event: 'update:modelValue'
275
- },
276
- props: {
277
- modelValue: {
278
- type: Date,
279
- default: undefined
280
- },
281
- filter: {
282
- type: Function,
283
- default: undefined
284
- }
285
- },
286
- emits: ['update:modelValue'],
287
- expose: ['root'],
288
- setup(props, context) {
289
- // Refs
290
- const root = ref();
291
- const yearButton = ref();
292
- const monthButton = ref();
293
- const yearButtonRoot = computed(() => {
294
- var _a;
295
- return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
296
- });
297
- const monthButtonRoot = computed(() => {
298
- var _a;
299
- return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
300
- });
301
- const yearMenu = ref();
302
- const monthMenu = ref();
303
- const yearMenuState = computed(() => {
304
- var _a;
305
- return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
306
- });
307
- const monthMenuState = computed(() => {
308
- var _a;
309
- return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
310
- });
311
- // Styles
312
- const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
313
- // State
314
- const proxyModelValue = computed({
315
- get: () => {
316
- var _a;
317
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
318
- },
319
- set: value => {
320
- context.emit('update:modelValue', value);
321
- }
322
- });
323
- const yearOptions = computed(() => {
324
- return Array.from({
325
- length: 11
326
- }).map((_value, index, {
327
- length
328
- }) => {
329
- const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
330
- return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
331
- });
332
- });
333
- const monthOptions = computed(() => {
334
- return Array.from({
335
- length: 12
336
- }, (_value, index) => {
337
- const value = index;
338
- return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
339
- });
340
- });
341
- // Methods
342
- function goToNextMonth() {
343
- proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
344
- }
345
- function goToPreviousMonth() {
346
- proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
347
- }
348
- function formatYear(value) {
349
- return value.toLocaleString('default', {
350
- year: 'numeric',
351
- timeZone: 'UTC'
352
- });
353
- }
354
- function formatMonth(value) {
355
- return value.toLocaleString('default', {
356
- month: 'long',
357
- timeZone: 'UTC'
358
- });
359
- }
360
- return {
361
- root,
362
- yearButton,
363
- monthButton,
364
- yearButtonRoot,
365
- monthButtonRoot,
366
- yearMenu,
367
- monthMenu,
368
- yearMenuState,
369
- monthMenuState,
370
- rootStyles,
371
- proxyModelValue,
372
- yearOptions,
373
- monthOptions,
374
- goToNextMonth,
375
- goToPreviousMonth,
376
- formatYear,
377
- formatMonth
378
- };
379
- }
380
- });
381
-
382
- /* script */
383
- const __vue_script__$4 = script$4;
384
-
385
- /* template */
386
- var __vue_render__$4 = function () {
387
- var _vm = this;
388
- var _h = _vm.$createElement;
389
- var _c = _vm._self._c || _h;
390
- return _c('div', {
391
- ref: "root",
392
- class: _vm.rootStyles
393
- }, [_c('OrIconButton', {
394
- attrs: {
395
- "icon": 'chevron_left'
396
- },
397
- on: {
398
- "click": function ($event) {
399
- $event.stopPropagation();
400
- return _vm.goToPreviousMonth();
401
- }
402
- }
403
- }), _vm._v(" "), _c('div', {
404
- class: ['layout-row-reverse', 'gap-md']
405
- }, [_c('OrButton', {
406
- ref: "yearButton",
407
- attrs: {
408
- "variant": 'link',
409
- "color": 'inherit'
410
- },
411
- on: {
412
- "click": function ($event) {
413
- $event.stopPropagation();
414
- return _vm.yearMenu.open();
415
- }
416
- }
417
- }, [_vm._v("\n " + _vm._s(_vm.formatYear(_vm.proxyModelValue)) + " "), _c('OrIcon', {
418
- attrs: {
419
- "icon": _vm.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
420
- }
421
- })], 1), _vm._v(" "), _c('OrButton', {
422
- ref: "monthButton",
423
- attrs: {
424
- "variant": 'link',
425
- "color": 'inherit'
426
- },
427
- on: {
428
- "click": function ($event) {
429
- $event.stopPropagation();
430
- return _vm.monthMenu.open();
431
- }
432
- }
433
- }, [_vm._v("\n " + _vm._s(_vm.formatMonth(_vm.proxyModelValue)) + " "), _c('OrIcon', {
434
- attrs: {
435
- "icon": _vm.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
436
- }
437
- })], 1), _vm._v(" "), _c('OrMenu', {
438
- ref: "yearMenu",
439
- attrs: {
440
- "trigger": _vm.yearButtonRoot
441
- }
442
- }, _vm._l(_vm.yearOptions, function (value) {
443
- return _c('OrMenuItem', {
444
- key: Number(value),
445
- attrs: {
446
- "selected": Number(value) === Number(_vm.proxyModelValue),
447
- "disabled": _vm.filter && !_vm.filter(value)
448
- },
449
- on: {
450
- "click": function ($event) {
451
- $event.stopPropagation();
452
- _vm.proxyModelValue = value;
453
- _vm.yearMenu.close();
454
- }
455
- }
456
- }, [_vm._v("\n " + _vm._s(_vm.formatYear(value)) + "\n ")]);
457
- }), 1), _vm._v(" "), _c('OrMenu', {
458
- ref: "monthMenu",
459
- attrs: {
460
- "trigger": _vm.monthButtonRoot
461
- }
462
- }, _vm._l(_vm.monthOptions, function (value) {
463
- return _c('OrMenuItem', {
464
- key: Number(value),
465
- attrs: {
466
- "selected": Number(value) === Number(_vm.proxyModelValue),
467
- "disabled": _vm.filter && !_vm.filter(value)
468
- },
469
- on: {
470
- "click": function ($event) {
471
- $event.stopPropagation();
472
- _vm.proxyModelValue = value;
473
- _vm.monthMenu.close();
474
- }
475
- }
476
- }, [_vm._v("\n " + _vm._s(_vm.formatMonth(value)) + "\n ")]);
477
- }), 1)], 1), _vm._v(" "), _c('OrIconButton', {
478
- attrs: {
479
- "icon": 'chevron_right'
480
- },
481
- on: {
482
- "click": function ($event) {
483
- $event.stopPropagation();
484
- return _vm.goToNextMonth();
485
- }
486
- }
487
- })], 1);
488
- };
489
- var __vue_staticRenderFns__$4 = [];
490
-
491
- /* style */
492
- const __vue_inject_styles__$4 = undefined;
493
- /* scoped */
494
- const __vue_scope_id__$4 = undefined;
495
- /* module identifier */
496
- const __vue_module_identifier__$4 = undefined;
497
- /* functional template */
498
- const __vue_is_functional_template__$4 = false;
499
- /* style inject */
500
-
501
- /* style inject SSR */
502
-
503
- /* style inject shadow dom */
504
-
505
- const __vue_component__$5 = /*#__PURE__*/normalizeComponent({
506
- render: __vue_render__$4,
507
- staticRenderFns: __vue_staticRenderFns__$4
508
- }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, undefined, undefined);
509
- var OrDateTimePickerMonthSelect = __vue_component__$5;
510
-
511
- const DateTimePickerPopoverFooter = [
512
- // Layout
513
- 'layout-row-reverse',
514
- // Layout (children)
515
- 'children:grow',
516
- // Spacing
517
- 'px-md md:px-sm', 'py-md md:py-sm', 'gap-md md:gap-sm'];
518
-
519
- var script$3 = defineComponent({
520
- name: 'OrDateTimePickerPopoverFooter',
521
- components: {
522
- OrButton
523
- },
524
- emits: ['resolve', 'reject'],
525
- expose: ['root'],
526
- setup() {
527
- // Refs
528
- const root = ref();
529
- // Styles
530
- const rootStyles = computed(() => ['or-date-time-picker-popover-footer', ...DateTimePickerPopoverFooter]);
531
- return {
532
- root,
533
- rootStyles
534
- };
535
- }
536
- });
537
-
538
- /* script */
539
- const __vue_script__$3 = script$3;
540
-
541
- /* template */
542
- var __vue_render__$3 = function () {
543
- var _vm = this;
544
- var _h = _vm.$createElement;
545
- var _c = _vm._self._c || _h;
546
- return _c('footer', {
547
- ref: "root",
548
- class: _vm.rootStyles
549
- }, [_c('OrButton', {
550
- attrs: {
551
- "variant": 'outlined'
552
- },
553
- on: {
554
- "click": function ($event) {
555
- $event.stopPropagation();
556
- return _vm.$emit('resolve');
557
- }
558
- }
559
- }, [_vm._v("\n Done\n ")]), _vm._v(" "), _c('OrButton', {
560
- attrs: {
561
- "variant": 'text'
562
- },
563
- on: {
564
- "click": function ($event) {
565
- $event.stopPropagation();
566
- return _vm.$emit('reject');
567
- }
568
- }
569
- }, [_vm._v("\n Cancel\n ")])], 1);
570
- };
571
- var __vue_staticRenderFns__$3 = [];
572
-
573
- /* style */
574
- const __vue_inject_styles__$3 = undefined;
575
- /* scoped */
576
- const __vue_scope_id__$3 = undefined;
577
- /* module identifier */
578
- const __vue_module_identifier__$3 = undefined;
579
- /* functional template */
580
- const __vue_is_functional_template__$3 = false;
581
- /* style inject */
582
-
583
- /* style inject SSR */
584
-
585
- /* style inject shadow dom */
586
-
587
- const __vue_component__$4 = /*#__PURE__*/normalizeComponent({
588
- render: __vue_render__$3,
589
- staticRenderFns: __vue_staticRenderFns__$3
590
- }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
591
- var OrDateTimePickerPopoverFooter = __vue_component__$4;
592
-
593
- const DateTimePickerPopoverHeader = [
594
- // Layout
595
- 'layout-row md:hidden',
596
- // Spacing
597
- 'px-md', 'py-md', 'gap-xl'];
598
-
599
- var script$2 = defineComponent({
600
- name: 'OrDateTimePickerPopoverHeader',
601
- expose: ['root'],
602
- setup() {
603
- // Refs
604
- const root = ref();
605
- // Styles
606
- const rootStyles = computed(() => ['or-date-time-picker-popover-header', ...DateTimePickerPopoverHeader]);
607
- return {
608
- root,
609
- rootStyles
610
- };
611
- }
612
- });
613
-
614
- /* script */
615
- const __vue_script__$2 = script$2;
616
-
617
- /* template */
618
- var __vue_render__$2 = function () {
619
- var _vm = this;
620
- var _h = _vm.$createElement;
621
- var _c = _vm._self._c || _h;
622
- return _c('header', {
623
- ref: "root",
624
- class: _vm.rootStyles
625
- }, [_vm._t("default")], 2);
626
- };
627
- var __vue_staticRenderFns__$2 = [];
628
-
629
- /* style */
630
- const __vue_inject_styles__$2 = undefined;
631
- /* scoped */
632
- const __vue_scope_id__$2 = undefined;
633
- /* module identifier */
634
- const __vue_module_identifier__$2 = undefined;
635
- /* functional template */
636
- const __vue_is_functional_template__$2 = false;
637
- /* style inject */
638
-
639
- /* style inject SSR */
640
-
641
- /* style inject shadow dom */
642
-
643
- const __vue_component__$3 = /*#__PURE__*/normalizeComponent({
644
- render: __vue_render__$2,
645
- staticRenderFns: __vue_staticRenderFns__$2
646
- }, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, undefined, undefined);
647
- var OrDateTimePickerPopoverHeader = __vue_component__$3;
648
-
649
- const DateTimePickerTimeSelect = [
650
- // Layout
651
- 'layout-row justify-center',
652
- // Spacing
653
- 'px-md', 'py-md', 'gap-sm',
654
- // Typography
655
- 'typography-body-2-regular',
656
- // Theme
657
- 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
658
- const DateTimePickerTimeSelectButtonGroup = [
659
- // Layout
660
- 'layout-column',
661
- // Box
662
- 'max-h-[224px]',
663
- // Overflow
664
- 'overflow-x-hidden', 'overflow-y-auto'];
665
- const DateTimePickerTimeSelectButtonGroupItem = [
666
- // Typography
667
- 'typography-caption-regular'];
668
-
669
- var script$1 = defineComponent({
670
- name: 'OrDateTimePickerTimeSelect',
671
- components: {
672
- OrButton
673
- },
674
- model: {
675
- prop: 'modelValue',
676
- event: 'update:modelValue'
677
- },
678
- props: {
679
- modelValue: {
680
- type: Date,
681
- default: undefined
682
- },
683
- filter: {
684
- type: Function,
685
- default: undefined
686
- }
687
- },
688
- emits: ['update:modelValue'],
689
- expose: ['root'],
690
- setup(props, context) {
691
- // Refs
692
- const root = ref();
693
- // Styles
694
- const rootStyles = computed(() => ['or-date-time-picker-time-select', ...DateTimePickerTimeSelect]);
695
- const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
696
- const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
697
- // State
698
- const proxyModelValue = computed({
699
- get: () => {
700
- var _a;
701
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
702
- },
703
- set: value => {
704
- context.emit('update:modelValue', value);
705
- }
706
- });
707
- const hoursOptions = computed(() => {
708
- return Array.from({
709
- length: 24
710
- }, (_value, index) => {
711
- const value = index;
712
- return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
713
- });
714
- });
715
- const minutesOptions = computed(() => {
716
- return Array.from({
717
- length: 60
718
- }, (_value, index) => {
719
- const value = index;
720
- return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
721
- });
722
- });
723
- // Methods
724
- function formatHours(value) {
725
- return value.toLocaleString('default', {
726
- hour: '2-digit',
727
- timeZone: 'UTC'
728
- });
729
- }
730
- function formatMinutes(value) {
731
- return value.toLocaleString('default', {
732
- minute: '2-digit',
733
- timeZone: 'UTC'
734
- });
735
- }
736
- return {
737
- root,
738
- rootStyles,
739
- buttonGroupStyles,
740
- buttonGroupItemStyles,
741
- proxyModelValue,
742
- hoursOptions,
743
- minutesOptions,
744
- formatHours,
745
- formatMinutes
746
- };
747
- }
748
- });
749
-
750
- /* script */
751
- const __vue_script__$1 = script$1;
752
-
753
- /* template */
754
- var __vue_render__$1 = function () {
755
- var _vm = this;
756
- var _h = _vm.$createElement;
757
- var _c = _vm._self._c || _h;
758
- return _c('div', {
759
- ref: "root",
760
- class: _vm.rootStyles
761
- }, [_c('div', {
762
- class: _vm.buttonGroupStyles
763
- }, _vm._l(_vm.hoursOptions, function (value) {
764
- return _c('OrButton', {
765
- key: Number(value),
766
- class: _vm.buttonGroupItemStyles,
767
- attrs: {
768
- "variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
769
- "color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit',
770
- "disabled": _vm.filter && !_vm.filter(value)
771
- },
772
- on: {
773
- "click": function ($event) {
774
- $event.stopPropagation();
775
- _vm.proxyModelValue = value;
776
- }
777
- }
778
- }, [_vm._v("\n " + _vm._s(_vm.formatHours(value)) + "\n ")]);
779
- }), 1), _vm._v("\n\n :\n\n "), _c('div', {
780
- class: _vm.buttonGroupStyles
781
- }, _vm._l(_vm.minutesOptions, function (value) {
782
- return _c('OrButton', {
783
- key: Number(value),
784
- class: _vm.buttonGroupItemStyles,
785
- attrs: {
786
- "variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
787
- "color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit',
788
- "disabled": _vm.filter && !_vm.filter(value)
789
- },
790
- on: {
791
- "click": function ($event) {
792
- $event.stopPropagation();
793
- _vm.proxyModelValue = value;
794
- }
795
- }
796
- }, [_vm._v("\n " + _vm._s(_vm.formatMinutes(value)) + "\n ")]);
797
- }), 1)]);
798
- };
799
- var __vue_staticRenderFns__$1 = [];
800
-
801
- /* style */
802
- const __vue_inject_styles__$1 = undefined;
803
- /* scoped */
804
- const __vue_scope_id__$1 = undefined;
805
- /* module identifier */
806
- const __vue_module_identifier__$1 = undefined;
807
- /* functional template */
808
- const __vue_is_functional_template__$1 = false;
809
- /* style inject */
810
-
811
- /* style inject SSR */
812
-
813
- /* style inject shadow dom */
814
-
815
- const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
816
- render: __vue_render__$1,
817
- staticRenderFns: __vue_staticRenderFns__$1
818
- }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
819
- var OrDateTimePickerTimeSelect = __vue_component__$2;
820
-
821
- const DateTimePicker = [
822
- // Layout
823
- 'layout-column',
824
- // Spacing
825
- 'gap-xs'];
826
- const DateTimePickerControl = [
827
- // Layout
828
- 'layout-inline-row justify-center',
829
- // Theme (focus)
830
- 'focus:theme-border-2-current', 'dark:focus:theme-border-2-current-dark', 'focus:theme-border-underline', 'dark:focus:theme-border-underline'];
831
-
832
- var script = defineComponent({
833
- name: 'OrDateTimePicker',
834
- components: {
835
- OrDateTimePickerDaySelect,
836
- OrDateTimePickerMobileControl,
837
- OrDateTimePickerMonthSelect,
838
- OrDateTimePickerPopoverFooter,
839
- OrDateTimePickerPopoverHeader,
840
- OrDateTimePickerTimeSelect,
841
- OrError,
842
- OrHint,
843
- OrIconButton,
844
- OrInputBox,
845
- OrLabel,
846
- OrPopover
847
- },
848
- directives: {
849
- DropdownClose,
850
- DropdownOpen
851
- },
852
- model: {
853
- prop: 'modelValue',
854
- event: 'update:modelValue'
855
- },
856
- props: {
857
- modelValue: {
858
- type: Date,
859
- default: undefined
860
- },
861
- filter: {
862
- type: Function,
863
- default: undefined
864
- },
865
- size: {
866
- type: String,
867
- default: InputBoxSize.M
868
- },
869
- label: {
870
- type: String,
871
- default: undefined
872
- },
873
- hint: {
874
- type: String,
875
- default: undefined
876
- },
877
- error: {
878
- type: [String, Boolean],
879
- default: undefined
880
- },
881
- required: {
882
- type: Boolean,
883
- default: false
884
- },
885
- readonly: {
886
- type: Boolean,
887
- default: false
888
- },
889
- disabled: {
890
- type: Boolean,
891
- default: false
892
- },
893
- disableDefaultStyles: {
894
- type: Boolean,
895
- default: false
896
- }
897
- },
898
- emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
899
- expose: ['root', 'focus', 'blur'],
900
- setup(props, context) {
901
- // Refs
902
- const root = ref();
903
- const dateControl = ref();
904
- const timeControl = ref();
905
- const datePopover = ref();
906
- const timePopover = ref();
907
- const datePopoverState = computed(() => {
908
- var _a;
909
- return (_a = datePopover.value) === null || _a === void 0 ? void 0 : _a.state;
910
- });
911
- const timePopoverState = computed(() => {
912
- var _a;
913
- return (_a = timePopover.value) === null || _a === void 0 ? void 0 : _a.state;
914
- });
915
- // Styles
916
- const rootStyles = computed(() => ['or-date-time-picker', ...DateTimePicker]);
917
- const controlStyles = computed(() => [...DateTimePickerControl]);
918
- // State
919
- const controlAttributes = reactive({
920
- id: useIdAttribute(),
921
- ...useControlAttributes(),
922
- ...useValidationAttributes()
923
- });
924
- const proxyModelValue = computed({
925
- get: () => props.modelValue,
926
- set: value => {
927
- context.emit('update:modelValue', value);
928
- }
929
- });
930
- const draftModelValue = ref();
931
- watch(proxyModelValue, value => {
932
- draftModelValue.value = value;
933
- }, {
934
- immediate: true
935
- });
936
- // Methods
937
- function toggleDatePopover() {
938
- if (!props.readonly && !props.disabled) {
939
- const popoverInstance = datePopover.value;
940
- if (popoverInstance) {
941
- if (datePopoverState.value === 'open') {
942
- popoverInstance.close();
943
- } else {
944
- popoverInstance.open();
945
- }
946
- }
947
- }
948
- }
949
- function toggleTimePopover() {
950
- if (!props.readonly && !props.disabled) {
951
- const popoverInstance = timePopover.value;
952
- if (popoverInstance) {
953
- if (timePopoverState.value === 'open') {
954
- popoverInstance.close();
955
- } else {
956
- popoverInstance.open();
957
- }
958
- }
959
- }
960
- }
961
- function closeDatePopover() {
962
- const popoverInstance = datePopover.value;
963
- if (popoverInstance) {
964
- popoverInstance.close();
965
- }
966
- }
967
- function closeTimePopover() {
968
- const popoverInstance = timePopover.value;
969
- if (popoverInstance) {
970
- popoverInstance.close();
971
- }
972
- }
973
- function formatDate(value) {
974
- var _a;
975
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
976
- dateStyle: 'short',
977
- timeZone: 'UTC'
978
- })) !== null && _a !== void 0 ? _a : '--';
979
- }
980
- function formatTime(value) {
981
- var _a;
982
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
983
- timeStyle: 'short',
984
- timeZone: 'UTC'
985
- })) !== null && _a !== void 0 ? _a : '--';
986
- }
987
- function formatDateAlt(value) {
988
- var _a;
989
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
990
- dateStyle: 'medium',
991
- timeZone: 'UTC'
992
- })) !== null && _a !== void 0 ? _a : '--';
993
- }
994
- function formatTimeAlt(value) {
995
- var _a;
996
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
997
- timeStyle: 'short',
998
- timeZone: 'UTC'
999
- })) !== null && _a !== void 0 ? _a : '--';
1000
- }
1001
- return {
1002
- root,
1003
- dateControl,
1004
- timeControl,
1005
- datePopover,
1006
- timePopover,
1007
- datePopoverState,
1008
- timePopoverState,
1009
- rootStyles,
1010
- controlStyles,
1011
- controlAttributes,
1012
- proxyModelValue,
1013
- draftModelValue,
1014
- toggleDatePopover,
1015
- toggleTimePopover,
1016
- closeDatePopover,
1017
- closeTimePopover,
1018
- formatDate,
1019
- formatTime,
1020
- formatDateAlt,
1021
- formatTimeAlt
1022
- };
1023
- }
1024
- });
1025
-
1026
- var css_248z = "input[data-v-4d939067]{min-width:0;background:0 0;outline:0}";
1027
- styleInject(css_248z);
1028
-
1029
- /* script */
1030
- const __vue_script__ = script;
1031
- /* template */
1032
- var __vue_render__ = function () {
1033
- var _vm = this;
1034
- var _h = _vm.$createElement;
1035
- var _c = _vm._self._c || _h;
1036
- return _c('div', {
1037
- ref: "root",
1038
- class: _vm.rootStyles
1039
- }, [_vm.label ? [_c('OrLabel', {
1040
- attrs: {
1041
- "control-id": _vm.controlAttributes.id,
1042
- "variant": 'input',
1043
- "required": _vm.required,
1044
- "disabled": _vm.disabled
1045
- },
1046
- scopedSlots: _vm._u([{
1047
- key: "addon",
1048
- fn: function () {
1049
- return [_vm._t("addon")];
1050
- },
1051
- proxy: true
1052
- }], null, true)
1053
- }, [_vm._v("\n " + _vm._s(_vm.label) + "\n\n ")])] : _vm._e(), _vm._v(" "), _c('OrInputBox', {
1054
- directives: [{
1055
- name: "dropdown-open",
1056
- rawName: "v-dropdown-open",
1057
- value: _vm.toggleDatePopover,
1058
- expression: "toggleDatePopover"
1059
- }, {
1060
- name: "dropdown-close",
1061
- rawName: "v-dropdown-close",
1062
- value: _vm.closeDatePopover,
1063
- expression: "closeDatePopover"
1064
- }],
1065
- attrs: {
1066
- "variant": _vm.disableDefaultStyles ? 'unstyled' : 'styled',
1067
- "size": _vm.size,
1068
- "invalid": !!_vm.error,
1069
- "readonly": _vm.readonly,
1070
- "disabled": _vm.disabled
1071
- }
1072
- }, [_c('div', _vm._b({
1073
- directives: [{
1074
- name: "dropdown-open",
1075
- rawName: "v-dropdown-open",
1076
- value: _vm.toggleDatePopover,
1077
- expression: "toggleDatePopover"
1078
- }, {
1079
- name: "dropdown-close",
1080
- rawName: "v-dropdown-close",
1081
- value: _vm.closeDatePopover,
1082
- expression: "closeDatePopover"
1083
- }],
1084
- ref: "dateControl",
1085
- class: _vm.controlStyles,
1086
- attrs: {
1087
- "contenteditable": true,
1088
- "required": _vm.required,
1089
- "readonly": _vm.readonly,
1090
- "disabled": _vm.disabled
1091
- }
1092
- }, 'div', _vm.controlAttributes, false), [_vm._v("\n " + _vm._s(_vm.formatDate(_vm.proxyModelValue)) + "\n ")]), _vm._v(" "), _c('div', _vm._b({
1093
- directives: [{
1094
- name: "dropdown-open",
1095
- rawName: "v-dropdown-open",
1096
- value: _vm.toggleTimePopover,
1097
- expression: "toggleTimePopover"
1098
- }, {
1099
- name: "dropdown-close",
1100
- rawName: "v-dropdown-close",
1101
- value: _vm.closeTimePopover,
1102
- expression: "closeTimePopover"
1103
- }],
1104
- ref: "timeControl",
1105
- class: _vm.controlStyles,
1106
- attrs: {
1107
- "contenteditable": true,
1108
- "required": _vm.required,
1109
- "readonly": _vm.readonly,
1110
- "disabled": _vm.disabled
1111
- }
1112
- }, 'div', _vm.controlAttributes, false), [_vm._v("\n " + _vm._s(_vm.formatTime(_vm.proxyModelValue)) + "\n ")]), _vm._v(" "), _c('OrPopover', {
1113
- ref: "datePopover",
1114
- attrs: {
1115
- "variant": 'auto',
1116
- "trigger": _vm.dateControl,
1117
- "placement": 'bottom'
1118
- }
1119
- }, [_c('OrDateTimePickerPopoverHeader', [_c('OrDateTimePickerMobileControl', {
1120
- attrs: {
1121
- "label": "Date"
1122
- }
1123
- }, [_vm._v("\n " + _vm._s(_vm.formatDateAlt(_vm.draftModelValue)) + "\n ")]), _vm._v(" "), _c('OrDateTimePickerMobileControl', {
1124
- attrs: {
1125
- "label": "Time"
1126
- }
1127
- }, [_vm._v("\n " + _vm._s(_vm.formatTimeAlt(_vm.draftModelValue)) + "\n ")])], 1), _vm._v(" "), _c('OrDateTimePickerMonthSelect', {
1128
- attrs: {
1129
- "filter": _vm.filter
1130
- },
1131
- model: {
1132
- value: _vm.draftModelValue,
1133
- callback: function ($$v) {
1134
- _vm.draftModelValue = $$v;
1135
- },
1136
- expression: "draftModelValue"
1137
- }
1138
- }), _vm._v(" "), _c('OrDateTimePickerDaySelect', {
1139
- attrs: {
1140
- "filter": _vm.filter
1141
- },
1142
- model: {
1143
- value: _vm.draftModelValue,
1144
- callback: function ($$v) {
1145
- _vm.draftModelValue = $$v;
1146
- },
1147
- expression: "draftModelValue"
1148
- }
1149
- }), _vm._v(" "), _c('OrDateTimePickerPopoverFooter', {
1150
- on: {
1151
- "resolve": function ($event) {
1152
- _vm.proxyModelValue = _vm.draftModelValue;
1153
- _vm.datePopover.close();
1154
- },
1155
- "reject": function ($event) {
1156
- _vm.draftModelValue = _vm.proxyModelValue;
1157
- _vm.datePopover.close();
1158
- }
1159
- }
1160
- })], 1), _vm._v(" "), _c('OrPopover', {
1161
- ref: "timePopover",
1162
- attrs: {
1163
- "variant": 'auto',
1164
- "trigger": _vm.timeControl,
1165
- "placement": 'bottom'
1166
- }
1167
- }, [_c('OrDateTimePickerPopoverHeader', [_c('OrDateTimePickerMobileControl', {
1168
- attrs: {
1169
- "label": "Date"
1170
- }
1171
- }, [_vm._v("\n " + _vm._s(_vm.formatDateAlt(_vm.draftModelValue)) + "\n ")]), _vm._v(" "), _c('OrDateTimePickerMobileControl', {
1172
- attrs: {
1173
- "label": "Time"
1174
- }
1175
- }, [_vm._v("\n " + _vm._s(_vm.formatTimeAlt(_vm.draftModelValue)) + "\n ")])], 1), _vm._v(" "), _c('OrDateTimePickerTimeSelect', {
1176
- attrs: {
1177
- "filter": _vm.filter
1178
- },
1179
- model: {
1180
- value: _vm.draftModelValue,
1181
- callback: function ($$v) {
1182
- _vm.draftModelValue = $$v;
1183
- },
1184
- expression: "draftModelValue"
1185
- }
1186
- }), _vm._v(" "), _c('OrDateTimePickerPopoverFooter', {
1187
- on: {
1188
- "resolve": function ($event) {
1189
- _vm.proxyModelValue = _vm.draftModelValue;
1190
- _vm.timePopover.close();
1191
- },
1192
- "reject": function ($event) {
1193
- _vm.draftModelValue = _vm.proxyModelValue;
1194
- _vm.timePopover.close();
1195
- }
1196
- }
1197
- })], 1), _vm._v(" "), _c('div', {
1198
- class: ['grow']
1199
- }), _vm._v(" "), _c('div', {
1200
- class: ['layout-inline-row']
1201
- }, [_vm.modelValue ? [_c('OrIconButton', {
1202
- attrs: {
1203
- "icon": 'close',
1204
- "color": 'inherit',
1205
- "disabled": _vm.readonly || _vm.disabled
1206
- },
1207
- on: {
1208
- "click": function ($event) {
1209
- $event.stopPropagation();
1210
- return _vm.$emit('update:modelValue', undefined);
1211
- }
1212
- }
1213
- })] : _vm._e()], 2)], 1), _vm._v(" "), !_vm.error ? [_vm.hint ? [_c('OrHint', {
1214
- attrs: {
1215
- "disabled": _vm.disabled
1216
- }
1217
- }, [_vm._v("\n " + _vm._s(_vm.hint) + "\n ")])] : _vm._e()] : _vm._e(), _vm._v(" "), typeof _vm.error === 'string' ? [_c('OrError', {
1218
- attrs: {
1219
- "disabled": _vm.disabled
1220
- }
1221
- }, [_vm._v("\n " + _vm._s(_vm.error) + "\n ")])] : _vm._e()], 2);
1222
- };
1223
- var __vue_staticRenderFns__ = [];
1224
-
1225
- /* style */
1226
- const __vue_inject_styles__ = undefined;
1227
- /* scoped */
1228
- const __vue_scope_id__ = "data-v-4d939067";
1229
- /* module identifier */
1230
- const __vue_module_identifier__ = undefined;
1231
- /* functional template */
1232
- const __vue_is_functional_template__ = false;
1233
- /* style inject */
1234
-
1235
- /* style inject SSR */
1236
-
1237
- /* style inject shadow dom */
1238
-
1239
- const __vue_component__ = /*#__PURE__*/normalizeComponent({
1240
- render: __vue_render__,
1241
- staticRenderFns: __vue_staticRenderFns__
1242
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
1243
- var __vue_component__$1 = __vue_component__;
1244
-
1245
- export { __vue_component__$1 as _ };