@nextcloud/vue 8.0.0-beta.8 → 8.0.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 +64 -2
- package/dist/Components/NcActionButton.cjs +22 -11
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +24 -12
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +23 -18
- package/dist/Components/NcActionInput.cjs.map +1 -1
- package/dist/Components/NcActionInput.mjs +20 -14
- package/dist/Components/NcActionInput.mjs.map +1 -1
- package/dist/Components/NcActionLink.cjs +7 -7
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +4 -4
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +8 -8
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +4 -4
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +10 -10
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +11 -11
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +10 -10
- package/dist/Components/NcActionTextEditable.cjs.map +1 -1
- package/dist/Components/NcActionTextEditable.mjs +2 -2
- package/dist/Components/NcActions.cjs +64 -57
- package/dist/Components/NcActions.cjs.map +1 -1
- package/dist/Components/NcActions.mjs +76 -69
- package/dist/Components/NcActions.mjs.map +1 -1
- package/dist/Components/NcAppContent.cjs +19 -20
- package/dist/Components/NcAppContent.cjs.map +1 -1
- package/dist/Components/NcAppContent.mjs +8 -8
- package/dist/Components/NcAppContent.mjs.map +1 -1
- package/dist/Components/NcAppNavigation.cjs +58 -27
- package/dist/Components/NcAppNavigation.cjs.map +1 -1
- package/dist/Components/NcAppNavigation.mjs +67 -34
- package/dist/Components/NcAppNavigation.mjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +167 -63
- package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +142 -40
- package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +6 -6
- package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +17 -17
- package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +7 -7
- package/dist/Components/NcAppNavigationNewItem.cjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +5 -5
- package/dist/Components/NcAppNavigationNewItem.mjs.map +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +46 -14
- package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +48 -16
- package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +87 -117
- package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +95 -124
- package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +29 -10
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +29 -10
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +100 -34
- package/dist/Components/NcAppSidebar.cjs.map +1 -1
- package/dist/Components/NcAppSidebar.mjs +157 -93
- package/dist/Components/NcAppSidebar.mjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.cjs +7 -7
- package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +4 -4
- package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +10 -10
- package/dist/Components/NcBreadcrumb.cjs.map +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +86 -54
- package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +93 -62
- package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
- package/dist/Components/NcButton.cjs +25 -25
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +25 -25
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +400 -54
- package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +398 -58
- package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
- package/dist/Components/NcColorPicker.cjs +18 -18
- package/dist/Components/NcColorPicker.cjs.map +1 -1
- package/dist/Components/NcColorPicker.mjs +17 -17
- package/dist/Components/NcColorPicker.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +30 -30
- package/dist/Components/NcDashboardWidget.cjs.map +1 -1
- package/dist/Components/NcDashboardWidget.mjs +3 -3
- package/dist/Components/NcDashboardWidgetItem.cjs +11 -11
- package/dist/Components/NcDashboardWidgetItem.cjs.map +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +9 -9
- package/dist/Components/NcDashboardWidgetItem.mjs.map +1 -1
- package/dist/Components/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +109 -44
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +115 -52
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcDialog.cjs +171 -0
- package/dist/Components/NcDialog.cjs.map +1 -0
- package/dist/Components/NcDialog.mjs +177 -0
- package/dist/Components/NcDialog.mjs.map +1 -0
- package/dist/Components/NcDialogButton.cjs +69 -0
- package/dist/Components/NcDialogButton.cjs.map +1 -0
- package/dist/Components/NcDialogButton.mjs +74 -0
- package/dist/Components/NcDialogButton.mjs.map +1 -0
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcEmptyContent.cjs +14 -14
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +7 -7
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcIconSvgWrapper.cjs +29 -14
- package/dist/Components/NcIconSvgWrapper.cjs.map +1 -1
- package/dist/Components/NcIconSvgWrapper.mjs +32 -17
- package/dist/Components/NcIconSvgWrapper.mjs.map +1 -1
- package/dist/Components/NcInputField.cjs +16 -16
- package/dist/Components/NcInputField.cjs.map +1 -1
- package/dist/Components/NcInputField.mjs +5 -5
- package/dist/Components/NcInputField.mjs.map +1 -1
- package/dist/Components/NcListItem.cjs +3 -3
- package/dist/Components/NcListItem.cjs.map +1 -1
- package/dist/Components/NcListItem.mjs +3 -3
- package/dist/Components/NcListItem.mjs.map +1 -1
- package/dist/Components/NcListItemIcon.cjs +20 -12
- package/dist/Components/NcListItemIcon.cjs.map +1 -1
- package/dist/Components/NcListItemIcon.mjs +21 -13
- package/dist/Components/NcListItemIcon.mjs.map +1 -1
- package/dist/Components/NcModal.cjs +167 -72
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +171 -79
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +147 -19
- package/dist/Components/NcNoteCard.cjs.map +1 -1
- package/dist/Components/NcNoteCard.mjs +148 -23
- package/dist/Components/NcNoteCard.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +114 -39
- package/dist/Components/NcPasswordField.cjs.map +1 -1
- package/dist/Components/NcPasswordField.mjs +125 -52
- package/dist/Components/NcPasswordField.mjs.map +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +70 -37
- package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +60 -27
- package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
- package/dist/Components/NcRichContenteditable.cjs +22 -18
- package/dist/Components/NcRichContenteditable.cjs.map +1 -1
- package/dist/Components/NcRichContenteditable.mjs +32 -28
- 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 +82 -54
- package/dist/Components/NcSelect.cjs.map +1 -1
- package/dist/Components/NcSelect.mjs +77 -47
- package/dist/Components/NcSelect.mjs.map +1 -1
- package/dist/Components/NcSelectTags.cjs +2 -2
- package/dist/Components/NcSelectTags.cjs.map +1 -1
- package/dist/Components/NcSelectTags.mjs +4 -4
- package/dist/Components/NcSelectTags.mjs.map +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +46 -14
- package/dist/Components/NcSettingsSection.cjs.map +1 -1
- package/dist/Components/NcSettingsSection.mjs +44 -12
- package/dist/Components/NcSettingsSection.mjs.map +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +167 -0
- package/dist/Components/NcTextArea.cjs.map +1 -0
- package/dist/Components/NcTextArea.mjs +172 -0
- package/dist/Components/NcTextArea.mjs.map +1 -0
- package/dist/Components/NcTextField.cjs +79 -23
- package/dist/Components/NcTextField.cjs.map +1 -1
- package/dist/Components/NcTextField.mjs +82 -27
- package/dist/Components/NcTextField.mjs.map +1 -1
- package/dist/Components/NcTimezonePicker.cjs +26 -19
- package/dist/Components/NcTimezonePicker.cjs.map +1 -1
- package/dist/Components/NcTimezonePicker.mjs +31 -23
- package/dist/Components/NcTimezonePicker.mjs.map +1 -1
- package/dist/Components/NcUserBubble.cjs +24 -20
- package/dist/Components/NcUserBubble.cjs.map +1 -1
- package/dist/Components/NcUserBubble.mjs +25 -20
- package/dist/Components/NcUserBubble.mjs.map +1 -1
- package/dist/assets/{NcAppNavigationToggle-2cc5b864.css → NcAppNavigationToggle-9e170630.css} +3 -2
- package/dist/assets/{NcInputConfirmCancel-2ba60a52.css → NcInputConfirmCancel-45d1d76b.css} +7 -7
- package/dist/assets/{index-5072b6ee.css → index-05760fea.css} +16 -11
- package/dist/assets/{index-30e099f7.css → index-0ac09203.css} +3 -3
- package/dist/assets/{index-0ab8e182.css → index-0e9b11c7.css} +27 -22
- package/dist/assets/{index-1151d229.css → index-1f25a3c0.css} +3 -3
- package/dist/assets/{index-5eff69c7.css → index-2e5e3b55.css} +32 -30
- package/dist/assets/{index-03ec5f40.css → index-400b48a6.css} +7 -7
- package/dist/assets/{index-ed4adf1d.css → index-4271da53.css} +18 -17
- package/dist/assets/{index-33da80f0.css → index-4611417f.css} +8 -9
- package/dist/assets/{index-01e5adf4.css → index-55600948.css} +11 -11
- package/dist/assets/{index-c7905a53.css → index-57b305d3.css} +3 -3
- package/dist/assets/{index-de0326c7.css → index-5ee8a575.css} +69 -78
- package/dist/assets/index-6899d75b.css +150 -0
- package/dist/assets/{index-9354264c.css → index-6f721577.css} +16 -16
- package/dist/assets/{index-1beccc92.css → index-750c02cc.css} +28 -10
- package/dist/assets/{index-0557f12a.css → index-77a548be.css} +4 -4
- package/dist/assets/{index-fbdeb5ab.css → index-7d211db9.css} +11 -11
- package/dist/assets/{index-becfbea7.css → index-802d2118.css} +28 -23
- package/dist/assets/{index-a2d55f92.css → index-9176105d.css} +41 -41
- package/dist/assets/index-93bc89ef.css +197 -0
- package/dist/assets/{index-50b0766d.css → index-a0532427.css} +55 -70
- package/dist/assets/{index-6405cd50.css → index-ab715d82.css} +4 -4
- package/dist/assets/index-abb90c97.css +164 -0
- package/dist/assets/{index-23e64bbb.css → index-c221fe05.css} +9 -9
- package/dist/assets/{index-c6f0da2e.css → index-c239a2fc.css} +14 -8
- package/dist/assets/{index-fec4bb7b.css → index-d3702c91.css} +22 -17
- package/dist/assets/{index-194e9415.css → index-d5716ef0.css} +74 -59
- package/dist/assets/{index-4a775ba1.css → index-d812ed9e.css} +43 -43
- package/dist/assets/{index-793eae6b.css → index-d9ae9479.css} +6 -6
- package/dist/assets/{index-1cf8eeb4.css → index-db5a8b1c.css} +26 -33
- package/dist/assets/index-dc612aa3.css +112 -0
- package/dist/assets/{index-294382c8.css → index-e1a7aa6f.css} +43 -38
- package/dist/assets/{index-376d2dec.css → index-e7c55791.css} +67 -67
- package/dist/assets/{index-165fce0e.css → index-e7eadba7.css} +13 -13
- package/dist/assets/{index-0adc989c.css → index-ebbb7829.css} +9 -13
- package/dist/assets/{referencePickerModal-0acecb5e.css → referencePickerModal-3a127978.css} +55 -55
- package/dist/chunks/AlertCircleOutline-7085c10f.cjs +35 -0
- package/dist/chunks/AlertCircleOutline-7085c10f.cjs.map +1 -0
- package/dist/chunks/AlertCircleOutline-b73838e0.mjs +37 -0
- package/dist/chunks/AlertCircleOutline-b73838e0.mjs.map +1 -0
- package/dist/chunks/ArrowLeft-2f9b9323.cjs +35 -0
- package/dist/chunks/ArrowLeft-2f9b9323.cjs.map +1 -0
- package/dist/chunks/ArrowLeft-3779ba88.mjs +37 -0
- package/dist/chunks/ArrowLeft-3779ba88.mjs.map +1 -0
- package/dist/chunks/ArrowRight-7315f6c1.cjs +35 -0
- package/dist/chunks/ArrowRight-7315f6c1.cjs.map +1 -0
- package/dist/chunks/ArrowRight-74a9fcb2.mjs +37 -0
- package/dist/chunks/ArrowRight-74a9fcb2.mjs.map +1 -0
- package/dist/chunks/Check-2ea0a88a.mjs +37 -0
- package/dist/chunks/Check-2ea0a88a.mjs.map +1 -0
- package/dist/chunks/Check-be8cd6af.cjs +35 -0
- package/dist/chunks/Check-be8cd6af.cjs.map +1 -0
- package/dist/chunks/ChevronDown-a72d365d.mjs +37 -0
- package/dist/chunks/ChevronDown-a72d365d.mjs.map +1 -0
- package/dist/chunks/ChevronDown-dc32e51d.cjs +35 -0
- package/dist/chunks/ChevronDown-dc32e51d.cjs.map +1 -0
- package/dist/chunks/ChevronRight-1a6a6cf2.mjs +37 -0
- package/dist/chunks/ChevronRight-1a6a6cf2.mjs.map +1 -0
- package/dist/chunks/ChevronRight-a4c1e0d3.cjs +35 -0
- package/dist/chunks/ChevronRight-a4c1e0d3.cjs.map +1 -0
- package/dist/chunks/Close-271f72e2.mjs +37 -0
- package/dist/chunks/Close-271f72e2.mjs.map +1 -0
- package/dist/chunks/Close-98cb6f12.cjs +35 -0
- package/dist/chunks/Close-98cb6f12.cjs.map +1 -0
- package/dist/chunks/DotsHorizontal-0ee7d901.mjs +37 -0
- package/dist/chunks/DotsHorizontal-0ee7d901.mjs.map +1 -0
- package/dist/chunks/DotsHorizontal-ac96129a.cjs +35 -0
- package/dist/chunks/DotsHorizontal-ac96129a.cjs.map +1 -0
- package/dist/chunks/NcAppNavigationToggle-364eb664.cjs +113 -0
- package/dist/chunks/NcAppNavigationToggle-364eb664.cjs.map +1 -0
- package/dist/chunks/NcAppNavigationToggle-cd2ef112.mjs +118 -0
- package/dist/chunks/NcAppNavigationToggle-cd2ef112.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-f881168d.mjs → NcInputConfirmCancel-304f0b74.mjs} +22 -15
- package/dist/chunks/NcInputConfirmCancel-304f0b74.mjs.map +1 -0
- package/dist/chunks/NcInputConfirmCancel-c873bb9b.cjs +90 -0
- package/dist/chunks/NcInputConfirmCancel-c873bb9b.cjs.map +1 -0
- package/dist/chunks/{NcRichText-1c3d2654.mjs → NcRichText-25edeb8e.mjs} +9 -9
- package/dist/chunks/{NcRichText-d385dc10.cjs.map → NcRichText-25edeb8e.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-d385dc10.cjs → NcRichText-dcb4fb97.cjs} +2 -2
- package/dist/chunks/{NcRichText-1c3d2654.mjs.map → NcRichText-dcb4fb97.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-47d9c113.cjs → NcSettingsSelectGroup-d639533d.cjs} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-47d9c113.cjs.map → NcSettingsSelectGroup-d639533d.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-0f4a0f94.mjs → NcSettingsSelectGroup-fd91d31a.mjs} +2 -2
- package/dist/chunks/{NcSettingsSelectGroup-0f4a0f94.mjs.map → NcSettingsSelectGroup-fd91d31a.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-97a014a1.mjs → ScopeComponent-5b9e60d8.mjs} +3 -3
- package/dist/chunks/{ScopeComponent-97a014a1.mjs.map → ScopeComponent-5b9e60d8.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-1c75ec38.cjs → ScopeComponent-dfa5ec75.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-1c75ec38.cjs.map → ScopeComponent-dfa5ec75.cjs.map} +1 -1
- package/dist/chunks/{actionText-b0bd6eb7.cjs → actionText-54bc24a6.cjs} +1 -1
- package/dist/chunks/{actionText-9f5c55bd.mjs.map → actionText-54bc24a6.cjs.map} +1 -1
- package/dist/chunks/{actionText-9f5c55bd.mjs → actionText-a64be267.mjs} +1 -1
- package/dist/chunks/{actionText-b0bd6eb7.cjs.map → actionText-a64be267.mjs.map} +1 -1
- package/dist/chunks/{index-2a5b8ace.cjs → index-343ecbe5.cjs} +98 -55
- package/dist/chunks/index-343ecbe5.cjs.map +1 -0
- package/dist/chunks/{index-6c221fa0.mjs → index-a01ff595.mjs} +143 -100
- package/dist/chunks/index-a01ff595.mjs.map +1 -0
- package/dist/chunks/{l10n-4326316a.cjs → l10n-9321b50d.cjs} +1 -1
- package/dist/chunks/{l10n-4326316a.cjs.map → l10n-9321b50d.cjs.map} +1 -1
- package/dist/chunks/l10n-9f3afaf5.cjs +29 -0
- package/dist/chunks/l10n-9f3afaf5.cjs.map +1 -0
- package/dist/chunks/l10n-b6d21146.mjs +31 -0
- package/dist/chunks/l10n-b6d21146.mjs.map +1 -0
- package/dist/chunks/{l10n-c5f5f001.mjs → l10n-bef4ea85.mjs} +1 -1
- package/dist/chunks/{l10n-c5f5f001.mjs.map → l10n-bef4ea85.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-0fde503d.mjs → referencePickerModal-58498cac.mjs} +157 -125
- package/dist/chunks/referencePickerModal-58498cac.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-9b4ff88d.cjs → referencePickerModal-a739a17b.cjs} +145 -112
- package/dist/chunks/referencePickerModal-a739a17b.cjs.map +1 -0
- package/dist/index.cjs +105 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +138 -133
- package/dist/index.mjs.map +1 -1
- package/dist/vendor.LICENSE.txt +5 -1
- package/package.json +8 -5
- package/dist/assets/index-7768d5e5.css +0 -148
- package/dist/assets/index-d646553d.css +0 -41
- package/dist/chunks/NcAppNavigationToggle-960658a0.cjs +0 -49
- package/dist/chunks/NcAppNavigationToggle-960658a0.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-d868f651.mjs +0 -55
- package/dist/chunks/NcAppNavigationToggle-d868f651.mjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs +0 -83
- package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-f881168d.mjs.map +0 -1
- package/dist/chunks/index-2a5b8ace.cjs.map +0 -1
- package/dist/chunks/index-6c221fa0.mjs.map +0 -1
- package/dist/chunks/l10n-27a75c40.mjs +0 -31
- package/dist/chunks/l10n-27a75c40.mjs.map +0 -1
- package/dist/chunks/l10n-903083c4.cjs +0 -29
- package/dist/chunks/l10n-903083c4.cjs.map +0 -1
- package/dist/chunks/referencePickerModal-0fde503d.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-9b4ff88d.cjs.map +0 -1
|
@@ -1,22 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
const c = require("@nextcloud/vue-select");
|
|
1
|
+
var I = require("../assets/index-750c02cc.css");
|
|
3
2
|
require("@nextcloud/vue-select/dist/vue-select.css");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const c = require("@nextcloud/vue-select"), a = require("@floating-ui/dom"), u = require("../chunks/l10n-9f3afaf5.cjs"), f = require("../chunks/ChevronDown-dc32e51d.cjs"), d = require("../chunks/Close-98cb6f12.cjs"), m = require("./NcEllipsisedOption.cjs"), y = require("./NcListItemIcon.cjs"), _ = require("./NcLoadingIcon.cjs"), h = require("../chunks/l10n-9321b50d.cjs"), g = require("../chunks/GenRandomId-c214d235.cjs"), S = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
|
|
4
|
+
const b = {
|
|
6
5
|
name: "NcSelect",
|
|
7
6
|
components: {
|
|
8
|
-
ChevronDown:
|
|
9
|
-
NcEllipsisedOption:
|
|
10
|
-
NcListItemIcon:
|
|
11
|
-
NcLoadingIcon:
|
|
7
|
+
ChevronDown: f.ChevronDown,
|
|
8
|
+
NcEllipsisedOption: m,
|
|
9
|
+
NcListItemIcon: y,
|
|
10
|
+
NcLoadingIcon: _,
|
|
12
11
|
VueSelect: c.VueSelect
|
|
13
12
|
},
|
|
14
13
|
mixins: [
|
|
15
|
-
|
|
14
|
+
h.l10n
|
|
16
15
|
],
|
|
17
16
|
props: {
|
|
18
17
|
// Add VueSelect props to $props
|
|
19
18
|
...c.VueSelect.props,
|
|
19
|
+
/**
|
|
20
|
+
* `aria-label` for the clear input button
|
|
21
|
+
*/
|
|
22
|
+
ariaLabelClearSelected: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: u.t("Clear selected")
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* `aria-label` for the search input
|
|
28
|
+
*/
|
|
29
|
+
ariaLabelCombobox: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: u.t("Search for options")
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Allows to customize the `aria-label` for the deselect-option button
|
|
35
|
+
* The default is "Deselect " + optionLabel
|
|
36
|
+
* @type {(optionLabel: string) => string}
|
|
37
|
+
*/
|
|
38
|
+
ariaLabelDeselectOption: {
|
|
39
|
+
type: Function,
|
|
40
|
+
default: (l) => u.t("Deselect {option}", { option: l })
|
|
41
|
+
},
|
|
20
42
|
/**
|
|
21
43
|
* Append the dropdown element to the end of the body
|
|
22
44
|
* and size/position it dynamically.
|
|
@@ -59,7 +81,7 @@ const C = {
|
|
|
59
81
|
type: Object,
|
|
60
82
|
default: () => ({
|
|
61
83
|
Deselect: {
|
|
62
|
-
render: (
|
|
84
|
+
render: (l) => l(d.Close, {
|
|
63
85
|
props: {
|
|
64
86
|
size: 20,
|
|
65
87
|
fillColor: "var(--vs-controls-color)"
|
|
@@ -95,7 +117,7 @@ const C = {
|
|
|
95
117
|
*/
|
|
96
118
|
dropdownShouldOpen: {
|
|
97
119
|
type: Function,
|
|
98
|
-
default: ({ noDrop:
|
|
120
|
+
default: ({ noDrop: l, open: e }) => l ? !1 : e
|
|
99
121
|
},
|
|
100
122
|
/**
|
|
101
123
|
* Callback to determine if the provided option should
|
|
@@ -215,16 +237,16 @@ const C = {
|
|
|
215
237
|
* @param {import('@nextcloud/vue-select').VueSelect} vm - VueSelect instance
|
|
216
238
|
* @return {Record<number, Function>} patched keydown event handlers
|
|
217
239
|
*/
|
|
218
|
-
default(
|
|
240
|
+
default(l, e) {
|
|
219
241
|
return {
|
|
220
|
-
...
|
|
242
|
+
...l,
|
|
221
243
|
/**
|
|
222
244
|
* Patched Escape handler to stop propagation from open select
|
|
223
245
|
*
|
|
224
246
|
* @param {KeyboardEvent} event - default keydown event handler
|
|
225
247
|
*/
|
|
226
248
|
27: (n) => {
|
|
227
|
-
e.open && n.stopPropagation(),
|
|
249
|
+
e.open && n.stopPropagation(), l[27](n);
|
|
228
250
|
}
|
|
229
251
|
};
|
|
230
252
|
}
|
|
@@ -236,7 +258,7 @@ const C = {
|
|
|
236
258
|
*/
|
|
237
259
|
uid: {
|
|
238
260
|
type: String,
|
|
239
|
-
default: () => "-" +
|
|
261
|
+
default: () => "-" + g.GenRandomId()
|
|
240
262
|
},
|
|
241
263
|
/**
|
|
242
264
|
* When `appendToBody` is true, this sets the placement of the dropdown
|
|
@@ -302,12 +324,12 @@ const C = {
|
|
|
302
324
|
},
|
|
303
325
|
computed: {
|
|
304
326
|
localCalculatePosition() {
|
|
305
|
-
return this.calculatePosition !== null ? this.calculatePosition : (
|
|
306
|
-
|
|
307
|
-
const
|
|
327
|
+
return this.calculatePosition !== null ? this.calculatePosition : (l, e, { width: n }) => {
|
|
328
|
+
l.style.width = n;
|
|
329
|
+
const t = {
|
|
308
330
|
name: "addClass",
|
|
309
331
|
fn(s) {
|
|
310
|
-
return
|
|
332
|
+
return l.classList.add("vs__dropdown-menu--floating"), {};
|
|
311
333
|
}
|
|
312
334
|
}, o = {
|
|
313
335
|
name: "togglePlacementClass",
|
|
@@ -315,38 +337,43 @@ const C = {
|
|
|
315
337
|
return e.$el.classList.toggle(
|
|
316
338
|
"select--drop-up",
|
|
317
339
|
s === "top"
|
|
318
|
-
),
|
|
340
|
+
), l.classList.toggle(
|
|
319
341
|
"vs__dropdown-menu--floating-placement-top",
|
|
320
342
|
s === "top"
|
|
321
343
|
), {};
|
|
322
344
|
}
|
|
323
|
-
},
|
|
324
|
-
|
|
345
|
+
}, r = () => {
|
|
346
|
+
a.computePosition(e.$refs.toggle, l, {
|
|
325
347
|
placement: this.placement,
|
|
326
348
|
middleware: [
|
|
327
|
-
|
|
328
|
-
|
|
349
|
+
a.offset(-1),
|
|
350
|
+
t,
|
|
329
351
|
o,
|
|
330
352
|
// Match popperjs default collision prevention behavior by appending the following middleware in order
|
|
331
|
-
|
|
332
|
-
|
|
353
|
+
a.flip(),
|
|
354
|
+
a.shift({ limiter: a.limitShift() })
|
|
333
355
|
]
|
|
334
|
-
}).then(({ x: s, y:
|
|
335
|
-
Object.assign(
|
|
356
|
+
}).then(({ x: s, y: p }) => {
|
|
357
|
+
Object.assign(l.style, {
|
|
336
358
|
left: `${s}px`,
|
|
337
|
-
top: `${
|
|
359
|
+
top: `${p}px`
|
|
338
360
|
});
|
|
339
361
|
});
|
|
340
362
|
};
|
|
341
|
-
return
|
|
363
|
+
return a.autoUpdate(
|
|
342
364
|
e.$refs.toggle,
|
|
343
|
-
|
|
344
|
-
|
|
365
|
+
l,
|
|
366
|
+
r
|
|
345
367
|
);
|
|
346
368
|
};
|
|
347
369
|
},
|
|
348
370
|
localFilterBy() {
|
|
349
|
-
|
|
371
|
+
const l = /[^<]*<([^>]+)/;
|
|
372
|
+
return this.filterBy !== null ? this.filterBy : this.userSelect ? (e, n, t) => {
|
|
373
|
+
var r, i, s;
|
|
374
|
+
const o = t.match(l);
|
|
375
|
+
return o && ((s = (i = (r = e.subname) == null ? void 0 : r.toLocaleLowerCase) == null ? void 0 : i.call(r)) == null ? void 0 : s.indexOf(o[1].toLocaleLowerCase())) > -1 || `${n} ${e.subname}`.toLocaleLowerCase().indexOf(t.toLocaleLowerCase()) > -1;
|
|
376
|
+
} : c.VueSelect.props.filterBy.default;
|
|
350
377
|
},
|
|
351
378
|
localLabel() {
|
|
352
379
|
return this.label !== null ? this.label : this.userSelect ? "displayName" : c.VueSelect.props.label.default;
|
|
@@ -354,10 +381,10 @@ const C = {
|
|
|
354
381
|
propsToForward() {
|
|
355
382
|
const {
|
|
356
383
|
// Props handled by this component
|
|
357
|
-
inputClass:
|
|
384
|
+
inputClass: l,
|
|
358
385
|
noWrap: e,
|
|
359
386
|
placement: n,
|
|
360
|
-
userSelect:
|
|
387
|
+
userSelect: t,
|
|
361
388
|
// Props to forward
|
|
362
389
|
...o
|
|
363
390
|
} = this.$props;
|
|
@@ -371,36 +398,37 @@ const C = {
|
|
|
371
398
|
}
|
|
372
399
|
}
|
|
373
400
|
};
|
|
374
|
-
var
|
|
401
|
+
var C = function() {
|
|
375
402
|
var e = this, n = e._self._c;
|
|
376
403
|
return n("VueSelect", e._g(e._b({ staticClass: "select", class: {
|
|
377
|
-
"select--no-wrap": e.noWrap
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
404
|
+
"select--no-wrap": e.noWrap,
|
|
405
|
+
"user-select": e.userSelect
|
|
406
|
+
}, on: { search: (t) => e.search = t }, scopedSlots: e._u([{ key: "search", fn: function({ attributes: t, events: o }) {
|
|
407
|
+
return [n("input", e._g(e._b({ class: ["vs__search", e.inputClass] }, "input", t, !1), o))];
|
|
408
|
+
} }, { key: "open-indicator", fn: function({ attributes: t }) {
|
|
409
|
+
return [n("ChevronDown", e._b({ attrs: { "fill-color": "var(--vs-controls-color)", size: 26 } }, "ChevronDown", t, !1))];
|
|
410
|
+
} }, { key: "option", fn: function(t) {
|
|
411
|
+
return [e.userSelect ? n("NcListItemIcon", e._b({ attrs: { "avatar-size": 24, name: t[e.localLabel], search: e.search } }, "NcListItemIcon", t, !1)) : n("NcEllipsisedOption", { attrs: { name: String(t[e.localLabel]), search: e.search } })];
|
|
412
|
+
} }, { key: "selected-option", fn: function(t) {
|
|
413
|
+
return [e.userSelect ? n("NcListItemIcon", e._b({ attrs: { "avatar-size": 24, name: t[e.localLabel], search: e.search } }, "NcListItemIcon", t, !1)) : n("NcEllipsisedOption", { attrs: { name: String(t[e.localLabel]), search: e.search } })];
|
|
414
|
+
} }, { key: "spinner", fn: function(t) {
|
|
415
|
+
return [t.loading ? n("NcLoadingIcon") : e._e()];
|
|
388
416
|
} }, { key: "no-options", fn: function() {
|
|
389
417
|
return [e._v(" " + e._s(e.t("No results")) + " ")];
|
|
390
|
-
}, proxy: !0 }, e._l(e.$scopedSlots, function(
|
|
391
|
-
return { key: o, fn: function(
|
|
392
|
-
return [e._t(o, null, null,
|
|
418
|
+
}, proxy: !0 }, e._l(e.$scopedSlots, function(t, o) {
|
|
419
|
+
return { key: o, fn: function(r) {
|
|
420
|
+
return [e._t(o, null, null, r)];
|
|
393
421
|
} };
|
|
394
422
|
})], null, !0) }, "VueSelect", e.propsToForward, !1), e.$listeners));
|
|
395
|
-
},
|
|
423
|
+
}, L = [], v = /* @__PURE__ */ S.normalizeComponent(
|
|
424
|
+
b,
|
|
396
425
|
C,
|
|
397
426
|
L,
|
|
398
|
-
v,
|
|
399
427
|
!1,
|
|
400
428
|
null,
|
|
401
429
|
null,
|
|
402
430
|
null,
|
|
403
431
|
null
|
|
404
432
|
);
|
|
405
|
-
const
|
|
406
|
-
module.exports =
|
|
433
|
+
const N = v.exports;
|
|
434
|
+
module.exports = N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcSelect.cjs","sources":["../../src/components/NcSelect/NcSelect.vue"],"sourcesContent":["<!--\n\t- @copyright 2022 Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @author Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @license AGPL-3.0-or-later\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<docs>\n### Description\n\nGeneral purpose multiselect component.\n\n### Basic examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'Simple',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Simple (top placement)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tplacement: 'top',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (with placeholder)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tplaceholder: 'Select multiple options',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (objects, pre-selected, stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'baz',\n\t\t\t\t\tlabel: 'Baz',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'qux',\n\t\t\t\t\tlabel: 'Qux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'quux',\n\t\t\t\t\tlabel: 'Quux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'corge',\n\t\t\t\t\tlabel: 'Corge',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'grault',\n\t\t\t\t\tlabel: 'Grault',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'garply',\n\t\t\t\t\tlabel: 'Garply',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'waldo',\n\t\t\t\t\tlabel: 'Waldo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'fred',\n\t\t\t\t\tlabel: 'Fred',\n\t\t\t\t},\n\t\t\t],\n\t\t\tvalue: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(2, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### No wrap example\n\nThe `noWrap` prop is set to `true` and the `max-width` of the multiselect\nparent container is limited to `350px`\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data1.props.inputId\">{{ data1.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"false\"\n\t\t\t\tv-bind=\"data1.props\"\n\t\t\t\tv-model=\"data1.props.value\" />\n\t\t</div>\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data2.props.inputId\">{{ data2.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"true\"\n\t\t\t\tv-bind=\"data2.props\"\n\t\t\t\tv-model=\"data2.props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst data1 = {\n\tname: 'Wrapped (Default)',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nconst data2 = {\n\tname: 'Not wrapped',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdata1,\n\t\t\tdata2,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tmax-width: 350px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### User select examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport AccountGroup from '@mdi/svg/svg/account-group.svg?raw'\nimport Email from '@mdi/svg/svg/email.svg?raw'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'User select',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple user select (stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 500px);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<VueSelect class=\"select\"\n\t\t:class=\"{\n\t\t\t'select--no-wrap': noWrap,\n\t\t}\"\n\t\tv-bind=\"propsToForward\"\n\t\tv-on=\"$listeners\"\n\t\t@search=\"searchString => search = searchString\">\n\t\t<template #search=\"{ attributes, events }\">\n\t\t\t<input :class=\"['vs__search', inputClass]\"\n\t\t\t\tv-bind=\"attributes\"\n\t\t\t\tv-on=\"events\">\n\t\t</template>\n\t\t<template #open-indicator=\"{ attributes }\">\n\t\t\t<ChevronDown v-bind=\"attributes\"\n\t\t\t\tfill-color=\"var(--vs-controls-color)\"\n\t\t\t\t:size=\"26\" />\n\t\t\t\t<!-- Set size to 26 to make up for the increased padding of this icon -->\n\t\t</template>\n\t\t<template #option=\"option\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"option\"\n\t\t\t\t:name=\"option[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(option[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"selectedOption\"\n\t\t\t\t:name=\"selectedOption[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(selectedOption[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #spinner=\"spinner\">\n\t\t\t<NcLoadingIcon v-if=\"spinner.loading\" />\n\t\t</template>\n\t\t<template #no-options>\n\t\t\t{{ t('No results') }}\n\t\t</template>\n\t\t<template v-for=\"(_, name) in $scopedSlots\" #[name]=\"data\">\n\t\t\t<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->\n\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t</template>\n\t</VueSelect>\n</template>\n\n<script>\nimport { VueSelect } from '@nextcloud/vue-select'\nimport '@nextcloud/vue-select/dist/vue-select.css'\nimport {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\tlimitShift,\n\toffset,\n\tshift,\n} from '@floating-ui/dom'\n\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\n\nimport NcEllipsisedOption from '../NcEllipsisedOption/index.js'\nimport NcListItemIcon from '../NcListItemIcon/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nimport l10n from '../../mixins/l10n.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSelect',\n\n\tcomponents: {\n\t\tChevronDown,\n\t\tNcEllipsisedOption,\n\t\tNcListItemIcon,\n\t\tNcLoadingIcon,\n\t\tVueSelect,\n\t},\n\n\tmixins: [\n\t\tl10n,\n\t],\n\n\tprops: {\n\t\t// Add VueSelect props to $props\n\t\t...VueSelect.props,\n\n\t\t/**\n\t\t * Append the dropdown element to the end of the body\n\t\t * and size/position it dynamically.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#appendtobody\n\t\t */\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this function is responsible for\n\t\t * positioning the drop down list.\n\t\t *\n\t\t * If a function is returned from `calculatePosition`, it will\n\t\t * be called when the drop down list is removed from the DOM.\n\t\t * This allows for any garbage collection you may need to do.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#calculateposition\n\t\t */\n\t\tcalculatePosition: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Close the dropdown when selecting an option\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#closeonselect\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Replace default vue-select components\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#components\n\t\t */\n\t\tcomponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tDeselect: {\n\t\t\t\t\trender: createElement => createElement(Close, {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tsize: 20,\n\t\t\t\t\t\t\tfillColor: 'var(--vs-controls-color)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * Sets the maximum number of options to display in the dropdown list\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Disable the component\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#disabled\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Determines whether the dropdown should be open.\n\t\t * Receives the component instance as the only argument.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#dropdownshouldopen\n\t\t */\n\t\tdropdownShouldOpen: {\n\t\t\ttype: Function,\n\t\t\tdefault: ({ noDrop, open }) => {\n\t\t\t\treturn noDrop ? false : open\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Callback to determine if the provided option should\n\t\t * match the current search text. Used to determine\n\t\t * if the option should be displayed.\n\t\t *\n\t\t * Defaults to the internal vue-select function documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to filter by the\n\t\t * `displayName` and `subname` properties of the user option object\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#filterby\n\t\t */\n\t\tfilterBy: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Class for the `input`\n\t\t *\n\t\t * Necessary for use in NcActionInput\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Input element id\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#inputid\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Display a visible border around dropdown options\n\t\t * which have keyboard focus\n\t\t */\n\t\tkeyboardFocusBorder: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Key of the displayed label for object options\n\t\t *\n\t\t * Defaults to the internal vue-select string documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to `'displayName'`\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#label\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Show the loading icon\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#loading\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Allow selection of multiple options\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#multiple\n\t\t */\n\t\tmultiple: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Disable automatic wrapping when selected options overflow the width\n\t\t */\n\t\tnoWrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Array of options\n\t\t *\n\t\t * @type {Array<string | number | Record<string | number, any>>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#options\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Placeholder text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#placeholder\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 * Customized component's response to keydown events while the search input has focus\n\t\t *\n\t\t * @see https://vue-select.org/guide/keydown.html#mapkeydown\n\t\t */\n\t\tmapKeydown: {\n\t\t\ttype: Function,\n\t\t\t/**\n\t\t\t * Patched Vue-Select keydown events handlers map to stop Escape propagation in open select\n\t\t\t *\n\t\t\t * @param {Record<number, Function>} map - Mapped keyCode to handlers { <keyCode>:<callback> }\n\t\t\t * @param {import('@nextcloud/vue-select').VueSelect} vm - VueSelect instance\n\t\t\t * @return {Record<number, Function>} patched keydown event handlers\n\t\t\t */\n\t\t\tdefault(map, vm) {\n\t\t\t\treturn {\n\t\t\t\t\t...map,\n\t\t\t\t\t/**\n\t\t\t\t\t * Patched Escape handler to stop propagation from open select\n\t\t\t\t\t *\n\t\t\t\t\t * @param {KeyboardEvent} event - default keydown event handler\n\t\t\t\t\t */\n\t\t\t\t\t27: (event) => {\n\t\t\t\t\t\tif (vm.open) {\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Default VueSelect's handler\n\t\t\t\t\t\tmap[27](event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * A unique identifier used to generate IDs and DOM attributes. Must be unique for every instance of the component.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#uid\n\t\t */\n\t\tuid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => '-' + GenRandomId(),\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this sets the placement of the dropdown\n\t\t *\n\t\t * @type {'bottom' | 'top'}\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * If false, the focused dropdown option will not be reset when filtered\n\t\t * options change\n\t\t */\n\t\tresetFocusOnOptionsChange: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Enable the user selector with avatars\n\t\t *\n\t\t * Objects must contain the data expected by the\n\t\t * [NcListItemIcon](#/Components/NcListItemIcon) and\n\t\t * [NcAvatar](#/Components/NcAvatar) components\n\t\t */\n\t\tuserSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Currently selected value\n\t\t *\n\t\t * The `v-model` directive may be used for two-way data binding\n\t\t *\n\t\t * @type {string | number | Record<string | number, any> | Array<any>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#value\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number, Object, Array],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Any available prop\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * All events from https://vue-select.org/api/events.html\n\t\t */\n\t\t// Not an actual event but needed to show in vue-styleguidist docs\n\t\t' ',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tlocalCalculatePosition() {\n\t\t\tif (this.calculatePosition !== null) {\n\t\t\t\treturn this.calculatePosition\n\t\t\t}\n\n\t\t\treturn (dropdownMenu, component, { width }) => {\n\t\t\t\tdropdownMenu.style.width = width\n\n\t\t\t\tconst addClass = {\n\t\t\t\t\tname: 'addClass',\n\t\t\t\t\tfn(_middlewareArgs) {\n\t\t\t\t\t\tdropdownMenu.classList.add('vs__dropdown-menu--floating')\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst togglePlacementClass = {\n\t\t\t\t\tname: 'togglePlacementClass',\n\t\t\t\t\tfn({ placement }) {\n\t\t\t\t\t\tcomponent.$el.classList.toggle(\n\t\t\t\t\t\t\t'select--drop-up',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\tdropdownMenu.classList.toggle(\n\t\t\t\t\t\t\t'vs__dropdown-menu--floating-placement-top',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst updatePosition = () => {\n\t\t\t\t\tcomputePosition(component.$refs.toggle, dropdownMenu, {\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tmiddleware: [\n\t\t\t\t\t\t\toffset(-1),\n\t\t\t\t\t\t\taddClass,\n\t\t\t\t\t\t\ttogglePlacementClass,\n\t\t\t\t\t\t\t// Match popperjs default collision prevention behavior by appending the following middleware in order\n\t\t\t\t\t\t\tflip(),\n\t\t\t\t\t\t\tshift({ limiter: limitShift() }),\n\t\t\t\t\t\t],\n\t\t\t\t\t}).then(({ x, y }) => {\n\t\t\t\t\t\tObject.assign(dropdownMenu.style, {\n\t\t\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tconst cleanup = autoUpdate(\n\t\t\t\t\tcomponent.$refs.toggle,\n\t\t\t\t\tdropdownMenu,\n\t\t\t\t\tupdatePosition,\n\t\t\t\t)\n\n\t\t\t\treturn cleanup\n\t\t\t}\n\t\t},\n\n\t\tlocalFilterBy() {\n\t\t\tif (this.filterBy !== null) {\n\t\t\t\treturn this.filterBy\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn (option, label, search) => {\n\t\t\t\t\treturn (`${label} ${option.subname}` || '')\n\t\t\t\t\t\t.toLocaleLowerCase()\n\t\t\t\t\t\t.indexOf(search.toLocaleLowerCase()) > -1\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn VueSelect.props.filterBy.default\n\t\t},\n\n\t\tlocalLabel() {\n\t\t\tif (this.label !== null) {\n\t\t\t\treturn this.label\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn 'displayName'\n\t\t\t}\n\t\t\treturn VueSelect.props.label.default\n\t\t},\n\n\t\tpropsToForward() {\n\t\t\tconst {\n\t\t\t\t// Props handled by this component\n\t\t\t\tinputClass,\n\t\t\t\tnoWrap,\n\t\t\t\tplacement,\n\t\t\t\tuserSelect,\n\t\t\t\t// Props to forward\n\t\t\t\t...initialPropsToForward\n\t\t\t} = this.$props\n\n\t\t\tconst propsToForward = {\n\t\t\t\t...initialPropsToForward,\n\t\t\t\t// Custom overrides of vue-select props\n\t\t\t\tcalculatePosition: this.localCalculatePosition,\n\t\t\t\tfilterBy: this.localFilterBy,\n\t\t\t\tlabel: this.localLabel,\n\t\t\t}\n\n\t\t\treturn propsToForward\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\nbody {\n\t/**\n\t * Set custom vue-select CSS variables.\n\t * Needs to be on the body (not :root) for theming to apply (see nextcloud/server#36462)\n\t */\n\n\t/* Search Input */\n\t--vs-search-input-color: var(--color-main-text);\n\t--vs-search-input-bg: var(--color-main-background);\n\t--vs-search-input-placeholder-color: var(--color-text-maxcontrast);\n\n\t/* Font */\n\t--vs-font-size: var(--default-font-size);\n\t--vs-line-height: var(--default-line-height);\n\n\t/* Disabled State */\n\t--vs-state-disabled-bg: var(--color-background-hover);\n\t--vs-state-disabled-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-controls-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-cursor: not-allowed;\n\t--vs-disabled-bg: var(--color-background-hover);\n\t--vs-disabled-color: var(--color-text-maxcontrast);\n\t--vs-disabled-cursor: not-allowed;\n\n\t/* Borders */\n\t--vs-border-color: var(--color-border-maxcontrast);\n\t--vs-border-width: 2px;\n\t--vs-border-style: solid;\n\t--vs-border-radius: var(--border-radius-large);\n\n\t/* Component Controls: Clear, Open Indicator */\n\t--vs-controls-color: var(--color-text-maxcontrast);\n\n\t/* Selected */\n\t--vs-selected-bg: var(--color-background-dark);\n\t--vs-selected-color: var(--color-main-text);\n\t--vs-selected-border-color: var(--vs-border-color);\n\t--vs-selected-border-style: var(--vs-border-style);\n\t--vs-selected-border-width: var(--vs-border-width);\n\n\t/* Dropdown */\n\t--vs-dropdown-bg: var(--color-main-background);\n\t--vs-dropdown-color: var(--color-main-text);\n\t--vs-dropdown-z-index: 9999;\n\t--vs-dropdown-box-shadow: 0px 2px 2px 0px var(--color-box-shadow);\n\n\t/* Options */\n\t--vs-dropdown-option-padding: 8px 20px;\n\n\t/* Active State */\n\t--vs-dropdown-option--active-bg: var(--color-background-hover);\n\t--vs-dropdown-option--active-color: var(--color-main-text);\n\n\t/* Keyboard Focus State */\n\t--vs-dropdown-option--kb-focus-box-shadow: inset 0px 0px 0px 2px var(--vs-border-color);\n\n\t/* Deselect State */\n\t--vs-dropdown-option--deselect-bg: var(--color-error);\n\t--vs-dropdown-option--deselect-color: #fff;\n\n\t/* Transitions */\n\t--vs-transition-duration: 0ms;\n}\n\n.v-select.select {\n\t/* Override default vue-select styles */\n\tmin-height: $clickable-area;\n\tmin-width: 260px;\n\tmargin: 0;\n\n\t.vs__selected {\n\t\tmin-height: 36px;\n\t\tpadding: 0 0.5em;\n\t\tborder-radius: calc(var(--vs-border-radius) - 4px) !important;\n\t}\n\n\t.vs__clear {\n\t\tmargin-right: 2px;\n\t}\n\n\t&.vs--open .vs__dropdown-toggle {\n\t\tborder-color: var(--color-primary-element);\n\t\tborder-bottom-color: transparent;\n\t}\n\n\t&:not(.vs--disabled, .vs--open) .vs__dropdown-toggle:hover {\n\t\tborder-color: var(--color-primary-element);\n\t}\n\n\t&.vs--disabled {\n\t\t.vs__search,\n\t\t.vs__selected {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.vs__clear,\n\t\t.vs__deselect {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t&--no-wrap {\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t\toverflow: auto;\n\t\t\tmin-width: unset;\n\t\t\t.vs__selected {\n\t\t\t\tmin-width: unset;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--drop-up {\n\t\t&.vs--open {\n\t\t\t.vs__dropdown-toggle {\n\t\t\t\tborder-radius: 0 0 var(--vs-border-radius) var(--vs-border-radius);\n\t\t\t\tborder-top-color: transparent;\n\t\t\t\tborder-bottom-color: var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.vs__selected-options {\n\t\t// If search is hidden, ensure that the height of the search is the same\n\t\tmin-height: 40px; // 36px search height + 4px search margin\n\n\t\t// Hide search from dom if unused to prevent unneeded flex wrap\n\t\t.vs__selected ~ .vs__search[readonly] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n\n\t&.vs--single {\n\t\t&.vs--loading,\n\t\t&.vs--open {\n\t\t\t.vs__selected {\n\t\t\t\t// Fix `max-width` for `position: absolute`\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t}\n\t}\n}\n\n.vs__dropdown-menu {\n\tborder-color: var(--color-primary-element) !important;\n\tpadding: 4px !important;\n\n\t&--floating {\n\t\t/* Fallback styles overidden by programmatically set inline styles */\n\t\twidth: max-content;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\n\t\t&-placement-top {\n\t\t\tborder-radius: var(--vs-border-radius) var(--vs-border-radius) 0 0 !important;\n\t\t\tborder-top-style: var(--vs-border-style) !important;\n\t\t\tborder-bottom-style: none !important;\n\t\t\tbox-shadow: 0px -1px 1px 0px var(--color-box-shadow) !important;\n\t\t}\n\t}\n\n\t.vs__dropdown-option {\n\t\tborder-radius: 6px !important;\n\t}\n\n\t.vs__no-options {\n\t\tcolor: var(--color-text-lighter) !important;\n\t}\n}\n</style>\n"],"names":["_sfc_main","ChevronDown__default","Components_NcEllipsisedOption","Components_NcListItemIcon","Components_NcLoadingIcon","vueSelect","l10n","createElement","Close__default","noDrop","open","map","vm","event","GenRandomId","dropdownMenu","component","width","addClass","_middlewareArgs","togglePlacementClass","placement","updatePosition","dom","x","y","option","label","search","inputClass","noWrap","userSelect","initialPropsToForward"],"mappings":";;;;AAsiBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC,EAAA;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC,EAAA;AAAA,EACA;AAAA,EAEA,QAAA;AAAA,IACAC,EA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;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcSelect.cjs","sources":["../../src/components/NcSelect/NcSelect.vue"],"sourcesContent":["<!--\n\t- @copyright 2022 Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @author Christopher Ng <chrng8@gmail.com>\n\t-\n\t- @license AGPL-3.0-or-later\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<docs>\n### Description\n\nGeneral purpose multiselect component.\n\n### Basic examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'Simple',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Simple (top placement)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tplacement: 'top',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (with placeholder)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tplaceholder: 'Select multiple options',\n\t\t\toptions: [\n\t\t\t\t'foo',\n\t\t\t\t'bar',\n\t\t\t\t'baz',\n\t\t\t\t'qux',\n\t\t\t\t'quux',\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple (objects, pre-selected, stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'baz',\n\t\t\t\t\tlabel: 'Baz',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'qux',\n\t\t\t\t\tlabel: 'Qux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'quux',\n\t\t\t\t\tlabel: 'Quux',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'corge',\n\t\t\t\t\tlabel: 'Corge',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'grault',\n\t\t\t\t\tlabel: 'Grault',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'garply',\n\t\t\t\t\tlabel: 'Garply',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'waldo',\n\t\t\t\t\tlabel: 'Waldo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'fred',\n\t\t\t\t\tlabel: 'Fred',\n\t\t\t\t},\n\t\t\t],\n\t\t\tvalue: [\n\t\t\t\t{\n\t\t\t\t\tid: 'foo',\n\t\t\t\t\tlabel: 'Foo',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'bar',\n\t\t\t\t\tlabel: 'Bar',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(2, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### No wrap example\n\nThe `noWrap` prop is set to `true` and the `max-width` of the multiselect\nparent container is limited to `350px`\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data1.props.inputId\">{{ data1.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"false\"\n\t\t\t\tv-bind=\"data1.props\"\n\t\t\t\tv-model=\"data1.props.value\" />\n\t\t</div>\n\t\t<div class=\"container\">\n\t\t\t<label :for=\"data2.props.inputId\">{{ data2.name }}</label>\n\t\t\t<NcSelect :no-wrap=\"true\"\n\t\t\t\tv-bind=\"data2.props\"\n\t\t\t\tv-model=\"data2.props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst data1 = {\n\tname: 'Wrapped (Default)',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nconst data2 = {\n\tname: 'Not wrapped',\n\tprops: {\n\t\tinputId: getRandomId(),\n\t\tmultiple: true,\n\t\tcloseOnSelect: false,\n\t\toptions: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t\tvalue: [\n\t\t\t'foo',\n\t\t\t'bar',\n\t\t\t'baz',\n\t\t\t'qux',\n\t\t\t'quux',\n\t\t\t'corge',\n\t\t\t'grault',\n\t\t\t'garply',\n\t\t\t'waldo',\n\t\t\t'fred',\n\t\t],\n\t},\n}\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdata1,\n\t\t\tdata2,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 1fr);\n\tgap: 10px;\n}\n\n.container {\n\tmax-width: 350px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n\n### User select examples\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<div v-for=\"{ name, props } in selectArray\"\n\t\t\tclass=\"container\">\n\t\t\t<label :for=\"props.inputId\">{{ name }}</label>\n\t\t\t<NcSelect v-bind=\"props\"\n\t\t\t\tv-model=\"props.value\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport AccountGroup from '@mdi/svg/svg/account-group.svg?raw'\nimport Email from '@mdi/svg/svg/email.svg?raw'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nconst getRandomId = () => {\n\treturn `select-${GenRandomId()}`\n}\n\nconst selectArray = [\n\t{\n\t\tname: 'User select',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t\t// Example of how to show the user status within the option\n\t\t\t\t\tuser: '0-john',\n\t\t\t\t\tpreloadedUserStatus: {\n\t\t\t\t\t\ticon: '',\n\t\t\t\t\t\tstatus: 'online',\n\t\t\t\t\t\tmessage: 'I am online',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\n\t{\n\t\tname: 'Multiple user select (stay open on select)',\n\t\tprops: {\n\t\t\tinputId: getRandomId(),\n\t\t\tuserSelect: true,\n\t\t\tmultiple: true,\n\t\t\tcloseOnSelect: false,\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tid: '0-john',\n\t\t\t\t\tdisplayName: 'John',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'john@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-emma',\n\t\t\t\t\tdisplayName: 'Emma',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'emma@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-olivia',\n\t\t\t\t\tdisplayName: 'Olivia',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'olivia@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-noah',\n\t\t\t\t\tdisplayName: 'Noah',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'noah@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '0-oliver',\n\t\t\t\t\tdisplayName: 'Oliver',\n\t\t\t\t\tisNoUser: false,\n\t\t\t\t\tsubname: 'oliver@example.org',\n\t\t\t\t\ticon: '',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '1-admin',\n\t\t\t\t\tdisplayName: 'Admin',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: null,\n\t\t\t\t\ticonSvg: AccountGroup,\n\t\t\t\t\ticonName: 'Group icon',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: '2-org@example.org',\n\t\t\t\t\tdisplayName: 'Organization',\n\t\t\t\t\tisNoUser: true,\n\t\t\t\t\tsubname: 'org@example.org',\n\t\t\t\t\ticonSvg: Email,\n\t\t\t\t\ticonName: 'Email icon',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectArray,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(1, 500px);\n\tgap: 10px;\n}\n\n.container {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px 0;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<VueSelect class=\"select\"\n\t\t:class=\"{\n\t\t\t'select--no-wrap': noWrap,\n\t\t\t'user-select': userSelect,\n\t\t}\"\n\t\tv-bind=\"propsToForward\"\n\t\tv-on=\"$listeners\"\n\t\t@search=\"searchString => search = searchString\">\n\t\t<template #search=\"{ attributes, events }\">\n\t\t\t<input :class=\"['vs__search', inputClass]\"\n\t\t\t\tv-bind=\"attributes\"\n\t\t\t\tv-on=\"events\">\n\t\t</template>\n\t\t<template #open-indicator=\"{ attributes }\">\n\t\t\t<ChevronDown v-bind=\"attributes\"\n\t\t\t\tfill-color=\"var(--vs-controls-color)\"\n\t\t\t\t:size=\"26\" />\n\t\t\t\t<!-- Set size to 26 to make up for the increased padding of this icon -->\n\t\t</template>\n\t\t<template #option=\"option\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"option\"\n\t\t\t\t:avatar-size=\"24\"\n\t\t\t\t:name=\"option[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(option[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcListItemIcon v-if=\"userSelect\"\n\t\t\t\tv-bind=\"selectedOption\"\n\t\t\t\t:avatar-size=\"24\"\n\t\t\t\t:name=\"selectedOption[localLabel]\"\n\t\t\t\t:search=\"search\" />\n\t\t\t<NcEllipsisedOption v-else\n\t\t\t\t:name=\"String(selectedOption[localLabel])\"\n\t\t\t\t:search=\"search\" />\n\t\t</template>\n\t\t<template #spinner=\"spinner\">\n\t\t\t<NcLoadingIcon v-if=\"spinner.loading\" />\n\t\t</template>\n\t\t<template #no-options>\n\t\t\t{{ t('No results') }}\n\t\t</template>\n\t\t<template v-for=\"(_, name) in $scopedSlots\" #[name]=\"data\">\n\t\t\t<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->\n\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t</template>\n\t</VueSelect>\n</template>\n\n<script>\nimport '@nextcloud/vue-select/dist/vue-select.css'\n\nimport { VueSelect } from '@nextcloud/vue-select'\nimport {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\tlimitShift,\n\toffset,\n\tshift,\n} from '@floating-ui/dom'\nimport { t } from '../../l10n.js'\n\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\n\nimport NcEllipsisedOption from '../NcEllipsisedOption/index.js'\nimport NcListItemIcon from '../NcListItemIcon/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSelect',\n\n\tcomponents: {\n\t\tChevronDown,\n\t\tNcEllipsisedOption,\n\t\tNcListItemIcon,\n\t\tNcLoadingIcon,\n\t\tVueSelect,\n\t},\n\n\tmixins: [\n\t\tl10n,\n\t],\n\n\tprops: {\n\t\t// Add VueSelect props to $props\n\t\t...VueSelect.props,\n\n\t\t/**\n\t\t * `aria-label` for the clear input button\n\t\t */\n\t\tariaLabelClearSelected: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Clear selected'),\n\t\t},\n\n\t\t/**\n\t\t * `aria-label` for the search input\n\t\t */\n\t\tariaLabelCombobox: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Search for options'),\n\t\t},\n\n\t\t/**\n\t\t * Allows to customize the `aria-label` for the deselect-option button\n\t\t * The default is \"Deselect \" + optionLabel\n\t\t * @type {(optionLabel: string) => string}\n\t\t */\n\t\tariaLabelDeselectOption: {\n\t\t\ttype: Function,\n\t\t\tdefault: (optionLabel) => t('Deselect {option}', { option: optionLabel }),\n\t\t},\n\n\t\t/**\n\t\t * Append the dropdown element to the end of the body\n\t\t * and size/position it dynamically.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#appendtobody\n\t\t */\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this function is responsible for\n\t\t * positioning the drop down list.\n\t\t *\n\t\t * If a function is returned from `calculatePosition`, it will\n\t\t * be called when the drop down list is removed from the DOM.\n\t\t * This allows for any garbage collection you may need to do.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#calculateposition\n\t\t */\n\t\tcalculatePosition: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Close the dropdown when selecting an option\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#closeonselect\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Replace default vue-select components\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#components\n\t\t */\n\t\tcomponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tDeselect: {\n\t\t\t\t\trender: createElement => createElement(Close, {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tsize: 20,\n\t\t\t\t\t\t\tfillColor: 'var(--vs-controls-color)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * Sets the maximum number of options to display in the dropdown list\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Disable the component\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#disabled\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Determines whether the dropdown should be open.\n\t\t * Receives the component instance as the only argument.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#dropdownshouldopen\n\t\t */\n\t\tdropdownShouldOpen: {\n\t\t\ttype: Function,\n\t\t\tdefault: ({ noDrop, open }) => {\n\t\t\t\treturn noDrop ? false : open\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Callback to determine if the provided option should\n\t\t * match the current search text. Used to determine\n\t\t * if the option should be displayed.\n\t\t *\n\t\t * Defaults to the internal vue-select function documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to filter by the\n\t\t * `displayName` and `subname` properties of the user option object\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#filterby\n\t\t */\n\t\tfilterBy: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Class for the `input`\n\t\t *\n\t\t * Necessary for use in NcActionInput\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Input element id\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#inputid\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Display a visible border around dropdown options\n\t\t * which have keyboard focus\n\t\t */\n\t\tkeyboardFocusBorder: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Key of the displayed label for object options\n\t\t *\n\t\t * Defaults to the internal vue-select string documented at the link\n\t\t * below\n\t\t *\n\t\t * Enabling `userSelect` will automatically set this to `'displayName'`\n\t\t * unless this prop is set explicitly\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#label\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Show the loading icon\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#loading\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Allow selection of multiple options\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#multiple\n\t\t */\n\t\tmultiple: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Disable automatic wrapping when selected options overflow the width\n\t\t */\n\t\tnoWrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Array of options\n\t\t *\n\t\t * @type {Array<string | number | Record<string | number, any>>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#options\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Placeholder text\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#placeholder\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 * Customized component's response to keydown events while the search input has focus\n\t\t *\n\t\t * @see https://vue-select.org/guide/keydown.html#mapkeydown\n\t\t */\n\t\tmapKeydown: {\n\t\t\ttype: Function,\n\t\t\t/**\n\t\t\t * Patched Vue-Select keydown events handlers map to stop Escape propagation in open select\n\t\t\t *\n\t\t\t * @param {Record<number, Function>} map - Mapped keyCode to handlers { <keyCode>:<callback> }\n\t\t\t * @param {import('@nextcloud/vue-select').VueSelect} vm - VueSelect instance\n\t\t\t * @return {Record<number, Function>} patched keydown event handlers\n\t\t\t */\n\t\t\tdefault(map, vm) {\n\t\t\t\treturn {\n\t\t\t\t\t...map,\n\t\t\t\t\t/**\n\t\t\t\t\t * Patched Escape handler to stop propagation from open select\n\t\t\t\t\t *\n\t\t\t\t\t * @param {KeyboardEvent} event - default keydown event handler\n\t\t\t\t\t */\n\t\t\t\t\t27: (event) => {\n\t\t\t\t\t\tif (vm.open) {\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Default VueSelect's handler\n\t\t\t\t\t\tmap[27](event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * A unique identifier used to generate IDs and DOM attributes. Must be unique for every instance of the component.\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#uid\n\t\t */\n\t\tuid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => '-' + GenRandomId(),\n\t\t},\n\n\t\t/**\n\t\t * When `appendToBody` is true, this sets the placement of the dropdown\n\t\t *\n\t\t * @type {'bottom' | 'top'}\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * If false, the focused dropdown option will not be reset when filtered\n\t\t * options change\n\t\t */\n\t\tresetFocusOnOptionsChange: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Enable the user selector with avatars\n\t\t *\n\t\t * Objects must contain the data expected by the\n\t\t * [NcListItemIcon](#/Components/NcListItemIcon) and\n\t\t * [NcAvatar](#/Components/NcAvatar) components\n\t\t */\n\t\tuserSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Currently selected value\n\t\t *\n\t\t * The `v-model` directive may be used for two-way data binding\n\t\t *\n\t\t * @type {string | number | Record<string | number, any> | Array<any>}\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html#value\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number, Object, Array],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Any available prop\n\t\t *\n\t\t * @see https://vue-select.org/api/props.html\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * All events from https://vue-select.org/api/events.html\n\t\t */\n\t\t// Not an actual event but needed to show in vue-styleguidist docs\n\t\t' ',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tlocalCalculatePosition() {\n\t\t\tif (this.calculatePosition !== null) {\n\t\t\t\treturn this.calculatePosition\n\t\t\t}\n\n\t\t\treturn (dropdownMenu, component, { width }) => {\n\t\t\t\tdropdownMenu.style.width = width\n\n\t\t\t\tconst addClass = {\n\t\t\t\t\tname: 'addClass',\n\t\t\t\t\tfn(_middlewareArgs) {\n\t\t\t\t\t\tdropdownMenu.classList.add('vs__dropdown-menu--floating')\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst togglePlacementClass = {\n\t\t\t\t\tname: 'togglePlacementClass',\n\t\t\t\t\tfn({ placement }) {\n\t\t\t\t\t\tcomponent.$el.classList.toggle(\n\t\t\t\t\t\t\t'select--drop-up',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\tdropdownMenu.classList.toggle(\n\t\t\t\t\t\t\t'vs__dropdown-menu--floating-placement-top',\n\t\t\t\t\t\t\tplacement === 'top',\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn {}\n\t\t\t\t\t},\n\t\t\t\t}\n\n\t\t\t\tconst updatePosition = () => {\n\t\t\t\t\tcomputePosition(component.$refs.toggle, dropdownMenu, {\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tmiddleware: [\n\t\t\t\t\t\t\toffset(-1),\n\t\t\t\t\t\t\taddClass,\n\t\t\t\t\t\t\ttogglePlacementClass,\n\t\t\t\t\t\t\t// Match popperjs default collision prevention behavior by appending the following middleware in order\n\t\t\t\t\t\t\tflip(),\n\t\t\t\t\t\t\tshift({ limiter: limitShift() }),\n\t\t\t\t\t\t],\n\t\t\t\t\t}).then(({ x, y }) => {\n\t\t\t\t\t\tObject.assign(dropdownMenu.style, {\n\t\t\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tconst cleanup = autoUpdate(\n\t\t\t\t\tcomponent.$refs.toggle,\n\t\t\t\t\tdropdownMenu,\n\t\t\t\t\tupdatePosition,\n\t\t\t\t)\n\n\t\t\t\treturn cleanup\n\t\t\t}\n\t\t},\n\n\t\tlocalFilterBy() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /[^<]*<([^>]+)/\n\n\t\t\tif (this.filterBy !== null) {\n\t\t\t\treturn this.filterBy\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn (option, label, search) => {\n\t\t\t\t\tconst match = search.match(EMAIL_NOTATION)\n\t\t\t\t\treturn (match && option.subname?.toLocaleLowerCase?.()?.indexOf(match[1].toLocaleLowerCase()) > -1)\n\t\t\t\t\t\t|| (`${label} ${option.subname}`\n\t\t\t\t\t\t\t.toLocaleLowerCase()\n\t\t\t\t\t\t\t.indexOf(search.toLocaleLowerCase()) > -1)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn VueSelect.props.filterBy.default\n\t\t},\n\n\t\tlocalLabel() {\n\t\t\tif (this.label !== null) {\n\t\t\t\treturn this.label\n\t\t\t}\n\t\t\tif (this.userSelect) {\n\t\t\t\treturn 'displayName'\n\t\t\t}\n\t\t\treturn VueSelect.props.label.default\n\t\t},\n\n\t\tpropsToForward() {\n\t\t\tconst {\n\t\t\t\t// Props handled by this component\n\t\t\t\tinputClass,\n\t\t\t\tnoWrap,\n\t\t\t\tplacement,\n\t\t\t\tuserSelect,\n\t\t\t\t// Props to forward\n\t\t\t\t...initialPropsToForward\n\t\t\t} = this.$props\n\n\t\t\tconst propsToForward = {\n\t\t\t\t...initialPropsToForward,\n\t\t\t\t// Custom overrides of vue-select props\n\t\t\t\tcalculatePosition: this.localCalculatePosition,\n\t\t\t\tfilterBy: this.localFilterBy,\n\t\t\t\tlabel: this.localLabel,\n\t\t\t}\n\n\t\t\treturn propsToForward\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\nbody {\n\t/**\n\t * Set custom vue-select CSS variables.\n\t * Needs to be on the body (not :root) for theming to apply (see nextcloud/server#36462)\n\t */\n\n\t/* Search Input */\n\t--vs-search-input-color: var(--color-main-text);\n\t--vs-search-input-bg: var(--color-main-background);\n\t--vs-search-input-placeholder-color: var(--color-text-maxcontrast);\n\n\t/* Font */\n\t--vs-font-size: var(--default-font-size);\n\t--vs-line-height: var(--default-line-height);\n\n\t/* Disabled State */\n\t--vs-state-disabled-bg: var(--color-background-hover);\n\t--vs-state-disabled-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-controls-color: var(--color-text-maxcontrast);\n\t--vs-state-disabled-cursor: not-allowed;\n\t--vs-disabled-bg: var(--color-background-hover);\n\t--vs-disabled-color: var(--color-text-maxcontrast);\n\t--vs-disabled-cursor: not-allowed;\n\n\t/* Borders */\n\t--vs-border-color: var(--color-border-maxcontrast);\n\t--vs-border-width: 2px;\n\t--vs-border-style: solid;\n\t--vs-border-radius: var(--border-radius-large);\n\n\t/* Component Controls: Clear, Open Indicator */\n\t--vs-controls-color: var(--color-main-text);\n\n\t/* Selected */\n\t--vs-selected-bg: var(--color-background-hover);\n\t--vs-selected-color: var(--color-main-text);\n\t--vs-selected-border-color: var(--vs-border-color);\n\t--vs-selected-border-style: var(--vs-border-style);\n\t--vs-selected-border-width: var(--vs-border-width);\n\n\t/* Dropdown */\n\t--vs-dropdown-bg: var(--color-main-background);\n\t--vs-dropdown-color: var(--color-main-text);\n\t--vs-dropdown-z-index: 9999;\n\t--vs-dropdown-box-shadow: 0px 2px 2px 0px var(--color-box-shadow);\n\n\t/* Options */\n\t--vs-dropdown-option-padding: 8px 20px;\n\n\t/* Active State */\n\t--vs-dropdown-option--active-bg: var(--color-background-hover);\n\t--vs-dropdown-option--active-color: var(--color-main-text);\n\n\t/* Keyboard Focus State */\n\t--vs-dropdown-option--kb-focus-box-shadow: inset 0px 0px 0px 2px var(--vs-border-color);\n\n\t/* Deselect State */\n\t--vs-dropdown-option--deselect-bg: var(--color-error);\n\t--vs-dropdown-option--deselect-color: #fff;\n\n\t/* Transitions */\n\t--vs-transition-duration: 0ms;\n\n\t/* Actions */\n\t--vs-actions-padding: 0 8px 0 4px;\n}\n\n.v-select.select {\n\t/* Override default vue-select styles */\n\tmin-height: $clickable-area;\n\tmin-width: 260px;\n\tmargin: 0;\n\n\t.vs__selected {\n\t\theight: 32px;\n\t\tpadding: 0 8px 0 12px;\n\t\tborder-radius: 18px !important;\n\t\tbackground: var(--color-primary-element-light);\n\t\tborder: none;\n\t}\n\n\t.vs__search, .vs__search:focus {\n\t\tmargin: 2px 0 0;\n\t}\n\n\t.vs__dropdown-toggle {\n\t\tpadding: 0;\n\t}\n\n\t.vs__clear {\n\t\tmargin-right: 2px;\n\t}\n\n\t&.vs--open .vs__dropdown-toggle {\n\t\toutline: 2px solid var(--color-main-background);\n\t\tborder-color: var(--color-main-text);\n\t\tborder-bottom-color: transparent;\n\t}\n\n\t&:not(.vs--disabled, .vs--open) .vs__dropdown-toggle:hover {\n\t\toutline: 2px solid var(--color-main-background);\n\t\tborder-color: var(--color-main-text);\n\t}\n\n\t&.vs--disabled {\n\t\t.vs__search,\n\t\t.vs__selected {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.vs__clear,\n\t\t.vs__deselect {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t&--no-wrap {\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t\toverflow: auto;\n\t\t\tmin-width: unset;\n\t\t\t.vs__selected {\n\t\t\t\tmin-width: unset;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--drop-up {\n\t\t&.vs--open {\n\t\t\t.vs__dropdown-toggle {\n\t\t\t\tborder-radius: 0 0 var(--vs-border-radius) var(--vs-border-radius);\n\t\t\t\tborder-top-color: transparent;\n\t\t\t\tborder-bottom-color: var(--color-main-text);\n\t\t\t}\n\t\t}\n\t}\n\n\t.vs__selected-options {\n\t\t// If search is hidden, ensure that the height of the search is the same\n\t\tmin-height: 40px; // 36px search height + 4px search margin\n\n\t\t// Hide search from dom if unused to prevent unneeded flex wrap\n\t\t.vs__selected ~ .vs__search[readonly] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n\n\t&.vs--single {\n\t\t&.vs--loading,\n\t\t&.vs--open {\n\t\t\t.vs__selected {\n\t\t\t\t// Fix `max-width` for `position: absolute`\n\t\t\t\tmax-width: 100%;\n\t\t\t\t// Fix color to be accessible\n\t\t\t\topacity: 1;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\t\t}\n\t\t.vs__selected-options {\n\t\t\tflex-wrap: nowrap;\n\t\t}\n\t}\n}\n\n.vs__dropdown-menu {\n\tborder-color: var(--color-main-text) !important;\n\toutline: 2px solid var(--color-main-background);\n\tpadding: 4px !important;\n\tbox-shadow: none;\n\n\t&--floating {\n\t\t/* Fallback styles overidden by programmatically set inline styles */\n\t\twidth: max-content;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\n\t\t&-placement-top {\n\t\t\tborder-radius: var(--vs-border-radius) var(--vs-border-radius) 0 0 !important;\n\t\t\tborder-top-style: var(--vs-border-style) !important;\n\t\t\tborder-bottom-style: none !important;\n\t\t}\n\t}\n\n\t.vs__dropdown-option {\n\t\tborder-radius: 6px !important;\n\t}\n\n\t.vs__no-options {\n\t\tcolor: var(--color-text-lighter) !important;\n\t}\n}\n\n// Selected users require slightly different padding\n.user-select .vs__selected {\n\tpadding: 0 2px !important;\n}\n\n</style>\n"],"names":["_sfc_main","ChevronDown","Components_NcEllipsisedOption","Components_NcListItemIcon","Components_NcLoadingIcon","vueSelect","l10n","l10n$1","optionLabel","createElement","Close","noDrop","open","map","vm","event","GenRandomId","dropdownMenu","component","width","addClass","_middlewareArgs","togglePlacementClass","placement","updatePosition","dom","x","y","EMAIL_NOTATION","option","label","search","match","_c","_b","_a","inputClass","noWrap","userSelect","initialPropsToForward"],"mappings":";;;AAijBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC,EAAA;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC,EAAA;AAAA,EACA;AAAA,EAEA,QAAA;AAAA,IACAC,EAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,GAAAD,EAAA,UAAA;AAAA;AAAA;AAAA;AAAA,IAKA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAAE,EAAA,EAAA,gBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAAA,EAAA,EAAA,oBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,yBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,CAAAC,MAAAD,EAAA,EAAA,qBAAA,EAAA,QAAAC,EAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA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A;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,30 +1,54 @@
|
|
|
1
|
-
import "../assets/index-
|
|
2
|
-
import { VueSelect as s } from "@nextcloud/vue-select";
|
|
1
|
+
import "../assets/index-750c02cc.css";
|
|
3
2
|
import "@nextcloud/vue-select/dist/vue-select.css";
|
|
4
|
-
import {
|
|
5
|
-
import y from "
|
|
6
|
-
import
|
|
7
|
-
import h from "
|
|
8
|
-
import g from "
|
|
9
|
-
import b from "./
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
3
|
+
import { VueSelect as s } from "@nextcloud/vue-select";
|
|
4
|
+
import { autoUpdate as p, computePosition as f, offset as d, flip as m, shift as y, limitShift as _ } from "@floating-ui/dom";
|
|
5
|
+
import { t as c } from "../chunks/l10n-b6d21146.mjs";
|
|
6
|
+
import { C as h } from "../chunks/ChevronDown-a72d365d.mjs";
|
|
7
|
+
import { C as g } from "../chunks/Close-271f72e2.mjs";
|
|
8
|
+
import b from "./NcEllipsisedOption.mjs";
|
|
9
|
+
import S from "./NcListItemIcon.mjs";
|
|
10
|
+
import L from "./NcLoadingIcon.mjs";
|
|
11
|
+
import { l as C } from "../chunks/l10n-bef4ea85.mjs";
|
|
12
|
+
import { G as v } from "../chunks/GenRandomId-cb9ccebe.mjs";
|
|
13
|
+
import { n as N } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
14
|
+
const B = {
|
|
14
15
|
name: "NcSelect",
|
|
15
16
|
components: {
|
|
16
|
-
ChevronDown:
|
|
17
|
-
NcEllipsisedOption:
|
|
18
|
-
NcListItemIcon:
|
|
19
|
-
NcLoadingIcon:
|
|
17
|
+
ChevronDown: h,
|
|
18
|
+
NcEllipsisedOption: b,
|
|
19
|
+
NcListItemIcon: S,
|
|
20
|
+
NcLoadingIcon: L,
|
|
20
21
|
VueSelect: s
|
|
21
22
|
},
|
|
22
23
|
mixins: [
|
|
23
|
-
|
|
24
|
+
C
|
|
24
25
|
],
|
|
25
26
|
props: {
|
|
26
27
|
// Add VueSelect props to $props
|
|
27
28
|
...s.props,
|
|
29
|
+
/**
|
|
30
|
+
* `aria-label` for the clear input button
|
|
31
|
+
*/
|
|
32
|
+
ariaLabelClearSelected: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: c("Clear selected")
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* `aria-label` for the search input
|
|
38
|
+
*/
|
|
39
|
+
ariaLabelCombobox: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: c("Search for options")
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Allows to customize the `aria-label` for the deselect-option button
|
|
45
|
+
* The default is "Deselect " + optionLabel
|
|
46
|
+
* @type {(optionLabel: string) => string}
|
|
47
|
+
*/
|
|
48
|
+
ariaLabelDeselectOption: {
|
|
49
|
+
type: Function,
|
|
50
|
+
default: (l) => c("Deselect {option}", { option: l })
|
|
51
|
+
},
|
|
28
52
|
/**
|
|
29
53
|
* Append the dropdown element to the end of the body
|
|
30
54
|
* and size/position it dynamically.
|
|
@@ -67,7 +91,7 @@ const v = {
|
|
|
67
91
|
type: Object,
|
|
68
92
|
default: () => ({
|
|
69
93
|
Deselect: {
|
|
70
|
-
render: (l) => l(
|
|
94
|
+
render: (l) => l(g, {
|
|
71
95
|
props: {
|
|
72
96
|
size: 20,
|
|
73
97
|
fillColor: "var(--vs-controls-color)"
|
|
@@ -244,7 +268,7 @@ const v = {
|
|
|
244
268
|
*/
|
|
245
269
|
uid: {
|
|
246
270
|
type: String,
|
|
247
|
-
default: () => "-" +
|
|
271
|
+
default: () => "-" + v()
|
|
248
272
|
},
|
|
249
273
|
/**
|
|
250
274
|
* When `appendToBody` is true, this sets the placement of the dropdown
|
|
@@ -317,7 +341,7 @@ const v = {
|
|
|
317
341
|
fn(n) {
|
|
318
342
|
return l.classList.add("vs__dropdown-menu--floating"), {};
|
|
319
343
|
}
|
|
320
|
-
},
|
|
344
|
+
}, a = {
|
|
321
345
|
name: "togglePlacementClass",
|
|
322
346
|
fn({ placement: n }) {
|
|
323
347
|
return e.$el.classList.toggle(
|
|
@@ -328,33 +352,38 @@ const v = {
|
|
|
328
352
|
n === "top"
|
|
329
353
|
), {};
|
|
330
354
|
}
|
|
331
|
-
},
|
|
332
|
-
|
|
355
|
+
}, r = () => {
|
|
356
|
+
f(e.$refs.toggle, l, {
|
|
333
357
|
placement: this.placement,
|
|
334
358
|
middleware: [
|
|
335
|
-
|
|
359
|
+
d(-1),
|
|
336
360
|
t,
|
|
337
|
-
|
|
361
|
+
a,
|
|
338
362
|
// Match popperjs default collision prevention behavior by appending the following middleware in order
|
|
339
|
-
|
|
340
|
-
|
|
363
|
+
m(),
|
|
364
|
+
y({ limiter: _() })
|
|
341
365
|
]
|
|
342
|
-
}).then(({ x: n, y:
|
|
366
|
+
}).then(({ x: n, y: u }) => {
|
|
343
367
|
Object.assign(l.style, {
|
|
344
368
|
left: `${n}px`,
|
|
345
|
-
top: `${
|
|
369
|
+
top: `${u}px`
|
|
346
370
|
});
|
|
347
371
|
});
|
|
348
372
|
};
|
|
349
|
-
return
|
|
373
|
+
return p(
|
|
350
374
|
e.$refs.toggle,
|
|
351
375
|
l,
|
|
352
|
-
|
|
376
|
+
r
|
|
353
377
|
);
|
|
354
378
|
};
|
|
355
379
|
},
|
|
356
380
|
localFilterBy() {
|
|
357
|
-
|
|
381
|
+
const l = /[^<]*<([^>]+)/;
|
|
382
|
+
return this.filterBy !== null ? this.filterBy : this.userSelect ? (e, o, t) => {
|
|
383
|
+
var r, i, n;
|
|
384
|
+
const a = t.match(l);
|
|
385
|
+
return a && ((n = (i = (r = e.subname) == null ? void 0 : r.toLocaleLowerCase) == null ? void 0 : i.call(r)) == null ? void 0 : n.indexOf(a[1].toLocaleLowerCase())) > -1 || `${o} ${e.subname}`.toLocaleLowerCase().indexOf(t.toLocaleLowerCase()) > -1;
|
|
386
|
+
} : s.props.filterBy.default;
|
|
358
387
|
},
|
|
359
388
|
localLabel() {
|
|
360
389
|
return this.label !== null ? this.label : this.userSelect ? "displayName" : s.props.label.default;
|
|
@@ -367,10 +396,10 @@ const v = {
|
|
|
367
396
|
placement: o,
|
|
368
397
|
userSelect: t,
|
|
369
398
|
// Props to forward
|
|
370
|
-
...
|
|
399
|
+
...a
|
|
371
400
|
} = this.$props;
|
|
372
401
|
return {
|
|
373
|
-
...
|
|
402
|
+
...a,
|
|
374
403
|
// Custom overrides of vue-select props
|
|
375
404
|
calculatePosition: this.localCalculatePosition,
|
|
376
405
|
filterBy: this.localFilterBy,
|
|
@@ -379,38 +408,39 @@ const v = {
|
|
|
379
408
|
}
|
|
380
409
|
}
|
|
381
410
|
};
|
|
382
|
-
var
|
|
411
|
+
var I = function() {
|
|
383
412
|
var e = this, o = e._self._c;
|
|
384
413
|
return o("VueSelect", e._g(e._b({ staticClass: "select", class: {
|
|
385
|
-
"select--no-wrap": e.noWrap
|
|
386
|
-
|
|
387
|
-
|
|
414
|
+
"select--no-wrap": e.noWrap,
|
|
415
|
+
"user-select": e.userSelect
|
|
416
|
+
}, on: { search: (t) => e.search = t }, scopedSlots: e._u([{ key: "search", fn: function({ attributes: t, events: a }) {
|
|
417
|
+
return [o("input", e._g(e._b({ class: ["vs__search", e.inputClass] }, "input", t, !1), a))];
|
|
388
418
|
} }, { key: "open-indicator", fn: function({ attributes: t }) {
|
|
389
419
|
return [o("ChevronDown", e._b({ attrs: { "fill-color": "var(--vs-controls-color)", size: 26 } }, "ChevronDown", t, !1))];
|
|
390
420
|
} }, { key: "option", fn: function(t) {
|
|
391
|
-
return [e.userSelect ? o("NcListItemIcon", e._b({ attrs: { name: t[e.localLabel], search: e.search } }, "NcListItemIcon", t, !1)) : o("NcEllipsisedOption", { attrs: { name: String(t[e.localLabel]), search: e.search } })];
|
|
421
|
+
return [e.userSelect ? o("NcListItemIcon", e._b({ attrs: { "avatar-size": 24, name: t[e.localLabel], search: e.search } }, "NcListItemIcon", t, !1)) : o("NcEllipsisedOption", { attrs: { name: String(t[e.localLabel]), search: e.search } })];
|
|
392
422
|
} }, { key: "selected-option", fn: function(t) {
|
|
393
|
-
return [e.userSelect ? o("NcListItemIcon", e._b({ attrs: { name: t[e.localLabel], search: e.search } }, "NcListItemIcon", t, !1)) : o("NcEllipsisedOption", { attrs: { name: String(t[e.localLabel]), search: e.search } })];
|
|
423
|
+
return [e.userSelect ? o("NcListItemIcon", e._b({ attrs: { "avatar-size": 24, name: t[e.localLabel], search: e.search } }, "NcListItemIcon", t, !1)) : o("NcEllipsisedOption", { attrs: { name: String(t[e.localLabel]), search: e.search } })];
|
|
394
424
|
} }, { key: "spinner", fn: function(t) {
|
|
395
425
|
return [t.loading ? o("NcLoadingIcon") : e._e()];
|
|
396
426
|
} }, { key: "no-options", fn: function() {
|
|
397
427
|
return [e._v(" " + e._s(e.t("No results")) + " ")];
|
|
398
|
-
}, proxy: !0 }, e._l(e.$scopedSlots, function(t,
|
|
399
|
-
return { key:
|
|
400
|
-
return [e._t(
|
|
428
|
+
}, proxy: !0 }, e._l(e.$scopedSlots, function(t, a) {
|
|
429
|
+
return { key: a, fn: function(r) {
|
|
430
|
+
return [e._t(a, null, null, r)];
|
|
401
431
|
} };
|
|
402
432
|
})], null, !0) }, "VueSelect", e.propsToForward, !1), e.$listeners));
|
|
403
|
-
},
|
|
404
|
-
v,
|
|
433
|
+
}, w = [], F = /* @__PURE__ */ N(
|
|
405
434
|
B,
|
|
406
|
-
|
|
435
|
+
I,
|
|
436
|
+
w,
|
|
407
437
|
!1,
|
|
408
438
|
null,
|
|
409
439
|
null,
|
|
410
440
|
null,
|
|
411
441
|
null
|
|
412
442
|
);
|
|
413
|
-
const
|
|
443
|
+
const G = F.exports;
|
|
414
444
|
export {
|
|
415
|
-
|
|
445
|
+
G as default
|
|
416
446
|
};
|