@nextcloud/vue 3.10.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -19
- package/README.md +9 -10
- package/dist/Components/ActionButton.js +24 -3
- package/dist/Components/ActionButton.js.map +1 -1
- package/dist/Components/ActionCaption.js +23 -0
- package/dist/Components/ActionCaption.js.map +1 -0
- package/dist/Components/ActionCheckbox.js +24 -3
- package/dist/Components/ActionCheckbox.js.map +1 -1
- package/dist/Components/ActionInput.js +124 -21
- package/dist/Components/ActionInput.js.map +1 -1
- package/dist/Components/ActionLink.js +24 -3
- package/dist/Components/ActionLink.js.map +1 -1
- package/dist/Components/ActionRadio.js +24 -3
- package/dist/Components/ActionRadio.js.map +1 -1
- package/dist/Components/ActionRouter.js +23 -2
- package/dist/Components/ActionRouter.js.map +1 -1
- package/dist/Components/ActionSeparator.js +1 -1
- package/dist/Components/ActionSeparator.js.map +1 -1
- package/dist/Components/ActionText.js +23 -2
- package/dist/Components/ActionText.js.map +1 -1
- package/dist/Components/ActionTextEditable.js +45 -3
- package/dist/Components/ActionTextEditable.js.map +1 -1
- package/dist/Components/Actions.js +25 -4
- package/dist/Components/Actions.js.map +1 -1
- package/dist/Components/AppContent.js +21 -1
- package/dist/Components/AppContent.js.map +1 -1
- package/dist/Components/AppContentDetails.js +1 -1
- package/dist/Components/AppContentDetails.js.map +1 -1
- package/dist/Components/AppContentList.js +1 -1
- package/dist/Components/AppContentList.js.map +1 -1
- package/dist/Components/AppNavigation.js +109 -2
- package/dist/Components/AppNavigation.js.map +1 -1
- package/dist/Components/AppNavigationCaption.js +66 -1
- package/dist/Components/AppNavigationCaption.js.map +1 -1
- package/dist/Components/AppNavigationCounter.js +2 -2
- package/dist/Components/AppNavigationCounter.js.map +1 -1
- package/dist/Components/AppNavigationIconBullet.js +2 -2
- package/dist/Components/AppNavigationIconBullet.js.map +1 -1
- package/dist/Components/AppNavigationItem.js +49 -7
- package/dist/Components/AppNavigationItem.js.map +1 -1
- package/dist/Components/AppNavigationNew.js +1 -1
- package/dist/Components/AppNavigationNew.js.map +1 -1
- package/dist/Components/AppNavigationNewItem.js +2 -2
- package/dist/Components/AppNavigationNewItem.js.map +1 -1
- package/dist/Components/AppNavigationSettings.js +5 -5
- package/dist/Components/AppNavigationSettings.js.map +1 -1
- package/dist/Components/AppNavigationSpacer.js +1 -1
- package/dist/Components/AppNavigationSpacer.js.map +1 -1
- package/dist/Components/AppNavigationToggle.js +109 -2
- package/dist/Components/AppNavigationToggle.js.map +1 -1
- package/dist/Components/AppSettingsDialog.js +64 -22
- package/dist/Components/AppSettingsDialog.js.map +1 -1
- package/dist/Components/AppSettingsSection.js +1 -1
- package/dist/Components/AppSettingsSection.js.map +1 -1
- package/dist/Components/AppSidebar.js +38 -17
- package/dist/Components/AppSidebar.js.map +1 -1
- package/dist/Components/AppSidebarTab.js +1 -1
- package/dist/Components/AppSidebarTab.js.map +1 -1
- package/dist/Components/Avatar.js +9 -10
- package/dist/Components/Avatar.js.map +1 -1
- package/dist/Components/Breadcrumb.js +33 -12
- package/dist/Components/Breadcrumb.js.map +1 -1
- package/dist/Components/Breadcrumbs.js +59 -17
- package/dist/Components/Breadcrumbs.js.map +1 -1
- package/dist/Components/CheckboxRadioSwitch.js +44 -0
- package/dist/Components/CheckboxRadioSwitch.js.map +1 -0
- package/dist/Components/ColorPicker.js +6 -7
- package/dist/Components/ColorPicker.js.map +1 -1
- package/dist/Components/Content.js +2 -2
- package/dist/Components/Content.js.map +1 -1
- package/dist/Components/CounterBubble.js +23 -0
- package/dist/Components/CounterBubble.js.map +1 -0
- package/dist/Components/DatetimePicker.js +341 -3
- package/dist/Components/DatetimePicker.js.map +1 -1
- package/dist/Components/EmojiPicker.js +14 -14
- package/dist/Components/EmojiPicker.js.map +1 -1
- package/dist/Components/EmptyContent.js +2 -2
- package/dist/Components/EmptyContent.js.map +1 -1
- package/dist/Components/Highlight.js +3 -3
- package/dist/Components/Highlight.js.map +1 -1
- package/dist/Components/ListItem.js +130 -0
- package/dist/Components/ListItem.js.map +1 -0
- package/dist/Components/ListItemIcon.js +20 -21
- package/dist/Components/ListItemIcon.js.map +1 -1
- package/dist/Components/Modal.js +53 -11
- package/dist/Components/Modal.js.map +1 -1
- package/dist/Components/Multiselect.js +22 -23
- package/dist/Components/Multiselect.js.map +1 -1
- package/dist/Components/MultiselectTags.js +24 -25
- package/dist/Components/MultiselectTags.js.map +1 -1
- package/dist/Components/Popover.js +2 -2
- package/dist/Components/Popover.js.map +1 -1
- package/dist/Components/PopoverMenu.js +1 -1
- package/dist/Components/PopoverMenu.js.map +1 -1
- package/dist/Components/ProgressBar.js +2 -2
- package/dist/Components/ProgressBar.js.map +1 -1
- package/dist/Components/RichContenteditable.js +2 -2
- package/dist/Components/RichContenteditable.js.map +1 -1
- package/dist/Components/SettingsInputText.js +22 -1
- package/dist/Components/SettingsInputText.js.map +1 -1
- package/dist/Components/SettingsSection.js +2 -2
- package/dist/Components/SettingsSection.js.map +1 -1
- package/dist/Components/SettingsSelectGroup.js +41 -21
- package/dist/Components/SettingsSelectGroup.js.map +1 -1
- package/dist/Components/TimezonePicker.js +340 -0
- package/dist/Components/TimezonePicker.js.map +1 -0
- package/dist/Components/UserBubble.js +35 -36
- package/dist/Components/UserBubble.js.map +1 -1
- package/dist/Directives/Focus.js +1 -1
- package/dist/Directives/Focus.js.map +1 -1
- package/dist/Directives/Linkify.js +1 -1
- package/dist/Directives/Linkify.js.map +1 -1
- package/dist/Directives/Tooltip.js +2 -2
- package/dist/Directives/Tooltip.js.map +1 -1
- package/dist/Functions/usernameToColor.js +2 -3
- package/dist/Functions/usernameToColor.js.map +1 -1
- package/dist/Mixins/excludeClickOutsideClasses.js +2 -2
- package/dist/Mixins/excludeClickOutsideClasses.js.map +1 -1
- package/dist/Mixins/isFullscreen.js +1 -1
- package/dist/Mixins/isFullscreen.js.map +1 -1
- package/dist/Mixins/isMobile.js +1 -1
- package/dist/Mixins/isMobile.js.map +1 -1
- package/dist/Mixins/richEditor.js +1 -1
- package/dist/Mixins/richEditor.js.map +1 -1
- package/dist/ncvuecomponents.js +276 -69
- package/dist/ncvuecomponents.js.map +1 -1
- package/package.json +28 -43
- package/src/assets/action.scss +0 -132
- package/src/assets/iconfont/README.md +0 -30
- package/src/assets/iconfont/arrow-left-double.svg +0 -3
- package/src/assets/iconfont/arrow-left.svg +0 -3
- package/src/assets/iconfont/arrow-right-double.svg +0 -3
- package/src/assets/iconfont/arrow-right.svg +0 -3
- package/src/assets/iconfont/breadcrumb.svg +0 -1
- package/src/assets/iconfont/checkmark.svg +0 -1
- package/src/assets/iconfont/close.svg +0 -1
- package/src/assets/iconfont/confirm.svg +0 -1
- package/src/assets/iconfont/info.svg +0 -1
- package/src/assets/iconfont/menu.svg +0 -1
- package/src/assets/iconfont/more.svg +0 -1
- package/src/assets/iconfont/pause.svg +0 -1
- package/src/assets/iconfont/play.svg +0 -1
- package/src/assets/iconfont/triangle-s.svg +0 -1
- package/src/assets/iconfont/user-status-away.svg +0 -2
- package/src/assets/iconfont/user-status-dnd.svg +0 -2
- package/src/assets/iconfont/user-status-invisible.svg +0 -2
- package/src/assets/iconfont/user-status-online.svg +0 -2
- package/src/assets/inputs.scss +0 -104
- package/src/assets/variables.scss +0 -57
- package/src/components/ActionButton/ActionButton.vue +0 -160
- package/src/components/ActionButton/index.js +0 -24
- package/src/components/ActionCheckbox/ActionCheckbox.vue +0 -220
- package/src/components/ActionCheckbox/index.js +0 -24
- package/src/components/ActionInput/ActionInput.vue +0 -418
- package/src/components/ActionInput/index.js +0 -24
- package/src/components/ActionLink/ActionLink.vue +0 -132
- package/src/components/ActionLink/index.js +0 -24
- package/src/components/ActionRadio/ActionRadio.vue +0 -219
- package/src/components/ActionRadio/index.js +0 -24
- package/src/components/ActionRouter/ActionRouter.vue +0 -100
- package/src/components/ActionRouter/index.js +0 -24
- package/src/components/ActionSeparator/ActionSeparator.vue +0 -43
- package/src/components/ActionSeparator/index.js +0 -24
- package/src/components/ActionText/ActionText.vue +0 -87
- package/src/components/ActionText/index.js +0 -24
- package/src/components/ActionTextEditable/ActionTextEditable.vue +0 -306
- package/src/components/ActionTextEditable/index.js +0 -24
- package/src/components/Actions/Actions.vue +0 -764
- package/src/components/Actions/index.js +0 -24
- package/src/components/AppContent/AppContent.vue +0 -93
- package/src/components/AppContent/index.js +0 -23
- package/src/components/AppContentDetails/AppContentDetails.vue +0 -34
- package/src/components/AppContentDetails/index.js +0 -23
- package/src/components/AppContentList/AppContentList.vue +0 -44
- package/src/components/AppContentList/index.js +0 -23
- package/src/components/AppNavigation/AppNavigation.vue +0 -190
- package/src/components/AppNavigation/index.js +0 -23
- package/src/components/AppNavigationCaption/AppNavigationCaption.vue +0 -39
- package/src/components/AppNavigationCaption/index.js +0 -3
- package/src/components/AppNavigationCounter/AppNavigationCounter.vue +0 -82
- package/src/components/AppNavigationCounter/index.js +0 -25
- package/src/components/AppNavigationIconBullet/AppNavigationIconBullet.vue +0 -95
- package/src/components/AppNavigationIconBullet/index.js +0 -24
- package/src/components/AppNavigationItem/AppNavigationIconCollapsible.vue +0 -90
- package/src/components/AppNavigationItem/AppNavigationItem.vue +0 -629
- package/src/components/AppNavigationItem/InputConfirmCancel.vue +0 -134
- package/src/components/AppNavigationItem/index.js +0 -24
- package/src/components/AppNavigationNew/AppNavigationNew.vue +0 -76
- package/src/components/AppNavigationNew/index.js +0 -23
- package/src/components/AppNavigationNewItem/AppNavigationNewItem.vue +0 -165
- package/src/components/AppNavigationNewItem/index.js +0 -24
- package/src/components/AppNavigationSettings/AppNavigationSettings.vue +0 -105
- package/src/components/AppNavigationSettings/index.js +0 -23
- package/src/components/AppNavigationSpacer/AppNavigationSpacer.vue +0 -39
- package/src/components/AppNavigationSpacer/index.js +0 -23
- package/src/components/AppNavigationToggle/AppNavigationToggle.vue +0 -78
- package/src/components/AppNavigationToggle/index.js +0 -24
- package/src/components/AppSettingsDialog/AppSettingsDialog.vue +0 -331
- package/src/components/AppSettingsDialog/index.js +0 -25
- package/src/components/AppSettingsSection/AppSettingsSection.vue +0 -64
- package/src/components/AppSettingsSection/index.js +0 -25
- package/src/components/AppSidebar/AppSidebar.vue +0 -802
- package/src/components/AppSidebar/AppSidebarTabs.vue +0 -348
- package/src/components/AppSidebar/index.js +0 -23
- package/src/components/AppSidebarTab/AppSidebarTab.vue +0 -103
- package/src/components/AppSidebarTab/index.js +0 -23
- package/src/components/Avatar/Avatar.vue +0 -758
- package/src/components/Avatar/index.js +0 -25
- package/src/components/Breadcrumb/Breadcrumb.vue +0 -262
- package/src/components/Breadcrumb/index.js +0 -25
- package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -537
- package/src/components/Breadcrumbs/index.js +0 -25
- package/src/components/ColorPicker/ColorPicker.vue +0 -380
- package/src/components/ColorPicker/index.js +0 -25
- package/src/components/Content/Content.vue +0 -77
- package/src/components/Content/index.js +0 -23
- package/src/components/DatetimePicker/DatetimePicker.vue +0 -195
- package/src/components/DatetimePicker/index.js +0 -28
- package/src/components/DatetimePicker/index.scss +0 -405
- package/src/components/EmojiPicker/EmojiPicker.vue +0 -302
- package/src/components/EmojiPicker/index.js +0 -23
- package/src/components/EmptyContent/EmptyContent.vue +0 -120
- package/src/components/EmptyContent/index.js +0 -24
- package/src/components/Highlight/Highlight.vue +0 -183
- package/src/components/Highlight/index.js +0 -25
- package/src/components/ListItemIcon/ListItemIcon.vue +0 -277
- package/src/components/ListItemIcon/index.js +0 -25
- package/src/components/Modal/Modal.vue +0 -833
- package/src/components/Modal/index.js +0 -27
- package/src/components/Multiselect/EllipsisedOption.vue +0 -141
- package/src/components/Multiselect/Multiselect.vue +0 -430
- package/src/components/Multiselect/index.js +0 -28
- package/src/components/Multiselect/index.scss +0 -290
- package/src/components/MultiselectTags/MultiselectTags.vue +0 -179
- package/src/components/MultiselectTags/api.js +0 -115
- package/src/components/MultiselectTags/index.js +0 -23
- package/src/components/Popover/Popover.vue +0 -208
- package/src/components/Popover/index.js +0 -25
- package/src/components/PopoverMenu/PopoverMenu.vue +0 -62
- package/src/components/PopoverMenu/PopoverMenuItem.vue +0 -382
- package/src/components/PopoverMenu/index.js +0 -24
- package/src/components/ProgressBar/ProgressBar.vue +0 -135
- package/src/components/ProgressBar/index.js +0 -25
- package/src/components/RichContenteditable/AutoCompleteResult.vue +0 -191
- package/src/components/RichContenteditable/MentionBubble.vue +0 -165
- package/src/components/RichContenteditable/RichContenteditable.vue +0 -517
- package/src/components/RichContenteditable/index.js +0 -25
- package/src/components/SettingsInputText/SettingsInputText.vue +0 -207
- package/src/components/SettingsInputText/index.js +0 -24
- package/src/components/SettingsSection/SettingsSection.vue +0 -151
- package/src/components/SettingsSection/index.js +0 -24
- package/src/components/SettingsSelectGroup/SettingsSelectGroup.vue +0 -149
- package/src/components/SettingsSelectGroup/index.js +0 -25
- package/src/components/UserBubble/UserBubble.vue +0 -319
- package/src/components/UserBubble/index.js +0 -25
- package/src/components/index.js +0 -110
- package/src/directives/Focus/index.js +0 -29
- package/src/directives/Linkify/index.js +0 -31
- package/src/directives/Tooltip/index.js +0 -32
- package/src/directives/Tooltip/index.scss +0 -117
- package/src/directives/index.js +0 -31
- package/src/fonts/iconfont-vue-f56d517.eot +0 -0
- package/src/fonts/iconfont-vue-f56d517.svg +0 -1
- package/src/fonts/iconfont-vue-f56d517.ttf +0 -0
- package/src/fonts/iconfont-vue-f56d517.woff +0 -0
- package/src/fonts/scss/iconfont-vue.scss +0 -115
- package/src/functions/usernameToColor/index.js +0 -25
- package/src/functions/usernameToColor/usernameToColor.js +0 -68
- package/src/index.js +0 -40
- package/src/l10n.js +0 -42
- package/src/mixins/actionGlobal.js +0 -59
- package/src/mixins/actionText.js +0 -85
- package/src/mixins/excludeClickOutsideClasses/index.js +0 -72
- package/src/mixins/index.js +0 -35
- package/src/mixins/isFullscreen/index.js +0 -46
- package/src/mixins/isMobile/index.js +0 -43
- package/src/mixins/l10n.js +0 -8
- package/src/mixins/richEditor/index.js +0 -160
- package/src/mixins/userStatus.js +0 -76
- package/src/utils/FindRanges.js +0 -47
- package/src/utils/GenColors.js +0 -79
- package/src/utils/GenRandomId.js +0 -31
- package/src/utils/GetChildren.js +0 -47
- package/src/utils/GetParent.js +0 -41
- package/src/utils/IsMobileState.js +0 -49
- package/src/utils/IsOutOfViewport.js +0 -36
- package/src/utils/ScopeComponent.js +0 -37
- package/src/utils/Timer.js +0 -61
- package/src/utils/ValidateChildren.js +0 -50
- package/src/utils/ValidateSlot.js +0 -57
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
*
|
|
4
|
-
* @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*/
|
|
21
|
-
import Content from './Content'
|
|
22
|
-
|
|
23
|
-
export default Content
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
-
|
|
6
|
-
- @license GNU AGPL version 3 or any later version
|
|
7
|
-
-
|
|
8
|
-
- This program is free software: you can redistribute it and/or modify
|
|
9
|
-
- it under the terms of the GNU Affero General Public License as
|
|
10
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
- License, or (at your option) any later version.
|
|
12
|
-
-
|
|
13
|
-
- This program is distributed in the hope that it will be useful,
|
|
14
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
- GNU Affero General Public License for more details.
|
|
17
|
-
-
|
|
18
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
-
|
|
21
|
-
-->
|
|
22
|
-
|
|
23
|
-
<docs>
|
|
24
|
-
> We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue2-datepicker
|
|
25
|
-
> Please check there for all the available options.
|
|
26
|
-
|
|
27
|
-
### Defaults
|
|
28
|
-
- cleareable: false
|
|
29
|
-
- minute-step: 10
|
|
30
|
-
|
|
31
|
-
### Example
|
|
32
|
-
```vue
|
|
33
|
-
<template>
|
|
34
|
-
<span>
|
|
35
|
-
<DatetimePicker
|
|
36
|
-
v-model="time"
|
|
37
|
-
type="datetime" />
|
|
38
|
-
{{ time }}
|
|
39
|
-
</span>
|
|
40
|
-
</template>
|
|
41
|
-
<script>
|
|
42
|
-
export default {
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
time: null,
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Range picker
|
|
53
|
-
```vue
|
|
54
|
-
<template>
|
|
55
|
-
<span>
|
|
56
|
-
<DatetimePicker
|
|
57
|
-
v-model="time"
|
|
58
|
-
range
|
|
59
|
-
type="date" />
|
|
60
|
-
{{ time }}
|
|
61
|
-
</span>
|
|
62
|
-
</template>
|
|
63
|
-
<script>
|
|
64
|
-
export default {
|
|
65
|
-
data() {
|
|
66
|
-
return {
|
|
67
|
-
time: null,
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
</script>
|
|
72
|
-
```
|
|
73
|
-
</docs>
|
|
74
|
-
|
|
75
|
-
<template>
|
|
76
|
-
<DatePicker
|
|
77
|
-
ref="datepicker"
|
|
78
|
-
:clearable="clearable"
|
|
79
|
-
:minute-step="minuteStep"
|
|
80
|
-
:format="format"
|
|
81
|
-
:formatter="formatter"
|
|
82
|
-
:type="type"
|
|
83
|
-
:value="value"
|
|
84
|
-
:append-to-body="appendToBody"
|
|
85
|
-
:show-week-number="showWeekNumber"
|
|
86
|
-
:popup-class="{ 'show-week-number': showWeekNumber }"
|
|
87
|
-
v-bind="$attrs"
|
|
88
|
-
v-on="$listeners"
|
|
89
|
-
@select-year="handleSelectYear"
|
|
90
|
-
@select-month="handleSelectMonth"
|
|
91
|
-
@update:value="$emit('update:value', value)">
|
|
92
|
-
<template v-for="(_, slot) of $scopedSlots" #[slot]="scope">
|
|
93
|
-
<slot :name="slot" v-bind="scope" />
|
|
94
|
-
</template>
|
|
95
|
-
</DatePicker>
|
|
96
|
-
</template>
|
|
97
|
-
|
|
98
|
-
<script>
|
|
99
|
-
import DatePicker from 'vue2-datepicker'
|
|
100
|
-
|
|
101
|
-
export default {
|
|
102
|
-
name: 'DatetimePicker',
|
|
103
|
-
|
|
104
|
-
components: {
|
|
105
|
-
DatePicker,
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
inheritAttrs: false,
|
|
109
|
-
|
|
110
|
-
props: {
|
|
111
|
-
clearable: {
|
|
112
|
-
type: Boolean,
|
|
113
|
-
default() {
|
|
114
|
-
return false
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
minuteStep: {
|
|
119
|
-
type: Number,
|
|
120
|
-
default() {
|
|
121
|
-
return 10
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
type: {
|
|
126
|
-
type: String,
|
|
127
|
-
default: 'date',
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
format: {
|
|
131
|
-
type: String,
|
|
132
|
-
default() {
|
|
133
|
-
const map = {
|
|
134
|
-
date: 'YYYY-MM-DD',
|
|
135
|
-
datetime: 'YYYY-MM-DD H:mm:ss',
|
|
136
|
-
year: 'YYYY',
|
|
137
|
-
month: 'YYYY-MM',
|
|
138
|
-
time: 'H:mm:ss',
|
|
139
|
-
week: 'w',
|
|
140
|
-
}
|
|
141
|
-
return map[this.type] || map.date
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
formatter: {
|
|
146
|
-
type: Object,
|
|
147
|
-
default() {
|
|
148
|
-
return null
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
// eslint-disable-next-line
|
|
153
|
-
value: {
|
|
154
|
-
default() {
|
|
155
|
-
return new Date()
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
appendToBody: {
|
|
160
|
-
type: Boolean,
|
|
161
|
-
default: false,
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
showWeekNumber: {
|
|
165
|
-
type: Boolean,
|
|
166
|
-
default: false,
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
methods: {
|
|
171
|
-
handleSelectYear(year) {
|
|
172
|
-
const value = this.$refs.datepicker.currentValue
|
|
173
|
-
if (value) {
|
|
174
|
-
try {
|
|
175
|
-
const date = new Date(new Date(value).setFullYear(year))
|
|
176
|
-
this.$refs.datepicker.selectDate(date)
|
|
177
|
-
} catch (error) {
|
|
178
|
-
console.error('Invalid value', value, year)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
handleSelectMonth(month) {
|
|
183
|
-
const value = this.$refs.datepicker.currentValue
|
|
184
|
-
if (value) {
|
|
185
|
-
try {
|
|
186
|
-
const date = new Date(new Date(value).setMonth(month))
|
|
187
|
-
this.$refs.datepicker.selectDate(date)
|
|
188
|
-
} catch (error) {
|
|
189
|
-
console.error('Invalid value', value, month)
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
}
|
|
195
|
-
</script>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
import ScopeComponent from '../../utils/ScopeComponent'
|
|
23
|
-
import DatetimePicker from './DatetimePicker'
|
|
24
|
-
import './index.scss'
|
|
25
|
-
|
|
26
|
-
ScopeComponent(DatetimePicker)
|
|
27
|
-
|
|
28
|
-
export default DatetimePicker
|
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
$cell_height: 32px;
|
|
2
|
-
|
|
3
|
-
// import the icons font scss
|
|
4
|
-
@import '../../fonts/scss/iconfont-vue';
|
|
5
|
-
@import '~vue2-datepicker/scss/index.scss';
|
|
6
|
-
|
|
7
|
-
.mx-datepicker[data-v-#{$scope_version}] {
|
|
8
|
-
user-select: none;
|
|
9
|
-
color: var(--color-main-text);
|
|
10
|
-
|
|
11
|
-
svg {
|
|
12
|
-
fill: var(--color-main-text);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* INPUT CONTAINER */
|
|
16
|
-
.mx-input-wrapper {
|
|
17
|
-
// input
|
|
18
|
-
.mx-input {
|
|
19
|
-
width: 100%;
|
|
20
|
-
border: 1px solid var(--color-border);
|
|
21
|
-
background-color: var(--color-main-background);
|
|
22
|
-
background-clip: content-box;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:disabled,
|
|
26
|
-
&.disabled {
|
|
27
|
-
cursor: not-allowed;
|
|
28
|
-
opacity: $opacity_normal;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.mx-icon-calendar,
|
|
32
|
-
.mx-icon-clear {
|
|
33
|
-
color: var(--color-text-lighter);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Datepicker popup wrapper
|
|
39
|
-
.mx-datepicker-main {
|
|
40
|
-
color: var(--color-main-text);
|
|
41
|
-
border: 1px solid var(--color-border);
|
|
42
|
-
background-color: var(--color-main-background);
|
|
43
|
-
font-family: var(--font-face) !important;
|
|
44
|
-
line-height: 1.5;
|
|
45
|
-
|
|
46
|
-
svg {
|
|
47
|
-
fill: var(--color-main-text);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.mx-datepicker-popup {
|
|
51
|
-
z-index: 2000;
|
|
52
|
-
box-shadow: none;
|
|
53
|
-
|
|
54
|
-
.mx-datepicker-sidebar + .mx-datepicker-content {
|
|
55
|
-
border-left: 1px solid var(--color-border);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.show-week-number .mx-calendar {
|
|
60
|
-
width: $cell_height * 8 + 2 * 5px; // week number + 7 days + padding
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.mx-datepicker-header {
|
|
64
|
-
border-bottom: 1px solid var(--color-border);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.mx-datepicker-footer {
|
|
68
|
-
border-top: 1px solid var(--color-border);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// default popup styles
|
|
72
|
-
.mx-calendar {
|
|
73
|
-
width: $cell_height * 7 + 2 * 5px; // 7 days + padding
|
|
74
|
-
padding: 5px;
|
|
75
|
-
&.mx-calendar-week-mode {
|
|
76
|
-
width: $cell_height * 8 + 2 * 5px; // week number + 7 days + padding
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.mx-time + .mx-time,
|
|
81
|
-
.mx-calendar + .mx-calendar {
|
|
82
|
-
border-left: 1px solid var(--color-border);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.mx-range-wrapper {
|
|
86
|
-
display: flex;
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
|
|
89
|
-
// first active cell, range style on day picker panel only
|
|
90
|
-
.mx-calendar-content .mx-table-date .cell {
|
|
91
|
-
&.active {
|
|
92
|
-
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
93
|
-
}
|
|
94
|
-
// second selected cell
|
|
95
|
-
&.in-range + .cell.active {
|
|
96
|
-
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Various panels
|
|
102
|
-
.mx-table {
|
|
103
|
-
text-align: center;
|
|
104
|
-
|
|
105
|
-
thead > tr > th {
|
|
106
|
-
text-align: center;
|
|
107
|
-
opacity: $opacity_disabled;
|
|
108
|
-
color: var(--color-text-lighter);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Override table rule from server
|
|
112
|
-
tr:focus,
|
|
113
|
-
tr:hover,
|
|
114
|
-
tr:active {
|
|
115
|
-
background-color: transparent;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// regular cell style
|
|
119
|
-
.cell {
|
|
120
|
-
transition: all 100ms ease-in-out;
|
|
121
|
-
text-align: center;
|
|
122
|
-
opacity: $opacity_normal;
|
|
123
|
-
border-radius: 50px;
|
|
124
|
-
|
|
125
|
-
// force pointer on all content
|
|
126
|
-
> * {
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Selected and mouse event
|
|
131
|
-
&.today {
|
|
132
|
-
opacity: $opacity_full;
|
|
133
|
-
color: var(--color-primary-element);
|
|
134
|
-
font-weight: bold;
|
|
135
|
-
&:hover,
|
|
136
|
-
&:focus {
|
|
137
|
-
color: var(--color-primary-text);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
&.in-range,
|
|
141
|
-
&.disabled {
|
|
142
|
-
border-radius: 0;
|
|
143
|
-
font-weight: normal;
|
|
144
|
-
}
|
|
145
|
-
&.in-range {
|
|
146
|
-
opacity: $opacity_normal;
|
|
147
|
-
}
|
|
148
|
-
&.not-current-month {
|
|
149
|
-
opacity: $opacity_disabled;
|
|
150
|
-
color: var(--color-text-lighter);
|
|
151
|
-
&:hover,
|
|
152
|
-
&:focus {
|
|
153
|
-
opacity: $opacity_full;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// hover-/focus after the other rules
|
|
158
|
-
&:hover,
|
|
159
|
-
&:focus,
|
|
160
|
-
&.actived,
|
|
161
|
-
&.active,
|
|
162
|
-
&.in-range {
|
|
163
|
-
opacity: $opacity_full;
|
|
164
|
-
color: var(--color-primary-text);
|
|
165
|
-
background-color: var(--color-primary-element);
|
|
166
|
-
font-weight: bold;
|
|
167
|
-
}
|
|
168
|
-
&.disabled {
|
|
169
|
-
opacity: $opacity_disabled;
|
|
170
|
-
color: var(--color-text-lighter);
|
|
171
|
-
border-radius: 0;
|
|
172
|
-
background-color: var(--color-background-darker);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.mx-week-number {
|
|
177
|
-
text-align: center;
|
|
178
|
-
opacity: $opacity_normal;
|
|
179
|
-
border-radius: 50px;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// cell that are not in a table
|
|
183
|
-
span.mx-week-number,
|
|
184
|
-
li.mx-week-number,
|
|
185
|
-
span.cell,
|
|
186
|
-
li.cell {
|
|
187
|
-
min-height: $cell_height;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Standard grid/flex layout for day/month/year panels
|
|
191
|
-
&.mx-table-date thead,
|
|
192
|
-
&.mx-table-date tbody,
|
|
193
|
-
&.mx-table-year,
|
|
194
|
-
&.mx-table-month {
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
justify-content: space-around;
|
|
198
|
-
tr {
|
|
199
|
-
display: inline-flex;
|
|
200
|
-
align-items: center;
|
|
201
|
-
flex: 1 1 $cell_height;
|
|
202
|
-
justify-content: space-around;
|
|
203
|
-
min-height: $cell_height;
|
|
204
|
-
}
|
|
205
|
-
// Default cell style
|
|
206
|
-
th,
|
|
207
|
-
td {
|
|
208
|
-
display: flex;
|
|
209
|
-
align-items: center;
|
|
210
|
-
// 3 rows with a little spacing
|
|
211
|
-
flex: 0 1 32%;
|
|
212
|
-
justify-content: center;
|
|
213
|
-
min-width: $cell_height;
|
|
214
|
-
// spacing between rows
|
|
215
|
-
height: 95%;
|
|
216
|
-
min-height: $cell_height;
|
|
217
|
-
transition: background 100ms ease-in-out;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
&.mx-table-year {
|
|
221
|
-
tr th,
|
|
222
|
-
tr td {
|
|
223
|
-
// only two rows in year panel
|
|
224
|
-
flex-basis: 48%;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
&.mx-table-date {
|
|
228
|
-
tr th,
|
|
229
|
-
tr td {
|
|
230
|
-
// only two rows in year panel
|
|
231
|
-
flex-basis: $cell_height;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// default buttons: header...
|
|
237
|
-
.mx-btn {
|
|
238
|
-
min-width: $cell_height;
|
|
239
|
-
height: $cell_height;
|
|
240
|
-
margin: 0 auto; // center also single element
|
|
241
|
-
padding: 7px 10px;
|
|
242
|
-
cursor: pointer;
|
|
243
|
-
text-decoration: none;
|
|
244
|
-
opacity: $opacity_disabled;
|
|
245
|
-
color: var(--color-text-lighter);
|
|
246
|
-
border-radius: $cell_height;
|
|
247
|
-
line-height: $cell_height - 12px; // padding minus 2px for better visual
|
|
248
|
-
// Mouse feedback
|
|
249
|
-
&:hover,
|
|
250
|
-
&:focus {
|
|
251
|
-
opacity: $opacity_full;
|
|
252
|
-
color: var(--color-main-text);
|
|
253
|
-
background-color: var(--color-background-darker);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Header, arrows, years, months
|
|
258
|
-
.mx-calendar-header {
|
|
259
|
-
display: inline-flex;
|
|
260
|
-
align-items: center;
|
|
261
|
-
justify-content: space-between;
|
|
262
|
-
width: 100%;
|
|
263
|
-
height: $clickable-area;
|
|
264
|
-
margin-bottom: 4px;
|
|
265
|
-
|
|
266
|
-
button {
|
|
267
|
-
min-width: $cell_height;
|
|
268
|
-
min-height: $cell_height;
|
|
269
|
-
margin: 0;
|
|
270
|
-
cursor: pointer;
|
|
271
|
-
text-align: center;
|
|
272
|
-
text-decoration: none;
|
|
273
|
-
opacity: $opacity_normal;
|
|
274
|
-
color: var(--color-main-text);
|
|
275
|
-
border-radius: $cell_height;
|
|
276
|
-
line-height: $cell_height - 12px; // padding minus 2px for better visual
|
|
277
|
-
|
|
278
|
-
// Mouse feedback
|
|
279
|
-
&:hover,
|
|
280
|
-
&:focus {
|
|
281
|
-
opacity: $opacity_full;
|
|
282
|
-
color: var(--color-main-text);
|
|
283
|
-
background-color: var(--color-background-darker);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// Header arrows
|
|
287
|
-
&.mx-btn-icon-double-left,
|
|
288
|
-
&.mx-btn-icon-left,
|
|
289
|
-
&.mx-btn-icon-right,
|
|
290
|
-
&.mx-btn-icon-double-right {
|
|
291
|
-
align-items: center;
|
|
292
|
-
justify-content: center;
|
|
293
|
-
width: $cell_height;
|
|
294
|
-
padding: 0; // leave the centering to flex
|
|
295
|
-
|
|
296
|
-
// font icons
|
|
297
|
-
&:before {
|
|
298
|
-
display: block;
|
|
299
|
-
font-size: $icon-size;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// Hide original icons
|
|
303
|
-
> i {
|
|
304
|
-
display: none;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.mx-calendar-header-label {
|
|
310
|
-
display: flex;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.mx-btn-icon-double-left {
|
|
314
|
-
@include iconfont('arrow-left-double');
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.mx-btn-icon-left {
|
|
318
|
-
@include iconfont('arrow-left');
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.mx-btn-icon-right {
|
|
322
|
-
@include iconfont('arrow-right');
|
|
323
|
-
// arrows are all before month and year
|
|
324
|
-
// send them to the end of the row
|
|
325
|
-
//order: 3;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.mx-btn-icon-double-right {
|
|
329
|
-
@include iconfont('arrow-right-double');
|
|
330
|
-
// arrows are all before month and year
|
|
331
|
-
// send them to the end of the row
|
|
332
|
-
//order: 4;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
button.mx-btn-icon-right {
|
|
336
|
-
order: 2;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
button.mx-btn-icon-double-right {
|
|
340
|
-
order: 3;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// Week panel
|
|
345
|
-
.mx-calendar-week-mode {
|
|
346
|
-
// move focus on row and not on cell
|
|
347
|
-
.mx-date-row {
|
|
348
|
-
.mx-week-number {
|
|
349
|
-
font-weight: bold;
|
|
350
|
-
}
|
|
351
|
-
&:hover,
|
|
352
|
-
&.mx-active-week {
|
|
353
|
-
opacity: $opacity_full;
|
|
354
|
-
border-radius: 50px;
|
|
355
|
-
background-color: var(--color-background-dark);
|
|
356
|
-
td {
|
|
357
|
-
background-color: transparent;
|
|
358
|
-
&, &:hover, &:focus {
|
|
359
|
-
color: inherit;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
&.mx-active-week {
|
|
364
|
-
color: var(--color-primary-text);
|
|
365
|
-
background-color: var(--color-primary-element);
|
|
366
|
-
// Remove cell feedback on selected rows
|
|
367
|
-
td {
|
|
368
|
-
opacity: $opacity_normal;
|
|
369
|
-
font-weight: normal;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
// Time panel
|
|
376
|
-
.mx-time {
|
|
377
|
-
background-color: var(--color-main-background);
|
|
378
|
-
|
|
379
|
-
.mx-time-header {
|
|
380
|
-
// only one button, center it
|
|
381
|
-
justify-content: center;
|
|
382
|
-
border-bottom: 1px solid var(--color-border);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.mx-time-column {
|
|
386
|
-
border-left: 1px solid var(--color-border);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.mx-time-option,
|
|
390
|
-
.mx-time-item {
|
|
391
|
-
&.active,
|
|
392
|
-
&:hover {
|
|
393
|
-
color: var(--color-primary-text);
|
|
394
|
-
background-color: var(--color-primary-element);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
&.disabled {
|
|
398
|
-
cursor: not-allowed;
|
|
399
|
-
opacity: $opacity_disabled;
|
|
400
|
-
color: var(--color-main-text);
|
|
401
|
-
background-color: var(--color-main-background);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|