@nextcloud/vue 8.0.0-beta.6 → 8.0.0-beta.8
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 +17 -0
- package/dist/Components/NcActionButton.cjs +49 -1
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +48 -12
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +30 -1
- package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +30 -9
- package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
- package/dist/Components/NcActionCaption.cjs +29 -1
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +29 -9
- package/dist/Components/NcActionCaption.mjs.map +1 -1
- package/dist/Components/NcActionCheckbox.cjs +78 -1
- package/dist/Components/NcActionCheckbox.cjs.map +1 -1
- package/dist/Components/NcActionCheckbox.mjs +80 -19
- package/dist/Components/NcActionCheckbox.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +226 -1
- package/dist/Components/NcActionInput.cjs.map +1 -1
- package/dist/Components/NcActionInput.mjs +227 -68
- package/dist/Components/NcActionInput.mjs.map +1 -1
- package/dist/Components/NcActionLink.cjs +69 -1
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +65 -13
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +85 -1
- package/dist/Components/NcActionRadio.cjs.map +1 -1
- package/dist/Components/NcActionRadio.mjs +87 -19
- package/dist/Components/NcActionRadio.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +42 -1
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +41 -12
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionSeparator.cjs +20 -1
- package/dist/Components/NcActionSeparator.cjs.map +1 -1
- package/dist/Components/NcActionSeparator.mjs +20 -9
- package/dist/Components/NcActionSeparator.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +23 -1
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +20 -8
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +81 -1
- package/dist/Components/NcActionTextEditable.cjs.map +1 -1
- package/dist/Components/NcActionTextEditable.mjs +79 -22
- package/dist/Components/NcActionTextEditable.mjs.map +1 -1
- package/dist/Components/NcActions.cjs +455 -1
- package/dist/Components/NcActions.cjs.map +1 -1
- package/dist/Components/NcActions.mjs +459 -100
- package/dist/Components/NcActions.mjs.map +1 -1
- package/dist/Components/NcAppContent.cjs +218 -1
- package/dist/Components/NcAppContent.cjs.map +1 -1
- package/dist/Components/NcAppContent.mjs +220 -66
- package/dist/Components/NcAppContent.mjs.map +1 -1
- package/dist/Components/NcAppContentDetails.cjs +19 -1
- package/dist/Components/NcAppContentDetails.cjs.map +1 -1
- package/dist/Components/NcAppContentDetails.mjs +18 -7
- package/dist/Components/NcAppContentDetails.mjs.map +1 -1
- package/dist/Components/NcAppContentList.cjs +29 -1
- package/dist/Components/NcAppContentList.cjs.map +1 -1
- package/dist/Components/NcAppContentList.mjs +29 -8
- package/dist/Components/NcAppContentList.mjs.map +1 -1
- package/dist/Components/NcAppNavigation.cjs +66 -1
- package/dist/Components/NcAppNavigation.cjs.map +1 -1
- package/dist/Components/NcAppNavigation.mjs +67 -28
- package/dist/Components/NcAppNavigation.mjs.map +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +44 -1
- package/dist/Components/NcAppNavigationCaption.cjs.map +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +40 -9
- package/dist/Components/NcAppNavigationCaption.mjs.map +1 -1
- package/dist/Components/NcAppNavigationIconBullet.cjs +40 -1
- package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
- package/dist/Components/NcAppNavigationIconBullet.mjs +40 -15
- package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +386 -1
- package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +382 -81
- package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +50 -1
- package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +51 -14
- package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +87 -1
- package/dist/Components/NcAppNavigationNewItem.cjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +83 -17
- package/dist/Components/NcAppNavigationNewItem.mjs.map +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +69 -1
- package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +60 -21
- package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
- package/dist/Components/NcAppNavigationSpacer.cjs +20 -1
- package/dist/Components/NcAppNavigationSpacer.cjs.map +1 -1
- package/dist/Components/NcAppNavigationSpacer.mjs +20 -9
- package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +25 -1
- package/dist/Components/NcAppNavigationToggle.cjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +21 -1
- package/dist/Components/NcAppNavigationToggle.mjs.map +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +207 -1
- package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +209 -48
- package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +39 -1
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +39 -13
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +443 -1
- package/dist/Components/NcAppSidebar.cjs.map +1 -1
- package/dist/Components/NcAppSidebar.mjs +409 -92
- package/dist/Components/NcAppSidebar.mjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.cjs +83 -1
- package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +83 -20
- package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
- package/dist/Components/NcAvatar.cjs +3 -1
- package/dist/Components/NcAvatar.cjs.map +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +175 -1
- package/dist/Components/NcBreadcrumb.cjs.map +1 -1
- package/dist/Components/NcBreadcrumb.mjs +175 -35
- package/dist/Components/NcBreadcrumb.mjs.map +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +372 -1
- package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +373 -142
- package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
- package/dist/Components/NcButton.cjs +226 -1
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +226 -24
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +237 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +243 -57
- package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
- package/dist/Components/NcColorPicker.cjs +118 -1
- package/dist/Components/NcColorPicker.cjs.map +1 -1
- package/dist/Components/NcColorPicker.mjs +124 -46
- package/dist/Components/NcColorPicker.mjs.map +1 -1
- package/dist/Components/NcContent.cjs +25 -1
- package/dist/Components/NcContent.cjs.map +1 -1
- package/dist/Components/NcContent.mjs +24 -8
- package/dist/Components/NcContent.mjs.map +1 -1
- package/dist/Components/NcCounterBubble.cjs +47 -1
- package/dist/Components/NcCounterBubble.cjs.map +1 -1
- package/dist/Components/NcCounterBubble.mjs +46 -12
- package/dist/Components/NcCounterBubble.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +133 -1
- package/dist/Components/NcDashboardWidget.cjs.map +1 -1
- package/dist/Components/NcDashboardWidget.mjs +128 -39
- package/dist/Components/NcDashboardWidget.mjs.map +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +138 -1
- package/dist/Components/NcDashboardWidgetItem.cjs.map +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +129 -22
- package/dist/Components/NcDashboardWidgetItem.mjs.map +1 -1
- package/dist/Components/NcDateTime.cjs +125 -0
- package/dist/Components/{NcDatetime.mjs.map → NcDateTime.cjs.map} +1 -1
- package/dist/Components/NcDateTime.mjs +129 -0
- package/dist/Components/{NcDatetime.cjs.map → NcDateTime.mjs.map} +1 -1
- package/dist/Components/NcDateTimePicker.cjs +217 -0
- package/dist/Components/NcDateTimePicker.cjs.map +1 -0
- package/dist/Components/NcDateTimePicker.mjs +228 -0
- package/dist/Components/NcDateTimePicker.mjs.map +1 -0
- package/dist/Components/NcDateTimePickerNative.cjs +199 -1
- package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +195 -58
- package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
- package/dist/Components/NcEllipsisedOption.cjs +74 -1
- package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
- package/dist/Components/NcEllipsisedOption.mjs +73 -20
- package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
- package/dist/Components/NcEmojiPicker.cjs +175 -1
- package/dist/Components/NcEmojiPicker.cjs.map +1 -1
- package/dist/Components/NcEmojiPicker.mjs +173 -53
- package/dist/Components/NcEmojiPicker.mjs.map +1 -1
- package/dist/Components/NcEmptyContent.cjs +54 -1
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +46 -10
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcGuestContent.cjs +26 -1
- package/dist/Components/NcGuestContent.cjs.map +1 -1
- package/dist/Components/NcGuestContent.mjs +24 -11
- package/dist/Components/NcGuestContent.mjs.map +1 -1
- package/dist/Components/NcHeaderMenu.cjs +167 -1
- package/dist/Components/NcHeaderMenu.cjs.map +1 -1
- package/dist/Components/NcHeaderMenu.mjs +161 -49
- package/dist/Components/NcHeaderMenu.mjs.map +1 -1
- package/dist/Components/NcHighlight.cjs +3 -1
- package/dist/Components/NcHighlight.cjs.map +1 -1
- package/dist/Components/NcHighlight.mjs +1 -1
- package/dist/Components/NcIconSvgWrapper.cjs +44 -1
- package/dist/Components/NcIconSvgWrapper.cjs.map +1 -1
- package/dist/Components/NcIconSvgWrapper.mjs +45 -15
- package/dist/Components/NcIconSvgWrapper.mjs.map +1 -1
- package/dist/Components/NcInputField.cjs +210 -1
- package/dist/Components/NcInputField.cjs.map +1 -1
- package/dist/Components/NcInputField.mjs +211 -38
- package/dist/Components/NcInputField.mjs.map +1 -1
- package/dist/Components/NcListItem.cjs +237 -1
- package/dist/Components/NcListItem.cjs.map +1 -1
- package/dist/Components/NcListItem.mjs +233 -57
- package/dist/Components/NcListItem.mjs.map +1 -1
- package/dist/Components/NcListItemIcon.cjs +150 -1
- package/dist/Components/NcListItemIcon.cjs.map +1 -1
- package/dist/Components/NcListItemIcon.mjs +142 -26
- package/dist/Components/NcListItemIcon.mjs.map +1 -1
- package/dist/Components/NcLoadingIcon.cjs +54 -1
- package/dist/Components/NcLoadingIcon.cjs.map +1 -1
- package/dist/Components/NcLoadingIcon.mjs +54 -14
- package/dist/Components/NcLoadingIcon.mjs.map +1 -1
- package/dist/Components/NcModal.cjs +405 -1
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +401 -103
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +71 -1
- package/dist/Components/NcNoteCard.cjs.map +1 -1
- package/dist/Components/NcNoteCard.mjs +71 -37
- package/dist/Components/NcNoteCard.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +152 -1
- package/dist/Components/NcPasswordField.cjs.map +1 -1
- package/dist/Components/NcPasswordField.mjs +157 -53
- package/dist/Components/NcPasswordField.mjs.map +1 -1
- package/dist/Components/NcPopover.cjs +125 -1
- package/dist/Components/NcPopover.cjs.map +1 -1
- package/dist/Components/NcPopover.mjs +124 -41
- package/dist/Components/NcPopover.mjs.map +1 -1
- package/dist/Components/NcProgressBar.cjs +57 -1
- package/dist/Components/NcProgressBar.cjs.map +1 -1
- package/dist/Components/NcProgressBar.mjs +57 -15
- package/dist/Components/NcProgressBar.mjs.map +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +168 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +166 -60
- package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
- package/dist/Components/NcRichContenteditable.cjs +478 -1
- package/dist/Components/NcRichContenteditable.cjs.map +1 -1
- package/dist/Components/NcRichContenteditable.mjs +447 -127
- package/dist/Components/NcRichContenteditable.mjs.map +1 -1
- package/dist/Components/NcRichText.cjs +44 -1
- package/dist/Components/NcRichText.cjs.map +1 -1
- package/dist/Components/NcRichText.mjs +25 -4
- package/dist/Components/NcRichText.mjs.map +1 -1
- package/dist/Components/NcSavingIndicatorIcon.cjs +59 -1
- package/dist/Components/NcSavingIndicatorIcon.cjs.map +1 -1
- package/dist/Components/NcSavingIndicatorIcon.mjs +56 -9
- package/dist/Components/NcSavingIndicatorIcon.mjs.map +1 -1
- package/dist/Components/NcSelect.cjs +406 -1
- package/dist/Components/NcSelect.cjs.map +1 -1
- package/dist/Components/NcSelect.mjs +402 -49
- package/dist/Components/NcSelect.mjs.map +1 -1
- package/dist/Components/NcSelectTags.cjs +251 -2
- package/dist/Components/NcSelectTags.cjs.map +1 -1
- package/dist/Components/NcSelectTags.mjs +236 -73
- package/dist/Components/NcSelectTags.mjs.map +1 -1
- package/dist/Components/NcSettingsInputText.cjs +90 -1
- package/dist/Components/NcSettingsInputText.cjs.map +1 -1
- package/dist/Components/NcSettingsInputText.mjs +88 -19
- package/dist/Components/NcSettingsInputText.mjs.map +1 -1
- package/dist/Components/NcSettingsSection.cjs +62 -1
- package/dist/Components/NcSettingsSection.cjs.map +1 -1
- package/dist/Components/NcSettingsSection.mjs +62 -15
- package/dist/Components/NcSettingsSection.mjs.map +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +26 -1
- package/dist/Components/NcSettingsSelectGroup.cjs.map +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +24 -53
- package/dist/Components/NcSettingsSelectGroup.mjs.map +1 -1
- package/dist/Components/NcTextField.cjs +74 -1
- package/dist/Components/NcTextField.cjs.map +1 -1
- package/dist/Components/NcTextField.mjs +77 -21
- package/dist/Components/NcTextField.mjs.map +1 -1
- package/dist/Components/NcTimezonePicker.cjs +4387 -614
- package/dist/Components/NcTimezonePicker.cjs.map +1 -1
- package/dist/Components/NcTimezonePicker.mjs +4372 -663
- package/dist/Components/NcTimezonePicker.mjs.map +1 -1
- package/dist/Components/NcUserBubble.cjs +189 -1
- package/dist/Components/NcUserBubble.cjs.map +1 -1
- package/dist/Components/NcUserBubble.mjs +190 -47
- package/dist/Components/NcUserBubble.mjs.map +1 -1
- package/dist/Components/NcVNodes.cjs +35 -1
- package/dist/Components/NcVNodes.cjs.map +1 -1
- package/dist/Components/NcVNodes.mjs +35 -8
- package/dist/Components/NcVNodes.mjs.map +1 -1
- package/dist/Directives/Focus.cjs +30 -1
- package/dist/Directives/Focus.cjs.map +1 -1
- package/dist/Directives/Focus.mjs +28 -5
- package/dist/Directives/Focus.mjs.map +1 -1
- package/dist/Directives/Linkify.cjs +8 -1
- package/dist/Directives/Linkify.cjs.map +1 -1
- package/dist/Directives/Linkify.mjs +6 -6
- package/dist/Directives/Linkify.mjs.map +1 -1
- package/dist/Directives/Tooltip.cjs +37 -1
- package/dist/Directives/Tooltip.cjs.map +1 -1
- package/dist/Directives/Tooltip.mjs +29 -4
- package/dist/Directives/Tooltip.mjs.map +1 -1
- package/dist/Functions/emoji.cjs +36 -1
- package/dist/Functions/emoji.cjs.map +1 -1
- package/dist/Functions/emoji.mjs +32 -11
- package/dist/Functions/emoji.mjs.map +1 -1
- package/dist/Functions/usernameToColor.cjs +39 -1
- package/dist/Functions/usernameToColor.cjs.map +1 -1
- package/dist/Functions/usernameToColor.mjs +32 -11
- package/dist/Functions/usernameToColor.mjs.map +1 -1
- package/dist/Mixins/clickOutsideOptions.cjs +40 -1
- package/dist/Mixins/clickOutsideOptions.cjs.map +1 -1
- package/dist/Mixins/clickOutsideOptions.mjs +39 -4
- package/dist/Mixins/clickOutsideOptions.mjs.map +1 -1
- package/dist/Mixins/isFullscreen.cjs +44 -1
- package/dist/Mixins/isFullscreen.cjs.map +1 -1
- package/dist/Mixins/isFullscreen.mjs +42 -11
- package/dist/Mixins/isFullscreen.mjs.map +1 -1
- package/dist/Mixins/isMobile.cjs +87 -1
- package/dist/Mixins/isMobile.cjs.map +1 -1
- package/dist/Mixins/isMobile.mjs +86 -11
- package/dist/Mixins/isMobile.mjs.map +1 -1
- package/dist/Mixins/richEditor.cjs +10 -1
- package/dist/Mixins/richEditor.cjs.map +1 -1
- package/dist/Mixins/richEditor.mjs +2 -2
- package/dist/assets/{index28.css → NcAppNavigationToggle-2cc5b864.css} +16 -2
- package/dist/assets/NcInputConfirmCancel-2ba60a52.css +51 -0
- package/dist/assets/NcMentionBubble-6e887c5f.css +81 -0
- package/dist/assets/{index46.css → NcSettingsSelectGroup-0d38d76b.css} +15 -2
- package/dist/assets/index-01e5adf4.css +79 -0
- package/dist/assets/index-03ec5f40.css +60 -0
- package/dist/assets/{index.css → index-0557f12a.css} +26 -2
- package/dist/assets/index-0ab8e182.css +128 -0
- package/dist/assets/index-0adc989c.css +96 -0
- package/dist/assets/index-1151d229.css +41 -0
- package/dist/assets/index-165fce0e.css +82 -0
- package/dist/assets/index-194e9415.css +163 -0
- package/dist/assets/index-1beccc92.css +140 -0
- package/dist/assets/index-1cf8eeb4.css +97 -0
- package/dist/assets/index-23e64bbb.css +59 -0
- package/dist/assets/{index50.css → index-24f6c355.css} +67 -3
- package/dist/assets/index-294382c8.css +879 -0
- package/dist/assets/index-2a8e4ca1.css +540 -0
- package/dist/assets/index-2d4de2fc.css +38 -0
- package/dist/assets/{index2.css → index-30e099f7.css} +17 -2
- package/dist/assets/{NcInputConfirmCancel.css → index-33da80f0.css} +32 -2
- package/dist/assets/index-34dfc54e.css +88 -0
- package/dist/assets/index-3764a447.css +99 -0
- package/dist/assets/index-376d2dec.css +243 -0
- package/dist/assets/{index17.css → index-441b6552.css} +25 -2
- package/dist/assets/index-4a775ba1.css +204 -0
- package/dist/assets/index-4ebacc78.css +107 -0
- package/dist/assets/index-4ef32afd.css +128 -0
- package/dist/assets/{index47.css → index-5072b6ee.css} +77 -3
- package/dist/assets/index-50b0766d.css +202 -0
- package/dist/assets/index-5eff69c7.css +149 -0
- package/dist/assets/index-5fa0ac5a.css +46 -0
- package/dist/assets/index-61b63a8f.css +57 -0
- package/dist/assets/index-6405cd50.css +76 -0
- package/dist/assets/index-6416f636.css +83 -0
- package/dist/assets/index-6c47e88a.css +46 -0
- package/dist/assets/index-76a58945.css +68 -0
- package/dist/assets/index-76dd9f11.css +5 -0
- package/dist/assets/index-7768d5e5.css +148 -0
- package/dist/assets/index-7813bab3.css +66 -0
- package/dist/assets/index-793eae6b.css +234 -0
- package/dist/assets/index-8aa4712e.css +51 -0
- package/dist/assets/{index27.css → index-8f52a20f.css} +16 -2
- package/dist/assets/index-9354264c.css +80 -0
- package/dist/assets/index-93ad846c.css +259 -0
- package/dist/assets/index-a2b51bce.css +47 -0
- package/dist/assets/index-a2d55f92.css +204 -0
- package/dist/assets/{index13.css → index-a9e4fe04.css} +27 -2
- package/dist/assets/{NcAppNavigationToggle.css → index-b8f13a1f.css} +13 -2
- package/dist/assets/index-b991895f.css +87 -0
- package/dist/assets/{index48.css → index-baf8711a.css} +67 -3
- package/dist/assets/index-becfbea7.css +128 -0
- package/dist/assets/index-c6f0da2e.css +69 -0
- package/dist/assets/index-c7905a53.css +44 -0
- package/dist/assets/index-d211cae8.css +93 -0
- package/dist/assets/{index22.css → index-d646553d.css} +22 -2
- package/dist/assets/index-de0326c7.css +304 -0
- package/dist/assets/index-ed4adf1d.css +115 -0
- package/dist/assets/index-edee3304.css +52 -0
- package/dist/assets/index-fbdeb5ab.css +303 -0
- package/dist/assets/index-fc61f2d8.css +41 -0
- package/dist/assets/index-fec4bb7b.css +132 -0
- package/dist/assets/referencePickerModal-0acecb5e.css +482 -0
- package/dist/chunks/GenColors-38246c38.mjs +46 -0
- package/dist/chunks/{GenColors-8097de04.cjs.map → GenColors-38246c38.mjs.map} +1 -1
- package/dist/chunks/GenColors-eedcc70a.cjs +45 -0
- package/dist/chunks/{GenColors-85cb6194.mjs.map → GenColors-eedcc70a.cjs.map} +1 -1
- package/dist/{assets/index29.css → chunks/GenRandomId-c214d235.cjs} +8 -5
- package/dist/chunks/{GenRandomId-67df40eb.cjs.map → GenRandomId-c214d235.cjs.map} +1 -1
- package/dist/chunks/GenRandomId-cb9ccebe.mjs +25 -0
- package/dist/chunks/{GenRandomId-1e1b509a.mjs.map → GenRandomId-cb9ccebe.mjs.map} +1 -1
- package/dist/chunks/Linkify-39f20c9a.mjs +33 -0
- package/dist/chunks/{Linkify-a0faf443.mjs.map → Linkify-39f20c9a.mjs.map} +1 -1
- package/dist/chunks/Linkify-40cdd635.cjs +32 -0
- package/dist/chunks/{Linkify-a4db36a9.cjs.map → Linkify-40cdd635.cjs.map} +1 -1
- package/dist/chunks/NcAppNavigationToggle-960658a0.cjs +49 -0
- package/dist/chunks/NcAppNavigationToggle-960658a0.cjs.map +1 -0
- package/dist/chunks/NcAppNavigationToggle-d868f651.mjs +55 -0
- package/dist/chunks/NcAppNavigationToggle-d868f651.mjs.map +1 -0
- package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs +83 -0
- package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs.map +1 -0
- package/dist/chunks/NcInputConfirmCancel-f881168d.mjs +89 -0
- package/dist/chunks/NcInputConfirmCancel-f881168d.mjs.map +1 -0
- package/dist/chunks/NcRichText-1c3d2654.mjs +302 -0
- package/dist/chunks/{NcRichText-13b09624.mjs.map → NcRichText-1c3d2654.mjs.map} +1 -1
- package/dist/chunks/NcRichText-d385dc10.cjs +289 -0
- package/dist/chunks/{NcRichText-1e8854a1.cjs.map → NcRichText-d385dc10.cjs.map} +1 -1
- package/dist/chunks/NcSettingsSelectGroup-0f4a0f94.mjs +192 -0
- package/dist/chunks/NcSettingsSelectGroup-0f4a0f94.mjs.map +1 -0
- package/dist/chunks/NcSettingsSelectGroup-47d9c113.cjs +183 -0
- package/dist/chunks/NcSettingsSelectGroup-47d9c113.cjs.map +1 -0
- package/dist/chunks/ScopeComponent-1c75ec38.cjs +28 -0
- package/dist/chunks/{ScopeComponent-f6122f5a.cjs.map → ScopeComponent-1c75ec38.cjs.map} +1 -1
- package/dist/chunks/ScopeComponent-97a014a1.mjs +29 -0
- package/dist/chunks/{ScopeComponent-dbcd0e07.mjs.map → ScopeComponent-97a014a1.mjs.map} +1 -1
- package/dist/chunks/_plugin-vue2_normalizer-71e2aa87.mjs +32 -0
- package/dist/chunks/_plugin-vue2_normalizer-71e2aa87.mjs.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer-7f9efb60.cjs +31 -0
- package/dist/chunks/_plugin-vue2_normalizer-7f9efb60.cjs.map +1 -0
- package/dist/chunks/actionGlobal-8c1c28c9.mjs +50 -0
- package/dist/chunks/{actionGlobal-cda46023.mjs.map → actionGlobal-8c1c28c9.mjs.map} +1 -1
- package/dist/chunks/actionGlobal-9e29e11b.cjs +49 -0
- package/dist/chunks/{actionGlobal-ec7003e8.cjs.map → actionGlobal-9e29e11b.cjs.map} +1 -1
- package/dist/chunks/actionText-9f5c55bd.mjs +121 -0
- package/dist/chunks/{actionText-6c35d3fc.mjs.map → actionText-9f5c55bd.mjs.map} +1 -1
- package/dist/chunks/actionText-b0bd6eb7.cjs +120 -0
- package/dist/chunks/{actionText-bef01778.cjs.map → actionText-b0bd6eb7.cjs.map} +1 -1
- package/dist/chunks/focusTrap-14985831.cjs +26 -0
- package/dist/chunks/{focusTrap-173aba65.mjs.map → focusTrap-14985831.cjs.map} +1 -1
- package/dist/chunks/focusTrap-5d0f71d4.mjs +27 -0
- package/dist/chunks/{focusTrap-139520e2.cjs.map → focusTrap-5d0f71d4.mjs.map} +1 -1
- package/dist/chunks/index-20a9ace9.mjs +149 -0
- package/dist/chunks/{index-cd3f1f8f.mjs.map → index-20a9ace9.mjs.map} +1 -1
- package/dist/chunks/index-2a5b8ace.cjs +434 -0
- package/dist/chunks/index-2a5b8ace.cjs.map +1 -0
- package/dist/chunks/index-4398f925.cjs +149 -0
- package/dist/chunks/{index-c4cd0463.cjs.map → index-4398f925.cjs.map} +1 -1
- package/dist/chunks/index-5f2a5f57.mjs +155 -0
- package/dist/chunks/{index-9c621303.mjs.map → index-5f2a5f57.mjs.map} +1 -1
- package/dist/chunks/index-6c221fa0.mjs +447 -0
- package/dist/chunks/index-6c221fa0.mjs.map +1 -0
- package/dist/chunks/index-e894376a.cjs +148 -0
- package/dist/chunks/{index-df3f51c6.cjs.map → index-e894376a.cjs.map} +1 -1
- package/dist/chunks/l10n-27a75c40.mjs +31 -0
- package/dist/chunks/l10n-27a75c40.mjs.map +1 -0
- package/dist/chunks/l10n-4326316a.cjs +8 -0
- package/dist/chunks/l10n-4326316a.cjs.map +1 -0
- package/dist/chunks/l10n-903083c4.cjs +29 -0
- package/dist/chunks/l10n-903083c4.cjs.map +1 -0
- package/dist/chunks/l10n-c5f5f001.mjs +10 -0
- package/dist/chunks/l10n-c5f5f001.mjs.map +1 -0
- package/dist/chunks/logger-3612e664.mjs +25 -0
- package/dist/chunks/{logger-01af1a78.cjs.map → logger-3612e664.mjs.map} +1 -1
- package/dist/chunks/logger-4998b668.cjs +24 -0
- package/dist/chunks/{logger-ccc7ee65.mjs.map → logger-4998b668.cjs.map} +1 -1
- package/dist/chunks/referencePickerModal-0fde503d.mjs +877 -0
- package/dist/chunks/referencePickerModal-0fde503d.mjs.map +1 -0
- package/dist/chunks/referencePickerModal-9b4ff88d.cjs +858 -0
- package/dist/chunks/referencePickerModal-9b4ff88d.cjs.map +1 -0
- package/dist/index.cjs +251 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +286 -140
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/dist/Components/NcDatetime.cjs +0 -1
- package/dist/Components/NcDatetime.mjs +0 -44
- package/dist/Components/NcDatetimePicker.cjs +0 -1
- package/dist/Components/NcDatetimePicker.cjs.map +0 -1
- package/dist/Components/NcDatetimePicker.mjs +0 -69
- package/dist/Components/NcDatetimePicker.mjs.map +0 -1
- package/dist/assets/NcMentionBubble.css +0 -21
- package/dist/assets/index10.css +0 -21
- package/dist/assets/index11.css +0 -21
- package/dist/assets/index12.css +0 -21
- package/dist/assets/index14.css +0 -21
- package/dist/assets/index15.css +0 -21
- package/dist/assets/index16.css +0 -21
- package/dist/assets/index18.css +0 -21
- package/dist/assets/index19.css +0 -21
- package/dist/assets/index20.css +0 -21
- package/dist/assets/index21.css +0 -21
- package/dist/assets/index23.css +0 -21
- package/dist/assets/index24.css +0 -1
- package/dist/assets/index25.css +0 -21
- package/dist/assets/index26.css +0 -21
- package/dist/assets/index3.css +0 -21
- package/dist/assets/index30.css +0 -21
- package/dist/assets/index31.css +0 -21
- package/dist/assets/index32.css +0 -21
- package/dist/assets/index33.css +0 -21
- package/dist/assets/index34.css +0 -21
- package/dist/assets/index35.css +0 -21
- package/dist/assets/index36.css +0 -21
- package/dist/assets/index37.css +0 -21
- package/dist/assets/index38.css +0 -21
- package/dist/assets/index39.css +0 -21
- package/dist/assets/index4.css +0 -21
- package/dist/assets/index40.css +0 -21
- package/dist/assets/index41.css +0 -21
- package/dist/assets/index42.css +0 -21
- package/dist/assets/index43.css +0 -42
- package/dist/assets/index44.css +0 -21
- package/dist/assets/index45.css +0 -42
- package/dist/assets/index49.css +0 -42
- package/dist/assets/index5.css +0 -21
- package/dist/assets/index51.css +0 -21
- package/dist/assets/index52.css +0 -21
- package/dist/assets/index53.css +0 -42
- package/dist/assets/index54.css +0 -21
- package/dist/assets/index55.css +0 -21
- package/dist/assets/index56.css +0 -21
- package/dist/assets/index57.css +0 -21
- package/dist/assets/index58.css +0 -42
- package/dist/assets/index6.css +0 -21
- package/dist/assets/index7.css +0 -21
- package/dist/assets/index8.css +0 -21
- package/dist/assets/index9.css +0 -21
- package/dist/assets/referencePickerModal.css +0 -21
- package/dist/chunks/GenColors-8097de04.cjs +0 -1
- package/dist/chunks/GenColors-85cb6194.mjs +0 -25
- package/dist/chunks/GenRandomId-1e1b509a.mjs +0 -4
- package/dist/chunks/GenRandomId-67df40eb.cjs +0 -1
- package/dist/chunks/IsMobileState-151fc57d.cjs +0 -1
- package/dist/chunks/IsMobileState-151fc57d.cjs.map +0 -1
- package/dist/chunks/IsMobileState-e1fe5f58.mjs +0 -15
- package/dist/chunks/IsMobileState-e1fe5f58.mjs.map +0 -1
- package/dist/chunks/Linkify-a0faf443.mjs +0 -5
- package/dist/chunks/Linkify-a4db36a9.cjs +0 -1
- package/dist/chunks/NcAppNavigationToggle-5aa396d7.mjs +0 -23
- package/dist/chunks/NcAppNavigationToggle-5aa396d7.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-c566f66e.cjs +0 -1
- package/dist/chunks/NcAppNavigationToggle-c566f66e.cjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-77c2b04f.cjs +0 -1
- package/dist/chunks/NcInputConfirmCancel-77c2b04f.cjs.map +0 -1
- package/dist/chunks/NcInputConfirmCancel-c440e1b1.mjs +0 -43
- package/dist/chunks/NcInputConfirmCancel-c440e1b1.mjs.map +0 -1
- package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-b35c2f97.cjs.map +0 -1
- package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-b99cdc21.mjs.map +0 -1
- package/dist/chunks/NcRichText-13b09624.mjs +0 -123
- package/dist/chunks/NcRichText-1e8854a1.cjs +0 -1
- package/dist/chunks/ScopeComponent-dbcd0e07.mjs +0 -8
- package/dist/chunks/ScopeComponent-f6122f5a.cjs +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-5b4c43a4.mjs +0 -24
- package/dist/chunks/_plugin-vue2_normalizer-5b4c43a4.mjs.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-764a4c12.cjs +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-764a4c12.cjs.map +0 -1
- package/dist/chunks/actionGlobal-cda46023.mjs +0 -15
- package/dist/chunks/actionGlobal-ec7003e8.cjs +0 -1
- package/dist/chunks/actionText-6c35d3fc.mjs +0 -23
- package/dist/chunks/actionText-bef01778.cjs +0 -1
- package/dist/chunks/focusTrap-139520e2.cjs +0 -1
- package/dist/chunks/focusTrap-173aba65.mjs +0 -6
- package/dist/chunks/index-12fa9b26.cjs +0 -1
- package/dist/chunks/index-12fa9b26.cjs.map +0 -1
- package/dist/chunks/index-7aa3fc24.mjs +0 -171
- package/dist/chunks/index-7aa3fc24.mjs.map +0 -1
- package/dist/chunks/index-9c621303.mjs +0 -46
- package/dist/chunks/index-c4cd0463.cjs +0 -3
- package/dist/chunks/index-cd3f1f8f.mjs +0 -43
- package/dist/chunks/index-df3f51c6.cjs +0 -1
- package/dist/chunks/l10n-05baf7da.mjs +0 -5
- package/dist/chunks/l10n-05baf7da.mjs.map +0 -1
- package/dist/chunks/l10n-46d0c1c0.cjs +0 -1
- package/dist/chunks/l10n-46d0c1c0.cjs.map +0 -1
- package/dist/chunks/l10n-9a5a6afc.mjs +0 -18
- package/dist/chunks/l10n-9a5a6afc.mjs.map +0 -1
- package/dist/chunks/l10n-dacb6440.cjs +0 -1
- package/dist/chunks/l10n-dacb6440.cjs.map +0 -1
- package/dist/chunks/logger-01af1a78.cjs +0 -1
- package/dist/chunks/logger-ccc7ee65.mjs +0 -5
- package/dist/chunks/referencePickerModal-2b16b319.mjs +0 -428
- package/dist/chunks/referencePickerModal-2b16b319.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-44160fb3.cjs +0 -1
- package/dist/chunks/referencePickerModal-44160fb3.cjs.map +0 -1
|
@@ -1 +1,175 @@
|
|
|
1
|
-
var
|
|
1
|
+
var j = require("../assets/index-2a8e4ca1.css");
|
|
2
|
+
const c = require("./NcPopover.cjs"), l = require("./NcTextField.cjs"), r = require("../chunks/l10n-903083c4.cjs"), a = require("emoji-mart-vue-fast"), u = require("emoji-mart-vue-fast/data/all.json"), f = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), p = (t) => t && t.__esModule ? t : { default: t }, d = /* @__PURE__ */ p(u);
|
|
3
|
+
let o;
|
|
4
|
+
const m = {
|
|
5
|
+
search: r.t("Search emoji"),
|
|
6
|
+
notfound: r.t("No emoji found"),
|
|
7
|
+
categories: {
|
|
8
|
+
search: r.t("Search results"),
|
|
9
|
+
recent: r.t("Frequently used"),
|
|
10
|
+
smileys: r.t("Smileys & Emotion"),
|
|
11
|
+
people: r.t("People & Body"),
|
|
12
|
+
nature: r.t("Animals & Nature"),
|
|
13
|
+
foods: r.t("Food & Drink"),
|
|
14
|
+
activity: r.t("Activities"),
|
|
15
|
+
places: r.t("Travel & Places"),
|
|
16
|
+
objects: r.t("Objects"),
|
|
17
|
+
symbols: r.t("Symbols"),
|
|
18
|
+
flags: r.t("Flags"),
|
|
19
|
+
custom: r.t("Custom")
|
|
20
|
+
}
|
|
21
|
+
}, h = {
|
|
22
|
+
name: "NcEmojiPicker",
|
|
23
|
+
components: {
|
|
24
|
+
NcPopover: c,
|
|
25
|
+
NcTextField: l,
|
|
26
|
+
Emoji: a.Emoji,
|
|
27
|
+
Picker: a.Picker
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
/**
|
|
31
|
+
* The emoji-set
|
|
32
|
+
*/
|
|
33
|
+
activeSet: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "native"
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Show preview section when hovering emoji
|
|
39
|
+
*/
|
|
40
|
+
showPreview: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Allow unselecting the selected emoji
|
|
46
|
+
*/
|
|
47
|
+
allowUnselect: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Selected emoji to allow unselecting
|
|
53
|
+
*/
|
|
54
|
+
selectedEmoji: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ""
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* The fallback emoji in the preview section
|
|
60
|
+
*/
|
|
61
|
+
previewFallbackEmoji: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "grinning"
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* The fallback text in the preview section
|
|
67
|
+
*/
|
|
68
|
+
previewFallbackName: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: r.t("Pick an emoji")
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* Whether to close the emoji picker after picking one
|
|
74
|
+
*/
|
|
75
|
+
closeOnSelect: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !0
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Selector for the popover container
|
|
81
|
+
*/
|
|
82
|
+
container: {
|
|
83
|
+
type: [String, Object, Element, Boolean],
|
|
84
|
+
default: "body"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
emits: [
|
|
88
|
+
"select",
|
|
89
|
+
"select-data",
|
|
90
|
+
"unselect"
|
|
91
|
+
],
|
|
92
|
+
setup() {
|
|
93
|
+
return o || (o = new a.EmojiIndex(d.default)), {
|
|
94
|
+
// Non-reactive constants
|
|
95
|
+
emojiIndex: o,
|
|
96
|
+
i18n: m
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
data() {
|
|
100
|
+
return {
|
|
101
|
+
search: "",
|
|
102
|
+
open: !1
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
computed: {
|
|
106
|
+
native() {
|
|
107
|
+
return this.activeSet === "native";
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
t: r.t,
|
|
112
|
+
clearSearch() {
|
|
113
|
+
var e, i;
|
|
114
|
+
this.search = "";
|
|
115
|
+
const t = (i = (e = this.$refs.search) == null ? void 0 : e.$refs.inputField) == null ? void 0 : i.$refs.input;
|
|
116
|
+
t && t.focus();
|
|
117
|
+
},
|
|
118
|
+
select(t) {
|
|
119
|
+
this.$emit("select", t.native), this.$emit("select-data", t), this.closeOnSelect && (this.open = !1);
|
|
120
|
+
},
|
|
121
|
+
unselect() {
|
|
122
|
+
this.$emit("unselect");
|
|
123
|
+
},
|
|
124
|
+
afterShow() {
|
|
125
|
+
var i, s;
|
|
126
|
+
this.$refs.picker.$el.addEventListener("keydown", this.checkKeyEvent);
|
|
127
|
+
const e = (s = (i = this.$refs.search) == null ? void 0 : i.$refs.inputField) == null ? void 0 : s.$refs.input;
|
|
128
|
+
e && e.focus();
|
|
129
|
+
},
|
|
130
|
+
afterHide() {
|
|
131
|
+
this.$refs.picker.$el.removeEventListener("keydown", this.checkKeyEvent);
|
|
132
|
+
},
|
|
133
|
+
checkKeyEvent(t) {
|
|
134
|
+
if (t.key !== "Tab")
|
|
135
|
+
return;
|
|
136
|
+
const i = this.$refs.picker.$el.querySelectorAll(
|
|
137
|
+
"button, input"
|
|
138
|
+
), s = i.length - 1;
|
|
139
|
+
if (i.length <= 1) {
|
|
140
|
+
t.preventDefault();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
t.shiftKey === !1 && t.target === i[s] ? (t.preventDefault(), i[0].focus()) : t.shiftKey === !0 && t.target === i[0] && (t.preventDefault(), i[s].focus());
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var _ = function() {
|
|
148
|
+
var e = this, i = e._self._c;
|
|
149
|
+
return i("NcPopover", e._g(e._b({ attrs: { shown: e.open, container: e.container }, on: { "update:shown": function(s) {
|
|
150
|
+
e.open = s;
|
|
151
|
+
}, "after-show": e.afterShow, "after-hide": e.afterHide }, scopedSlots: e._u([{ key: "trigger", fn: function() {
|
|
152
|
+
return [e._t("default")];
|
|
153
|
+
}, proxy: !0 }], null, !0) }, "NcPopover", e.$attrs, !1), e.$listeners), [i("Picker", e._b({ ref: "picker", attrs: { "auto-focus": !1, color: "var(--color-primary-element)", data: e.emojiIndex, emoji: e.previewFallbackEmoji, i18n: e.i18n, native: e.native, "emoji-size": 20, "per-line": 8, "picker-styles": { width: "320px" }, "show-preview": e.showPreview, title: e.previewFallbackName }, on: { select: e.select }, scopedSlots: e._u([{ key: "searchTemplate", fn: function(s) {
|
|
154
|
+
return [i("NcTextField", { ref: "search", staticClass: "search", attrs: { value: e.search, label: e.t("Search"), "label-visible": !0, placeholder: e.i18n.search, "trailing-button-icon": "close", "trailing-button-label": e.t("Clear search"), "show-trailing-button": e.search !== "" }, on: { "update:value": [function(n) {
|
|
155
|
+
e.search = n;
|
|
156
|
+
}, function(n) {
|
|
157
|
+
return s.onSearch(e.search);
|
|
158
|
+
}], "trailing-button-click": function(n) {
|
|
159
|
+
e.clearSearch(), s.onSearch(e.search);
|
|
160
|
+
} } })];
|
|
161
|
+
} }, e.allowUnselect && e.selectedEmoji ? { key: "customCategory", fn: function() {
|
|
162
|
+
return [i("div", { staticClass: "emoji-mart-category-label" }, [i("h3", { staticClass: "emoji-mart-category-label" }, [e._v(" " + e._s(e.t("Selected")) + " ")])]), i("Emoji", { staticClass: "emoji-selected", attrs: { data: e.emojiIndex, emoji: e.selectedEmoji, native: !0, size: 32 }, on: { click: e.unselect } }), i("Emoji", { staticClass: "emoji-delete", attrs: { data: e.emojiIndex, emoji: ":x:", native: !0, size: 10 }, on: { click: e.unselect } })];
|
|
163
|
+
}, proxy: !0 } : null], null, !0) }, "Picker", e.$attrs, !1))], 1);
|
|
164
|
+
}, v = [], y = /* @__PURE__ */ f.normalizeComponent(
|
|
165
|
+
h,
|
|
166
|
+
_,
|
|
167
|
+
v,
|
|
168
|
+
!1,
|
|
169
|
+
null,
|
|
170
|
+
"4d56e499",
|
|
171
|
+
null,
|
|
172
|
+
null
|
|
173
|
+
);
|
|
174
|
+
const k = y.exports;
|
|
175
|
+
module.exports = k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEmojiPicker.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"NcEmojiPicker.cjs","sources":["../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Georg Ehrke <oc.list@georgehrke.com>\n -\n - @author 2020 Georg Ehrke <oc.list@georgehrke.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover :shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger>\n\t\t\t<slot />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\t:auto-focus=\"false /* We manage the input focus ourselves */\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"slotProps\">\n\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t@trailing-button-click=\"clearSearch(); slotProps.onSearch(search);\"\n\t\t\t\t\t@update:value=\"slotProps.onSearch(search)\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\nimport { t } from '../../l10n.js'\n\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport data from 'emoji-mart-vue-fast/data/all.json'\n\n// Shared emoji index for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nexport default {\n\tname: 'NcEmojiPicker',\n\tcomponents: {\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tEmoji,\n\t\tPicker,\n\t},\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\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 * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\t// add focus trap in modal\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.addEventListener('keydown', this.checkKeyEvent)\n\n\t\t\t// set focus on input search field\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// remove keydown listner if popover is hidden\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.removeEventListener('keydown', this.checkKeyEvent)\n\t\t},\n\n\t\tcheckKeyEvent(event) {\n\t\t\tif (event.key !== 'Tab') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst picker = this.$refs.picker\n\t\t\tconst focusableList = picker.$el.querySelectorAll(\n\t\t\t\t'button, input',\n\t\t\t)\n\t\t\tconst last = focusableList.length - 1\n\t\t\t// escape early if only 1 or no elements to focus\n\t\t\tif (focusableList.length <= 1) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.shiftKey === false && event.target === focusableList[last]) {\n\t\t\t\t// Jump to first item when pressing tab on the latest item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[0].focus()\n\t\t\t} else if (event.shiftKey === true && event.target === focusableList[0]) {\n\t\t\t\t// Jump to the last item if pressing shift+tab on the first item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[last].focus()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// default style reset\n\tbutton {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t\theight: 36px;\n\t\twidth: auto;\n\n\t\t* {\n\t\t\tcursor: pointer !important;\n\t\t}\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-search input:focus-visible {\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t\toutline: none;\n\t}\n\n\t.emoji-mart-bar {\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: var(--border-radius) !important;\n\t\t\tborder-top-right-radius: var(--border-radius) !important;\n\t\t}\n\t}\n\n\t.emoji-mart-anchors {\n\t\tbutton {\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 12px 4px;\n\t\t\theight: auto;\n\t\t\t&:focus-visible {\n\t\t\t\t/* box-shadow: inset 0 0 0 2px var(--color-primary-element); */\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tjustify-content: start;\n\n\t\t.emoji-mart-category-label,\n\t\t.emoji-mart-emoji {\n\t\t\tuser-select: none;\n\t\t\tflex-grow: 0;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.emoji-mart-category-label {\n\t\t\tflex-basis: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t.emoji-mart-emoji {\n\t\t\t// 8 emoji per row\n\t\t\tflex-basis: calc(100% / 8);\n\t\t\ttext-align: center;\n\n\t\t\t&:hover::before,\n\t\t\t&.emoji-mart-emoji-selected::before{\n\t\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t\tbutton {\n\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 2px solid var(--color-primary-element) !important;\n\t\t\t\tborder-radius: 50%;\n\t\t\t}\n\t\t}\n\t}\n\n}\n\n.search {\n\tpadding: 4px 8px;\n}\n\n</style>\n\n<style scoped>\n.row-selected span {\n\tvertical-align: middle;\n}\n\n.row-selected button {\n\tvertical-align: middle;\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["emojiIndex","i18n","l10n","_sfc_main","Components_NcPopover","Components_NcTextField","emojiMartVueFast","data__default","input","_b","_a","emojiObject","event","focusableList","last"],"mappings":"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"}
|
|
@@ -1,62 +1,182 @@
|
|
|
1
|
-
import "../assets/
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { t as
|
|
5
|
-
import { Emoji as l, Picker as
|
|
6
|
-
import
|
|
7
|
-
import { n as
|
|
8
|
-
let
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var t, r;
|
|
26
|
-
this.$refs.picker.$el.addEventListener("keydown", this.checkKeyEvent);
|
|
27
|
-
const e = (r = (t = this.$refs.search) == null ? void 0 : t.$refs.inputField) == null ? void 0 : r.$refs.input;
|
|
28
|
-
e && e.focus();
|
|
29
|
-
}, afterHide() {
|
|
30
|
-
this.$refs.picker.$el.removeEventListener("keydown", this.checkKeyEvent);
|
|
31
|
-
}, checkKeyEvent(e) {
|
|
32
|
-
if (e.key !== "Tab")
|
|
33
|
-
return;
|
|
34
|
-
const t = this.$refs.picker.$el.querySelectorAll("button, input"), r = t.length - 1;
|
|
35
|
-
if (t.length <= 1) {
|
|
36
|
-
e.preventDefault();
|
|
37
|
-
return;
|
|
1
|
+
import "../assets/index-2a8e4ca1.css";
|
|
2
|
+
import n from "./NcPopover.mjs";
|
|
3
|
+
import c from "./NcTextField.mjs";
|
|
4
|
+
import { t as r } from "../chunks/l10n-27a75c40.mjs";
|
|
5
|
+
import { Emoji as l, Picker as u, EmojiIndex as f } from "emoji-mart-vue-fast";
|
|
6
|
+
import p from "emoji-mart-vue-fast/data/all.json";
|
|
7
|
+
import { n as m } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
8
|
+
let o;
|
|
9
|
+
const d = {
|
|
10
|
+
search: r("Search emoji"),
|
|
11
|
+
notfound: r("No emoji found"),
|
|
12
|
+
categories: {
|
|
13
|
+
search: r("Search results"),
|
|
14
|
+
recent: r("Frequently used"),
|
|
15
|
+
smileys: r("Smileys & Emotion"),
|
|
16
|
+
people: r("People & Body"),
|
|
17
|
+
nature: r("Animals & Nature"),
|
|
18
|
+
foods: r("Food & Drink"),
|
|
19
|
+
activity: r("Activities"),
|
|
20
|
+
places: r("Travel & Places"),
|
|
21
|
+
objects: r("Objects"),
|
|
22
|
+
symbols: r("Symbols"),
|
|
23
|
+
flags: r("Flags"),
|
|
24
|
+
custom: r("Custom")
|
|
38
25
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
}, h = {
|
|
27
|
+
name: "NcEmojiPicker",
|
|
28
|
+
components: {
|
|
29
|
+
NcPopover: n,
|
|
30
|
+
NcTextField: c,
|
|
31
|
+
Emoji: l,
|
|
32
|
+
Picker: u
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
/**
|
|
36
|
+
* The emoji-set
|
|
37
|
+
*/
|
|
38
|
+
activeSet: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "native"
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Show preview section when hovering emoji
|
|
44
|
+
*/
|
|
45
|
+
showPreview: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Allow unselecting the selected emoji
|
|
51
|
+
*/
|
|
52
|
+
allowUnselect: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Selected emoji to allow unselecting
|
|
58
|
+
*/
|
|
59
|
+
selectedEmoji: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: ""
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* The fallback emoji in the preview section
|
|
65
|
+
*/
|
|
66
|
+
previewFallbackEmoji: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "grinning"
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* The fallback text in the preview section
|
|
72
|
+
*/
|
|
73
|
+
previewFallbackName: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: r("Pick an emoji")
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Whether to close the emoji picker after picking one
|
|
79
|
+
*/
|
|
80
|
+
closeOnSelect: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: !0
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Selector for the popover container
|
|
86
|
+
*/
|
|
87
|
+
container: {
|
|
88
|
+
type: [String, Object, Element, Boolean],
|
|
89
|
+
default: "body"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
emits: [
|
|
93
|
+
"select",
|
|
94
|
+
"select-data",
|
|
95
|
+
"unselect"
|
|
96
|
+
],
|
|
97
|
+
setup() {
|
|
98
|
+
return o || (o = new f(p)), {
|
|
99
|
+
// Non-reactive constants
|
|
100
|
+
emojiIndex: o,
|
|
101
|
+
i18n: d
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
data() {
|
|
105
|
+
return {
|
|
106
|
+
search: "",
|
|
107
|
+
open: !1
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
computed: {
|
|
111
|
+
native() {
|
|
112
|
+
return this.activeSet === "native";
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
methods: {
|
|
116
|
+
t: r,
|
|
117
|
+
clearSearch() {
|
|
118
|
+
var e, t;
|
|
119
|
+
this.search = "";
|
|
120
|
+
const i = (t = (e = this.$refs.search) == null ? void 0 : e.$refs.inputField) == null ? void 0 : t.$refs.input;
|
|
121
|
+
i && i.focus();
|
|
122
|
+
},
|
|
123
|
+
select(i) {
|
|
124
|
+
this.$emit("select", i.native), this.$emit("select-data", i), this.closeOnSelect && (this.open = !1);
|
|
125
|
+
},
|
|
126
|
+
unselect() {
|
|
127
|
+
this.$emit("unselect");
|
|
128
|
+
},
|
|
129
|
+
afterShow() {
|
|
130
|
+
var t, s;
|
|
131
|
+
this.$refs.picker.$el.addEventListener("keydown", this.checkKeyEvent);
|
|
132
|
+
const e = (s = (t = this.$refs.search) == null ? void 0 : t.$refs.inputField) == null ? void 0 : s.$refs.input;
|
|
133
|
+
e && e.focus();
|
|
134
|
+
},
|
|
135
|
+
afterHide() {
|
|
136
|
+
this.$refs.picker.$el.removeEventListener("keydown", this.checkKeyEvent);
|
|
137
|
+
},
|
|
138
|
+
checkKeyEvent(i) {
|
|
139
|
+
if (i.key !== "Tab")
|
|
140
|
+
return;
|
|
141
|
+
const t = this.$refs.picker.$el.querySelectorAll(
|
|
142
|
+
"button, input"
|
|
143
|
+
), s = t.length - 1;
|
|
144
|
+
if (t.length <= 1) {
|
|
145
|
+
i.preventDefault();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
i.shiftKey === !1 && i.target === t[s] ? (i.preventDefault(), t[0].focus()) : i.shiftKey === !0 && i.target === t[0] && (i.preventDefault(), t[s].focus());
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
var v = function() {
|
|
42
153
|
var e = this, t = e._self._c;
|
|
43
|
-
return t("NcPopover", e._g(e._b({ attrs: { shown: e.open, container: e.container }, on: { "update:shown": function(
|
|
44
|
-
e.open =
|
|
154
|
+
return t("NcPopover", e._g(e._b({ attrs: { shown: e.open, container: e.container }, on: { "update:shown": function(s) {
|
|
155
|
+
e.open = s;
|
|
45
156
|
}, "after-show": e.afterShow, "after-hide": e.afterHide }, scopedSlots: e._u([{ key: "trigger", fn: function() {
|
|
46
157
|
return [e._t("default")];
|
|
47
|
-
}, proxy: !0 }], null, !0) }, "NcPopover", e.$attrs, !1), e.$listeners), [t("Picker", e._b({ ref: "picker", attrs: { "auto-focus": !1, color: "var(--color-primary-element)", data: e.emojiIndex, emoji: e.previewFallbackEmoji, i18n: e.i18n, native: e.native, "emoji-size": 20, "per-line": 8, "picker-styles": { width: "320px" }, "show-preview": e.showPreview, title: e.previewFallbackName }, on: { select: e.select }, scopedSlots: e._u([{ key: "searchTemplate", fn: function(
|
|
48
|
-
return [t("NcTextField", { ref: "search", staticClass: "search", attrs: { value: e.search, label: e.t("Search"), "label-visible": !0, placeholder: e.i18n.search, "trailing-button-icon": "close", "trailing-button-label": e.t("Clear search"), "show-trailing-button": e.search !== "" }, on: { "update:value": [function(
|
|
49
|
-
e.search =
|
|
50
|
-
}, function(
|
|
51
|
-
return
|
|
52
|
-
}], "trailing-button-click": function(
|
|
53
|
-
e.clearSearch(),
|
|
158
|
+
}, proxy: !0 }], null, !0) }, "NcPopover", e.$attrs, !1), e.$listeners), [t("Picker", e._b({ ref: "picker", attrs: { "auto-focus": !1, color: "var(--color-primary-element)", data: e.emojiIndex, emoji: e.previewFallbackEmoji, i18n: e.i18n, native: e.native, "emoji-size": 20, "per-line": 8, "picker-styles": { width: "320px" }, "show-preview": e.showPreview, title: e.previewFallbackName }, on: { select: e.select }, scopedSlots: e._u([{ key: "searchTemplate", fn: function(s) {
|
|
159
|
+
return [t("NcTextField", { ref: "search", staticClass: "search", attrs: { value: e.search, label: e.t("Search"), "label-visible": !0, placeholder: e.i18n.search, "trailing-button-icon": "close", "trailing-button-label": e.t("Clear search"), "show-trailing-button": e.search !== "" }, on: { "update:value": [function(a) {
|
|
160
|
+
e.search = a;
|
|
161
|
+
}, function(a) {
|
|
162
|
+
return s.onSearch(e.search);
|
|
163
|
+
}], "trailing-button-click": function(a) {
|
|
164
|
+
e.clearSearch(), s.onSearch(e.search);
|
|
54
165
|
} } })];
|
|
55
166
|
} }, e.allowUnselect && e.selectedEmoji ? { key: "customCategory", fn: function() {
|
|
56
|
-
return [t("div", { staticClass: "emoji-mart-category-label" }, [t("h3", { staticClass: "emoji-mart-category-label" }, [e._v(" " + e._s(e.t("Selected")) + " ")])]), t("Emoji", { staticClass: "emoji-selected", attrs: { data: e.emojiIndex, emoji: e.selectedEmoji, size: 32 }, on: { click: e.unselect } }), t("Emoji", { staticClass: "emoji-delete", attrs: { data: e.emojiIndex, emoji: ":x:", size: 10 }, on: { click: e.unselect } })];
|
|
167
|
+
return [t("div", { staticClass: "emoji-mart-category-label" }, [t("h3", { staticClass: "emoji-mart-category-label" }, [e._v(" " + e._s(e.t("Selected")) + " ")])]), t("Emoji", { staticClass: "emoji-selected", attrs: { data: e.emojiIndex, emoji: e.selectedEmoji, native: !0, size: 32 }, on: { click: e.unselect } }), t("Emoji", { staticClass: "emoji-delete", attrs: { data: e.emojiIndex, emoji: ":x:", native: !0, size: 10 }, on: { click: e.unselect } })];
|
|
57
168
|
}, proxy: !0 } : null], null, !0) }, "Picker", e.$attrs, !1))], 1);
|
|
58
|
-
},
|
|
59
|
-
|
|
169
|
+
}, y = [], _ = /* @__PURE__ */ m(
|
|
170
|
+
h,
|
|
171
|
+
v,
|
|
172
|
+
y,
|
|
173
|
+
!1,
|
|
174
|
+
null,
|
|
175
|
+
"4d56e499",
|
|
176
|
+
null,
|
|
177
|
+
null
|
|
178
|
+
);
|
|
179
|
+
const $ = _.exports;
|
|
60
180
|
export {
|
|
61
|
-
|
|
181
|
+
$ as default
|
|
62
182
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEmojiPicker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcEmojiPicker.mjs","sources":["../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Georg Ehrke <oc.list@georgehrke.com>\n -\n - @author 2020 Georg Ehrke <oc.list@georgehrke.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover :shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger>\n\t\t\t<slot />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\t:auto-focus=\"false /* We manage the input focus ourselves */\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"slotProps\">\n\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t@trailing-button-click=\"clearSearch(); slotProps.onSearch(search);\"\n\t\t\t\t\t@update:value=\"slotProps.onSearch(search)\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\nimport { t } from '../../l10n.js'\n\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport data from 'emoji-mart-vue-fast/data/all.json'\n\n// Shared emoji index for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nexport default {\n\tname: 'NcEmojiPicker',\n\tcomponents: {\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tEmoji,\n\t\tPicker,\n\t},\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\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 * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\t// add focus trap in modal\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.addEventListener('keydown', this.checkKeyEvent)\n\n\t\t\t// set focus on input search field\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// remove keydown listner if popover is hidden\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.removeEventListener('keydown', this.checkKeyEvent)\n\t\t},\n\n\t\tcheckKeyEvent(event) {\n\t\t\tif (event.key !== 'Tab') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst picker = this.$refs.picker\n\t\t\tconst focusableList = picker.$el.querySelectorAll(\n\t\t\t\t'button, input',\n\t\t\t)\n\t\t\tconst last = focusableList.length - 1\n\t\t\t// escape early if only 1 or no elements to focus\n\t\t\tif (focusableList.length <= 1) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.shiftKey === false && event.target === focusableList[last]) {\n\t\t\t\t// Jump to first item when pressing tab on the latest item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[0].focus()\n\t\t\t} else if (event.shiftKey === true && event.target === focusableList[0]) {\n\t\t\t\t// Jump to the last item if pressing shift+tab on the first item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[last].focus()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// default style reset\n\tbutton {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t\theight: 36px;\n\t\twidth: auto;\n\n\t\t* {\n\t\t\tcursor: pointer !important;\n\t\t}\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-search input:focus-visible {\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t\toutline: none;\n\t}\n\n\t.emoji-mart-bar {\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: var(--border-radius) !important;\n\t\t\tborder-top-right-radius: var(--border-radius) !important;\n\t\t}\n\t}\n\n\t.emoji-mart-anchors {\n\t\tbutton {\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 12px 4px;\n\t\t\theight: auto;\n\t\t\t&:focus-visible {\n\t\t\t\t/* box-shadow: inset 0 0 0 2px var(--color-primary-element); */\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tjustify-content: start;\n\n\t\t.emoji-mart-category-label,\n\t\t.emoji-mart-emoji {\n\t\t\tuser-select: none;\n\t\t\tflex-grow: 0;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.emoji-mart-category-label {\n\t\t\tflex-basis: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t.emoji-mart-emoji {\n\t\t\t// 8 emoji per row\n\t\t\tflex-basis: calc(100% / 8);\n\t\t\ttext-align: center;\n\n\t\t\t&:hover::before,\n\t\t\t&.emoji-mart-emoji-selected::before{\n\t\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t\tbutton {\n\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 2px solid var(--color-primary-element) !important;\n\t\t\t\tborder-radius: 50%;\n\t\t\t}\n\t\t}\n\t}\n\n}\n\n.search {\n\tpadding: 4px 8px;\n}\n\n</style>\n\n<style scoped>\n.row-selected span {\n\tvertical-align: middle;\n}\n\n.row-selected button {\n\tvertical-align: middle;\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["emojiIndex","i18n","t","_sfc_main","NcPopover","NcTextField","Emoji","Picker","EmojiIndex","data","input","_b","_a","emojiObject","event","focusableList","last"],"mappings":";;;;;;;AAmMA,IAAAA;AAEA,MAAAC,IAAA;AAAA,EACA,QAAAC,EAAA,cAAA;AAAA,EACA,UAAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAAA,EAAA,gBAAA;AAAA,IACA,QAAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,EAAA,mBAAA;AAAA,IACA,QAAAA,EAAA,eAAA;AAAA,IACA,QAAAA,EAAA,kBAAA;AAAA,IACA,OAAAA,EAAA,cAAA;AAAA,IACA,UAAAA,EAAA,YAAA;AAAA,IACA,QAAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,EAAA,SAAA;AAAA,IACA,SAAAA,EAAA,SAAA;AAAA,IACA,OAAAA,EAAA,OAAA;AAAA,IACA,QAAAA,EAAA,QAAA;AAAA,EACA;AACA,GAEAC,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,sBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAAL,EAAA,eAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA,CAAA,QAAA,QAAA,SAAA,OAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AAEA,WAAAF,MACAA,IAAA,IAAAQ,EAAAC,CAAA,IAGA;AAAA;AAAA,MAEA,YAAAT;AAAA,MACA,MAAAC;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA,IACA,SAAA;AACA,aAAA,KAAA,cAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,SAAA;AAAA,IACA,GAAAC;AAAA,IAEA,cAAA;;AACA,WAAA,SAAA;AACA,YAAAQ,KAAAC,KAAAC,IAAA,KAAA,MAAA,WAAA,gBAAAA,EAAA,MAAA,eAAA,gBAAAD,EAAA,MAAA;AACA,MAAAD,KACAA,EAAA,MAAA;AAAA,IAEA;AAAA,IAEA,OAAAG,GAAA;AAIA,WAAA,MAAA,UAAAA,EAAA,MAAA,GAKA,KAAA,MAAA,eAAAA,CAAA,GAEA,KAAA,kBACA,KAAA,OAAA;AAAA,IAEA;AAAA,IAEA,WAAA;AACA,WAAA,MAAA,UAAA;AAAA,IACA;AAAA,IAEA,YAAA;;AAGA,MADA,KAAA,MAAA,OACA,IAAA,iBAAA,WAAA,KAAA,aAAA;AAGA,YAAAH,KAAAC,KAAAC,IAAA,KAAA,MAAA,WAAA,gBAAAA,EAAA,MAAA,eAAA,gBAAAD,EAAA,MAAA;AACA,MAAAD,KACAA,EAAA,MAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AAGA,MADA,KAAA,MAAA,OACA,IAAA,oBAAA,WAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,cAAAI,GAAA;AACA,UAAAA,EAAA,QAAA;AACA;AAGA,YAAAC,IADA,KAAA,MAAA,OACA,IAAA;AAAA,QACA;AAAA,MACA,GACAC,IAAAD,EAAA,SAAA;AAEA,UAAAA,EAAA,UAAA,GAAA;AACA,QAAAD,EAAA,eAAA;AACA;AAAA,MACA;AACA,MAAAA,EAAA,aAAA,MAAAA,EAAA,WAAAC,EAAAC,CAAA,KAEAF,EAAA,eAAA,GACAC,EAAA,CAAA,EAAA,MAAA,KACAD,EAAA,aAAA,MAAAA,EAAA,WAAAC,EAAA,CAAA,MAEAD,EAAA,eAAA,GACAC,EAAAC,CAAA,EAAA,MAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1,54 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a = require("../assets/index-c6f0da2e.css");
|
|
2
|
+
const s = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
|
|
3
|
+
const i = {
|
|
4
|
+
name: "NcEmptyContent",
|
|
5
|
+
props: {
|
|
6
|
+
/**
|
|
7
|
+
* A header message about an empty content shown
|
|
8
|
+
* @example 'No comments'
|
|
9
|
+
*/
|
|
10
|
+
name: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* Desription of the empty content
|
|
16
|
+
* @example 'No comments yet, start the conversation!'
|
|
17
|
+
*/
|
|
18
|
+
description: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
hasName() {
|
|
25
|
+
return this.name !== "";
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Check if a description is given as either property or slot
|
|
29
|
+
*/
|
|
30
|
+
hasDescription() {
|
|
31
|
+
var e;
|
|
32
|
+
return this.description !== "" || ((e = this.$slots.description) == null ? void 0 : e[0]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var c = function() {
|
|
37
|
+
var t = this, n = t._self._c;
|
|
38
|
+
return n("div", { staticClass: "empty-content", attrs: { role: "note" } }, [t.$slots.icon ? n("div", { staticClass: "empty-content__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), t._t("name", function() {
|
|
39
|
+
return [t.hasName ? n("h2", { staticClass: "empty-content__name" }, [t._v(" " + t._s(t.name) + " ")]) : t._e()];
|
|
40
|
+
}), t.hasDescription ? n("p", [t._t("description", function() {
|
|
41
|
+
return [t._v(" " + t._s(t.description) + " ")];
|
|
42
|
+
})], 2) : t._e(), t.$slots.action ? n("div", { staticClass: "empty-content__action" }, [t._t("action")], 2) : t._e()], 2);
|
|
43
|
+
}, o = [], r = /* @__PURE__ */ s.normalizeComponent(
|
|
44
|
+
i,
|
|
45
|
+
c,
|
|
46
|
+
o,
|
|
47
|
+
!1,
|
|
48
|
+
null,
|
|
49
|
+
"3c45cf57",
|
|
50
|
+
null,
|
|
51
|
+
null
|
|
52
|
+
);
|
|
53
|
+
const _ = r.exports;
|
|
54
|
+
module.exports = _;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEmptyContent.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"NcEmptyContent.cjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Greta Doci <gretadoci@gmail.com>\n -\n - @author 2020 Greta Doci <gretadoci@gmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<h2 v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</h2>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","_a"],"mappings":";;AAsKA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAAC,IAAA,KAAA,OAAA,gBAAA,gBAAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,19 +1,55 @@
|
|
|
1
|
-
import "../assets/
|
|
2
|
-
import { n as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import "../assets/index-c6f0da2e.css";
|
|
2
|
+
import { n as s } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
3
|
+
const i = {
|
|
4
|
+
name: "NcEmptyContent",
|
|
5
|
+
props: {
|
|
6
|
+
/**
|
|
7
|
+
* A header message about an empty content shown
|
|
8
|
+
* @example 'No comments'
|
|
9
|
+
*/
|
|
10
|
+
name: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* Desription of the empty content
|
|
16
|
+
* @example 'No comments yet, start the conversation!'
|
|
17
|
+
*/
|
|
18
|
+
description: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
hasName() {
|
|
25
|
+
return this.name !== "";
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Check if a description is given as either property or slot
|
|
29
|
+
*/
|
|
30
|
+
hasDescription() {
|
|
31
|
+
var e;
|
|
32
|
+
return this.description !== "" || ((e = this.$slots.description) == null ? void 0 : e[0]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var o = function() {
|
|
10
37
|
var t = this, n = t._self._c;
|
|
11
38
|
return n("div", { staticClass: "empty-content", attrs: { role: "note" } }, [t.$slots.icon ? n("div", { staticClass: "empty-content__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), t._t("name", function() {
|
|
12
39
|
return [t.hasName ? n("h2", { staticClass: "empty-content__name" }, [t._v(" " + t._s(t.name) + " ")]) : t._e()];
|
|
13
40
|
}), t.hasDescription ? n("p", [t._t("description", function() {
|
|
14
41
|
return [t._v(" " + t._s(t.description) + " ")];
|
|
15
42
|
})], 2) : t._e(), t.$slots.action ? n("div", { staticClass: "empty-content__action" }, [t._t("action")], 2) : t._e()], 2);
|
|
16
|
-
},
|
|
43
|
+
}, c = [], a = /* @__PURE__ */ s(
|
|
44
|
+
i,
|
|
45
|
+
o,
|
|
46
|
+
c,
|
|
47
|
+
!1,
|
|
48
|
+
null,
|
|
49
|
+
"3c45cf57",
|
|
50
|
+
null,
|
|
51
|
+
null
|
|
52
|
+
);
|
|
17
53
|
const p = a.exports;
|
|
18
54
|
export {
|
|
19
55
|
p as default
|