photos/js/photos-src_mixins_FetchAlbu...

1 line
54 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchAlbumsMixin_js-src_components_Actions_ActionFavorite_vue-src_components_Album-1e5e7f.js?v=f5e6627287126f7a1cb6","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC9RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;ACvCA;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack:///photos/src/components/Actions/ActionFavorite.vue?vue&type=script&lang=js&","webpack:///photos/src/components/Albums/AlbumForm.vue?vue&type=script&lang=js&","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue?vue&type=script&lang=js&","webpack:///photos/src/mixins/FetchAlbumsMixin.js","webpack:///photos/src/components/Albums/AlbumForm.vue?vue&type=style&index=0&id=1d54fb78&lang=scss&scoped=true&","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=02023324&lang=scss&scoped=true&","webpack://photos/./src/components/Albums/AlbumForm.vue?b00f","webpack://photos/./src/components/Albums/CollaboratorsSelectionForm.vue?5802","webpack:///photos/src/components/Actions/ActionFavorite.vue","webpack:///photos/src/components/Albums/AlbumForm.vue","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue","webpack://photos/./src/components/Actions/ActionFavorite.vue?d6b8","webpack://photos/./src/components/Albums/AlbumForm.vue?f038","webpack://photos/./src/components/Albums/CollaboratorsSelectionForm.vue?8cce","webpack:///photos/src/components/Actions/ActionFavorite.vue?vue&type=template&id=607ef4d8&","webpack:///photos/src/components/Albums/AlbumForm.vue?vue&type=template&id=1d54fb78&scoped=true&","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue?vue&type=template&id=02023324&scoped=true&"],"sourcesContent":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapActions, mapGetters } from 'vuex';\nimport Star from 'vue-material-design-icons/Star';\nimport { NcActionButton } from '@nextcloud/vue';\nexport default {\n name: 'ActionFavorite',\n components: {\n Star,\n NcActionButton\n },\n props: {\n selectedFileIds: {\n type: Array,\n required: true\n }\n },\n computed: { ...mapGetters(['files']),\n\n /** @return {boolean} */\n shouldFavoriteSelection() {\n // Favorite all selection if at least one file is not in the favorites.\n return this.selectedFileIds.some(fileId => this.files[fileId].favorite === 0);\n }\n\n },\n methods: { ...mapActions(['toggleFavoriteForFiles']),\n\n async favoriteSelection() {\n await this.toggleFavoriteForFiles({\n fileIds: this.selectedFileIds,\n favoriteState: 1\n });\n },\n\n async unFavoriteSelection() {\n await this.toggleFavoriteForFiles({\n fileIds: this.selectedFileIds,\n favoriteState: 0\n });\n }\n\n }\n};","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapActions } from 'vuex';\nimport MapMarker from 'vue-material-design-icons/MapMarker';\nimport AccountMultiplePlus from 'vue-material-design-icons/AccountMultiplePlus';\nimport Send from 'vue-material-design-icons/Send';\nimport { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue';\nimport moment from '@nextcloud/moment';\nimport CollaboratorsSelectionForm from './CollaboratorsSelectionForm.vue';\nexport default {\n name: 'AlbumForm',\n components: {\n MapMarker,\n AccountMultiplePlus,\n Send,\n NcButton,\n NcLoadingIcon,\n NcTextField,\n CollaboratorsSelectionForm\n },\n props: {\n album: {\n type: Object,\n default: null\n },\n displayBackButton: {\n type: Boolean,\n default: false\n }\n },\n\n data() {\n return {\n showCollaboratorView: false,\n albumName: '',\n albumLocation: '',\n loading: false\n };\n },\n\n computed: {\n /**\n * @return {boolean} Whether sharing is enabled.\n */\n editMode() {\n return this.album !== null;\n },\n\n /**\n * @return {boolean} Whether sharing is enabled.\n */\n sharingEnabled() {\n return OC.Share !== undefined;\n }\n\n },\n\n mounted() {\n if (this.editMode) {\n this.albumName = this.album.basename;\n this.albumLocation = this.album.location;\n }\n\n this.$nextTick(() => {\n this.$refs.nameInput.$el.getElementsByTagName('input')[0].focus();\n });\n },\n\n methods: { ...mapActions(['createAlbum', 'renameAlbum', 'updateAlbum']),\n\n submit() {\n let collaborators = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (this.albumName === '' || this.loading) {\n return;\n }\n\n if (this.editMode) {\n this.handleUpdateAlbum();\n } else {\n this.handleCreateAlbum(collaborators);\n }\n },\n\n async handleCreateAlbum() {\n let collaborators = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n try {\n this.loading = true;\n let album = await this.createAlbum({\n album: {\n basename: this.albumName,\n nbItems: 0,\n location: this.albumLocation,\n lastPhoto: -1,\n date: moment().format('MMMM YYYY'),\n collaborators\n }\n });\n\n if (this.albumLocation !== '' || collaborators.length !== 0) {\n album = await this.updateAlbum({\n albumName: this.albumName,\n properties: {\n location: this.albumLocation,\n collaborators\n }\n });\n }\n\n this.$emit('done', {\n album\n });\n } finally {\n this.loading = false;\n }\n },\n\n async handleUpdateAlbum() {\n try {\n this.loading = true;\n let album = { ...this.album\n };\n\n if (this.album.basename !== this.albumName) {\n album = await this.renameAlbum({\n currentAlbumName: this.album.basename,\n newAlbumName: this.albumName\n });\n }\n\n if (this.album.location !== this.albumLocation) {\n album.location = await this.updateAlbum({\n albumName: this.albumName,\n properties: {\n location: this.albumLocation\n }\n });\n }\n\n this.$emit('done', {\n album\n });\n } finally {\n this.loading = false;\n }\n },\n\n back() {\n this.$emit('back');\n }\n\n }\n};","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport Magnify from 'vue-material-design-icons/Magnify';\nimport Close from 'vue-material-design-icons/Close';\nimport axios from '@nextcloud/axios';\nimport { showError } from '@nextcloud/dialogs';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { NcButton, NcListItemIcon, NcLoadingIcon, NcPopover, NcTextField } from '@nextcloud/vue';\nimport logger from '../../services/logger.js';\nconst SHARE = {\n TYPE: {\n USER: 0,\n GROUP: 1 // LINK: 3,\n\n }\n};\nexport default {\n name: 'CollaboratorsSelectionForm',\n components: {\n Magnify,\n Close,\n NcLoadingIcon,\n NcButton,\n NcListItemIcon,\n NcTextField,\n NcPopover\n },\n props: {\n albumName: {\n type: String,\n required: true\n },\n collaborators: {\n type: Array,\n default: () => []\n },\n publicLink: {\n type: String,\n default: ''\n },\n allowPublicLink: {\n type: Boolean,\n default: true\n }\n },\n\n data() {\n return {\n searchText: '',\n availableCollaborators: {},\n selectedCollaboratorsKeys: [],\n currentSearchResults: [],\n loadingCollaborators: false,\n randomId: Math.random().toString().substring(2, 10),\n publicLinkCopied: false,\n config: {\n minSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0\n }\n };\n },\n\n computed: {\n /**\n * @return {string[]}\n */\n searchResults() {\n return this.currentSearchResults.filter(_ref => {\n let {\n id\n } = _ref;\n return id !== getCurrentUser().uid;\n }).map(_ref2 => {\n let {\n source,\n id\n } = _ref2;\n return `${source}:${id}`;\n }).filter(key => !this.selectedCollaboratorsKeys.includes(key)).map(key => ({\n key,\n height: 48\n }));\n },\n\n /**\n * @return {object[]}\n */\n selectedCollaborators() {\n return this.selectedCollaboratorsKeys.map(collaboratorKey => this.availableCollaborators[collaboratorKey]);\n }\n\n },\n\n mounted() {\n this.searchCollaborators();\n this.selectedCollaboratorsKeys = this.collaborators.map(_ref3 => {\n let {\n source,\n id\n } = _ref3;\n return `${source}:${id}`;\n });\n this.availableCollaborators = { ...this.availableCollaborators,\n ...this.collaborators.reduce((collaborators, collaborator) => ({ ...collaborators,\n [`${collaborator.source}:${collaborator.id}`]: collaborator\n }), {})\n };\n },\n\n methods: {\n /**\n * Fetch possible collaborators.\n */\n async searchCollaborators() {\n try {\n if (this.searchText.length < this.config.minSearchStringLength) {\n return;\n }\n\n this.loadingCollaborators = true;\n const response = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search: this.searchText,\n itemType: 'share-recipients',\n shareTypes: [SHARE.TYPE.USER, SHARE.TYPE.GROUP]\n }\n });\n this.currentSearchResults = response.data.ocs.data;\n this.availableCollaborators = { ...this.availableCollaborators,\n ...response.data.ocs.data.reduce((collaborators, collaborator) => ({ ...collaborators,\n [`${collaborator.source}:${collaborator.id}`]: collaborator\n }), {})\n };\n } catch (error) {\n this.errorFetchingCollaborators = error;\n logger.error(t('photos', 'Failed to fetch collaborators list.'), error);\n showError(t('photos', 'Failed to fetch collaborators list.'));\n } finally {\n this.loadingCollaborators = false;\n }\n },\n\n // TODO: implement public sharing\n // async createPublicLinkForAlbum() {\n // return axios.put(generateOcsUrl(`apps/photos/createPublicLink/${this.albumName}`))\n // },\n // async deletePublicLink() {\n // return axios.delete(generateOcsUrl(`apps/photos/createPublicLink/${this.albumName}`))\n // },\n // async copyPublicLink() {\n // await navigator.clipboard.writeText(this.publicLink)\n // this.publicLinkCopied = true\n // setTimeout(() => {\n // this.publicLinkCopied = false\n // }, 10000)\n // },\n selectEntity(collaboratorKey) {\n if (this.selectedCollaboratorsKeys.includes(collaboratorKey)) {\n return;\n }\n\n this.$refs.popover.$refs.popover.hide();\n this.selectedCollaboratorsKeys.push(collaboratorKey);\n },\n\n unselectEntity(collaboratorKey) {\n const index = this.selectedCollaboratorsKeys.indexOf(collaboratorKey);\n this.selectedCollaboratorsKeys.splice(index, 1);\n }\n\n }\n};","/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { mapGetters } from 'vuex';\nimport moment from '@nextcloud/moment';\nimport { showError } from '@nextcloud/dialogs';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport client from '../services/DavClient.js';\nimport logger from '../services/logger.js';\nimport { genFileInfo } from '../utils/fileUtils.js';\nimport AbortControllerMixin from './AbortControllerMixin.js';\nexport default {\n name: 'FetchAlbumsMixin',\n\n data() {\n return {\n errorFetchingAlbums: null,\n loadingAlbums: false\n };\n },\n\n mixins: [AbortControllerMixin],\n\n async beforeMount() {\n this.fetchAlbums();\n },\n\n computed: { ...mapGetters(['albums'])\n },\n methods: {\n async fetchAlbums() {\n if (this.loadingAlbums) {\n return;\n }\n\n try {\n this.loadingAlbums = true;\n this.errorFetchingAlbums = null;\n const response = await client.getDirectoryContents(`/photos/${getCurrentUser()?.uid}/albums`, {\n data: `<?xml version=\"1.0\"?>\n\t\t\t\t\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\t\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\t\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\t\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t\t<nc:last-photo />\n\t\t\t\t\t\t\t\t\t<nc:nbItems />\n\t\t\t\t\t\t\t\t\t<nc:location />\n\t\t\t\t\t\t\t\t\t<nc:dateRange />\n\t\t\t\t\t\t\t\t\t<nc:collaborators />\n\t\t\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t\t\t</d:propfind>`,\n // TODO: implement public sharing\n // <nc:publicLink />\n details: true,\n signal: this.abortController.signal\n });\n const albums = response.data.filter(album => album.filename !== `/photos/${getCurrentUser()?.uid}/albums`) // Ensure that we have a proper collaborators array.\n .map(album => {\n if (album.props.collaborators === '') {\n album.props.collaborators = [];\n } else if (typeof album.props.collaborators.collaborator === 'object') {\n if (Array.isArray(album.props.collaborators.collaborator)) {\n album.props.collaborators = album.props.collaborators.collaborator;\n } else {\n album.props.collaborators = [album.props.collaborators.collaborator];\n }\n }\n\n return album;\n }).map(album => genFileInfo(album)).map(album => {\n const dateRange = JSON.parse(album.dateRange?.replace(/&quot;/g, '\"') ?? '{}');\n\n if (dateRange.start === null) {\n dateRange.start = moment().unix();\n dateRange.end = moment().unix();\n }\n\n const dateRangeFormated = {\n startDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n endDate: moment.unix(dateRange.end).format('MMMM YYYY')\n };\n\n if (dateRangeFormated.startDate === dateRangeFormated.endDate) {\n return { ...album,\n date: dateRangeFormated.startDate\n };\n } else {\n return { ...album,\n date: this.t('photos', '{startDate} to {endDate}', dateRangeFormated)\n };\n }\n });\n this.$store.dispatch('addAlbums', {\n albums\n });\n logger.debug(`[FetchAlbumsMixin] Fetched ${albums.length} new files: `, albums);\n } catch (error) {\n if (error.response?.status === 404) {\n this.errorFetchingAlbums = 404;\n } else if (error.code === 'ERR_CANCELED') {\n return;\n } else {\n this.errorFetchingAlbums = error;\n }\n\n logger.error(t('photos', 'Failed to fetch albums list.'), error);\n showError(t('photos', 'Failed to fetch albums list.'));\n } finally {\n this.loadingAlbums = false;\n }\n }\n\n }\n};","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".album-form[data-v-1d54fb78] {\\n display: flex;\\n flex-direction: column;\\n height: 350px;\\n padding: 16px;\\n}\\n.album-form .form-title[data-v-1d54fb78] {\\n font-weight: bold;\\n}\\n.album-form .form-subtitle[data-v-1d54fb78] {\\n color: var(--color-text-lighter);\\n}\\n.album-form .form-inputs[data-v-1d54fb78] {\\n flex-grow: 1;\\n justify-items: flex-end;\\n}\\n.album-form .form-inputs input[data-v-1d54fb78] {\\n width: 100%;\\n}\\n.album-form .form-inputs label[data-v-1d54fb78] {\\n display: flex;\\n margin-top: 16px;\\n}\\n.album-form .form-inputs label[data-v-1d54fb78] svg {\\n margin-right: 12px;\\n}\\n.album-form .form-buttons[data-v-1d54fb78] {\\n display: flex;\\n justify-content: space-between;\\n}\\n.album-form .form-buttons .left-buttons[data-v-1d54fb78], .album-form .form-buttons .right-buttons[data-v-1d54fb78] {\\n display: flex;\\n}\\n.album-form .form-buttons .right-buttons[data-v-1d54fb78] {\\n justify-content: flex-end;\\n}\\n.album-form .form-buttons button[data-v-1d54fb78] {\\n margin-right: 16px;\\n}\\n.left-buttons[data-v-1d54fb78] {\\n flex-grow: 1;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".manage-collaborators[data-v-02023324] {\\n display: flex;\\n flex-direction: column;\\n padding: 20px;\\n height: 500px;\\n}\\n.manage-collaborators__title[data-v-02023324] {\\n font-weight: bold;\\n}\\n.manage-collaborators__subtitle[data-v-02023324] {\\n color: var(--color-text-lighter);\\n}\\n.manage-collaborators__public-link-button[data-v-02023324] {\\n margin: 4px 0;\\n}\\n.manage-collaborators__form[data-v-02023324] {\\n margin-top: 4px 0;\\n display: flex;\\n flex-direction: column;\\n}\\n.manage-collaborators__form__input[data-v-02023324] {\\n position: relative;\\n display: block;\\n}\\n.manage-collaborators__form__input input[data-v-02023324] {\\n width: 100%;\\n padding-left: 34px;\\n}\\n.manage-collaborators__form__input .loading-icon[data-v-02023324] {\\n position: absolute;\\n top: 8px;\\n right: 8px;\\n}\\n.manage-collaborators__form__list[data-v-02023324] {\\n padding: 8px;\\n}\\n.manage-collaborators__form__list__result[data-v-02023324] {\\n padding: 8px;\\n border-radius: 100px;\\n box-sizing: border-box;\\n}\\n.manage-collaborators__form__list__result[data-v-02023324], .manage-collaborators__form__list__result *[data-v-02023324] {\\n cursor: pointer !important;\\n}\\n.manage-collaborators__form__list__result[data-v-02023324]:hover {\\n background: var(--color-background-dark);\\n}\\n.manage-collaborators__selection[data-v-02023324] {\\n display: flex;\\n flex-direction: column;\\n margin-top: 8px;\\n flex-grow: 1;\\n}\\n.manage-collaborators__selection__item[data-v-02023324] {\\n border-radius: var(--border-radius-pill);\\n padding: 0 8px;\\n}\\n.manage-collaborators__selection__item[data-v-02023324]:hover {\\n background: var(--color-background-dark);\\n}\\n.manage-collaborators .actions[data-v-02023324] {\\n display: flex;\\n margin-top: 8px;\\n}\\n.manage-collaborators .actions__public-link[data-v-02023324] {\\n display: flex;\\n align-items: center;\\n}\\n.manage-collaborators .actions__slot[data-v-02023324] {\\n flex-grow: 1;\\n display: flex;\\n justify-content: flex-end;\\n align-items: center;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=style&index=0&id=1d54fb78&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=style&index=0&id=1d54fb78&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=02023324&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=02023324&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./ActionFavorite.vue?vue&type=template&id=607ef4d8&\"\nimport script from \"./ActionFavorite.vue?vue&type=script&lang=js&\"\nexport * from \"./ActionFavorite.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('607ef4d8')) {\n api.createRecord('607ef4d8', component.options)\n } else {\n api.reload('607ef4d8', component.options)\n }\n module.hot.accept(\"./ActionFavorite.vue?vue&type=template&id=607ef4d8&\", function () {\n api.rerender('607ef4d8', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/Actions/ActionFavorite.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./AlbumForm.vue?vue&type=template&id=1d54fb78&scoped=true&\"\nimport script from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nexport * from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AlbumForm.vue?vue&type=style&index=0&id=1d54fb78&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1d54fb78\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('1d54fb78')) {\n api.createRecord('1d54fb78', component.options)\n } else {\n api.reload('1d54fb78', component.options)\n }\n module.hot.accept(\"./AlbumForm.vue?vue&type=template&id=1d54fb78&scoped=true&\", function () {\n api.rerender('1d54fb78', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/Albums/AlbumForm.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./CollaboratorsSelectionForm.vue?vue&type=template&id=02023324&scoped=true&\"\nimport script from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nexport * from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=02023324&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"02023324\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('02023324')) {\n api.createRecord('02023324', component.options)\n } else {\n api.reload('02023324', component.options)\n }\n module.hot.accept(\"./CollaboratorsSelectionForm.vue?vue&type=template&id=02023324&scoped=true&\", function () {\n api.rerender('02023324', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/Albums/CollaboratorsSelectionForm.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ActionFavorite.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ActionFavorite.vue?vue&type=script&lang=js&\"","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=script&lang=js&\"","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _vm.shouldFavoriteSelection\n ? _c(\n \"NcActionButton\",\n {\n attrs: {\n \"close-after-click\": true,\n \"aria-label\": _vm.t(\"photos\", \"Mark selection as favorite\"),\n },\n on: { click: _vm.favoriteSelection },\n },\n [\n _vm._v(\n \"\\n\\t\" +\n _vm._s(_vm.t(\"photos\", \"Add selection to favorites\")) +\n \"\\n\\t\"\n ),\n _c(\"Star\", { attrs: { slot: \"icon\" }, slot: \"icon\" }),\n ],\n 1\n )\n : _c(\n \"NcActionButton\",\n {\n attrs: {\n \"close-after-click\": true,\n \"aria-label\": _vm.t(\"photos\", \"Remove selection from favorites\"),\n },\n on: { click: _vm.unFavoriteSelection },\n },\n [\n _vm._v(\n \"\\n\\t\" +\n _vm._s(_vm.t(\"photos\", \"Remove selection from favorites\")) +\n \"\\n\\t\"\n ),\n _c(\"Star\", { attrs: { slot: \"icon\" }, slot: \"icon\" }),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return !_vm.showCollaboratorView\n ? _c(\n \"form\",\n {\n staticClass: \"album-form\",\n on: {\n submit: function ($event) {\n $event.preventDefault()\n return _vm.submit.apply(null, arguments)\n },\n },\n },\n [\n _c(\n \"div\",\n { staticClass: \"form-inputs\" },\n [\n _c(\"NcTextField\", {\n ref: \"nameInput\",\n attrs: {\n value: _vm.albumName,\n type: \"text\",\n name: \"name\",\n required: true,\n autofocus: \"true\",\n placeholder: _vm.t(\"photos\", \"Name of the album\"),\n },\n on: {\n \"update:value\": function ($event) {\n _vm.albumName = $event\n },\n },\n }),\n _vm._v(\" \"),\n _c(\n \"label\",\n [\n _c(\"MapMarker\"),\n _c(\"NcTextField\", {\n attrs: {\n value: _vm.albumLocation,\n name: \"location\",\n type: \"text\",\n placeholder: _vm.t(\"photos\", \"Location of the album\"),\n },\n on: {\n \"update:value\": function ($event) {\n _vm.albumLocation = $event\n },\n },\n }),\n ],\n 1\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"form-buttons\" }, [\n _c(\n \"span\",\n { staticClass: \"left-buttons\" },\n [\n _vm.displayBackButton\n ? _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.t(\n \"photos\",\n \"Go back to the previous view.\"\n ),\n type: \"tertiary\",\n },\n on: { click: _vm.back },\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Back\")) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n )\n : _vm._e(),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"span\",\n { staticClass: \"right-buttons\" },\n [\n _vm.sharingEnabled && !_vm.editMode\n ? _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.t(\n \"photos\",\n \"Go to the add collaborators view.\"\n ),\n type: \"secondary\",\n disabled: _vm.albumName.trim() === \"\" || _vm.loading,\n },\n on: {\n click: function ($event) {\n _vm.showCollaboratorView = true\n },\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"icon\",\n fn: function () {\n return [_c(\"AccountMultiplePlus\")]\n },\n proxy: true,\n },\n ],\n null,\n false,\n 1531126728\n ),\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Add collaborators\")) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.editMode\n ? _vm.t(\"photos\", \"Save.\")\n : _vm.t(\"photos\", \"Create the album.\"),\n type: \"primary\",\n disabled: _vm.albumName === \"\" || _vm.loading,\n },\n on: {\n click: function ($event) {\n return _vm.submit()\n },\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"icon\",\n fn: function () {\n return [\n _vm.loading ? _c(\"NcLoadingIcon\") : _c(\"Send\"),\n ]\n },\n proxy: true,\n },\n ],\n null,\n false,\n 3914512768\n ),\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(\n _vm.editMode\n ? _vm.t(\"photos\", \"Save\")\n : _vm.t(\"photos\", \"Create album\")\n ) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n ),\n ],\n 1\n ),\n ]),\n ]\n )\n : _c(\"CollaboratorsSelectionForm\", {\n attrs: { \"album-name\": _vm.albumName, \"allow-public-link\": false },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (ref) {\n var collaborators = ref.collaborators\n return [\n _c(\n \"span\",\n { staticClass: \"left-buttons\" },\n [\n _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.t(\n \"photos\",\n \"Back to the new album form.\"\n ),\n type: \"tertiary\",\n },\n on: {\n click: function ($event) {\n _vm.showCollaboratorView = false\n },\n },\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Back\")) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"span\",\n { staticClass: \"right-buttons\" },\n [\n _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.editMode\n ? _vm.t(\"photos\", \"Save.\")\n : _vm.t(\"photos\", \"Create the album.\"),\n type: \"primary\",\n disabled: _vm.albumName.trim() === \"\" || _vm.loading,\n },\n on: {\n click: function ($event) {\n return _vm.submit(collaborators)\n },\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"icon\",\n fn: function () {\n return [\n _vm.loading\n ? _c(\"NcLoadingIcon\")\n : _c(\"Send\"),\n ]\n },\n proxy: true,\n },\n ],\n null,\n true\n ),\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(\n _vm.editMode\n ? _vm.t(\"photos\", \"Save\")\n : _vm.t(\"photos\", \"Create album\")\n ) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n ),\n ],\n 1\n ),\n ]\n },\n },\n ]),\n })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"manage-collaborators\" }, [\n _c(\"h2\", { staticClass: \"manage-collaborators__title\" }, [\n _vm._v(\"\\n\\t\\t\" + _vm._s(_vm.t(\"photos\", \"Add collaborators\")) + \"\\n\\t\"),\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"manage-collaborators__subtitle\" }, [\n _vm._v(\n \"\\n\\t\\t\" +\n _vm._s(\n _vm.t(\"photos\", \"Add people or groups who can edit your album\")\n ) +\n \"\\n\\t\"\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"form\",\n {\n staticClass: \"manage-collaborators__form\",\n on: {\n submit: function ($event) {\n $event.preventDefault()\n },\n },\n },\n [\n _c(\n \"NcPopover\",\n { ref: \"popover\", attrs: { \"auto-size\": true, distance: 0 } },\n [\n _c(\n \"label\",\n {\n staticClass: \"manage-collaborators__form__input\",\n attrs: { slot: \"trigger\" },\n slot: \"trigger\",\n },\n [\n _c(\n \"NcTextField\",\n {\n attrs: {\n value: _vm.searchText,\n autocomplete: \"off\",\n type: \"search\",\n name: \"search\",\n \"aria-label\": _vm.t(\"photos\", \"Search for collaborators\"),\n \"aria-autocomplete\": \"list\",\n \"aria-controls\":\n \"manage-collaborators__form__selection-\" +\n _vm.randomId +\n \" manage-collaborators__form__list-\" +\n _vm.randomId,\n placeholder: _vm.t(\"photos\", \"Search people or groups\"),\n },\n on: {\n \"update:value\": function ($event) {\n _vm.searchText = $event\n },\n input: _vm.searchCollaborators,\n },\n },\n [_c(\"Magnify\", { attrs: { size: 16 } })],\n 1\n ),\n _vm._v(\" \"),\n _vm.loadingCollaborators ? _c(\"NcLoadingIcon\") : _vm._e(),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"ul\",\n {\n staticClass: \"manage-collaborators__form__list\",\n attrs: {\n id: \"manage-collaborators__form__list-\" + _vm.randomId,\n },\n },\n _vm._l(_vm.searchResults, function (result) {\n return _c(\"li\", { key: result.key }, [\n _c(\n \"a\",\n [\n _c(\"NcListItemIcon\", {\n staticClass: \"manage-collaborators__form__list__result\",\n attrs: {\n id: _vm.availableCollaborators[result.key].id,\n title: _vm.availableCollaborators[result.key].id,\n search: _vm.searchText,\n \"display-name\":\n _vm.availableCollaborators[result.key].label,\n \"aria-label\": _vm.t(\n \"photos\",\n \"Add {collaboratorLabel} to the collaborators list\",\n {\n collaboratorLabel:\n _vm.availableCollaborators[result.key].label,\n }\n ),\n },\n on: {\n click: function ($event) {\n return _vm.selectEntity(result.key)\n },\n },\n }),\n ],\n 1\n ),\n ])\n }),\n 0\n ),\n ]\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"ul\",\n { staticClass: \"manage-collaborators__selection\" },\n _vm._l(_vm.selectedCollaboratorsKeys, function (collaboratorKey) {\n return _c(\n \"li\",\n {\n key: collaboratorKey,\n staticClass: \"manage-collaborators__selection__item\",\n },\n [\n _c(\n \"NcListItemIcon\",\n {\n attrs: {\n id: _vm.availableCollaborators[collaboratorKey].id,\n title: _vm.availableCollaborators[collaboratorKey].id,\n \"display-name\":\n _vm.availableCollaborators[collaboratorKey].label,\n \"aria-label\": _vm.t(\n \"photos\",\n \"Remove {collaboratorLabel} from the collaborators list\",\n {\n collaboratorLabel:\n _vm.availableCollaborators[collaboratorKey].label,\n }\n ),\n },\n },\n [\n _c(\n \"NcButton\",\n {\n attrs: {\n type: \"tertiary\",\n \"aria-label\": _vm.t(\n \"photos\",\n \"Remove {collaboratorLabel} from the collaborators list\",\n {\n collaboratorLabel:\n _vm.availableCollaborators[collaboratorKey].label,\n }\n ),\n },\n on: {\n click: function ($event) {\n return _vm.unselectEntity(collaboratorKey)\n },\n },\n },\n [\n _c(\"Close\", {\n attrs: { slot: \"icon\", size: 20 },\n slot: \"icon\",\n }),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"actions\" }, [\n _c(\n \"div\",\n { staticClass: \"actions__slot\" },\n [_vm._t(\"default\", null, { collaborators: _vm.selectedCollaborators })],\n 2\n ),\n ]),\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }"],"names":[],"sourceRoot":""}