@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 @@
|
|
|
1
|
-
{"version":3,"file":"NcSettingsInputText.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NcSettingsInputText.mjs","sources":["../../src/components/NcSettingsInputText/NcSettingsInputText.vue"],"sourcesContent":["<!--\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author 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\n```vue\n<NcSettingsInputText label=\"Label\" hint=\"Hint\" />\n<NcSettingsInputText label=\"Label\" value=\"Value\" hint=\"Hint\" disabled />\n```\n\n</docs>\n\n<template>\n\t<form ref=\"form\"\n\t\t:disabled=\"disabled\"\n\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<label :for=\"id\" class=\"action-input__label\">{{ label }}</label>\n\t\t\t<input :id=\"id\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t:value=\"value\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@input=\"onInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<input :id=\"idSubmit\"\n\t\t\t\t:value=\"submitTranslated\"\n\t\t\t\ttype=\"submit\"\n\t\t\t\tclass=\"action-input__submit\">\n\t\t\t<p v-if=\"hint\" class=\"hint\">\n\t\t\t\t{{ hint }}\n\t\t\t</p>\n\t\t</div>\n\t</form>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcSettingsInputText',\n\tprops: {\n\t\t/**\n\t\t * label of the select group element\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * hint of the select group input\n\t\t */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'settings-input-text-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tsubmitTranslated: t('Submit'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string}\n\t\t */\n\t\tidSubmit() {\n\t\t\treturn this.id + '-submit'\n\t\t},\n\t},\n\tmethods: {\n\t\tonInput(event) {\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t *\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n\t.input-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\twidth: 100%;\n\t\tmax-width: 400px;\n\n\t\t& .action-input__label {\n\t\t\tmargin-right: 12px;\n\t\t}\n\n\t\t// if disabled, change cursor\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t.hint {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tmargin-left: 8px;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","GenRandomId","id","t","event"],"mappings":";;;;AA0DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,yBAAAC,EAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,kBAAAC,EAAA,QAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AACA,aAAA,KAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,SAAA;AAAA,IACA,QAAAC,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA,GAMA,KAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,IACA,SAAAA,GAAA;AACA,MAAA,KAAA,YAMA,KAAA,MAAA,UAAAA,CAAA;AAAA,IAEA;AAAA,IACA,SAAAA,GAAA;AAMA,WAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1,62 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p = require("../assets/index-76a58945.css");
|
|
2
|
+
const s = require("../chunks/l10n-903083c4.cjs"), i = require("vue-material-design-icons/HelpCircle.vue"), r = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), a = (e) => e && e.__esModule ? e : { default: e }, l = /* @__PURE__ */ a(i);
|
|
3
|
+
const o = {
|
|
4
|
+
name: "NcSettingsSection",
|
|
5
|
+
components: {
|
|
6
|
+
HelpCircle: l.default
|
|
7
|
+
},
|
|
8
|
+
props: {
|
|
9
|
+
name: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: !0
|
|
12
|
+
},
|
|
13
|
+
description: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
docUrl: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* Limit the width of the setting's content
|
|
23
|
+
*
|
|
24
|
+
* By default only the name and description have a limit, use this
|
|
25
|
+
* property to also apply this to the rest of the content.
|
|
26
|
+
*/
|
|
27
|
+
limitWidth: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !0
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
docNameTranslated: s.t("External documentation for {name}", {
|
|
35
|
+
name: this.name
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
hasDescription() {
|
|
41
|
+
return this.description.length > 0;
|
|
42
|
+
},
|
|
43
|
+
hasDocUrl() {
|
|
44
|
+
return this.docUrl.length > 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var c = function() {
|
|
49
|
+
var t = this, n = t._self._c;
|
|
50
|
+
return n("div", { staticClass: "settings-section", class: { "settings-section--limit-width": t.limitWidth } }, [n("h2", { staticClass: "settings-section__name" }, [t._v(" " + t._s(t.name) + " "), t.hasDocUrl ? n("a", { staticClass: "settings-section__info", attrs: { href: t.docUrl, title: t.docNameTranslated, target: "_blank", rel: "noreferrer nofollow" } }, [n("HelpCircle", { attrs: { size: 20 } })], 1) : t._e()]), t.hasDescription ? n("p", { staticClass: "settings-section__desc" }, [t._v(" " + t._s(t.description) + " ")]) : t._e(), t._t("default")], 2);
|
|
51
|
+
}, _ = [], d = /* @__PURE__ */ r.normalizeComponent(
|
|
52
|
+
o,
|
|
53
|
+
c,
|
|
54
|
+
_,
|
|
55
|
+
!1,
|
|
56
|
+
null,
|
|
57
|
+
"375ea653",
|
|
58
|
+
null,
|
|
59
|
+
null
|
|
60
|
+
);
|
|
61
|
+
const u = d.exports;
|
|
62
|
+
module.exports = u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcSettingsSection.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"NcSettingsSection.cjs","sources":["../../src/components/NcSettingsSection/NcSettingsSection.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\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 is to be used in the settings section of nextcloud.\n\n### Examples\n\n```vue\n<template>\n\t<NcSettingsSection\n\t\tname=\"Two-Factor Authentication\"\n\t\tdescription=\"Two-factor authentication can be enforced for all users and specific groups.\"\n\t\tdoc-url=\"https://docs.nextcloud.com/server/19/go.php?to=admin-2fa\"\n\t\t:limit-width=\"true\">\n\t\t<p>Your settings here</p>\n\t</NcSettingsSection>\n</template>\n```\n</docs>\n\n<template>\n\t<div class=\"settings-section\" :class=\"{'settings-section--limit-width': limitWidth}\">\n\t\t<h2 class=\"settings-section__name\">\n\t\t\t{{ name }}\n\t\t\t<a v-if=\"hasDocUrl\"\n\t\t\t\t:href=\"docUrl\"\n\t\t\t\tclass=\"settings-section__info\"\n\t\t\t\t:title=\"docNameTranslated\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer nofollow\">\n\t\t\t\t<HelpCircle :size=\"20\" />\n\t\t\t</a>\n\t\t</h2>\n\t\t<p v-if=\"hasDescription\"\n\t\t\tclass=\"settings-section__desc\">\n\t\t\t{{ description }}\n\t\t</p>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport HelpCircle from 'vue-material-design-icons/HelpCircle.vue'\n\nexport default {\n\tname: 'NcSettingsSection',\n\n\tcomponents: {\n\t\tHelpCircle,\n\t},\n\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tdocUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Limit the width of the setting's content\n\t\t *\n\t\t * By default only the name and description have a limit, use this\n\t\t * property to also apply this to the rest of the content.\n\t\t */\n\t\tlimitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdocNameTranslated: t('External documentation for {name}', {\n\t\t\t\tname: this.name,\n\t\t\t}),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasDescription() {\n\t\t\treturn this.description.length > 0\n\t\t},\n\t\thasDocUrl() {\n\t\t\treturn this.docUrl.length > 0\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n$maxWidth: 900px;\n\n.settings-section {\n\tdisplay: block;\n\tmargin-bottom: auto;\n\tpadding: 30px;\n\n\t&:not(:last-child) {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&--limit-width > * {\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__name {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 20px;\n\t\tfont-weight: bold;\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__info {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\t// make sure to properly align the icon with the text\n\t\tmargin: -$icon-margin;\n\t\tmargin-left: 0;\n\t\topacity: $opacity_normal;\n\n\t\t&:hover, &:focus, &:active {\n\t\t\topacity: $opacity_full;\n\t\t}\n\t}\n\n\t&__desc {\n\t\tmargin-top: -.2em;\n\t\tmargin-bottom: 1em;\n\t\topacity: $opacity_normal;\n\t\tmax-width: $maxWidth;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","HelpCircle__default","l10n"],"mappings":";;AAqEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC,EAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,mBAAAC,EAAA,EAAA,qCAAA;AAAA,QACA,MAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,YAAA,SAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,19 +1,66 @@
|
|
|
1
|
-
import "../assets/
|
|
2
|
-
import { t as
|
|
3
|
-
import
|
|
4
|
-
import { n } from "../chunks/_plugin-vue2_normalizer-
|
|
5
|
-
const r = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import "../assets/index-76a58945.css";
|
|
2
|
+
import { t as n } from "../chunks/l10n-27a75c40.mjs";
|
|
3
|
+
import s from "vue-material-design-icons/HelpCircle.vue";
|
|
4
|
+
import { n as i } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
5
|
+
const r = {
|
|
6
|
+
name: "NcSettingsSection",
|
|
7
|
+
components: {
|
|
8
|
+
HelpCircle: s
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
name: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: !0
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
docUrl: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* Limit the width of the setting's content
|
|
25
|
+
*
|
|
26
|
+
* By default only the name and description have a limit, use this
|
|
27
|
+
* property to also apply this to the rest of the content.
|
|
28
|
+
*/
|
|
29
|
+
limitWidth: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
docNameTranslated: n("External documentation for {name}", {
|
|
37
|
+
name: this.name
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
hasDescription() {
|
|
43
|
+
return this.description.length > 0;
|
|
44
|
+
},
|
|
45
|
+
hasDocUrl() {
|
|
46
|
+
return this.docUrl.length > 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
12
50
|
var a = function() {
|
|
13
51
|
var t = this, e = t._self._c;
|
|
14
|
-
return e("div", { staticClass: "settings-section", class: { "settings-section--limit-width": t.limitWidth } }, [e("h2", { staticClass: "settings-section__name" }, [t._v(" " + t._s(t.name) + " "), t.hasDocUrl ? e("a", { staticClass: "settings-section__info", attrs: { href: t.docUrl,
|
|
15
|
-
}, o = [],
|
|
16
|
-
|
|
52
|
+
return e("div", { staticClass: "settings-section", class: { "settings-section--limit-width": t.limitWidth } }, [e("h2", { staticClass: "settings-section__name" }, [t._v(" " + t._s(t.name) + " "), t.hasDocUrl ? e("a", { staticClass: "settings-section__info", attrs: { href: t.docUrl, title: t.docNameTranslated, target: "_blank", rel: "noreferrer nofollow" } }, [e("HelpCircle", { attrs: { size: 20 } })], 1) : t._e()]), t.hasDescription ? e("p", { staticClass: "settings-section__desc" }, [t._v(" " + t._s(t.description) + " ")]) : t._e(), t._t("default")], 2);
|
|
53
|
+
}, o = [], c = /* @__PURE__ */ i(
|
|
54
|
+
r,
|
|
55
|
+
a,
|
|
56
|
+
o,
|
|
57
|
+
!1,
|
|
58
|
+
null,
|
|
59
|
+
"375ea653",
|
|
60
|
+
null,
|
|
61
|
+
null
|
|
62
|
+
);
|
|
63
|
+
const u = c.exports;
|
|
17
64
|
export {
|
|
18
|
-
|
|
65
|
+
u as default
|
|
19
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcSettingsSection.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NcSettingsSection.mjs","sources":["../../src/components/NcSettingsSection/NcSettingsSection.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n -\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 is to be used in the settings section of nextcloud.\n\n### Examples\n\n```vue\n<template>\n\t<NcSettingsSection\n\t\tname=\"Two-Factor Authentication\"\n\t\tdescription=\"Two-factor authentication can be enforced for all users and specific groups.\"\n\t\tdoc-url=\"https://docs.nextcloud.com/server/19/go.php?to=admin-2fa\"\n\t\t:limit-width=\"true\">\n\t\t<p>Your settings here</p>\n\t</NcSettingsSection>\n</template>\n```\n</docs>\n\n<template>\n\t<div class=\"settings-section\" :class=\"{'settings-section--limit-width': limitWidth}\">\n\t\t<h2 class=\"settings-section__name\">\n\t\t\t{{ name }}\n\t\t\t<a v-if=\"hasDocUrl\"\n\t\t\t\t:href=\"docUrl\"\n\t\t\t\tclass=\"settings-section__info\"\n\t\t\t\t:title=\"docNameTranslated\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer nofollow\">\n\t\t\t\t<HelpCircle :size=\"20\" />\n\t\t\t</a>\n\t\t</h2>\n\t\t<p v-if=\"hasDescription\"\n\t\t\tclass=\"settings-section__desc\">\n\t\t\t{{ description }}\n\t\t</p>\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport HelpCircle from 'vue-material-design-icons/HelpCircle.vue'\n\nexport default {\n\tname: 'NcSettingsSection',\n\n\tcomponents: {\n\t\tHelpCircle,\n\t},\n\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tdocUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Limit the width of the setting's content\n\t\t *\n\t\t * By default only the name and description have a limit, use this\n\t\t * property to also apply this to the rest of the content.\n\t\t */\n\t\tlimitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdocNameTranslated: t('External documentation for {name}', {\n\t\t\t\tname: this.name,\n\t\t\t}),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasDescription() {\n\t\t\treturn this.description.length > 0\n\t\t},\n\t\thasDocUrl() {\n\t\t\treturn this.docUrl.length > 0\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n$maxWidth: 900px;\n\n.settings-section {\n\tdisplay: block;\n\tmargin-bottom: auto;\n\tpadding: 30px;\n\n\t&:not(:last-child) {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&--limit-width > * {\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__name {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 20px;\n\t\tfont-weight: bold;\n\t\tmax-width: $maxWidth;\n\t}\n\n\t&__info {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\t// make sure to properly align the icon with the text\n\t\tmargin: -$icon-margin;\n\t\tmargin-left: 0;\n\t\topacity: $opacity_normal;\n\n\t\t&:hover, &:focus, &:active {\n\t\t\topacity: $opacity_full;\n\t\t}\n\t}\n\n\t&__desc {\n\t\tmargin-top: -.2em;\n\t\tmargin-bottom: 1em;\n\t\topacity: $opacity_normal;\n\t\tmax-width: $maxWidth;\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","HelpCircle","t"],"mappings":";;;;AAqEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,mBAAAC,EAAA,qCAAA;AAAA,QACA,MAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,YAAA,SAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,aAAA,KAAA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const e = require("../chunks/NcSettingsSelectGroup-47d9c113.cjs");
|
|
4
|
+
/**
|
|
5
|
+
* @copyright Copyright (c) 2019 Greta Doci <gretadoci@gmail.com>
|
|
6
|
+
*
|
|
7
|
+
* @author Greta Doci <gretadoci@gmail.com>
|
|
8
|
+
*
|
|
9
|
+
* @license AGPL-3.0-or-later
|
|
10
|
+
*
|
|
11
|
+
* This program is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU Affero General Public License as
|
|
13
|
+
* published by the Free Software Foundation, either version 3 of the
|
|
14
|
+
* License, or (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU Affero General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
exports.NcSettingsSelectGroup = e.NcSettingsSelectGroup;
|
|
26
|
+
exports.default = e.NcSettingsSelectGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcSettingsSelectGroup.cjs","sources":["../../src/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n```vue\n<template>\n\t<section>\n\t\t<NcSettingsSelectGroup v-model=\"groups\" placeholder=\"Select user groups\" label=\"The hidden label\" />\n\t\t<NcSettingsSelectGroup v-model=\"otherGroups\" :disabled=\"true\" label=\"Also a fallback for the placeholder\" />\n\t\t<div>You have selected: <code>{{ groups }}</code> and <code>{{ otherGroups }}</code></div>\n\t</section>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tgroups: [],\n\t\t\totherGroups: ['admin']\n\t\t}\n\t}\n}\n</script>\n<style scoped>\nsection * {\n\tpadding: 6px 0px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div>\n\t\t<label v-if=\"label\" :for=\"id\" class=\"hidden-visually\">{{ label }}</label>\n\t\t<NcSelect :value=\"inputValue\"\n\t\t\t:options=\"groupsArray\"\n\t\t\t:placeholder=\"placeholder || label\"\n\t\t\t:filter-by=\"filterGroups\"\n\t\t\t:input-id=\"id\"\n\t\t\t:limit=\"5\"\n\t\t\tlabel=\"displayname\"\n\t\t\t:multiple=\"true\"\n\t\t\t:close-on-select=\"false\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t@input=\"update\"\n\t\t\t@search=\"onSearch\" />\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '../../components/NcSelect/index.js'\nimport { t } from '../../l10n.js'\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport axios from '@nextcloud/axios'\nimport { showError } from '@nextcloud/dialogs'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { debounce } from 'debounce'\n\nexport default {\n\tname: 'NcSettingsSelectGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [l10n],\n\tprops: {\n\t\t/**\n\t\t * The text of the label element of the select group input\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder for the input element\n\t\t * For backwards compatibility it falls back to the `label` value\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t * A list of group IDs can be provided\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: [\n\t\t'input',\n\t\t'error',\n\t],\n\tdata() {\n\t\treturn {\n\t\t\t/** Temporary store to cache groups */\n\t\t\tgroups: {},\n\t\t\trandId: GenRandomId(),\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * Validate input value and only return valid strings (group IDs)\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tfilteredValue() {\n\t\t\treturn this.value.filter((group) => group !== '' && typeof group === 'string')\n\t\t},\n\n\t\t/**\n\t\t * value property converted to an array of group objects used as input for the NcSelect\n\t\t */\n\t\tinputValue() {\n\t\t\treturn this.filteredValue.map(\n\t\t\t\t(id) => {\n\t\t\t\t\tif (typeof this.groups[id] === 'undefined') {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tdisplayname: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.groups[id]\n\t\t\t\t},\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Convert groups object to array of groups required for NcSelect.options\n\t\t * Filter out currently selected values\n\t\t *\n\t\t * @return {object[]}\n\t\t */\n\t\tgroupsArray() {\n\t\t\treturn Object.values(this.groups).filter(g => !this.value.includes(g.id))\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * If the value is changed, check that all groups are loaded so we show the correct display name\n\t\t */\n\t\tvalue: {\n\t\t\thandler() {\n\t\t\t\tconst loadedGroupIds = Object.keys(this.groups)\n\t\t\t\tconst missing = this.filteredValue.filter(group => !loadedGroupIds.includes(group))\n\t\t\t\tmissing.forEach((groupId) => {\n\t\t\t\t\tthis.loadGroup(groupId)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// Run the watch handler also when the component is initially mounted\n\t\t\timmediate: true,\n\t\t},\n\t},\n\t/**\n\t * Load groups matching the empty query to reduce API calls\n\t */\n\tasync mounted() {\n\t\t// version scoped to prevent issues with different library versions\n\t\tconst storageName = `${appName}:${appVersion}/initialGroups`\n\n\t\tlet savedGroups = window.sessionStorage.getItem(storageName)\n\t\tif (savedGroups) {\n\t\t\tsavedGroups = Object.fromEntries(JSON.parse(savedGroups).map(group => [group.id, group]))\n\t\t\tthis.groups = { ...this.groups, ...savedGroups }\n\t\t} else {\n\t\t\tawait this.loadGroup('')\n\t\t\twindow.sessionStorage.setItem(storageName, JSON.stringify(Object.values(this.groups)))\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Called when a new group is selected or previous group is deselected to emit the update event\n\t\t *\n\t\t * @param {object[]} updatedValue Array of selected groups\n\t\t */\n\t\tupdate(updatedValue) {\n\t\t\tconst value = updatedValue.map((element) => element.id)\n\t\t\t/** Emitted when the groups selection changes<br />**Payload:** `value` (`Array`) - *Ids of selected groups */\n\t\t\tthis.$emit('input', value)\n\t\t},\n\n\t\t/**\n\t\t * Use provisioning API to search for given group and save it in the groups object\n\t\t *\n\t\t * @param {string} query The query like parts of the id oder display name\n\t\t * @return {boolean}\n\t\t */\n\t\tasync loadGroup(query) {\n\t\t\ttry {\n\t\t\t\tquery = typeof query === 'string' ? encodeURI(query) : ''\n\t\t\t\tconst response = await axios.get(generateOcsUrl(`cloud/groups/details?search=${query}&limit=10`, 2))\n\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tconst newGroups = Object.fromEntries(response.data.ocs.data.groups.map((element) => [element.id, element]))\n\t\t\t\t\tthis.groups = { ...this.groups, ...newGroups }\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t/** Emitted if groups could not be queried.<br />**Payload:** `error` (`object`) - The Axios error */\n\t\t\t\tthis.$emit('error', error)\n\t\t\t\tshowError(t('Unable to search the group'))\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * Custom filter function for `NcSelect` to filter by ID *and* display name\n\t\t *\n\t\t * @param {object} option One of the groups\n\t\t * @param {string} label The label property of the group\n\t\t * @param {string} search The current search string\n\t\t */\n\t\tfilterGroups(option, label, search) {\n\t\t\treturn `${label || ''} ${option.id}`.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n\t\t},\n\n\t\t/**\n\t\t * Debounce the group search (reduce API calls)\n\t\t */\n\t\tonSearch: debounce(function(query) {\n\t\t\tthis.loadGroup(query)\n\t\t}, 200),\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcSelect","l10n","GenRandomId","id","group","g","loadedGroupIds","groupId","storageName","savedGroups","updatedValue","value","element","query","response","axios","generateOcsUrl","newGroups","error","showError","t","option","label","search","debounce"],"mappings":"+bAgFAA,EAAA,CACA,KAAA,wBACA,WAAA,CACA,SAAAC,CACA,EACA,OAAA,CAAAC,EAAAA,IAAA,EACA,MAAA,CAIA,MAAA,CACA,KAAA,OACA,SAAA,EACA,EAMA,YAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,GAAA,CACA,KAAA,OACA,QAAA,IAAA,UAAAC,cAAA,EACA,UAAAC,GAAAA,EAAA,KAAA,IAAA,EACA,EAMA,MAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,CACA,EAKA,SAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EACA,MAAA,CACA,QACA,OACA,EACA,MAAA,CACA,MAAA,CAEA,OAAA,CAAA,EACA,OAAAD,EAAAA,YAAA,CACA,CACA,EACA,SAAA,CAMA,eAAA,CACA,OAAA,KAAA,MAAA,OAAAE,GAAAA,IAAA,IAAA,OAAAA,GAAA,QAAA,CACA,EAKA,YAAA,CACA,OAAA,KAAA,cAAA,IACAD,GACA,OAAA,KAAA,OAAAA,CAAA,EAAA,IACA,CACA,GAAAA,EACA,YAAAA,CACA,EAEA,KAAA,OAAAA,CAAA,CAEA,CACA,EAQA,aAAA,CACA,OAAA,OAAA,OAAA,KAAA,MAAA,EAAA,OAAAE,GAAA,CAAA,KAAA,MAAA,SAAAA,EAAA,EAAA,CAAA,CACA,CACA,EACA,MAAA,CAIA,MAAA,CACA,SAAA,CACA,MAAAC,EAAA,OAAA,KAAA,KAAA,MAAA,EACA,KAAA,cAAA,OAAAF,GAAA,CAAAE,EAAA,SAAAF,CAAA,CAAA,EACA,QAAAG,GAAA,CACA,KAAA,UAAAA,CAAA,CACA,CAAA,CACA,EAEA,UAAA,EACA,CACA,EAIA,MAAA,SAAA,CAEA,MAAAC,EAAA,GAAA,OAAA,IAAA,UAAA,iBAEA,IAAAC,EAAA,OAAA,eAAA,QAAAD,CAAA,EACAC,GACAA,EAAA,OAAA,YAAA,KAAA,MAAAA,CAAA,EAAA,IAAAL,GAAA,CAAAA,EAAA,GAAAA,CAAA,CAAA,CAAA,EACA,KAAA,OAAA,CAAA,GAAA,KAAA,OAAA,GAAAK,CAAA,IAEA,MAAA,KAAA,UAAA,EAAA,EACA,OAAA,eAAA,QAAAD,EAAA,KAAA,UAAA,OAAA,OAAA,KAAA,MAAA,CAAA,CAAA,EAEA,EACA,QAAA,CAMA,OAAAE,EAAA,CACA,MAAAC,EAAAD,EAAA,IAAAE,GAAAA,EAAA,EAAA,EAEA,KAAA,MAAA,QAAAD,CAAA,CACA,EAQA,MAAA,UAAAE,EAAA,CACA,GAAA,CACAA,EAAA,OAAAA,GAAA,SAAA,UAAAA,CAAA,EAAA,GACA,MAAAC,EAAA,MAAAC,EAAA,IAAAC,EAAA,eAAA,+BAAAH,CAAA,YAAA,CAAA,CAAA,EAEA,GAAA,OAAA,KAAAC,EAAA,KAAA,IAAA,KAAA,MAAA,EAAA,OAAA,EAAA,CACA,MAAAG,EAAA,OAAA,YAAAH,EAAA,KAAA,IAAA,KAAA,OAAA,IAAAF,GAAA,CAAAA,EAAA,GAAAA,CAAA,CAAA,CAAA,EACA,OAAA,KAAA,OAAA,CAAA,GAAA,KAAA,OAAA,GAAAK,CAAA,EACA,EAEA,CAAA,OAAAC,EAAA,CAEA,KAAA,MAAA,QAAAA,CAAA,EACAC,YAAAC,EAAAA,EAAA,4BAAA,CAAA,CACA,CACA,MAAA,EACA,EASA,aAAAC,EAAAC,EAAAC,EAAA,CACA,MAAA,GAAAD,GAAA,EAAAD,IAAAA,EAAA,KAAA,kBAAA,EAAA,QAAAE,EAAA,kBAAA,CAAA,EAAA,EACA,EAKA,SAAAC,EAAAA,SAAA,SAAAX,EAAA,CACA,KAAA,UAAAA,CAAA,CACA,EAAA,GAAA,CACA,CACA"}
|
|
1
|
+
{"version":3,"file":"NcSettingsSelectGroup.cjs","sources":["../../src/components/NcSettingsSelectGroup/index.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Greta Doci <gretadoci@gmail.com>\n *\n * @author Greta Doci <gretadoci@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport NcSettingsSelectGroup from './NcSettingsSelectGroup.vue'\n\nexport default NcSettingsSelectGroup\nexport { NcSettingsSelectGroup }\n"],"names":[],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;"}
|
|
@@ -1,55 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, immediate: !0 } }, async mounted() {
|
|
24
|
-
const e = `${appName}:${appVersion}/initialGroups`;
|
|
25
|
-
let t = window.sessionStorage.getItem(e);
|
|
26
|
-
t ? (t = Object.fromEntries(JSON.parse(t).map((r) => [r.id, r])), this.groups = { ...this.groups, ...t }) : (await this.loadGroup(""), window.sessionStorage.setItem(e, JSON.stringify(Object.values(this.groups))));
|
|
27
|
-
}, methods: { update(e) {
|
|
28
|
-
const t = e.map((r) => r.id);
|
|
29
|
-
this.$emit("input", t);
|
|
30
|
-
}, async loadGroup(e) {
|
|
31
|
-
try {
|
|
32
|
-
e = typeof e == "string" ? encodeURI(e) : "";
|
|
33
|
-
const t = await u.get(p(`cloud/groups/details?search=${e}&limit=10`, 2));
|
|
34
|
-
if (Object.keys(t.data.ocs.data.groups).length > 0) {
|
|
35
|
-
const r = Object.fromEntries(t.data.ocs.data.groups.map((a) => [a.id, a]));
|
|
36
|
-
return this.groups = { ...this.groups, ...r }, !0;
|
|
37
|
-
}
|
|
38
|
-
} catch (t) {
|
|
39
|
-
this.$emit("error", t), n(s("Unable to search the group"));
|
|
40
|
-
}
|
|
41
|
-
return !1;
|
|
42
|
-
}, filterGroups(e, t, r) {
|
|
43
|
-
return `${t || ""} ${e.id}`.toLocaleLowerCase().indexOf(r.toLocaleLowerCase()) > -1;
|
|
44
|
-
}, onSearch: d(function(e) {
|
|
45
|
-
this.loadGroup(e);
|
|
46
|
-
}, 200) } };
|
|
47
|
-
var f = function() {
|
|
48
|
-
var e = this, t = e._self._c;
|
|
49
|
-
return t("div", [e.label ? t("label", { staticClass: "hidden-visually", attrs: { for: e.id } }, [e._v(e._s(e.label))]) : e._e(), t("NcSelect", { attrs: { value: e.inputValue, options: e.groupsArray, placeholder: e.placeholder || e.label, "filter-by": e.filterGroups, "input-id": e.id, limit: 5, label: "displayname", multiple: !0, "close-on-select": !1, disabled: e.disabled }, on: { input: e.update, search: e.onSearch } })], 1);
|
|
50
|
-
}, h = [], g = c(m, f, h, !1, null, null, null, null);
|
|
51
|
-
const j = g.exports;
|
|
1
|
+
import { N as e } from "../chunks/NcSettingsSelectGroup-0f4a0f94.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @copyright Copyright (c) 2019 Greta Doci <gretadoci@gmail.com>
|
|
4
|
+
*
|
|
5
|
+
* @author Greta Doci <gretadoci@gmail.com>
|
|
6
|
+
*
|
|
7
|
+
* @license AGPL-3.0-or-later
|
|
8
|
+
*
|
|
9
|
+
* This program is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU Affero General Public License as
|
|
11
|
+
* published by the Free Software Foundation, either version 3 of the
|
|
12
|
+
* License, or (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU Affero General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
52
23
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
24
|
+
e as NcSettingsSelectGroup,
|
|
25
|
+
e as default
|
|
55
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcSettingsSelectGroup.mjs","sources":["../../src/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n - @author Greta Doci <gretadoci@gmail.com>\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n```vue\n<template>\n\t<section>\n\t\t<NcSettingsSelectGroup v-model=\"groups\" placeholder=\"Select user groups\" label=\"The hidden label\" />\n\t\t<NcSettingsSelectGroup v-model=\"otherGroups\" :disabled=\"true\" label=\"Also a fallback for the placeholder\" />\n\t\t<div>You have selected: <code>{{ groups }}</code> and <code>{{ otherGroups }}</code></div>\n\t</section>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tgroups: [],\n\t\t\totherGroups: ['admin']\n\t\t}\n\t}\n}\n</script>\n<style scoped>\nsection * {\n\tpadding: 6px 0px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div>\n\t\t<label v-if=\"label\" :for=\"id\" class=\"hidden-visually\">{{ label }}</label>\n\t\t<NcSelect :value=\"inputValue\"\n\t\t\t:options=\"groupsArray\"\n\t\t\t:placeholder=\"placeholder || label\"\n\t\t\t:filter-by=\"filterGroups\"\n\t\t\t:input-id=\"id\"\n\t\t\t:limit=\"5\"\n\t\t\tlabel=\"displayname\"\n\t\t\t:multiple=\"true\"\n\t\t\t:close-on-select=\"false\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t@input=\"update\"\n\t\t\t@search=\"onSearch\" />\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '../../components/NcSelect/index.js'\nimport { t } from '../../l10n.js'\nimport l10n from '../../mixins/l10n.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport axios from '@nextcloud/axios'\nimport { showError } from '@nextcloud/dialogs'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { debounce } from 'debounce'\n\nexport default {\n\tname: 'NcSettingsSelectGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [l10n],\n\tprops: {\n\t\t/**\n\t\t * The text of the label element of the select group input\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder for the input element\n\t\t * For backwards compatibility it falls back to the `label` value\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the select group element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * value of the select group input\n\t\t * A list of group IDs can be provided\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the settings select group input\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: [\n\t\t'input',\n\t\t'error',\n\t],\n\tdata() {\n\t\treturn {\n\t\t\t/** Temporary store to cache groups */\n\t\t\tgroups: {},\n\t\t\trandId: GenRandomId(),\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * Validate input value and only return valid strings (group IDs)\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tfilteredValue() {\n\t\t\treturn this.value.filter((group) => group !== '' && typeof group === 'string')\n\t\t},\n\n\t\t/**\n\t\t * value property converted to an array of group objects used as input for the NcSelect\n\t\t */\n\t\tinputValue() {\n\t\t\treturn this.filteredValue.map(\n\t\t\t\t(id) => {\n\t\t\t\t\tif (typeof this.groups[id] === 'undefined') {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tdisplayname: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.groups[id]\n\t\t\t\t},\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Convert groups object to array of groups required for NcSelect.options\n\t\t * Filter out currently selected values\n\t\t *\n\t\t * @return {object[]}\n\t\t */\n\t\tgroupsArray() {\n\t\t\treturn Object.values(this.groups).filter(g => !this.value.includes(g.id))\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * If the value is changed, check that all groups are loaded so we show the correct display name\n\t\t */\n\t\tvalue: {\n\t\t\thandler() {\n\t\t\t\tconst loadedGroupIds = Object.keys(this.groups)\n\t\t\t\tconst missing = this.filteredValue.filter(group => !loadedGroupIds.includes(group))\n\t\t\t\tmissing.forEach((groupId) => {\n\t\t\t\t\tthis.loadGroup(groupId)\n\t\t\t\t})\n\t\t\t},\n\t\t\t// Run the watch handler also when the component is initially mounted\n\t\t\timmediate: true,\n\t\t},\n\t},\n\t/**\n\t * Load groups matching the empty query to reduce API calls\n\t */\n\tasync mounted() {\n\t\t// version scoped to prevent issues with different library versions\n\t\tconst storageName = `${appName}:${appVersion}/initialGroups`\n\n\t\tlet savedGroups = window.sessionStorage.getItem(storageName)\n\t\tif (savedGroups) {\n\t\t\tsavedGroups = Object.fromEntries(JSON.parse(savedGroups).map(group => [group.id, group]))\n\t\t\tthis.groups = { ...this.groups, ...savedGroups }\n\t\t} else {\n\t\t\tawait this.loadGroup('')\n\t\t\twindow.sessionStorage.setItem(storageName, JSON.stringify(Object.values(this.groups)))\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Called when a new group is selected or previous group is deselected to emit the update event\n\t\t *\n\t\t * @param {object[]} updatedValue Array of selected groups\n\t\t */\n\t\tupdate(updatedValue) {\n\t\t\tconst value = updatedValue.map((element) => element.id)\n\t\t\t/** Emitted when the groups selection changes<br />**Payload:** `value` (`Array`) - *Ids of selected groups */\n\t\t\tthis.$emit('input', value)\n\t\t},\n\n\t\t/**\n\t\t * Use provisioning API to search for given group and save it in the groups object\n\t\t *\n\t\t * @param {string} query The query like parts of the id oder display name\n\t\t * @return {boolean}\n\t\t */\n\t\tasync loadGroup(query) {\n\t\t\ttry {\n\t\t\t\tquery = typeof query === 'string' ? encodeURI(query) : ''\n\t\t\t\tconst response = await axios.get(generateOcsUrl(`cloud/groups/details?search=${query}&limit=10`, 2))\n\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tconst newGroups = Object.fromEntries(response.data.ocs.data.groups.map((element) => [element.id, element]))\n\t\t\t\t\tthis.groups = { ...this.groups, ...newGroups }\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t/** Emitted if groups could not be queried.<br />**Payload:** `error` (`object`) - The Axios error */\n\t\t\t\tthis.$emit('error', error)\n\t\t\t\tshowError(t('Unable to search the group'))\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * Custom filter function for `NcSelect` to filter by ID *and* display name\n\t\t *\n\t\t * @param {object} option One of the groups\n\t\t * @param {string} label The label property of the group\n\t\t * @param {string} search The current search string\n\t\t */\n\t\tfilterGroups(option, label, search) {\n\t\t\treturn `${label || ''} ${option.id}`.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1\n\t\t},\n\n\t\t/**\n\t\t * Debounce the group search (reduce API calls)\n\t\t */\n\t\tonSearch: debounce(function(query) {\n\t\t\tthis.loadGroup(query)\n\t\t}, 200),\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcSelect","l10n","GenRandomId","id","group","g","loadedGroupIds","groupId","storageName","savedGroups","updatedValue","value","element","query","response","axios","generateOcsUrl","newGroups","error","showError","t","option","label","search","debounce"],"mappings":";;;;;;;;;AAgFA,MAAAA,IAAA,EACA,MAAA,yBACA,YAAA,EACA,UAAAC,EACA,GACA,QAAA,CAAAC,CAAA,GACA,OAAA,EAIA,OAAA,EACA,MAAA,QACA,UAAA,GACA,GAMA,aAAA,EACA,MAAA,QACA,SAAA,GACA,GAKA,IAAA,EACA,MAAA,QACA,SAAA,MAAA,YAAAC,EAAA,GACA,WAAAC,CAAAA,MAAAA,EAAA,KAAA,MAAA,GACA,GAMA,OAAA,EACA,MAAA,OACA,SAAA,MAAA,CAAA,EACA,GAKA,UAAA,EACA,MAAA,SACA,SAAA,GACA,EACA,GACA,OAAA,CACA,SACA,OACA,GACA,OAAA;AACA,SAAA,EAEA,QAAA,CAAA,GACA,QAAAD,EAAA,EACA;AACA,GACA,UAAA,EAMA,gBAAA;AACA,SAAA,KAAA,MAAA,OAAAE,CAAAA,MAAAA,MAAA,MAAA,OAAAA,KAAA,QAAA;AACA,GAKA,aAAA;AACA,SAAA,KAAA,cAAA,IACAD,CAAAA,MACA,OAAA,KAAA,OAAAA,CAAA,IAAA,MACA,EACA,IAAAA,GACA,aAAAA,EACA,IAEA,KAAA,OAAAA,CAAA,CAEA;AACA,GAQA,cAAA;AACA,SAAA,OAAA,OAAA,KAAA,MAAA,EAAA,OAAAE,CAAAA,MAAA,CAAA,KAAA,MAAA,SAAAA,EAAA,EAAA,CAAA;AACA,EACA,GACA,OAAA,EAIA,OAAA,EACA,UAAA;AACA,QAAAC,IAAA,OAAA,KAAA,KAAA,MAAA;AACA,OAAA,cAAA,OAAAF,CAAAA,MAAA,CAAAE,EAAA,SAAAF,CAAA,CAAA,EACA,QAAAG,CAAAA,MAAA;AACA,SAAA,UAAAA,CAAA;AAAA,EACA,CAAA;AACA,GAEA,WAAA,GACA,EACA,GAIA,MAAA,UAAA;AAEA,QAAAC,IAAA,GAAA,OAAA,IAAA,UAAA;AAEA,MAAAC,IAAA,OAAA,eAAA,QAAAD,CAAA;AACAC,EAAAA,KACAA,IAAA,OAAA,YAAA,KAAA,MAAAA,CAAA,EAAA,IAAAL,OAAA,CAAAA,EAAA,IAAAA,CAAA,CAAA,CAAA,GACA,KAAA,SAAA,EAAA,GAAA,KAAA,QAAA,GAAAK,EAAA,MAEA,MAAA,KAAA,UAAA,EAAA,GACA,OAAA,eAAA,QAAAD,GAAA,KAAA,UAAA,OAAA,OAAA,KAAA,MAAA,CAAA,CAAA;AAEA,GACA,SAAA,EAMA,OAAAE,GAAA;AACA,QAAAC,IAAAD,EAAA,IAAAE,OAAAA,EAAA,EAAA;AAEA,OAAA,MAAA,SAAAD,CAAA;AACA,GAQA,MAAA,UAAAE,GAAA;AACA,MAAA;AACAA,IAAAA,IAAA,OAAAA,KAAA,WAAA,UAAAA,CAAA,IAAA;AACA,UAAAC,IAAA,MAAAC,EAAA,IAAAC,EAAA,+BAAAH,CAAA,aAAA,CAAA,CAAA;AAEA,QAAA,OAAA,KAAAC,EAAA,KAAA,IAAA,KAAA,MAAA,EAAA,SAAA,GAAA;AACA,YAAAG,IAAA,OAAA,YAAAH,EAAA,KAAA,IAAA,KAAA,OAAA,IAAAF,CAAAA,MAAA,CAAAA,EAAA,IAAAA,CAAA,CAAA,CAAA;AACA,aAAA,KAAA,SAAA,EAAA,GAAA,KAAA,QAAA,GAAAK,EAAA,GACA;AAAA;EAEA,SAAAC,GAAA;AAEA,SAAA,MAAA,SAAAA,CAAA,GACAC,EAAAC,EAAA,4BAAA,CAAA;AAAA,EACA;AACA,SAAA;AACA,GASA,aAAAC,GAAAC,GAAAC,GAAA;AACA,SAAA,GAAAD,KAAA,EAAA,IAAAD,EAAA,EAAA,GAAA,kBAAA,EAAA,QAAAE,EAAA,kBAAA,CAAA,IAAA;AACA,GAKA,UAAAC,EAAA,SAAAX,GAAA;AACA,OAAA,UAAAA,CAAA;AACA,GAAA,GAAA,EACA,EACA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcSettingsSelectGroup.mjs","sources":["../../src/components/NcSettingsSelectGroup/index.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Greta Doci <gretadoci@gmail.com>\n *\n * @author Greta Doci <gretadoci@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport NcSettingsSelectGroup from './NcSettingsSelectGroup.vue'\n\nexport default NcSettingsSelectGroup\nexport { NcSettingsSelectGroup }\n"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
const l = require("./NcInputField.cjs"), o = require("vue-material-design-icons/Close.vue"), s = require("vue-material-design-icons/ArrowRight.vue"), i = require("vue-material-design-icons/UndoVariant.vue"), u = require("../chunks/l10n-903083c4.cjs"), a = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), r = (e) => e && e.__esModule ? e : { default: e }, c = /* @__PURE__ */ r(o), d = /* @__PURE__ */ r(s), p = /* @__PURE__ */ r(i), _ = {
|
|
3
|
+
name: "NcTextField",
|
|
4
|
+
components: {
|
|
5
|
+
NcInputField: l,
|
|
6
|
+
Close: c.default,
|
|
7
|
+
ArrowRight: d.default,
|
|
8
|
+
Undo: p.default
|
|
9
|
+
},
|
|
10
|
+
// Allow forwarding all attributes
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
props: {
|
|
13
|
+
...l.props,
|
|
14
|
+
/**
|
|
15
|
+
* Specifies which material design icon should be used for the trailing
|
|
16
|
+
* button. Value can be `close`, `arrowRight`, or `undo`.
|
|
17
|
+
*/
|
|
18
|
+
trailingButtonIcon: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "close",
|
|
21
|
+
validator: (e) => [
|
|
22
|
+
"close",
|
|
23
|
+
"arrowRight",
|
|
24
|
+
"undo"
|
|
25
|
+
].includes(e)
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: [
|
|
29
|
+
"update:value"
|
|
30
|
+
],
|
|
31
|
+
computed: {
|
|
32
|
+
clearTextLabel() {
|
|
33
|
+
return this.trailingButtonLabel || u.t("Clear text");
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
/**
|
|
38
|
+
* Focus the input element
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
focus() {
|
|
43
|
+
this.$refs.inputField.focus();
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Select all the text in the input
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
select() {
|
|
51
|
+
this.$refs.inputField.select();
|
|
52
|
+
},
|
|
53
|
+
handleInput(e) {
|
|
54
|
+
this.$emit("update:value", e.target.value);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var f = function() {
|
|
59
|
+
var t = this, n = t._self._c;
|
|
60
|
+
return n("NcInputField", t._g(t._b({ ref: "inputField", attrs: { "trailing-button-label": t.clearTextLabel }, on: { input: t.handleInput }, scopedSlots: t._u([t.type !== "search" ? { key: "trailing-button-icon", fn: function() {
|
|
61
|
+
return [t.trailingButtonIcon === "close" ? n("Close", { attrs: { size: 20 } }) : t.trailingButtonIcon === "arrowRight" ? n("ArrowRight", { attrs: { size: 20 } }) : t.trailingButtonIcon === "undo" ? n("Undo", { attrs: { size: 20 } }) : t._e()];
|
|
62
|
+
}, proxy: !0 } : null], null, !0) }, "NcInputField", { ...t.$attrs, ...t.$props }, !1), t.$listeners), [t._t("default")], 2);
|
|
63
|
+
}, g = [], h = /* @__PURE__ */ a.normalizeComponent(
|
|
64
|
+
_,
|
|
65
|
+
f,
|
|
66
|
+
g,
|
|
67
|
+
!1,
|
|
68
|
+
null,
|
|
69
|
+
null,
|
|
70
|
+
null,
|
|
71
|
+
null
|
|
72
|
+
);
|
|
73
|
+
const m = h.exports;
|
|
74
|
+
module.exports = m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcTextField.cjs","sources":["../../src/components/NcTextField/NcTextField.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\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<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose text field component.\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nNote: the inner html `input` element inherits all the attributes from the\nNcTextField component so you can add things like `autocomplete`, `maxlength`\nand `minlength`.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextField :value.sync=\"text1\"\n\t\t\tlabel=\"Leading icon and clear trailing button\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text1 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Magnify :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text4\"\n\t\t\tlabel=\"Internal label\"\n\t\t\tplaceholder=\"That can be used together with placeholder\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text4 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Lock :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text2\"\n\t\t\tlabel=\"Success state\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\t:success=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text3\"\n\t\t\tlabel=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\t:error=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextField label=\"Disabled + Success\"\n\t\t\t:success=\"true\"\n\t\t\t:disabled=\"true\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">External label</label>\n\t\t\t<NcTextField :value.sync=\"text5\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Input with external label\"\n\t\t\t\t@trailing-button-click=\"clearText\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Lock from 'vue-material-design-icons/Lock'\nimport Close from 'vue-material-design-icons/Close'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: '',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tMagnify,\n\t\tLock,\n\t\tClose,\n\t},\n\n\tmethods: {\n\t\tclearText() {\n\t\t\tthis.text1 = ''\n\t\t\tthis.text3 = ''\n\t\t}\n\t}\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"{...$attrs, ...$props }\"\n\t\tref=\"inputField\"\n\t\t:trailing-button-label=\"clearTextLabel\"\n\t\tv-on=\"$listeners\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\n\t\t<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->\n\t\t<template v-if=\"type !== 'search'\" #trailing-button-icon>\n\t\t\t<Close v-if=\"trailingButtonIcon === 'close'\" :size=\"20\" />\n\t\t\t<ArrowRight v-else-if=\"trailingButtonIcon === 'arrowRight'\" :size=\"20\" />\n\t\t\t<Undo v-else-if=\"trailingButtonIcon === 'undo'\" :size=\"20\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport Close from 'vue-material-design-icons/Close.vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport Undo from 'vue-material-design-icons/UndoVariant.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcTextField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tClose,\n\t\tArrowRight,\n\t\tUndo,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * Specifies which material design icon should be used for the trailing\n\t\t * button. Value can be `close`, `arrowRight`, or `undo`.\n\t\t */\n\t\ttrailingButtonIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'close',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'close',\n\t\t\t\t'arrowRight',\n\t\t\t\t'undo',\n\t\t\t].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tclearTextLabel() {\n\t\t\treturn this.trailingButtonLabel || t('Clear text')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputField","Close","ArrowRight","Undo","value","t","event"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NcTextField.cjs","sources":["../../src/components/NcTextField/NcTextField.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\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<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose text field component.\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nNote: the inner html `input` element inherits all the attributes from the\nNcTextField component so you can add things like `autocomplete`, `maxlength`\nand `minlength`.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcTextField :value.sync=\"text1\"\n\t\t\tlabel=\"Leading icon and clear trailing button\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text1 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Magnify :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text4\"\n\t\t\tlabel=\"Internal label\"\n\t\t\tplaceholder=\"That can be used together with placeholder\"\n\t\t\ttrailing-button-icon=\"close\"\n\t\t\t:show-trailing-button=\"text4 !== ''\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t\t<Lock :size=\"20\" />\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text2\"\n\t\t\tlabel=\"Success state\"\n\t\t\tplaceholder=\"Placeholders are possible\"\n\t\t\t:success=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField :value.sync=\"text3\"\n\t\t\tlabel=\"Error state\"\n\t\t\tplaceholder=\"Enter something valid\"\n\t\t\t:error=\"true\"\n\t\t\t@trailing-button-click=\"clearText\">\n\t\t</NcTextField>\n\t\t<NcTextField label=\"Disabled\"\n\t\t\t:disabled=\"true\" />\n\t\t<NcTextField label=\"Disabled + Success\"\n\t\t\t:success=\"true\"\n\t\t\t:disabled=\"true\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">External label</label>\n\t\t\t<NcTextField :value.sync=\"text5\"\n\t\t\t\tid=\"textField\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Input with external label\"\n\t\t\t\t@trailing-button-click=\"clearText\" />\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Lock from 'vue-material-design-icons/Lock'\nimport Close from 'vue-material-design-icons/Close'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: '',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n\n\tcomponents: {\n\t\tMagnify,\n\t\tLock,\n\t\tClose,\n\t},\n\n\tmethods: {\n\t\tclearText() {\n\t\t\tthis.text1 = ''\n\t\t\tthis.text3 = ''\n\t\t}\n\t}\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"{...$attrs, ...$props }\"\n\t\tref=\"inputField\"\n\t\t:trailing-button-label=\"clearTextLabel\"\n\t\tv-on=\"$listeners\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\n\t\t<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->\n\t\t<template v-if=\"type !== 'search'\" #trailing-button-icon>\n\t\t\t<Close v-if=\"trailingButtonIcon === 'close'\" :size=\"20\" />\n\t\t\t<ArrowRight v-else-if=\"trailingButtonIcon === 'arrowRight'\" :size=\"20\" />\n\t\t\t<Undo v-else-if=\"trailingButtonIcon === 'undo'\" :size=\"20\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport Close from 'vue-material-design-icons/Close.vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport Undo from 'vue-material-design-icons/UndoVariant.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcTextField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tClose,\n\t\tArrowRight,\n\t\tUndo,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * Specifies which material design icon should be used for the trailing\n\t\t * button. Value can be `close`, `arrowRight`, or `undo`.\n\t\t */\n\t\ttrailingButtonIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'close',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'close',\n\t\t\t\t'arrowRight',\n\t\t\t\t'undo',\n\t\t\t].includes(value),\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tclearTextLabel() {\n\t\t\treturn this.trailingButtonLabel || t('Clear text')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputField","Close","ArrowRight","Undo","value","t","event"],"mappings":";4bA+JAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAAA,IACA,OAAAC,EAAA;AAAA,IACA,YAAAC,EAAA;AAAA,IACA,MAAAC,EAAA;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,GAAAH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAI,MAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,uBAAAC,EAAA,EAAA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,WAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,WAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAC,GAAA;AACA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,25 +1,81 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import r from "./NcInputField.mjs";
|
|
2
|
+
import o from "vue-material-design-icons/Close.vue";
|
|
3
|
+
import l from "vue-material-design-icons/ArrowRight.vue";
|
|
4
4
|
import i from "vue-material-design-icons/UndoVariant.vue";
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as
|
|
7
|
-
const u = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
import { t as s } from "../chunks/l10n-27a75c40.mjs";
|
|
6
|
+
import { n as a } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
7
|
+
const u = {
|
|
8
|
+
name: "NcTextField",
|
|
9
|
+
components: {
|
|
10
|
+
NcInputField: r,
|
|
11
|
+
Close: o,
|
|
12
|
+
ArrowRight: l,
|
|
13
|
+
Undo: i
|
|
14
|
+
},
|
|
15
|
+
// Allow forwarding all attributes
|
|
16
|
+
inheritAttrs: !1,
|
|
17
|
+
props: {
|
|
18
|
+
...r.props,
|
|
19
|
+
/**
|
|
20
|
+
* Specifies which material design icon should be used for the trailing
|
|
21
|
+
* button. Value can be `close`, `arrowRight`, or `undo`.
|
|
22
|
+
*/
|
|
23
|
+
trailingButtonIcon: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "close",
|
|
26
|
+
validator: (e) => [
|
|
27
|
+
"close",
|
|
28
|
+
"arrowRight",
|
|
29
|
+
"undo"
|
|
30
|
+
].includes(e)
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: [
|
|
34
|
+
"update:value"
|
|
35
|
+
],
|
|
36
|
+
computed: {
|
|
37
|
+
clearTextLabel() {
|
|
38
|
+
return this.trailingButtonLabel || s("Clear text");
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
/**
|
|
43
|
+
* Focus the input element
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
focus() {
|
|
48
|
+
this.$refs.inputField.focus();
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Select all the text in the input
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
select() {
|
|
56
|
+
this.$refs.inputField.select();
|
|
57
|
+
},
|
|
58
|
+
handleInput(e) {
|
|
59
|
+
this.$emit("update:value", e.target.value);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var c = function() {
|
|
64
|
+
var t = this, n = t._self._c;
|
|
65
|
+
return n("NcInputField", t._g(t._b({ ref: "inputField", attrs: { "trailing-button-label": t.clearTextLabel }, on: { input: t.handleInput }, scopedSlots: t._u([t.type !== "search" ? { key: "trailing-button-icon", fn: function() {
|
|
66
|
+
return [t.trailingButtonIcon === "close" ? n("Close", { attrs: { size: 20 } }) : t.trailingButtonIcon === "arrowRight" ? n("ArrowRight", { attrs: { size: 20 } }) : t.trailingButtonIcon === "undo" ? n("Undo", { attrs: { size: 20 } }) : t._e()];
|
|
20
67
|
}, proxy: !0 } : null], null, !0) }, "NcInputField", { ...t.$attrs, ...t.$props }, !1), t.$listeners), [t._t("default")], 2);
|
|
21
|
-
}, p = [],
|
|
22
|
-
|
|
68
|
+
}, p = [], d = /* @__PURE__ */ a(
|
|
69
|
+
u,
|
|
70
|
+
c,
|
|
71
|
+
p,
|
|
72
|
+
!1,
|
|
73
|
+
null,
|
|
74
|
+
null,
|
|
75
|
+
null,
|
|
76
|
+
null
|
|
77
|
+
);
|
|
78
|
+
const F = d.exports;
|
|
23
79
|
export {
|
|
24
|
-
|
|
80
|
+
F as default
|
|
25
81
|
};
|