@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,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 Multiselect from './Multiselect'
|
|
24
|
-
import './index.scss'
|
|
25
|
-
|
|
26
|
-
ScopeComponent(Multiselect)
|
|
27
|
-
|
|
28
|
-
export default Multiselect
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
// scoping is not working inside the Multiselect.vue component
|
|
2
|
-
// as the nested properties are not inside it
|
|
3
|
-
// Therefore we need to use an external scoping
|
|
4
|
-
.multiselect[data-v-#{$scope_version}] {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0 !important;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
/* override this rule with your width styling if you need */
|
|
9
|
-
min-width: 160px;
|
|
10
|
-
position: relative;
|
|
11
|
-
background-color: var(--color-main-background);
|
|
12
|
-
|
|
13
|
-
/* Force single multiselect value to be shown when not active */
|
|
14
|
-
&:not(.multiselect--active) .multiselect__single {
|
|
15
|
-
width: 100%;
|
|
16
|
-
z-index: 2 !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// active state, force the input to be shown, we don't want
|
|
20
|
-
// the placeholder or the currently selected options
|
|
21
|
-
&.multiselect--active {
|
|
22
|
-
/* Opened: force display the input */
|
|
23
|
-
input.multiselect__input {
|
|
24
|
-
opacity: $opacity_full !important;
|
|
25
|
-
cursor: text !important;
|
|
26
|
-
// remove border radius on bottom opening
|
|
27
|
-
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
|
28
|
-
display: block !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* multiselect__limit hidden if active */
|
|
32
|
-
.multiselect__limit {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Remove radius on top opening
|
|
38
|
-
&.multiselect--active.multiselect--above {
|
|
39
|
-
input.multiselect__input {
|
|
40
|
-
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// disabled state background
|
|
45
|
-
&.multiselect--disabled,
|
|
46
|
-
&.multiselect--disabled .multiselect__single {
|
|
47
|
-
background-color: var(--color-background-dark) !important;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// loading state
|
|
51
|
-
&.icon-loading-small::after {
|
|
52
|
-
left: 100%;
|
|
53
|
-
margin-left: -24px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// multiple selected options display
|
|
57
|
-
.multiselect__tags {
|
|
58
|
-
/* space between tags and limit tag */
|
|
59
|
-
$space-between: 5px;
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-wrap: nowrap;
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
border: 1px solid var(--color-border-dark);
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
position: relative;
|
|
66
|
-
border-radius: 3px;
|
|
67
|
-
min-height: 34px;
|
|
68
|
-
height: 100%;
|
|
69
|
-
|
|
70
|
-
/* tag wrapper */
|
|
71
|
-
.multiselect__tags-wrap {
|
|
72
|
-
align-items: center;
|
|
73
|
-
display: inline-flex;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
max-width: 100%;
|
|
76
|
-
position: relative;
|
|
77
|
-
padding: 3px $space-between;
|
|
78
|
-
flex: 1 1;
|
|
79
|
-
flex-wrap: nowrap;
|
|
80
|
-
/* no tags or simple select? Show input directly
|
|
81
|
-
input is used to display single value */
|
|
82
|
-
&:empty ~ input.multiselect__input {
|
|
83
|
-
opacity: $opacity_full !important;
|
|
84
|
-
display: block !important;
|
|
85
|
-
/* hide default empty text like .multiselect__placeholder,
|
|
86
|
-
and show input instead. It looks better without a transition between
|
|
87
|
-
a span and the input that have different styling */
|
|
88
|
-
+ span:not(.multiselect__single) {
|
|
89
|
-
display: none;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
/* selected tag */
|
|
93
|
-
.multiselect__tag {
|
|
94
|
-
line-height: 20px;
|
|
95
|
-
padding: 1px 5px;
|
|
96
|
-
background-image: none;
|
|
97
|
-
color: var(--color-main-text);
|
|
98
|
-
border: 1px solid var(--color-border-dark);
|
|
99
|
-
display: inline-flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
border-radius: 3px;
|
|
102
|
-
/* require to override the default width
|
|
103
|
-
and force the tag to shring properly */
|
|
104
|
-
min-width: 0;
|
|
105
|
-
max-width: fit-content;
|
|
106
|
-
max-width: -moz-fit-content;
|
|
107
|
-
margin-bottom: 3px;
|
|
108
|
-
/* css hack, detect if more than two tags
|
|
109
|
-
if so, flex-basis is set to half */
|
|
110
|
-
&:only-child {
|
|
111
|
-
flex: 0 1 auto;
|
|
112
|
-
}
|
|
113
|
-
&:not(:last-child) {
|
|
114
|
-
margin-right: $space-between;
|
|
115
|
-
}
|
|
116
|
-
/* ellipsis the groups to be sure
|
|
117
|
-
we display at least two of them */
|
|
118
|
-
> span {
|
|
119
|
-
white-space: nowrap;
|
|
120
|
-
text-overflow: ellipsis;
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* Single select default value
|
|
127
|
-
or default placeholder if search disabled*/
|
|
128
|
-
.multiselect__single,
|
|
129
|
-
.multiselect__placeholder {
|
|
130
|
-
padding: 7px 6px; // like the input
|
|
131
|
-
flex: 0 0 100%;
|
|
132
|
-
z-index: 1; /* above input */
|
|
133
|
-
background-color: var(--color-main-background);
|
|
134
|
-
line-height: 18px; // 32px - 2*6px (padding) - 2*1px (border)
|
|
135
|
-
color: var(--color-text-lighter); // like the input
|
|
136
|
-
// Align content and make the flow smoother
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
|
|
140
|
-
// Anything inside will trigger the select opening
|
|
141
|
-
&, * {
|
|
142
|
-
cursor: pointer;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
/* displayed text if tag limit reached */
|
|
146
|
-
.multiselect__strong,
|
|
147
|
-
.multiselect__limit {
|
|
148
|
-
line-height: 20px;
|
|
149
|
-
color: var(--color-text-lighter);
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
align-items: center;
|
|
152
|
-
opacity: $opacity_normal;
|
|
153
|
-
margin-right: $space-between;
|
|
154
|
-
/* above the input */
|
|
155
|
-
z-index: 5;
|
|
156
|
-
}
|
|
157
|
-
/* default multiselect input for search and placeholder */
|
|
158
|
-
input.multiselect__input {
|
|
159
|
-
width: 100% !important;
|
|
160
|
-
position: relative !important;
|
|
161
|
-
margin: 0;
|
|
162
|
-
opacity: 0;
|
|
163
|
-
/* let's leave it on top of tags but hide it */
|
|
164
|
-
height: 100% !important;
|
|
165
|
-
border: none;
|
|
166
|
-
/* override hide to force show the placeholder */
|
|
167
|
-
/* only when not active */
|
|
168
|
-
cursor: pointer;
|
|
169
|
-
/* override inline styling of the lib */
|
|
170
|
-
padding: 7px 6px !important;
|
|
171
|
-
display: none;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* results wrapper */
|
|
176
|
-
.multiselect__content-wrapper {
|
|
177
|
-
position: absolute;
|
|
178
|
-
width: 100%;
|
|
179
|
-
margin-top: -1px;
|
|
180
|
-
border: 1px solid var(--color-border-dark);
|
|
181
|
-
background: var(--color-main-background);
|
|
182
|
-
z-index: 50;
|
|
183
|
-
max-height: 250px;
|
|
184
|
-
overflow-y: auto;
|
|
185
|
-
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
186
|
-
.multiselect__content {
|
|
187
|
-
width: 100%;
|
|
188
|
-
padding: 0;
|
|
189
|
-
}
|
|
190
|
-
li {
|
|
191
|
-
position: relative;
|
|
192
|
-
display: flex;
|
|
193
|
-
align-items: center;
|
|
194
|
-
background-color: transparent;
|
|
195
|
-
&,
|
|
196
|
-
span {
|
|
197
|
-
cursor: pointer;
|
|
198
|
-
}
|
|
199
|
-
> span {
|
|
200
|
-
padding: 8px;
|
|
201
|
-
white-space: nowrap;
|
|
202
|
-
overflow: hidden;
|
|
203
|
-
text-overflow: ellipsis;
|
|
204
|
-
margin: 0;
|
|
205
|
-
height: auto;
|
|
206
|
-
min-height: 1em;
|
|
207
|
-
-webkit-touch-callout: none;
|
|
208
|
-
-webkit-user-select: none;
|
|
209
|
-
-moz-user-select: none;
|
|
210
|
-
-ms-user-select: none;
|
|
211
|
-
user-select: none;
|
|
212
|
-
display: inline-flex;
|
|
213
|
-
align-items: center;
|
|
214
|
-
background-color: transparent;
|
|
215
|
-
color: var(--color-text-lighter);
|
|
216
|
-
width: 100%;
|
|
217
|
-
/* selected checkmark icon */
|
|
218
|
-
&::before {
|
|
219
|
-
content: ' ';
|
|
220
|
-
background-repeat: no-repeat;
|
|
221
|
-
background-position: center;
|
|
222
|
-
min-width: 16px;
|
|
223
|
-
min-height: 16px;
|
|
224
|
-
display: block;
|
|
225
|
-
opacity: $opacity_disabled;
|
|
226
|
-
margin-right: 5px;
|
|
227
|
-
visibility: hidden;
|
|
228
|
-
}
|
|
229
|
-
&.multiselect__option--disabled {
|
|
230
|
-
background-color: var(--color-background-dark);
|
|
231
|
-
opacity: $opacity_disabled;
|
|
232
|
-
}
|
|
233
|
-
&.multiselect__option--highlight {
|
|
234
|
-
color: var(--color-main-text);
|
|
235
|
-
background-color: var(--color-background-dark);
|
|
236
|
-
}
|
|
237
|
-
&:not(.multiselect__option--disabled):hover::before {
|
|
238
|
-
opacity: .3;
|
|
239
|
-
}
|
|
240
|
-
&.multiselect__option--selected,
|
|
241
|
-
&:not(.multiselect__option--disabled):hover {
|
|
242
|
-
&::before {
|
|
243
|
-
visibility: visible;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
/* ABOVE display */
|
|
250
|
-
&.multiselect--above .multiselect__content-wrapper {
|
|
251
|
-
bottom: 100%;
|
|
252
|
-
margin-bottom: -1px;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* Icon before option select */
|
|
256
|
-
&.multiselect--multiple {
|
|
257
|
-
// push the input after the tag list
|
|
258
|
-
.multiselect__tags {
|
|
259
|
-
flex-wrap: wrap;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.multiselect__content-wrapper li > span {
|
|
263
|
-
&::before {
|
|
264
|
-
background-image: var(--icon-checkmark-000);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/* add the prop tag-placeholder="create" to add the +
|
|
268
|
-
icon on top of an unknown-and-ready-to-be-created entry */
|
|
269
|
-
&[data-select='create'] {
|
|
270
|
-
&::before {
|
|
271
|
-
background-image: var(--icon-add-000);
|
|
272
|
-
visibility: visible;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/* No need for an icon here */
|
|
279
|
-
&.multiselect--single .multiselect__content-wrapper li > span::before {
|
|
280
|
-
display: none;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/* Mouse feedback */
|
|
284
|
-
&:hover,
|
|
285
|
-
input.multiselect__input {
|
|
286
|
-
.multiselect__placeholder {
|
|
287
|
-
color: var(--color-main-text);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
|
|
3
|
-
-
|
|
4
|
-
- @author Julius Härtl <jus@bitgrid.net>
|
|
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
|
-
## Single tag selector
|
|
25
|
-
|
|
26
|
-
```vue
|
|
27
|
-
<template>
|
|
28
|
-
<div class="wrapper">
|
|
29
|
-
<MultiselectTags v-model="value" :multiple="false" />
|
|
30
|
-
{{ value }}
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
export default {
|
|
36
|
-
data() {
|
|
37
|
-
return {
|
|
38
|
-
value: 1
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Multiple tag selector
|
|
46
|
-
```vue
|
|
47
|
-
<template>
|
|
48
|
-
<div class="wrapper">
|
|
49
|
-
<MultiselectTags v-model="value" :multiple="true" />
|
|
50
|
-
{{ value }}
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
export default {
|
|
56
|
-
data() {
|
|
57
|
-
return {
|
|
58
|
-
value: [1, 2]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
63
|
-
```
|
|
64
|
-
</docs>
|
|
65
|
-
|
|
66
|
-
<template>
|
|
67
|
-
<Multiselect :value="inputValue"
|
|
68
|
-
:options="tags"
|
|
69
|
-
:options-limit="5"
|
|
70
|
-
:placeholder="label"
|
|
71
|
-
track-by="id"
|
|
72
|
-
:custom-label="tagLabel"
|
|
73
|
-
:multiple="multiple"
|
|
74
|
-
:close-on-select="multiple"
|
|
75
|
-
:tag-width="60"
|
|
76
|
-
:disabled="disabled"
|
|
77
|
-
@input="update">
|
|
78
|
-
<span slot="noResult">{{ t('No results') }}</span>
|
|
79
|
-
<template #option="scope">
|
|
80
|
-
{{ tagLabel(scope.option) }}
|
|
81
|
-
</template>
|
|
82
|
-
</multiselect>
|
|
83
|
-
</template>
|
|
84
|
-
|
|
85
|
-
<script>
|
|
86
|
-
import l10n from '../../mixins/l10n'
|
|
87
|
-
import Multiselect from '../Multiselect'
|
|
88
|
-
import { searchTags } from './api'
|
|
89
|
-
import { t } from '../../l10n'
|
|
90
|
-
|
|
91
|
-
export default {
|
|
92
|
-
name: 'MultiselectTags',
|
|
93
|
-
components: {
|
|
94
|
-
Multiselect,
|
|
95
|
-
},
|
|
96
|
-
mixins: [l10n],
|
|
97
|
-
props: {
|
|
98
|
-
label: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: t('Select a tag'),
|
|
101
|
-
},
|
|
102
|
-
value: {
|
|
103
|
-
type: [Number, Array],
|
|
104
|
-
required: true,
|
|
105
|
-
},
|
|
106
|
-
disabled: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: false,
|
|
109
|
-
},
|
|
110
|
-
multiple: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: true,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
data() {
|
|
116
|
-
return {
|
|
117
|
-
tags: [],
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
computed: {
|
|
121
|
-
inputValue() {
|
|
122
|
-
return this.getValueObject()
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
async beforeCreate() {
|
|
126
|
-
try {
|
|
127
|
-
const result = await searchTags()
|
|
128
|
-
this.tags = result
|
|
129
|
-
} catch (error) {
|
|
130
|
-
console.error('Loading systemtags failed', error)
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
methods: {
|
|
134
|
-
getValueObject() {
|
|
135
|
-
if (this.tags.length === 0) {
|
|
136
|
-
return []
|
|
137
|
-
}
|
|
138
|
-
if (this.multiple) {
|
|
139
|
-
return this.value
|
|
140
|
-
.filter(tag => tag !== '')
|
|
141
|
-
.map(id => this.tags.find(tag2 => tag2.id === id))
|
|
142
|
-
} else {
|
|
143
|
-
return this.tags.find(tag => tag.id === this.value)
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
update(value) {
|
|
147
|
-
if (this.multiple) {
|
|
148
|
-
/**
|
|
149
|
-
* Emitted on input events of the multiselect field
|
|
150
|
-
* @type {number|number[]}
|
|
151
|
-
*/
|
|
152
|
-
this.$emit('input', value.map((element) => element.id))
|
|
153
|
-
} else {
|
|
154
|
-
if (value === null) {
|
|
155
|
-
this.$emit('input', null)
|
|
156
|
-
} else {
|
|
157
|
-
this.$emit('input', value.id)
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
/**
|
|
162
|
-
* @param {Object} tag destructuring object
|
|
163
|
-
* @param {string} tag.displayName the tag display name
|
|
164
|
-
* @param {bool} tag.userVisible is the tag visible
|
|
165
|
-
* @param {bool} tag.userAssignable is the tag restricted
|
|
166
|
-
* @returns {string}
|
|
167
|
-
*/
|
|
168
|
-
tagLabel({ displayName, userVisible, userAssignable }) {
|
|
169
|
-
if (userVisible === false) {
|
|
170
|
-
return t('{tag} (invisible)', { tag: displayName })
|
|
171
|
-
}
|
|
172
|
-
if (userAssignable === false) {
|
|
173
|
-
return t('{tag} (restricted)', { tag: displayName })
|
|
174
|
-
}
|
|
175
|
-
return displayName
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
}
|
|
179
|
-
</script>
|