@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,428 +0,0 @@
|
|
|
1
|
-
import "../assets/referencePickerModal.css";
|
|
2
|
-
import { n as c } from "./_plugin-vue2_normalizer-5b4c43a4.mjs";
|
|
3
|
-
import { t as o } from "./l10n-9a5a6afc.mjs";
|
|
4
|
-
import m from "@nextcloud/axios";
|
|
5
|
-
import { loadState as b } from "@nextcloud/initial-state";
|
|
6
|
-
import { imagePath as L, generateOcsUrl as h } from "@nextcloud/router";
|
|
7
|
-
import v from "../Components/NcEmptyContent.mjs";
|
|
8
|
-
import { N as k } from "./index-cd3f1f8f.mjs";
|
|
9
|
-
import P from "../Components/NcSelect.mjs";
|
|
10
|
-
import f from "vue-material-design-icons/LinkVariant.vue";
|
|
11
|
-
import N from "../Components/NcLoadingIcon.mjs";
|
|
12
|
-
import E from "../Components/NcTextField.mjs";
|
|
13
|
-
import $ from "vue-material-design-icons/DotsHorizontal.vue";
|
|
14
|
-
import O from "../Components/NcButton.mjs";
|
|
15
|
-
import B from "../Components/NcModal.mjs";
|
|
16
|
-
import { emit as j } from "@nextcloud/event-bus";
|
|
17
|
-
import T from "vue-material-design-icons/ArrowLeft.vue";
|
|
18
|
-
import q from "vue-material-design-icons/Close.vue";
|
|
19
|
-
import M from "vue";
|
|
20
|
-
window._vue_richtext_widgets || (window._vue_richtext_widgets = {});
|
|
21
|
-
const V = (e) => !!window._vue_richtext_widgets[e], W = (e, t, r = (i) => {
|
|
22
|
-
}) => {
|
|
23
|
-
if (window._vue_richtext_widgets[e]) {
|
|
24
|
-
console.error("Widget for id " + e + " already registered");
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
window._vue_richtext_widgets[e] = { id: e, callback: t, onDestroy: r };
|
|
28
|
-
}, D = (e, { richObjectType: t, richObject: r, accessible: i }) => {
|
|
29
|
-
if (t !== "open-graph") {
|
|
30
|
-
if (!window._vue_richtext_widgets[t]) {
|
|
31
|
-
console.error("Widget for rich object type " + t + " not registered");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
window._vue_richtext_widgets[t].callback(e, { richObjectType: t, richObject: r, accessible: i });
|
|
35
|
-
}
|
|
36
|
-
}, z = (e, t) => {
|
|
37
|
-
e !== "open-graph" && window._vue_richtext_widgets[e] && window._vue_richtext_widgets[e].onDestroy(t);
|
|
38
|
-
};
|
|
39
|
-
window._registerWidget = W;
|
|
40
|
-
const A = { name: "NcReferenceWidget", props: { reference: { type: Object, required: !0 } }, data() {
|
|
41
|
-
return { compact: 3 };
|
|
42
|
-
}, computed: { hasCustomWidget() {
|
|
43
|
-
return V(this.reference.richObjectType);
|
|
44
|
-
}, noAccess() {
|
|
45
|
-
return this.reference && !this.reference.accessible;
|
|
46
|
-
}, descriptionStyle() {
|
|
47
|
-
if (this.compact === 0)
|
|
48
|
-
return { display: "none" };
|
|
49
|
-
const e = this.compact < 4 ? this.compact : 3;
|
|
50
|
-
return { lineClamp: e, webkitLineClamp: e };
|
|
51
|
-
}, compactLink() {
|
|
52
|
-
const e = this.reference.openGraphObject.link;
|
|
53
|
-
return e ? e.startsWith("https://") ? e.substring(8) : e.startsWith("http://") ? e.substring(7) : e : "";
|
|
54
|
-
} }, mounted() {
|
|
55
|
-
this.renderWidget(), this.observer = new ResizeObserver((e) => {
|
|
56
|
-
e[0].contentRect.width < 450 ? this.compact = 0 : e[0].contentRect.width < 550 ? this.compact = 1 : e[0].contentRect.width < 650 ? this.compact = 2 : this.compact = 3;
|
|
57
|
-
}), this.observer.observe(this.$el);
|
|
58
|
-
}, beforeDestroy() {
|
|
59
|
-
this.observer.disconnect(), z(this.reference.richObjectType, this.$el);
|
|
60
|
-
}, methods: { renderWidget() {
|
|
61
|
-
var e;
|
|
62
|
-
this.$refs.customWidget && (this.$refs.customWidget.innerHTML = ""), ((e = this == null ? void 0 : this.reference) == null ? void 0 : e.richObjectType) !== "open-graph" && this.$nextTick(() => {
|
|
63
|
-
D(this.$refs.customWidget, this.reference);
|
|
64
|
-
});
|
|
65
|
-
} } };
|
|
66
|
-
var U = function() {
|
|
67
|
-
var e = this, t = e._self._c;
|
|
68
|
-
return t("div", [e.reference && e.hasCustomWidget ? t("div", { staticClass: "widget-custom" }, [t("div", { ref: "customWidget" })]) : !e.noAccess && e.reference && e.reference.openGraphObject && !e.hasCustomWidget ? t("a", { staticClass: "widget-default", attrs: { href: e.reference.openGraphObject.link, rel: "noopener noreferrer", target: "_blank" } }, [e.reference.openGraphObject.thumb ? t("img", { staticClass: "widget-default--image", attrs: { src: e.reference.openGraphObject.thumb } }) : e._e(), t("div", { staticClass: "widget-default--details" }, [t("p", { staticClass: "widget-default--name" }, [e._v(e._s(e.reference.openGraphObject.name))]), t("p", { staticClass: "widget-default--description", style: e.descriptionStyle }, [e._v(e._s(e.reference.openGraphObject.description))]), t("p", { staticClass: "widget-default--link" }, [e._v(e._s(e.compactLink))])])]) : e._e()]);
|
|
69
|
-
}, G = [], H = c(A, U, G, !1, null, "b1c5a80f", null, null);
|
|
70
|
-
const Q = H.exports;
|
|
71
|
-
window._vue_richtext_custom_picker_elements || (window._vue_richtext_custom_picker_elements = {});
|
|
72
|
-
class rt {
|
|
73
|
-
constructor(t, r) {
|
|
74
|
-
this.element = t, this.object = r;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const d = (e) => !!window._vue_richtext_custom_picker_elements[e], F = (e) => {
|
|
78
|
-
var r;
|
|
79
|
-
const t = (r = window._vue_richtext_custom_picker_elements[e]) == null ? void 0 : r.size;
|
|
80
|
-
return ["small", "normal", "large", "full"].includes(t) ? t : null;
|
|
81
|
-
}, J = (e, t, r = (s) => {
|
|
82
|
-
}, i = "large") => {
|
|
83
|
-
if (window._vue_richtext_custom_picker_elements[e]) {
|
|
84
|
-
console.error("Custom reference picker element for id " + e + " already registered");
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
window._vue_richtext_custom_picker_elements[e] = { id: e, callback: t, onDestroy: r, size: i };
|
|
88
|
-
}, K = (e, { providerId: t, accessible: r }) => {
|
|
89
|
-
if (!window._vue_richtext_custom_picker_elements[t]) {
|
|
90
|
-
console.error("Custom reference picker element for reference provider ID " + t + " not registered");
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
return window._vue_richtext_custom_picker_elements[t].callback(e, { providerId: t, accessible: r });
|
|
94
|
-
}, X = (e, t, r) => {
|
|
95
|
-
window._vue_richtext_custom_picker_elements[e] && window._vue_richtext_custom_picker_elements[e].onDestroy(t, r);
|
|
96
|
-
};
|
|
97
|
-
window._registerCustomPickerElement = J;
|
|
98
|
-
const Y = { name: "NcCustomPickerElement", props: { provider: { type: Object, required: !0 } }, emits: ["cancel", "submit"], data() {
|
|
99
|
-
return { isRegistered: d(this.provider.id), renderResult: null };
|
|
100
|
-
}, mounted() {
|
|
101
|
-
this.isRegistered && this.renderElement();
|
|
102
|
-
}, beforeDestroy() {
|
|
103
|
-
this.isRegistered && X(this.provider.id, this.$el, this.renderResult);
|
|
104
|
-
}, methods: { renderElement() {
|
|
105
|
-
this.$refs.domElement && (this.$refs.domElement.innerHTML = "");
|
|
106
|
-
const e = K(this.$refs.domElement, { providerId: this.provider.id, accessible: !1 });
|
|
107
|
-
Promise.resolve(e).then((t) => {
|
|
108
|
-
var r, i;
|
|
109
|
-
this.renderResult = t, (r = this.renderResult.object) != null && r._isVue && ((i = this.renderResult.object) != null && i.$on) && (this.renderResult.object.$on("submit", this.onSubmit), this.renderResult.object.$on("cancel", this.onCancel)), this.renderResult.element.addEventListener("submit", (s) => {
|
|
110
|
-
this.onSubmit(s.detail);
|
|
111
|
-
}), this.renderResult.element.addEventListener("cancel", this.onCancel);
|
|
112
|
-
});
|
|
113
|
-
}, onSubmit(e) {
|
|
114
|
-
this.$emit("submit", e);
|
|
115
|
-
}, onCancel() {
|
|
116
|
-
this.$emit("cancel");
|
|
117
|
-
} } };
|
|
118
|
-
var Z = function() {
|
|
119
|
-
var e = this, t = e._self._c;
|
|
120
|
-
return t("div", { ref: "domElement" });
|
|
121
|
-
}, ee = [], te = c(Y, Z, ee, !1, null, "cf695ff9", null, null);
|
|
122
|
-
const re = te.exports, C = "any-link", S = { id: C, title: o("Any link"), icon_url: L("core", "filetypes/link.svg") };
|
|
123
|
-
window._vue_richtext_reference_providers || (window._vue_richtext_reference_providers = b("core", "reference-provider-list", [])), window._vue_richtext_reference_provider_timestamps || (window._vue_richtext_reference_provider_timestamps = b("core", "reference-provider-timestamps", {}));
|
|
124
|
-
function ie(e) {
|
|
125
|
-
return e === C ? S : x().find((t) => t.id === e);
|
|
126
|
-
}
|
|
127
|
-
function x() {
|
|
128
|
-
return window._vue_richtext_reference_providers.filter((e) => {
|
|
129
|
-
const t = !!e.search_providers_ids && e.search_providers_ids.length > 0 || d(e.id);
|
|
130
|
-
return t || console.debug("[smart picker]", e.id, "reference provider is discoverable but does not have any related search provider or custom picker component registered"), t;
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function se(e) {
|
|
134
|
-
const t = window._vue_richtext_reference_provider_timestamps;
|
|
135
|
-
return e.sort((r, i) => r.order === i.order ? 0 : r.order > i.order ? 1 : -1).sort((r, i) => {
|
|
136
|
-
const s = t[r.id], n = t[i.id];
|
|
137
|
-
return s === n ? 0 : n === void 0 ? -1 : s === void 0 ? 1 : s > n ? -1 : 1;
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
function ne(e, t = null) {
|
|
141
|
-
const r = x(), i = e.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&"), s = new RegExp(i, "i"), n = se(r).filter((p) => p.title.match(s)), l = t ? n.slice(0, t) : n;
|
|
142
|
-
return (e === "" || l.length === 0) && l.push(S), l;
|
|
143
|
-
}
|
|
144
|
-
function oe(e) {
|
|
145
|
-
const t = Math.floor(Date.now() / 1e3), r = { timestamp: t }, i = h("references/provider/{providerId}", { providerId: e });
|
|
146
|
-
m.put(i, r).then((s) => {
|
|
147
|
-
window._vue_richtext_reference_provider_timestamps[e] = t;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
let g = 0;
|
|
151
|
-
function I(e, t) {
|
|
152
|
-
return function() {
|
|
153
|
-
const r = this, i = arguments;
|
|
154
|
-
clearTimeout(g), g = setTimeout(function() {
|
|
155
|
-
e.apply(r, i);
|
|
156
|
-
}, t || 0);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function _(e) {
|
|
160
|
-
try {
|
|
161
|
-
return !!new URL(e);
|
|
162
|
-
} catch {
|
|
163
|
-
return !1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
const ce = { name: "NcProviderList", components: { NcSelect: P, NcHighlight: k, NcEmptyContent: v, LinkVariantIcon: f }, emits: ["select-provider", "submit"], data() {
|
|
167
|
-
return { selectedProvider: null, query: "", multiselectPlaceholder: o("Select provider"), providerIconAlt: o("Provider icon") };
|
|
168
|
-
}, computed: { options() {
|
|
169
|
-
const e = [];
|
|
170
|
-
return this.query !== "" && _(this.query) && e.push({ id: this.query, title: this.query, isLink: !0 }), e.push(...ne(this.query)), e;
|
|
171
|
-
} }, methods: { focus() {
|
|
172
|
-
setTimeout(() => {
|
|
173
|
-
var e, t, r;
|
|
174
|
-
(r = (t = (e = this.$refs["provider-select"]) == null ? void 0 : e.$el) == null ? void 0 : t.querySelector("#provider-select-input")) == null || r.focus();
|
|
175
|
-
}, 300);
|
|
176
|
-
}, onProviderSelected(e) {
|
|
177
|
-
e !== null && (e.isLink ? this.$emit("submit", e.title) : this.$emit("select-provider", e), this.selectedProvider = null);
|
|
178
|
-
}, onSearch(e, t) {
|
|
179
|
-
this.query = e;
|
|
180
|
-
} } };
|
|
181
|
-
var le = function() {
|
|
182
|
-
var e = this, t = e._self._c;
|
|
183
|
-
return t("div", { staticClass: "provider-list" }, [t("NcSelect", { ref: "provider-select", staticClass: "provider-list--select", attrs: { "input-id": "provider-select-input", label: "title", placeholder: e.multiselectPlaceholder, options: e.options, "append-to-body": !1, "clear-search-on-select": !0, "clear-search-on-blur": () => !1, filterable: !1 }, on: { search: e.onSearch, input: e.onProviderSelected }, scopedSlots: e._u([{ key: "option", fn: function(r) {
|
|
184
|
-
return [r.isLink ? t("div", { staticClass: "provider" }, [t("LinkVariantIcon", { staticClass: "link-icon", attrs: { size: 20 } }), t("span", [e._v(e._s(r.title))])], 1) : t("div", { staticClass: "provider" }, [t("img", { staticClass: "provider-icon", attrs: { src: r.icon_url, alt: e.providerIconAlt } }), t("NcHighlight", { staticClass: "option-text", attrs: { search: e.query, text: r.title } })], 1)];
|
|
185
|
-
} }]), model: { value: e.selectedProvider, callback: function(r) {
|
|
186
|
-
e.selectedProvider = r;
|
|
187
|
-
}, expression: "selectedProvider" } }), t("NcEmptyContent", { staticClass: "provider-list--empty-content", scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
188
|
-
return [t("LinkVariantIcon")];
|
|
189
|
-
}, proxy: !0 }]) })], 1);
|
|
190
|
-
}, ae = [], de = c(ce, le, ae, !1, null, "9d850ea5", null, null);
|
|
191
|
-
const ue = de.exports;
|
|
192
|
-
const he = { name: "NcRawLinkInput", components: { LinkVariantIcon: f, NcEmptyContent: v, NcLoadingIcon: N, NcReferenceWidget: Q, NcTextField: E }, props: { provider: { type: Object, required: !0 } }, emits: ["submit"], data() {
|
|
193
|
-
return { inputValue: "", loading: !1, reference: null, abortController: null, inputPlaceholder: o("Enter link") };
|
|
194
|
-
}, computed: { isLinkValid() {
|
|
195
|
-
return _(this.inputValue);
|
|
196
|
-
} }, methods: { focus() {
|
|
197
|
-
var e;
|
|
198
|
-
(e = this.$refs["url-input"].$el.getElementsByTagName("input")[0]) == null || e.focus();
|
|
199
|
-
}, onSubmit(e) {
|
|
200
|
-
const t = e.target.value;
|
|
201
|
-
this.isLinkValid && this.$emit("submit", t);
|
|
202
|
-
}, onClear() {
|
|
203
|
-
this.inputValue = "", this.reference = null;
|
|
204
|
-
}, onInput() {
|
|
205
|
-
this.reference = null, this.abortController && this.abortController.abort(), this.isLinkValid && I(() => {
|
|
206
|
-
this.updateReference();
|
|
207
|
-
}, 500)();
|
|
208
|
-
}, updateReference() {
|
|
209
|
-
this.loading = !0, this.abortController = new AbortController(), m.get(h("references/resolve", 2) + "?reference=" + encodeURIComponent(this.inputValue), { signal: this.abortController.signal }).then((e) => {
|
|
210
|
-
this.reference = e.data.ocs.data.references[this.inputValue];
|
|
211
|
-
}).catch((e) => {
|
|
212
|
-
console.error(e);
|
|
213
|
-
}).then(() => {
|
|
214
|
-
this.loading = !1;
|
|
215
|
-
});
|
|
216
|
-
} } };
|
|
217
|
-
var pe = function() {
|
|
218
|
-
var e = this, t = e._self._c;
|
|
219
|
-
return t("div", { staticClass: "raw-link" }, [t("div", { staticClass: "input-wrapper" }, [t("NcTextField", { ref: "url-input", attrs: { value: e.inputValue, "show-trailing-button": e.inputValue !== "", label: e.inputPlaceholder }, on: { "update:value": [function(r) {
|
|
220
|
-
e.inputValue = r;
|
|
221
|
-
}, e.onInput], "trailing-button-click": e.onClear }, nativeOn: { keyup: function(r) {
|
|
222
|
-
return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.onSubmit.apply(null, arguments);
|
|
223
|
-
} } }, [e.loading ? t("NcLoadingIcon", { attrs: { size: 16 } }) : t("LinkVariantIcon", { attrs: { size: 16 } })], 1)], 1), e.reference !== null ? t("NcReferenceWidget", { staticClass: "reference-widget", attrs: { reference: e.reference } }) : t("NcEmptyContent", { staticClass: "raw-link--empty-content", scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
224
|
-
return [e.provider.icon_url ? t("img", { staticClass: "provider-icon", attrs: { src: e.provider.icon_url } }) : t("LinkVariantIcon")];
|
|
225
|
-
}, proxy: !0 }]) })], 1);
|
|
226
|
-
}, me = [], ve = c(he, pe, me, !1, null, "d0ba247a", null, null);
|
|
227
|
-
const fe = ve.exports;
|
|
228
|
-
const _e = { name: "NcSearchResult", components: { NcHighlight: k }, props: { entry: { type: Object, required: !0 }, query: { type: String, required: !0 } } };
|
|
229
|
-
var ye = function() {
|
|
230
|
-
var e = this, t = e._self._c;
|
|
231
|
-
return t("div", { staticClass: "result" }, [e.entry.icon ? t("div", { staticClass: "result--icon-class", class: { [e.entry.icon]: !0, rounded: e.entry.rounded } }) : t("img", { staticClass: "result--image", class: { rounded: e.entry.rounded }, attrs: { src: e.entry.thumbnailUrl } }), t("div", { staticClass: "result--content" }, [t("span", { staticClass: "result--content--name" }, [t("NcHighlight", { attrs: { search: e.query, text: e.entry.title } })], 1), t("span", { staticClass: "result--content--subline" }, [t("NcHighlight", { attrs: { search: e.query, text: e.entry.subline } })], 1)])]);
|
|
232
|
-
}, be = [], ge = c(_e, ye, be, !1, null, "7a394a58", null, null);
|
|
233
|
-
const we = ge.exports;
|
|
234
|
-
const w = 5, ke = { name: "NcSearch", components: { LinkVariantIcon: f, DotsHorizontalIcon: $, NcEmptyContent: v, NcSelect: P, NcSearchResult: we }, props: { provider: { type: Object, required: !0 }, showEmptyContent: { type: Boolean, default: !0 }, searchPlaceholder: { type: String, default: null } }, emits: ["submit"], data() {
|
|
235
|
-
return { searchQuery: "", selectedResult: null, resultsBySearchProvider: {}, searching: !1, searchingMoreOf: null, abortController: null, noOptionsText: o("Start typing to search"), providerIconAlt: o("Provider icon") };
|
|
236
|
-
}, computed: { mySearchPlaceholder() {
|
|
237
|
-
return this.searchPlaceholder || o("Search");
|
|
238
|
-
}, searchProviderIds() {
|
|
239
|
-
return this.provider.search_providers_ids;
|
|
240
|
-
}, options() {
|
|
241
|
-
if (this.searchQuery === "")
|
|
242
|
-
return [];
|
|
243
|
-
const e = [];
|
|
244
|
-
return _(this.searchQuery) && e.push(this.rawLinkEntry), e.push(...this.formattedSearchResults), e;
|
|
245
|
-
}, rawLinkEntry() {
|
|
246
|
-
return { id: "rawLinkEntry", resourceUrl: this.searchQuery, isRawLink: !0 };
|
|
247
|
-
}, formattedSearchResults() {
|
|
248
|
-
const e = [];
|
|
249
|
-
return this.searchProviderIds.forEach((t) => {
|
|
250
|
-
if (this.resultsBySearchProvider[t].entries.length > 0) {
|
|
251
|
-
(this.searchProviderIds.length > 1 || this.resultsBySearchProvider[t].entries.length > 1) && e.push({ id: "groupTitle-" + t, name: this.resultsBySearchProvider[t].name, isCustomGroupTitle: !0, providerId: t });
|
|
252
|
-
const r = this.resultsBySearchProvider[t].entries.map((i, s) => ({ id: "provider-" + t + "-entry-" + s, ...i }));
|
|
253
|
-
e.push(...r), this.resultsBySearchProvider[t].isPaginated && e.push({ id: "moreOf-" + t, name: this.resultsBySearchProvider[t].name, isMore: !0, providerId: t, isLoading: this.searchingMoreOf === t });
|
|
254
|
-
}
|
|
255
|
-
}), e;
|
|
256
|
-
} }, mounted() {
|
|
257
|
-
this.resetResults();
|
|
258
|
-
}, beforeDestroy() {
|
|
259
|
-
this.cancelSearchRequests();
|
|
260
|
-
}, methods: { t: o, resetResults() {
|
|
261
|
-
const e = {};
|
|
262
|
-
this.searchProviderIds.forEach((t) => {
|
|
263
|
-
e[t] = { entries: [] };
|
|
264
|
-
}), this.resultsBySearchProvider = e;
|
|
265
|
-
}, focus() {
|
|
266
|
-
setTimeout(() => {
|
|
267
|
-
var e, t, r;
|
|
268
|
-
(r = (t = (e = this.$refs["search-select"]) == null ? void 0 : e.$el) == null ? void 0 : t.querySelector("#search-select-input")) == null || r.focus();
|
|
269
|
-
}, 300);
|
|
270
|
-
}, cancelSearchRequests() {
|
|
271
|
-
this.abortController && this.abortController.abort();
|
|
272
|
-
}, onSearchInput(e, t) {
|
|
273
|
-
this.searchQuery = e, I(() => {
|
|
274
|
-
this.updateSearch();
|
|
275
|
-
}, 500)();
|
|
276
|
-
}, onSelectResultSelected(e) {
|
|
277
|
-
e !== null && (e.resourceUrl ? (this.cancelSearchRequests(), this.$emit("submit", e.resourceUrl)) : e.isMore && this.searchMoreOf(e.providerId).then(() => {
|
|
278
|
-
this.selectedResult = null;
|
|
279
|
-
}));
|
|
280
|
-
}, searchMoreOf(e) {
|
|
281
|
-
return this.searchingMoreOf = e, this.cancelSearchRequests(), this.searchProviders(e);
|
|
282
|
-
}, updateSearch() {
|
|
283
|
-
if (this.cancelSearchRequests(), this.resetResults(), this.searchQuery === "") {
|
|
284
|
-
this.searching = !1;
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
return this.searchProviders();
|
|
288
|
-
}, searchProviders(e = null) {
|
|
289
|
-
var r, i;
|
|
290
|
-
this.abortController = new AbortController(), this.searching = !0;
|
|
291
|
-
const t = e === null ? [...this.searchProviderIds].map((s) => this.searchOneProvider(s)) : [this.searchOneProvider(e, (i = (r = this.resultsBySearchProvider[e]) == null ? void 0 : r.cursor) != null ? i : null)];
|
|
292
|
-
return Promise.allSettled(t).then((s) => {
|
|
293
|
-
s.find((n) => n.status === "rejected" && (n.reason.name === "CanceledError" || n.reason.code === "ERR_CANCELED")) || (this.searching = !1, this.searchingMoreOf = null);
|
|
294
|
-
});
|
|
295
|
-
}, searchOneProvider(e, t = null) {
|
|
296
|
-
const r = t === null ? h("search/providers/{providerId}/search?term={term}&limit={limit}", { providerId: e, term: this.searchQuery, limit: w }) : h("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}", { providerId: e, term: this.searchQuery, limit: w, cursor: t });
|
|
297
|
-
return m.get(r, { signal: this.abortController.signal }).then((i) => {
|
|
298
|
-
const s = i.data.ocs.data;
|
|
299
|
-
this.resultsBySearchProvider[e].name = s.name, this.resultsBySearchProvider[e].cursor = s.cursor, this.resultsBySearchProvider[e].isPaginated = s.isPaginated, this.resultsBySearchProvider[e].entries.push(...s.entries);
|
|
300
|
-
});
|
|
301
|
-
} } };
|
|
302
|
-
var Pe = function() {
|
|
303
|
-
var e = this, t = e._self._c;
|
|
304
|
-
return t("div", { staticClass: "smart-picker-search", class: { "with-empty-content": e.showEmptyContent } }, [t("NcSelect", { ref: "search-select", staticClass: "smart-picker-search--select", attrs: { "input-id": "search-select-input", label: "name", placeholder: e.mySearchPlaceholder, options: e.options, "append-to-body": !1, "close-on-select": !1, "clear-search-on-select": !1, "clear-search-on-blur": () => !1, "reset-focus-on-options-change": !1, filterable: !1, autoscroll: !0, "reset-on-options-change": !1, loading: e.searching }, on: { search: e.onSearchInput, input: e.onSelectResultSelected }, scopedSlots: e._u([{ key: "option", fn: function(r) {
|
|
305
|
-
return [r.isRawLink ? t("div", { staticClass: "custom-option" }, [t("LinkVariantIcon", { staticClass: "option-simple-icon", attrs: { size: 20 } }), t("span", { staticClass: "option-text" }, [e._v(" " + e._s(e.t("Raw link {options}", { options: r.resourceUrl })) + " ")])], 1) : r.resourceUrl ? t("NcSearchResult", { staticClass: "search-result", attrs: { entry: r, query: e.searchQuery } }) : r.isCustomGroupTitle ? t("span", { staticClass: "custom-option group-name" }, [e.provider.icon_url ? t("img", { staticClass: "provider-icon group-name-icon", attrs: { src: e.provider.icon_url } }) : e._e(), t("span", { staticClass: "option-text" }, [t("strong", [e._v(e._s(r.name))])])]) : r.isMore ? t("span", { class: { "custom-option": !0 } }, [r.isLoading ? t("span", { staticClass: "option-simple-icon icon-loading-small" }) : t("DotsHorizontalIcon", { staticClass: "option-simple-icon", attrs: { size: 20 } }), t("span", { staticClass: "option-text" }, [e._v(" " + e._s(e.t('Load more "{options}"', { options: r.name })) + " ")])], 1) : e._e()];
|
|
306
|
-
} }, { key: "no-options", fn: function() {
|
|
307
|
-
return [e._v(" " + e._s(e.noOptionsText) + " ")];
|
|
308
|
-
}, proxy: !0 }]), model: { value: e.selectedResult, callback: function(r) {
|
|
309
|
-
e.selectedResult = r;
|
|
310
|
-
}, expression: "selectedResult" } }), e.showEmptyContent ? t("NcEmptyContent", { staticClass: "smart-picker-search--empty-content", scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
311
|
-
return [e.provider.icon_url ? t("img", { staticClass: "provider-icon", attrs: { alt: e.providerIconAlt, src: e.provider.icon_url } }) : t("LinkVariantIcon")];
|
|
312
|
-
}, proxy: !0 }], null, !1, 2922132592) }) : e._e()], 1);
|
|
313
|
-
}, Ce = [], Se = c(ke, Pe, Ce, !1, null, "97d196f0", null, null);
|
|
314
|
-
const xe = Se.exports;
|
|
315
|
-
const a = { providerList: 1, standardLinkInput: 2, searchInput: 3, customElement: 4 }, Ie = { name: "NcReferencePicker", components: { NcCustomPickerElement: re, NcProviderList: ue, NcRawLinkInput: fe, NcSearch: xe }, props: { initialProvider: { type: Object, default: () => null }, width: { type: Number, default: null }, focusOnCreate: { type: Boolean, default: !0 } }, emits: ["cancel", "cancel-raw-link", "cancel-search", "provider-selected", "submit"], data() {
|
|
316
|
-
return { MODES: a, selectedProvider: this.initialProvider };
|
|
317
|
-
}, computed: { mode() {
|
|
318
|
-
return this.selectedProvider === null ? a.providerList : d(this.selectedProvider.id) ? a.customElement : this.selectedProvider.search_providers_ids ? a.searchInput : a.standardLinkInput;
|
|
319
|
-
}, pickerWrapperStyle() {
|
|
320
|
-
return { width: this.width ? this.width + "px" : void 0 };
|
|
321
|
-
} }, mounted() {
|
|
322
|
-
this.focusOnCreate && (this.initialProvider ? setTimeout(() => {
|
|
323
|
-
var e;
|
|
324
|
-
(e = this.$refs["url-input"]) == null || e.focus();
|
|
325
|
-
}, 300) : this.$nextTick(() => {
|
|
326
|
-
var e;
|
|
327
|
-
(e = this.$refs["provider-list"]) == null || e.focus();
|
|
328
|
-
}));
|
|
329
|
-
}, methods: { onEscapePressed() {
|
|
330
|
-
this.selectedProvider !== null ? this.deselectProvider() : this.cancelProviderSelection();
|
|
331
|
-
}, onProviderSelected(e) {
|
|
332
|
-
this.selectedProvider = e, this.$emit("provider-selected", e), this.$nextTick(() => {
|
|
333
|
-
var t;
|
|
334
|
-
(t = this.$refs["url-input"]) == null || t.focus();
|
|
335
|
-
});
|
|
336
|
-
}, cancelCustomElement() {
|
|
337
|
-
this.deselectProvider();
|
|
338
|
-
}, cancelSearch() {
|
|
339
|
-
var e;
|
|
340
|
-
this.$emit("cancel-search", (e = this.selectedProvider) == null ? void 0 : e.title), this.deselectProvider();
|
|
341
|
-
}, cancelRawLinkInput() {
|
|
342
|
-
var e;
|
|
343
|
-
this.$emit("cancel-raw-link", (e = this.selectedProvider) == null ? void 0 : e.title), this.deselectProvider();
|
|
344
|
-
}, cancelProviderSelection() {
|
|
345
|
-
this.$emit("cancel");
|
|
346
|
-
}, submitLink(e) {
|
|
347
|
-
this.selectedProvider !== null && oe(this.selectedProvider.id), this.$emit("submit", e), this.deselectProvider();
|
|
348
|
-
}, deselectProvider() {
|
|
349
|
-
this.selectedProvider = null, this.$emit("provider-selected", null), setTimeout(() => {
|
|
350
|
-
var e;
|
|
351
|
-
(e = this.$refs["provider-list"]) == null || e.focus();
|
|
352
|
-
}, 300);
|
|
353
|
-
} } };
|
|
354
|
-
var Re = function() {
|
|
355
|
-
var e = this, t = e._self._c;
|
|
356
|
-
return t("div", { staticClass: "reference-picker", style: e.pickerWrapperStyle, attrs: { tabindex: "-1" }, on: { keydown: function(r) {
|
|
357
|
-
return !r.type.indexOf("key") && e._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : (r.stopPropagation(), r.preventDefault(), e.onEscapePressed.apply(null, arguments));
|
|
358
|
-
} } }, [e.mode === e.MODES.providerList ? t("NcProviderList", { ref: "provider-list", on: { "select-provider": e.onProviderSelected, submit: e.submitLink, cancel: e.cancelProviderSelection } }) : e.mode === e.MODES.standardLinkInput ? t("NcRawLinkInput", { ref: "url-input", attrs: { provider: e.selectedProvider }, on: { submit: e.submitLink, cancel: e.cancelRawLinkInput } }) : e.mode === e.MODES.searchInput ? t("NcSearch", { ref: "url-input", attrs: { provider: e.selectedProvider }, on: { cancel: e.cancelSearch, submit: e.submitLink } }) : e.mode === e.MODES.customElement ? t("div", { staticClass: "custom-element-wrapper" }, [t("NcCustomPickerElement", { attrs: { provider: e.selectedProvider }, on: { submit: e.submitLink, cancel: e.cancelCustomElement } })], 1) : e._e()], 1);
|
|
359
|
-
}, Le = [], Ne = c(Ie, Re, Le, !1, null, "aa77d0d3", null, null);
|
|
360
|
-
const Ee = Ne.exports;
|
|
361
|
-
const $e = { name: "NcReferencePickerModal", components: { NcReferencePicker: Ee, NcModal: B, NcButton: O, ArrowLeftIcon: T, CloseIcon: q }, props: { initialProvider: { type: Object, default: () => null }, focusOnCreate: { type: Boolean, default: !0 }, isInsideViewer: { type: Boolean, default: !1 } }, emits: ["cancel", "submit"], data() {
|
|
362
|
-
return { show: !0, selectedProvider: this.initialProvider, backButtonTitle: o("Back to provider selection"), closeButtonTitle: o("Close"), closeButtonLabel: o("Close Smart Picker") };
|
|
363
|
-
}, computed: { isProviderSelected() {
|
|
364
|
-
return this.selectedProvider !== null;
|
|
365
|
-
}, showBackButton() {
|
|
366
|
-
return this.initialProvider === null && this.isProviderSelected;
|
|
367
|
-
}, modalSize() {
|
|
368
|
-
var e;
|
|
369
|
-
return this.isProviderSelected && d(this.selectedProvider.id) ? (e = F(this.selectedProvider.id)) != null ? e : "large" : "normal";
|
|
370
|
-
}, showModalName() {
|
|
371
|
-
return !this.isProviderSelected || !d(this.selectedProvider.id);
|
|
372
|
-
}, modalName() {
|
|
373
|
-
return this.isProviderSelected ? this.selectedProvider.title : o("Smart Picker");
|
|
374
|
-
} }, mounted() {
|
|
375
|
-
if (this.isInsideViewer) {
|
|
376
|
-
const e = this.$refs.modal_content;
|
|
377
|
-
j("viewer:trapElements:changed", e);
|
|
378
|
-
}
|
|
379
|
-
}, methods: { onCancel() {
|
|
380
|
-
this.show = !1, this.$emit("cancel");
|
|
381
|
-
}, onSubmit(e) {
|
|
382
|
-
this.show = !1, this.$emit("submit", e);
|
|
383
|
-
}, onProviderSelect(e) {
|
|
384
|
-
this.selectedProvider = e, e === null && this.initialProvider !== null && this.onCancel();
|
|
385
|
-
}, onBackClicked() {
|
|
386
|
-
this.$refs.referencePicker.deselectProvider();
|
|
387
|
-
} } };
|
|
388
|
-
var Oe = function() {
|
|
389
|
-
var e = this, t = e._self._c;
|
|
390
|
-
return e.show ? t("NcModal", { staticClass: "reference-picker-modal", attrs: { size: e.modalSize, "can-close": !1 }, on: { close: e.onCancel } }, [t("div", { ref: "modal_content", staticClass: "reference-picker-modal--content" }, [e.showBackButton ? t("NcButton", { staticClass: "back-button", attrs: { "aria-label": e.backButtonTitle, title: e.backButtonTitle }, on: { click: e.onBackClicked }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
391
|
-
return [t("ArrowLeftIcon")];
|
|
392
|
-
}, proxy: !0 }], null, !1, 3001860362) }) : e._e(), t("NcButton", { staticClass: "close-button", attrs: { "aria-label": e.closeButtonLabel, title: e.closeButtonTitle, type: "tertiary" }, on: { click: e.onCancel }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
393
|
-
return [t("CloseIcon")];
|
|
394
|
-
}, proxy: !0 }], null, !1, 2491825086) }), e.showModalName ? t("h2", [e._v(" " + e._s(e.modalName) + " ")]) : e._e(), t("NcReferencePicker", { ref: "referencePicker", attrs: { "initial-provider": e.initialProvider, "focus-on-create": e.focusOnCreate }, on: { "provider-selected": e.onProviderSelect, submit: e.onSubmit, cancel: e.onCancel } })], 1)]) : e._e();
|
|
395
|
-
}, Be = [], je = c($e, Oe, Be, !1, null, "3f1a4ac7", null, null);
|
|
396
|
-
const Te = je.exports;
|
|
397
|
-
async function it(e = null, t = void 0) {
|
|
398
|
-
return await new Promise((r, i) => {
|
|
399
|
-
var y;
|
|
400
|
-
const s = "referencePickerModal", n = document.createElement("div");
|
|
401
|
-
n.id = s, document.body.append(n);
|
|
402
|
-
const l = e === null ? null : (y = ie(e)) != null ? y : null, p = M.extend(Te), u = new p({ propsData: { initialProvider: l, isInsideViewer: t } }).$mount(n);
|
|
403
|
-
u.$on("cancel", () => {
|
|
404
|
-
u.$destroy(), i(new Error("User cancellation"));
|
|
405
|
-
}), u.$on("submit", (R) => {
|
|
406
|
-
u.$destroy(), r(R);
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
export {
|
|
411
|
-
Q as N,
|
|
412
|
-
Ee as a,
|
|
413
|
-
Te as b,
|
|
414
|
-
xe as c,
|
|
415
|
-
D as d,
|
|
416
|
-
rt as e,
|
|
417
|
-
J as f,
|
|
418
|
-
K as g,
|
|
419
|
-
d as h,
|
|
420
|
-
V as i,
|
|
421
|
-
it as j,
|
|
422
|
-
C as k,
|
|
423
|
-
ie as l,
|
|
424
|
-
x as m,
|
|
425
|
-
ne as n,
|
|
426
|
-
W as r,
|
|
427
|
-
se as s
|
|
428
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"referencePickerModal-2b16b319.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Me=require("../assets/referencePickerModal.css");const c=require("./_plugin-vue2_normalizer-764a4c12.cjs"),o=require("./l10n-46d0c1c0.cjs"),m=require("@nextcloud/axios"),b=require("@nextcloud/initial-state"),u=require("@nextcloud/router"),v=require("../Components/NcEmptyContent.cjs"),C=require("./index-df3f51c6.cjs"),S=require("../Components/NcSelect.cjs"),f=require("vue-material-design-icons/LinkVariant.vue"),z=require("../Components/NcLoadingIcon.cjs"),D=require("../Components/NcTextField.cjs"),U=require("vue-material-design-icons/DotsHorizontal.vue"),A=require("../Components/NcButton.cjs"),H=require("../Components/NcModal.cjs"),Q=require("@nextcloud/event-bus"),G=require("vue-material-design-icons/ArrowLeft.vue"),F=require("vue-material-design-icons/Close.vue"),J=require("vue");window._vue_richtext_widgets||(window._vue_richtext_widgets={});const R=e=>!!window._vue_richtext_widgets[e],x=(e,t,r=i=>{})=>{if(window._vue_richtext_widgets[e]){console.error("Widget for id "+e+" already registered");return}window._vue_richtext_widgets[e]={id:e,callback:t,onDestroy:r}},N=(e,{richObjectType:t,richObject:r,accessible:i})=>{if(t!=="open-graph"){if(!window._vue_richtext_widgets[t]){console.error("Widget for rich object type "+t+" not registered");return}window._vue_richtext_widgets[t].callback(e,{richObjectType:t,richObject:r,accessible:i})}},K=(e,t)=>{e!=="open-graph"&&window._vue_richtext_widgets[e]&&window._vue_richtext_widgets[e].onDestroy(t)};window._registerWidget=x;const X={name:"NcReferenceWidget",props:{reference:{type:Object,required:!0}},data(){return{compact:3}},computed:{hasCustomWidget(){return R(this.reference.richObjectType)},noAccess(){return this.reference&&!this.reference.accessible},descriptionStyle(){if(this.compact===0)return{display:"none"};const e=this.compact<4?this.compact:3;return{lineClamp:e,webkitLineClamp:e}},compactLink(){const e=this.reference.openGraphObject.link;return e?e.startsWith("https://")?e.substring(8):e.startsWith("http://")?e.substring(7):e:""}},mounted(){this.renderWidget(),this.observer=new ResizeObserver(e=>{e[0].contentRect.width<450?this.compact=0:e[0].contentRect.width<550?this.compact=1:e[0].contentRect.width<650?this.compact=2:this.compact=3}),this.observer.observe(this.$el)},beforeDestroy(){this.observer.disconnect(),K(this.reference.richObjectType,this.$el)},methods:{renderWidget(){var e;this.$refs.customWidget&&(this.$refs.customWidget.innerHTML=""),((e=this==null?void 0:this.reference)==null?void 0:e.richObjectType)!=="open-graph"&&this.$nextTick(()=>{N(this.$refs.customWidget,this.reference)})}}};var Y=function(){var e=this,t=e._self._c;return t("div",[e.reference&&e.hasCustomWidget?t("div",{staticClass:"widget-custom"},[t("div",{ref:"customWidget"})]):!e.noAccess&&e.reference&&e.reference.openGraphObject&&!e.hasCustomWidget?t("a",{staticClass:"widget-default",attrs:{href:e.reference.openGraphObject.link,rel:"noopener noreferrer",target:"_blank"}},[e.reference.openGraphObject.thumb?t("img",{staticClass:"widget-default--image",attrs:{src:e.reference.openGraphObject.thumb}}):e._e(),t("div",{staticClass:"widget-default--details"},[t("p",{staticClass:"widget-default--name"},[e._v(e._s(e.reference.openGraphObject.name))]),t("p",{staticClass:"widget-default--description",style:e.descriptionStyle},[e._v(e._s(e.reference.openGraphObject.description))]),t("p",{staticClass:"widget-default--link"},[e._v(e._s(e.compactLink))])])]):e._e()])},Z=[],ee=c.normalizeComponent(X,Y,Z,!1,null,"b1c5a80f",null,null);const I=ee.exports;window._vue_richtext_custom_picker_elements||(window._vue_richtext_custom_picker_elements={});class te{constructor(t,r){this.element=t,this.object=r}}const l=e=>!!window._vue_richtext_custom_picker_elements[e],re=e=>{var r;const t=(r=window._vue_richtext_custom_picker_elements[e])==null?void 0:r.size;return["small","normal","large","full"].includes(t)?t:null},L=(e,t,r=s=>{},i="large")=>{if(window._vue_richtext_custom_picker_elements[e]){console.error("Custom reference picker element for id "+e+" already registered");return}window._vue_richtext_custom_picker_elements[e]={id:e,callback:t,onDestroy:r,size:i}},E=(e,{providerId:t,accessible:r})=>{if(!window._vue_richtext_custom_picker_elements[t]){console.error("Custom reference picker element for reference provider ID "+t+" not registered");return}return window._vue_richtext_custom_picker_elements[t].callback(e,{providerId:t,accessible:r})},ie=(e,t,r)=>{window._vue_richtext_custom_picker_elements[e]&&window._vue_richtext_custom_picker_elements[e].onDestroy(t,r)};window._registerCustomPickerElement=L;const se={name:"NcCustomPickerElement",props:{provider:{type:Object,required:!0}},emits:["cancel","submit"],data(){return{isRegistered:l(this.provider.id),renderResult:null}},mounted(){this.isRegistered&&this.renderElement()},beforeDestroy(){this.isRegistered&&ie(this.provider.id,this.$el,this.renderResult)},methods:{renderElement(){this.$refs.domElement&&(this.$refs.domElement.innerHTML="");const e=E(this.$refs.domElement,{providerId:this.provider.id,accessible:!1});Promise.resolve(e).then(t=>{var r,i;this.renderResult=t,(r=this.renderResult.object)!=null&&r._isVue&&((i=this.renderResult.object)!=null&&i.$on)&&(this.renderResult.object.$on("submit",this.onSubmit),this.renderResult.object.$on("cancel",this.onCancel)),this.renderResult.element.addEventListener("submit",s=>{this.onSubmit(s.detail)}),this.renderResult.element.addEventListener("cancel",this.onCancel)})},onSubmit(e){this.$emit("submit",e)},onCancel(){this.$emit("cancel")}}};var ne=function(){var e=this,t=e._self._c;return t("div",{ref:"domElement"})},oe=[],ce=c.normalizeComponent(se,ne,oe,!1,null,"cf695ff9",null,null);const le=ce.exports,_="any-link",O={id:_,title:o.t("Any link"),icon_url:u.imagePath("core","filetypes/link.svg")};window._vue_richtext_reference_providers||(window._vue_richtext_reference_providers=b.loadState("core","reference-provider-list",[])),window._vue_richtext_reference_provider_timestamps||(window._vue_richtext_reference_provider_timestamps=b.loadState("core","reference-provider-timestamps",{}));function $(e){return e===_?O:g().find(t=>t.id===e)}function g(){return window._vue_richtext_reference_providers.filter(e=>{const t=!!e.search_providers_ids&&e.search_providers_ids.length>0||l(e.id);return t||console.debug("[smart picker]",e.id,"reference provider is discoverable but does not have any related search provider or custom picker component registered"),t})}function q(e){const t=window._vue_richtext_reference_provider_timestamps;return e.sort((r,i)=>r.order===i.order?0:r.order>i.order?1:-1).sort((r,i)=>{const s=t[r.id],n=t[i.id];return s===n?0:n===void 0?-1:s===void 0?1:s>n?-1:1})}function B(e,t=null){const r=g(),i=e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp(i,"i"),n=q(r).filter(p=>p.title.match(s)),a=t?n.slice(0,t):n;return(e===""||a.length===0)&&a.push(O),a}function ae(e){const t=Math.floor(Date.now()/1e3),r={timestamp:t},i=u.generateOcsUrl("references/provider/{providerId}",{providerId:e});m.put(i,r).then(s=>{window._vue_richtext_reference_provider_timestamps[e]=t})}let w=0;function j(e,t){return function(){const r=this,i=arguments;clearTimeout(w),w=setTimeout(function(){e.apply(r,i)},t||0)}}function y(e){try{return!!new URL(e)}catch{return!1}}const de={name:"NcProviderList",components:{NcSelect:S,NcHighlight:C.NcHighlight,NcEmptyContent:v,LinkVariantIcon:f},emits:["select-provider","submit"],data(){return{selectedProvider:null,query:"",multiselectPlaceholder:o.t("Select provider"),providerIconAlt:o.t("Provider icon")}},computed:{options(){const e=[];return this.query!==""&&y(this.query)&&e.push({id:this.query,title:this.query,isLink:!0}),e.push(...B(this.query)),e}},methods:{focus(){setTimeout(()=>{var e,t,r;(r=(t=(e=this.$refs["provider-select"])==null?void 0:e.$el)==null?void 0:t.querySelector("#provider-select-input"))==null||r.focus()},300)},onProviderSelected(e){e!==null&&(e.isLink?this.$emit("submit",e.title):this.$emit("select-provider",e),this.selectedProvider=null)},onSearch(e,t){this.query=e}}};var ue=function(){var e=this,t=e._self._c;return t("div",{staticClass:"provider-list"},[t("NcSelect",{ref:"provider-select",staticClass:"provider-list--select",attrs:{"input-id":"provider-select-input",label:"title",placeholder:e.multiselectPlaceholder,options:e.options,"append-to-body":!1,"clear-search-on-select":!0,"clear-search-on-blur":()=>!1,filterable:!1},on:{search:e.onSearch,input:e.onProviderSelected},scopedSlots:e._u([{key:"option",fn:function(r){return[r.isLink?t("div",{staticClass:"provider"},[t("LinkVariantIcon",{staticClass:"link-icon",attrs:{size:20}}),t("span",[e._v(e._s(r.title))])],1):t("div",{staticClass:"provider"},[t("img",{staticClass:"provider-icon",attrs:{src:r.icon_url,alt:e.providerIconAlt}}),t("NcHighlight",{staticClass:"option-text",attrs:{search:e.query,text:r.title}})],1)]}}]),model:{value:e.selectedProvider,callback:function(r){e.selectedProvider=r},expression:"selectedProvider"}}),t("NcEmptyContent",{staticClass:"provider-list--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[t("LinkVariantIcon")]},proxy:!0}])})],1)},he=[],pe=c.normalizeComponent(de,ue,he,!1,null,"9d850ea5",null,null);const me=pe.exports;const ve={name:"NcRawLinkInput",components:{LinkVariantIcon:f,NcEmptyContent:v,NcLoadingIcon:z,NcReferenceWidget:I,NcTextField:D},props:{provider:{type:Object,required:!0}},emits:["submit"],data(){return{inputValue:"",loading:!1,reference:null,abortController:null,inputPlaceholder:o.t("Enter link")}},computed:{isLinkValid(){return y(this.inputValue)}},methods:{focus(){var e;(e=this.$refs["url-input"].$el.getElementsByTagName("input")[0])==null||e.focus()},onSubmit(e){const t=e.target.value;this.isLinkValid&&this.$emit("submit",t)},onClear(){this.inputValue="",this.reference=null},onInput(){this.reference=null,this.abortController&&this.abortController.abort(),this.isLinkValid&&j(()=>{this.updateReference()},500)()},updateReference(){this.loading=!0,this.abortController=new AbortController,m.get(u.generateOcsUrl("references/resolve",2)+"?reference="+encodeURIComponent(this.inputValue),{signal:this.abortController.signal}).then(e=>{this.reference=e.data.ocs.data.references[this.inputValue]}).catch(e=>{console.error(e)}).then(()=>{this.loading=!1})}}};var fe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"raw-link"},[t("div",{staticClass:"input-wrapper"},[t("NcTextField",{ref:"url-input",attrs:{value:e.inputValue,"show-trailing-button":e.inputValue!=="",label:e.inputPlaceholder},on:{"update:value":[function(r){e.inputValue=r},e.onInput],"trailing-button-click":e.onClear},nativeOn:{keyup:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.onSubmit.apply(null,arguments)}}},[e.loading?t("NcLoadingIcon",{attrs:{size:16}}):t("LinkVariantIcon",{attrs:{size:16}})],1)],1),e.reference!==null?t("NcReferenceWidget",{staticClass:"reference-widget",attrs:{reference:e.reference}}):t("NcEmptyContent",{staticClass:"raw-link--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[e.provider.icon_url?t("img",{staticClass:"provider-icon",attrs:{src:e.provider.icon_url}}):t("LinkVariantIcon")]},proxy:!0}])})],1)},_e=[],ge=c.normalizeComponent(ve,fe,_e,!1,null,"d0ba247a",null,null);const ye=ge.exports;const ke={name:"NcSearchResult",components:{NcHighlight:C.NcHighlight},props:{entry:{type:Object,required:!0},query:{type:String,required:!0}}};var be=function(){var e=this,t=e._self._c;return t("div",{staticClass:"result"},[e.entry.icon?t("div",{staticClass:"result--icon-class",class:{[e.entry.icon]:!0,rounded:e.entry.rounded}}):t("img",{staticClass:"result--image",class:{rounded:e.entry.rounded},attrs:{src:e.entry.thumbnailUrl}}),t("div",{staticClass:"result--content"},[t("span",{staticClass:"result--content--name"},[t("NcHighlight",{attrs:{search:e.query,text:e.entry.title}})],1),t("span",{staticClass:"result--content--subline"},[t("NcHighlight",{attrs:{search:e.query,text:e.entry.subline}})],1)])])},we=[],Pe=c.normalizeComponent(ke,be,we,!1,null,"7a394a58",null,null);const Ce=Pe.exports;const P=5,Se={name:"NcSearch",components:{LinkVariantIcon:f,DotsHorizontalIcon:U,NcEmptyContent:v,NcSelect:S,NcSearchResult:Ce},props:{provider:{type:Object,required:!0},showEmptyContent:{type:Boolean,default:!0},searchPlaceholder:{type:String,default:null}},emits:["submit"],data(){return{searchQuery:"",selectedResult:null,resultsBySearchProvider:{},searching:!1,searchingMoreOf:null,abortController:null,noOptionsText:o.t("Start typing to search"),providerIconAlt:o.t("Provider icon")}},computed:{mySearchPlaceholder(){return this.searchPlaceholder||o.t("Search")},searchProviderIds(){return this.provider.search_providers_ids},options(){if(this.searchQuery==="")return[];const e=[];return y(this.searchQuery)&&e.push(this.rawLinkEntry),e.push(...this.formattedSearchResults),e},rawLinkEntry(){return{id:"rawLinkEntry",resourceUrl:this.searchQuery,isRawLink:!0}},formattedSearchResults(){const e=[];return this.searchProviderIds.forEach(t=>{if(this.resultsBySearchProvider[t].entries.length>0){(this.searchProviderIds.length>1||this.resultsBySearchProvider[t].entries.length>1)&&e.push({id:"groupTitle-"+t,name:this.resultsBySearchProvider[t].name,isCustomGroupTitle:!0,providerId:t});const r=this.resultsBySearchProvider[t].entries.map((i,s)=>({id:"provider-"+t+"-entry-"+s,...i}));e.push(...r),this.resultsBySearchProvider[t].isPaginated&&e.push({id:"moreOf-"+t,name:this.resultsBySearchProvider[t].name,isMore:!0,providerId:t,isLoading:this.searchingMoreOf===t})}}),e}},mounted(){this.resetResults()},beforeDestroy(){this.cancelSearchRequests()},methods:{t:o.t,resetResults(){const e={};this.searchProviderIds.forEach(t=>{e[t]={entries:[]}}),this.resultsBySearchProvider=e},focus(){setTimeout(()=>{var e,t,r;(r=(t=(e=this.$refs["search-select"])==null?void 0:e.$el)==null?void 0:t.querySelector("#search-select-input"))==null||r.focus()},300)},cancelSearchRequests(){this.abortController&&this.abortController.abort()},onSearchInput(e,t){this.searchQuery=e,j(()=>{this.updateSearch()},500)()},onSelectResultSelected(e){e!==null&&(e.resourceUrl?(this.cancelSearchRequests(),this.$emit("submit",e.resourceUrl)):e.isMore&&this.searchMoreOf(e.providerId).then(()=>{this.selectedResult=null}))},searchMoreOf(e){return this.searchingMoreOf=e,this.cancelSearchRequests(),this.searchProviders(e)},updateSearch(){if(this.cancelSearchRequests(),this.resetResults(),this.searchQuery===""){this.searching=!1;return}return this.searchProviders()},searchProviders(e=null){var r,i;this.abortController=new AbortController,this.searching=!0;const t=e===null?[...this.searchProviderIds].map(s=>this.searchOneProvider(s)):[this.searchOneProvider(e,(i=(r=this.resultsBySearchProvider[e])==null?void 0:r.cursor)!=null?i:null)];return Promise.allSettled(t).then(s=>{s.find(n=>n.status==="rejected"&&(n.reason.name==="CanceledError"||n.reason.code==="ERR_CANCELED"))||(this.searching=!1,this.searchingMoreOf=null)})},searchOneProvider(e,t=null){const r=t===null?u.generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}",{providerId:e,term:this.searchQuery,limit:P}):u.generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}",{providerId:e,term:this.searchQuery,limit:P,cursor:t});return m.get(r,{signal:this.abortController.signal}).then(i=>{const s=i.data.ocs.data;this.resultsBySearchProvider[e].name=s.name,this.resultsBySearchProvider[e].cursor=s.cursor,this.resultsBySearchProvider[e].isPaginated=s.isPaginated,this.resultsBySearchProvider[e].entries.push(...s.entries)})}}};var Re=function(){var e=this,t=e._self._c;return t("div",{staticClass:"smart-picker-search",class:{"with-empty-content":e.showEmptyContent}},[t("NcSelect",{ref:"search-select",staticClass:"smart-picker-search--select",attrs:{"input-id":"search-select-input",label:"name",placeholder:e.mySearchPlaceholder,options:e.options,"append-to-body":!1,"close-on-select":!1,"clear-search-on-select":!1,"clear-search-on-blur":()=>!1,"reset-focus-on-options-change":!1,filterable:!1,autoscroll:!0,"reset-on-options-change":!1,loading:e.searching},on:{search:e.onSearchInput,input:e.onSelectResultSelected},scopedSlots:e._u([{key:"option",fn:function(r){return[r.isRawLink?t("div",{staticClass:"custom-option"},[t("LinkVariantIcon",{staticClass:"option-simple-icon",attrs:{size:20}}),t("span",{staticClass:"option-text"},[e._v(" "+e._s(e.t("Raw link {options}",{options:r.resourceUrl}))+" ")])],1):r.resourceUrl?t("NcSearchResult",{staticClass:"search-result",attrs:{entry:r,query:e.searchQuery}}):r.isCustomGroupTitle?t("span",{staticClass:"custom-option group-name"},[e.provider.icon_url?t("img",{staticClass:"provider-icon group-name-icon",attrs:{src:e.provider.icon_url}}):e._e(),t("span",{staticClass:"option-text"},[t("strong",[e._v(e._s(r.name))])])]):r.isMore?t("span",{class:{"custom-option":!0}},[r.isLoading?t("span",{staticClass:"option-simple-icon icon-loading-small"}):t("DotsHorizontalIcon",{staticClass:"option-simple-icon",attrs:{size:20}}),t("span",{staticClass:"option-text"},[e._v(" "+e._s(e.t('Load more "{options}"',{options:r.name}))+" ")])],1):e._e()]}},{key:"no-options",fn:function(){return[e._v(" "+e._s(e.noOptionsText)+" ")]},proxy:!0}]),model:{value:e.selectedResult,callback:function(r){e.selectedResult=r},expression:"selectedResult"}}),e.showEmptyContent?t("NcEmptyContent",{staticClass:"smart-picker-search--empty-content",scopedSlots:e._u([{key:"icon",fn:function(){return[e.provider.icon_url?t("img",{staticClass:"provider-icon",attrs:{alt:e.providerIconAlt,src:e.provider.icon_url}}):t("LinkVariantIcon")]},proxy:!0}],null,!1,2922132592)}):e._e()],1)},xe=[],Ne=c.normalizeComponent(Se,Re,xe,!1,null,"97d196f0",null,null);const T=Ne.exports;const d={providerList:1,standardLinkInput:2,searchInput:3,customElement:4},Ie={name:"NcReferencePicker",components:{NcCustomPickerElement:le,NcProviderList:me,NcRawLinkInput:ye,NcSearch:T},props:{initialProvider:{type:Object,default:()=>null},width:{type:Number,default:null},focusOnCreate:{type:Boolean,default:!0}},emits:["cancel","cancel-raw-link","cancel-search","provider-selected","submit"],data(){return{MODES:d,selectedProvider:this.initialProvider}},computed:{mode(){return this.selectedProvider===null?d.providerList:l(this.selectedProvider.id)?d.customElement:this.selectedProvider.search_providers_ids?d.searchInput:d.standardLinkInput},pickerWrapperStyle(){return{width:this.width?this.width+"px":void 0}}},mounted(){this.focusOnCreate&&(this.initialProvider?setTimeout(()=>{var e;(e=this.$refs["url-input"])==null||e.focus()},300):this.$nextTick(()=>{var e;(e=this.$refs["provider-list"])==null||e.focus()}))},methods:{onEscapePressed(){this.selectedProvider!==null?this.deselectProvider():this.cancelProviderSelection()},onProviderSelected(e){this.selectedProvider=e,this.$emit("provider-selected",e),this.$nextTick(()=>{var t;(t=this.$refs["url-input"])==null||t.focus()})},cancelCustomElement(){this.deselectProvider()},cancelSearch(){var e;this.$emit("cancel-search",(e=this.selectedProvider)==null?void 0:e.title),this.deselectProvider()},cancelRawLinkInput(){var e;this.$emit("cancel-raw-link",(e=this.selectedProvider)==null?void 0:e.title),this.deselectProvider()},cancelProviderSelection(){this.$emit("cancel")},submitLink(e){this.selectedProvider!==null&&ae(this.selectedProvider.id),this.$emit("submit",e),this.deselectProvider()},deselectProvider(){this.selectedProvider=null,this.$emit("provider-selected",null),setTimeout(()=>{var e;(e=this.$refs["provider-list"])==null||e.focus()},300)}}};var Le=function(){var e=this,t=e._self._c;return t("div",{staticClass:"reference-picker",style:e.pickerWrapperStyle,attrs:{tabindex:"-1"},on:{keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"esc",27,r.key,["Esc","Escape"])?null:(r.stopPropagation(),r.preventDefault(),e.onEscapePressed.apply(null,arguments))}}},[e.mode===e.MODES.providerList?t("NcProviderList",{ref:"provider-list",on:{"select-provider":e.onProviderSelected,submit:e.submitLink,cancel:e.cancelProviderSelection}}):e.mode===e.MODES.standardLinkInput?t("NcRawLinkInput",{ref:"url-input",attrs:{provider:e.selectedProvider},on:{submit:e.submitLink,cancel:e.cancelRawLinkInput}}):e.mode===e.MODES.searchInput?t("NcSearch",{ref:"url-input",attrs:{provider:e.selectedProvider},on:{cancel:e.cancelSearch,submit:e.submitLink}}):e.mode===e.MODES.customElement?t("div",{staticClass:"custom-element-wrapper"},[t("NcCustomPickerElement",{attrs:{provider:e.selectedProvider},on:{submit:e.submitLink,cancel:e.cancelCustomElement}})],1):e._e()],1)},Ee=[],Oe=c.normalizeComponent(Ie,Le,Ee,!1,null,"aa77d0d3",null,null);const M=Oe.exports;const $e={name:"NcReferencePickerModal",components:{NcReferencePicker:M,NcModal:H,NcButton:A,ArrowLeftIcon:G,CloseIcon:F},props:{initialProvider:{type:Object,default:()=>null},focusOnCreate:{type:Boolean,default:!0},isInsideViewer:{type:Boolean,default:!1}},emits:["cancel","submit"],data(){return{show:!0,selectedProvider:this.initialProvider,backButtonTitle:o.t("Back to provider selection"),closeButtonTitle:o.t("Close"),closeButtonLabel:o.t("Close Smart Picker")}},computed:{isProviderSelected(){return this.selectedProvider!==null},showBackButton(){return this.initialProvider===null&&this.isProviderSelected},modalSize(){var e;return this.isProviderSelected&&l(this.selectedProvider.id)?(e=re(this.selectedProvider.id))!=null?e:"large":"normal"},showModalName(){return!this.isProviderSelected||!l(this.selectedProvider.id)},modalName(){return this.isProviderSelected?this.selectedProvider.title:o.t("Smart Picker")}},mounted(){if(this.isInsideViewer){const e=this.$refs.modal_content;Q.emit("viewer:trapElements:changed",e)}},methods:{onCancel(){this.show=!1,this.$emit("cancel")},onSubmit(e){this.show=!1,this.$emit("submit",e)},onProviderSelect(e){this.selectedProvider=e,e===null&&this.initialProvider!==null&&this.onCancel()},onBackClicked(){this.$refs.referencePicker.deselectProvider()}}};var qe=function(){var e=this,t=e._self._c;return e.show?t("NcModal",{staticClass:"reference-picker-modal",attrs:{size:e.modalSize,"can-close":!1},on:{close:e.onCancel}},[t("div",{ref:"modal_content",staticClass:"reference-picker-modal--content"},[e.showBackButton?t("NcButton",{staticClass:"back-button",attrs:{"aria-label":e.backButtonTitle,title:e.backButtonTitle},on:{click:e.onBackClicked},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ArrowLeftIcon")]},proxy:!0}],null,!1,3001860362)}):e._e(),t("NcButton",{staticClass:"close-button",attrs:{"aria-label":e.closeButtonLabel,title:e.closeButtonTitle,type:"tertiary"},on:{click:e.onCancel},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon")]},proxy:!0}],null,!1,2491825086)}),e.showModalName?t("h2",[e._v(" "+e._s(e.modalName)+" ")]):e._e(),t("NcReferencePicker",{ref:"referencePicker",attrs:{"initial-provider":e.initialProvider,"focus-on-create":e.focusOnCreate},on:{"provider-selected":e.onProviderSelect,submit:e.onSubmit,cancel:e.onCancel}})],1)]):e._e()},Be=[],je=c.normalizeComponent($e,qe,Be,!1,null,"3f1a4ac7",null,null);const V=je.exports;async function Te(e=null,t=void 0){return await new Promise((r,i)=>{var k;const s="referencePickerModal",n=document.createElement("div");n.id=s,document.body.append(n);const a=e===null?null:(k=$(e))!=null?k:null,p=J.extend(V),h=new p({propsData:{initialProvider:a,isInsideViewer:t}}).$mount(n);h.$on("cancel",()=>{h.$destroy(),i(new Error("User cancellation"))}),h.$on("submit",W=>{h.$destroy(),r(W)})})}exports.NcCustomPickerRenderResult=te,exports.NcReferencePicker=M,exports.NcReferencePickerModal=V,exports.NcReferenceWidget=I,exports.NcSearch=T,exports.anyLinkProviderId=_,exports.getLinkWithPicker=Te,exports.getProvider=$,exports.getProviders=g,exports.isCustomPickerElementRegistered=l,exports.isWidgetRegistered=R,exports.registerCustomPickerElement=L,exports.registerWidget=x,exports.renderCustomPickerElement=E,exports.renderWidget=N,exports.searchProvider=B,exports.sortProviders=q;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"referencePickerModal-44160fb3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|