@onereach/ui-components 10.0.2 → 10.1.0-beta.4242.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/{OrDateTimePickerMonthSelect-980a9ada.js → OrDateTimePickerMonthSelect-d0681d68.js} +40 -21
- package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-a0ea3524.js → OrDateTimePickerPopoverHeader-31d1e247.js} +3 -6
- package/dist/bundled/v2/{OrDateTimePickerTimeSelect-328896c3.js → OrDateTimePickerTimeSelect-bcdf865d.js} +27 -14
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +1 -1
- package/dist/bundled/v2/components/OrDateFormatV3/OrDateFormat.js +26 -6
- package/dist/bundled/v2/components/OrDateFormatV3/OrDateFormat.vue.d.ts +33 -6
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +34 -9
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.vue.d.ts +55 -29
- package/dist/bundled/v2/components/OrDateRangePickerV3/OrDateRangePicker.js +47 -13
- package/dist/bundled/v2/components/OrDateRangePickerV3/OrDateRangePicker.vue.d.ts +49 -21
- package/dist/bundled/v2/components/OrDateRangePickerV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrDateRangePickerV3/types.d.ts +2 -0
- package/dist/bundled/v2/components/OrDateTimeFormatV3/OrDateTimeFormat.js +32 -8
- package/dist/bundled/v2/components/OrDateTimeFormatV3/OrDateTimeFormat.vue.d.ts +36 -8
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +49 -18
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +73 -46
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.d.ts +1 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +5 -4
- package/dist/bundled/v2/components/OrDateTimePickerV3/tokens.d.ts +3 -0
- package/dist/bundled/v2/components/OrDateTimePickerV3/tokens.js +5 -0
- package/dist/bundled/v2/components/OrDateTimePickerV3/types.d.ts +12 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/formatDate.d.ts +2 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/formatDate.js +3 -3
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/formatTime.d.ts +2 -2
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/formatTime.js +3 -3
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/getDatePlaceholder.d.ts +2 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/getDatePlaceholder.js +24 -4
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/getTimePlaceholder.d.ts +2 -2
- package/dist/bundled/v2/components/OrDateTimePickerV3/utils/getTimePlaceholder.js +15 -4
- package/dist/bundled/v2/components/OrInputV3/OrInput.js +1 -1
- package/dist/bundled/v2/components/OrInputV3/index.js +1 -1
- package/dist/bundled/v2/components/OrLabelV3/styles.js +3 -3
- package/dist/bundled/v2/components/OrListV3/OrList.js +1 -1
- package/dist/bundled/v2/components/OrListV3/index.js +1 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +1 -1
- package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
- package/dist/bundled/v2/components/OrTimeFormatV3/OrTimeFormat.js +23 -8
- package/dist/bundled/v2/components/OrTimeFormatV3/OrTimeFormat.vue.d.ts +23 -8
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +30 -13
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +41 -26
- package/dist/bundled/v2/components/OrTimeRangePickerV3/OrTimeRangePicker.js +45 -22
- package/dist/bundled/v2/components/OrTimeRangePickerV3/OrTimeRangePicker.vue.d.ts +40 -22
- package/dist/bundled/v2/components/OrTimeRangePickerV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrTimeRangePickerV3/types.d.ts +2 -0
- package/dist/bundled/v2/components/index.js +7 -6
- package/dist/bundled/v2/index.js +7 -6
- package/dist/bundled/v2/types-6a847182.js +14 -0
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/props.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/utils/extractChildrenValues.js +1 -1
- package/dist/bundled/v3/components/{OrCheckboxTreeV3-4635160f.js → OrCheckboxTreeV3-a4d5bc04.js} +1 -1
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrCheckboxV3-69269b9c.js → OrCheckboxV3-50db4f65.js} +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/props.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrCodeV3-5b8b5a7a.js → OrCodeV3-782af0c4.js} +1 -1
- package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.js +1 -1
- package/dist/bundled/v3/components/OrCombinedInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCombinedInputV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrCombinedInputV3-d6f24b0f.js → OrCombinedInputV3-933f1920.js} +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/index.js +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/props.js +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrConfirmV3-882d8f35.js → OrConfirmV3-bd6d7a69.js} +1 -1
- package/dist/bundled/v3/components/OrDateFormatV3/OrDateFormat.js +1 -1
- package/dist/bundled/v3/components/OrDateFormatV3/OrDateFormat.vue.d.ts +25 -4
- package/dist/bundled/v3/components/OrDateFormatV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateFormatV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrDateFormatV3-79a25ac8.js +71 -0
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +1 -1
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +37 -17
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDatePickerV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrDatePickerV3-d5f8c11a.js → OrDatePickerV3-7e493ca1.js} +35 -12
- package/dist/bundled/v3/components/OrDateRangePickerV3/OrDateRangePicker.js +1 -1
- package/dist/bundled/v3/components/OrDateRangePickerV3/OrDateRangePicker.vue.d.ts +34 -12
- package/dist/bundled/v3/components/OrDateRangePickerV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrDateRangePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateRangePickerV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrDateRangePickerV3/types.d.ts +2 -0
- package/dist/bundled/v3/components/{OrDateRangePickerV3-e62adab9.js → OrDateRangePickerV3-f215b1ba.js} +49 -21
- package/dist/bundled/v3/components/OrDateTimeFormatV3/OrDateTimeFormat.js +1 -1
- package/dist/bundled/v3/components/OrDateTimeFormatV3/OrDateTimeFormat.vue.d.ts +27 -6
- package/dist/bundled/v3/components/OrDateTimeFormatV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimeFormatV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrDateTimeFormatV3-57c82e28.js +81 -0
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +48 -28
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.d.ts +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/tokens.d.ts +3 -0
- package/dist/bundled/v3/components/OrDateTimePickerV3/tokens.js +1 -0
- package/dist/bundled/v3/components/OrDateTimePickerV3/types.d.ts +12 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/formatDate.d.ts +2 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/formatDate.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/formatTime.d.ts +2 -2
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/formatTime.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/getCurrentDate.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/getDatePlaceholder.d.ts +2 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/getDatePlaceholder.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/getNextMonthDate.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/getTimePlaceholder.d.ts +2 -2
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/getTimePlaceholder.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/utils/index.js +1 -1
- package/dist/bundled/v3/components/{OrDateTimePickerV3-84c0fee3.js → OrDateTimePickerV3-345a6c12.js} +171 -75
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +1 -1
- package/dist/bundled/v3/components/OrFormGroupV3/index.js +1 -1
- package/dist/bundled/v3/components/OrFormGroupV3/props.js +1 -1
- package/dist/bundled/v3/components/OrFormGroupV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrFormGroupV3-7d09a939.js → OrFormGroupV3-72dc8852.js} +1 -1
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +1 -1
- package/dist/bundled/v3/components/OrInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInputV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrInputV3-db89dfb7.js → OrInputV3-ac1c7fe7.js} +1 -1
- package/dist/bundled/v3/components/OrLabelV3/OrLabel.js +1 -1
- package/dist/bundled/v3/components/OrLabelV3/index.js +1 -1
- package/dist/bundled/v3/components/OrLabelV3/props.js +1 -1
- package/dist/bundled/v3/components/OrLabelV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrLabelV3-b1cd132a.js → OrLabelV3-23a42d9d.js} +3 -3
- package/dist/bundled/v3/components/OrListV3/OrList.js +1 -1
- package/dist/bundled/v3/components/OrListV3/index.js +1 -1
- package/dist/bundled/v3/components/OrListV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrListV3-62e510b2.js → OrListV3-02565baf.js} +1 -1
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +2 -2
- package/dist/bundled/v3/components/OrRadioV3/OrRadio.js +1 -1
- package/dist/bundled/v3/components/OrRadioV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRadioV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrRadioV3-e9c05c7b.js → OrRadioV3-0e34f4d0.js} +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +1 -1
- package/dist/bundled/v3/components/{OrRichTextEditorV3-01acbe53.js → OrRichTextEditorV3-cbaf6f09.js} +2 -2
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/utils/castToMultipleValue.js +1 -1
- package/dist/bundled/v3/components/{OrSelectV3-7888ad93.js → OrSelectV3-c63decef.js} +3 -3
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +1 -1
- package/dist/bundled/v3/components/OrSwitchV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSwitchV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrSwitchV3-2fa19537.js → OrSwitchV3-efb0189f.js} +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrTagInputV3-1dadfcfd.js → OrTagInputV3-591da379.js} +1 -1
- package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.js +1 -1
- package/dist/bundled/v3/components/OrTextareaV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTextareaV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrTextareaV3-4a8136b0.js → OrTextareaV3-e2e9affb.js} +1 -1
- package/dist/bundled/v3/components/OrTimeFormatV3/OrTimeFormat.js +1 -1
- package/dist/bundled/v3/components/OrTimeFormatV3/OrTimeFormat.vue.d.ts +17 -6
- package/dist/bundled/v3/components/OrTimeFormatV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTimeFormatV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrTimeFormatV3-9d2eeebc.js +71 -0
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +1 -1
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +27 -16
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTimePickerV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrTimePickerV3-ac66eecb.js → OrTimePickerV3-973014d4.js} +30 -14
- package/dist/bundled/v3/components/OrTimeRangePickerV3/OrTimeRangePicker.js +1 -1
- package/dist/bundled/v3/components/OrTimeRangePickerV3/OrTimeRangePicker.vue.d.ts +90 -15
- package/dist/bundled/v3/components/OrTimeRangePickerV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrTimeRangePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTimeRangePickerV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrTimeRangePickerV3/types.d.ts +2 -0
- package/dist/bundled/v3/components/{OrTimeRangePickerV3-ea15e8da.js → OrTimeRangePickerV3-b5c80254.js} +47 -25
- package/dist/bundled/v3/components/index.js +24 -24
- package/dist/bundled/v3/index.js +24 -24
- package/dist/esm/v2/{OrCardCollection-dae2f81d.js → OrCardCollection-cd033a01.js} +1 -1
- package/dist/esm/v2/{OrCheckbox-2e14d995.js → OrCheckbox-8cdfdc56.js} +1 -1
- package/dist/esm/v2/{OrCheckboxGroup-4c3c1418.js → OrCheckboxGroup-4a817c00.js} +2 -2
- package/dist/esm/v2/{OrCheckboxTree-9613ade5.js → OrCheckboxTree-338b5ff4.js} +1 -1
- package/dist/esm/v2/{OrCode-bab23c65.js → OrCode-06a15a0c.js} +1 -1
- package/dist/esm/v2/{OrCombinedInput-e3f4498e.js → OrCombinedInput-79d57e49.js} +1 -1
- package/dist/esm/v2/{OrConfirm-4561fd88.js → OrConfirm-121af86c.js} +1 -1
- package/dist/esm/v2/{OrDateFormat-7b761b0f.js → OrDateFormat-a17b5b23.js} +27 -9
- package/dist/esm/v2/{OrDatePicker-847e9db1.js → OrDatePicker-67c281d7.js} +34 -11
- package/dist/esm/v2/{OrDateRangePicker-01c5a09c.js → OrDateRangePicker-4d776fe2.js} +47 -15
- package/dist/esm/v2/{OrDateTimeFormat-80ff6397.js → OrDateTimeFormat-70e61dd6.js} +33 -10
- package/dist/esm/v2/{OrDateTimePicker-c68aacf9.js → OrDateTimePicker-cb46a36b.js} +10 -3
- package/dist/esm/v2/{OrDateTimePicker.vue_rollup-plugin-vue_script-bd0836fd.js → OrDateTimePicker.vue_rollup-plugin-vue_script-b7ca34e8.js} +43 -16
- package/dist/esm/v2/{OrDateTimePickerTimeSelect-2f7efc41.js → OrDateTimePickerTimeSelect-3fa9a7c7.js} +71 -42
- package/dist/esm/v2/{OrFormGroup-d8b290f4.js → OrFormGroup-936aa0ff.js} +1 -1
- package/dist/esm/v2/{OrInput-43f90e4a.js → OrInput-431ae55a.js} +1 -1
- package/dist/esm/v2/{OrLabel-113eae8d.js → OrLabel-b0805497.js} +3 -3
- package/dist/esm/v2/{OrList-aae21920.js → OrList-3078c5cd.js} +1 -1
- package/dist/esm/v2/{OrRadio-c6aec5c3.js → OrRadio-fd1fbde2.js} +1 -1
- package/dist/esm/v2/{OrRadioGroup-038ad285.js → OrRadioGroup-c4135a8f.js} +2 -2
- package/dist/esm/v2/{OrRichTextEditor-6a2785c0.js → OrRichTextEditor-85f52908.js} +2 -2
- package/dist/esm/v2/{OrSearch-5dd1820f.js → OrSearch-493eb34d.js} +1 -1
- package/dist/esm/v2/{OrSelect-bf279168.js → OrSelect-8acf0bfe.js} +3 -3
- package/dist/esm/v2/{OrSwitch-b636a4e7.js → OrSwitch-b1c4a235.js} +1 -1
- package/dist/esm/v2/{OrTagInput-dbd9096c.js → OrTagInput-cc597ae0.js} +1 -1
- package/dist/esm/v2/{OrTextarea-56e2159d.js → OrTextarea-ba7551a4.js} +1 -1
- package/dist/esm/v2/{OrTimeFormat-6e82fcd3.js → OrTimeFormat-bd9582b8.js} +24 -10
- package/dist/esm/v2/{OrTimePicker-e18d9265.js → OrTimePicker-7878d2c8.js} +30 -14
- package/dist/esm/v2/{OrTimeRangePicker-e46462b3.js → OrTimeRangePicker-bee857dc.js} +45 -23
- package/dist/esm/v2/components/index.js +30 -30
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +5 -5
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +3 -3
- package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v2/components/or-code-v3/index.js +2 -2
- package/dist/esm/v2/components/or-combined-input-v3/index.js +2 -2
- package/dist/esm/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v2/components/or-date-format-v3/OrDateFormat.vue.d.ts +33 -6
- package/dist/esm/v2/components/or-date-format-v3/index.js +5 -5
- package/dist/esm/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +55 -29
- package/dist/esm/v2/components/or-date-picker-v3/index.js +5 -5
- package/dist/esm/v2/components/or-date-range-picker-v3/OrDateRangePicker.vue.d.ts +49 -21
- package/dist/esm/v2/components/or-date-range-picker-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-date-range-picker-v3/index.js +5 -5
- package/dist/esm/v2/components/or-date-range-picker-v3/types.d.ts +2 -0
- package/dist/esm/v2/components/or-date-time-format-v3/OrDateTimeFormat.vue.d.ts +36 -8
- package/dist/esm/v2/components/or-date-time-format-v3/index.js +5 -5
- package/dist/esm/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +73 -46
- package/dist/esm/v2/components/or-date-time-picker-v3/index.d.ts +1 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +14 -14
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/index.js +3 -3
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +31 -9
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +33 -13
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +29 -19
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +22 -13
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +30 -22
- package/dist/esm/v2/components/or-date-time-picker-v3/tokens.d.ts +3 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/types.d.ts +12 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/utils/formatDate.d.ts +2 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/utils/formatTime.d.ts +2 -2
- package/dist/esm/v2/components/or-date-time-picker-v3/utils/getDatePlaceholder.d.ts +2 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/utils/getTimePlaceholder.d.ts +2 -2
- package/dist/esm/v2/components/or-date-time-picker-v3/utils/index.js +1 -1
- package/dist/esm/v2/components/or-form-group-v3/index.js +2 -2
- package/dist/esm/v2/components/or-input-v3/index.js +2 -2
- package/dist/esm/v2/components/or-label-v3/index.js +1 -1
- package/dist/esm/v2/components/or-list-v3/index.js +2 -2
- package/dist/esm/v2/components/or-radio-group-v3/index.js +4 -4
- package/dist/esm/v2/components/or-radio-v3/index.js +2 -2
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +3 -3
- package/dist/esm/v2/components/or-search-v3/index.js +3 -3
- package/dist/esm/v2/components/or-select-v3/index.js +4 -4
- package/dist/esm/v2/components/or-switch-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tag-input-v3/index.js +2 -2
- package/dist/esm/v2/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v2/components/or-time-format-v3/OrTimeFormat.vue.d.ts +23 -8
- package/dist/esm/v2/components/or-time-format-v3/index.js +5 -5
- package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +41 -26
- package/dist/esm/v2/components/or-time-picker-v3/index.js +5 -5
- package/dist/esm/v2/components/or-time-range-picker-v3/OrTimeRangePicker.vue.d.ts +40 -22
- package/dist/esm/v2/components/or-time-range-picker-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-time-range-picker-v3/index.js +5 -5
- package/dist/esm/v2/components/or-time-range-picker-v3/types.d.ts +2 -0
- package/dist/esm/v2/getTimePlaceholder-9d18b5ac.js +77 -0
- package/dist/esm/v2/index.js +30 -30
- package/dist/esm/v3/{OrCardCollection-7eecfe1b.js → OrCardCollection-853aaa1c.js} +1 -1
- package/dist/esm/v3/{OrCheckbox-91bc37d7.js → OrCheckbox-637049b9.js} +1 -1
- package/dist/esm/v3/{OrCheckboxGroup-ba429495.js → OrCheckboxGroup-4f9235bb.js} +2 -2
- package/dist/esm/v3/{OrCheckboxTree-e3b760d1.js → OrCheckboxTree-129603b3.js} +1 -1
- package/dist/esm/v3/{OrCode-590736cc.js → OrCode-79ec7fc2.js} +1 -1
- package/dist/esm/v3/{OrCombinedInput-1a22e413.js → OrCombinedInput-391b1de9.js} +1 -1
- package/dist/esm/v3/{OrConfirm-fdc47d05.js → OrConfirm-7333b2ff.js} +1 -1
- package/dist/esm/v3/OrDateFormat-3ef8c5c3.js +73 -0
- package/dist/esm/v3/{OrDatePicker-a65e349c.js → OrDatePicker-1d21985d.js} +37 -14
- package/dist/esm/v3/{OrDateRangePicker-06b39fc4.js → OrDateRangePicker-fb715f58.js} +51 -23
- package/dist/esm/v3/OrDateTimeFormat-595566fa.js +83 -0
- package/dist/esm/v3/{OrDateTimePicker-b2749f72.js → OrDateTimePicker-c3544059.js} +57 -23
- package/dist/esm/v3/{OrDateTimePickerTimeSelect-c6ea3195.js → OrDateTimePickerTimeSelect-62e04a6c.js} +69 -44
- package/dist/esm/v3/{OrFormGroup-17c3cc0a.js → OrFormGroup-230f2015.js} +1 -1
- package/dist/esm/v3/{OrInput-89bb16d6.js → OrInput-89162a71.js} +1 -1
- package/dist/esm/v3/{OrLabel-02aa56ad.js → OrLabel-59d09591.js} +3 -3
- package/dist/esm/v3/{OrList-384bf436.js → OrList-75b5e6ac.js} +1 -1
- package/dist/esm/v3/{OrRadio-160d7841.js → OrRadio-a7bb97f7.js} +1 -1
- package/dist/esm/v3/{OrRadioGroup-6a5af61f.js → OrRadioGroup-2648ef67.js} +2 -2
- package/dist/esm/v3/{OrRichTextEditor-87baa915.js → OrRichTextEditor-56c41be2.js} +2 -2
- package/dist/esm/v3/{OrSearch-42922cb7.js → OrSearch-169317ea.js} +1 -1
- package/dist/esm/v3/{OrSelect-27ede5ab.js → OrSelect-cb207029.js} +3 -3
- package/dist/esm/v3/{OrSwitch-43616cd3.js → OrSwitch-bd2093d2.js} +1 -1
- package/dist/esm/v3/{OrTagInput-e768c2d1.js → OrTagInput-c68c8430.js} +1 -1
- package/dist/esm/v3/{OrTextarea-97b57866.js → OrTextarea-d5beb823.js} +1 -1
- package/dist/esm/v3/OrTimeFormat-25c748db.js +73 -0
- package/dist/esm/v3/{OrTimePicker-9dcd20dd.js → OrTimePicker-5f6111da.js} +32 -16
- package/dist/esm/v3/{OrTimeRangePicker-1f6509eb.js → OrTimeRangePicker-0d79f664.js} +49 -27
- package/dist/esm/v3/components/index.js +29 -29
- package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +5 -5
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +3 -3
- package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v3/components/or-code-v3/index.js +2 -2
- package/dist/esm/v3/components/or-combined-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v3/components/or-date-format-v3/OrDateFormat.vue.d.ts +25 -4
- package/dist/esm/v3/components/or-date-format-v3/index.js +5 -5
- package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +37 -17
- package/dist/esm/v3/components/or-date-picker-v3/index.js +5 -5
- package/dist/esm/v3/components/or-date-range-picker-v3/OrDateRangePicker.vue.d.ts +34 -12
- package/dist/esm/v3/components/or-date-range-picker-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-date-range-picker-v3/index.js +5 -5
- package/dist/esm/v3/components/or-date-range-picker-v3/types.d.ts +2 -0
- package/dist/esm/v3/components/or-date-time-format-v3/OrDateTimeFormat.vue.d.ts +27 -6
- package/dist/esm/v3/components/or-date-time-format-v3/index.js +5 -5
- package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +48 -28
- package/dist/esm/v3/components/or-date-time-picker-v3/index.d.ts +1 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +4 -4
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/index.js +3 -3
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +23 -5
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +24 -8
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +20 -12
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +16 -9
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +21 -15
- package/dist/esm/v3/components/or-date-time-picker-v3/tokens.d.ts +3 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/types.d.ts +12 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/utils/formatDate.d.ts +2 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/utils/formatTime.d.ts +2 -2
- package/dist/esm/v3/components/or-date-time-picker-v3/utils/getDatePlaceholder.d.ts +2 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/utils/getTimePlaceholder.d.ts +2 -2
- package/dist/esm/v3/components/or-date-time-picker-v3/utils/index.js +1 -1
- package/dist/esm/v3/components/or-form-group-v3/index.js +2 -2
- package/dist/esm/v3/components/or-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-label-v3/index.js +1 -1
- package/dist/esm/v3/components/or-list-v3/index.js +2 -2
- package/dist/esm/v3/components/or-radio-group-v3/index.js +4 -4
- package/dist/esm/v3/components/or-radio-v3/index.js +2 -2
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +3 -3
- package/dist/esm/v3/components/or-search-v3/index.js +3 -3
- package/dist/esm/v3/components/or-select-v3/index.js +4 -4
- package/dist/esm/v3/components/or-switch-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tag-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v3/components/or-time-format-v3/OrTimeFormat.vue.d.ts +17 -6
- package/dist/esm/v3/components/or-time-format-v3/index.js +5 -5
- package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +27 -16
- package/dist/esm/v3/components/or-time-picker-v3/index.js +5 -5
- package/dist/esm/v3/components/or-time-range-picker-v3/OrTimeRangePicker.vue.d.ts +90 -15
- package/dist/esm/v3/components/or-time-range-picker-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-time-range-picker-v3/index.js +5 -5
- package/dist/esm/v3/components/or-time-range-picker-v3/types.d.ts +2 -0
- package/dist/esm/v3/getTimePlaceholder-9d18b5ac.js +77 -0
- package/dist/esm/v3/index.js +29 -29
- package/package.json +2 -3
- package/src/components/or-date-format-v3/OrDateFormat.vue +36 -9
- package/src/components/or-date-picker-v3/OrDatePicker.vue +48 -18
- package/src/components/or-date-range-picker-v3/OrDateRangePicker.vue +60 -22
- package/src/components/or-date-range-picker-v3/index.ts +1 -0
- package/src/components/or-date-range-picker-v3/types.ts +3 -0
- package/src/components/or-date-time-format-v3/OrDateTimeFormat.vue +42 -10
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +70 -32
- package/src/components/or-date-time-picker-v3/index.ts +1 -1
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue +23 -9
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue +27 -15
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue +5 -5
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue +33 -21
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue +3 -4
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue +3 -4
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue +19 -10
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue +22 -16
- package/src/components/or-date-time-picker-v3/tokens.ts +4 -0
- package/src/components/or-date-time-picker-v3/types.ts +15 -1
- package/src/components/or-date-time-picker-v3/utils/formatDate.ts +5 -3
- package/src/components/or-date-time-picker-v3/utils/formatTime.ts +3 -3
- package/src/components/or-date-time-picker-v3/utils/getDatePlaceholder.ts +38 -7
- package/src/components/or-date-time-picker-v3/utils/getTimePlaceholder.ts +22 -7
- package/src/components/or-label-v3/styles.ts +3 -3
- package/src/components/or-time-format-v3/OrTimeFormat.vue +32 -10
- package/src/components/or-time-picker-v3/OrTimePicker.vue +42 -20
- package/src/components/or-time-range-picker-v3/OrTimeRangePicker.vue +57 -27
- package/src/components/or-time-range-picker-v3/index.ts +1 -0
- package/src/components/or-time-range-picker-v3/types.ts +3 -0
- package/dist/bundled/v2/components/OrDateTimePickerV3/props.d.ts +0 -5
- package/dist/bundled/v2/components/OrDateTimePickerV3/props.js +0 -8
- package/dist/bundled/v3/components/OrDateFormatV3-3000643b.js +0 -49
- package/dist/bundled/v3/components/OrDateTimeFormatV3-1ff1795b.js +0 -54
- package/dist/bundled/v3/components/OrDateTimePickerV3/props.d.ts +0 -5
- package/dist/bundled/v3/components/OrDateTimePickerV3/props.js +0 -1
- package/dist/bundled/v3/components/OrTimeFormatV3-1a6191e2.js +0 -53
- package/dist/esm/v2/components/or-date-time-picker-v3/props.d.ts +0 -5
- package/dist/esm/v2/getTimePlaceholder-a1d75821.js +0 -40
- package/dist/esm/v3/OrDateFormat-755671ca.js +0 -51
- package/dist/esm/v3/OrDateTimeFormat-3408f038.js +0 -56
- package/dist/esm/v3/OrTimeFormat-ef653117.js +0 -55
- package/dist/esm/v3/components/or-date-time-picker-v3/props.d.ts +0 -5
- package/dist/esm/v3/getTimePlaceholder-a1d75821.js +0 -40
- package/src/components/or-date-time-picker-v3/props.ts +0 -5
- /package/dist/bundled/v2/{OrInput-aeca8c1a.js → OrInput-5cef921b.js} +0 -0
- /package/dist/bundled/v2/{OrList-1cda0d88.js → OrList-ee849918.js} +0 -0
- /package/dist/bundled/v3/components/{OrCardCollectionV3-7416a26d.js → OrCardCollectionV3-8a2f7f68.js} +0 -0
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
v-model="draftModelValueFrom"
|
|
34
34
|
v-dropdown-open="() => openPopover('from')"
|
|
35
35
|
v-dropdown-close="closePopover"
|
|
36
|
+
:format="resolvedFormat"
|
|
37
|
+
:locale="resolvedLocale"
|
|
36
38
|
:selected="popover && popover.state === 'open' && selectedControl === 'from'"
|
|
37
39
|
:required="required"
|
|
38
40
|
:readonly="readonly"
|
|
@@ -45,6 +47,8 @@
|
|
|
45
47
|
v-model="draftModelValueTo"
|
|
46
48
|
v-dropdown-open="() => openPopover('to')"
|
|
47
49
|
v-dropdown-close="closePopover"
|
|
50
|
+
:format="resolvedFormat"
|
|
51
|
+
:locale="resolvedLocale"
|
|
48
52
|
:selected="popover && popover.state === 'open' && selectedControl === 'to'"
|
|
49
53
|
:required="required"
|
|
50
54
|
:readonly="readonly"
|
|
@@ -86,11 +90,14 @@
|
|
|
86
90
|
<div :class="['layout-column', 'grow']">
|
|
87
91
|
<OrDateTimePickerMonthSelect
|
|
88
92
|
v-model="initialValueFrom"
|
|
93
|
+
:locale="resolvedLocale"
|
|
89
94
|
/>
|
|
90
95
|
|
|
91
96
|
<OrDateTimePickerDateSelect
|
|
92
97
|
v-model="genericDraftModelValue"
|
|
93
98
|
:initial-value="initialValueFrom"
|
|
99
|
+
:format="resolvedFormat"
|
|
100
|
+
:locale="resolvedLocale"
|
|
94
101
|
:range-start="draftModelValueFrom || initialValueFrom"
|
|
95
102
|
:range-end="draftModelValueTo || initialValueTo"
|
|
96
103
|
@update:model-value="switchSelectedControl()"
|
|
@@ -102,11 +109,14 @@
|
|
|
102
109
|
<div :class="['layout-column', 'grow']">
|
|
103
110
|
<OrDateTimePickerMonthSelect
|
|
104
111
|
v-model="initialValueTo"
|
|
112
|
+
:locale="resolvedLocale"
|
|
105
113
|
/>
|
|
106
114
|
|
|
107
115
|
<OrDateTimePickerDateSelect
|
|
108
116
|
v-model="genericDraftModelValue"
|
|
109
117
|
:initial-value="initialValueTo"
|
|
118
|
+
:format="resolvedFormat"
|
|
119
|
+
:locale="resolvedLocale"
|
|
110
120
|
:range-start="draftModelValueFrom || initialValueFrom"
|
|
111
121
|
:range-end="draftModelValueTo || initialValueTo"
|
|
112
122
|
@update:model-value="switchSelectedControl()"
|
|
@@ -162,10 +172,10 @@
|
|
|
162
172
|
</template>
|
|
163
173
|
|
|
164
174
|
<script lang="ts">
|
|
165
|
-
import { computed, defineComponent,
|
|
175
|
+
import { PropType, computed, defineComponent, inject, ref, toRef, watch } from 'vue-demi';
|
|
166
176
|
import { DropdownClose, DropdownOpen } from '../../directives';
|
|
167
177
|
import { useProxyModelValue, useResponsive } from '../../hooks';
|
|
168
|
-
import {
|
|
178
|
+
import { DateFormat, DateTimePickerDateFormat, DateTimePickerModelValue, Locale, OrDateTimePickerDateControl, OrDateTimePickerDateSelect, OrDateTimePickerMobileControl, OrDateTimePickerMonthSelect, OrDateTimePickerPopoverFooter, OrDateTimePickerPopoverHeader, getCurrentDate, getNextMonthDate } from '../or-date-time-picker-v3';
|
|
169
179
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
170
180
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
171
181
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
@@ -173,7 +183,8 @@ import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
|
173
183
|
import { InputBoxSize, OrInputBoxV3 as OrInputBox } from '../or-input-box-v3';
|
|
174
184
|
import { OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
175
185
|
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
176
|
-
import
|
|
186
|
+
import * as Styles from './styles';
|
|
187
|
+
import { DateRangePickerModelValue } from './types';
|
|
177
188
|
|
|
178
189
|
export default defineComponent({
|
|
179
190
|
name: 'OrDateRangePicker',
|
|
@@ -206,7 +217,17 @@ export default defineComponent({
|
|
|
206
217
|
|
|
207
218
|
props: {
|
|
208
219
|
modelValue: {
|
|
209
|
-
type:
|
|
220
|
+
type: undefined as unknown as PropType<DateRangePickerModelValue>,
|
|
221
|
+
default: undefined,
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
format: {
|
|
225
|
+
type: String as PropType<`${DateTimePickerDateFormat}`>,
|
|
226
|
+
default: undefined,
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
locale: {
|
|
230
|
+
type: String,
|
|
210
231
|
default: undefined,
|
|
211
232
|
},
|
|
212
233
|
|
|
@@ -268,26 +289,34 @@ export default defineComponent({
|
|
|
268
289
|
],
|
|
269
290
|
|
|
270
291
|
setup(props, context) {
|
|
271
|
-
// Refs
|
|
292
|
+
// Refs & Styles
|
|
272
293
|
const root = ref<HTMLElement>();
|
|
273
294
|
|
|
295
|
+
const rootStyles = computed(() => [
|
|
296
|
+
'or-date-range-picker-v3',
|
|
297
|
+
...Styles.DateRangePicker,
|
|
298
|
+
]);
|
|
299
|
+
|
|
274
300
|
const inputBox = ref<InstanceType<typeof OrInputBox>>();
|
|
275
301
|
const inputBoxRoot = computed(() => inputBox.value?.root);
|
|
276
302
|
|
|
277
303
|
const popover = ref<InstanceType<typeof OrPopover>>();
|
|
278
304
|
const popoverState = computed(() => popover.value?.state);
|
|
279
305
|
|
|
280
|
-
// Styles
|
|
281
|
-
const rootStyles = computed(() => [
|
|
282
|
-
'or-date-range-picker-v3',
|
|
283
|
-
...DateRangePicker,
|
|
284
|
-
]);
|
|
285
|
-
|
|
286
306
|
const popoverStyles = computed(() => [
|
|
287
307
|
'or-date-range-picker-popover-v3',
|
|
288
|
-
...DateRangePickerPopover,
|
|
308
|
+
...Styles.DateRangePickerPopover,
|
|
289
309
|
]);
|
|
290
310
|
|
|
311
|
+
// Options
|
|
312
|
+
const resolvedFormat = computed(() => {
|
|
313
|
+
return props.format ?? inject(DateFormat, DateTimePickerDateFormat.Short);
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
const resolvedLocale = computed(() => {
|
|
317
|
+
return props.locale ?? inject(Locale, navigator.language);
|
|
318
|
+
});
|
|
319
|
+
|
|
291
320
|
// State
|
|
292
321
|
const initialValueFrom = ref(props.modelValue?.[0] ?? getCurrentDate());
|
|
293
322
|
const initialValueTo = ref(props.modelValue?.[1] ?? getNextMonthDate());
|
|
@@ -298,7 +327,7 @@ export default defineComponent({
|
|
|
298
327
|
});
|
|
299
328
|
|
|
300
329
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
301
|
-
const draftModelValue = ref<
|
|
330
|
+
const draftModelValue = ref<NonNullable<DateRangePickerModelValue>>(proxyModelValue.value ?? [undefined, undefined]);
|
|
302
331
|
|
|
303
332
|
watch(proxyModelValue, (value) => {
|
|
304
333
|
draftModelValue.value = value ?? [undefined, undefined];
|
|
@@ -359,18 +388,18 @@ export default defineComponent({
|
|
|
359
388
|
});
|
|
360
389
|
|
|
361
390
|
// Methods
|
|
362
|
-
function switchSelectedControl(): void {
|
|
363
|
-
selectedControl.value = selectedControl.value === 'from' ? 'to' : 'from';
|
|
364
|
-
}
|
|
365
|
-
|
|
366
391
|
function apply(): void {
|
|
367
|
-
proxyModelValue.value = draftModelValue.value
|
|
392
|
+
proxyModelValue.value = draftModelValue.value;
|
|
368
393
|
}
|
|
369
394
|
|
|
370
395
|
function reset(): void {
|
|
371
396
|
draftModelValue.value = proxyModelValue.value ?? [undefined, undefined];
|
|
372
397
|
}
|
|
373
398
|
|
|
399
|
+
function switchSelectedControl(): void {
|
|
400
|
+
selectedControl.value = selectedControl.value === 'from' ? 'to' : 'from';
|
|
401
|
+
}
|
|
402
|
+
|
|
374
403
|
function openPopover(control: 'from' | 'to'): void {
|
|
375
404
|
if (!props.readonly && !props.disabled) {
|
|
376
405
|
const popoverInstance = popover.value;
|
|
@@ -391,8 +420,8 @@ export default defineComponent({
|
|
|
391
420
|
}
|
|
392
421
|
}
|
|
393
422
|
|
|
394
|
-
function formatDateAlt(value
|
|
395
|
-
return value?.toLocaleString(
|
|
423
|
+
function formatDateAlt(value: DateTimePickerModelValue): string {
|
|
424
|
+
return value?.toLocaleString(resolvedLocale.value, {
|
|
396
425
|
dateStyle: 'medium',
|
|
397
426
|
timeZone: 'UTC',
|
|
398
427
|
}) ?? '--';
|
|
@@ -403,14 +432,21 @@ export default defineComponent({
|
|
|
403
432
|
|
|
404
433
|
return {
|
|
405
434
|
root,
|
|
435
|
+
rootStyles,
|
|
436
|
+
|
|
406
437
|
inputBox,
|
|
407
438
|
inputBoxRoot,
|
|
439
|
+
|
|
408
440
|
popover,
|
|
409
441
|
popoverState,
|
|
410
|
-
rootStyles,
|
|
411
442
|
popoverStyles,
|
|
443
|
+
|
|
444
|
+
resolvedFormat,
|
|
445
|
+
resolvedLocale,
|
|
446
|
+
|
|
412
447
|
initialValueFrom,
|
|
413
448
|
initialValueTo,
|
|
449
|
+
|
|
414
450
|
proxyModelValue,
|
|
415
451
|
draftModelValue,
|
|
416
452
|
draftModelValueFrom,
|
|
@@ -418,12 +454,14 @@ export default defineComponent({
|
|
|
418
454
|
genericDraftModelValue,
|
|
419
455
|
selectedControl,
|
|
420
456
|
isInvalidDraftModelValue,
|
|
421
|
-
|
|
457
|
+
|
|
422
458
|
apply,
|
|
423
459
|
reset,
|
|
460
|
+
switchSelectedControl,
|
|
424
461
|
openPopover,
|
|
425
462
|
closePopover,
|
|
426
463
|
formatDateAlt,
|
|
464
|
+
|
|
427
465
|
isDesktop,
|
|
428
466
|
isMobile,
|
|
429
467
|
};
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
:ref="'root'"
|
|
4
4
|
:class="rootStyles"
|
|
5
5
|
>
|
|
6
|
-
|
|
6
|
+
<template v-if="modelValue">
|
|
7
|
+
{{ `${formatDate(modelValue, resolvedDateFormat, resolvedLocale)} ${formatTime(modelValue, resolvedTimeFormat, resolvedLocale)}` }}
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<template v-else>
|
|
11
|
+
{{ placeholder }}
|
|
12
|
+
</template>
|
|
7
13
|
</div>
|
|
8
14
|
</template>
|
|
9
15
|
|
|
10
16
|
<script lang="ts">
|
|
11
|
-
import { PropType, computed, defineComponent, ref } from 'vue-demi';
|
|
12
|
-
import { DateTimePickerTimeFormat, formatDate, formatTime } from '../or-date-time-picker-v3';
|
|
13
|
-
import
|
|
17
|
+
import { PropType, computed, defineComponent, inject, ref } from 'vue-demi';
|
|
18
|
+
import { DateFormat, DateTimePickerDateFormat, DateTimePickerModelValue, DateTimePickerTimeFormat, Locale, TimeFormat, formatDate, formatTime } from '../or-date-time-picker-v3';
|
|
19
|
+
import * as Styles from './styles';
|
|
14
20
|
|
|
15
21
|
export default defineComponent({
|
|
16
22
|
name: 'OrDateTimeFormat',
|
|
@@ -22,13 +28,23 @@ export default defineComponent({
|
|
|
22
28
|
|
|
23
29
|
props: {
|
|
24
30
|
modelValue: {
|
|
25
|
-
type:
|
|
31
|
+
type: undefined as unknown as PropType<DateTimePickerModelValue>,
|
|
32
|
+
default: undefined,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
dateFormat: {
|
|
36
|
+
type: String as PropType<`${DateTimePickerDateFormat}`>,
|
|
26
37
|
default: undefined,
|
|
27
38
|
},
|
|
28
39
|
|
|
29
40
|
timeFormat: {
|
|
30
41
|
type: String as PropType<`${DateTimePickerTimeFormat}`>,
|
|
31
|
-
default:
|
|
42
|
+
default: undefined,
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
locale: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: undefined,
|
|
32
48
|
},
|
|
33
49
|
|
|
34
50
|
placeholder: {
|
|
@@ -41,20 +57,36 @@ export default defineComponent({
|
|
|
41
57
|
'root',
|
|
42
58
|
],
|
|
43
59
|
|
|
44
|
-
setup() {
|
|
45
|
-
// Refs
|
|
60
|
+
setup(props) {
|
|
61
|
+
// Refs & Styles
|
|
46
62
|
const root = ref<HTMLElement>();
|
|
47
63
|
|
|
48
|
-
// Styles
|
|
49
64
|
const rootStyles = computed(() => [
|
|
50
65
|
'or-date-time-format-v3',
|
|
51
|
-
...DateTimeFormat,
|
|
66
|
+
...Styles.DateTimeFormat,
|
|
52
67
|
]);
|
|
53
68
|
|
|
69
|
+
// Options
|
|
70
|
+
const resolvedDateFormat = computed(() => {
|
|
71
|
+
return props.dateFormat ?? inject(DateFormat, DateTimePickerDateFormat.Short);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const resolvedTimeFormat = computed(() => {
|
|
75
|
+
return props.timeFormat ?? inject(TimeFormat, DateTimePickerTimeFormat.Auto);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const resolvedLocale = computed(() => {
|
|
79
|
+
return props.locale ?? inject(Locale, navigator.language);
|
|
80
|
+
});
|
|
81
|
+
|
|
54
82
|
return {
|
|
55
83
|
root,
|
|
56
84
|
rootStyles,
|
|
57
85
|
|
|
86
|
+
resolvedDateFormat,
|
|
87
|
+
resolvedTimeFormat,
|
|
88
|
+
resolvedLocale,
|
|
89
|
+
|
|
58
90
|
formatDate,
|
|
59
91
|
formatTime,
|
|
60
92
|
};
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
v-model="draftModelValue"
|
|
34
34
|
v-dropdown-open="toggleDatePopover"
|
|
35
35
|
v-dropdown-close="closeDatePopover"
|
|
36
|
+
:format="resolvedDateFormat"
|
|
37
|
+
:locale="resolvedLocale"
|
|
36
38
|
:selected="datePopover && datePopover.state === 'open'"
|
|
37
39
|
:required="required"
|
|
38
40
|
:readonly="readonly"
|
|
@@ -43,7 +45,8 @@
|
|
|
43
45
|
v-model="draftModelValue"
|
|
44
46
|
v-dropdown-open="toggleTimePopover"
|
|
45
47
|
v-dropdown-close="closeTimePopover"
|
|
46
|
-
:format="
|
|
48
|
+
:format="resolvedTimeFormat"
|
|
49
|
+
:locale="resolvedLocale"
|
|
47
50
|
:selected="timePopover && timePopover.state === 'open'"
|
|
48
51
|
:required="required"
|
|
49
52
|
:readonly="readonly"
|
|
@@ -72,6 +75,7 @@
|
|
|
72
75
|
|
|
73
76
|
<OrDateTimePickerMonthSelect
|
|
74
77
|
v-model="initialValue"
|
|
78
|
+
:locale="resolvedLocale"
|
|
75
79
|
:year-filter="yearFilter"
|
|
76
80
|
:month-filter="monthFilter"
|
|
77
81
|
/>
|
|
@@ -79,6 +83,8 @@
|
|
|
79
83
|
<OrDateTimePickerDateSelect
|
|
80
84
|
v-model="draftModelValue"
|
|
81
85
|
:initial-value="initialValue"
|
|
86
|
+
:format="resolvedDateFormat"
|
|
87
|
+
:locale="resolvedLocale"
|
|
82
88
|
:date-filter="dateFilter"
|
|
83
89
|
/>
|
|
84
90
|
|
|
@@ -112,7 +118,8 @@
|
|
|
112
118
|
<OrDateTimePickerTimeSelect
|
|
113
119
|
v-model="draftModelValue"
|
|
114
120
|
:initial-value="initialValue"
|
|
115
|
-
:format="
|
|
121
|
+
:format="resolvedTimeFormat"
|
|
122
|
+
:locale="resolvedLocale"
|
|
116
123
|
:hours-filter="hoursFilter"
|
|
117
124
|
:minutes-filter="minutesFilter"
|
|
118
125
|
/>
|
|
@@ -164,7 +171,7 @@
|
|
|
164
171
|
</template>
|
|
165
172
|
|
|
166
173
|
<script lang="ts">
|
|
167
|
-
import { computed, defineComponent,
|
|
174
|
+
import { PropType, computed, defineComponent, inject, ref, toRef, watch } from 'vue-demi';
|
|
168
175
|
import { DropdownClose, DropdownOpen } from '../../directives';
|
|
169
176
|
import { useProxyModelValue } from '../../hooks';
|
|
170
177
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
@@ -175,9 +182,9 @@ import { InputBoxSize, OrInputBoxV3 as OrInputBox } from '../or-input-box-v3';
|
|
|
175
182
|
import { OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
176
183
|
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
177
184
|
import { OrDateTimePickerDateControl, OrDateTimePickerDateSelect, OrDateTimePickerMobileControl, OrDateTimePickerMonthSelect, OrDateTimePickerPopoverFooter, OrDateTimePickerPopoverHeader, OrDateTimePickerTimeControl, OrDateTimePickerTimeSelect } from './partials';
|
|
178
|
-
import
|
|
179
|
-
import {
|
|
180
|
-
import {
|
|
185
|
+
import * as Styles from './styles';
|
|
186
|
+
import { DateFormat, Locale, TimeFormat } from './tokens';
|
|
187
|
+
import { DateTimePickerDateFormat, DateTimePickerFilterFunction, DateTimePickerModelValue, DateTimePickerTimeFormat } from './types';
|
|
181
188
|
import { getCurrentDate } from './utils';
|
|
182
189
|
|
|
183
190
|
export default defineComponent({
|
|
@@ -213,37 +220,47 @@ export default defineComponent({
|
|
|
213
220
|
|
|
214
221
|
props: {
|
|
215
222
|
modelValue: {
|
|
216
|
-
type:
|
|
223
|
+
type: undefined as unknown as PropType<DateTimePickerModelValue>,
|
|
224
|
+
default: undefined,
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
dateFormat: {
|
|
228
|
+
type: String as PropType<`${DateTimePickerDateFormat}`>,
|
|
217
229
|
default: undefined,
|
|
218
230
|
},
|
|
219
231
|
|
|
220
232
|
timeFormat: {
|
|
221
233
|
type: String as PropType<`${DateTimePickerTimeFormat}`>,
|
|
222
|
-
default:
|
|
234
|
+
default: undefined,
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
locale: {
|
|
238
|
+
type: String,
|
|
239
|
+
default: undefined,
|
|
223
240
|
},
|
|
224
241
|
|
|
225
242
|
yearFilter: {
|
|
226
|
-
type: Function as PropType<
|
|
243
|
+
type: Function as PropType<DateTimePickerFilterFunction>,
|
|
227
244
|
default: undefined,
|
|
228
245
|
},
|
|
229
246
|
|
|
230
247
|
monthFilter: {
|
|
231
|
-
type: Function as PropType<
|
|
248
|
+
type: Function as PropType<DateTimePickerFilterFunction>,
|
|
232
249
|
default: undefined,
|
|
233
250
|
},
|
|
234
251
|
|
|
235
252
|
dateFilter: {
|
|
236
|
-
type: Function as PropType<
|
|
253
|
+
type: Function as PropType<DateTimePickerFilterFunction>,
|
|
237
254
|
default: undefined,
|
|
238
255
|
},
|
|
239
256
|
|
|
240
257
|
hoursFilter: {
|
|
241
|
-
type: Function as PropType<
|
|
258
|
+
type: Function as PropType<DateTimePickerFilterFunction>,
|
|
242
259
|
default: undefined,
|
|
243
260
|
},
|
|
244
261
|
|
|
245
262
|
minutesFilter: {
|
|
246
|
-
type: Function as PropType<
|
|
263
|
+
type: Function as PropType<DateTimePickerFilterFunction>,
|
|
247
264
|
default: undefined,
|
|
248
265
|
},
|
|
249
266
|
|
|
@@ -305,34 +322,46 @@ export default defineComponent({
|
|
|
305
322
|
],
|
|
306
323
|
|
|
307
324
|
setup(props, context) {
|
|
308
|
-
// Refs
|
|
325
|
+
// Refs & Styles
|
|
309
326
|
const root = ref<HTMLElement>();
|
|
310
327
|
|
|
328
|
+
const rootStyles = computed(() => [
|
|
329
|
+
'or-date-time-picker-v3',
|
|
330
|
+
...Styles.DateTimePicker,
|
|
331
|
+
]);
|
|
332
|
+
|
|
311
333
|
const inputBox = ref<InstanceType<typeof OrInputBox>>();
|
|
312
334
|
const inputBoxRoot = computed(() => inputBox.value?.root);
|
|
313
335
|
|
|
314
336
|
const datePopover = ref<InstanceType<typeof OrPopover>>();
|
|
315
337
|
const datePopoverState = computed(() => datePopover.value?.state);
|
|
316
338
|
|
|
317
|
-
const timePopover = ref<InstanceType<typeof OrPopover>>();
|
|
318
|
-
const timePopoverState = computed(() => timePopover.value?.state);
|
|
319
|
-
|
|
320
|
-
// Styles
|
|
321
|
-
const rootStyles = computed(() => [
|
|
322
|
-
'or-date-time-picker-v3',
|
|
323
|
-
...DateTimePicker,
|
|
324
|
-
]);
|
|
325
|
-
|
|
326
339
|
const datePopoverStyles = computed(() => [
|
|
327
340
|
'or-date-time-picker-date-popover-v3',
|
|
328
|
-
...DateTimePickerDatePopover,
|
|
341
|
+
...Styles.DateTimePickerDatePopover,
|
|
329
342
|
]);
|
|
330
343
|
|
|
344
|
+
const timePopover = ref<InstanceType<typeof OrPopover>>();
|
|
345
|
+
const timePopoverState = computed(() => timePopover.value?.state);
|
|
346
|
+
|
|
331
347
|
const timePopoverStyles = computed(() => [
|
|
332
348
|
'or-date-time-picker-time-popover-v3',
|
|
333
|
-
...DateTimePickerTimePopover,
|
|
349
|
+
...Styles.DateTimePickerTimePopover,
|
|
334
350
|
]);
|
|
335
351
|
|
|
352
|
+
// Options
|
|
353
|
+
const resolvedDateFormat = computed(() => {
|
|
354
|
+
return props.dateFormat ?? inject(DateFormat, DateTimePickerDateFormat.Short);
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
const resolvedTimeFormat = computed(() => {
|
|
358
|
+
return props.timeFormat ?? inject(TimeFormat, DateTimePickerTimeFormat.Auto);
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
const resolvedLocale = computed(() => {
|
|
362
|
+
return props.locale ?? inject(Locale, navigator.language);
|
|
363
|
+
});
|
|
364
|
+
|
|
336
365
|
// State
|
|
337
366
|
const initialValue = ref(props.modelValue ?? getCurrentDate());
|
|
338
367
|
|
|
@@ -432,36 +461,45 @@ export default defineComponent({
|
|
|
432
461
|
}
|
|
433
462
|
}
|
|
434
463
|
|
|
435
|
-
function formatDateAlt(value
|
|
436
|
-
return value?.toLocaleString(
|
|
464
|
+
function formatDateAlt(value: DateTimePickerModelValue): string {
|
|
465
|
+
return value?.toLocaleString(resolvedLocale.value, {
|
|
437
466
|
dateStyle: 'medium',
|
|
438
467
|
timeZone: 'UTC',
|
|
439
468
|
}) ?? '--';
|
|
440
469
|
}
|
|
441
470
|
|
|
442
|
-
function formatTimeAlt(value
|
|
443
|
-
return value?.toLocaleString(
|
|
471
|
+
function formatTimeAlt(value: DateTimePickerModelValue): string {
|
|
472
|
+
return value?.toLocaleString(resolvedLocale.value, {
|
|
444
473
|
timeStyle: 'short',
|
|
445
|
-
hourCycle:
|
|
474
|
+
hourCycle: resolvedTimeFormat.value !== DateTimePickerTimeFormat.Auto ? resolvedTimeFormat.value : undefined,
|
|
446
475
|
timeZone: 'UTC',
|
|
447
476
|
}) ?? '--';
|
|
448
477
|
}
|
|
449
478
|
|
|
450
479
|
return {
|
|
451
480
|
root,
|
|
481
|
+
rootStyles,
|
|
482
|
+
|
|
452
483
|
inputBox,
|
|
453
484
|
inputBoxRoot,
|
|
485
|
+
|
|
454
486
|
datePopover,
|
|
455
487
|
datePopoverState,
|
|
488
|
+
datePopoverStyles,
|
|
489
|
+
|
|
456
490
|
timePopover,
|
|
457
491
|
timePopoverState,
|
|
458
|
-
rootStyles,
|
|
459
|
-
datePopoverStyles,
|
|
460
492
|
timePopoverStyles,
|
|
493
|
+
|
|
494
|
+
resolvedDateFormat,
|
|
495
|
+
resolvedTimeFormat,
|
|
496
|
+
resolvedLocale,
|
|
497
|
+
|
|
461
498
|
initialValue,
|
|
462
499
|
proxyModelValue,
|
|
463
500
|
draftModelValue,
|
|
464
501
|
isInvalidDraftModelValue,
|
|
502
|
+
|
|
465
503
|
apply,
|
|
466
504
|
reset,
|
|
467
505
|
toggleDatePopover,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@keydown.prevent
|
|
11
11
|
>
|
|
12
12
|
<template v-if="proxyModelValue">
|
|
13
|
-
{{ formatDate(proxyModelValue) }}
|
|
13
|
+
{{ formatDate(proxyModelValue, format, locale) }}
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<template v-else>
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script lang="ts">
|
|
28
|
-
import { computed, defineComponent, ref, toRef } from 'vue-demi';
|
|
28
|
+
import { PropType, computed, defineComponent, ref, toRef } from 'vue-demi';
|
|
29
29
|
import { useProxyModelValue } from '../../../../hooks';
|
|
30
|
+
import { DateTimePickerDateFormat, DateTimePickerModelValue } from '../../types';
|
|
30
31
|
import { formatDate, getDatePlaceholder } from '../../utils';
|
|
31
|
-
import
|
|
32
|
+
import * as Styles from './styles';
|
|
32
33
|
|
|
33
34
|
export default defineComponent({
|
|
34
35
|
name: 'OrDateTimePickerDateControl',
|
|
@@ -40,10 +41,20 @@ export default defineComponent({
|
|
|
40
41
|
|
|
41
42
|
props: {
|
|
42
43
|
modelValue: {
|
|
43
|
-
type:
|
|
44
|
+
type: undefined as unknown as PropType<DateTimePickerModelValue>,
|
|
44
45
|
default: undefined,
|
|
45
46
|
},
|
|
46
47
|
|
|
48
|
+
format: {
|
|
49
|
+
type: String as PropType<`${DateTimePickerDateFormat}`>,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
locale: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: true,
|
|
56
|
+
},
|
|
57
|
+
|
|
47
58
|
selected: {
|
|
48
59
|
type: Boolean,
|
|
49
60
|
default: false,
|
|
@@ -70,26 +81,29 @@ export default defineComponent({
|
|
|
70
81
|
],
|
|
71
82
|
|
|
72
83
|
setup(props, context) {
|
|
73
|
-
// Refs
|
|
84
|
+
// Refs & Styles
|
|
74
85
|
const root = ref<HTMLElement>();
|
|
75
86
|
|
|
76
|
-
// Styles
|
|
77
87
|
const rootStyles = computed(() => [
|
|
78
88
|
'or-date-time-picker-date-control-v3',
|
|
79
|
-
...DateTimePickerDateControl,
|
|
89
|
+
...Styles.DateTimePickerDateControl,
|
|
80
90
|
]);
|
|
81
91
|
|
|
82
92
|
const placeholderStyles = computed(() => [
|
|
83
|
-
...DateTimePickerDateControlPlaceholder,
|
|
93
|
+
...Styles.DateTimePickerDateControlPlaceholder,
|
|
84
94
|
]);
|
|
85
95
|
|
|
86
96
|
// State
|
|
87
97
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
88
|
-
|
|
98
|
+
|
|
99
|
+
const placeholder = computed(() => {
|
|
100
|
+
return getDatePlaceholder(props.format, props.locale);
|
|
101
|
+
});
|
|
89
102
|
|
|
90
103
|
return {
|
|
91
104
|
root,
|
|
92
105
|
rootStyles,
|
|
106
|
+
|
|
93
107
|
placeholderStyles,
|
|
94
108
|
|
|
95
109
|
proxyModelValue,
|