@nextcloud/vue 8.29.1 → 8.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +4 -3
- package/dist/Components/NcActionButton.cjs +1 -1
- package/dist/Components/NcActionButton.mjs +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +1 -1
- package/dist/Components/NcAppNavigationSearch.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAssistantButton.cjs +4 -0
- package/dist/Components/NcAssistantButton.cjs.map +1 -0
- package/dist/Components/NcAssistantButton.mjs +5 -0
- package/dist/Components/NcAssistantButton.mjs.map +1 -0
- package/dist/Components/NcAssistantContent.cjs +50 -0
- package/dist/Components/NcAssistantContent.cjs.map +1 -0
- package/dist/Components/NcAssistantContent.mjs +51 -0
- package/dist/Components/NcAssistantContent.mjs.map +1 -0
- package/dist/Components/NcAssistantIcon.cjs +4 -0
- package/dist/Components/NcAssistantIcon.cjs.map +1 -0
- package/dist/Components/NcAssistantIcon.mjs +5 -0
- package/dist/Components/NcAssistantIcon.mjs.map +1 -0
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +2 -2
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +2 -2
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +4 -4
- package/dist/Components/NcChip.mjs +4 -4
- package/dist/Components/NcCollectionList.cjs +1 -1
- package/dist/Components/NcCollectionList.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +6 -6
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +6 -6
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcDialogButton.cjs +1 -1
- package/dist/Components/NcDialogButton.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcHeaderButton.cjs +2 -2
- package/dist/Components/NcHeaderButton.cjs.map +1 -1
- package/dist/Components/NcHeaderButton.mjs +2 -2
- package/dist/Components/NcHeaderButton.mjs.map +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcInputField.cjs +1 -1
- package/dist/Components/NcInputField.mjs +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +4 -4
- package/dist/Components/NcModal.mjs +4 -4
- package/dist/Components/NcNoteCard.cjs +13 -18
- package/dist/Components/NcNoteCard.cjs.map +1 -1
- package/dist/Components/NcNoteCard.mjs +13 -18
- package/dist/Components/NcNoteCard.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +1 -1
- package/dist/Components/NcRichContenteditable.mjs +1 -1
- package/dist/Components/NcRichText.cjs +10 -10
- package/dist/Components/NcRichText.mjs +10 -10
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSelectUsers.cjs +1 -1
- package/dist/Components/NcSelectUsers.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +1 -1
- package/dist/Components/NcTextArea.mjs +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Composables/useFormatDateTime.cjs +1 -1
- package/dist/Composables/useFormatDateTime.mjs +1 -1
- package/dist/Functions/reference.cjs +10 -10
- package/dist/Functions/reference.mjs +7 -7
- package/dist/Functions/registerReference.cjs +11 -11
- package/dist/Functions/registerReference.mjs +5 -5
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/assets/{NcActionButtonGroup-BND4GQdv.css → NcActionButtonGroup-oAqMyrzr.css} +8 -8
- package/dist/assets/{NcActions-C3F-rqxz.css → NcActions-Bjgv1Dku.css} +13 -13
- package/dist/assets/{NcAppNavigationItem-Ca2ekElv.css → NcAppNavigationItem-DKcGNjYx.css} +43 -39
- package/dist/assets/{NcAppNavigationNewItem-PE-w8y-g.css → NcAppNavigationNewItem-CS2gLROV.css} +6 -0
- package/dist/assets/{NcAppNavigationSearch-CFtTLRbc.css → NcAppNavigationSearch-CD7kv7L_.css} +6 -6
- package/dist/assets/{NcAppNavigationSettings-vd47rlNY.css → NcAppNavigationSettings-_Qi3rUlw.css} +11 -16
- package/dist/assets/NcAssistantButton-owGSr0s0.css +54 -0
- package/dist/assets/NcAssistantContent-Ban7n3Bg.css +31 -0
- package/dist/assets/NcAssistantIcon-BFNU0uqH.css +35 -0
- package/dist/assets/{NcButton-DCgUYOPt.css → NcButton-C_LOxojs.css} +47 -46
- package/dist/assets/{NcCheckboxRadioSwitch-DqEP1SPR.css → NcCheckboxRadioSwitch-CC2zuvLL.css} +53 -43
- package/dist/assets/{NcDashboardWidget-BSTvIgiJ.css → NcDashboardWidget-CrhZaGWD.css} +12 -12
- package/dist/assets/{NcDateTimePicker-ZHSpShZz.css → NcDateTimePicker-Ce57VAyL.css} +19 -19
- package/dist/assets/NcEmojiPicker-BRSm8OUy.css +546 -0
- package/dist/assets/{NcHeaderButton-ByNXqS7x.css → NcHeaderButton-BRhv2o2J.css} +9 -9
- package/dist/assets/{NcHeaderMenu-Dp_vJKTP.css → NcHeaderMenu-Cjb3kKi1.css} +13 -13
- package/dist/assets/{NcInputField-CoB72F_m.css → NcInputField-DAiNwtp_.css} +76 -45
- package/dist/assets/{NcNoteCard-C6xb7vi0.css → NcNoteCard-ChweF_5Q.css} +26 -14
- package/dist/assets/{NcPopover-Dx28oc68.css → NcPopover--XoXIhLx.css} +13 -13
- package/dist/assets/{NcRichContenteditable-4-6A9qmC.css → NcRichContenteditable-DZLSoy84.css} +11 -11
- package/dist/assets/NcTextArea-vxeIyeSg.css +136 -0
- package/dist/assets/{NcUserStatusIcon-ChHaXPex.css → NcUserStatusIcon-Dc-aUzBe.css} +8 -4
- package/dist/assets/{referencePickerModal-Ba6soz9w.css → referencePickerModal-DrvqNTIf.css} +21 -38
- package/dist/chunks/{GenColors-BnYS3bvv.cjs → GenColors-BjsCKF7S.cjs} +2 -2
- package/dist/chunks/{GenColors-BnYS3bvv.cjs.map → GenColors-BjsCKF7S.cjs.map} +1 -1
- package/dist/chunks/{GenColors-DNN63dHB.mjs → GenColors-BrpkL3hT.mjs} +2 -2
- package/dist/chunks/{GenColors-DNN63dHB.mjs.map → GenColors-BrpkL3hT.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-2qh96K_i.cjs → NcActionButton-BhSk7AAp.cjs} +2 -2
- package/dist/chunks/{NcActionButton-2qh96K_i.cjs.map → NcActionButton-BhSk7AAp.cjs.map} +1 -1
- package/dist/chunks/{NcActionButton-CHrE7amZ.mjs → NcActionButton-DC3oAI2L.mjs} +2 -2
- package/dist/chunks/{NcActionButton-CHrE7amZ.mjs.map → NcActionButton-DC3oAI2L.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-B8Bj-Qb3.cjs → NcActionButtonGroup-Cr4OSmyb.cjs} +4 -4
- package/dist/chunks/{NcActionButtonGroup-B8Bj-Qb3.cjs.map → NcActionButtonGroup-Cr4OSmyb.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-_R4fp-bK.mjs → NcActionButtonGroup-hhh3GBSS.mjs} +4 -4
- package/dist/chunks/{NcActionButtonGroup-_R4fp-bK.mjs.map → NcActionButtonGroup-hhh3GBSS.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-BeBxzPFZ.mjs → NcActionInput-B5ysJl2S.mjs} +4 -4
- package/dist/chunks/{NcActionInput-BeBxzPFZ.mjs.map → NcActionInput-B5ysJl2S.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-GZdB-qw1.cjs → NcActionInput-DdaafMi8.cjs} +4 -4
- package/dist/chunks/{NcActionInput-GZdB-qw1.cjs.map → NcActionInput-DdaafMi8.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-CrW19Rr4.cjs → NcActionTextEditable-CTXGUIPM.cjs} +2 -2
- package/dist/chunks/{NcActionTextEditable-CrW19Rr4.cjs.map → NcActionTextEditable-CTXGUIPM.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-CYac2X_P.mjs → NcActionTextEditable-CpxJ_LEa.mjs} +2 -2
- package/dist/chunks/{NcActionTextEditable-CYac2X_P.mjs.map → NcActionTextEditable-CpxJ_LEa.mjs.map} +1 -1
- package/dist/chunks/{NcActions-DV3CjPHr.cjs → NcActions-DRCkAU8h.cjs} +6 -6
- package/dist/chunks/{NcActions-DV3CjPHr.cjs.map → NcActions-DRCkAU8h.cjs.map} +1 -1
- package/dist/chunks/{NcActions-BANvgaMn.mjs → NcActions-DdARGGZ_.mjs} +6 -6
- package/dist/chunks/{NcActions-BANvgaMn.mjs.map → NcActions-DdARGGZ_.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-twZJBrQv.mjs → NcAppContent-BS7BiMG0.mjs} +2 -2
- package/dist/chunks/{NcAppContent-twZJBrQv.mjs.map → NcAppContent-BS7BiMG0.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-BqR67yTH.cjs → NcAppContent-POt1Lj3W.cjs} +2 -2
- package/dist/chunks/{NcAppContent-BqR67yTH.cjs.map → NcAppContent-POt1Lj3W.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-COge8_bn.cjs → NcAppNavigation-BKxSUpcQ.cjs} +2 -2
- package/dist/chunks/{NcAppNavigation-COge8_bn.cjs.map → NcAppNavigation-BKxSUpcQ.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-VSGTDckG.mjs → NcAppNavigation-BvEa92PC.mjs} +2 -2
- package/dist/chunks/{NcAppNavigation-VSGTDckG.mjs.map → NcAppNavigation-BvEa92PC.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-ofy-JSGu.cjs → NcAppNavigationCaption-BpmzZDPj.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-ofy-JSGu.cjs.map → NcAppNavigationCaption-BpmzZDPj.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-oxc7chGv.mjs → NcAppNavigationCaption-O4l8dFkh.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-oxc7chGv.mjs.map → NcAppNavigationCaption-O4l8dFkh.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-CbtPNTg_.mjs → NcAppNavigationItem-BFF0p136.mjs} +18 -11
- package/dist/chunks/NcAppNavigationItem-BFF0p136.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-B-uv2tWu.cjs → NcAppNavigationItem-D1CEGuhm.cjs} +18 -11
- package/dist/chunks/NcAppNavigationItem-D1CEGuhm.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-DzpW6cIK.cjs → NcAppNavigationNewItem-CTAoGkDy.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationNewItem-DzpW6cIK.cjs.map → NcAppNavigationNewItem-CTAoGkDy.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-Cz8VbLjN.mjs → NcAppNavigationNewItem-D4fJeBl0.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationNewItem-Cz8VbLjN.mjs.map → NcAppNavigationNewItem-D4fJeBl0.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-By7WEKGG.mjs → NcAppNavigationSearch-B9OkdsuE.mjs} +7 -7
- package/dist/chunks/{NcAppNavigationSearch-By7WEKGG.mjs.map → NcAppNavigationSearch-B9OkdsuE.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-DjBMu0cZ.cjs → NcAppNavigationSearch-CaBrnpf9.cjs} +7 -7
- package/dist/chunks/{NcAppNavigationSearch-DjBMu0cZ.cjs.map → NcAppNavigationSearch-CaBrnpf9.cjs.map} +1 -1
- package/dist/chunks/NcAppNavigationSettings-DV5ZnR2s.cjs +85 -0
- package/dist/chunks/NcAppNavigationSettings-DV5ZnR2s.cjs.map +1 -0
- package/dist/chunks/NcAppNavigationSettings-Do0e5oWy.mjs +86 -0
- package/dist/chunks/NcAppNavigationSettings-Do0e5oWy.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-CbZem2gZ.cjs → NcAppNavigationToggle-DGppWo0q.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationToggle-CbZem2gZ.cjs.map → NcAppNavigationToggle-DGppWo0q.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-CINjg2Mo.mjs → NcAppNavigationToggle-VxL1CfJY.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationToggle-CINjg2Mo.mjs.map → NcAppNavigationToggle-VxL1CfJY.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-C1m0QYAK.cjs → NcAppSettingsDialog-BDo3la0P.cjs} +3 -3
- package/dist/chunks/{NcAppSettingsDialog-C1m0QYAK.cjs.map → NcAppSettingsDialog-BDo3la0P.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-Duyfikm-.mjs → NcAppSettingsDialog-BwsIc_QT.mjs} +3 -3
- package/dist/chunks/{NcAppSettingsDialog-Duyfikm-.mjs.map → NcAppSettingsDialog-BwsIc_QT.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-UROIM84v.mjs → NcAppSidebar-AR-D7HSj.mjs} +4 -4
- package/dist/chunks/{NcAppSidebar-UROIM84v.mjs.map → NcAppSidebar-AR-D7HSj.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-DrjH3Ign.cjs → NcAppSidebar-Cvyq-kN5.cjs} +4 -4
- package/dist/chunks/{NcAppSidebar-DrjH3Ign.cjs.map → NcAppSidebar-Cvyq-kN5.cjs.map} +1 -1
- package/dist/chunks/NcAssistantButton-Ck1NUjhl.mjs +97 -0
- package/dist/chunks/NcAssistantButton-Ck1NUjhl.mjs.map +1 -0
- package/dist/chunks/NcAssistantButton-gD3MKoYS.cjs +96 -0
- package/dist/chunks/NcAssistantButton-gD3MKoYS.cjs.map +1 -0
- package/dist/chunks/NcAssistantIcon-D_xelcY2.cjs +68 -0
- package/dist/chunks/NcAssistantIcon-D_xelcY2.cjs.map +1 -0
- package/dist/chunks/NcAssistantIcon-tjSguP9N.mjs +69 -0
- package/dist/chunks/NcAssistantIcon-tjSguP9N.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-NIEuFVUx.mjs → NcAvatar-BEIBwiA6.mjs} +5 -5
- package/dist/chunks/{NcAvatar-NIEuFVUx.mjs.map → NcAvatar-BEIBwiA6.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-CYqiINFK.cjs → NcAvatar-DS1H-VrZ.cjs} +5 -5
- package/dist/chunks/{NcAvatar-CYqiINFK.cjs.map → NcAvatar-DS1H-VrZ.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-BjsavDr1.mjs → NcBreadcrumb-BYYXWaif.mjs} +2 -2
- package/dist/chunks/{NcBreadcrumb-BjsavDr1.mjs.map → NcBreadcrumb-BYYXWaif.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-BiW4k0c_.cjs → NcBreadcrumb-HtgcEJgs.cjs} +2 -2
- package/dist/chunks/{NcBreadcrumb-BiW4k0c_.cjs.map → NcBreadcrumb-HtgcEJgs.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-Dwnn6dKU.cjs → NcBreadcrumbs-CQcnjGJO.cjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-Dwnn6dKU.cjs.map → NcBreadcrumbs-CQcnjGJO.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-Bc2obqjl.mjs → NcBreadcrumbs-cj5ip2-X.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-Bc2obqjl.mjs.map → NcBreadcrumbs-cj5ip2-X.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-G28IJAL-.cjs → NcCheckboxRadioSwitch-B-lXOnEF.cjs} +38 -9
- package/dist/chunks/NcCheckboxRadioSwitch-B-lXOnEF.cjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-BJg75WBj.mjs → NcCheckboxRadioSwitch-DqdNvkCt.mjs} +38 -9
- package/dist/chunks/NcCheckboxRadioSwitch-DqdNvkCt.mjs.map +1 -0
- package/dist/chunks/{NcCollectionList-BZmZbRsV.mjs → NcCollectionList-CLv50tJ3.mjs} +6 -6
- package/dist/chunks/{NcCollectionList-BZmZbRsV.mjs.map → NcCollectionList-CLv50tJ3.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-Co3VxzCN.cjs → NcCollectionList-DXNSOjPG.cjs} +6 -6
- package/dist/chunks/{NcCollectionList-Co3VxzCN.cjs.map → NcCollectionList-DXNSOjPG.cjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-CApQdWp0.mjs → NcColorPicker-52xaYx9k.mjs} +5 -5
- package/dist/chunks/{NcColorPicker-CApQdWp0.mjs.map → NcColorPicker-52xaYx9k.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-CwPThFLP.cjs → NcColorPicker-CbiIpVlT.cjs} +5 -5
- package/dist/chunks/{NcColorPicker-CwPThFLP.cjs.map → NcColorPicker-CbiIpVlT.cjs.map} +1 -1
- package/dist/chunks/{NcContent-BkmB4vmh.mjs → NcContent-BbmqoSY7.mjs} +2 -2
- package/dist/chunks/{NcContent-BkmB4vmh.mjs.map → NcContent-BbmqoSY7.mjs.map} +1 -1
- package/dist/chunks/{NcContent-h4LUA1hj.cjs → NcContent-DH7uH5Gv.cjs} +2 -2
- package/dist/chunks/{NcContent-h4LUA1hj.cjs.map → NcContent-DH7uH5Gv.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-CXKrTVGk.mjs → NcDashboardWidget-809lybR1.mjs} +7 -7
- package/dist/chunks/{NcDashboardWidget-CXKrTVGk.mjs.map → NcDashboardWidget-809lybR1.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-Dn_Rq1Mt.cjs → NcDashboardWidget-DhJAJn-_.cjs} +7 -7
- package/dist/chunks/{NcDashboardWidget-Dn_Rq1Mt.cjs.map → NcDashboardWidget-DhJAJn-_.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-CfhAMc3T.mjs → NcDashboardWidgetItem-6JbU9gp1.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-CfhAMc3T.mjs.map → NcDashboardWidgetItem-6JbU9gp1.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-C5P0N-U_.cjs → NcDashboardWidgetItem-CgO8qJUQ.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-C5P0N-U_.cjs.map → NcDashboardWidgetItem-CgO8qJUQ.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-C_IHQciE.mjs → NcDialog-C1b3UtA7.mjs} +2 -2
- package/dist/chunks/{NcDialog-C_IHQciE.mjs.map → NcDialog-C1b3UtA7.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-Cqdo11BM.cjs → NcDialog-ps0F3IQM.cjs} +2 -2
- package/dist/chunks/{NcDialog-Cqdo11BM.cjs.map → NcDialog-ps0F3IQM.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-_biPxXPQ.cjs → NcDialogButton-CEdM0Qnr.cjs} +3 -3
- package/dist/chunks/NcDialogButton-CEdM0Qnr.cjs.map +1 -0
- package/dist/chunks/{NcDialogButton-Cc3iWZH1.mjs → NcDialogButton-Di9tU3e_.mjs} +3 -3
- package/dist/chunks/NcDialogButton-Di9tU3e_.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-CD7z1FNp.cjs → NcEmojiPicker-CdH7bAGd.cjs} +10 -10
- package/dist/chunks/NcEmojiPicker-CdH7bAGd.cjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-C9kzoPy9.mjs → NcEmojiPicker-CyZg0bCF.mjs} +10 -10
- package/dist/chunks/NcEmojiPicker-CyZg0bCF.mjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-B12nEFGc.cjs → NcHeaderMenu-BWFubuox.cjs} +14 -5
- package/dist/chunks/NcHeaderMenu-BWFubuox.cjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu--AvoyMeD.mjs → NcHeaderMenu-Dq_Avv2T.mjs} +14 -5
- package/dist/chunks/NcHeaderMenu-Dq_Avv2T.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-P1H1ymiB.mjs → NcInputConfirmCancel-DA740BJ-.mjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-P1H1ymiB.mjs.map → NcInputConfirmCancel-DA740BJ-.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-BpPXGiKs.cjs → NcInputConfirmCancel-Dz7-CkOl.cjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-BpPXGiKs.cjs.map → NcInputConfirmCancel-Dz7-CkOl.cjs.map} +1 -1
- package/dist/chunks/{NcInputField-ixOGmIZ8.mjs → NcInputField-BNSfmQqu.mjs} +8 -4
- package/dist/chunks/NcInputField-BNSfmQqu.mjs.map +1 -0
- package/dist/chunks/{NcInputField-CfK08BcA.cjs → NcInputField-cT3u4gMS.cjs} +8 -4
- package/dist/chunks/NcInputField-cT3u4gMS.cjs.map +1 -0
- package/dist/chunks/{NcListItem-Dxhvk0tn.cjs → NcListItem-Bx9qm5xC.cjs} +2 -2
- package/dist/chunks/{NcListItem-Dxhvk0tn.cjs.map → NcListItem-Bx9qm5xC.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-BkW4aSAh.mjs → NcListItem-CifyXFmv.mjs} +2 -2
- package/dist/chunks/{NcListItem-BkW4aSAh.mjs.map → NcListItem-CifyXFmv.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-DL1UGBlY.mjs → NcListItemIcon-CZrilo88.mjs} +2 -2
- package/dist/chunks/{NcListItemIcon-DL1UGBlY.mjs.map → NcListItemIcon-CZrilo88.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-Ceh9_B36.cjs → NcListItemIcon-DMhlNuU9.cjs} +2 -2
- package/dist/chunks/{NcListItemIcon-Ceh9_B36.cjs.map → NcListItemIcon-DMhlNuU9.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-Bf_EN2zU.mjs → NcPasswordField-DSdrAkZy.mjs} +3 -3
- package/dist/chunks/{NcPasswordField-Bf_EN2zU.mjs.map → NcPasswordField-DSdrAkZy.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-DflDMgYh.cjs → NcPasswordField-DcFBNVHn.cjs} +3 -3
- package/dist/chunks/{NcPasswordField-DflDMgYh.cjs.map → NcPasswordField-DcFBNVHn.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-DH2oMHFe.cjs → NcPopover-DjeDGPXc.cjs} +44 -9
- package/dist/chunks/NcPopover-DjeDGPXc.cjs.map +1 -0
- package/dist/chunks/{NcPopover-4-YxCZOD.mjs → NcPopover-DxTXnL3u.mjs} +47 -12
- package/dist/chunks/NcPopover-DxTXnL3u.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-D_4x0nYR.cjs → NcRelatedResourcesPanel-BR_ggojH.cjs} +2 -2
- package/dist/chunks/{NcRelatedResourcesPanel-D_4x0nYR.cjs.map → NcRelatedResourcesPanel-BR_ggojH.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-qQK3J_qe.mjs → NcRelatedResourcesPanel-DyvwxDjI.mjs} +2 -2
- package/dist/chunks/{NcRelatedResourcesPanel-qQK3J_qe.mjs.map → NcRelatedResourcesPanel-DyvwxDjI.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-Vv9aizR-.mjs → NcRichContenteditable-CMQnS1Wz.mjs} +11 -11
- package/dist/chunks/NcRichContenteditable-CMQnS1Wz.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-Dwe0KT-g.cjs → NcRichContenteditable-DtkaJmwG.cjs} +11 -11
- package/dist/chunks/NcRichContenteditable-DtkaJmwG.cjs.map +1 -0
- package/dist/chunks/{NcRichText-Dk2KeWVm.cjs → NcRichText-7B9lDtoo.cjs} +3 -3
- package/dist/chunks/{NcRichText-Dk2KeWVm.cjs.map → NcRichText-7B9lDtoo.cjs.map} +1 -1
- package/dist/chunks/{NcRichText-CeLtcmp0.mjs → NcRichText-MMeidJmP.mjs} +3 -3
- package/dist/chunks/{NcRichText-CeLtcmp0.mjs.map → NcRichText-MMeidJmP.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-mKPxrPJk.cjs → NcSelect-CrxryIo3.cjs} +3 -3
- package/dist/chunks/{NcSelect-mKPxrPJk.cjs.map → NcSelect-CrxryIo3.cjs.map} +1 -1
- package/dist/chunks/{NcSelect-dUFIWW35.mjs → NcSelect-okD5YTJq.mjs} +3 -3
- package/dist/chunks/{NcSelect-dUFIWW35.mjs.map → NcSelect-okD5YTJq.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-D-ZtVQr7.mjs → NcSelectTags-BPxmiMto.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-D-ZtVQr7.mjs.map → NcSelectTags-BPxmiMto.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-D43sFJA2.cjs → NcSelectTags-BZqBdSqC.cjs} +3 -3
- package/dist/chunks/{NcSelectTags-D43sFJA2.cjs.map → NcSelectTags-BZqBdSqC.cjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-CpT8ELJ8.cjs → NcSelectUsers-CshAjqE_.cjs} +4 -4
- package/dist/chunks/{NcSelectUsers-CpT8ELJ8.cjs.map → NcSelectUsers-CshAjqE_.cjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-C7sxHP1r.mjs → NcSelectUsers-DK3EtvnG.mjs} +4 -4
- package/dist/chunks/{NcSelectUsers-C7sxHP1r.mjs.map → NcSelectUsers-DK3EtvnG.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DYN2i2d2.mjs → NcSettingsInputText-BKoaCiQU.mjs} +2 -2
- package/dist/chunks/{NcSettingsInputText-DYN2i2d2.mjs.map → NcSettingsInputText-BKoaCiQU.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-Cf-juMyF.cjs → NcSettingsInputText-D7eoCI2o.cjs} +2 -2
- package/dist/chunks/{NcSettingsInputText-Cf-juMyF.cjs.map → NcSettingsInputText-D7eoCI2o.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-VrSMms0R.cjs → NcSettingsSection-Bmo90KQR.cjs} +2 -2
- package/dist/chunks/{NcSettingsSection-VrSMms0R.cjs.map → NcSettingsSection-Bmo90KQR.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DK0dtGcw.mjs → NcSettingsSection-fe_YIg-L.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-DK0dtGcw.mjs.map → NcSettingsSection-fe_YIg-L.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-B3PCXeTE.mjs → NcSettingsSelectGroup-CUUKv6lH.mjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-B3PCXeTE.mjs.map → NcSettingsSelectGroup-CUUKv6lH.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-CW5zc5my.cjs → NcSettingsSelectGroup-Dd04CVAM.cjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-CW5zc5my.cjs.map → NcSettingsSelectGroup-Dd04CVAM.cjs.map} +1 -1
- package/dist/chunks/{NcTextArea-MvdupZXi.cjs → NcTextArea-B2hcap39.cjs} +9 -4
- package/dist/chunks/NcTextArea-B2hcap39.cjs.map +1 -0
- package/dist/chunks/{NcTextArea-HIcTePZQ.mjs → NcTextArea-BFLuhsEv.mjs} +9 -4
- package/dist/chunks/NcTextArea-BFLuhsEv.mjs.map +1 -0
- package/dist/chunks/{NcTextField-C1dfqkDm.cjs → NcTextField-DDJqk3SI.cjs} +4 -4
- package/dist/chunks/{NcTextField-C1dfqkDm.cjs.map → NcTextField-DDJqk3SI.cjs.map} +1 -1
- package/dist/chunks/{NcTextField-BpHFogO-.mjs → NcTextField-eKuP0G6I.mjs} +4 -4
- package/dist/chunks/{NcTextField-BpHFogO-.mjs.map → NcTextField-eKuP0G6I.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-Wwx4gzK_.mjs → NcTimezonePicker-BbqblRd7.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-Wwx4gzK_.mjs.map → NcTimezonePicker-BbqblRd7.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-ClV6QojF.cjs → NcTimezonePicker-DV_arh0f.cjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-ClV6QojF.cjs.map → NcTimezonePicker-DV_arh0f.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-DFos_NnH.mjs → NcUserBubble-C7XtYsrf.mjs} +3 -3
- package/dist/chunks/{NcUserBubble-DFos_NnH.mjs.map → NcUserBubble-C7XtYsrf.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-BmUfbXN0.cjs → NcUserBubble-DuyMsPzl.cjs} +3 -3
- package/dist/chunks/{NcUserBubble-BmUfbXN0.cjs.map → NcUserBubble-DuyMsPzl.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-BeuFRhWr.cjs → NcUserStatusIcon-CKPJ27oi.cjs} +16 -18
- package/dist/chunks/NcUserStatusIcon-CKPJ27oi.cjs.map +1 -0
- package/dist/chunks/{NcUserStatusIcon-Biiq6zqy.mjs → NcUserStatusIcon-DQr5EGWZ.mjs} +16 -18
- package/dist/chunks/NcUserStatusIcon-DQr5EGWZ.mjs.map +1 -0
- package/dist/chunks/{ScopeComponent-DxrG1ptt.mjs → ScopeComponent-B_NOkzpc.mjs} +2 -2
- package/dist/chunks/{ScopeComponent-DxrG1ptt.mjs.map → ScopeComponent-B_NOkzpc.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-X0gqPFY9.cjs → ScopeComponent-CbzbU6pi.cjs} +2 -2
- package/dist/chunks/{ScopeComponent-X0gqPFY9.cjs.map → ScopeComponent-CbzbU6pi.cjs.map} +1 -1
- package/dist/chunks/{_l10n-BU8-kQzN.mjs → _l10n-CW0YfIWk.mjs} +19 -19
- package/dist/chunks/_l10n-CW0YfIWk.mjs.map +1 -0
- package/dist/chunks/{_l10n-DpwcsAC3.cjs → _l10n-RKohWu5d.cjs} +6 -6
- package/dist/chunks/{_l10n-DpwcsAC3.cjs.map → _l10n-RKohWu5d.cjs.map} +1 -1
- package/dist/chunks/{index-56SXuvlv.mjs → customPickerElements-CH9vlHLd.mjs} +47 -46
- package/dist/chunks/customPickerElements-CH9vlHLd.mjs.map +1 -0
- package/dist/chunks/{index-BV85rPB7.cjs → customPickerElements-Q3Y7fgZ1.cjs} +42 -41
- package/dist/chunks/customPickerElements-Q3Y7fgZ1.cjs.map +1 -0
- package/dist/chunks/mdi-BBwE-MZC.cjs +24 -0
- package/dist/chunks/{mdi-BqDPfc6J.cjs.map → mdi-BBwE-MZC.cjs.map} +1 -1
- package/dist/chunks/mdi-DXu6GWVJ.mjs +25 -0
- package/dist/chunks/{mdi-vLkDaZ9y.mjs.map → mdi-DXu6GWVJ.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-CXQey71p.mjs → referencePickerModal-B2nPzrke.mjs} +46 -52
- package/dist/chunks/referencePickerModal-B2nPzrke.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-BVu6vAC8.cjs → referencePickerModal-BINQW-pL.cjs} +54 -60
- package/dist/chunks/referencePickerModal-BINQW-pL.cjs.map +1 -0
- package/dist/components/NcAssistantButton/index.d.ts +5 -0
- package/dist/components/NcAssistantContent/index.d.ts +5 -0
- package/dist/components/NcAssistantIcon/index.d.ts +5 -0
- package/dist/functions/reference/customPickerElements.d.ts +56 -0
- package/dist/functions/reference/index.d.ts +8 -0
- package/dist/functions/reference/providerHelper.d.ts +45 -0
- package/dist/functions/reference/referencePickerModal.d.ts +11 -0
- package/dist/functions/reference/widgets.d.ts +47 -28
- package/dist/functions/registerReference/index.d.ts +6 -0
- package/dist/index.cjs +65 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +63 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/assets/NcEmojiPicker-Ca6U46T8.css +0 -575
- package/dist/assets/NcTextArea-B46u6ku9.css +0 -112
- package/dist/chunks/NcAppNavigationItem-B-uv2tWu.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-CbtPNTg_.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-DhQ5tXEJ.mjs +0 -109
- package/dist/chunks/NcAppNavigationSettings-DhQ5tXEJ.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-DnvFbZyP.cjs +0 -108
- package/dist/chunks/NcAppNavigationSettings-DnvFbZyP.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-BJg75WBj.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-G28IJAL-.cjs.map +0 -1
- package/dist/chunks/NcDialogButton-Cc3iWZH1.mjs.map +0 -1
- package/dist/chunks/NcDialogButton-_biPxXPQ.cjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-C9kzoPy9.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-CD7z1FNp.cjs.map +0 -1
- package/dist/chunks/NcHeaderMenu--AvoyMeD.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-B12nEFGc.cjs.map +0 -1
- package/dist/chunks/NcInputField-CfK08BcA.cjs.map +0 -1
- package/dist/chunks/NcInputField-ixOGmIZ8.mjs.map +0 -1
- package/dist/chunks/NcPopover-4-YxCZOD.mjs.map +0 -1
- package/dist/chunks/NcPopover-DH2oMHFe.cjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-Dwe0KT-g.cjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-Vv9aizR-.mjs.map +0 -1
- package/dist/chunks/NcTextArea-HIcTePZQ.mjs.map +0 -1
- package/dist/chunks/NcTextArea-MvdupZXi.cjs.map +0 -1
- package/dist/chunks/NcUserStatusIcon-BeuFRhWr.cjs.map +0 -1
- package/dist/chunks/NcUserStatusIcon-Biiq6zqy.mjs.map +0 -1
- package/dist/chunks/_l10n-BU8-kQzN.mjs.map +0 -1
- package/dist/chunks/index-56SXuvlv.mjs.map +0 -1
- package/dist/chunks/index-BV85rPB7.cjs.map +0 -1
- package/dist/chunks/mdi-BqDPfc6J.cjs +0 -18
- package/dist/chunks/mdi-vLkDaZ9y.mjs +0 -19
- package/dist/chunks/referencePickerModal-BVu6vAC8.cjs.map +0 -1
- package/dist/chunks/referencePickerModal-CXQey71p.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcPasswordField-Bf_EN2zU.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\tv-model=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\tv-model=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField v-model=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\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\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"visibility || asText ? 'text' : 'password'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': !visibility && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"toggleVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<template v-if=\"!!$scopedSlots.icon || !!$slots.default || !!$scopedSlots.default\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- @slot Deprecated, removed in v9: use #icon slot instead. -->\n\t\t\t\t<slot />\n\t\t\t</slot>\n\t\t</template>\n\n\t\t<template #trailing-button-icon>\n\t\t\t<IconEyeOff v-if=\"visibility\" :size=\"18\" />\n\t\t\t<IconEye v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { loadState } from '@nextcloud/initial-state'\nimport axios from '@nextcloud/axios'\nimport { useVModel } from '@vueuse/core'\nimport debounce from 'debounce'\n\nimport IconEye from 'vue-material-design-icons/Eye.vue'\nimport IconEyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { logger } from '../../utils/logger.ts'\nimport { t } from '../../l10n.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tIconEye,\n\t\tIconEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Visibility of the password.\n\t\t * If this is set to `true` then the password will be shown to the user (input type will be set to `text`).\n\t\t */\n\t\tvisible: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t/**\n\t\t * Triggers when the value inside the password field is\n\t\t * updated.\n\t\t *\n\t\t * @property {string} The new value\n\t\t */\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t/**\n\t\t * Updated visibility of the password\n\t\t * @property {boolean} visible the new visibility state\n\t\t */\n\t\t'update:visible',\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\tconst visibility = useVModel(props, 'visible', emit, { passive: true })\n\n\t\treturn {\n\t\t\tt,\n\n\t\t\tmodel,\n\t\t\tvisibility,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.visibility ? t('Hide password') : t('Show password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodel(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\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.model = event.target.value\n\t\t},\n\n\t\ttoggleVisibility() {\n\t\t\tthis.visibility = !this.visibility\n\t\t},\n\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA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mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\tv-model=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\tv-model=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField v-model=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\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\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"visibility || asText ? 'text' : 'password'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': !visibility && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"toggleVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<template v-if=\"!!$scopedSlots.icon || !!$slots.default || !!$scopedSlots.default\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- @slot Deprecated, removed in v9: use #icon slot instead. -->\n\t\t\t\t<slot />\n\t\t\t</slot>\n\t\t</template>\n\n\t\t<template #trailing-button-icon>\n\t\t\t<IconEyeOff v-if=\"visibility\" :size=\"18\" />\n\t\t\t<IconEye v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { loadState } from '@nextcloud/initial-state'\nimport axios from '@nextcloud/axios'\nimport { useVModel } from '@vueuse/core'\nimport debounce from 'debounce'\n\nimport IconEye from 'vue-material-design-icons/Eye.vue'\nimport IconEyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { logger } from '../../utils/logger.ts'\nimport { t } from '../../l10n.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tIconEye,\n\t\tIconEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Visibility of the password.\n\t\t * If this is set to `true` then the password will be shown to the user (input type will be set to `text`).\n\t\t */\n\t\tvisible: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t/**\n\t\t * Triggers when the value inside the password field is\n\t\t * updated.\n\t\t *\n\t\t * @property {string} The new value\n\t\t */\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t/**\n\t\t * Updated visibility of the password\n\t\t * @property {boolean} visible the new visibility state\n\t\t */\n\t\t'update:visible',\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\tconst visibility = useVModel(props, 'visible', emit, { passive: true })\n\n\t\treturn {\n\t\t\tt,\n\n\t\t\tmodel,\n\t\t\tvisibility,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.visibility ? t('Hide password') : t('Show password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodel(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\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.model = event.target.value\n\t\t},\n\n\t\ttoggleVisibility() {\n\t\t\tthis.visibility = !this.visibility\n\t\t},\n\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;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EA,OAAA;AAAA,IACA,MAAA,UAAA;AACA,UAAA,KAAA,uBAAA;AACA,YAAA,mBAAA,MAAA;AACA;AAAA,QACA;AACA,aAAA,cAAA,QAAA;AAAA,MACA;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,YAAA,OAAA;AACA,WAAA,QAAA,MAAA,OAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,WAAA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,eAAA,SAAA,eAAA,UAAA;AACA,UAAA;AACA,cAAA,EAAA,KAAA,IAAA,MAAA,MAAA,KAAA,eAAA,sCAAA,GAAA,EAAA,SAAA,CAAA;AACA,aAAA,UAAA,KAAA,IAAA,KAAA;AACA,YAAA,KAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAA,EAAA,oBAAA;AAKA,eAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAA,KAAA,IAAA,KAAA;AAKA,aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACA,eAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
|
|
@@ -6,10 +6,10 @@ const axios = require("@nextcloud/axios");
|
|
|
6
6
|
const core = require("@vueuse/core");
|
|
7
7
|
const debounce = require("debounce");
|
|
8
8
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
9
|
-
const NcInputField = require("./NcInputField-
|
|
9
|
+
const NcInputField = require("./NcInputField-cT3u4gMS.cjs");
|
|
10
10
|
const useModelMigration = require("./useModelMigration-D5zhrNXr.cjs");
|
|
11
11
|
const logger = require("./logger-3HuiEIF6.cjs");
|
|
12
|
-
const _l10n = require("./_l10n-
|
|
12
|
+
const _l10n = require("./_l10n-RKohWu5d.cjs");
|
|
13
13
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
14
14
|
const axios__default = /* @__PURE__ */ _interopDefault(axios);
|
|
15
15
|
const debounce__default = /* @__PURE__ */ _interopDefault(debounce);
|
|
@@ -304,4 +304,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
304
304
|
);
|
|
305
305
|
const NcPasswordField = __component__.exports;
|
|
306
306
|
exports.NcPasswordField = NcPasswordField;
|
|
307
|
-
//# sourceMappingURL=NcPasswordField-
|
|
307
|
+
//# sourceMappingURL=NcPasswordField-DcFBNVHn.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcPasswordField-DflDMgYh.cjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\tv-model=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\tv-model=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField v-model=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\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\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"visibility || asText ? 'text' : 'password'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': !visibility && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"toggleVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<template v-if=\"!!$scopedSlots.icon || !!$slots.default || !!$scopedSlots.default\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- @slot Deprecated, removed in v9: use #icon slot instead. -->\n\t\t\t\t<slot />\n\t\t\t</slot>\n\t\t</template>\n\n\t\t<template #trailing-button-icon>\n\t\t\t<IconEyeOff v-if=\"visibility\" :size=\"18\" />\n\t\t\t<IconEye v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { loadState } from '@nextcloud/initial-state'\nimport axios from '@nextcloud/axios'\nimport { useVModel } from '@vueuse/core'\nimport debounce from 'debounce'\n\nimport IconEye from 'vue-material-design-icons/Eye.vue'\nimport IconEyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { logger } from '../../utils/logger.ts'\nimport { t } from '../../l10n.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tIconEye,\n\t\tIconEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Visibility of the password.\n\t\t * If this is set to `true` then the password will be shown to the user (input type will be set to `text`).\n\t\t */\n\t\tvisible: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t/**\n\t\t * Triggers when the value inside the password field is\n\t\t * updated.\n\t\t *\n\t\t * @property {string} The new value\n\t\t */\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t/**\n\t\t * Updated visibility of the password\n\t\t * @property {boolean} visible the new visibility state\n\t\t */\n\t\t'update:visible',\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\tconst visibility = useVModel(props, 'visible', emit, { passive: true })\n\n\t\treturn {\n\t\t\tt,\n\n\t\t\tmodel,\n\t\t\tvisibility,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.visibility ? t('Hide password') : t('Show password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodel(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\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.model = event.target.value\n\t\t},\n\n\t\ttoggleVisibility() {\n\t\t\tthis.visibility = !this.visibility\n\t\t},\n\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main","loadState","NcInputField","useModelMigration","useVModel","t","debounce","axios","generateOcsUrl","logger"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;ACyGA,MAAA,iBAAAC,aAAA,UAAA,QAAA,gBAAA,CAAA,CAAA,EAAA,mBAAA;AAEA,MAAA,oBAAA,IAAA,IAAA,OAAA,KAAAC,aAAAA,aAAA,KAAA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAA,aAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA,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ACA,UAAA;AACA,cAAA,EAAA,KAAA,IAAA,MAAAC,eAAA,QAAA,KAAAC,sBAAA,sCAAA,GAAA,EAAA,SAAA,CAAA;AACA,aAAA,UAAA,KAAA,IAAA,KAAA;AACA,YAAA,KAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAAH,MAAAA,EAAA,oBAAA;AAKA,eAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAA,KAAA,IAAA,KAAA;AAKA,aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACAI,sBAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"NcPasswordField-DcFBNVHn.cjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\tv-model=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\tv-model=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField v-model=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\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\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"visibility || asText ? 'text' : 'password'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': !visibility && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"toggleVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<template v-if=\"!!$scopedSlots.icon || !!$slots.default || !!$scopedSlots.default\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- @slot Deprecated, removed in v9: use #icon slot instead. -->\n\t\t\t\t<slot />\n\t\t\t</slot>\n\t\t</template>\n\n\t\t<template #trailing-button-icon>\n\t\t\t<IconEyeOff v-if=\"visibility\" :size=\"18\" />\n\t\t\t<IconEye v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { loadState } from '@nextcloud/initial-state'\nimport axios from '@nextcloud/axios'\nimport { useVModel } from '@vueuse/core'\nimport debounce from 'debounce'\n\nimport IconEye from 'vue-material-design-icons/Eye.vue'\nimport IconEyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\n\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { logger } from '../../utils/logger.ts'\nimport { t } from '../../l10n.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tIconEye,\n\t\tIconEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Visibility of the password.\n\t\t * If this is set to `true` then the password will be shown to the user (input type will be set to `text`).\n\t\t */\n\t\tvisible: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t/**\n\t\t * Triggers when the value inside the password field is\n\t\t * updated.\n\t\t *\n\t\t * @property {string} The new value\n\t\t */\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t/**\n\t\t * Updated visibility of the password\n\t\t * @property {boolean} visible the new visibility state\n\t\t */\n\t\t'update:visible',\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\tconst visibility = useVModel(props, 'visible', emit, { passive: true })\n\n\t\treturn {\n\t\t\tt,\n\n\t\t\tmodel,\n\t\t\tvisibility,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.visibility ? t('Hide password') : t('Show password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodel(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\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.model = event.target.value\n\t\t},\n\n\t\ttoggleVisibility() {\n\t\t\tthis.visibility = !this.visibility\n\t\t},\n\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main","loadState","NcInputField","useModelMigration","useVModel","t","debounce","axios","generateOcsUrl","logger"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;ACyGA,MAAA,iBAAAC,aAAA,UAAA,QAAA,gBAAA,CAAA,CAAA,EAAA,mBAAA;AAEA,MAAA,oBAAA,IAAA,IAAA,OAAA,KAAAC,aAAAA,aAAA,KAAA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAA,aAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;A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AA,GAAA,EAAA,SAAA,CAAA;AACA,aAAA,UAAA,KAAA,IAAA,KAAA;AACA,YAAA,KAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAAH,MAAAA,EAAA,oBAAA;AAKA,eAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAA,KAAA,IAAA,KAAA;AAKA,aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACAI,sBAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require('../assets/NcPopover
|
|
1
|
+
require('../assets/NcPopover--XoXIhLx.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
const Vue = require("vue");
|
|
4
4
|
const floatingVue = require("floating-vue");
|
|
5
5
|
const focusTrap = require("focus-trap");
|
|
6
|
+
const tabbable = require("tabbable");
|
|
6
7
|
const focusTrap$1 = require("./focusTrap-DUTqW_IG.cjs");
|
|
7
8
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
8
9
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
@@ -50,6 +51,13 @@ var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
50
51
|
null
|
|
51
52
|
);
|
|
52
53
|
const NcPopoverTriggerProvider = __component__$1.exports;
|
|
54
|
+
const ncPopover = "_ncPopover_hdy45_20";
|
|
55
|
+
const style0 = {
|
|
56
|
+
"material-design-icon": "_material-design-icon_hdy45_12",
|
|
57
|
+
ncPopover
|
|
58
|
+
};
|
|
59
|
+
const THEME = "nc-popover-8";
|
|
60
|
+
floatingVue.options.themes[THEME] = structuredClone(floatingVue.options.themes.dropdown);
|
|
53
61
|
const _sfc_main = {
|
|
54
62
|
name: "NcPopover",
|
|
55
63
|
components: {
|
|
@@ -103,6 +111,14 @@ const _sfc_main = {
|
|
|
103
111
|
setReturnFocus: {
|
|
104
112
|
default: void 0,
|
|
105
113
|
type: [HTMLElement, SVGElement, String, Boolean, Function]
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.
|
|
117
|
+
* Use this prop to disable this behavior.
|
|
118
|
+
*/
|
|
119
|
+
noAutoReturnFocus: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: false
|
|
106
122
|
}
|
|
107
123
|
},
|
|
108
124
|
emits: [
|
|
@@ -113,6 +129,11 @@ const _sfc_main = {
|
|
|
113
129
|
*/
|
|
114
130
|
"update:shown"
|
|
115
131
|
],
|
|
132
|
+
setup() {
|
|
133
|
+
return {
|
|
134
|
+
THEME
|
|
135
|
+
};
|
|
136
|
+
},
|
|
116
137
|
data() {
|
|
117
138
|
return {
|
|
118
139
|
internalShown: this.shown
|
|
@@ -140,9 +161,8 @@ const _sfc_main = {
|
|
|
140
161
|
*/
|
|
141
162
|
checkTriggerA11y() {
|
|
142
163
|
if (window.OC?.debug) {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
if (!requiredTriggerButton) {
|
|
164
|
+
const triggerButton = this.getPopoverTriggerButtonElement();
|
|
165
|
+
if (!triggerButton || !triggerButton.hasAttributes("aria-expanded", "aria-haspopup")) {
|
|
146
166
|
Vue__default.default.util.warn("It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.");
|
|
147
167
|
}
|
|
148
168
|
}
|
|
@@ -167,9 +187,16 @@ const _sfc_main = {
|
|
|
167
187
|
/**
|
|
168
188
|
* @return {HTMLElement|undefined}
|
|
169
189
|
*/
|
|
170
|
-
|
|
190
|
+
getPopoverTriggerElement() {
|
|
171
191
|
return this.$refs.popover.$refs.reference;
|
|
172
192
|
},
|
|
193
|
+
/**
|
|
194
|
+
* @return {HTMLElement|undefined}
|
|
195
|
+
*/
|
|
196
|
+
getPopoverTriggerButtonElement() {
|
|
197
|
+
const triggerContainer = this.getPopoverTriggerElement();
|
|
198
|
+
return triggerContainer && tabbable.tabbable(triggerContainer)[0];
|
|
199
|
+
},
|
|
173
200
|
/**
|
|
174
201
|
* Add focus trap for accessibility.
|
|
175
202
|
*/
|
|
@@ -188,7 +215,7 @@ const _sfc_main = {
|
|
|
188
215
|
// Focus will be release when popover be hide
|
|
189
216
|
escapeDeactivates: false,
|
|
190
217
|
allowOutsideClick: true,
|
|
191
|
-
setReturnFocus: this.setReturnFocus,
|
|
218
|
+
setReturnFocus: this.setReturnFocus || !this.noAutoReturnFocus && this.getPopoverTriggerButtonElement(),
|
|
192
219
|
trapStack: focusTrap$1.getTrapStack(),
|
|
193
220
|
fallBackFocus: el
|
|
194
221
|
});
|
|
@@ -253,7 +280,7 @@ const _sfc_main = {
|
|
|
253
280
|
};
|
|
254
281
|
var _sfc_render = function render() {
|
|
255
282
|
var _vm = this, _c = _vm._self._c;
|
|
256
|
-
return _c("Dropdown", _vm._g(_vm._b({ ref: "popover", attrs: { "distance": 10, "arrow-padding": 10, "no-auto-focus": true, "popper-class": _vm.popoverBaseClass, "shown": _vm.internalShown }, on: { "update:shown": function($event) {
|
|
283
|
+
return _c("Dropdown", _vm._g(_vm._b({ ref: "popover", attrs: { "distance": 10, "arrow-padding": 10, "no-auto-focus": true, "popper-class": [_vm.$style.ncPopover, _vm.popoverBaseClass], "theme": _vm.THEME, "shown": _vm.internalShown }, on: { "update:shown": function($event) {
|
|
257
284
|
_vm.internalShown = $event;
|
|
258
285
|
}, "apply-show": _vm.afterShow, "apply-hide": _vm.afterHide }, scopedSlots: _vm._u([{ key: "popper", fn: function(slotProps) {
|
|
259
286
|
return [_vm._t("default", null, null, slotProps)];
|
|
@@ -262,14 +289,22 @@ var _sfc_render = function render() {
|
|
|
262
289
|
} }], null, true) })], 1);
|
|
263
290
|
};
|
|
264
291
|
var _sfc_staticRenderFns = [];
|
|
292
|
+
const __cssModules = {
|
|
293
|
+
"$style": style0
|
|
294
|
+
};
|
|
295
|
+
function _sfc_injectStyles(ctx) {
|
|
296
|
+
for (var key in __cssModules) {
|
|
297
|
+
this[key] = __cssModules[key];
|
|
298
|
+
}
|
|
299
|
+
}
|
|
265
300
|
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
266
301
|
_sfc_main,
|
|
267
302
|
_sfc_render,
|
|
268
303
|
_sfc_staticRenderFns,
|
|
269
304
|
false,
|
|
270
|
-
|
|
305
|
+
_sfc_injectStyles,
|
|
271
306
|
null
|
|
272
307
|
);
|
|
273
308
|
const NcPopover = __component__.exports;
|
|
274
309
|
exports.NcPopover = NcPopover;
|
|
275
|
-
//# sourceMappingURL=NcPopover-
|
|
310
|
+
//# sourceMappingURL=NcPopover-DjeDGPXc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcPopover-DjeDGPXc.cjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:theme=\"THEME\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { options, Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { tabbable } from 'tabbable'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\n\nconst THEME = 'nc-popover-8'\n\n// NcPopover has a custom theme to have a custom name but same as the default \"dropdown\" theme\noptions.themes[THEME] = structuredClone(options.themes.dropdown)\n\n/**\n * @typedef {import('focus-trap').FocusTargetValueOrFalse} FocusTargetValueOrFalse\n * @typedef {FocusTargetValueOrFalse|() => FocusTargetValueOrFalse} SetReturnFocus\n */\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t *\n\t\t * @deprecated use noFocusTrap instead\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the popover focus trap.\n\t\t */\n\t\tnoFocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {SetReturnFocus}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean, Function],\n\t\t},\n\n\t\t/**\n\t\t * When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.\n\t\t * Use this prop to disable this behavior.\n\t\t */\n\t\tnoAutoReturnFocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tTHEME,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerButton = this.getPopoverTriggerButtonElement()\n\t\t\t\tif (!triggerButton || !triggerButton.hasAttributes('aria-expanded', 'aria-haspopup')) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerButtonElement() {\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\treturn triggerContainer && tabbable(triggerContainer)[0]\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (this.noFocusTrap || !this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel.tabIndex = -1\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus || (!this.noAutoReturnFocus && this.getPopoverTriggerButtonElement()),\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t\tfallBackFocus: el,\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tasync afterShow() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tawait this.$nextTick()\n\t\t\tawait this.useFocusTrap()\n\t\t\tthis.addEscapeStopPropagation()\n\t\t},\n\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-hide')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" module>\n$arrow-width: 10px;\n// Move the arrow just slightly inside the popover\n// To prevent a visual gap on page scaling\n$arrow-position: $arrow-width - 1px;\n\n// Class is built by floating-vue as \"v-popper--theme-{THEME}\"\n.ncPopover:global(.v-popper--theme-nc-popover-8) {\n\t// Size class comes from the floating-vue library we use\n\t:global(.resize-observer) {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tz-index: -1;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\topacity: 0;\n\n\t\tobject {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\tpointer-events: none;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t&:global(.v-popper__popper) {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\t:global(.v-popper__wrapper) {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t:global(.v-popper__inner) {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t:global(.v-popper__arrow-container) {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] :global(.v-popper__arrow-container) {\n\t\t\tbottom: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] :global(.v-popper__arrow-container) {\n\t\t\ttop: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tright: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","defineComponent","options","Dropdown","Vue","tabbable","createFocusTrap","getTrapStack"],"mappings":";;;;;;;;;AAQA,MAAAA,cAAAC,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,eAAA;AACA,aAAA;AAAA,QACA,iBAAA,KAAA;AAAA,QACA,iBAAA,KAAA,MAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAEA,WAAA,KAAA,aAAA,UAAA;AAAA,MACA,OAAA,KAAA;AAAA,IACA,CAAA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;ACkIA,MAAA,QAAA;AAGAC,YAAAA,QAAA,OAAA,KAAA,IAAA,gBAAAA,YAAA,QAAA,OAAA,QAAA;AAOA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MAC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,gBAAA,KAAA,GAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,2BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,UAAA,iBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,UAAA,oBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAA,OAAA;AACA,UAAA,MAAA,SAAA,aAAA,MAAA,QAAA,UAAA;AACA,cAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,MAAA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,iCAAA;AAEA,YAAA,KAAA,UAAA;AACA,YAAA,KAAA,aAAA;AACA,WAAA,yBAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import '../assets/NcPopover
|
|
1
|
+
import '../assets/NcPopover--XoXIhLx.css';
|
|
2
2
|
import Vue, { defineComponent } from "vue";
|
|
3
|
-
import { Dropdown } from "floating-vue";
|
|
3
|
+
import { options, Dropdown } from "floating-vue";
|
|
4
4
|
import { createFocusTrap } from "focus-trap";
|
|
5
|
+
import { tabbable } from "tabbable";
|
|
5
6
|
import { g as getTrapStack } from "./focusTrap-HJQ4pqHV.mjs";
|
|
6
7
|
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
7
8
|
const _sfc_main$1 = defineComponent({
|
|
@@ -47,6 +48,13 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
|
47
48
|
null
|
|
48
49
|
);
|
|
49
50
|
const NcPopoverTriggerProvider = __component__$1.exports;
|
|
51
|
+
const ncPopover = "_ncPopover_hdy45_20";
|
|
52
|
+
const style0 = {
|
|
53
|
+
"material-design-icon": "_material-design-icon_hdy45_12",
|
|
54
|
+
ncPopover
|
|
55
|
+
};
|
|
56
|
+
const THEME = "nc-popover-8";
|
|
57
|
+
options.themes[THEME] = structuredClone(options.themes.dropdown);
|
|
50
58
|
const _sfc_main = {
|
|
51
59
|
name: "NcPopover",
|
|
52
60
|
components: {
|
|
@@ -100,6 +108,14 @@ const _sfc_main = {
|
|
|
100
108
|
setReturnFocus: {
|
|
101
109
|
default: void 0,
|
|
102
110
|
type: [HTMLElement, SVGElement, String, Boolean, Function]
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.
|
|
114
|
+
* Use this prop to disable this behavior.
|
|
115
|
+
*/
|
|
116
|
+
noAutoReturnFocus: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false
|
|
103
119
|
}
|
|
104
120
|
},
|
|
105
121
|
emits: [
|
|
@@ -110,6 +126,11 @@ const _sfc_main = {
|
|
|
110
126
|
*/
|
|
111
127
|
"update:shown"
|
|
112
128
|
],
|
|
129
|
+
setup() {
|
|
130
|
+
return {
|
|
131
|
+
THEME
|
|
132
|
+
};
|
|
133
|
+
},
|
|
113
134
|
data() {
|
|
114
135
|
return {
|
|
115
136
|
internalShown: this.shown
|
|
@@ -137,9 +158,8 @@ const _sfc_main = {
|
|
|
137
158
|
*/
|
|
138
159
|
checkTriggerA11y() {
|
|
139
160
|
if (window.OC?.debug) {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
if (!requiredTriggerButton) {
|
|
161
|
+
const triggerButton = this.getPopoverTriggerButtonElement();
|
|
162
|
+
if (!triggerButton || !triggerButton.hasAttributes("aria-expanded", "aria-haspopup")) {
|
|
143
163
|
Vue.util.warn("It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.");
|
|
144
164
|
}
|
|
145
165
|
}
|
|
@@ -164,9 +184,16 @@ const _sfc_main = {
|
|
|
164
184
|
/**
|
|
165
185
|
* @return {HTMLElement|undefined}
|
|
166
186
|
*/
|
|
167
|
-
|
|
187
|
+
getPopoverTriggerElement() {
|
|
168
188
|
return this.$refs.popover.$refs.reference;
|
|
169
189
|
},
|
|
190
|
+
/**
|
|
191
|
+
* @return {HTMLElement|undefined}
|
|
192
|
+
*/
|
|
193
|
+
getPopoverTriggerButtonElement() {
|
|
194
|
+
const triggerContainer = this.getPopoverTriggerElement();
|
|
195
|
+
return triggerContainer && tabbable(triggerContainer)[0];
|
|
196
|
+
},
|
|
170
197
|
/**
|
|
171
198
|
* Add focus trap for accessibility.
|
|
172
199
|
*/
|
|
@@ -185,7 +212,7 @@ const _sfc_main = {
|
|
|
185
212
|
// Focus will be release when popover be hide
|
|
186
213
|
escapeDeactivates: false,
|
|
187
214
|
allowOutsideClick: true,
|
|
188
|
-
setReturnFocus: this.setReturnFocus,
|
|
215
|
+
setReturnFocus: this.setReturnFocus || !this.noAutoReturnFocus && this.getPopoverTriggerButtonElement(),
|
|
189
216
|
trapStack: getTrapStack(),
|
|
190
217
|
fallBackFocus: el
|
|
191
218
|
});
|
|
@@ -196,9 +223,9 @@ const _sfc_main = {
|
|
|
196
223
|
*
|
|
197
224
|
* @param {object} options The configuration options for focusTrap
|
|
198
225
|
*/
|
|
199
|
-
clearFocusTrap(
|
|
226
|
+
clearFocusTrap(options2 = {}) {
|
|
200
227
|
try {
|
|
201
|
-
this.$focusTrap?.deactivate(
|
|
228
|
+
this.$focusTrap?.deactivate(options2);
|
|
202
229
|
this.$focusTrap = null;
|
|
203
230
|
} catch (err) {
|
|
204
231
|
console.warn(err);
|
|
@@ -250,7 +277,7 @@ const _sfc_main = {
|
|
|
250
277
|
};
|
|
251
278
|
var _sfc_render = function render() {
|
|
252
279
|
var _vm = this, _c = _vm._self._c;
|
|
253
|
-
return _c("Dropdown", _vm._g(_vm._b({ ref: "popover", attrs: { "distance": 10, "arrow-padding": 10, "no-auto-focus": true, "popper-class": _vm.popoverBaseClass, "shown": _vm.internalShown }, on: { "update:shown": function($event) {
|
|
280
|
+
return _c("Dropdown", _vm._g(_vm._b({ ref: "popover", attrs: { "distance": 10, "arrow-padding": 10, "no-auto-focus": true, "popper-class": [_vm.$style.ncPopover, _vm.popoverBaseClass], "theme": _vm.THEME, "shown": _vm.internalShown }, on: { "update:shown": function($event) {
|
|
254
281
|
_vm.internalShown = $event;
|
|
255
282
|
}, "apply-show": _vm.afterShow, "apply-hide": _vm.afterHide }, scopedSlots: _vm._u([{ key: "popper", fn: function(slotProps) {
|
|
256
283
|
return [_vm._t("default", null, null, slotProps)];
|
|
@@ -259,16 +286,24 @@ var _sfc_render = function render() {
|
|
|
259
286
|
} }], null, true) })], 1);
|
|
260
287
|
};
|
|
261
288
|
var _sfc_staticRenderFns = [];
|
|
289
|
+
const __cssModules = {
|
|
290
|
+
"$style": style0
|
|
291
|
+
};
|
|
292
|
+
function _sfc_injectStyles(ctx) {
|
|
293
|
+
for (var key in __cssModules) {
|
|
294
|
+
this[key] = __cssModules[key];
|
|
295
|
+
}
|
|
296
|
+
}
|
|
262
297
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
263
298
|
_sfc_main,
|
|
264
299
|
_sfc_render,
|
|
265
300
|
_sfc_staticRenderFns,
|
|
266
301
|
false,
|
|
267
|
-
|
|
302
|
+
_sfc_injectStyles,
|
|
268
303
|
null
|
|
269
304
|
);
|
|
270
305
|
const NcPopover = __component__.exports;
|
|
271
306
|
export {
|
|
272
307
|
NcPopover as N
|
|
273
308
|
};
|
|
274
|
-
//# sourceMappingURL=NcPopover-
|
|
309
|
+
//# sourceMappingURL=NcPopover-DxTXnL3u.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcPopover-DxTXnL3u.mjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:theme=\"THEME\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { options, Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { tabbable } from 'tabbable'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\n\nconst THEME = 'nc-popover-8'\n\n// NcPopover has a custom theme to have a custom name but same as the default \"dropdown\" theme\noptions.themes[THEME] = structuredClone(options.themes.dropdown)\n\n/**\n * @typedef {import('focus-trap').FocusTargetValueOrFalse} FocusTargetValueOrFalse\n * @typedef {FocusTargetValueOrFalse|() => FocusTargetValueOrFalse} SetReturnFocus\n */\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t *\n\t\t * @deprecated use noFocusTrap instead\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the popover focus trap.\n\t\t */\n\t\tnoFocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {SetReturnFocus}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean, Function],\n\t\t},\n\n\t\t/**\n\t\t * When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.\n\t\t * Use this prop to disable this behavior.\n\t\t */\n\t\tnoAutoReturnFocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tTHEME,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerButton = this.getPopoverTriggerButtonElement()\n\t\t\t\tif (!triggerButton || !triggerButton.hasAttributes('aria-expanded', 'aria-haspopup')) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerButtonElement() {\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\treturn triggerContainer && tabbable(triggerContainer)[0]\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (this.noFocusTrap || !this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel.tabIndex = -1\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus || (!this.noAutoReturnFocus && this.getPopoverTriggerButtonElement()),\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t\tfallBackFocus: el,\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tasync afterShow() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tawait this.$nextTick()\n\t\t\tawait this.useFocusTrap()\n\t\t\tthis.addEscapeStopPropagation()\n\t\t},\n\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-hide')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" module>\n$arrow-width: 10px;\n// Move the arrow just slightly inside the popover\n// To prevent a visual gap on page scaling\n$arrow-position: $arrow-width - 1px;\n\n// Class is built by floating-vue as \"v-popper--theme-{THEME}\"\n.ncPopover:global(.v-popper--theme-nc-popover-8) {\n\t// Size class comes from the floating-vue library we use\n\t:global(.resize-observer) {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tz-index: -1;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\topacity: 0;\n\n\t\tobject {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\tpointer-events: none;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t&:global(.v-popper__popper) {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\t:global(.v-popper__wrapper) {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t:global(.v-popper__inner) {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t:global(.v-popper__arrow-container) {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] :global(.v-popper__arrow-container) {\n\t\t\tbottom: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] :global(.v-popper__arrow-container) {\n\t\t\ttop: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tright: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","options"],"mappings":";;;;;;AAQA,MAAAA,cAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,M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MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,iCAAA;AAEA,YAAA,KAAA,UAAA;AACA,YAAA,KAAA,aAAA;AACA,WAAA,yBAAA;AAAA,IACA;AAAA,IACA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/chunks/{NcRelatedResourcesPanel-D_4x0nYR.cjs → NcRelatedResourcesPanel-BR_ggojH.cjs}
RENAMED
|
@@ -8,7 +8,7 @@ const ChevronDown = require("./ChevronDown-BlfyuflD.cjs");
|
|
|
8
8
|
const ChevronUp = require("./ChevronUp-Bpd__OBZ.cjs");
|
|
9
9
|
const Components_NcButton = require("../Components/NcButton.cjs");
|
|
10
10
|
const NcIconSvgWrapper = require("./NcIconSvgWrapper-CrnN5Sq5.cjs");
|
|
11
|
-
const _l10n = require("./_l10n-
|
|
11
|
+
const _l10n = require("./_l10n-RKohWu5d.cjs");
|
|
12
12
|
const autolink = require("./autolink-BAgL31EZ.cjs");
|
|
13
13
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
14
14
|
const axios__default = /* @__PURE__ */ _interopDefault(axios);
|
|
@@ -424,4 +424,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
424
424
|
);
|
|
425
425
|
const NcRelatedResourcesPanel = __component__.exports;
|
|
426
426
|
exports.NcRelatedResourcesPanel = NcRelatedResourcesPanel;
|
|
427
|
-
//# sourceMappingURL=NcRelatedResourcesPanel-
|
|
427
|
+
//# sourceMappingURL=NcRelatedResourcesPanel-BR_ggojH.cjs.map
|