@nextcloud/vue 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -5
- package/dist/Components/NcActionButton.cjs +16 -8
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +21 -13
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +22 -11
- package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +19 -7
- package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
- package/dist/Components/NcActionCaption.cjs +17 -11
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +14 -8
- package/dist/Components/NcActionCaption.mjs.map +1 -1
- package/dist/Components/NcActionCheckbox.cjs +26 -11
- package/dist/Components/NcActionCheckbox.cjs.map +1 -1
- package/dist/Components/NcActionCheckbox.mjs +26 -11
- package/dist/Components/NcActionCheckbox.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +7 -5
- package/dist/Components/NcActionInput.cjs.map +1 -1
- package/dist/Components/NcActionInput.mjs +11 -9
- package/dist/Components/NcActionInput.mjs.map +1 -1
- package/dist/Components/NcActionLink.cjs +14 -6
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +19 -11
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +29 -14
- package/dist/Components/NcActionRadio.cjs.map +1 -1
- package/dist/Components/NcActionRadio.mjs +26 -11
- package/dist/Components/NcActionRadio.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +14 -8
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +17 -11
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionSeparator.cjs +10 -10
- package/dist/Components/NcActionSeparator.cjs.map +1 -1
- package/dist/Components/NcActionSeparator.mjs +11 -11
- package/dist/Components/NcActionSeparator.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +15 -9
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +20 -14
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +100 -79
- package/dist/Components/NcActions.cjs.map +1 -1
- package/dist/Components/NcActions.mjs +103 -82
- package/dist/Components/NcActions.mjs.map +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +2 -2
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +39 -39
- package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +59 -58
- package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +3 -3
- package/dist/Components/NcAppSidebar.cjs.map +1 -1
- package/dist/Components/NcAppSidebar.mjs +3 -3
- package/dist/Components/NcAppSidebar.mjs.map +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcButton.cjs +6 -4
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +11 -9
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +3 -3
- package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +3 -3
- package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
- package/dist/Components/NcColorPicker.cjs +48 -31
- package/dist/Components/NcColorPicker.cjs.map +1 -1
- package/dist/Components/NcColorPicker.mjs +56 -38
- package/dist/Components/NcColorPicker.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +2 -2
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +17 -14
- package/dist/Components/NcDateTime.cjs.map +1 -1
- package/dist/Components/NcDateTime.mjs +18 -15
- package/dist/Components/NcDateTime.mjs.map +1 -1
- package/dist/Components/NcDateTimePicker.cjs +2 -2
- package/dist/Components/NcDateTimePicker.mjs +4 -4
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +1 -1
- package/dist/Components/NcModal.mjs +3 -3
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +5 -5
- package/dist/Components/NcRichContenteditable.cjs.map +1 -1
- package/dist/Components/NcRichContenteditable.mjs +5 -5
- package/dist/Components/NcRichContenteditable.mjs.map +1 -1
- package/dist/Components/NcRichText.cjs +1 -1
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +2 -2
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +5 -5
- package/dist/Components/NcTextArea.cjs.map +1 -1
- package/dist/Components/NcTextArea.mjs +4 -4
- package/dist/Components/NcTextArea.mjs.map +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Composables/useIsFullscreen.cjs +1 -2
- package/dist/Composables/useIsFullscreen.cjs.map +1 -1
- package/dist/Composables/useIsFullscreen.mjs +1 -2
- package/dist/Composables/useIsFullscreen.mjs.map +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/assets/{NcSettingsSelectGroup-0d38d76b.css → NcSettingsSelectGroup-6ddb63a6.css} +2 -2
- package/dist/assets/{index-d3702c91.css → index-00012a4c.css} +18 -18
- package/dist/assets/{index-8f52a20f.css → index-018895f7.css} +2 -2
- package/dist/assets/{index-6899d75b.css → index-30ca9574.css} +31 -30
- package/dist/assets/{index-2e31f707.css → index-3d1ccc15.css} +29 -29
- package/dist/assets/{index-441b6552.css → index-418d4e87.css} +2 -2
- package/dist/assets/{index-05760fea.css → index-4ba699a1.css} +12 -12
- package/dist/assets/{index-9ca89b81.css → index-51c1f2a9.css} +15 -11
- package/dist/assets/{index-24f6c355.css → index-542cf50a.css} +12 -12
- package/dist/assets/{index-dce4b705.css → index-5c74e333.css} +10 -10
- package/dist/assets/{index-802d2118.css → index-7fac55ed.css} +16 -16
- package/dist/assets/{index-e7c55791.css → index-9020d9ca.css} +67 -67
- package/dist/assets/{index-4ef32afd.css → index-a9d1ad5c.css} +26 -23
- package/dist/assets/{index-55600948.css → index-d1c0876d.css} +11 -11
- package/dist/assets/{index-fbc0b606.css → index-db846386.css} +10 -9
- package/dist/assets/{index-baf8711a.css → index-e0e6bab6.css} +12 -12
- package/dist/assets/{index-0e9b11c7.css → index-e9fce208.css} +16 -16
- package/dist/assets/{index-d812ed9e.css → index-f091e784.css} +43 -43
- package/dist/assets/{index-d9ae9479.css → index-ffa6d11c.css} +7 -7
- package/dist/chunks/GenColors-02173e2c.mjs +56 -0
- package/dist/chunks/GenColors-02173e2c.mjs.map +1 -0
- package/dist/chunks/GenColors-4314c256.cjs +55 -0
- package/dist/chunks/GenColors-4314c256.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-d248cb09.cjs → NcAppNavigationToggle-1301e882.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-d248cb09.cjs.map → NcAppNavigationToggle-1301e882.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-a031dce0.mjs → NcAppNavigationToggle-2574bba5.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-a031dce0.mjs.map → NcAppNavigationToggle-2574bba5.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-00bdeac7.cjs → NcInputConfirmCancel-9906b563.cjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-00bdeac7.cjs.map → NcInputConfirmCancel-9906b563.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-40ea7cd1.mjs → NcInputConfirmCancel-a612e6a3.mjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-40ea7cd1.mjs.map → NcInputConfirmCancel-a612e6a3.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-89373b11.cjs → NcRichText-9f77a9c6.cjs} +1 -1
- package/dist/chunks/{NcRichText-89373b11.cjs.map → NcRichText-9f77a9c6.cjs.map} +1 -1
- package/dist/chunks/{NcRichText-e2026b55.mjs → NcRichText-f5cfcd57.mjs} +1 -1
- package/dist/chunks/{NcRichText-e2026b55.mjs.map → NcRichText-f5cfcd57.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-b49652df.mjs → NcSettingsSelectGroup-091c0306.mjs} +12 -12
- package/dist/chunks/NcSettingsSelectGroup-091c0306.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSelectGroup-fad68876.cjs → NcSettingsSelectGroup-0f71fef4.cjs} +12 -12
- package/dist/chunks/NcSettingsSelectGroup-0f71fef4.cjs.map +1 -0
- package/dist/chunks/{ScopeComponent-a06864ef.mjs → ScopeComponent-3ea00dcd.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-a06864ef.mjs.map → ScopeComponent-3ea00dcd.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-a24eb082.cjs → ScopeComponent-df4b58b1.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-a24eb082.cjs.map → ScopeComponent-df4b58b1.cjs.map} +1 -1
- package/dist/chunks/{actionText-a64be267.mjs → actionText-60ff01d1.mjs} +3 -1
- package/dist/chunks/{actionText-54bc24a6.cjs.map → actionText-60ff01d1.mjs.map} +1 -1
- package/dist/chunks/{actionText-54bc24a6.cjs → actionText-9582810f.cjs} +3 -1
- package/dist/chunks/{actionText-a64be267.mjs.map → actionText-9582810f.cjs.map} +1 -1
- package/dist/chunks/{index-831524a1.mjs → index-cea13a24.mjs} +1 -1
- package/dist/chunks/{index-831524a1.mjs.map → index-cea13a24.mjs.map} +1 -1
- package/dist/chunks/{index-ac31691c.cjs → index-dc10fd2b.cjs} +1 -1
- package/dist/chunks/{index-ac31691c.cjs.map → index-dc10fd2b.cjs.map} +1 -1
- package/dist/chunks/{l10n-098e6a54.cjs → l10n-a12cdbfa.cjs} +1 -1
- package/dist/chunks/{l10n-098e6a54.cjs.map → l10n-a12cdbfa.cjs.map} +1 -1
- package/dist/chunks/{l10n-a929cdef.mjs → l10n-c603e589.mjs} +1 -1
- package/dist/chunks/{l10n-a929cdef.mjs.map → l10n-c603e589.mjs.map} +1 -1
- package/dist/chunks/l10n-e9ffbe5e.cjs +29 -0
- package/dist/chunks/l10n-e9ffbe5e.cjs.map +1 -0
- package/dist/chunks/l10n-ef44019c.mjs +31 -0
- package/dist/chunks/l10n-ef44019c.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-b79b7b92.cjs → referencePickerModal-aa5d3f47.cjs} +1 -1
- package/dist/chunks/{referencePickerModal-b79b7b92.cjs.map → referencePickerModal-aa5d3f47.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-c87eab17.mjs → referencePickerModal-c2f33569.mjs} +1 -1
- package/dist/chunks/{referencePickerModal-c87eab17.mjs.map → referencePickerModal-c2f33569.mjs.map} +1 -1
- package/dist/index.cjs +139 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +96 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunks/GenColors-38246c38.mjs +0 -46
- package/dist/chunks/GenColors-38246c38.mjs.map +0 -1
- package/dist/chunks/GenColors-eedcc70a.cjs +0 -45
- package/dist/chunks/GenColors-eedcc70a.cjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-b49652df.mjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-fad68876.cjs.map +0 -1
- package/dist/chunks/l10n-c3dbf018.cjs +0 -29
- package/dist/chunks/l10n-c3dbf018.cjs.map +0 -1
- package/dist/chunks/l10n-f51d3415.mjs +0 -31
- package/dist/chunks/l10n-f51d3415.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -15,37 +15,37 @@ import A from "./Components/NcAppContentDetails.mjs";
|
|
|
15
15
|
import g from "./Components/NcAppContentList.mjs";
|
|
16
16
|
import b from "./Components/NcAppNavigation.mjs";
|
|
17
17
|
import S from "./Components/NcAppNavigationCaption.mjs";
|
|
18
|
-
import
|
|
18
|
+
import x from "./Components/NcAppNavigationIconBullet.mjs";
|
|
19
19
|
import T from "./Components/NcAppNavigationItem.mjs";
|
|
20
|
-
import
|
|
20
|
+
import v from "./Components/NcAppNavigationNew.mjs";
|
|
21
21
|
import C from "./Components/NcAppNavigationNewItem.mjs";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
22
|
+
import I from "./Components/NcAppNavigationSettings.mjs";
|
|
23
|
+
import k from "./Components/NcAppNavigationSpacer.mjs";
|
|
24
|
+
import h from "./Components/NcAppSettingsDialog.mjs";
|
|
25
|
+
import B from "./Components/NcAppSettingsSection.mjs";
|
|
26
26
|
import P from "./Components/NcAppSidebar.mjs";
|
|
27
|
-
import
|
|
28
|
-
import { N as D } from "./chunks/index-
|
|
29
|
-
import { u as tt } from "./chunks/index-
|
|
30
|
-
import
|
|
27
|
+
import y from "./Components/NcAppSidebarTab.mjs";
|
|
28
|
+
import { N as D } from "./chunks/index-cea13a24.mjs";
|
|
29
|
+
import { u as tt } from "./chunks/index-cea13a24.mjs";
|
|
30
|
+
import O from "./Components/NcBreadcrumb.mjs";
|
|
31
31
|
import R from "./Components/NcBreadcrumbs.mjs";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
32
|
+
import j from "./Components/NcButton.mjs";
|
|
33
|
+
import E from "./Components/NcCheckboxRadioSwitch.mjs";
|
|
34
|
+
import M from "./Components/NcColorPicker.mjs";
|
|
35
|
+
import _ from "./Components/NcContent.mjs";
|
|
36
|
+
import L from "./Components/NcCounterBubble.mjs";
|
|
37
|
+
import F from "./Components/NcDashboardWidget.mjs";
|
|
38
|
+
import w from "./Components/NcDashboardWidgetItem.mjs";
|
|
39
39
|
import z from "./Components/NcDateTime.mjs";
|
|
40
40
|
import G from "./Components/NcDateTimePicker.mjs";
|
|
41
41
|
import W from "./Components/NcDateTimePickerNative.mjs";
|
|
42
42
|
import H from "./Components/NcDialog.mjs";
|
|
43
43
|
import V from "./Components/NcDialogButton.mjs";
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import { N as
|
|
44
|
+
import K from "./Components/NcEmojiPicker.mjs";
|
|
45
|
+
import U from "./Components/NcEmptyContent.mjs";
|
|
46
|
+
import $ from "./Components/NcGuestContent.mjs";
|
|
47
|
+
import q from "./Components/NcHeaderMenu.mjs";
|
|
48
|
+
import { N as J } from "./chunks/index-20a9ace9.mjs";
|
|
49
49
|
import Q from "./Components/NcIconSvgWrapper.mjs";
|
|
50
50
|
import X from "./Components/NcListItem.mjs";
|
|
51
51
|
import Y from "./Components/NcListItemIcon.mjs";
|
|
@@ -59,12 +59,12 @@ import eo from "./Components/NcRelatedResourcesPanel.mjs";
|
|
|
59
59
|
import { N as po } from "./chunks/index-5f2a5f57.mjs";
|
|
60
60
|
import { r as mt } from "./chunks/index-5f2a5f57.mjs";
|
|
61
61
|
import co, { NcAutoCompleteResult as fo } from "./Components/NcRichContenteditable.mjs";
|
|
62
|
-
import { N as no } from "./chunks/NcRichText-
|
|
63
|
-
import "./chunks/referencePickerModal-
|
|
62
|
+
import { N as no } from "./chunks/NcRichText-f5cfcd57.mjs";
|
|
63
|
+
import "./chunks/referencePickerModal-c2f33569.mjs";
|
|
64
64
|
import "@nextcloud/axios";
|
|
65
65
|
import "@nextcloud/router";
|
|
66
66
|
import No from "./Components/NcSelect.mjs";
|
|
67
|
-
import "./chunks/l10n-
|
|
67
|
+
import "./chunks/l10n-ef44019c.mjs";
|
|
68
68
|
import ao from "./Components/NcTextField.mjs";
|
|
69
69
|
import "@nextcloud/event-bus";
|
|
70
70
|
import "vue";
|
|
@@ -72,20 +72,22 @@ import so from "./Components/NcSavingIndicatorIcon.mjs";
|
|
|
72
72
|
import lo from "./Components/NcSelectTags.mjs";
|
|
73
73
|
import uo from "./Components/NcSettingsInputText.mjs";
|
|
74
74
|
import Ao from "./Components/NcSettingsSection.mjs";
|
|
75
|
-
import { N as go } from "./chunks/NcSettingsSelectGroup-
|
|
75
|
+
import { N as go } from "./chunks/NcSettingsSelectGroup-091c0306.mjs";
|
|
76
76
|
import bo from "./Components/NcTimezonePicker.mjs";
|
|
77
77
|
import So from "./Components/NcUserBubble.mjs";
|
|
78
|
-
import
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
78
|
+
import xo from "./Components/NcTextArea.mjs";
|
|
79
|
+
import { isFullscreenState as pt, useIsFullscreen as ct } from "./Composables/useIsFullscreen.mjs";
|
|
80
|
+
import { MOBILE_BREAKPOINT as nt, isMobileState as Nt, useIsMobile as at } from "./Composables/useIsMobile.mjs";
|
|
81
|
+
import { emojiAddRecent as lt, emojiSearch as ut } from "./Functions/emoji.mjs";
|
|
82
|
+
import { default as At } from "./Functions/usernameToColor.mjs";
|
|
81
83
|
import { directive as To } from "./Directives/Focus.mjs";
|
|
82
|
-
import { directive as
|
|
84
|
+
import { directive as vo } from "./Directives/Linkify.mjs";
|
|
83
85
|
import "./Directives/Tooltip.mjs";
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
86
|
+
import { default as bt } from "./Mixins/clickOutsideOptions.mjs";
|
|
87
|
+
import { default as xt } from "./Mixins/isFullscreen.mjs";
|
|
88
|
+
import { default as vt } from "./Mixins/isMobile.mjs";
|
|
87
89
|
import { VTooltip as Co } from "floating-vue";
|
|
88
|
-
import { VTooltip as
|
|
90
|
+
import { VTooltip as It } from "floating-vue";
|
|
89
91
|
/**
|
|
90
92
|
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
91
93
|
*
|
|
@@ -107,7 +109,7 @@ import { VTooltip as gt } from "floating-vue";
|
|
|
107
109
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
108
110
|
*
|
|
109
111
|
*/
|
|
110
|
-
const
|
|
112
|
+
const Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
111
113
|
__proto__: null,
|
|
112
114
|
NcActionButton: i,
|
|
113
115
|
NcActionButtonGroup: m,
|
|
@@ -126,37 +128,37 @@ const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
126
128
|
NcAppContentList: g,
|
|
127
129
|
NcAppNavigation: b,
|
|
128
130
|
NcAppNavigationCaption: S,
|
|
129
|
-
NcAppNavigationIconBullet:
|
|
131
|
+
NcAppNavigationIconBullet: x,
|
|
130
132
|
NcAppNavigationItem: T,
|
|
131
|
-
NcAppNavigationNew:
|
|
133
|
+
NcAppNavigationNew: v,
|
|
132
134
|
NcAppNavigationNewItem: C,
|
|
133
|
-
NcAppNavigationSettings:
|
|
134
|
-
NcAppNavigationSpacer:
|
|
135
|
-
NcAppSettingsDialog:
|
|
136
|
-
NcAppSettingsSection:
|
|
135
|
+
NcAppNavigationSettings: I,
|
|
136
|
+
NcAppNavigationSpacer: k,
|
|
137
|
+
NcAppSettingsDialog: h,
|
|
138
|
+
NcAppSettingsSection: B,
|
|
137
139
|
NcAppSidebar: P,
|
|
138
|
-
NcAppSidebarTab:
|
|
140
|
+
NcAppSidebarTab: y,
|
|
139
141
|
NcAutoCompleteResult: fo,
|
|
140
142
|
NcAvatar: D,
|
|
141
|
-
NcBreadcrumb:
|
|
143
|
+
NcBreadcrumb: O,
|
|
142
144
|
NcBreadcrumbs: R,
|
|
143
|
-
NcButton:
|
|
144
|
-
NcCheckboxRadioSwitch:
|
|
145
|
-
NcColorPicker:
|
|
146
|
-
NcContent:
|
|
147
|
-
NcCounterBubble:
|
|
148
|
-
NcDashboardWidget:
|
|
149
|
-
NcDashboardWidgetItem:
|
|
145
|
+
NcButton: j,
|
|
146
|
+
NcCheckboxRadioSwitch: E,
|
|
147
|
+
NcColorPicker: M,
|
|
148
|
+
NcContent: _,
|
|
149
|
+
NcCounterBubble: L,
|
|
150
|
+
NcDashboardWidget: F,
|
|
151
|
+
NcDashboardWidgetItem: w,
|
|
150
152
|
NcDateTime: z,
|
|
151
153
|
NcDateTimePicker: G,
|
|
152
154
|
NcDateTimePickerNative: W,
|
|
153
155
|
NcDialog: H,
|
|
154
156
|
NcDialogButton: V,
|
|
155
|
-
NcEmojiPicker:
|
|
156
|
-
NcEmptyContent:
|
|
157
|
-
NcGuestContent:
|
|
158
|
-
NcHeaderMenu:
|
|
159
|
-
NcHighlight:
|
|
157
|
+
NcEmojiPicker: K,
|
|
158
|
+
NcEmptyContent: U,
|
|
159
|
+
NcGuestContent: $,
|
|
160
|
+
NcHeaderMenu: q,
|
|
161
|
+
NcHighlight: J,
|
|
160
162
|
NcIconSvgWrapper: Q,
|
|
161
163
|
NcListItem: X,
|
|
162
164
|
NcListItemIcon: Y,
|
|
@@ -176,7 +178,7 @@ const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
176
178
|
NcSettingsInputText: uo,
|
|
177
179
|
NcSettingsSection: Ao,
|
|
178
180
|
NcSettingsSelectGroup: go,
|
|
179
|
-
NcTextArea:
|
|
181
|
+
NcTextArea: xo,
|
|
180
182
|
NcTextField: ao,
|
|
181
183
|
NcTimezonePicker: bo,
|
|
182
184
|
NcUserBubble: So
|
|
@@ -224,23 +226,24 @@ const Yr = (o) => o.type === "click" || o.type === "keydown" && o.key === "Enter
|
|
|
224
226
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
225
227
|
*
|
|
226
228
|
*/
|
|
227
|
-
const
|
|
229
|
+
const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
228
230
|
__proto__: null,
|
|
229
231
|
Focus: To,
|
|
230
|
-
Linkify:
|
|
232
|
+
Linkify: vo,
|
|
231
233
|
Tooltip: Co
|
|
232
234
|
}, Symbol.toStringTag, { value: "Module" })), Zr = {
|
|
233
235
|
install(o) {
|
|
234
|
-
Object.entries(
|
|
236
|
+
Object.entries(Io).forEach(([t, r]) => {
|
|
235
237
|
o.component(r.name || t, r);
|
|
236
|
-
}), Object.entries(
|
|
238
|
+
}), Object.entries(ko).forEach(([t, r]) => {
|
|
237
239
|
o.directive(t, r);
|
|
238
240
|
});
|
|
239
241
|
}
|
|
240
242
|
};
|
|
241
243
|
export {
|
|
242
244
|
To as Focus,
|
|
243
|
-
|
|
245
|
+
vo as Linkify,
|
|
246
|
+
nt as MOBILE_BREAKPOINT,
|
|
244
247
|
i as NcActionButton,
|
|
245
248
|
m as NcActionButtonGroup,
|
|
246
249
|
e as NcActionCaption,
|
|
@@ -258,37 +261,37 @@ export {
|
|
|
258
261
|
g as NcAppContentList,
|
|
259
262
|
b as NcAppNavigation,
|
|
260
263
|
S as NcAppNavigationCaption,
|
|
261
|
-
|
|
264
|
+
x as NcAppNavigationIconBullet,
|
|
262
265
|
T as NcAppNavigationItem,
|
|
263
|
-
|
|
266
|
+
v as NcAppNavigationNew,
|
|
264
267
|
C as NcAppNavigationNewItem,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
I as NcAppNavigationSettings,
|
|
269
|
+
k as NcAppNavigationSpacer,
|
|
270
|
+
h as NcAppSettingsDialog,
|
|
271
|
+
B as NcAppSettingsSection,
|
|
269
272
|
P as NcAppSidebar,
|
|
270
|
-
|
|
273
|
+
y as NcAppSidebarTab,
|
|
271
274
|
fo as NcAutoCompleteResult,
|
|
272
275
|
D as NcAvatar,
|
|
273
|
-
|
|
276
|
+
O as NcBreadcrumb,
|
|
274
277
|
R as NcBreadcrumbs,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
278
|
+
j as NcButton,
|
|
279
|
+
E as NcCheckboxRadioSwitch,
|
|
280
|
+
M as NcColorPicker,
|
|
281
|
+
_ as NcContent,
|
|
282
|
+
L as NcCounterBubble,
|
|
283
|
+
F as NcDashboardWidget,
|
|
284
|
+
w as NcDashboardWidgetItem,
|
|
282
285
|
z as NcDateTime,
|
|
283
286
|
G as NcDateTimePicker,
|
|
284
287
|
W as NcDateTimePickerNative,
|
|
285
288
|
H as NcDialog,
|
|
286
289
|
V as NcDialogButton,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
K as NcEmojiPicker,
|
|
291
|
+
U as NcEmptyContent,
|
|
292
|
+
$ as NcGuestContent,
|
|
293
|
+
q as NcHeaderMenu,
|
|
294
|
+
J as NcHighlight,
|
|
292
295
|
Q as NcIconSvgWrapper,
|
|
293
296
|
X as NcListItem,
|
|
294
297
|
Y as NcListItemIcon,
|
|
@@ -308,19 +311,23 @@ export {
|
|
|
308
311
|
uo as NcSettingsInputText,
|
|
309
312
|
Ao as NcSettingsSection,
|
|
310
313
|
go as NcSettingsSelectGroup,
|
|
311
|
-
|
|
314
|
+
xo as NcTextArea,
|
|
312
315
|
ao as NcTextField,
|
|
313
316
|
bo as NcTimezonePicker,
|
|
314
317
|
So as NcUserBubble,
|
|
315
318
|
Zr as NextcloudVuePlugin,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
It as Tooltip,
|
|
320
|
+
bt as clickOutsideOptions,
|
|
321
|
+
lt as emojiAddRecent,
|
|
322
|
+
ut as emojiSearch,
|
|
320
323
|
Yr as isA11yActivation,
|
|
321
|
-
|
|
322
|
-
|
|
324
|
+
xt as isFullscreen,
|
|
325
|
+
pt as isFullscreenState,
|
|
326
|
+
vt as isMobile,
|
|
327
|
+
Nt as isMobileState,
|
|
323
328
|
mt as richEditor,
|
|
329
|
+
ct as useIsFullscreen,
|
|
330
|
+
at as useIsMobile,
|
|
324
331
|
tt as userStatus,
|
|
325
|
-
|
|
332
|
+
At as usernameToColor
|
|
326
333
|
};
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/components/index.js","../src/functions/a11y/index.ts","../src/directives/index.js","../src/plugin.ts"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as NcActionButton } from './NcActionButton/index.js'\nexport { default as NcActionButtonGroup } from './NcActionButtonGroup/index.js'\nexport { default as NcActionCaption } from './NcActionCaption/index.js'\nexport { default as NcActionCheckbox } from './NcActionCheckbox/index.js'\nexport { default as NcActionInput } from './NcActionInput/index.js'\nexport { default as NcActionLink } from './NcActionLink/index.js'\nexport { default as NcActionRadio } from './NcActionRadio/index.js'\nexport { default as NcActionRouter } from './NcActionRouter/index.js'\nexport { default as NcActions } from './NcActions/index.js'\nexport { default as NcActionSeparator } from './NcActionSeparator/index.js'\nexport { default as NcActionText } from './NcActionText/index.js'\nexport { default as NcActionTextEditable } from './NcActionTextEditable/index.js'\nexport { default as NcAppContent } from './NcAppContent/index.js'\nexport { default as NcAppContentDetails } from './NcAppContentDetails/index.js'\nexport { default as NcAppContentList } from './NcAppContentList/index.js'\nexport { default as NcAppNavigation } from './NcAppNavigation/index.js'\nexport { default as NcAppNavigationCaption } from './NcAppNavigationCaption/index.js'\nexport { default as NcAppNavigationIconBullet } from './NcAppNavigationIconBullet/index.js'\nexport { default as NcAppNavigationItem } from './NcAppNavigationItem/index.js'\nexport { default as NcAppNavigationNew } from './NcAppNavigationNew/index.js'\nexport { default as NcAppNavigationNewItem } from './NcAppNavigationNewItem/index.js'\nexport { default as NcAppNavigationSettings } from './NcAppNavigationSettings/index.js'\nexport { default as NcAppNavigationSpacer } from './NcAppNavigationSpacer/index.js'\nexport { default as NcAppSettingsDialog } from './NcAppSettingsDialog/index.js'\nexport { default as NcAppSettingsSection } from './NcAppSettingsSection/index.js'\nexport { default as NcAppSidebar } from './NcAppSidebar/index.js'\nexport { default as NcAppSidebarTab } from './NcAppSidebarTab/index.js'\nexport { default as NcAvatar } from './NcAvatar/index.js'\nexport { default as NcBreadcrumb } from './NcBreadcrumb/index.js'\nexport { default as NcBreadcrumbs } from './NcBreadcrumbs/index.js'\nexport { default as NcButton } from './NcButton/index.js'\nexport { default as NcCheckboxRadioSwitch } from './NcCheckboxRadioSwitch/index.js'\nexport { default as NcColorPicker } from './NcColorPicker/index.js'\nexport { default as NcContent } from './NcContent/index.js'\nexport { default as NcCounterBubble } from './NcCounterBubble/index.js'\nexport { default as NcDashboardWidget } from './NcDashboardWidget/index.js'\nexport { default as NcDashboardWidgetItem } from './NcDashboardWidgetItem/index.js'\nexport { default as NcDateTime } from './NcDateTime/index.js'\nexport { default as NcDateTimePicker } from './NcDateTimePicker/index.js'\nexport { default as NcDateTimePickerNative } from './NcDateTimePickerNative/index.js'\nexport { default as NcDialog } from './NcDialog/index.js'\nexport { default as NcDialogButton } from './NcDialogButton/index.js'\n// Not exported on purpose\n// export { default as NcEllipsisedOption } from './NcEllipsisedOption/index.js'\nexport { default as NcEmojiPicker } from './NcEmojiPicker/index.js'\nexport { default as NcEmptyContent } from './NcEmptyContent/index.js'\nexport { default as NcGuestContent } from './NcGuestContent/index.js'\nexport { default as NcHeaderMenu } from './NcHeaderMenu/index.js'\nexport { default as NcHighlight } from './NcHighlight/index.js'\nexport { default as NcIconSvgWrapper } from './NcIconSvgWrapper/index.js'\n// Not exported on purpose as it is only meant as a base component\n// export { default as NcInputField } from './NcInputField/index.js'\nexport { default as NcListItem } from './NcListItem/index.js'\nexport { default as NcListItemIcon } from './NcListItemIcon/index.js'\nexport { default as NcLoadingIcon } from './NcLoadingIcon/index.js'\nexport { default as NcModal } from './NcModal/index.js'\nexport { default as NcNoteCard } from './NcNoteCard/index.js'\nexport { default as NcPasswordField } from './NcPasswordField/index.js'\nexport { default as NcPopover } from './NcPopover/index.js'\nexport { default as NcProgressBar } from './NcProgressBar/index.js'\nexport { default as NcRelatedResourcesPanel } from './NcRelatedResourcesPanel/index.js'\nexport { default as NcRichContenteditable, NcAutoCompleteResult, NcMentionBubble } from './NcRichContenteditable/index.js'\nexport { default as NcRichText } from './NcRichText/index.js'\nexport { default as NcSavingIndicatorIcon } from './NcSavingIndicatorIcon/index.js'\nexport { default as NcSelect } from './NcSelect/index.js'\nexport { default as NcSelectTags } from './NcSelectTags/index.js'\nexport { default as NcSettingsInputText } from './NcSettingsInputText/index.js'\nexport { default as NcSettingsSection } from './NcSettingsSection/index.js'\nexport { default as NcSettingsSelectGroup } from './NcSettingsSelectGroup/index.js'\nexport { default as NcTextField } from './NcTextField/index.js'\nexport { default as NcTimezonePicker } from './NcTimezonePicker/index.js'\nexport { default as NcUserBubble } from './NcUserBubble/index.js'\nexport { default as NcTextArea } from './NcTextArea/index.js'\n","/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Return true if the DOM event is an accessible mouse or keyboard element activation, false otherwise\n *\n * @param {Event} event DOM event\n *\n * @return {boolean}\n */\nexport const isA11yActivation = (event: Event) => {\n\tif (event.type === 'click') {\n\t\treturn true\n\t}\n\tif (event.type === 'keydown' && (event as KeyboardEvent).key === 'Enter') {\n\t\treturn true\n\t}\n\treturn false\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as Focus } from './Focus/index.js'\nexport { default as Linkify } from './Linkify/index.js'\nexport { default as Tooltip } from './Tooltip/index.js'\n","import type { DefineComponent, Directive, PluginObject } from 'vue'\n\nimport * as NcComponents from './components/index.js'\nimport * as NcDirectives from './directives/index.js'\n\n/**\n * Install all Nextcloud Vue components and directives globally\n * @example\n * ```js\n * import { NextcloudVuePlugin } from '@nextcloud/vue'\n * import Vue from 'vue'\n *\n * // ...\n *\n * Vue.use(NextcloudVuePlugin)\n * new Vue({\n * // options\n * })\n * ```\n */\nexport const NextcloudVuePlugin: PluginObject<never> = {\n\tinstall(Vue) {\n\t\t// Install components\n\t\tObject.entries(NcComponents as { [key: string]: DefineComponent }).forEach(([name, component]) => {\n\t\t\tVue.component(component.name || name, component)\n\t\t})\n\n\t\t// Install directives\n\t\tObject.entries(NcDirectives as { [key: string]: Directive }).forEach(([name, directive]) => {\n\t\t\tVue.directive(name, directive)\n\t\t})\n\t},\n}\n"],"names":["isA11yActivation","event","NextcloudVuePlugin","Vue","NcComponents","name","component","NcDirectives","directive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Ba,MAAAA,KAAmB,CAACC,MAC5BA,EAAM,SAAS,WAGfA,EAAM,SAAS,aAAcA,EAAwB,QAAQ;ACjClE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;8CCoBaC,KAA0C;AAAA,EACtD,QAAQC,GAAK;AAEL,WAAA,QAAQC,EAAkD,EAAE,QAAQ,CAAC,CAACC,GAAMC,CAAS,MAAM;AACjG,MAAAH,EAAI,UAAUG,EAAU,QAAQD,GAAMC,CAAS;AAAA,IAAA,CAC/C,GAGM,OAAA,QAAQC,EAA4C,EAAE,QAAQ,CAAC,CAACF,GAAMG,CAAS,MAAM;AACvF,MAAAL,EAAA,UAAUE,GAAMG,CAAS;AAAA,IAAA,CAC7B;AAAA,EACF;AACD;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/components/index.js","../src/functions/a11y/index.ts","../src/directives/index.js","../src/plugin.ts"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as NcActionButton } from './NcActionButton/index.js'\nexport { default as NcActionButtonGroup } from './NcActionButtonGroup/index.js'\nexport { default as NcActionCaption } from './NcActionCaption/index.js'\nexport { default as NcActionCheckbox } from './NcActionCheckbox/index.js'\nexport { default as NcActionInput } from './NcActionInput/index.js'\nexport { default as NcActionLink } from './NcActionLink/index.js'\nexport { default as NcActionRadio } from './NcActionRadio/index.js'\nexport { default as NcActionRouter } from './NcActionRouter/index.js'\nexport { default as NcActions } from './NcActions/index.js'\nexport { default as NcActionSeparator } from './NcActionSeparator/index.js'\nexport { default as NcActionText } from './NcActionText/index.js'\nexport { default as NcActionTextEditable } from './NcActionTextEditable/index.js'\nexport { default as NcAppContent } from './NcAppContent/index.js'\nexport { default as NcAppContentDetails } from './NcAppContentDetails/index.js'\nexport { default as NcAppContentList } from './NcAppContentList/index.js'\nexport { default as NcAppNavigation } from './NcAppNavigation/index.js'\nexport { default as NcAppNavigationCaption } from './NcAppNavigationCaption/index.js'\nexport { default as NcAppNavigationIconBullet } from './NcAppNavigationIconBullet/index.js'\nexport { default as NcAppNavigationItem } from './NcAppNavigationItem/index.js'\nexport { default as NcAppNavigationNew } from './NcAppNavigationNew/index.js'\nexport { default as NcAppNavigationNewItem } from './NcAppNavigationNewItem/index.js'\nexport { default as NcAppNavigationSettings } from './NcAppNavigationSettings/index.js'\nexport { default as NcAppNavigationSpacer } from './NcAppNavigationSpacer/index.js'\nexport { default as NcAppSettingsDialog } from './NcAppSettingsDialog/index.js'\nexport { default as NcAppSettingsSection } from './NcAppSettingsSection/index.js'\nexport { default as NcAppSidebar } from './NcAppSidebar/index.js'\nexport { default as NcAppSidebarTab } from './NcAppSidebarTab/index.js'\nexport { default as NcAvatar } from './NcAvatar/index.js'\nexport { default as NcBreadcrumb } from './NcBreadcrumb/index.js'\nexport { default as NcBreadcrumbs } from './NcBreadcrumbs/index.js'\nexport { default as NcButton } from './NcButton/index.js'\nexport { default as NcCheckboxRadioSwitch } from './NcCheckboxRadioSwitch/index.js'\nexport { default as NcColorPicker } from './NcColorPicker/index.js'\nexport { default as NcContent } from './NcContent/index.js'\nexport { default as NcCounterBubble } from './NcCounterBubble/index.js'\nexport { default as NcDashboardWidget } from './NcDashboardWidget/index.js'\nexport { default as NcDashboardWidgetItem } from './NcDashboardWidgetItem/index.js'\nexport { default as NcDateTime } from './NcDateTime/index.js'\nexport { default as NcDateTimePicker } from './NcDateTimePicker/index.js'\nexport { default as NcDateTimePickerNative } from './NcDateTimePickerNative/index.js'\nexport { default as NcDialog } from './NcDialog/index.js'\nexport { default as NcDialogButton } from './NcDialogButton/index.js'\n// Not exported on purpose\n// export { default as NcEllipsisedOption } from './NcEllipsisedOption/index.js'\nexport { default as NcEmojiPicker } from './NcEmojiPicker/index.js'\nexport { default as NcEmptyContent } from './NcEmptyContent/index.js'\nexport { default as NcGuestContent } from './NcGuestContent/index.js'\nexport { default as NcHeaderMenu } from './NcHeaderMenu/index.js'\nexport { default as NcHighlight } from './NcHighlight/index.js'\nexport { default as NcIconSvgWrapper } from './NcIconSvgWrapper/index.js'\n// Not exported on purpose as it is only meant as a base component\n// export { default as NcInputField } from './NcInputField/index.js'\nexport { default as NcListItem } from './NcListItem/index.js'\nexport { default as NcListItemIcon } from './NcListItemIcon/index.js'\nexport { default as NcLoadingIcon } from './NcLoadingIcon/index.js'\nexport { default as NcModal } from './NcModal/index.js'\nexport { default as NcNoteCard } from './NcNoteCard/index.js'\nexport { default as NcPasswordField } from './NcPasswordField/index.js'\nexport { default as NcPopover } from './NcPopover/index.js'\nexport { default as NcProgressBar } from './NcProgressBar/index.js'\nexport { default as NcRelatedResourcesPanel } from './NcRelatedResourcesPanel/index.js'\nexport { default as NcRichContenteditable, NcAutoCompleteResult, NcMentionBubble } from './NcRichContenteditable/index.js'\nexport { default as NcRichText } from './NcRichText/index.js'\nexport { default as NcSavingIndicatorIcon } from './NcSavingIndicatorIcon/index.js'\nexport { default as NcSelect } from './NcSelect/index.js'\nexport { default as NcSelectTags } from './NcSelectTags/index.js'\nexport { default as NcSettingsInputText } from './NcSettingsInputText/index.js'\nexport { default as NcSettingsSection } from './NcSettingsSection/index.js'\nexport { default as NcSettingsSelectGroup } from './NcSettingsSelectGroup/index.js'\nexport { default as NcTextField } from './NcTextField/index.js'\nexport { default as NcTimezonePicker } from './NcTimezonePicker/index.js'\nexport { default as NcUserBubble } from './NcUserBubble/index.js'\nexport { default as NcTextArea } from './NcTextArea/index.js'\n","/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Return true if the DOM event is an accessible mouse or keyboard element activation, false otherwise\n *\n * @param {Event} event DOM event\n *\n * @return {boolean}\n */\nexport const isA11yActivation = (event: Event) => {\n\tif (event.type === 'click') {\n\t\treturn true\n\t}\n\tif (event.type === 'keydown' && (event as KeyboardEvent).key === 'Enter') {\n\t\treturn true\n\t}\n\treturn false\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport { default as Focus } from './Focus/index.js'\nexport { default as Linkify } from './Linkify/index.js'\nexport { default as Tooltip } from './Tooltip/index.js'\n","import type { DefineComponent, Directive, PluginObject } from 'vue'\n\nimport * as NcComponents from './components/index.js'\nimport * as NcDirectives from './directives/index.js'\n\n/**\n * Install all Nextcloud Vue components and directives globally\n * @example\n * ```js\n * import { NextcloudVuePlugin } from '@nextcloud/vue'\n * import Vue from 'vue'\n *\n * // ...\n *\n * Vue.use(NextcloudVuePlugin)\n * new Vue({\n * // options\n * })\n * ```\n */\nexport const NextcloudVuePlugin: PluginObject<never> = {\n\tinstall(Vue) {\n\t\t// Install components\n\t\tObject.entries(NcComponents as { [key: string]: DefineComponent }).forEach(([name, component]) => {\n\t\t\tVue.component(component.name || name, component)\n\t\t})\n\n\t\t// Install directives\n\t\tObject.entries(NcDirectives as { [key: string]: Directive }).forEach(([name, directive]) => {\n\t\t\tVue.directive(name, directive)\n\t\t})\n\t},\n}\n"],"names":["isA11yActivation","event","NextcloudVuePlugin","Vue","NcComponents","name","component","NcDirectives","directive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Ba,MAAAA,KAAmB,CAACC,MAC5BA,EAAM,SAAS,WAGfA,EAAM,SAAS,aAAcA,EAAwB,QAAQ;ACjClE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;8CCoBaC,KAA0C;AAAA,EACtD,QAAQC,GAAK;AAEL,WAAA,QAAQC,EAAkD,EAAE,QAAQ,CAAC,CAACC,GAAMC,CAAS,MAAM;AACjG,MAAAH,EAAI,UAAUG,EAAU,QAAQD,GAAMC,CAAS;AAAA,IAAA,CAC/C,GAGM,OAAA,QAAQC,EAA4C,EAAE,QAAQ,CAAC,CAACF,GAAMG,CAAS,MAAM;AACvF,MAAAL,EAAA,UAAUE,GAAMG,CAAS;AAAA,IAAA,CAC7B;AAAA,EACF;AACD;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextcloud/vue",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Nextcloud vue components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuejs",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@vueuse/components": "^10.0.2",
|
|
76
76
|
"@vueuse/core": "^10.1.2",
|
|
77
77
|
"clone": "^2.1.2",
|
|
78
|
-
"debounce": "
|
|
78
|
+
"debounce": "2.0.0",
|
|
79
79
|
"dompurify": "^3.0.5",
|
|
80
80
|
"emoji-mart-vue-fast": "^15.0.0",
|
|
81
81
|
"escape-html": "^1.0.3",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license AGPL-3.0-or-later
|
|
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
|
-
function a(n, t, e) {
|
|
23
|
-
this.r = n, this.g = t, this.b = e;
|
|
24
|
-
}
|
|
25
|
-
function f(n, t) {
|
|
26
|
-
const e = new Array(3);
|
|
27
|
-
return e[0] = (t[1].r - t[0].r) / n, e[1] = (t[1].g - t[0].g) / n, e[2] = (t[1].b - t[0].b) / n, e;
|
|
28
|
-
}
|
|
29
|
-
function u(n, t, e) {
|
|
30
|
-
const o = [];
|
|
31
|
-
o.push(t);
|
|
32
|
-
const r = f(n, [t, e]);
|
|
33
|
-
for (let c = 1; c < n; c++) {
|
|
34
|
-
const i = parseInt(t.r + r[0] * c, 10), l = parseInt(t.g + r[1] * c, 10), b = parseInt(t.b + r[2] * c, 10);
|
|
35
|
-
o.push(new a(i, l, b));
|
|
36
|
-
}
|
|
37
|
-
return o;
|
|
38
|
-
}
|
|
39
|
-
function p(n) {
|
|
40
|
-
n || (n = 6);
|
|
41
|
-
const t = new a(182, 70, 157), e = new a(221, 203, 85), o = new a(0, 130, 201), r = u(n, t, e), c = u(n, e, o), i = u(n, o, t);
|
|
42
|
-
return r.concat(c).concat(i);
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
p as G
|
|
46
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenColors-38246c38.mjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n */\n\n/**\n * @param {number} r The red value\n * @param {number} g The green value\n * @param {number} b The blue value\n */\nfunction Color(r, g, b) {\n\tthis.r = r\n\tthis.g = g\n\tthis.b = b\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {string} color1 The first color\n * @param {string} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = parseInt(color1.r + step[0] * i, 10)\n\t\tconst g = parseInt(color1.g + step[1] * i, 10)\n\t\tconst b = parseInt(color1.b + step[2] * i, 10)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nfunction GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tconst red = new Color(182, 70, 157)\n\tconst yellow = new Color(221, 203, 85)\n\tconst blue = new Color(0, 130, 201) // Nextcloud blue\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n\nexport default GenColors\n"],"names":["Color","r","g","b","stepCalc","steps","ends","step","mixPalette","color1","color2","palette","i","GenColors","red","yellow","blue","palette1","palette2","palette3"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA,SAASA,EAAMC,GAAGC,GAAGC,GAAG;AACvB,OAAK,IAAIF,GACT,KAAK,IAAIC,GACT,KAAK,IAAIC;AACV;AASA,SAASC,EAASC,GAAOC,GAAM;AAC9B,QAAMC,IAAO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
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
|
4
|
-
*
|
|
5
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
6
|
-
*
|
|
7
|
-
* @license AGPL-3.0-or-later
|
|
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
|
-
function a(n, t, e) {
|
|
24
|
-
this.r = n, this.g = t, this.b = e;
|
|
25
|
-
}
|
|
26
|
-
function b(n, t) {
|
|
27
|
-
const e = new Array(3);
|
|
28
|
-
return e[0] = (t[1].r - t[0].r) / n, e[1] = (t[1].g - t[0].g) / n, e[2] = (t[1].b - t[0].b) / n, e;
|
|
29
|
-
}
|
|
30
|
-
function u(n, t, e) {
|
|
31
|
-
const o = [];
|
|
32
|
-
o.push(t);
|
|
33
|
-
const r = b(n, [t, e]);
|
|
34
|
-
for (let c = 1; c < n; c++) {
|
|
35
|
-
const i = parseInt(t.r + r[0] * c, 10), l = parseInt(t.g + r[1] * c, 10), s = parseInt(t.b + r[2] * c, 10);
|
|
36
|
-
o.push(new a(i, l, s));
|
|
37
|
-
}
|
|
38
|
-
return o;
|
|
39
|
-
}
|
|
40
|
-
function f(n) {
|
|
41
|
-
n || (n = 6);
|
|
42
|
-
const t = new a(182, 70, 157), e = new a(221, 203, 85), o = new a(0, 130, 201), r = u(n, t, e), c = u(n, e, o), i = u(n, o, t);
|
|
43
|
-
return r.concat(c).concat(i);
|
|
44
|
-
}
|
|
45
|
-
exports.GenColors = f;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenColors-eedcc70a.cjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Originally taken from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js\n */\n\n/**\n * @param {number} r The red value\n * @param {number} g The green value\n * @param {number} b The blue value\n */\nfunction Color(r, g, b) {\n\tthis.r = r\n\tthis.g = g\n\tthis.b = b\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {string} color1 The first color\n * @param {string} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = parseInt(color1.r + step[0] * i, 10)\n\t\tconst g = parseInt(color1.g + step[1] * i, 10)\n\t\tconst b = parseInt(color1.b + step[2] * i, 10)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nfunction GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tconst red = new Color(182, 70, 157)\n\tconst yellow = new Color(221, 203, 85)\n\tconst blue = new Color(0, 130, 201) // Nextcloud blue\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n\nexport default GenColors\n"],"names":["Color","r","g","b","stepCalc","steps","ends","step","mixPalette","color1","color2","palette","i","GenColors","red","yellow","blue","palette1","palette2","palette3"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA,SAASA,EAAMC,GAAGC,GAAGC,GAAG;AACvB,OAAK,IAAIF,GACT,KAAK,IAAIC,GACT,KAAK,IAAIC;AACV;AASA,SAASC,EAASC,GAAOC,GAAM;AAC9B,QAAMC,IAAO,IAAI,MAAM,CAAC;AACxB,SAAAA,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GACpCE,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GACpCE,EAAK,CAAC,KAAKD,EAAK,CAAC,EAAE,IAAIA,EAAK,CAAC,EAAE,KAAKD,GAC7BE;AACR;AAUA,SAASC,EAAWH,GAAOI,GAAQC,GAAQ;AAC1C,QAAMC,IAAU,CAAE;AAClB,EAAAA,EAAQ,KAAKF,CAAM;AACnB,QAAMF,IAAOH,EAASC,GAAO,CAACI,GAAQC,CAAM,CAAC;AAC7C,WAASE,IAAI,GAAGA,IAAIP,GAAOO,KAAK;AAC/B,UAAMX,IAAI,SAASQ,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE,GACvCV,IAAI,SAASO,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE,GACvCT,IAAI,SAASM,EAAO,IAAIF,EAAK,CAAC,IAAIK,GAAG,EAAE;AAC7C,IAAAD,EAAQ,KAAK,IAAIX,EAAMC,GAAGC,GAAGC,CAAC,CAAC;AAAA,EAC/B;AACD,SAAOQ;AACR;AAWA,SAASE,EAAUR,GAAO;AACzB,EAAKA,MACJA,IAAQ;AAGT,QAAMS,IAAM,IAAId,EAAM,KAAK,IAAI,GAAG,GAC5Be,IAAS,IAAIf,EAAM,KAAK,KAAK,EAAE,GAC/BgB,IAAO,IAAIhB,EAAM,GAAG,KAAK,GAAG,GAE5BiB,IAAWT,EAAWH,GAAOS,GAAKC,CAAM,GACxCG,IAAWV,EAAWH,GAAOU,GAAQC,CAAI,GACzCG,IAAWX,EAAWH,GAAOW,GAAMF,CAAG;AAE5C,SAAOG,EAAS,OAAOC,CAAQ,EAAE,OAAOC,CAAQ;AACjD;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcSettingsSelectGroup-b49652df.mjs","sources":["../../src/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n```vue\n<template>\n\t<section>\n\t\t<NcSettingsSelectGroup v-model=\"groups\" placeholder=\"Select user groups\" label=\"The hidden label\" />\n\t\t<NcSettingsSelectGroup v-model=\"otherGroups\" :disabled=\"true\" label=\"Also a fallback for the placeholder\" />\n\t\t<div>You have selected: <code>{{ groups }}</code> and <code>{{ otherGroups }}</code></div>\n\t</section>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tgroups: [],\n\t\t\totherGroups: ['admin']\n\t\t}\n\t}\n}\n</script>\n<style scoped>\nsection * {\n\tpadding: 6px 0px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div>\n\t\t<label v-if=\"label\" :for=\"id\" class=\"hidden-visually\">{{ label }}</label>\n\t\t<NcSelect :value=\"inputValue\"\n\t\t\t:options=\"groupsArray\"\n\t\t\t:placeholder=\"placeholder || label\"\n\t\t\t:filter-by=\"filterGroups\"\n\t\t\t:input-id=\"id\"\n\t\t\t:limit=\"5\"\n\t\t\tlabel=\"displayname\"\n\t\t\t:multiple=\"true\"\n\t\t\t:close-on-select=\"false\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t@input=\"update\"\n\t\t\t@search=\"onSearch\" />\n\t\t<div v-show=\"hasError\" class=\"select-group-error\">\n\t\t\t{{ errorMessage }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '../../components/NcSelect/index.js'\nimport { t } from '../../l10n.js'\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { debounce } from 'debounce'\n\nexport default {\n\tname: 'NcSettingsSelectGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [l10n],\n\tprops: {\n\t\t/**\n\t\t * The text of the label element of the select group input\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder for the input element\n\t\t * For backwards compatibility it falls back to the `label` value\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t * A list of group IDs can be provided\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: [\n\t\t'input',\n\t\t'error',\n\t],\n\tdata() {\n\t\treturn {\n\t\t\t/** Temporary store to cache groups */\n\t\t\tgroups: {},\n\t\t\trandId: GenRandomId(),\n\t\t\terrorMessage: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * If the error message should be shown\n\t\t */\n\t\thasError() {\n\t\t\treturn this.errorMessage !== ''\n\t\t},\n\n\t\t/**\n\t\t * Validate input value and only return valid strings (group IDs)\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tfilteredValue() {\n\t\t\treturn this.value.filter((group) => group !== '' && typeof group === 'string')\n\t\t},\n\n\t\t/**\n\t\t * value property converted to an array of group objects used as input for the NcSelect\n\t\t */\n\t\tinputValue() {\n\t\t\treturn this.filteredValue.map(\n\t\t\t\t(id) => {\n\t\t\t\t\tif (typeof this.groups[id] === 'undefined') {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tdisplayname: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.groups[id]\n\t\t\t\t},\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Convert groups object to array of groups required for NcSelect.options\n\t\t * Filter out currently selected values\n\t\t *\n\t\t * @return {object[]}\n\t\t */\n\t\tgroupsArray() {\n\t\t\treturn Object.values(this.groups).filter(g => !this.value.includes(g.id))\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * If the value is changed, check that all groups are loaded so we show the correct display name\n\t\t */\n\t\tvalue: {\n\t\t\thandler() {\n\t\t\t\tconst loadedGroupIds = Object.keys(this.groups)\n\t\t\t\tconst missing = this.filteredValue.filter(group => !loadedGroupIds.includes(group))\n\t\t\t\tmissing.forEach((groupId) => {\n\t\t\t\t\tthis.loadGroup(groupId)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// Run the watch handler also when the component is initially mounted\n\t\t\timmediate: true,\n\t\t},\n\t},\n\t/**\n\t * Load groups matching the empty query to reduce API calls\n\t */\n\tasync mounted() {\n\t\t// version scoped to prevent issues with different library versions\n\t\tconst storageName = `${appName}:${appVersion}/initialGroups`\n\n\t\tlet savedGroups = window.sessionStorage.getItem(storageName)\n\t\tif (savedGroups) {\n\t\t\tsavedGroups = Object.fromEntries(JSON.parse(savedGroups).map(group => [group.id, group]))\n\t\t\tthis.groups = { ...this.groups, ...savedGroups }\n\t\t} else {\n\t\t\tawait this.loadGroup('')\n\t\t\twindow.sessionStorage.setItem(storageName, JSON.stringify(Object.values(this.groups)))\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Called when a new group is selected or previous group is deselected to emit the update event\n\t\t *\n\t\t * @param {object[]} updatedValue Array of selected groups\n\t\t */\n\t\tupdate(updatedValue) {\n\t\t\tconst value = updatedValue.map((element) => element.id)\n\t\t\t/** Emitted when the groups selection changes<br />**Payload:** `value` (`Array`) - *Ids of selected groups */\n\t\t\tthis.$emit('input', value)\n\t\t},\n\n\t\t/**\n\t\t * Use provisioning API to search for given group and save it in the groups object\n\t\t *\n\t\t * @param {string} query The query like parts of the id oder display name\n\t\t * @return {boolean}\n\t\t */\n\t\tasync loadGroup(query) {\n\t\t\ttry {\n\t\t\t\tquery = typeof query === 'string' ? encodeURI(query) : ''\n\t\t\t\tconst response = await axios.get(generateOcsUrl(`cloud/groups/details?search=${query}&limit=10`, 2))\n\n\t\t\t\t// No network error, so reset any error after 5 seconds\n\t\t\t\tif (this.errorMessage !== '') {\n\t\t\t\t\twindow.setTimeout(() => {\n\t\t\t\t\t\tthis.errorMessage = ''\n\t\t\t\t\t}, 5000)\n\t\t\t\t}\n\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tconst newGroups = Object.fromEntries(response.data.ocs.data.groups.map((element) => [element.id, element]))\n\t\t\t\t\tthis.groups = { ...this.groups, ...newGroups }\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t/** Emitted if groups could not be queried.<br />**Payload:** `error` (`object`) - The Axios error */\n\t\t\t\tthis.$emit('error', error)\n\t\t\t\tthis.errorMessage = t('Unable to search the group')\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * Custom filter function for `NcSelect` to filter by ID *and* display name\n\t\t *\n\t\t * @param {object} option One of the groups\n\t\t * @param {string} label The label property of the group\n\t\t * @param {string} search The current search string\n\t\t */\n\t\tfilterGroups(option, label, search) {\n\t\t\treturn `${label || ''} ${option.id}`.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n\t\t},\n\n\t\t/**\n\t\t * Debounce the group search (reduce API calls)\n\t\t */\n\t\tonSearch: debounce(function(query) {\n\t\t\tthis.loadGroup(query)\n\t\t}, 200),\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.select-group-error {\n\tcolor: var(--color-error);\n\tfont-size: 13px;\n\tpadding-inline-start: var(--border-radius-large);\n}\n</style>\n"],"names":["_sfc_main","NcSelect","l10n","GenRandomId","id","group","g","loadedGroupIds","groupId","storageName","savedGroups","updatedValue","value","element","query","response","axios","generateOcsUrl","newGroups","error","t","option","label","search","debounce"],"mappings":";;;;;;;;;AAkFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,CAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,YAAAC,EAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AACA,WAAA;AAAA;AAAA,MAEA,QAAA,CAAA;AAAA,MACA,QAAAD,EAAA;AAAA,MACA,cAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,iBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,gBAAA;AACA,aAAA,KAAA,MAAA,OAAA,CAAAE,MAAAA,MAAA,MAAA,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":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n```vue\n<template>\n\t<section>\n\t\t<NcSettingsSelectGroup v-model=\"groups\" placeholder=\"Select user groups\" label=\"The hidden label\" />\n\t\t<NcSettingsSelectGroup v-model=\"otherGroups\" :disabled=\"true\" label=\"Also a fallback for the placeholder\" />\n\t\t<div>You have selected: <code>{{ groups }}</code> and <code>{{ otherGroups }}</code></div>\n\t</section>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tgroups: [],\n\t\t\totherGroups: ['admin']\n\t\t}\n\t}\n}\n</script>\n<style scoped>\nsection * {\n\tpadding: 6px 0px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div>\n\t\t<label v-if=\"label\" :for=\"id\" class=\"hidden-visually\">{{ label }}</label>\n\t\t<NcSelect :value=\"inputValue\"\n\t\t\t:options=\"groupsArray\"\n\t\t\t:placeholder=\"placeholder || label\"\n\t\t\t:filter-by=\"filterGroups\"\n\t\t\t:input-id=\"id\"\n\t\t\t:limit=\"5\"\n\t\t\tlabel=\"displayname\"\n\t\t\t:multiple=\"true\"\n\t\t\t:close-on-select=\"false\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t@input=\"update\"\n\t\t\t@search=\"onSearch\" />\n\t\t<div v-show=\"hasError\" class=\"select-group-error\">\n\t\t\t{{ errorMessage }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '../../components/NcSelect/index.js'\nimport { t } from '../../l10n.js'\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { debounce } from 'debounce'\n\nexport default {\n\tname: 'NcSettingsSelectGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [l10n],\n\tprops: {\n\t\t/**\n\t\t * The text of the label element of the select group input\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder for the input element\n\t\t * For backwards compatibility it falls back to the `label` value\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t * A list of group IDs can be provided\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: [\n\t\t'input',\n\t\t'error',\n\t],\n\tdata() {\n\t\treturn {\n\t\t\t/** Temporary store to cache groups */\n\t\t\tgroups: {},\n\t\t\trandId: GenRandomId(),\n\t\t\terrorMessage: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * If the error message should be shown\n\t\t */\n\t\thasError() {\n\t\t\treturn this.errorMessage !== ''\n\t\t},\n\n\t\t/**\n\t\t * Validate input value and only return valid strings (group IDs)\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tfilteredValue() {\n\t\t\treturn this.value.filter((group) => group !== '' && typeof group === 'string')\n\t\t},\n\n\t\t/**\n\t\t * value property converted to an array of group objects used as input for the NcSelect\n\t\t */\n\t\tinputValue() {\n\t\t\treturn this.filteredValue.map(\n\t\t\t\t(id) => {\n\t\t\t\t\tif (typeof this.groups[id] === 'undefined') {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tdisplayname: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.groups[id]\n\t\t\t\t},\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Convert groups object to array of groups required for NcSelect.options\n\t\t * Filter out currently selected values\n\t\t *\n\t\t * @return {object[]}\n\t\t */\n\t\tgroupsArray() {\n\t\t\treturn Object.values(this.groups).filter(g => !this.value.includes(g.id))\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * If the value is changed, check that all groups are loaded so we show the correct display name\n\t\t */\n\t\tvalue: {\n\t\t\thandler() {\n\t\t\t\tconst loadedGroupIds = Object.keys(this.groups)\n\t\t\t\tconst missing = this.filteredValue.filter(group => !loadedGroupIds.includes(group))\n\t\t\t\tmissing.forEach((groupId) => {\n\t\t\t\t\tthis.loadGroup(groupId)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// Run the watch handler also when the component is initially mounted\n\t\t\timmediate: true,\n\t\t},\n\t},\n\t/**\n\t * Load groups matching the empty query to reduce API calls\n\t */\n\tasync mounted() {\n\t\t// version scoped to prevent issues with different library versions\n\t\tconst storageName = `${appName}:${appVersion}/initialGroups`\n\n\t\tlet savedGroups = window.sessionStorage.getItem(storageName)\n\t\tif (savedGroups) {\n\t\t\tsavedGroups = Object.fromEntries(JSON.parse(savedGroups).map(group => [group.id, group]))\n\t\t\tthis.groups = { ...this.groups, ...savedGroups }\n\t\t} else {\n\t\t\tawait this.loadGroup('')\n\t\t\twindow.sessionStorage.setItem(storageName, JSON.stringify(Object.values(this.groups)))\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Called when a new group is selected or previous group is deselected to emit the update event\n\t\t *\n\t\t * @param {object[]} updatedValue Array of selected groups\n\t\t */\n\t\tupdate(updatedValue) {\n\t\t\tconst value = updatedValue.map((element) => element.id)\n\t\t\t/** Emitted when the groups selection changes<br />**Payload:** `value` (`Array`) - *Ids of selected groups */\n\t\t\tthis.$emit('input', value)\n\t\t},\n\n\t\t/**\n\t\t * Use provisioning API to search for given group and save it in the groups object\n\t\t *\n\t\t * @param {string} query The query like parts of the id oder display name\n\t\t * @return {boolean}\n\t\t */\n\t\tasync loadGroup(query) {\n\t\t\ttry {\n\t\t\t\tquery = typeof query === 'string' ? encodeURI(query) : ''\n\t\t\t\tconst response = await axios.get(generateOcsUrl(`cloud/groups/details?search=${query}&limit=10`, 2))\n\n\t\t\t\t// No network error, so reset any error after 5 seconds\n\t\t\t\tif (this.errorMessage !== '') {\n\t\t\t\t\twindow.setTimeout(() => {\n\t\t\t\t\t\tthis.errorMessage = ''\n\t\t\t\t\t}, 5000)\n\t\t\t\t}\n\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tconst newGroups = Object.fromEntries(response.data.ocs.data.groups.map((element) => [element.id, element]))\n\t\t\t\t\tthis.groups = { ...this.groups, ...newGroups }\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t/** Emitted if groups could not be queried.<br />**Payload:** `error` (`object`) - The Axios error */\n\t\t\t\tthis.$emit('error', error)\n\t\t\t\tthis.errorMessage = t('Unable to search the group')\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * Custom filter function for `NcSelect` to filter by ID *and* display name\n\t\t *\n\t\t * @param {object} option One of the groups\n\t\t * @param {string} label The label property of the group\n\t\t * @param {string} search The current search string\n\t\t */\n\t\tfilterGroups(option, label, search) {\n\t\t\treturn `${label || ''} ${option.id}`.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n\t\t},\n\n\t\t/**\n\t\t * Debounce the group search (reduce API calls)\n\t\t */\n\t\tonSearch: debounce(function(query) {\n\t\t\tthis.loadGroup(query)\n\t\t}, 200),\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.select-group-error {\n\tcolor: var(--color-error);\n\tfont-size: 13px;\n\tpadding-inline-start: var(--border-radius-large);\n}\n</style>\n"],"names":["_sfc_main","Components_NcSelect","l10n","GenRandomId","id","group","g","loadedGroupIds","groupId","storageName","savedGroups","updatedValue","value","element","query","response","axios__default","router","newGroups","error","l10n$1","option","label","search","debounce"],"mappings":";;AAkFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,EAAA,IAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,YAAAC,EAAA,YAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AACA,WAAA;AAAA;AAAA,MAEA,QAAA,CAAA;AAAA,MACA,QAAAD,EAAA,YAAA;AAAA,MACA,cAAA;A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