@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,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 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 ActionRouter from './ActionRouter'
|
|
23
|
-
|
|
24
|
-
export default ActionRouter
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 Nextcloud et al.
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
- @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
6
|
-
- @author Kristof Hamann
|
|
7
|
-
- @author Joas Schilling <coding@schilljs.com>
|
|
8
|
-
-
|
|
9
|
-
- @license GNU AGPL version 3 or any later version
|
|
10
|
-
-
|
|
11
|
-
- This program is free software: you can redistribute it and/or modify
|
|
12
|
-
- it under the terms of the GNU Affero General Public License as
|
|
13
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
14
|
-
- License, or (at your option) any later version.
|
|
15
|
-
-
|
|
16
|
-
- This program is distributed in the hope that it will be useful,
|
|
17
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
- GNU Affero General Public License for more details.
|
|
20
|
-
-
|
|
21
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
22
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
-
-
|
|
24
|
-
-->
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<li class="action action-separator action--disabled" />
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
export default {
|
|
32
|
-
name: 'ActionSeparator',
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style lang="scss" scoped>
|
|
37
|
-
.action-separator {
|
|
38
|
-
height: 0;
|
|
39
|
-
margin: 5px 10px 5px 15px;
|
|
40
|
-
border-bottom: 1px solid var(--color-border-dark);
|
|
41
|
-
cursor: default;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 Nextcloud et al.
|
|
3
|
-
*
|
|
4
|
-
* @author Kristof Hamann
|
|
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 ActionSeparator from './ActionSeparator'
|
|
23
|
-
|
|
24
|
-
export default ActionSeparator
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
- @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
6
|
-
-
|
|
7
|
-
- @license GNU AGPL version 3 or any later version
|
|
8
|
-
-
|
|
9
|
-
- This program is free software: you can redistribute it and/or modify
|
|
10
|
-
- it under the terms of the GNU Affero General Public License as
|
|
11
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
12
|
-
- License, or (at your option) any later version.
|
|
13
|
-
-
|
|
14
|
-
- This program is distributed in the hope that it will be useful,
|
|
15
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
- GNU Affero General Public License for more details.
|
|
18
|
-
-
|
|
19
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
20
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
-
|
|
22
|
-
-->
|
|
23
|
-
|
|
24
|
-
<template>
|
|
25
|
-
<li class="action">
|
|
26
|
-
<span class="action-text"
|
|
27
|
-
@click="onClick">
|
|
28
|
-
<!-- @slot Manually provide icon -->
|
|
29
|
-
<slot name="icon">
|
|
30
|
-
<span
|
|
31
|
-
v-if="icon !== ''"
|
|
32
|
-
:class="[isIconUrl ? 'action-text__icon--url' : icon]"
|
|
33
|
-
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
|
|
34
|
-
class="action-text__icon" />
|
|
35
|
-
</slot>
|
|
36
|
-
|
|
37
|
-
<!-- long text with title -->
|
|
38
|
-
<p v-if="title">
|
|
39
|
-
<strong class="action-text__title">
|
|
40
|
-
{{ title }}
|
|
41
|
-
</strong>
|
|
42
|
-
<br>
|
|
43
|
-
<!-- white space is shown on longtext, so we can't
|
|
44
|
-
put {{ text }} on a new line for code readability -->
|
|
45
|
-
<span class="action-text__longtext" v-text="text" />
|
|
46
|
-
</p>
|
|
47
|
-
|
|
48
|
-
<!-- long text only -->
|
|
49
|
-
<!-- white space is shown on longtext, so we can't
|
|
50
|
-
put {{ text }} on a new line for code readability -->
|
|
51
|
-
<p v-else-if="isLongText"
|
|
52
|
-
class="action-text__longtext"
|
|
53
|
-
v-text="text" />
|
|
54
|
-
|
|
55
|
-
<!-- default text display -->
|
|
56
|
-
<span v-else class="action-text__text">{{ text }}</span>
|
|
57
|
-
|
|
58
|
-
<!-- fake slot to gather inner text -->
|
|
59
|
-
<slot v-if="false" />
|
|
60
|
-
</span>
|
|
61
|
-
</li>
|
|
62
|
-
</template>
|
|
63
|
-
|
|
64
|
-
<script>
|
|
65
|
-
import ActionTextMixin from '../../mixins/actionText'
|
|
66
|
-
|
|
67
|
-
export default {
|
|
68
|
-
name: 'ActionText',
|
|
69
|
-
|
|
70
|
-
mixins: [ActionTextMixin],
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style lang="scss" scoped>
|
|
76
|
-
@import '../../assets/action';
|
|
77
|
-
@include action-active;
|
|
78
|
-
@include action-item('text');
|
|
79
|
-
@include action--disabled;
|
|
80
|
-
|
|
81
|
-
.action-text {
|
|
82
|
-
&,
|
|
83
|
-
span {
|
|
84
|
-
cursor: default;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 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 ActionText from './ActionText'
|
|
23
|
-
|
|
24
|
-
export default ActionText
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
- @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
6
|
-
-
|
|
7
|
-
- @license GNU AGPL version 3 or any later version
|
|
8
|
-
-
|
|
9
|
-
- This program is free software: you can redistribute it and/or modify
|
|
10
|
-
- it under the terms of the GNU Affero General Public License as
|
|
11
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
12
|
-
- License, or (at your option) any later version.
|
|
13
|
-
-
|
|
14
|
-
- This program is distributed in the hope that it will be useful,
|
|
15
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
- GNU Affero General Public License for more details.
|
|
18
|
-
-
|
|
19
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
20
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
-
|
|
22
|
-
-->
|
|
23
|
-
|
|
24
|
-
<docs>
|
|
25
|
-
This component is made to be used inside of the [Actions](#Actions) component slots.
|
|
26
|
-
All undocumented attributes will be bound to the textarea. e.g. `maxlength`
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
<Actions>
|
|
30
|
-
<ActionTextEditable icon="icon-edit" value="This is a textarea" />
|
|
31
|
-
<ActionTextEditable icon="icon-edit" :disabled="true" value="This is a disabled textarea" />
|
|
32
|
-
<ActionTextEditable icon="icon-edit" title="Please edit the text" value="This is a textarea with title" />
|
|
33
|
-
</Actions>
|
|
34
|
-
```
|
|
35
|
-
</docs>
|
|
36
|
-
|
|
37
|
-
<template>
|
|
38
|
-
<li class="action" :class="{ 'action--disabled': disabled }">
|
|
39
|
-
<span class="action-text-editable"
|
|
40
|
-
@click="onClick">
|
|
41
|
-
<!-- icon -->
|
|
42
|
-
<span :class="[isIconUrl ? 'action-text-editable__icon--url' : icon]"
|
|
43
|
-
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
|
|
44
|
-
class="action-text-editable__icon" />
|
|
45
|
-
|
|
46
|
-
<!-- form and input -->
|
|
47
|
-
<form ref="form"
|
|
48
|
-
class="action-text-editable__form"
|
|
49
|
-
:disabled="disabled"
|
|
50
|
-
@submit.prevent="onSubmit">
|
|
51
|
-
<input :id="id" type="submit" class="action-text-editable__submit">
|
|
52
|
-
|
|
53
|
-
<!-- title -->
|
|
54
|
-
<strong v-if="title" class="action-text__title">
|
|
55
|
-
{{ title }}
|
|
56
|
-
</strong>
|
|
57
|
-
|
|
58
|
-
<textarea :disabled="disabled"
|
|
59
|
-
:value="value"
|
|
60
|
-
v-bind="$attrs"
|
|
61
|
-
:class="['action-text-editable__textarea',{ focusable: isFocusable }]"
|
|
62
|
-
@input="onInput" />
|
|
63
|
-
|
|
64
|
-
<!-- allow the custom font to inject a ::before
|
|
65
|
-
not possible on input[type=submit] -->
|
|
66
|
-
<label v-show="!disabled" :for="id" class="action-text-editable__label" />
|
|
67
|
-
</form>
|
|
68
|
-
</span>
|
|
69
|
-
</li>
|
|
70
|
-
</template>
|
|
71
|
-
|
|
72
|
-
<script>
|
|
73
|
-
import ActionTextMixin from '../../mixins/actionText'
|
|
74
|
-
import GenRandomId from '../../utils/GenRandomId'
|
|
75
|
-
|
|
76
|
-
export default {
|
|
77
|
-
name: 'ActionTextEditable',
|
|
78
|
-
|
|
79
|
-
mixins: [ActionTextMixin],
|
|
80
|
-
|
|
81
|
-
props: {
|
|
82
|
-
/**
|
|
83
|
-
* id attribute of the checkbox element
|
|
84
|
-
*/
|
|
85
|
-
id: {
|
|
86
|
-
type: String,
|
|
87
|
-
default: () => 'action-' + GenRandomId(),
|
|
88
|
-
validator: id => id.trim() !== '',
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* disabled state of the text area
|
|
92
|
-
*/
|
|
93
|
-
disabled: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: false,
|
|
96
|
-
},
|
|
97
|
-
/**
|
|
98
|
-
* value attribute of the input field
|
|
99
|
-
*/
|
|
100
|
-
value: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: '',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
computed: {
|
|
107
|
-
/**
|
|
108
|
-
* determines if the action is focusable
|
|
109
|
-
* @returns {boolean} is the action focusable ?
|
|
110
|
-
*/
|
|
111
|
-
isFocusable() {
|
|
112
|
-
return !this.disabled
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
methods: {
|
|
117
|
-
onInput(event) {
|
|
118
|
-
/**
|
|
119
|
-
* Emitted on input events of the text field
|
|
120
|
-
* @type {Event|Date}
|
|
121
|
-
*/
|
|
122
|
-
this.$emit('input', event)
|
|
123
|
-
/**
|
|
124
|
-
* Emitted when the inputs value changes
|
|
125
|
-
* @type {string|Date}
|
|
126
|
-
*/
|
|
127
|
-
this.$emit('update:value', event.target.value)
|
|
128
|
-
},
|
|
129
|
-
onSubmit(event) {
|
|
130
|
-
event.preventDefault()
|
|
131
|
-
event.stopPropagation()
|
|
132
|
-
if (!this.disabled) {
|
|
133
|
-
/**
|
|
134
|
-
* Emitted on submit of the input field
|
|
135
|
-
* @type {Event}
|
|
136
|
-
*/
|
|
137
|
-
this.$emit('submit', event)
|
|
138
|
-
} else {
|
|
139
|
-
// ignore submit
|
|
140
|
-
return false
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
}
|
|
145
|
-
</script>
|
|
146
|
-
|
|
147
|
-
<style lang="scss" scoped>
|
|
148
|
-
@import '../../fonts/scss/iconfont-vue';
|
|
149
|
-
@import '../../assets/inputs';
|
|
150
|
-
@import '../../assets/action';
|
|
151
|
-
@include action-active;
|
|
152
|
-
@include action--disabled;
|
|
153
|
-
|
|
154
|
-
$input-margin: 4px;
|
|
155
|
-
|
|
156
|
-
.action-text-editable {
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: flex-start;
|
|
159
|
-
|
|
160
|
-
width: 100%;
|
|
161
|
-
height: auto;
|
|
162
|
-
margin: 0;
|
|
163
|
-
padding: 0;
|
|
164
|
-
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
white-space: nowrap;
|
|
167
|
-
|
|
168
|
-
opacity: $opacity_normal;
|
|
169
|
-
color: var(--color-main-text);
|
|
170
|
-
border: 0;
|
|
171
|
-
border-radius: 0; // otherwise Safari will cut the border-radius area
|
|
172
|
-
background-color: transparent;
|
|
173
|
-
box-shadow: none;
|
|
174
|
-
|
|
175
|
-
font-weight: normal;
|
|
176
|
-
line-height: $clickable-area;
|
|
177
|
-
|
|
178
|
-
&:hover,
|
|
179
|
-
&:focus {
|
|
180
|
-
opacity: $opacity_full;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
& > span {
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
white-space: nowrap;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&__icon {
|
|
189
|
-
min-width: 0; /* Overwrite icons*/
|
|
190
|
-
min-height: 0;
|
|
191
|
-
/* Keep padding to define the width to
|
|
192
|
-
assure correct position of a possible text */
|
|
193
|
-
padding: #{$clickable-area / 2} 0 #{$clickable-area / 2} $clickable-area;
|
|
194
|
-
|
|
195
|
-
background-position: #{$icon-margin} center;
|
|
196
|
-
background-size: $icon-size;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Forms & text inputs
|
|
200
|
-
&__form {
|
|
201
|
-
display: flex;
|
|
202
|
-
flex: 1 1 auto;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
|
|
205
|
-
position: relative;
|
|
206
|
-
margin: $input-margin 0;
|
|
207
|
-
padding-right: $icon-margin;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&__submit {
|
|
211
|
-
position: absolute;
|
|
212
|
-
left: -10000px;
|
|
213
|
-
top: auto;
|
|
214
|
-
width: 1px;
|
|
215
|
-
height: 1px;
|
|
216
|
-
overflow: hidden;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
&__label {
|
|
220
|
-
display: flex;
|
|
221
|
-
align-items: center;
|
|
222
|
-
justify-content: center;
|
|
223
|
-
|
|
224
|
-
// bottom-right corner
|
|
225
|
-
position: absolute;
|
|
226
|
-
right: $icon-margin + 1;
|
|
227
|
-
bottom: 1px;
|
|
228
|
-
width: #{$clickable-area - $input-margin * 2};
|
|
229
|
-
height: #{$clickable-area - $input-margin * 2};
|
|
230
|
-
margin: 0;
|
|
231
|
-
padding: 7px 6px;
|
|
232
|
-
|
|
233
|
-
cursor: pointer;
|
|
234
|
-
|
|
235
|
-
opacity: $opacity_full;
|
|
236
|
-
color: var(--color-text-lighter);
|
|
237
|
-
border: 0;
|
|
238
|
-
border-radius: 50%;
|
|
239
|
-
/* Avoid background under border */
|
|
240
|
-
background-color: var(--color-main-background);
|
|
241
|
-
background-clip: padding-box;
|
|
242
|
-
|
|
243
|
-
font-size: $icon-size;
|
|
244
|
-
|
|
245
|
-
@include iconfont('confirm');
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* Inputs inside popover supports text, submit & reset */
|
|
249
|
-
&__textarea {
|
|
250
|
-
flex: 1 1 auto;
|
|
251
|
-
|
|
252
|
-
min-height: #{$clickable-area * 2 - $input-margin * 2}; /* twice the element margin-y */
|
|
253
|
-
max-height: #{$clickable-area * 3 - $input-margin * 2}; /* twice the element margin-y */
|
|
254
|
-
// block width widening
|
|
255
|
-
min-width: $clickable-area * 4;
|
|
256
|
-
width: 100% !important;
|
|
257
|
-
margin: 0;
|
|
258
|
-
|
|
259
|
-
// if disabled, change cursor
|
|
260
|
-
&:disabled {
|
|
261
|
-
cursor: default;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/* only show confirm borders if input is not focused */
|
|
265
|
-
&:not(:active):not(:hover):not(:focus) {
|
|
266
|
-
&:invalid {
|
|
267
|
-
& + .action-text-editable__label {
|
|
268
|
-
background-color: var(--color-error);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
&:not(:disabled) + .action-text-editable__label {
|
|
272
|
-
&:active,
|
|
273
|
-
&:hover,
|
|
274
|
-
&:focus {
|
|
275
|
-
background-color: var(--color-primary-element);
|
|
276
|
-
color: var(--color-primary-text);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
&:active,
|
|
281
|
-
&:hover,
|
|
282
|
-
&:focus {
|
|
283
|
-
&:not(:disabled) + .action-text-editable__label {
|
|
284
|
-
/* above previous input */
|
|
285
|
-
z-index: 2;
|
|
286
|
-
|
|
287
|
-
border-color: var(--color-primary-element);
|
|
288
|
-
border-left-color: transparent;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// if a form is the last of the list
|
|
295
|
-
// add the same bottomMargin as the right padding
|
|
296
|
-
// for visual balance
|
|
297
|
-
li:last-child > .action-text-editable {
|
|
298
|
-
margin-bottom: $icon-margin - $input-margin;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// same for first item
|
|
302
|
-
li:first-child > .action-text-editable {
|
|
303
|
-
margin-top: $icon-margin - $input-margin;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
</style>
|