From ddf98bda1c0c50c5924743a00ebe6d91161e2804 Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Fri, 31 May 2024 11:25:50 +0200
Subject: [PATCH 001/178] remove vue.prototype
Signed-off-by: dartcafe
---
src/js/App.vue | 2 +-
src/js/adminSettings.js | 5 --
.../Actions/modules/ActionChangeView.vue | 1 +
.../Actions/modules/ActionDelete.vue | 1 +
.../modules/ActionDeleteOrphanedVotes.vue | 2 +-
.../modules/ActionOpenOptionsSidebar.vue | 1 +
.../modules/ActionOpenSharesSidebar.vue | 1 +
.../Actions/modules/ActionRegister.vue | 2 +-
.../Actions/modules/ActionSendConfirmed.vue | 3 +
.../Actions/modules/ActionSortOptions.vue | 1 +
.../Actions/modules/ActionSwitchSafeTable.vue | 1 +
.../Actions/modules/ActionToggleSidebar.vue | 1 +
src/js/components/Calendar/CalendarPeek.vue | 2 +
.../Cards/modules/CardAddProposals.vue | 5 ++
.../Cards/modules/CardAnonymousPollHint.vue | 5 ++
.../Cards/modules/CardClosedPoll.vue | 5 ++
.../Cards/modules/CardHiddenParticipants.vue | 5 ++
.../Cards/modules/CardLimitedVotes.vue | 5 ++
.../components/Cards/modules/CardLocked.vue | 1 +
.../components/Cards/modules/CardRegister.vue | 1 +
.../Cards/modules/CardSendConfirmations.vue | 1 +
.../Cards/modules/CardUnpublishedPoll.vue | 5 ++
src/js/components/Comments/CommentAdd.vue | 2 +
src/js/components/Comments/CommentItem.vue | 2 +
src/js/components/Comments/Comments.vue | 1 +
.../Configuration/AutoReminderInformation.vue | 5 ++
.../Configuration/ConfigAllowComment.vue | 6 +-
.../Configuration/ConfigAllowMayBe.vue | 1 +
.../Configuration/ConfigAnonymous.vue | 4 ++
.../Configuration/ConfigAutoReminder.vue | 4 ++
.../Configuration/ConfigClosing.vue | 2 +
.../Configuration/ConfigOptionLimit.vue | 6 +-
.../Configuration/ConfigProposals.vue | 2 +
.../Configuration/ConfigShowResults.vue | 1 +
.../components/Configuration/ConfigUseNo.vue | 1 +
.../Configuration/ConfigVoteLimit.vue | 5 ++
src/js/components/Create/CreateDlg.vue | 2 +
src/js/components/Export/ExportPoll.vue | 2 +
.../Navigation/PollNavigationItems.vue | 5 ++
src/js/components/Options/OptionCloneDate.vue | 2 +
src/js/components/Options/OptionItemOwner.vue | 5 ++
src/js/components/Options/OptionProposals.vue | 5 ++
src/js/components/Options/OptionsDate.vue | 2 +
src/js/components/Options/OptionsDateAdd.vue | 2 +
.../components/Options/OptionsDateShift.vue | 2 +
src/js/components/Options/OptionsText.vue | 5 +-
src/js/components/Options/OptionsTextAdd.vue | 1 +
.../components/Options/OptionsTextAddBulk.vue | 2 +
src/js/components/Poll/PollHeaderButtons.vue | 1 +
src/js/components/Poll/PollInfoLine.vue | 1 +
src/js/components/Poll/PollInformation.vue | 6 ++
src/js/components/Poll/PublicEmail.vue | 2 +
src/js/components/PollList/PollItem.vue | 4 ++
.../components/Public/PublicRegisterModal.vue | 2 +
.../AdminSettings/AdminActivities.vue | 5 ++
.../AdminSettings/AdminArchivePolls.vue | 5 ++
.../Settings/AdminSettings/AdminCombo.vue | 5 ++
.../Settings/AdminSettings/AdminEmail.vue | 2 +
.../Settings/AdminSettings/AdminJobs.vue | 2 +
.../Settings/AdminSettings/AdminLegal.vue | 2 +
.../AdminSettings/AdminPerformance.vue | 1 +
.../AdminSettings/AdminPollCreation.vue | 5 ++
.../AdminSettings/AdminPollDownload.vue | 5 ++
.../AdminSettings/AdminPollsInNavigation.vue | 5 ++
.../AdminSettings/AdminShareOpenPoll.vue | 5 ++
.../AdminSettings/AdminSharePublicCreate.vue | 5 ++
.../AdminSharePublicShowLogin.vue | 5 ++
.../AdminSettings/AdminShowMailAddresses.vue | 5 ++
.../UserSettings/CalendarSettings.vue | 2 +
.../Settings/UserSettings/FeatureSettings.vue | 2 +
.../UserSettings/PerformanceSettings.vue | 2 +
.../Settings/UserSettings/StyleSettings.vue | 2 +
.../components/Settings/UserSettingsDlg.vue | 5 ++
src/js/components/Shares/ShareItem.vue | 2 +
.../components/Shares/ShareItemAllUsers.vue | 1 +
src/js/components/Shares/SharePublicAdd.vue | 2 +
src/js/components/Shares/SharesList.vue | 9 ++-
src/js/components/Shares/SharesListLocked.vue | 13 ++++-
src/js/components/Shares/SharesListUnsent.vue | 2 +
.../components/SideBar/SideBarTabActivity.vue | 11 +++-
.../components/SideBar/SideBarTabComments.vue | 14 ++++-
.../SideBar/SideBarTabConfiguration.vue | 2 +
.../components/SideBar/SideBarTabOptions.vue | 44 +++++++++++---
.../Subscription/ActionSubscription.vue | 2 +
.../components/Subscription/Subscription.vue | 2 +
src/js/components/User/UserItem.vue | 2 +-
src/js/components/User/UserMenu.vue | 2 +
src/js/components/User/UserSearch.vue | 2 +
src/js/components/VoteTable/VoteColumn.vue | 4 +-
src/js/components/VoteTable/VoteItem.vue | 1 +
src/js/components/VoteTable/VoteTable.vue | 2 +
src/js/dashboard.js | 6 --
src/js/main.js | 7 ---
src/js/mixins/dateMixins.js | 3 +
src/js/mixins/writePoll.js | 1 +
src/js/store/modules/poll.js | 1 +
src/js/store/modules/polls.js | 1 +
src/js/store/modules/votes.js | 1 +
src/js/userSettings.js | 5 --
src/js/views/AdminSettingsPage.vue | 57 ++++++++++++++-----
src/js/views/Administration.vue | 2 +
src/js/views/Combo.vue | 2 +
src/js/views/Dashboard.vue | 16 +++++-
src/js/views/Navigation.vue | 2 +
src/js/views/NotFound.vue | 13 ++++-
src/js/views/PollList.vue | 2 +
src/js/views/SideBar.vue | 2 +
src/js/views/SideBarCombo.vue | 2 +
src/js/views/UserSettingsPage.vue | 34 ++++++++---
src/js/views/Vote.vue | 1 +
110 files changed, 421 insertions(+), 73 deletions(-)
diff --git a/src/js/App.vue b/src/js/App.vue
index fcd077d73..43adf7315 100644
--- a/src/js/App.vue
+++ b/src/js/App.vue
@@ -62,7 +62,7 @@ export default {
},
useNavigation() {
- return this.getCurrentUser()
+ return getCurrentUser()
},
useSidebar() {
diff --git a/src/js/adminSettings.js b/src/js/adminSettings.js
index 0593e9839..1dbfb61c9 100644
--- a/src/js/adminSettings.js
+++ b/src/js/adminSettings.js
@@ -6,13 +6,8 @@
import Vue from 'vue'
import Vuex, { Store } from 'vuex'
import appSettings from './store/modules/appSettings.js'
-import { translate, translatePlural } from '@nextcloud/l10n'
-
import AdminSettingsPage from './views/AdminSettingsPage.vue'
-Vue.prototype.t = translate
-Vue.prototype.n = translatePlural
-
Vue.config.devtools = import.meta.env.MODE !== 'production'
Vue.use(Vuex)
diff --git a/src/js/components/Actions/modules/ActionChangeView.vue b/src/js/components/Actions/modules/ActionChangeView.vue
index d61481d9e..3f0a9e35c 100644
--- a/src/js/components/Actions/modules/ActionChangeView.vue
+++ b/src/js/components/Actions/modules/ActionChangeView.vue
@@ -23,6 +23,7 @@ import { NcButton } from '@nextcloud/vue'
import { emit } from '@nextcloud/event-bus'
import ListViewIcon from 'vue-material-design-icons/ViewListOutline.vue' // view-sequential-outline
import TableViewIcon from 'vue-material-design-icons/Table.vue' // view-comfy-outline
+import { t } from '@nextcloud/l10n'
export default {
name: 'ActionChangeView',
diff --git a/src/js/components/Actions/modules/ActionDelete.vue b/src/js/components/Actions/modules/ActionDelete.vue
index 54d7b0a47..57bd9b5bb 100644
--- a/src/js/components/Actions/modules/ActionDelete.vue
+++ b/src/js/components/Actions/modules/ActionDelete.vue
@@ -32,6 +32,7 @@ import DeleteIcon from 'vue-material-design-icons/Delete.vue'
import RestoreIcon from 'vue-material-design-icons/Recycle.vue'
import LockIcon from 'vue-material-design-icons/Lock.vue'
import UndoIcon from 'vue-material-design-icons/ArrowULeftTop.vue'
+import { t, n } from '@nextcloud/l10n'
export default {
name: 'ActionDelete',
diff --git a/src/js/components/Actions/modules/ActionDeleteOrphanedVotes.vue b/src/js/components/Actions/modules/ActionDeleteOrphanedVotes.vue
index a38aa0773..b17cad4d5 100644
--- a/src/js/components/Actions/modules/ActionDeleteOrphanedVotes.vue
+++ b/src/js/components/Actions/modules/ActionDeleteOrphanedVotes.vue
@@ -16,7 +16,7 @@
diff --git a/src/js/components/Cards/modules/CardAnonymousPollHint.vue b/src/js/components/Cards/modules/CardAnonymousPollHint.vue
index 4ee8dc108..077695c32 100644
--- a/src/js/components/Cards/modules/CardAnonymousPollHint.vue
+++ b/src/js/components/Cards/modules/CardAnonymousPollHint.vue
@@ -12,6 +12,7 @@
diff --git a/src/js/components/Cards/modules/CardClosedPoll.vue b/src/js/components/Cards/modules/CardClosedPoll.vue
index d1f94fa70..f14a41e59 100644
--- a/src/js/components/Cards/modules/CardClosedPoll.vue
+++ b/src/js/components/Cards/modules/CardClosedPoll.vue
@@ -15,6 +15,7 @@
diff --git a/src/js/components/Cards/modules/CardHiddenParticipants.vue b/src/js/components/Cards/modules/CardHiddenParticipants.vue
index ebc35edb1..aca48a0aa 100644
--- a/src/js/components/Cards/modules/CardHiddenParticipants.vue
+++ b/src/js/components/Cards/modules/CardHiddenParticipants.vue
@@ -17,6 +17,7 @@
import { mapGetters } from 'vuex'
import { CardDiv } from '../../Base/index.js'
import ActionSwitchSafeTable from '../../Actions/modules/ActionSwitchSafeTable.vue'
+import { t } from '@nextcloud/l10n'
export default {
name: 'CardHiddenParticipants',
@@ -36,5 +37,9 @@ export default {
countHiddenParticipants: 'poll/countHiddenParticipants',
}),
},
+
+ methods: {
+ t,
+ },
}
diff --git a/src/js/components/Cards/modules/CardLimitedVotes.vue b/src/js/components/Cards/modules/CardLimitedVotes.vue
index af8d03aca..18a9a2801 100644
--- a/src/js/components/Cards/modules/CardLimitedVotes.vue
+++ b/src/js/components/Cards/modules/CardLimitedVotes.vue
@@ -28,6 +28,7 @@
import { mapState } from 'vuex'
import { CardDiv } from '../../Base/index.js'
import ActionDeleteOrphanedVotes from '../../Actions/modules/ActionDeleteOrphanedVotes.vue'
+import { t, n } from '@nextcloud/l10n'
export default {
name: 'CardLimitedVotes',
@@ -61,7 +62,11 @@ export default {
cardType() {
return this.maxVotesPerUser && this.votesLeft < 1 ? 'error' : 'info'
},
+ },
+ methods: {
+ t,
+ n,
},
}
diff --git a/src/js/components/Cards/modules/CardLocked.vue b/src/js/components/Cards/modules/CardLocked.vue
index 96871cdbc..c0ba764e7 100644
--- a/src/js/components/Cards/modules/CardLocked.vue
+++ b/src/js/components/Cards/modules/CardLocked.vue
@@ -11,6 +11,7 @@
diff --git a/src/js/components/Comments/CommentAdd.vue b/src/js/components/Comments/CommentAdd.vue
index e565ee081..e9f23877c 100644
--- a/src/js/components/Comments/CommentAdd.vue
+++ b/src/js/components/Comments/CommentAdd.vue
@@ -19,6 +19,7 @@
import { mapState } from 'vuex'
import { showError } from '@nextcloud/dialogs'
import { InputDiv } from '../Base/index.js'
+import { t } from '@nextcloud/l10n'
export default {
name: 'CommentAdd',
@@ -41,6 +42,7 @@ export default {
},
methods: {
+ t,
async writeComment() {
if (this.comment) {
try {
diff --git a/src/js/components/Comments/CommentItem.vue b/src/js/components/Comments/CommentItem.vue
index 4241651e3..018d93543 100644
--- a/src/js/components/Comments/CommentItem.vue
+++ b/src/js/components/Comments/CommentItem.vue
@@ -33,6 +33,7 @@ import linkifyStr from 'linkify-string'
import { showError } from '@nextcloud/dialogs'
import { mapState } from 'vuex'
import { ActionDelete } from '../Actions/index.js'
+import { t } from '@nextcloud/l10n'
export default {
name: 'CommentItem',
@@ -62,6 +63,7 @@ export default {
},
methods: {
+ t,
linkify(subComment) {
return linkifyStr(subComment)
},
diff --git a/src/js/components/Comments/Comments.vue b/src/js/components/Comments/Comments.vue
index 16013c954..1dc10d2df 100644
--- a/src/js/components/Comments/Comments.vue
+++ b/src/js/components/Comments/Comments.vue
@@ -19,6 +19,7 @@
import CommentItem from './CommentItem.vue'
import { mapGetters, mapState } from 'vuex'
+import { t } from '@nextcloud/l10n'
export default {
name: 'Comments',
diff --git a/src/js/components/Configuration/AutoReminderInformation.vue b/src/js/components/Configuration/AutoReminderInformation.vue
index e232d2504..03c2bae18 100644
--- a/src/js/components/Configuration/AutoReminderInformation.vue
+++ b/src/js/components/Configuration/AutoReminderInformation.vue
@@ -27,9 +27,14 @@
+../stores/polls.ts
\ No newline at end of file
From 8dab1ce1c39ff55e290beb03878fd81a02f22d1d Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Sat, 8 Jun 2024 14:58:45 +0200
Subject: [PATCH 014/178] fixes and maintanance
Signed-off-by: dartcafe
---
src/App.vue | 74 +++++++++++++++++++++++++++++++++-----
src/main.js | 4 +++
src/stores/acl.ts | 13 ++++---
src/stores/activity.ts | 6 ++--
src/stores/appSettings.ts | 4 +--
src/stores/combo.ts | 6 ++--
src/stores/comments.ts | 32 +++++++++--------
src/stores/options.ts | 46 ++++++++++++++----------
src/stores/poll.ts | 51 ++++++++++++++++++--------
src/stores/preferences.ts | 10 ++----
src/stores/router.ts | 32 +++++++++++++++++
src/stores/share.ts | 28 +++++++++------
src/stores/shares.ts | 11 +++---
src/stores/subscription.ts | 21 ++++++-----
src/stores/votes.ts | 55 ++++++++++++++++------------
15 files changed, 269 insertions(+), 124 deletions(-)
create mode 100644 src/stores/router.ts
diff --git a/src/App.vue b/src/App.vue
index 43adf7315..25c9ae9f2 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -14,7 +14,6 @@
diff --git a/src/components/Actions/modules/ActionSwitchSafeTable.vue b/src/components/Actions/modules/ActionSwitchSafeTable.vue
index e0862087d..f9c69dff5 100644
--- a/src/components/Actions/modules/ActionSwitchSafeTable.vue
+++ b/src/components/Actions/modules/ActionSwitchSafeTable.vue
@@ -14,9 +14,10 @@
diff --git a/src/components/Base/modules/InputDiv.vue b/src/components/Base/modules/InputDiv.vue
index 610538562..da24f910c 100644
--- a/src/components/Base/modules/InputDiv.vue
+++ b/src/components/Base/modules/InputDiv.vue
@@ -16,14 +16,14 @@
:inputmode="inputmode"
:placeholder="placeholder"
:class="[{ 'has-modifier': useNumModifiers, 'has-submit': submit }, computedSignalingClass]"
- @input="$emit('input', $event.target.value)"
- @change="$emit('change', $event.target.value)"
- @keyup.enter="$emit('submit', $event.target.value)">
+ @input="emitValidated('input', $event.target.value)"
+ @change="emitValidated('change', $event.target.value)"
+ @keyup.enter="emitValidated('submit'), $event.target.value">
-
-
-
+
+
+
@@ -41,6 +41,7 @@ import ArrowRightIcon from 'vue-material-design-icons/ArrowRight.vue'
import CheckIcon from 'vue-material-design-icons/Check.vue'
import AlertIcon from 'vue-material-design-icons/AlertCircleOutline.vue'
import { Spinner } from '../../AppIcons/index.js'
+import { Logger } from '../../../helpers/index.js'
export default {
name: 'InputDiv',
@@ -92,14 +93,18 @@ export default {
type: Number,
default: 1,
},
- modifierMax: {
+ numMax: {
type: Number,
default: null,
},
- modifierMin: {
+ numMin: {
type: Number,
default: null,
},
+ numWrap: {
+ type: Boolean,
+ default: false,
+ },
focus: {
type: Boolean,
default: false,
@@ -143,6 +148,7 @@ export default {
if (this.focus) {
this.setFocus()
}
+ this.assertBoundaries()
},
methods: {
@@ -152,28 +158,74 @@ export default {
})
},
+ assertBoundaries() {
+ if (this.numMin && this.numMax && this.numMin >= this.numMax) {
+ Logger.warning('numMin is greater or equal than numMax. Validation will be skipped.')
+ return false
+ }
+ return true
+ },
+
add() {
- let newValue = this.value
- if (this.modifierMax && (newValue + this.modifierStepValue) > this.modifierMax) {
- if (this.modifierMin) {
- newValue = this.modifierMin
- }
- } else {
- newValue += this.modifierStepValue
+ const value = this.numWrapper(this.value + this.modifierStepValue)
+ if (value !== this.value) {
+ this.emitValidated('change', value)
}
- this.$emit('input', newValue)
},
subtract() {
- let newValue = this.value
- if (this.modifierMin && (newValue - this.modifierStepValue) < this.modifierMin) {
- if (this.modifierMax) {
- newValue = this.modifierMax
+ const value = this.numWrapper(this.value - this.modifierStepValue)
+ if (value !== this.value) {
+ this.emitValidated('change', value)
+ }
+ },
+
+ numWrapper(value) {
+ if (!this.assertBoundaries() || (this.numMax === null && this.numMin === null)) {
+ this.$emit('input', value)
+ return value
+ }
+
+ if (this.numMax && value > this.numMax) {
+ if (this.numWrap) {
+ value = this.numMin ?? 0
+ } else {
+ value = this.numMax
+ }
+ }
+
+ if (this.numMin && value < this.numMin) {
+ if (this.numWrap) {
+ value = this.numMax ?? value
+ } else {
+ value = this.numMin
}
- } else {
- newValue -= this.modifierStepValue
}
- this.$emit('input', newValue)
+
+ this.$emit('input', value)
+ return value
+ },
+
+ numCheckBoundaries(value) {
+ if (this.type === 'number' && (this.numMin !== null || this.numMax !== null)) {
+ if (this.numMax && value > this.numMax) {
+ value = this.numMax
+ }
+
+ if (this.numMin && value < this.numMin) {
+ value = this.numMin
+ }
+ }
+
+ return value
+ },
+
+ emitValidated(eventName = 'input', value) {
+ if (eventName === 'change') {
+ value = this.numCheckBoundaries(value)
+ }
+
+ this.$emit(eventName, value)
},
},
}
diff --git a/src/components/Calendar/CalendarPeek.vue b/src/components/Calendar/CalendarPeek.vue
index 5d332a3e2..4ad4f3879 100644
--- a/src/components/Calendar/CalendarPeek.vue
+++ b/src/components/Calendar/CalendarPeek.vue
@@ -24,7 +24,7 @@
diff --git a/src/components/Combo/VoteItem.vue b/src/components/Combo/VoteItem.vue
index ee4096650..22d07221f 100644
--- a/src/components/Combo/VoteItem.vue
+++ b/src/components/Combo/VoteItem.vue
@@ -10,8 +10,9 @@
diff --git a/src/components/Configuration/ConfigAnonymous.vue b/src/components/Configuration/ConfigAnonymous.vue
index a2485aa55..16475a2d8 100644
--- a/src/components/Configuration/ConfigAnonymous.vue
+++ b/src/components/Configuration/ConfigAnonymous.vue
@@ -4,15 +4,18 @@
-->
-
+
{{ t('polls', 'Anonymous poll') }}
diff --git a/src/components/Configuration/ConfigOptionLimit.vue b/src/components/Configuration/ConfigOptionLimit.vue
index b60dba9f6..7954d148b 100644
--- a/src/components/Configuration/ConfigOptionLimit.vue
+++ b/src/components/Configuration/ConfigOptionLimit.vue
@@ -5,31 +5,37 @@
-
+
{{ t('polls', 'Limit "Yes" votes per option') }}
-
+ :num-min="1"
+ use-num-modifiers
+ @change="pollStore.write()" />
+ :checked.sync="pollStore.configuration.hideBookedUp"
+ type="switch"
+ @change="pollsStore.write()">
{{ t('polls', 'Hide not available Options') }}
diff --git a/src/components/Configuration/ConfigProposals.vue b/src/components/Configuration/ConfigProposals.vue
index 3c173b5bf..f3bb20892 100644
--- a/src/components/Configuration/ConfigProposals.vue
+++ b/src/components/Configuration/ConfigProposals.vue
@@ -9,20 +9,20 @@
{{ t('polls', 'Allow Proposals') }}
-
+
{{ t('polls', 'Proposal closing date') }}
-
+
diff --git a/src/components/Configuration/ConfigShowResults.vue b/src/components/Configuration/ConfigShowResults.vue
index 12fedf046..617f67b1c 100644
--- a/src/components/Configuration/ConfigShowResults.vue
+++ b/src/components/Configuration/ConfigShowResults.vue
@@ -5,14 +5,16 @@
-
+
diff --git a/src/components/Configuration/ConfigTitle.vue b/src/components/Configuration/ConfigTitle.vue
index 2b7576a03..ef8f48e40 100644
--- a/src/components/Configuration/ConfigTitle.vue
+++ b/src/components/Configuration/ConfigTitle.vue
@@ -7,12 +7,13 @@
+ @change="pollStore.write()" />
diff --git a/src/components/Create/CreateDlg.vue b/src/components/Create/CreateDlg.vue
index dec66dd0a..0ffd73ee0 100644
--- a/src/components/Create/CreateDlg.vue
+++ b/src/components/Create/CreateDlg.vue
@@ -41,13 +41,14 @@
diff --git a/src/components/Settings/AdminSettings/AdminLegal.vue b/src/components/Settings/AdminSettings/AdminLegal.vue
index 6ee6d5ae6..2bc793e49 100644
--- a/src/components/Settings/AdminSettings/AdminLegal.vue
+++ b/src/components/Settings/AdminSettings/AdminLegal.vue
@@ -9,26 +9,26 @@
{{ t('polls', 'If you use different legal terms and privacy policy for public polls, enter the links below. Leave empty to use your default terms.') }}
-
+ @change="appSettingsStore.write()" />
-
+ @change="appSettingsStore.write()" />
diff --git a/src/components/Settings/AdminSettings/AdminPerformance.vue b/src/components/Settings/AdminSettings/AdminPerformance.vue
index c551e0368..ea2d4d357 100644
--- a/src/components/Settings/AdminSettings/AdminPerformance.vue
+++ b/src/components/Settings/AdminSettings/AdminPerformance.vue
@@ -5,14 +5,15 @@
-
+
diff --git a/src/components/Settings/AdminSettings/AdminPollCreation.vue b/src/components/Settings/AdminSettings/AdminPollCreation.vue
index 68a6f95f8..498d53a7a 100644
--- a/src/components/Settings/AdminSettings/AdminPollCreation.vue
+++ b/src/components/Settings/AdminSettings/AdminPollCreation.vue
@@ -5,11 +5,13 @@
-
+
{{ t('polls', 'Enable the poll creation globally') }}
-
-
+
diff --git a/src/components/Settings/UserSettings/PerformanceSettings.vue b/src/components/Settings/UserSettings/PerformanceSettings.vue
index ff30cd6eb..02698e965 100644
--- a/src/components/Settings/UserSettings/PerformanceSettings.vue
+++ b/src/components/Settings/UserSettings/PerformanceSettings.vue
@@ -11,21 +11,23 @@
{{ t('polls', 'If this threshold gets trespassed, only the current participant will be displayed, to avoid a performance breakdown.') }}
{{ t('polls', 'The default threshold of 1000 should be a good and safe value.') }}
-
+ :num-min="200"
+ @change="preferencesStore.write()" />
diff --git a/src/components/Settings/UserSettings/StyleSettings.vue b/src/components/Settings/UserSettings/StyleSettings.vue
index 029045d5b..744a27dfe 100644
--- a/src/components/Settings/UserSettings/StyleSettings.vue
+++ b/src/components/Settings/UserSettings/StyleSettings.vue
@@ -7,12 +7,16 @@
{{ t('polls', 'The style settings are still experimental!') }}
-
+
{{ t('polls', 'Use alternative styling for the comments sidebar') }}
-
+
{{ t('polls', 'Use alternative vote page styling') }}
@@ -21,9 +25,10 @@
diff --git a/src/components/Settings/UserSettingsDlg.vue b/src/components/Settings/UserSettingsDlg.vue
index 7a944d377..0c4f6a8bd 100644
--- a/src/components/Settings/UserSettingsDlg.vue
+++ b/src/components/Settings/UserSettingsDlg.vue
@@ -29,6 +29,8 @@ import { NcAppSettingsDialog, NcAppSettingsSection } from '@nextcloud/vue'
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { CalendarSettings, FeatureSettings, StyleSettings, PerformanceSettings } from './UserSettings/index.js'
import { t } from '@nextcloud/l10n'
+import { mapStores } from 'pinia'
+import { usePreferencesStore } from '../../stores/preferences.ts'
export default {
name: 'UserSettingsDlg',
@@ -48,11 +50,14 @@ export default {
}
},
+ computed: {
+ ...mapStores(usePreferencesStore),
+ },
watch: {
async show() {
if (this.show === true) {
- this.$store.dispatch('settings/get')
- this.$store.dispatch('settings/getCalendars')
+ this.preferencesStore.get()
+ this.preferencesStore.getCalendars()
}
},
},
diff --git a/src/components/Shares/ShareItem.vue b/src/components/Shares/ShareItem.vue
index 3ee97e9bb..a03a52c8f 100644
--- a/src/components/Shares/ShareItem.vue
+++ b/src/components/Shares/ShareItem.vue
@@ -52,7 +52,7 @@
+ @click="sharesStore.switchAdmin({ share: share })">
@@ -83,7 +83,7 @@
name="publicPollEmail"
value="optional"
:checked="share.publicPollEmail === 'optional'"
- @change="setPublicPollEmail({ share, value: 'optional' })">
+ @change="sharesStore.setPublicPollEmail({ share, value: 'optional' })">
{{ t('polls', 'Email address is optional') }}
@@ -91,7 +91,7 @@
name="publicPollEmail"
value="mandatory"
:checked="share.publicPollEmail === 'mandatory'"
- @change="setPublicPollEmail({ share, value: 'mandatory' })">
+ @change="sharesStore.setPublicPollEmail({ share, value: 'mandatory' })">
{{ t('polls', 'Email address is mandatory') }}
@@ -99,7 +99,7 @@
name="publicPollEmail"
value="disabled"
:checked="share.publicPollEmail === 'disabled'"
- @change="setPublicPollEmail({ share, value: 'disabled' })">
+ @change="sharesStore.setPublicPollEmail({ share, value: 'disabled' })">
{{ t('polls', 'Do not ask for an email address') }}
+ @click="sharesStore.delete({ share })">
@@ -122,7 +122,7 @@
+ @click="sharesStore.restore({ share })">
@@ -134,7 +134,7 @@
diff --git a/src/components/Shares/SharePublicAdd.vue b/src/components/Shares/SharePublicAdd.vue
index 9325747a9..58fe72f74 100644
--- a/src/components/Shares/SharePublicAdd.vue
+++ b/src/components/Shares/SharePublicAdd.vue
@@ -23,12 +23,13 @@
diff --git a/src/components/Shares/SharesListUnsent.vue b/src/components/Shares/SharesListUnsent.vue
index 9115b3e59..c6fc2696d 100644
--- a/src/components/Shares/SharesListUnsent.vue
+++ b/src/components/Shares/SharesListUnsent.vue
@@ -4,7 +4,7 @@
-->
-
+
@@ -22,7 +22,7 @@
name="list"
:css="false"
class="shares-list">
-
@@ -30,7 +30,7 @@
diff --git a/src/components/SideBar/SideBarTabOptions.vue b/src/components/SideBar/SideBarTabOptions.vue
index 5ad73ba12..49c646875 100644
--- a/src/components/SideBar/SideBarTabOptions.vue
+++ b/src/components/SideBar/SideBarTabOptions.vue
@@ -5,7 +5,7 @@
-
@@ -14,14 +14,14 @@
-
+
-
+
@@ -29,11 +29,11 @@
-
+
-
+
@@ -41,14 +41,14 @@
-
+
diff --git a/src/components/Subscription/ActionSubscription.vue b/src/components/Subscription/ActionSubscription.vue
index 80e416e25..2ce94076a 100644
--- a/src/components/Subscription/ActionSubscription.vue
+++ b/src/components/Subscription/ActionSubscription.vue
@@ -5,14 +5,16 @@
-
+
diff --git a/src/components/Subscription/Subscription.vue b/src/components/Subscription/Subscription.vue
index f4f9629ef..d373fbd37 100644
--- a/src/components/Subscription/Subscription.vue
+++ b/src/components/Subscription/Subscription.vue
@@ -5,16 +5,20 @@
-
+
{{ label }}
diff --git a/src/components/User/ActionInputDisplayName.vue b/src/components/User/ActionInputDisplayName.vue
new file mode 100644
index 000000000..da95c81b6
--- /dev/null
+++ b/src/components/User/ActionInputDisplayName.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+ {{ inputProps.label }}
+
+
+
+
diff --git a/src/components/User/ActionInputEmailAddress.vue b/src/components/User/ActionInputEmailAddress.vue
new file mode 100644
index 000000000..74fca0048
--- /dev/null
+++ b/src/components/User/ActionInputEmailAddress.vue
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+ {{ inputProps.label }}
+
+
+
+
diff --git a/src/components/User/UserMenu.vue b/src/components/User/UserMenu.vue
index 8f688c5fb..04da7d320 100644
--- a/src/components/User/UserMenu.vue
+++ b/src/components/User/UserMenu.vue
@@ -17,56 +17,32 @@
-
-
-
-
- {{ t('polls', 'Edit Email Address') }}
-
-
-
-
-
- {{ t('polls', 'Change name') }}
-
+
+
-
{{ t('polls', 'Subscribe to notifications') }}
-
-
@@ -74,7 +50,7 @@
-
@@ -83,8 +59,8 @@
@@ -94,38 +70,24 @@
diff --git a/src/views/Administration.vue b/src/views/Administration.vue
index 41d7c23cf..aafe5f3b3 100644
--- a/src/views/Administration.vue
+++ b/src/views/Administration.vue
@@ -9,7 +9,7 @@
{{ t('polls', 'Administrative poll management') }}
- {{ t('polls', 'Manage polls of other accounts. You can take over the ownership or delete polls.') }}
+ {{ t('polls', 'Manage polls of other accounts. You can take over the ownership or delete pollsStore.') }}
@@ -18,7 +18,7 @@
:header="true"
:sort="sort"
:reverse="reverse"
- @sort-list="setSort($event)" />
+ @sort-list="pollsAdminStore.setSort($event)" />
-
+
@@ -115,7 +115,7 @@
diff --git a/src/views/Combo.vue b/src/views/Combo.vue
index 3621904b3..d0208877c 100644
--- a/src/views/Combo.vue
+++ b/src/views/Combo.vue
@@ -18,9 +18,9 @@
-
+
-
@@ -34,7 +34,6 @@
diff --git a/src/views/Vote.vue b/src/views/Vote.vue
index 6740947ac..468174292 100644
--- a/src/views/Vote.vue
+++ b/src/views/Vote.vue
@@ -4,10 +4,10 @@
-->
-
+
-
@@ -50,7 +50,7 @@
diff --git a/src/components/Options/OptionItemOwner.vue b/src/components/Options/OptionItemOwner.vue
index d3704b86a..848a3fb28 100644
--- a/src/components/Options/OptionItemOwner.vue
+++ b/src/components/Options/OptionItemOwner.vue
@@ -27,7 +27,7 @@ import { ActionDelete } from '../Actions/index.js'
import UserItem from '../User/UserItem.vue'
import { t } from '@nextcloud/l10n'
import { usePollStore } from '../../stores/poll.ts'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { useOptionsStore } from '../../stores/options.ts'
export default {
@@ -50,10 +50,10 @@ export default {
},
computed: {
- ...mapStores(usePollStore, useAclStore, useOptionsStore),
+ ...mapStores(usePollStore, useSessionStore, useOptionsStore),
showDelete() {
- return !this.pollStore.permissions.edit && this.aclStore.currentUser.userId === this.option.owner.userId
+ return !this.pollStore.permissions.edit && this.sessionStore.currentUser.userId === this.option.owner.userId
},
showOwner() {
diff --git a/src/components/Poll/PollHeaderButtons.vue b/src/components/Poll/PollHeaderButtons.vue
index 5b820879b..1b3397a1b 100644
--- a/src/components/Poll/PollHeaderButtons.vue
+++ b/src/components/Poll/PollHeaderButtons.vue
@@ -18,7 +18,7 @@
-
+
@@ -33,6 +33,8 @@ import UserMenu from '../User/UserMenu.vue'
import ExportPoll from '../Export/ExportPoll.vue'
import { t } from '@nextcloud/l10n'
import { usePollStore } from '../../stores/poll.ts'
+import { useSessionStore } from '../../stores/session.ts'
+
export default {
name: 'PollHeaderButtons',
@@ -53,7 +55,7 @@ export default {
},
computed: {
- ...mapStores(usePollStore),
+ ...mapStores(usePollStore, useSessionStore),
showUserMenu() {
return this.$route.name !== 'publicVote' || this.pollStore.permissions.vote || this.pollStore.permissions.subscribe
diff --git a/src/components/Poll/PollInformation.vue b/src/components/Poll/PollInformation.vue
index 10eec67ee..6309b254c 100644
--- a/src/components/Poll/PollInformation.vue
+++ b/src/components/Poll/PollInformation.vue
@@ -229,7 +229,7 @@ export default {
return this.votesStore.countAllVotesByAnswer('maybe')
},
countUsedVotes() {
- return this.pollStore.configuration.maxVotesPerUser - this.currentUserStatus.yesVotes
+ return this.pollStore.configuration.maxVotesPerUser - this.pollStore.currentUserStatus.yesVotes
},
},
diff --git a/src/components/Public/PublicRegisterModal.vue b/src/components/Public/PublicRegisterModal.vue
index f0521bf50..5c5551b9b 100644
--- a/src/components/Public/PublicRegisterModal.vue
+++ b/src/components/Public/PublicRegisterModal.vue
@@ -30,15 +30,15 @@
{{ t('polls', 'Remember me for 30 days') }}
-
+
-
+
{{ t('polls', 'Registered accounts') }}
@@ -88,7 +88,7 @@ import { SimpleLink, setCookie } from '../../helpers/index.js'
import { ValidatorAPI, PublicAPI } from '../../Api/index.js'
import { t } from '@nextcloud/l10n'
import { useShareStore } from '../../stores/share.ts'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { usePollStore } from '../../stores/poll.ts'
const COOKIE_LIFETIME = 30
@@ -119,7 +119,7 @@ export default {
},
computed: {
- ...mapStores(useShareStore, useAclStore, usePollStore),
+ ...mapStores(useShareStore, useSessionStore, usePollStore),
registrationIsValid() {
return this.checkStatus.userName === 'valid' && (this.checkStatus.email === 'valid' || (this.emailAddress.length === 0 && this.shareStore.publicPollEmail !== 'mandatory'))
@@ -135,7 +135,7 @@ export default {
privacyPolicy: {
component: SimpleLink,
props: {
- href: this.aclStore.appSettings.usePrivacyUrl,
+ href: this.sessionStore.appSettings.usePrivacyUrl,
name: t('polls', 'privacy policy'),
target: '_blank',
},
diff --git a/src/components/Settings/AdminSettings/AdminActivities.vue b/src/components/Settings/AdminSettings/AdminActivities.vue
index a6efbee27..6e8a8103c 100644
--- a/src/components/Settings/AdminSettings/AdminActivities.vue
+++ b/src/components/Settings/AdminSettings/AdminActivities.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable the tracking of activities with the Activities app') }}
diff --git a/src/components/Settings/AdminSettings/AdminArchivePolls.vue b/src/components/Settings/AdminSettings/AdminArchivePolls.vue
index 96ced4c01..9821f782d 100644
--- a/src/components/Settings/AdminSettings/AdminArchivePolls.vue
+++ b/src/components/Settings/AdminSettings/AdminArchivePolls.vue
@@ -5,7 +5,8 @@
-
+
{{ t('polls', 'Enable the automatic poll archiving') }}
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable the usage of the combo view globally') }}
@@ -19,6 +19,7 @@
:multiple="true"
:loading="isLoading"
:placeholder="t('polls', 'Leave empty to disable globally')"
+ @option:selected="appSettingsStore.write()"
@search="loadGroups" />
diff --git a/src/components/Settings/AdminSettings/AdminEmail.vue b/src/components/Settings/AdminSettings/AdminEmail.vue
index f43f84191..1c1f40d36 100644
--- a/src/components/Settings/AdminSettings/AdminEmail.vue
+++ b/src/components/Settings/AdminSettings/AdminEmail.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Add terms links also to the email footer') }}
diff --git a/src/components/Settings/AdminSettings/AdminLegal.vue b/src/components/Settings/AdminSettings/AdminLegal.vue
index 2bc793e49..13497c783 100644
--- a/src/components/Settings/AdminSettings/AdminLegal.vue
+++ b/src/components/Settings/AdminSettings/AdminLegal.vue
@@ -20,6 +20,7 @@
inputmode="url"
:label="t('polls', 'Legal terms link:')"
:placeholder="placeholder.imprint"
+ @option:selected="appSettingsStore.write()"
@change="appSettingsStore.write()" />
diff --git a/src/components/Settings/AdminSettings/AdminPerformance.vue b/src/components/Settings/AdminSettings/AdminPerformance.vue
index ea2d4d357..d56cf35f4 100644
--- a/src/components/Settings/AdminSettings/AdminPerformance.vue
+++ b/src/components/Settings/AdminSettings/AdminPerformance.vue
@@ -5,7 +5,8 @@
-
+
diff --git a/src/components/Settings/AdminSettings/AdminPollCreation.vue b/src/components/Settings/AdminSettings/AdminPollCreation.vue
index 498d53a7a..9a0ecf7ff 100644
--- a/src/components/Settings/AdminSettings/AdminPollCreation.vue
+++ b/src/components/Settings/AdminSettings/AdminPollCreation.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable the poll creation globally') }}
@@ -19,6 +19,7 @@
:multiple="true"
:loading="isLoading"
:placeholder="t('polls', 'Leave empty to disable globally')"
+ @option:selected="appSettingsStore.write()"
@search="loadGroups" />
diff --git a/src/components/Settings/AdminSettings/AdminPollDownload.vue b/src/components/Settings/AdminSettings/AdminPollDownload.vue
index 026a2d532..7f06e43f9 100644
--- a/src/components/Settings/AdminSettings/AdminPollDownload.vue
+++ b/src/components/Settings/AdminSettings/AdminPollDownload.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable the spreadsheet download of polls globally') }}
@@ -19,6 +19,7 @@
:multiple="true"
:loading="isLoading"
:placeholder="t('polls', 'Leave empty to disable globally')"
+ @option:selected="appSettingsStore.write()"
@search="loadGroups" />
diff --git a/src/components/Settings/AdminSettings/AdminPollsInNavigation.vue b/src/components/Settings/AdminSettings/AdminPollsInNavigation.vue
index eddfcac25..655e8fb1f 100644
--- a/src/components/Settings/AdminSettings/AdminPollsInNavigation.vue
+++ b/src/components/Settings/AdminSettings/AdminPollsInNavigation.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Load polls into the navigation.') }}
diff --git a/src/components/Settings/AdminSettings/AdminShareOpenPoll.vue b/src/components/Settings/AdminSettings/AdminShareOpenPoll.vue
index 7fa441c6b..b94e7fb7e 100644
--- a/src/components/Settings/AdminSettings/AdminShareOpenPoll.vue
+++ b/src/components/Settings/AdminSettings/AdminShareOpenPoll.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable the creation of openly accessible polls globally') }}
diff --git a/src/components/Settings/AdminSettings/AdminSharePublicCreate.vue b/src/components/Settings/AdminSettings/AdminSharePublicCreate.vue
index c8c4dfdd7..9bf26b430 100644
--- a/src/components/Settings/AdminSettings/AdminSharePublicCreate.vue
+++ b/src/components/Settings/AdminSettings/AdminSharePublicCreate.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable public shares of polls globally') }}
diff --git a/src/components/Settings/AdminSettings/AdminSharePublicShowLogin.vue b/src/components/Settings/AdminSettings/AdminSharePublicShowLogin.vue
index 204c3fbc9..e7140695c 100644
--- a/src/components/Settings/AdminSettings/AdminSharePublicShowLogin.vue
+++ b/src/components/Settings/AdminSettings/AdminSharePublicShowLogin.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Enable the login option in the registration dialog of public polls') }}
diff --git a/src/components/Settings/AdminSettings/AdminShowMailAddresses.vue b/src/components/Settings/AdminSettings/AdminShowMailAddresses.vue
index 2815abe1e..403260b0c 100644
--- a/src/components/Settings/AdminSettings/AdminShowMailAddresses.vue
+++ b/src/components/Settings/AdminSettings/AdminShowMailAddresses.vue
@@ -7,7 +7,7 @@
+ @update:checked="appSettingsStore.write()">
{{ t('polls', 'Show email addresses of internal accounts') }}
@@ -19,6 +19,7 @@
:multiple="true"
:loading="isLoading"
:placeholder="t('polls', 'Leave empty to disable globally.')"
+ @option:selected="appSettingsStore.write()"
@search="loadGroups" />
diff --git a/src/components/Settings/UserSettings/CalendarSettings.vue b/src/components/Settings/UserSettings/CalendarSettings.vue
index 87757d9a6..906bc5b23 100644
--- a/src/components/Settings/UserSettings/CalendarSettings.vue
+++ b/src/components/Settings/UserSettings/CalendarSettings.vue
@@ -6,13 +6,13 @@
-
+ @update:checked="preferencesStore.write()">
{{ t('polls', 'Use calendar lookup for conflicting calendar events') }}
-
+
{{ t('polls', 'Select the calendars to use for lookup.') }}
@@ -27,24 +27,24 @@
-
-
@@ -76,7 +76,7 @@ export default {
key: calendar.key.toString(),
name: calendar.name,
displayColor: calendar.displayColor,
- selected: this.preferencesStore.checkCalendars.includes(calendar.key.toString()),
+ selected: this.preferencesStore.user.checkCalendars.includes(calendar.key.toString()),
}), this)
},
@@ -85,10 +85,10 @@ export default {
methods: {
t,
async clickedCalendar(calendar) {
- if (this.preferencesStore.checkCalendars.includes(calendar.key)) {
- await this.writePreference({ checkCalendars: this.preferencesStore.checkCalendars.filter((item) => item !== calendar.key.toString()) })
+ if (this.preferencesStore.user.checkCalendars.includes(calendar.key)) {
+ this.preferencesStore.removeCheckCalendar(calendar)
} else {
- await this.preferencesStore.addCheckCalendar(calendar)
+ this.preferencesStore.addCheckCalendar(calendar)
}
},
},
diff --git a/src/components/Settings/UserSettings/FeatureSettings.vue b/src/components/Settings/UserSettings/FeatureSettings.vue
index e0dc0ed60..1bdb65704 100644
--- a/src/components/Settings/UserSettings/FeatureSettings.vue
+++ b/src/components/Settings/UserSettings/FeatureSettings.vue
@@ -6,9 +6,9 @@
-
+ @update:checked="preferencesStore.write()">
{{ t('polls', 'Text polls default to list view') }}
@@ -17,9 +17,9 @@
-
+ @update:checked="preferencesStore.write()">
{{ t('polls', 'Date polls default to list view') }}
@@ -28,7 +28,7 @@
-
+ @update:checked="preferencesStore.write()">
{{ t('polls', 'Use alternative styling for the comments sidebar') }}
+ @update:checked="preferencesStore.write()">
{{ t('polls', 'Use alternative vote page styling') }}
diff --git a/src/components/Settings/UserSettingsDlg.vue b/src/components/Settings/UserSettingsDlg.vue
index 0c4f6a8bd..8bd53baba 100644
--- a/src/components/Settings/UserSettingsDlg.vue
+++ b/src/components/Settings/UserSettingsDlg.vue
@@ -56,7 +56,7 @@ export default {
watch: {
async show() {
if (this.show === true) {
- this.preferencesStore.get()
+ this.preferencesStore.load()
this.preferencesStore.getCalendars()
}
},
diff --git a/src/components/Shares/SharesList.vue b/src/components/Shares/SharesList.vue
index 423071a55..942cc28fc 100644
--- a/src/components/Shares/SharesList.vue
+++ b/src/components/Shares/SharesList.vue
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/src/components/SideBar/SideBarTabComments.vue b/src/components/SideBar/SideBarTabComments.vue
index 082fd6d2d..625b4c7fe 100644
--- a/src/components/SideBar/SideBarTabComments.vue
+++ b/src/components/SideBar/SideBarTabComments.vue
@@ -24,6 +24,7 @@ import CommentsIcon from 'vue-material-design-icons/CommentProcessing.vue'
import { t } from '@nextcloud/l10n'
import { usePollStore } from '../../stores/poll.ts'
import { useCommentsStore } from '../../stores/comments.ts'
+import { subscribe, unsubscribe } from '@nextcloud/event-bus'
export default {
name: 'SideBarTabComments',
@@ -49,8 +50,14 @@ export default {
showEmptyContent() {
return this.commentsStore.list.length === 0
},
+ },
+ created() {
+ subscribe('polls:comments:update', this.commentsStore.load())
},
+ beforeDestroy() {
+ unsubscribe('polls:comments:update')
+ },
}
diff --git a/src/components/SideBar/SideBarTabConfiguration.vue b/src/components/SideBar/SideBarTabConfiguration.vue
index d94728456..60b22159c 100644
--- a/src/components/SideBar/SideBarTabConfiguration.vue
+++ b/src/components/SideBar/SideBarTabConfiguration.vue
@@ -9,7 +9,7 @@
{{ t('polls', 'Please be careful when changing options, because it can affect existing votes in an unwanted manner.') }}
-
+
{{ t('polls', 'As an admin you may edit this poll') }}
@@ -113,7 +113,7 @@ import RestorePollIcon from 'vue-material-design-icons/Recycle.vue'
import ArchivePollIcon from 'vue-material-design-icons/Archive.vue'
import { t } from '@nextcloud/l10n'
import { usePollStore } from '../../stores/poll.ts'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { useVotesStore } from '../../stores/votes.ts'
export default {
@@ -148,7 +148,7 @@ export default {
},
computed: {
- ...mapStores(usePollStore, useAclStore, useVotesStore),
+ ...mapStores(usePollStore, useSessionStore, useVotesStore),
},
methods: {
diff --git a/src/components/SideBar/SideBarTabOptions.vue b/src/components/SideBar/SideBarTabOptions.vue
index 49c646875..cbf095472 100644
--- a/src/components/SideBar/SideBarTabOptions.vue
+++ b/src/components/SideBar/SideBarTabOptions.vue
@@ -5,7 +5,7 @@
-
@@ -61,9 +61,10 @@ import TextOptionsIcon from 'vue-material-design-icons/FormatListBulletedSquare.
import OptionsDateAdd from '../Options/OptionsDateAdd.vue'
import OptionsTextAddBulk from '../Options/OptionsTextAddBulk.vue'
import { t } from '@nextcloud/l10n'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { useOptionsStore } from '../../stores/options.ts'
import { usePollStore } from '../../stores/poll.ts'
+import { subscribe, unsubscribe } from '@nextcloud/event-bus'
export default {
name: 'SideBarTabOptions',
@@ -110,8 +111,17 @@ export default {
},
computed: {
- ...mapStores(useAclStore, useOptionsStore, usePollStore),
+ ...mapStores(useSessionStore, useOptionsStore, usePollStore),
},
+
+ created() {
+ subscribe('polls:options:update', this.optionsStore.load())
+ },
+
+ beforeDestroy() {
+ unsubscribe('polls:options:update')
+ },
+
}
diff --git a/src/components/SideBar/SideBarTabShare.vue b/src/components/SideBar/SideBarTabShare.vue
index 1c81aad89..6f4104189 100644
--- a/src/components/SideBar/SideBarTabShare.vue
+++ b/src/components/SideBar/SideBarTabShare.vue
@@ -15,6 +15,9 @@
import SharesList from '../Shares/SharesList.vue'
import SharesListUnsent from '../Shares/SharesListUnsent.vue'
import SharesListLocked from '../Shares/SharesListLocked.vue'
+import { subscribe, unsubscribe } from '@nextcloud/event-bus'
+import { useSharesStore } from '../../stores/shares.ts'
+import { mapStores } from 'pinia'
export default {
name: 'SideBarTabShare',
@@ -24,6 +27,18 @@ export default {
SharesListUnsent,
SharesListLocked,
},
+ computed: {
+ ...mapStores(useSharesStore),
+ },
+
+ created() {
+ subscribe('polls:change:shares', this.sharesStore.load())
+ },
+
+ beforeDestroy() {
+ unsubscribe('polls:change:shares')
+ },
+
}
diff --git a/src/components/User/ActionInputDisplayName.vue b/src/components/User/ActionInputDisplayName.vue
index da95c81b6..eb7878a5e 100644
--- a/src/components/User/ActionInputDisplayName.vue
+++ b/src/components/User/ActionInputDisplayName.vue
@@ -24,7 +24,7 @@ import { mapStores } from 'pinia'
import EditAccountIcon from 'vue-material-design-icons/AccountEdit.vue'
import { ValidatorAPI } from '../../Api/index.js'
import { t } from '@nextcloud/l10n'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { useShareStore } from '../../stores/share.ts'
const setError = (inputProps) => {
@@ -65,7 +65,7 @@ export default {
},
computed: {
- ...mapStores(useAclStore, useShareStore),
+ ...mapStores(useSessionStore, useShareStore),
},
@@ -77,7 +77,7 @@ export default {
return
}
- if (this.shareStore.displayName === this.aclStore.currentUser.displayName) {
+ if (this.shareStore.displayName === this.sessionStore.currentUser.displayName) {
setUnchanged(inputProps)
return
}
diff --git a/src/components/User/ActionInputEmailAddress.vue b/src/components/User/ActionInputEmailAddress.vue
index 74fca0048..c38605265 100644
--- a/src/components/User/ActionInputEmailAddress.vue
+++ b/src/components/User/ActionInputEmailAddress.vue
@@ -24,7 +24,7 @@ import { mapStores } from 'pinia'
import EditEmailIcon from 'vue-material-design-icons/EmailEditOutline.vue'
import { ValidatorAPI } from '../../Api/index.js'
import { t } from '@nextcloud/l10n'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { useShareStore } from '../../stores/share.ts'
const setError = (inputProps) => {
@@ -65,14 +65,14 @@ export default {
},
computed: {
- ...mapStores(useAclStore, useShareStore),
+ ...mapStores(useSessionStore, useShareStore),
},
methods: {
validate: debounce(async function() {
const inputProps = this.inputProps
- if (this.shareStore.emailAddress === this.aclStore.currentUser.emailAddress) {
+ if (this.shareStore.emailAddress === this.sessionStore.currentUser.emailAddress) {
setUnchanged(inputProps)
return
}
diff --git a/src/components/User/UserMenu.vue b/src/components/User/UserMenu.vue
index 04da7d320..814511092 100644
--- a/src/components/User/UserMenu.vue
+++ b/src/components/User/UserMenu.vue
@@ -59,8 +59,8 @@
@@ -82,7 +82,7 @@ import LogoutIcon from 'vue-material-design-icons/Logout.vue'
import { deleteCookieByValue, findCookieByValue } from '../../helpers/index.js'
import { PollsAPI } from '../../Api/index.js'
import { t } from '@nextcloud/l10n'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { usePollStore } from '../../stores/poll.ts'
import { useShareStore } from '../../stores/share.ts'
import { useSubscriptionStore } from '../../stores/subscription.ts'
@@ -108,7 +108,7 @@ export default {
},
computed: {
- ...mapStores(useAclStore, usePollStore, useShareStore, useSubscriptionStore),
+ ...mapStores(useSessionStore, usePollStore, useShareStore, useSubscriptionStore),
hasCookie() {
return !!findCookieByValue(this.$route.params.token)
diff --git a/src/components/VoteTable/VoteColumn.vue b/src/components/VoteTable/VoteColumn.vue
index 639758656..fb29e4b9a 100644
--- a/src/components/VoteTable/VoteColumn.vue
+++ b/src/components/VoteTable/VoteColumn.vue
@@ -56,7 +56,7 @@ import { t } from '@nextcloud/l10n'
import { getCurrentUser } from '@nextcloud/auth'
import { usePollStore } from '../../stores/poll.ts'
import { usePreferencesStore } from '../../stores/preferences.ts'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { useVotesStore } from '../../stores/votes.ts'
import { useOptionsStore } from '../../stores/options.ts'
@@ -89,7 +89,7 @@ export default {
},
computed: {
- ...mapStores(usePollStore, usePreferencesStore, useAclStore, useVotesStore, useOptionsStore),
+ ...mapStores(usePollStore, usePreferencesStore, useSessionStore, useVotesStore, useOptionsStore),
componentClass() {
const classList = ['vote-column']
@@ -112,7 +112,7 @@ export default {
ownAnswer() {
return this.votesStore.getVote({
- userId: this.aclStore.currentUser.userId,
+ userId: this.sessionStore.currentUser.userId,
option: this.option,
}).answer
},
diff --git a/src/components/VoteTable/VoteItem.vue b/src/components/VoteTable/VoteItem.vue
index d5b11ae7b..24a861b16 100644
--- a/src/components/VoteTable/VoteItem.vue
+++ b/src/components/VoteTable/VoteItem.vue
@@ -17,7 +17,7 @@ import { mapStores } from 'pinia'
import { showSuccess, showError } from '@nextcloud/dialogs'
import VoteIndicator from './VoteIndicator.vue'
import { t } from '@nextcloud/l10n'
-import { useAclStore } from '../../stores/acl.ts'
+import { useSessionStore } from '../../stores/session.ts'
import { usePollStore } from '../../stores/poll.ts'
import { useVotesStore } from '../../stores/votes.ts'
@@ -40,7 +40,7 @@ export default {
},
computed: {
- ...mapStores(usePollStore, useVotesStore, useAclStore),
+ ...mapStores(usePollStore, useVotesStore, useSessionStore),
isVotable() {
return this.isActive
@@ -54,7 +54,7 @@ export default {
},
isCurrentUser() {
- return this.aclStore.currentUser.userId === this.userId
+ return this.sessionStore.currentUser.userId === this.userId
},
answer() {
diff --git a/src/components/VoteTable/VoteTable.vue b/src/components/VoteTable/VoteTable.vue
index fc854242e..994ce68be 100644
--- a/src/components/VoteTable/VoteTable.vue
+++ b/src/components/VoteTable/VoteTable.vue
@@ -12,7 +12,7 @@
+ :class="['participant', {currentuser: (participant.userId === sessionStore.currentUser.userId) }]">
h(App),
-}).$mount('#content')
+})
+app.$mount('#content')
diff --git a/src/mixins/watchPolls.js b/src/mixins/watchPolls.js
index 602583bd5..533409de9 100644
--- a/src/mixins/watchPolls.js
+++ b/src/mixins/watchPolls.js
@@ -5,10 +5,9 @@
*/
import { InvalidJSON } from '../Exceptions/Exceptions.js'
import { PollsAPI, PublicAPI } from '../Api/index.js'
-import { emit } from '@nextcloud/event-bus'
import { Logger } from '../helpers/index.js'
import { mapStores } from 'pinia'
-import { useAclStore } from '../stores/acl.ts'
+import { useSessionStore } from '../stores/session.ts'
const SLEEP_TIMEOUT_DEFAULT = 30
const MAX_TRIES = 5
@@ -26,10 +25,10 @@ export const watchPolls = {
},
computed: {
- ...mapStores(useAclStore),
+ ...mapStores(useSessionStore),
watchDisabled() {
- return this.aclStore.appSettings.updateType === 'noPolling'
+ return this.sessionStore.appSettings.updateType === 'noPolling'
|| this.retryCounter === null
|| this.retryCounter >= MAX_TRIES
},
@@ -48,8 +47,6 @@ export const watchPolls = {
response.data.updates.forEach((item) => {
this.lastUpdated = Math.max(item.updated, this.lastUpdated)
})
-
- emit('polls:stores:load', response.data.updates)
} else {
throw new InvalidJSON(`No JSON response recieved, got "${response.headers['content-type']}"`)
}
@@ -65,15 +62,15 @@ export const watchPolls = {
// sleep if request was invalid or polling is set to "peeriodicPolling"
if (this.watchDisabled || this.retryCounter) {
await this.sleep()
- Logger.debug(`Continue ${this.aclStore.appSettings.updateType} after sleep`)
+ Logger.debug(`Continue ${this.sessionStore.appSettings.updateType} after sleep`)
}
// avoid requests when app is in background and pause
while (document.hidden || !navigator.onLine) {
if (navigator.onLine) {
- Logger.debug(`App in background, pause ${this.aclStore.appSettings.updateType}`)
+ Logger.debug(`App in background, pause ${this.sessionStore.appSettings.updateType}`)
} else {
- Logger.debug(`Browser is offline, pause ${this.aclStore.appSettings.updateType}`)
+ Logger.debug(`Browser is offline, pause ${this.sessionStore.appSettings.updateType}`)
}
await new Promise((resolve) => setTimeout(resolve, 5000))
Logger.debug('Resume')
@@ -97,7 +94,7 @@ export const watchPolls = {
},
sleep() {
- const reason = this.retryCounter ? `Connection error, Attempt: ${this.retryCounter}/${MAX_TRIES})` : this.aclStore.appSettings.updateType
+ const reason = this.retryCounter ? `Connection error, Attempt: ${this.retryCounter}/${MAX_TRIES})` : this.sessionStore.appSettings.updateType
Logger.debug(`Sleep for ${this.sleepTimeout} seconds (reason: ${reason})`)
return new Promise((resolve) => setTimeout(resolve, this.sleepTimeout * 1000))
},
@@ -106,13 +103,13 @@ export const watchPolls = {
if (error.response?.status === 304) {
// this is a wanted response, no updates where found.
// resume to normal operation
- Logger.debug(`No updates - continue ${this.aclStore.appSettings.updateType}`)
+ Logger.debug(`No updates - continue ${this.sessionStore.appSettings.updateType}`)
this.retryCounter = 0
return
}
if (error?.code === 'ERR_NETWORK') {
- Logger.debug(`Possibly offline - continue ${this.aclStore.appSettings.updateType}`)
+ Logger.debug(`Possibly offline - continue ${this.sessionStore.appSettings.updateType}`)
return
}
@@ -122,7 +119,7 @@ export const watchPolls = {
if (error?.response?.status === 503) {
// Server possibly in maintenance mode
this.sleepTimeout = error?.response?.headers['retry-after'] ?? SLEEP_TIMEOUT_DEFAULT
- Logger.debug(`Service not avaiable - retry ${this.aclStore.appSettings.updateType} after ${this.sleepTimeout} seconds`)
+ Logger.debug(`Service not avaiable - retry ${this.sessionStore.appSettings.updateType} after ${this.sleepTimeout} seconds`)
return
}
@@ -130,7 +127,7 @@ export const watchPolls = {
if (error?.code === 'ERR_CANCELED' || error?.code === 'ECONNABORTED') {
Logger.debug('Watch canceled')
} else {
- Logger.debug(`No response - ${this.aclStore.appSettings.updateType} aborted - failed request ${this.retryCounter}/${MAX_TRIES}`, error)
+ Logger.debug(`No response - ${this.sessionStore.appSettings.updateType} aborted - failed request ${this.retryCounter}/${MAX_TRIES}`, error)
}
this.retryCounter = null
diff --git a/src/router.js b/src/router.js
index a2fac952d..f245bead9 100644
--- a/src/router.js
+++ b/src/router.js
@@ -26,6 +26,7 @@ Vue.use(Router)
* @param {object} route
*/
+
/**
* @param {object} to Target route
* @param {object} from Route navigated from
@@ -61,7 +62,7 @@ async function validateToken(to, from, next) {
}
}
-export default new Router({
+const router = new Router({
mode: 'history',
base: generateUrl('/apps/polls'),
linkActiveClass: 'active',
@@ -166,3 +167,13 @@ export default new Router({
},
],
})
+
+// router.beforeEach((to, from, next) => {
+// console.log('beforeEach', to);
+// next()
+// const sessionStore = useSessionStore()
+// sessionStore.setRouter(to)
+// })
+
+
+export default router
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
deleted file mode 100644
index 8862fbb38..000000000
--- a/src/store/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import Vue from 'vue'
-import Vuex, { Store } from 'vuex'
-import modules from './modules/index.js'
-
-Vue.use(Vuex)
-
-const debug = process.env.NODE_ENV !== 'production'
-
-export default new Store({
- modules,
- strict: debug,
-})
diff --git a/src/store/modules/acl.js b/src/store/modules/acl.js
deleted file mode 100644
index 9bbffef9b..000000000
--- a/src/store/modules/acl.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-import { UserSettingsAPI, PublicAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultAcl = () => ({
- token: '',
- currentUser: {
- userId: '',
- displayName: '',
- emailAddress: '',
- subName: '',
- subtitle: '',
- isNoUser: true,
- desc: '',
- type: 'user',
- id: '',
- user: '',
- organisation: '',
- languageCode: '',
- localeCode: '',
- timeZone: '',
- icon: 'icon-user',
- categories: []
- },
- appPermissions: {
- allAccess: false,
- publicShares: false,
- pollCreation: false,
- seeMailAddresses: false,
- pollDownload: false,
- },
- appSettings: {
- usePrivacyUrl: '',
- useImprintUrl: '',
- useLogin: false,
- useActivity: false,
- navigationPollsInList: false,
- updateType: 'noPolling',
- }
-})
-
-const namespaced = true
-const state = defaultAcl()
-
-const mutations = {
-
- set(state, payload) {
- Object.assign(state, payload.acl)
- },
-
- reset(state) {
- Object.assign(state, defaultAcl())
- },
-
-}
-const actions = {
- async get(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.getAcl(context.rootState.route.params.token)
- } else {
- response = await UserSettingsAPI.getAcl()
- }
- context.commit('set', { acl: response.data.acl })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
-
- context.commit('reset')
- if (context.rootState.route.name === null) {
- // TODO: for some reason unauthorized users first get the root route resulting in a 401
- // and after that the publicVote route is called as next route
- // therefore we just debug the error and reset the acl
-
- Logger.debug('getAcl failed', error)
- context.commit('reset')
- } else {
- throw error
- }
- }
- },
-}
-export default { namespaced, state, mutations, actions }
diff --git a/src/store/modules/activity.js b/src/store/modules/activity.js
deleted file mode 100644
index 647599c67..000000000
--- a/src/store/modules/activity.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { ActivityAPI } from '../../Api/index.js'
-
-const defaultActivities = () => ({
- list: [],
-})
-
-const namespaced = true
-const state = defaultActivities()
-
-const mutations = {
- set(state, payload) {
- state.list = payload
- },
-
- reset(state) {
- Object.assign(state, defaultActivities())
- },
-
- deleteActivities(state, payload) {
- state.list = state.list.filter((vote) => vote.user.userId !== payload.userId)
- },
-
-}
-
-const actions = {
- async list(context) {
-
- try {
- const response = await ActivityAPI.getActivities(context.rootState.route.params.id)
- context.commit('set', response.data.ocs.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- context.commit('reset')
- }
- },
-
-}
-
-export default { namespaced, state, mutations, actions }
diff --git a/src/store/modules/appSettings.js b/src/store/modules/appSettings.js
deleted file mode 100644
index e8e8b7afb..000000000
--- a/src/store/modules/appSettings.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2021 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { AppSettingsAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultAppSettings = () => ({
- allAccessGroups: [],
- allowCombo: true,
- allowPublicShares: true,
- allowAllAccess: true,
- allowPollCreation: true,
- allowPollDownload: true,
- autoArchive: false,
- autoArchiveOffset: 30,
- defaultPrivacyUrl: '',
- defaultImprintUrl: '',
- disclaimer: '',
- imprintUrl: '',
- legalTermsInEmail: false,
- privacyUrl: '',
- showMailAddresses: false,
- showLogin: true,
- updateType: 'noPolling',
- useActivity: false,
- useCollaboration: true,
- navigationPollsInList: true,
- usePrivacyUrl: '',
- useImprintUrl: '',
- comboGroups: [],
- publicSharesGroups: [],
- pollCreationGroups: [],
- pollDownloadGroups: [],
- showMailAddressesGroups: [],
-})
-
-const namespaced = true
-const state = defaultAppSettings()
-
-const mutations = {
- reset(state) {
- Object.assign(state, defaultAppSettings())
- },
-
- set(state, payload) {
- Object.keys(payload).filter((key) => key in state).forEach((key) => {
- state[key] = payload[key]
- })
- },
-}
-
-const actions = {
- async get(context) {
- try {
- const response = await AppSettingsAPI.getAppSettings()
- context.commit('set', response.data.appSettings)
- } catch (error) {
- Logger.debug('Error getting appSettings', { error })
- }
- },
-
- async write(context) {
- try {
- const response = await AppSettingsAPI.writeAppSettings(context.state)
- context.commit('set', response.data.appSettings)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing appSettings', { error, appSettings: state })
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, actions }
diff --git a/src/store/modules/combo.js b/src/store/modules/combo.js
deleted file mode 100644
index ecc9a1030..000000000
--- a/src/store/modules/combo.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { uniqueOptions, uniqueParticipants, Logger } from '../../helpers/index.js'
-import { sortBy } from 'lodash'
-import { OptionsAPI, PollsAPI, VotesAPI } from '../../Api/index.js'
-
-const defaultCombo = () => ({
- id: 1,
- options: [],
- polls: [],
- participants: [],
- votes: [],
-})
-
-const namespaced = true
-const state = defaultCombo()
-
-const mutations = {
- set(state, payload) {
- Object.assign(state, payload.poll)
- },
-
- reset(state) {
- Object.assign(state, defaultCombo())
- },
-
- addPoll(state, payload) {
- state.polls.push(payload.poll)
- },
-
- addOptions(state, payload) {
- state.options.push(...payload.options)
- },
-
- addVotes(state, payload) {
- state.votes.push(...payload.votes)
- state.participants = uniqueParticipants(state.votes)
- },
-
- removePoll(state, payload) {
- state.polls = state.polls.filter((poll) => poll.id !== payload.pollId)
- },
-
- removeVotes(state, payload) {
- state.votes = state.votes.filter((vote) => vote.pollId !== payload.pollId)
- state.participants = uniqueParticipants(state.votes)
- },
-
- removeOptions(state, payload) {
- state.options = state.options.filter((option) => option.pollId !== payload.pollId)
- },
-
-}
-
-const getters = {
- poll: (state) => (pollId) => state.polls.find((poll) => poll.id === pollId),
- votesInPoll: (state) => (pollId) => state.votes.filter((vote) => vote.pollId === pollId),
- participantsInPoll: (state) => (pollId) => state.participants.filter((participant) => participant.pollId === pollId),
- pollIsListed: (state) => (pollId) => !!state.polls.find((poll) => poll.id === pollId),
- pollCombo: (state) => state.polls.map((poll) => poll.id),
- optionBelongsToPoll: (state) => (payload) => !!state.options.find((option) => option.text === payload.text && option.pollId === payload.pollId),
- uniqueOptions: (state) => sortBy(uniqueOptions(state.options), 'timestamp'),
-
- getVote: (state) => (payload) => {
- const found = state.votes.find((vote) => (
- vote.user.userId === payload.user.userId
- && vote.optionText === payload.option.text
- && vote.pollId === payload.user.pollId))
- if (found === undefined) {
- return {
- answer: '',
- optionText: payload.option.text,
- userId: payload.userId,
- }
- }
- return found
- },
-}
-
-const actions = {
-
- async add(context, pollId) {
- return Promise.all([
- 'addPoll',
- 'addVotes',
- 'addOptions',
- ].map((dispatch) => context.dispatch(dispatch, { pollId })))
- },
-
- async remove(context, pollId) {
- return Promise.all([
- 'removePoll',
- 'removeVotes',
- 'removeOptions',
- ].map((commit) => context.commit(commit, { pollId })))
- },
-
- async verifyPollsFromSettings(context) {
- context.rootState.settings.user.pollCombo.forEach((pollId) => {
- if (!context.getters.pollCombo.includes(pollId)) {
- context.dispatch('add', pollId)
- }
- })
- },
-
- async cleanUp(context) {
- context.state.polls.forEach((comboPoll) => {
- if (context.rootState.polls.list.findIndex((poll) => poll.id === comboPoll.id && !poll.deleted) < 0) {
- context.commit('removePoll', { pollId: comboPoll.id })
- }
- })
- },
-
- async togglePollItem(context, pollId) {
- if (context.getters.pollIsListed(pollId)) {
- context.dispatch('remove', pollId)
- } else {
- context.dispatch('add', pollId)
- }
- },
-
- async addPoll(context, payload) {
- try {
- const response = await PollsAPI.getPoll(payload.pollId)
- context.commit('addPoll', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.debug('Error loading poll for combo', { error })
- }
- },
-
- async addOptions(context, payload) {
- try {
- const response = await OptionsAPI.getOptions(payload.pollId)
- context.commit('addOptions', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.debug('Error loading options for combo', { error })
- }
- },
-
- async addVotes(context, payload) {
- try {
- const response = await VotesAPI.getVotes(payload.pollId)
- context.commit('addVotes', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.debug('Error loading options for combo', { error })
- }
- },
-}
-
-export default { namespaced, state, mutations, getters, actions }
diff --git a/src/store/modules/comments.js b/src/store/modules/comments.js
deleted file mode 100644
index 963862a58..000000000
--- a/src/store/modules/comments.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { CommentsAPI, PublicAPI } from '../../Api/index.js'
-import { groupComments, Logger } from '../../helpers/index.js'
-
-const defaultComments = () => ({
- list: [],
-})
-
-const namespaced = true
-const state = defaultComments()
-
-const mutations = {
-
- set(state, payload) {
- state.list = payload.comments
- },
-
- reset(state) {
- Object.assign(state, defaultComments())
- },
-
- add(state, payload) {
- state.list.push(payload.comment)
- },
-
- setItem(state, payload) {
- const index = state.list.findIndex((comment) =>
- parseInt(comment.id) === payload.comment.id,
- )
-
- if (index < 0) {
- state.list.push(payload.comment)
- } else {
- state.list[index] = Object.assign(state.list[index], payload.comment)
- }
- },
-
-}
-
-const getters = {
- count: (state) => state.list.length,
- groupedComments: (state) => groupComments(state.list),
-}
-
-const actions = {
- async list(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.getComments(context.rootState.route.params.token)
- } else if (context.rootState.route.name === 'vote') {
- response = await CommentsAPI.getComments(context.rootState.route.params.id)
- } else {
- context.commit('reset')
- return
- }
-
- context.commit('set', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- context.commit('reset')
- }
- },
-
- async add(context, payload) {
- try {
- if (context.rootState.route.name === 'publicVote') {
- await PublicAPI.addComment(context.rootState.route.params.token, payload.message)
- } else if (context.rootState.route.name === 'vote') {
- await CommentsAPI.addComment(context.rootState.route.params.id, payload.message)
- } else {
- context.commit('reset')
- return
- }
-
- context.dispatch('list')
- // context.commit('add', { comment: response.data.comment })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing comment', { error, payload })
- throw error
- }
- },
-
- async delete(context, payload) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.deleteComment(context.rootState.route.params.token, payload.comment.id)
- } else {
- response = await CommentsAPI.deleteComment(payload.comment.id)
- }
-
- context.commit('setItem', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting comment', { error, payload })
- throw error
- }
- },
-
- async restore(context, payload) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.restoreComment(context.rootState.route.params.token, payload.comment.id, { comment: payload.comment })
- } else {
- response = await CommentsAPI.restoreComment(payload.comment.id)
- }
-
- context.commit('setItem', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error restoring comment', { error, payload })
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, actions, getters }
diff --git a/src/store/modules/index.js b/src/store/modules/index.js
deleted file mode 100644
index 14a7445e2..000000000
--- a/src/store/modules/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2020 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-const files = import.meta.glob('./*.js', { eager: true })
-
-const modules = {}
-for (const key in files) {
- if (key !== './index.js') {
- modules[key.replace(/(\.\/|\.js)/g, '')] = files[key].default
- }
-}
-
-export default modules
diff --git a/src/store/modules/options.js b/src/store/modules/options.js
deleted file mode 100644
index 6914202d5..000000000
--- a/src/store/modules/options.js
+++ /dev/null
@@ -1,291 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { orderBy } from 'lodash'
-import moment from '@nextcloud/moment'
-import { OptionsAPI, PublicAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultOptions = () => ({
- list: [],
- ranked: false,
-})
-
-const namespaced = true
-const state = defaultOptions()
-
-const mutations = {
- set(state, payload) {
- state.list = payload.options
- },
-
- reset(state) {
- Object.assign(state, defaultOptions())
- },
-
- reorder(state, payload) {
- payload.options.forEach((item, i) => {
- item.order = i + 1
- })
- state.list = payload.options
- },
-
- setRankOrder(state, payload) {
- if (payload) {
- state.ranked = payload
- } else {
- state.ranked = !state.ranked
- }
- },
-
- delete(state, payload) {
- state.list = state.list.filter((option) => option.id !== payload.option.id)
- },
-
- confirm(state, payload) {
- const index = state.list.findIndex((option) => option.id === payload.option.id)
-
- state.list[index].confirmed = !state.list[index].confirmed
- },
-
- setItem(state, payload) {
- const index = state.list.findIndex((option) =>
- parseInt(option.id) === payload.option.id,
- )
-
- if (index < 0) {
- state.list.push(payload.option)
- } else {
- state.list.splice(index, 1, payload.option)
- }
- state.list.sort((a, b) => (a.order < b.order) ? -1 : (a.order > b.order) ? 1 : 0)
- },
-}
-
-const getters = {
- count: (state) => state.list.length,
- rankedOptions: (state) => state.ranked ? orderBy(state.list, ['votes.yes', 'votes.maybe'], ['desc', 'desc']) : state.list,
- proposalsExist: (state) => !!state.list.filter((option) => option.owner.userId).length,
- confirmed: (state) => state.list.filter((option) => option.confirmed > 0),
-
- explodeDates: (state, getters, rootState) => (option) => {
- const from = moment.unix(option.timestamp)
- const to = moment.unix(option.timestamp + Math.max(0, option.duration))
- // does the event start at 00:00 local time and
- // is the duration divisable through 24 hours without rest
- // then we have a day long event (one or multiple days)
- // In this case we want to suppress the display of any time information
- const dayLongEvent = from.unix() === moment(from).startOf('day').unix() && to.unix() === moment(to).startOf('day').unix() && from.unix() !== to.unix()
-
- const dayModifier = dayLongEvent ? 1 : 0
- // modified to date, in case of day long events, a second gets substracted
- // to set the begin of the to day to the end of the previous date
- const toModified = moment(to).subtract(dayModifier, 'days')
-
- if (rootState.poll.type !== 'datePoll') {
- return {}
- }
- return {
- from: {
- month: from.format(moment().year() === from.year() ? 'MMM' : 'MMM [ \']YY'),
- day: from.format('D'),
- dow: from.format('ddd'),
- time: from.format('LT'),
- date: from.format('ll'),
- dateTime: from.format('llll'),
- iso: moment(from).toISOString(),
- utc: moment(from).utc().format('llll'),
- },
- to: {
- month: toModified.format(moment().year() === toModified.year() ? 'MMM' : 'MMM [ \']YY'),
- day: toModified.format('D'),
- dow: toModified.format('ddd'),
- time: to.format('LT'),
- date: toModified.format('ll'),
- dateTime: to.format('llll'),
- iso: moment(to).toISOString(),
- utc: moment(to).utc().format('llll'),
- sameDay: from.format('L') === toModified.format('L'),
- },
- dayLong: dayLongEvent,
- raw: `${from.format('llll')} - ${toModified.format('llll')}`,
- iso: `${moment(from).toISOString()} - ${moment(to).toISOString()}`,
- }
-
- },
-
-}
-
-const actions = {
-
- async list(context) {
- try {
- let response = null
-
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.getOptions(context.rootState.route.params.token)
- } else if (context.rootState.route.params.id) {
- response = await OptionsAPI.getOptions(context.rootState.route.params.id)
- } else {
- context.commit('reset')
- return
- }
-
- context.commit('set', { options: response.data.options })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error loding options', { error, pollId: context.rootState.route.params.id })
- throw error
- }
- },
-
- async add(context, payload) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.addOption(
- context.rootState.route.params.token,
- {
- pollId: context.rootState.route.params.id,
- timestamp: payload.timestamp,
- text: payload.text,
- duration: payload.duration,
- },
- )
- } else {
- response = await OptionsAPI.addOption(
- {
- pollId: context.rootState.route.params.id,
- timestamp: payload.timestamp,
- text: payload.text,
- duration: payload.duration,
- },
- )
- }
- context.commit('setItem', { option: response.data.option })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error adding option', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async update(context, payload) {
- try {
- const response = await OptionsAPI.updateOption(payload.option)
- context.commit('setItem', { option: response.data.option })
- } catch (error) {
- Logger.error('Error updating option', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async delete(context, payload) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.deleteOption(context.rootState.route.params.token, payload.option.id)
- } else {
- response = await OptionsAPI.deleteOption(payload.option.id)
- }
- context.commit('setItem', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting option', { error, payload })
- throw error
- }
- },
-
- async restore(context, payload) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.restoreOption(context.rootState.route.params.token, payload.option.id)
- } else {
- response = await OptionsAPI.restoreOption(payload.option.id)
- }
- context.commit('setItem', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error restoring option', { error, payload })
- throw error
- }
- },
-
- async addBulk(context, payload) {
- try {
- const response = await OptionsAPI.addOptions(context.rootState.route.params.id, payload.text)
- context.commit('set', { options: response.data.options })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error adding option', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async confirm(context, payload) {
- context.commit('confirm', { option: payload.option })
- try {
- const response = await OptionsAPI.confirmOption(payload.option.id)
- context.commit('setItem', { option: response.data.option })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error confirming option', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async reorder(context, payload) {
- context.commit('reorder', { options: payload })
-
- try {
- const response = await OptionsAPI.reorderOptions(context.rootState.route.params.id, payload)
- context.commit('set', { options: response.data.options })
- } catch (error) {
- Logger.error('Error reordering option', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async sequence(context, payload) {
- try {
- const response = await OptionsAPI.addOptionsSequence(
- payload.option.id,
- payload.sequence.step,
- payload.sequence.unit.value,
- payload.sequence.amount,
- )
- context.commit('set', { options: response.data.options })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error creating sequence', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async shift(context, payload) {
- try {
- const response = await OptionsAPI.shiftOptions(
- context.rootState.route.params.id,
- payload.shift.step,
- payload.shift.unit.value,
- )
- context.commit('set', { options: response.data.options })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error shifting dates', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-}
-
-export default { state, mutations, getters, actions, namespaced }
diff --git a/src/store/modules/poll.js b/src/store/modules/poll.js
deleted file mode 100644
index 9b6d9fe58..000000000
--- a/src/store/modules/poll.js
+++ /dev/null
@@ -1,308 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import moment from '@nextcloud/moment'
-import { uniqueArrayOfObjects, Logger } from '../../helpers/index.js'
-import { PollsAPI, PublicAPI } from '../../Api/index.js'
-import { t } from '@nextcloud/l10n'
-
-const defaultPoll = () => ({
- id: 0,
- type: 'datePoll',
- descriptionSafe: '',
- configuration: {
- title: '',
- description: '',
- access: 'private',
- allowComment: false,
- allowMaybe: false,
- allowProposals: 'disallow',
- anonymous: false,
- autoReminder: false,
- expire: 0,
- hideBookedUp: false,
- proposalsExpire: 0,
- showResults: 'always',
- useNo: true,
- maxVotesPerOption: 0,
- maxVotesPerUser: 0,
- },
- owner: {
- userId: '',
- displayName: '',
- isNoUser: false,
- },
- status: {
- lastInteraction: 0,
- created: 0,
- deleted: false,
- expired: false,
- relevantThreshold: 0,
- countOptions: 0,
- },
- currentUserStatus: {
- userRole: '',
- isLocked: false,
- isInvolved: false,
- isLoggedIn: false,
- isNoUser: true,
- isOwner: false,
- userId: '',
- orphanedVotes: 0,
- yesVotes: 0,
- countVotes: 0,
- shareToken: '',
- groupInvitations: [],
- },
- permissions: {
- addOptions: false,
- archive: false,
- comment: false,
- delete: false,
- edit: false,
- seeResults: false,
- seeUsernames: false,
- subscribe: false,
- view: false,
- vote: false,
- },
- revealParticipants: false,
-})
-
-const namespaced = true
-const state = defaultPoll()
-
-const mutations = {
- set(state, payload) {
- Object.assign(state, payload.poll)
- },
-
- reset(state) {
- Object.assign(state, defaultPoll())
- },
-
- setProperty(state, payload) {
- Object.assign(state.configuration, payload)
- },
-
- setLimit(state, payload) {
- Object.assign(state.configuration, payload)
- },
-
- setDescriptionSafe(state, payload) {
- state.descriptionSafe = payload.replace(/&/g, '&').replace(//g, '>')
- },
- switchSafeTable(state, toStatus) {
- state.revealParticipants = toStatus ?? !state.revealParticipants
- },
-}
-
-const getters = {
- viewMode: (state, getters, rootState, rootGetters) => {
- if (state.type === 'textPoll') {
- return rootGetters['settings/viewTextPoll']
- }
-
- if (state.type === 'datePoll') {
- return rootGetters['settings/viewDatePoll']
- }
- return 'table-view'
- },
-
- getNextViewMode: (state, getters, rootState) => {
- if (rootState.settings.viewModes.indexOf(getters.viewMode) < 0) {
- return rootState.settings.viewModes[1]
- }
- return rootState.settings.viewModes[(rootState.settings.viewModes.indexOf(getters.viewMode) + 1) % rootState.settings.viewModes.length]
-
- },
-
- typeName: (state) => {
- if (state.type === 'textPoll') {
- return t('polls', 'Text poll')
- }
- return t('polls', 'Date poll')
- },
-
- answerSequence: (state) => {
- const noString = state.configuration.useNo ? 'no' : ''
- if (state.configuration.allowMaybe) {
- return [noString, 'yes', 'maybe']
- }
- return [noString, 'yes']
-
- },
-
- participants: (state, getters, rootState) => {
- const participants = getters.participantsVoted
-
- // add current user, if not among participants and voting is allowed
- if (!participants.find((participant) => participant.userId === rootState.acl.currentUser.userId) && rootState.acl.currentUser.userId && state.permissions.vote) {
- participants.push({
- userId: rootState.acl.currentUser.userId,
- displayName: rootState.acl.currentUser.displayName,
- isNoUser: rootState.acl.currentUser.isNoUser,
- })
- }
-
- return participants
- },
-
- safeParticipants: (state, getters, rootState) => {
- if (getters.getSafeTable) {
- return [{
- userId: rootState.acl.currentUser.userId,
- displayName: rootState.acl.currentUser.displayName,
- isNoUser: rootState.acl.currentUser.isNoUser,
- }]
- }
- return getters.participants
- },
-
- participantsVoted: (state, getters, rootState) => uniqueArrayOfObjects(rootState.votes.list.map((vote) => (
- vote.user
- ))),
-
- getProposalsOptions: () => [
- { value: 'disallow', label: t('polls', 'Disallow proposals') },
- { value: 'allow', label: t('polls', 'Allow proposals') },
- ],
-
- displayResults: (state, getters) => state.configuration.showResults === 'always' || (state.configuration.showResults === 'closed' && !getters.closed),
- isProposalAllowed: (state) => state.configuration.allowProposals === 'allow' || state.configuration.allowProposals === 'review',
- isProposalOpen: (state, getters) => getters.isProposalAllowed && !getters.isProposalExpired,
- isProposalExpired: (state, getters) => getters.isProposalAllowed && state.configuration.proposalsExpire && moment.unix(state.configuration.proposalsExpire).diff() < 0,
- isProposalExpirySet: (state, getters) => getters.isProposalAllowed && state.configuration.proposalsExpire,
- proposalsExpireRelative: (state) => moment.unix(state.configuration.proposalsExpire).fromNow(),
- isClosed: (state) => (state.configuration.expire > 0 && moment.unix(state.configuration.expire).diff() < 1000),
- getSafeTable: (state, getters, rootState) => !state.revealParticipants && getters.countCells > rootState.settings.user.performanceThreshold,
- countParticipants: (state, getters) => getters.participants.length,
- countHiddenParticipants: (state, getters) => getters.participants.length - getters.safeParticipants.length,
- countSafeParticipants: (state, getters) => getters.safeParticipants.length,
- countParticipantsVoted: (state, getters) => getters.participantsVoted.length,
- countCells: (state, getters, rootState, rootGetters) => getters.countParticipants * rootGetters['options/count'],
-}
-
-const actions = {
-
- reset(context) {
- context.commit('reset')
- },
-
- async get(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.getPoll(context.rootState.route.params.token)
- } else if (context.rootState.route.name === 'vote') {
- response = await PollsAPI.getPoll(context.rootState.route.params.id)
- } else {
- context.commit('reset')
- return
- }
- context.commit('switchSafeTable', false)
- context.commit('set', { poll: response.data.poll })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.debug('Error loading poll', { error })
- throw error
- }
- },
-
- async add(context, payload) {
- try {
- const response = await PollsAPI.addPoll(payload.type, payload.title)
- return response
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error adding poll:', { error, state: context.state })
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- }
- },
-
- async update(context) {
- try {
- const response = await PollsAPI.writePoll(context.state.id, context.state.configuration)
- context.commit('set', { poll: response.data.poll })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error updating poll:', { error, poll: context.state })
- context.dispatch('get')
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- context.dispatch('options/list', null, { root: true })
- }
- },
-
- async close(context) {
- try {
- const response = await PollsAPI.closePoll(context.state.id)
- context.commit('set', { poll: response.data.poll })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error closing poll', { error, pollId: context.state.id })
- context.dispatch('get')
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- }
- },
-
- async reopen(context) {
- try {
- const response = await PollsAPI.reopenPoll(context.state.id)
- context.commit('set', { poll: response.data.poll })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error reopening poll', { error, pollId: context.state.id })
- context.dispatch('get')
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- }
- },
-
- async toggleArchive(context, payload) {
- try {
- await PollsAPI.toggleArchive(payload.pollId)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error archiving/restoring', { error, payload })
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- }
- },
-
- async delete(context, payload) {
- try {
- await PollsAPI.deletePoll(payload.pollId)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting poll', { error, payload })
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- }
- },
-
- async clone(context, payload) {
- try {
- const response = await PollsAPI.clonePoll(payload.pollId)
- return response
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error cloning poll', { error, payload })
- throw error
- } finally {
- context.dispatch('polls/list', null, { root: true })
- }
- },
-}
-
-export default { namespaced, state, mutations, getters, actions }
diff --git a/src/store/modules/polls.js b/src/store/modules/polls.js
deleted file mode 100644
index 0da40f3e0..000000000
--- a/src/store/modules/polls.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import moment from '@nextcloud/moment'
-import { orderBy } from 'lodash'
-import { PollsAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-import { t } from '@nextcloud/l10n'
-
-const filterRelevantCondition = (poll, relevantOffset) => !poll.status.deleted
- && moment().diff(moment.unix(poll.status.relevantThreshold), 'days') < relevantOffset
- && (poll.currentUserStatus.isInvolved || (poll.permissions.view && poll.configuration.access !== 'open'))
-
-const filterMyPolls = (poll) => !poll.status.deleted && poll.currentUserStatus.isOwner
-const filterPrivatePolls = (poll) => !poll.status.deleted && poll.configuration.access === 'private'
-const filterParticipatedPolls = (poll) => !poll.status.deleted && poll.currentUserStatus.countVotes > 0
-const filterOpenPolls = (poll) => !poll.status.deleted && poll.configuration.access === 'open'
-const filterAllPolls = (poll) => !poll.status.deleted
-const filterClosedPolls = (poll) => !poll.status.deleted && poll.configuration.expire && moment.unix(poll.configuration.expire).diff() < 0
-const filterArchivedPolls = (poll) => poll.status.deleted
-
-
-const state = {
- list: [],
- meta: {
- currentCategoryId: 'relevant',
- chunksize: 20,
- loadedChunks: 1,
- maxPollsInNavigation: 6,
- permissions: {
- pollCreationAllowed: false,
- comboAllowed: false,
- },
- },
- status: {
- loading: false
- },
-
- sort: {
- by: 'created',
- reverse: true,
- },
-
- categories: [
- {
- id: 'relevant',
- title: t('polls', 'Relevant'),
- titleExt: t('polls', 'Relevant polls'),
- description: t('polls', 'Relevant polls which are relevant or for you, because you are a participant or the owner or you are invited to.'),
- pinned: false,
- createDependent: false,
- filterCondition: (poll, relevantOffset) => filterRelevantCondition(poll, relevantOffset),
- },
- {
- id: 'my',
- title: t('polls', 'My polls'),
- titleExt: t('polls', 'My polls'),
- description: t('polls', 'Your polls (in which you are the owner).'),
- pinned: false,
- createDependent: true,
- filterCondition: (poll) => filterMyPolls(poll),
- },
- {
- id: 'private',
- title: t('polls', 'Private polls'),
- titleExt: t('polls', 'Private polls'),
- description: t('polls', 'All private polls, to which you have access.'),
- pinned: false,
- createDependent: true,
- filterCondition: (poll) => filterPrivatePolls(poll),
- },
- {
- id: 'participated',
- title: t('polls', 'Participated'),
- titleExt: t('polls', 'Participated'),
- description: t('polls', 'All polls, where you placed a vote.'),
- pinned: false,
- createDependent: false,
- filterCondition: (poll) => filterParticipatedPolls(poll),
- },
- {
- id: 'open',
- title: t('polls', 'Openly accessible polls'),
- titleExt: t('polls', 'Openly accessible polls'),
- description: t('polls', 'A complete list with all openly accessible polls on this site, regardless who is the owner.'),
- pinned: false,
- createDependent: true,
- filterCondition: (poll) => filterOpenPolls(poll),
- },
- {
- id: 'all',
- title: t('polls', 'All polls'),
- titleExt: t('polls', 'All polls'),
- description: t('polls', 'All polls, where you have access to.'),
- pinned: false,
- createDependent: false,
- filterCondition: (poll) => filterAllPolls(poll),
- },
- {
- id: 'closed',
- title: t('polls', 'Closed polls'),
- titleExt: t('polls', 'Closed polls'),
- description: t('polls', 'All closed polls, where voting is disabled.'),
- pinned: false,
- createDependent: false,
- filterCondition: (poll) => filterClosedPolls(poll),
- },
- {
- id: 'archived',
- title: t('polls', 'Archive'),
- titleExt: t('polls', 'My archived polls'),
- description: t('polls', 'Your archived polls are only accessible to you.'),
- pinned: true,
- createDependent: true,
- filterCondition: (poll) => filterArchivedPolls(poll),
- },
- ],
-}
-
-const sortColumnsMapping = {
- created: 'status.created',
- title: 'configuration.title',
- access: 'configuration.access',
- owner: 'owner.displayName',
- expire: 'configuration.expire',
-}
-
-const namespaced = true
-
-const mutations = {
- set(state, payload) {
- Object.assign(state, payload)
- },
-
- setLoading(state, loading) {
- state.status.loading = loading ?? true
- },
-
- addChunk(state) {
- state.meta.loadedChunks = state.meta.loadedChunks + 1
- },
-
- resetChunks(state) {
- state.meta.loadedChunks = 1
- },
-
- setFilter(state, payload) {
- state.meta.currentCategoryId = payload.currentCategoryId
- },
-
- setSort(state, payload) {
- if (state.sort.by === sortColumnsMapping[payload.sortBy]) {
- state.sort.reverse = !state.sort.reverse
- } else {
- state.sort.reverse = true
- }
- state.sort.by = sortColumnsMapping[payload.sortBy]
- },
-
- setPollsPermissions(state, payload) {
- state.meta.permissions = payload.permissions
- },
-}
-
-const getters = {
- categories(state) {
- if (state.meta.permissions.pollCreationAllowed) {
- return state.categories
- }
- return state.categories.filter((category) => (!category.createDependent))
- },
- // activePolls: (state, getters) => getters.filtered('all').slice(0, getters.loaded),
- count: (state, getters) => getters.filteredRaw.length,
- loaded: (state) => state.meta.loadedChunks * state.meta.chunksize,
- datePolls: (state) => state.list.filter((poll) => (poll.type === 'datePoll' && !poll.status.deleted)),
- currentCategory: (state) => state.categories.find((category) => category.id === state.meta.currentCategoryId),
-
- filteredRaw: (state, getters, rootState) => orderBy(
- state.list.filter((poll) => getters.currentCategory.filterCondition(poll, rootState.settings.user.relevantOffset)),
- [state.sort.by],
- [state.sort.reverse ? 'desc' : 'asc'],
- ),
-
- filtered: (state, getters) => getters.filteredRaw.slice(0, getters.loaded),
-
- countByCategory: (state, getters, rootState) => (filterId) => state.list.filter((poll) => state.categories.find((category) => category.id === filterId).filterCondition(poll, rootState.settings.user.relevantOffset)).length,
- filteredByCategory: (state, getters, rootState) => (filterId) => {
- const currentCategory = state.categories.find((category) => category.id === filterId)
- return orderBy(
- state.list.filter((poll) => currentCategory.filterCondition(poll, rootState.settings.user.relevantOffset)),
- [state.sort.by],
- [state.sort.reverse ? 'desc' : 'asc'],
- ).slice(0, state.meta.maxPollsInNavigation)
- },
-
-}
-
-const actions = {
- async setSort(context, payload) {
- context.commit('setSort', { sortBy: payload.sortBy })
- },
-
- async setFilter(context, payload) {
- context.commit('setFilter', { currentCategoryId: payload })
- context.commit('resetChunks')
- },
-
- async list(context) {
- try {
- context.commit('setLoading')
- const response = await PollsAPI.getPolls()
- context.commit('set', { list: response.data.list })
- context.commit('setPollsPermissions', { permissions: response.data.permissions })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error loading polls', { error })
- throw error
- } finally {
- context.commit('setLoading', false)
- }
- },
-}
-
-export default { namespaced, state, mutations, getters, actions }
diff --git a/src/store/modules/pollsAdmin.js b/src/store/modules/pollsAdmin.js
deleted file mode 100644
index e781d772d..000000000
--- a/src/store/modules/pollsAdmin.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { getCurrentUser } from '@nextcloud/auth'
-import { PollsAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const namespaced = true
-const state = {
- list: [],
-}
-
-const mutations = {
- set(state, payload) {
- Object.assign(state, payload)
- },
-}
-
-const getters = {
- filtered: (state) => (filterId) => state.list,
-}
-
-const actions = {
- async list(context) {
- if (!getCurrentUser().isAdmin) {
- return
- }
-
- try {
- const response = await PollsAPI.getPollsForAdmin()
- context.commit('set', { list: response.data })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error loading polls', { error })
- throw error
- }
- },
-
- async takeOver(context, payload) {
- if (!getCurrentUser().isAdmin) {
- return
- }
-
- try {
- await PollsAPI.takeOver(payload.pollId)
- context.dispatch('list')
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, getters, actions }
diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js
deleted file mode 100644
index 6faa1ed68..000000000
--- a/src/store/modules/settings.js
+++ /dev/null
@@ -1,134 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2020 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { CalendarAPI, UserSettingsAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultSettings = () => ({
- user: {
- useCommentsAlternativeStyling: false,
- useAlternativeStyling: false,
- calendarPeek: false,
- checkCalendars: [],
- checkCalendarsBefore: 0,
- checkCalendarsAfter: 0,
- defaultViewTextPoll: 'table-view',
- defaultViewDatePoll: 'table-view',
- performanceThreshold: 1000,
- pollCombo: [],
- relevantOffset: 30,
- },
- session: {
- manualViewDatePoll: '',
- manualViewTextPoll: '',
- },
- availableCalendars: [],
- viewModes: [
- 'list-view',
- 'table-view',
- ],
-})
-
-const namespaced = true
-const state = defaultSettings()
-
-const mutations = {
- reset(state) {
- Object.assign(state, defaultSettings())
- },
-
- setPreference(state, payload) {
- Object.keys(payload).filter((key) => key in state.user).forEach((key) => {
- state.user[key] = payload[key]
- })
- },
-
- setCalendars(state, payload) {
- state.availableCalendars = payload.calendars
- },
-
- addCheckCalendar(state, payload) {
- state.user.checkCalendars.push(payload.calendar.key)
- },
-
- setPollCombo(state, payload) {
- state.user.pollCombo = payload.pollCombo
- },
-
- setViewDatePoll(state, payload) {
- state.session.manualViewDatePoll = payload
- },
- setViewTextPoll(state, payload) {
- state.session.manualViewTextPoll = payload
- },
-}
-
-const getters = {
- viewTextPoll(state) {
- if (state.session.manualViewTextPoll) {
- return state.session.manualViewTextPoll
- }
- if (window.innerWidth > 480) {
- return state.user.defaultViewTextPoll
- }
- return 'list-view'
-
- },
-
- viewDatePoll(state) {
- if (state.session.manualViewDatePoll) {
- return state.session.manualViewDatePoll
- }
- if (window.innerWidth > 480) {
- return state.user.defaultViewDatePoll
- }
- return 'list-view'
-
- },
-}
-
-const actions = {
- async get(context) {
- try {
- const response = await UserSettingsAPI.getUserSettings()
- context.commit('setPreference', response.data.preferences)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- context.commit('reset')
- throw error
- }
- },
-
- async setPollCombo(context, payload) {
- await context.commit('setPollCombo', {
- pollCombo: payload.pollCombo,
- })
- context.dispatch('write')
- },
-
- async write(context) {
- try {
- const response = await UserSettingsAPI.writeUserSettings(context.state.user)
- context.commit('setPreference', response.data.preferences)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing preferences', { error }, { preferences: state.user })
- throw error
- }
- },
-
- async getCalendars(context) {
- try {
- const response = await CalendarAPI.getCalendars()
- context.commit('setCalendars', { calendars: response.data.calendars })
- return response
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, getters, actions }
diff --git a/src/store/modules/share.js b/src/store/modules/share.js
deleted file mode 100644
index 2f5833e1f..000000000
--- a/src/store/modules/share.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2021 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { PublicAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultShares = () => ({
- displayName: '',
- id: null,
- invitationSent: 0,
- locked: 0,
- pollId: null,
- token: '',
- type: '',
- emailAddress: '',
- userId: '',
- publicPollEmail: 'optional',
- user: {
- type: '',
- displayName: '',
- userId: '',
- emailAddress: '',
- isNoUser: false,
- },
-})
-
-const namespaced = true
-const state = defaultShares()
-
-const mutations = {
- set(state, payload) {
- Object.assign(state, payload.share)
- },
-
- setEmailAddress(state, payload) {
- state.user.emailAddress = payload
- },
-
- reset(state) {
- Object.assign(state, defaultShares())
- },
-}
-
-const actions = {
- async get(context) {
- if (context.rootState.route.name !== 'publicVote') {
- context.commit('reset')
- return
- }
-
- try {
- const response = await PublicAPI.getShare(context.rootState.route.params.token)
- context.commit('set', { share: response.data.share })
- return response.data
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.debug('Error retrieving share', { error })
- throw error
- }
- },
-
- async updateEmailAddress(context, payload) {
- if (context.rootState.route.name !== 'publicVote') {
- return
- }
-
- try {
- const response = await PublicAPI.setEmailAddress(context.rootState.route.params.token, payload.emailAddress)
- context.commit('set', { share: response.data.share })
- context.dispatch('poll/get', null, { root: true })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing email address', { error, payload })
- throw error
- }
- },
-
- async updateDisplayName(context, payload) {
- if (context.rootState.route.name !== 'publicVote') {
- return
- }
-
- try {
- const response = await PublicAPI.setDisplayName(context.rootState.route.params.token, payload.displayName)
- context.commit('set', { share: response.data.share })
- context.dispatch('poll/get', null, { root: true })
- context.dispatch('comments/list', null, { root: true })
- context.dispatch('votes/list', null, { root: true })
- context.dispatch('options/list', null, { root: true })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error changing name', { error, payload })
- throw error
- }
- },
-
- async deleteEmailAddress(context, payload) {
- if (context.rootState.route.name !== 'publicVote') {
- return
- }
-
- try {
- const response = await PublicAPI.deleteEmailAddress(context.rootState.route.params.token)
- context.commit('set', { share: response.data.share })
- context.dispatch('subscription/update', false, { root: true })
- context.dispatch('poll/get', null, { root: true })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing email address', { error, payload })
- throw error
- }
- },
-
- async resendInvitation(context, payload) {
- if (context.rootState.route.name !== 'publicVote') {
- return
- }
-
- try {
- return await PublicAPI.resendInvitation(context.rootState.route.params.token)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error sending invitation', { error, payload })
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, actions }
diff --git a/src/store/modules/shares.js b/src/store/modules/shares.js
deleted file mode 100644
index feb76a8d0..000000000
--- a/src/store/modules/shares.js
+++ /dev/null
@@ -1,216 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { SharesAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultShares = () => ({
- list: [],
-})
-
-const namespaced = true
-const state = defaultShares()
-
-const mutations = {
- set(state, payload) {
- state.list = payload.shares
- },
-
- delete(state, payload) {
- state.list = state.list.filter((share) => share.id !== payload.share.id)
- },
-
- reset(state) {
- Object.assign(state, defaultShares())
- },
-
- add(state, payload) {
- state.list.push(payload)
- },
-
- update(state, payload) {
- const foundIndex = state.list.findIndex((share) => share.id === payload.share.id)
- Object.assign(state.list[foundIndex], payload.share)
- },
-
- setShareProperty(state, payload) {
- const foundIndex = state.list.findIndex((share) => share.id === payload.id)
- Object.assign(state.list[foundIndex], payload)
- },
-
-}
-
-const getters = {
- active: (state) => {
- // share types, which will be active, after the user gets his invitation
- const invitationTypes = ['email', 'external', 'contact']
- // sharetype which are active without sending an invitation
- const directShareTypes = ['user', 'group', 'admin', 'public']
- return state.list.filter((share) => (!share.locked
- && (directShareTypes.includes(share.user.type)
- || (invitationTypes.includes(share.user.type) && (share.user.type === 'external' || share.invitationSent || share.voted))
- )
- ))
- },
-
- locked: (state) => state.list.filter((share) => (!!share.locked)),
- unsentInvitations: (state) => state.list.filter((share) =>
- (share.user.emailAddress || share.user.type === 'group' || share.user.type === 'contactGroup' || share.user.type === 'circle')
- && !share.invitationSent && !share.locked && !share.voted),
- public: (state) => state.list.filter((share) => ['public'].includes(share.user.type)),
- hasShares: (state) => state.list.length > 0,
- hasLocked: (state, getters) => getters.locked.length > 0,
-}
-
-const actions = {
- async list(context) {
- try {
- const response = await SharesAPI.getShares(context.rootState.route.params.id)
- context.commit('set', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error loading shares', { error }, { pollId: context.rootState.route.params.id })
- throw error
- }
- },
-
- async add(context, payload) {
- try {
- await SharesAPI.addShare(context.rootState.route.params.id, payload.user)
- context.dispatch('list')
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing share', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async switchAdmin(context, payload) {
- const setTo = payload.share.user.type === 'user' ? 'admin' : 'user'
-
- try {
- const response = await SharesAPI.switchAdmin(payload.share.token, setTo)
- context.commit('update', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error(`Error switching type to ${setTo}`, { error }, { payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async setPublicPollEmail(context, payload) {
- try {
- const response = await SharesAPI.setEmailAddressConstraint(payload.share.token, payload.value)
- context.commit('update', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error changing email register setting', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async writeLabel(context, payload) {
- try {
- const response = await SharesAPI.writeLabel(payload.token, payload.label)
- context.commit('update', response.data)
- return response.data
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error writing share label', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async inviteAll(context, payload) {
- try {
- const response = await SharesAPI.inviteAll(payload.pollId)
- context.dispatch('list')
- return response
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error sending invitation', { error, payload })
- context.dispatch('list')
- throw error
- }
-
- },
- async sendInvitation(context, payload) {
- try {
- const response = await SharesAPI.sendInvitation(payload.share.token)
- context.dispatch('list')
- return response
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error sending invitation', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async resolveGroup(context, payload) {
- try {
- await SharesAPI.resolveShare(payload.share.token)
- context.dispatch('list')
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error exploding group', error.response.data, { error, payload })
- throw error
- }
- },
-
- async lock(context, payload) {
- try {
- const response = await SharesAPI.lockShare(payload.share.token)
- context.commit('update', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error locking share', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async unlock(context, payload) {
- try {
- const response = await SharesAPI.unlockShare(payload.share.token)
- context.commit('update', response.data)
-
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error unlocking share', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-
- async delete(context, payload) {
- try {
- const response = await SharesAPI.deleteShare(payload.share.token)
- context.commit('update', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting share', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
- async restore(context, payload) {
- try {
- const response = await SharesAPI.restoreShare(payload.share.token)
- context.commit('update', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error restoring share', { error, payload })
- context.dispatch('list')
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, actions, getters }
diff --git a/src/store/modules/subscription.js b/src/store/modules/subscription.js
deleted file mode 100644
index b2b64e425..000000000
--- a/src/store/modules/subscription.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { PollsAPI, PublicAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-
-const defaultSubscription = () => ({
- subscribed: false,
-})
-
-const namespaced = true
-const state = defaultSubscription()
-
-const mutations = {
-
- set(state, payload) {
- state.subscribed = payload.subscribed
- },
-
- reset(state) {
- Object.assign(state, defaultSubscription())
- },
-
-}
-
-const actions = {
-
- async get(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.getSubscription(context.rootState.route.params.token)
- } else if (context.rootState.route.name === 'vote') {
- response = await PollsAPI.getSubscription(context.rootState.route.params.id)
- } else {
- context.commit('reset')
- return
- }
- context.commit('set', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- context.commit('set', false)
- throw error
- }
- },
-
- async update(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.setSubscription(context.rootState.route.params.token, !context.state.subscribed)
- } else if (context.rootState.route.name === 'vote') {
- response = await PollsAPI.setSubscription(context.rootState.route.params.id, !context.state.subscribed)
- } else {
- context.commit('reset')
- return
- }
- context.commit('set', response.data)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error on changing subscription' , error)
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, actions }
diff --git a/src/store/modules/votes.js b/src/store/modules/votes.js
deleted file mode 100644
index 1d8f45c5c..000000000
--- a/src/store/modules/votes.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import { PublicAPI, VotesAPI } from '../../Api/index.js'
-import { Logger } from '../../helpers/index.js'
-import { t } from '@nextcloud/l10n'
-
-const defaultVotes = () => ({
- list: [],
-})
-
-const namespaced = true
-const state = defaultVotes()
-
-const mutations = {
- set(state, payload) {
- state.list = payload
- },
-
- reset(state) {
- Object.assign(state, defaultVotes())
- },
-
- deleteVotes(state, payload) {
- state.list = state.list.filter((vote) => vote.user.userId !== payload.userId)
- },
-
- setItem(state, payload) {
- const index = state.list.findIndex((vote) =>
- parseInt(vote.pollId) === payload.pollId
- && vote.user.userId === payload.vote.user.userId
- && vote.optionText === payload.option.text)
- if (index > -1) {
- state.list[index] = Object.assign(state.list[index], payload.vote)
- return
- }
- state.list.push(payload.vote)
- },
-}
-
-const getters = {
- countAllVotesByAnswer: (state) => (answer) => state.list.filter((vote) => vote.answer === answer).length,
- hasVotes: (state) => state.list.length > 0,
-
- getVote: (state) => (payload) => {
- const found = state.list.find((vote) => (vote.user.userId === payload.userId
- && vote.optionText === payload.option.text))
- if (found === undefined) {
- return {
- answer: '',
- optionText: payload.option.text,
- userId: payload.userId,
- }
- }
- return found
- },
-}
-
-const actions = {
- async list(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.getVotes(context.rootState.route.params.token)
- } else if (context.rootState.route.name === 'vote') {
- response = await VotesAPI.getVotes(context.rootState.route.params.id)
- } else {
- context.commit('reset')
- return
- }
-
- const votes = []
- response.data.votes.forEach((vote) => {
- if (vote.answer === 'yes') {
- vote.answerTranslated = t('polls', 'Yes')
- vote.answerSymbol = '✔'
- } else if (vote.answer === 'maybe') {
- vote.answerTranslated = t('polls', 'Maybe')
- vote.answerSymbol = '❔'
- } else {
- vote.answerTranslated = t('polls', 'No')
- vote.answerSymbol = '❌'
- }
- votes.push(vote)
- })
- context.commit('set', votes)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- context.commit('reset')
- throw error
- }
- },
-
- async set(context, payload) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.setVote(context.rootState.route.params.token, payload.option.id, payload.setTo)
- } else {
- response = await VotesAPI.setVote(payload.option.id, payload.setTo)
- }
- context.commit('setItem', { option: payload.option, pollId: context.rootState.poll.id, vote: response.data.vote })
- context.dispatch('options/list', null, { root: true })
- context.dispatch('poll/get', null, { root: true })
- return response
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- if (error.response.status === 409) {
- context.dispatch('list')
- context.dispatch('options/list', null, { root: true })
- } else {
- Logger.error('Error setting vote', { error, payload })
- throw error
- }
- }
- },
-
- async resetVotes(context) {
- try {
- let response = null
- if (context.rootState.route.name === 'publicVote') {
- response = await PublicAPI.removeVotes(context.rootState.route.params.token)
- } else {
- response = await VotesAPI.removeUser(context.rootState.route.params.id)
- }
- context.commit('deleteVotes', { userId: response.data.deleted })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting votes', { error })
- throw error
- }
- },
-
- async deleteUser(context, payload) {
- try {
- await VotesAPI.removeUser(context.rootState.route.params.id, payload.userId)
- context.commit('deleteVotes', payload)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting votes', { error, payload })
- throw error
- }
- },
- async removeOrphanedVotes(context, payload) {
- try {
- if (context.rootState.route.name === 'publicVote') {
- await PublicAPI.removeOrphanedVotes(context.rootState.route.params.token)
- } else {
- await VotesAPI.removeOrphanedVotes(context.rootState.route.params.id)
- }
- context.dispatch('poll/get', null, { root: true })
- context.dispatch('options/list', null, { root: true })
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error deleting orphaned votes', { error, payload })
- throw error
- }
- },
-}
-
-export default { namespaced, state, mutations, getters, actions }
diff --git a/src/store/store-polls.js b/src/store/store-polls.js
deleted file mode 100644
index 420547c2b..000000000
--- a/src/store/store-polls.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2019 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import Vue from 'vue'
-import Vuex, { Store } from 'vuex'
-import polls from './modules/polls.js'
-import settings from './modules/settings.js'
-
-Vue.use(Vuex)
-
-export default new Store({
- modules: { polls, settings },
- strict: process.env.NODE_ENV !== 'production',
-})
diff --git a/src/stores/acl.ts b/src/stores/acl.ts
deleted file mode 100644
index df075de83..000000000
--- a/src/stores/acl.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-import { defineStore } from 'pinia'
-import { PublicAPI, UserSettingsAPI } from '../Api/index.js'
-import { User, AppPermissions, UserType } from '../Interfaces/interfaces.ts'
-import { Logger } from '../helpers/index.js'
-import { AppSettings } from './appSettings.ts'
-import { useRouterStore } from './router.ts'
-
-interface Acl {
- token: string,
- currentUser: User,
- appPermissions: AppPermissions
- appSettings: AppSettings
-}
-
-export const useAclStore = defineStore('acl', {
- state: (): Acl => ({
- token: '',
- currentUser: {
- userId: '',
- displayName: '',
- emailAddress: '',
- subName: '',
- subtitle: '',
- isNoUser: true,
- desc: '',
- type: UserType.User,
- id: '',
- user: '',
- organisation: '',
- languageCode: '',
- localeCode: '',
- timeZone: '',
- categories: []
- },
- appPermissions: {
- allAccess: false,
- publicShares: false,
- pollCreation: false,
- seeMailAddresses: false,
- pollDownload: false,
- },
- appSettings: {
- allAccessGroups: [],
- allowCombo: true,
- allowPublicShares: true,
- allowAllAccess: true,
- allowPollCreation: true,
- allowPollDownload: true,
- autoArchive: false,
- autoArchiveOffset: 30,
- defaultPrivacyUrl: '',
- defaultImprintUrl: '',
- disclaimer: '',
- imprintUrl: '',
- legalTermsInEmail: false,
- privacyUrl: '',
- showMailAddresses: false,
- showLogin: true,
- updateType: 'noPolling',
- useActivity: false,
- useCollaboration: true,
- navigationPollsInList: true,
- usePrivacyUrl: '',
- useImprintUrl: '',
- comboGroups: [],
- publicSharesGroups: [],
- pollCreationGroups: [],
- pollDownloadGroups: [],
- showMailAddressesGroups: [],
- },
- }),
-
- actions: {
- async load() {
- const routerStore = useRouterStore()
- try {
- let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.getAcl(routerStore.params.token)
- } else {
- response = await UserSettingsAPI.getAcl()
- }
-
- this.$patch(response.data.acl)
- } catch (error) {
- if (error?.code === 'ERR_CANCELED') return
-
- this.$reset()
- if (routerStore.name === null) {
- // TODO: for some reason unauthorized users first get the root route resulting in a 401
- // and after that the publicVote route is called as next route
- // therefore we just debug the error and reset the acl
-
- Logger.debug('getAcl failed', error)
- this.$reset()
- } else {
- throw error
- }
- }
- },
- },
-})
diff --git a/src/stores/activity.ts b/src/stores/activity.ts
index 7ebd1d5a7..f9886fcfb 100644
--- a/src/stores/activity.ts
+++ b/src/stores/activity.ts
@@ -8,7 +8,7 @@ import { defineStore } from 'pinia'
import { ActivityAPI } from '../Api/index.js'
import { User, AppSettings, AppPermissions } from '../Interfaces/interfaces.ts'
import { Vote } from './votes.ts'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
interface Activity {
token: string,
@@ -28,9 +28,9 @@ export const useActivityStore = defineStore('activity', {
actions: {
async load() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
- const response = await ActivityAPI.getActivities(routerStore.params.id)
+ const response = await ActivityAPI.getActivities(sessionStore.router.params.id)
this.list = response.data.ocs.data
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
diff --git a/src/stores/comments.ts b/src/stores/comments.ts
index 8f61f517b..6063969c4 100644
--- a/src/stores/comments.ts
+++ b/src/stores/comments.ts
@@ -8,7 +8,7 @@ import { defineStore } from 'pinia'
import { CommentsAPI, PublicAPI } from '../Api/index.js'
import { User } from '../Interfaces/interfaces.ts'
import { groupComments, Logger } from '../helpers/index.js'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
interface Comment {
comment: string
@@ -35,13 +35,13 @@ export const useCommentsStore = defineStore('comments', {
},
actions: {
async load() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.getComments(routerStore.params.token)
- } else if (routerStore.name === 'vote') {
- response = await CommentsAPI.getComments(routerStore.params.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.getComments(sessionStore.router.params.token)
+ } else if (sessionStore.router.name === 'vote') {
+ response = await CommentsAPI.getComments(sessionStore.router.params.id)
} else {
this.$reset()
return
@@ -54,12 +54,12 @@ export const useCommentsStore = defineStore('comments', {
},
async add(payload: { message: string }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
- if (routerStore.name === 'publicVote') {
- await PublicAPI.addComment(routerStore.params.token, payload.message)
- } else if (routerStore.name === 'vote') {
- await CommentsAPI.addComment(routerStore.params.id, payload.message)
+ if (sessionStore.router.name === 'publicVote') {
+ await PublicAPI.addComment(sessionStore.router.params.token, payload.message)
+ } else if (sessionStore.router.name === 'vote') {
+ await CommentsAPI.addComment(sessionStore.router.params.id, payload.message)
} else {
this.$reset()
return
@@ -85,11 +85,11 @@ export const useCommentsStore = defineStore('comments', {
},
async delete(payload: { comment: Comment }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.deleteComment(routerStore.params.token, payload.comment.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.deleteComment(sessionStore.router.params.token, payload.comment.id)
} else {
response = await CommentsAPI.deleteComment(payload.comment.id)
}
@@ -104,11 +104,11 @@ export const useCommentsStore = defineStore('comments', {
},
async restore(payload) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.restoreComment(routerStore.params.token, payload.comment.id, { comment: payload.comment })
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.restoreComment(sessionStore.router.params.token, payload.comment.id, { comment: payload.comment })
} else {
response = await CommentsAPI.restoreComment(payload.comment.id)
}
diff --git a/src/stores/options.ts b/src/stores/options.ts
index fd6c155d1..a77b252e4 100644
--- a/src/stores/options.ts
+++ b/src/stores/options.ts
@@ -11,7 +11,7 @@ import { Logger } from '../helpers/index.js'
import moment from '@nextcloud/moment'
import { orderBy } from 'lodash/orderBy'
import { usePollStore, PollType } from './poll.ts'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
interface Sequence {
step: number
@@ -120,14 +120,14 @@ export const useOptionsStore = defineStore('options', {
},
async load() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.getOptions(routerStore.params.token)
- } else if (routerStore.params.id) {
- response = await OptionsAPI.getOptions(routerStore.params.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.getOptions(sessionStore.router.params.token)
+ } else if (sessionStore.router.params.id) {
+ response = await OptionsAPI.getOptions(sessionStore.router.params.id)
} else {
this.$reset()
return
@@ -136,7 +136,7 @@ export const useOptionsStore = defineStore('options', {
this.list = response.data.options
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error loding options', { error, pollId: routerStore.params.id })
+ Logger.error('Error loding options', { error, pollId: sessionStore.router.params.id })
throw error
}
},
@@ -155,14 +155,14 @@ export const useOptionsStore = defineStore('options', {
},
async add(payload: { timestamp: number; text: string; duration: number }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
+ if (sessionStore.router.name === 'publicVote') {
response = await PublicAPI.addOption(
- routerStore.params.token,
+ sessionStore.router.params.token,
{
- pollId: routerStore.params.id,
+ pollId: sessionStore.router.params.id,
timestamp: payload.timestamp,
text: payload.text,
duration: payload.duration,
@@ -171,7 +171,7 @@ export const useOptionsStore = defineStore('options', {
} else {
response = await OptionsAPI.addOption(
{
- pollId: routerStore.params.id,
+ pollId: sessionStore.router.params.id,
timestamp: payload.timestamp,
text: payload.text,
duration: payload.duration,
@@ -199,11 +199,11 @@ export const useOptionsStore = defineStore('options', {
},
async delete(payload: { option: Option }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.deleteOption(routerStore.params.token, payload.option.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.deleteOption(sessionStore.router.params.token, payload.option.id)
} else {
response = await OptionsAPI.deleteOption(payload.option.id)
}
@@ -216,11 +216,11 @@ export const useOptionsStore = defineStore('options', {
},
async restore(payload: { option: Option }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.restoreOption(routerStore.params.token, payload.option.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.restoreOption(sessionStore.router.params.token, payload.option.id)
} else {
response = await OptionsAPI.restoreOption(payload.option.id)
}
@@ -233,9 +233,9 @@ export const useOptionsStore = defineStore('options', {
},
async addBulk(payload: { text: string }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
- const response = await OptionsAPI.addOptions(routerStore.params.id, payload.text)
+ const response = await OptionsAPI.addOptions(sessionStore.router.params.id, payload.text)
this.$patch({ options: response.data.options })
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
@@ -267,14 +267,14 @@ export const useOptionsStore = defineStore('options', {
},
async reorder(payload: { options: Option[] }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
payload.options.forEach((item, i) => {
item.order = i + 1
})
this.list = payload.options
try {
- const response = await OptionsAPI.reorderOptions(routerStore.params.id, payload)
+ const response = await OptionsAPI.reorderOptions(sessionStore.router.params.id, payload)
this.$patch({ options: response.data.options })
} catch (error) {
Logger.error('Error reordering option', { error, payload })
@@ -301,10 +301,10 @@ export const useOptionsStore = defineStore('options', {
},
async shift(payload: { shift: Shift }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
const response = await OptionsAPI.shiftOptions(
- routerStore.params.id,
+ sessionStore.router.params.id,
payload.shift.step,
payload.shift.unit.value,
)
diff --git a/src/stores/poll.ts b/src/stores/poll.ts
index 9ec1fe839..478277035 100644
--- a/src/stores/poll.ts
+++ b/src/stores/poll.ts
@@ -10,11 +10,10 @@ import { User, UserType } from '../Interfaces/interfaces.ts'
import { Logger, uniqueArrayOfObjects } from '../helpers/index.js'
import moment from '@nextcloud/moment'
import { usePreferencesStore } from './preferences.ts'
-import { useAclStore } from './acl.ts'
import { useVotesStore } from './votes.ts'
import { useOptionsStore } from './options.ts'
import { usePollsStore } from './polls.ts'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
import { useSubscriptionStore } from './subscription.ts'
import { t } from '@nextcloud/l10n'
import { useSharesStore } from './shares.ts'
@@ -228,15 +227,15 @@ export const usePollStore = defineStore('poll', {
},
participants(state) {
- const aclStore = useAclStore()
+ const sessionStore = useSessionStore()
const participants = this.participantsVoted
// add current user, if not among participants and voting is allowed
- if (!participants.find((participant) => participant.userId === aclStore.currentUser.userId) && aclStore.currentUser.userId && state.permissions.vote) {
+ if (!participants.find((participant) => participant.userId === sessionStore.currentUser.userId) && sessionStore.currentUser.userId && state.permissions.vote) {
participants.push({
- userId: aclStore.currentUser.userId,
- displayName: aclStore.currentUser.displayName,
- isNoUser: aclStore.currentUser.isNoUser,
+ userId: sessionStore.currentUser.userId,
+ displayName: sessionStore.currentUser.displayName,
+ isNoUser: sessionStore.currentUser.isNoUser,
})
}
@@ -244,12 +243,12 @@ export const usePollStore = defineStore('poll', {
},
safeParticipants() {
- const aclStore = useAclStore()
+ const sessionStore = useSessionStore()
if (this.getSafeTable) {
return [{
- userId: aclStore.currentUser.userId,
- displayName: aclStore.currentUser.displayName,
- isNoUser: aclStore.currentUser.isNoUser,
+ userId: sessionStore.currentUser.userId,
+ displayName: sessionStore.currentUser.displayName,
+ isNoUser: sessionStore.currentUser.isNoUser,
}]
}
return this.participants
@@ -343,22 +342,34 @@ export const usePollStore = defineStore('poll', {
this.update()
},
- async load() {
- const routerStore = useRouterStore()
+ async resetPoll() {
const votesStore = useVotesStore()
- const aclStore = useAclStore()
const optionsStore = useOptionsStore()
const sharesStore = useSharesStore()
const commentsStore = useCommentsStore()
const subscriptionStore = useSubscriptionStore()
+ this.$reset()
+ votesStore.$reset()
+ optionsStore.$reset()
+ sharesStore.$reset()
+ commentsStore.$reset()
+ subscriptionStore.$reset()
+ },
+ async load() {
+ const votesStore = useVotesStore()
+ const sessionStore = useSessionStore()
+ const optionsStore = useOptionsStore()
+ const sharesStore = useSharesStore()
+ const commentsStore = useCommentsStore()
+ const subscriptionStore = useSubscriptionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.getPoll(routerStore.params.token)
- } else if (routerStore.name === 'vote') {
- response = await PollsAPI.getFullPoll(routerStore.params.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.getPoll(sessionStore.router.params.token)
+ } else if (sessionStore.router.name === 'vote') {
+ response = await PollsAPI.getFullPoll(sessionStore.router.params.id)
} else {
this.reset()
return
@@ -370,7 +381,7 @@ export const usePollStore = defineStore('poll', {
sharesStore.list = response.data.shares
commentsStore.list = response.data.comments
subscriptionStore.subscribed = response.data.subscribed
- aclStore.$patch(response.data.acl)
+ sessionStore.$patch(response.data.acl)
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
Logger.error('Error loading poll', { error })
@@ -404,7 +415,7 @@ export const usePollStore = defineStore('poll', {
try {
const response = await PollsAPI.writePoll(this.id, this.configuration)
this.$patch(response.data.poll)
- emit('polls:updated', { store: 'poll', message: t('polls', 'Poll updated') })
+ emit('polls:poll:updated', { store: 'poll', message: t('polls', 'Poll updated') })
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
diff --git a/src/stores/polls.ts b/src/stores/polls.ts
index 5a95a2718..eb406a81f 100644
--- a/src/stores/polls.ts
+++ b/src/stores/polls.ts
@@ -11,8 +11,9 @@ import { PollsAPI } from '../Api/index.js'
import { Poll , PollType } from './poll.ts'
import { t } from '@nextcloud/l10n'
import { Logger } from '../helpers/index.ts'
+import { useSessionStore } from './session.ts'
-export enum sortType {
+export enum SortType {
Created = 'created',
Title = 'title',
Access = 'access',
@@ -20,7 +21,7 @@ export enum sortType {
Expire = 'expire',
}
-export enum filterType {
+export enum FilterType {
Relevant = 'relevant',
My = 'my',
Private = 'private',
@@ -38,7 +39,7 @@ export enum StoreStatus {
}
export interface PollCategory {
- id: filterType
+ id: FilterType
title: string
titleExt: string
description: string
@@ -53,7 +54,6 @@ export interface AppPermissions {
}
export interface Meta {
- currentCategoryId: string
chunksize: number
loadedChunks: number
maxPollsInNavigation: number
@@ -65,7 +65,7 @@ export interface PollList {
list: Poll[]
meta: Meta
sort: {
- by: sortType
+ by: SortType
reverse: boolean
}
categories: PollCategory[]
@@ -96,7 +96,6 @@ export const usePollsStore = defineStore('polls', {
state: (): PollList => ({
list: [],
meta: {
- currentCategoryId: 'relevant',
chunksize: 20,
loadedChunks: 1,
maxPollsInNavigation: 6,
@@ -107,12 +106,12 @@ export const usePollsStore = defineStore('polls', {
},
},
sort: {
- by: sortType.Created,
+ by: SortType.Created,
reverse: true,
},
categories: [
{
- id: filterType.Relevant,
+ id: FilterType.Relevant,
title: t('polls', 'Relevant'),
titleExt: t('polls', 'Relevant polls'),
description: t('polls', 'Relevant polls which are relevant or for you, because you are a participant or the owner or you are invited to.'),
@@ -121,7 +120,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterRelevantCondition(poll),
},
{
- id: filterType.My,
+ id: FilterType.My,
title: t('polls', 'My polls'),
titleExt: t('polls', 'My polls'),
description: t('polls', 'Your polls (in which you are the owner).'),
@@ -130,7 +129,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterMyPolls(poll),
},
{
- id: filterType.Private,
+ id: FilterType.Private,
title: t('polls', 'Private polls'),
titleExt: t('polls', 'Private polls'),
description: t('polls', 'All private polls, to which you have access.'),
@@ -139,7 +138,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterPrivatePolls(poll),
},
{
- id: filterType.Participated,
+ id: FilterType.Participated,
title: t('polls', 'Participated'),
titleExt: t('polls', 'Participated'),
description: t('polls', 'All polls, where you placed a vote.'),
@@ -148,7 +147,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterParticipatedPolls(poll),
},
{
- id: filterType.Open,
+ id: FilterType.Open,
title: t('polls', 'Openly accessible polls'),
titleExt: t('polls', 'Openly accessible polls'),
description: t('polls', 'A complete list with all openly accessible polls on this site, regardless who is the owner.'),
@@ -157,7 +156,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterOpenPolls(poll),
},
{
- id: filterType.All,
+ id: FilterType.All,
title: t('polls', 'All polls'),
titleExt: t('polls', 'All polls'),
description: t('polls', 'All polls, where you have access to.'),
@@ -166,7 +165,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterAllPolls(poll),
},
{
- id: filterType.Closed,
+ id: FilterType.Closed,
title: t('polls', 'Closed polls'),
titleExt: t('polls', 'Closed polls'),
description: t('polls', 'All closed polls, where voting is disabled.'),
@@ -175,7 +174,7 @@ export const usePollsStore = defineStore('polls', {
filterCondition: (poll) => filterClosedPolls(poll),
},
{
- id: filterType.Archived,
+ id: FilterType.Archived,
title: t('polls', 'Archive'),
titleExt: t('polls', 'My archived polls'),
description: t('polls', 'Your archived polls are only accessible to you.'),
@@ -195,20 +194,35 @@ export const usePollsStore = defineStore('polls', {
return state.categories.filter((category) => (!category.createDependent))
},
+ currentCategory(state: PollList): PollCategory | null {
+ const sessionStore = useSessionStore()
+ if (sessionStore.router.name === 'list' && sessionStore.router.params.type) {
+ return state.categories.find((category) => category.id === sessionStore.router.params.type)
+ }
+ return state.categories.find((category) => category.id === 'relevant')
+ },
+
/*
* polls list, filtered by category
*/
- pollsByCategory: (state: PollList) => (filterId: filterType) => {
+ pollsByCategory: (state: PollList) => (filterId: FilterType) => {
const useCategory = state.categories.find((category) => category.id === filterId)
return state.list.filter((poll) => useCategory.filterCondition(poll))
},
+ pollsCount(state: PollList): Array<{ id: string, count: number }> {
+ const count = []
+ for (const category of state.categories) {
+ count[category.id] = state.list.filter((poll) => category.filterCondition(poll)).length
+ }
+ return count
+ },
/*
* polls list, filtered by current category and sorted
*/
pollsFilteredSorted(state: PollList): Poll[] {
return orderBy(
- this.pollsByCategory(state.meta.currentCategoryId),
+ this.pollsByCategory(this.currentCategory.id),
[state.sort.by],
[state.sort.reverse ? 'desc' : 'asc'],
)
@@ -224,7 +238,7 @@ export const usePollsStore = defineStore('polls', {
/*
* Sliced filtered and sorted polls for navigation
*/
- navigationList: (state: PollList) => (filterId: filterType) => {
+ navigationList: (state: PollList) => (filterId: FilterType) => {
const useCategory = state.categories.find((category) => category.id === filterId)
return orderBy(
state.list.filter((poll) => useCategory.filterCondition(poll)),
@@ -257,12 +271,8 @@ export const usePollsStore = defineStore('polls', {
return state.list.filter((poll) => (poll.type === PollType.Date && !poll.status.deleted))
},
- currentCategory(state: PollList): PollCategory {
- return state.categories.find((category) => category.id === state.meta.currentCategoryId)
- },
-
pollsLoading(state): boolean {
- return state.meta.status === 'loading'
+ return state.meta.status === StoreStatus.Loading
},
countByCategory: (state: PollList) => (filterId: string) =>
@@ -275,24 +285,21 @@ export const usePollsStore = defineStore('polls', {
actions: {
async load(): Promise {
- this.setLoadingStatus('loading')
+ this.meta.status = StoreStatus.Loading
try {
const response = await PollsAPI.getPolls()
this.list = response.data.list
this.meta.permissions = response.data.permissions
- this.setLoadingStatus('loaded')
+ this.meta.status = StoreStatus.Loaded
} catch (e) {
- if (e?.code === 'ERR_CANCELED') {
- // this.loadingStatus('loaded')
- return
- }
- this.setLoadingStatus('error')
+ if (e?.code === 'ERR_CANCELED') return
+ this.meta.status = StoreStatus.Error
Logger.error('Error loading polls', { error: e.response })
throw e
}
},
- async setSort(payload: { sortBy: sortType }): Promise {
+ async setSort(payload: { sortBy: SortType }): Promise {
if (this.sort.by === sortColumnsMapping[payload.sortBy]) {
this.sort.reverse = !this.sort.reverse
} else {
@@ -309,15 +316,6 @@ export const usePollsStore = defineStore('polls', {
this.meta.loadedChunks = 1
},
- async setFilter(newCategoryId: string): Promise{
- this.meta.currentCategoryId = newCategoryId
- this.resetChunks()
- },
-
- setLoadingStatus(status: StoreStatus): void {
- this.meta.status = status
- },
-
async clone(payload: { pollId: number }) {
const pollsStore = usePollsStore()
try {
diff --git a/src/stores/pollsAdmin.ts b/src/stores/pollsAdmin.ts
index 51889e497..437d89c46 100644
--- a/src/stores/pollsAdmin.ts
+++ b/src/stores/pollsAdmin.ts
@@ -9,12 +9,15 @@ import { orderBy } from 'lodash'
import { PollsAPI } from '../Api/index.js'
import { Poll } from './poll.ts'
import { getCurrentUser } from '@nextcloud/auth'
-import { sortType, sortColumnsMapping } from './polls.ts'
-
+import { SortType, sortColumnsMapping, StoreStatus } from './polls.ts'
+import { Logger } from '../helpers/index.ts'
export interface PollsAdminList {
list: Poll[]
+ meta: {
+ status: StoreStatus
+ }
sort: {
- by: sortType
+ by: SortType
reverse: boolean
}
}
@@ -22,8 +25,11 @@ export interface PollsAdminList {
export const usePollsAdminStore = defineStore('pollsAdmin', {
state: (): PollsAdminList => ({
list: [],
+ meta: {
+ status: StoreStatus.Loaded,
+ },
sort: {
- by: sortType.Created,
+ by: SortType.Created,
reverse: true,
},
}),
@@ -40,6 +46,7 @@ export const usePollsAdminStore = defineStore('pollsAdmin', {
actions: {
async load(): Promise {
+ this.meta.status = StoreStatus.Loading
if (!getCurrentUser().isAdmin) {
return
}
@@ -47,14 +54,16 @@ export const usePollsAdminStore = defineStore('pollsAdmin', {
try {
const response = await PollsAPI.getPollsForAdmin()
this.list = response.data
+ this.meta.status = StoreStatus.Loaded
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
+ this.meta.status = StoreStatus.Error
console.error('Error loading polls', { error })
throw error
}
},
- async setSort(payload: { sortBy: sortType }): Promise {
+ async setSort(payload: { sortBy: SortType }): Promise {
if (this.sort.by === sortColumnsMapping[payload.sortBy]) {
this.sort.reverse = !this.sort.reverse
} else {
@@ -77,5 +86,30 @@ export const usePollsAdminStore = defineStore('pollsAdmin', {
throw error
}
},
+
+ async delete(payload: { pollId: number }) {
+ try {
+ await PollsAPI.deletePoll(payload.pollId)
+ } catch (error) {
+ if (error?.code === 'ERR_CANCELED') return
+ Logger.error('Error deleting poll', { error, payload })
+ throw error
+ } finally {
+ this.load()
+ }
+ },
+
+ async toggleArchive(payload: { pollId: number }) {
+ try {
+ await PollsAPI.toggleArchive(payload.pollId)
+ } catch (error) {
+ if (error?.code === 'ERR_CANCELED') return
+ Logger.error('Error archiving/restoring poll', { error, payload })
+ throw error
+ } finally {
+ this.load()
+ }
+ },
+
},
})
diff --git a/src/stores/preferences.ts b/src/stores/preferences.ts
index d7bd6a89a..5d96c9e8a 100644
--- a/src/stores/preferences.ts
+++ b/src/stores/preferences.ts
@@ -32,10 +32,18 @@ export interface SessionSettings {
manualViewTextPoll: '' | ViewMode
}
+export interface Calendar {
+ key: string
+ name: string
+ calendarUri: string
+ displayColor: string
+ permissions: number
+}
+
export interface Preferences {
user: UserPreferences
session: SessionSettings,
- availableCalendars: [],
+ availableCalendars: Calendar[],
viewModes: ViewMode[],
}
@@ -95,17 +103,25 @@ export const usePreferencesStore = defineStore('preferences', {
this.availableCalendars = payload.calendars
},
- addCheckCalendar(payload) {
- this.user.checkCalendars.push(payload.key)
+ addCheckCalendar(calendar: Calendar ) {
+ this.user.checkCalendars.push(calendar.key)
+ this.write()
+ },
+
+ removeCheckCalendar(calendar: Calendar) {
+ const index = this.user.checkCalendars.indexOf(calendar.key);
+ if (index !== -1) {
+ this.user.checkCalendars.splice(index, 1);
+ }
this.write()
},
- setViewDatePoll(payload) {
- this.session.manualViewDatePoll = payload
+ setViewDatePoll(viewMode: ViewMode) {
+ this.session.manualViewDatePoll = viewMode
},
- setViewTextPoll(payload) {
- this.session.manualViewTextPoll = payload
+ setViewTextPoll(viewMode: ViewMode) {
+ this.session.manualViewTextPoll = viewMode
},
async load(): Promise {
@@ -135,18 +151,10 @@ export const usePreferencesStore = defineStore('preferences', {
}
},
- resetChunks(): void {
- this.meta.loadedChunks = 1
- },
-
- async setFilter(newCategoryId: string): Promise{
- this.meta.currentCategoryId = newCategoryId
- this.resetChunks()
- },
-
async getCalendars() {
try {
const response = await CalendarAPI.getCalendars()
+ // this.availableCalendars = response.data.calendars
this.setCalendars({ calendars: response.data.calendars })
return response
} catch (error) {
diff --git a/src/stores/router.ts b/src/stores/router.ts
deleted file mode 100644
index 6ebca0602..000000000
--- a/src/stores/router.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/* jshint esversion: 6 */
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-import { defineStore } from 'pinia'
-
-/**
- * Router store
- * TODO: remove this store and replace with injected router
- * Temporary store to hold the current route
- * currently there are problems with the reactivcity of the router, if injected into the stores
- * @return {object} router store
- */
-export const useRouterStore = defineStore('router', {
- state: () => ({
- currentRoute: null,
- name: '',
- path: '',
- params: {
- id: 0,
- token: '',
- }
- }),
-
- actions: {
- async set(payload) {
- this.$patch(payload)
- },
- },
-})
diff --git a/src/stores/session.ts b/src/stores/session.ts
index f2110893e..b47e4e8e8 100644
--- a/src/stores/session.ts
+++ b/src/stores/session.ts
@@ -5,29 +5,29 @@
*/
import { defineStore } from 'pinia'
-import { PublicAPI, UserSettingsAPI } from '../Api/index.js'
+import { getCurrentUser } from '@nextcloud/auth'
+import { PublicAPI, SessionAPI } from '../Api/index.js'
import { User, AppPermissions, UserType } from '../Interfaces/interfaces.ts'
-import { Logger } from '../helpers/index.js'
import { AppSettings } from './appSettings.ts'
-import { useRouterStore } from './router.ts'
+import { usePreferencesStore } from './preferences.ts'
+import { FilterType } from './polls.ts'
+import { PollPermissions, usePollStore } from './poll.ts'
+import { Share } from './share.ts'
enum ViewMode {
TableView = 'table-view',
ListView = 'list-view',
}
-interface UserPreferences {
- useCommentsAlternativeStyling: boolean
- useAlternativeStyling: boolean
- calendarPeek: boolean
- checkCalendars: [],
- checkCalendarsBefore: number,
- checkCalendarsAfter: number,
- defaultViewTextPoll: ViewMode
- defaultViewDatePoll: ViewMode
- performanceThreshold: number,
- pollCombo: number[],
- relevantOffset: number,
+interface Router {
+ currentRoute: string
+ name: string
+ path: string
+ params: {
+ id: number
+ token: string
+ type: FilterType
+ }
}
export interface SessionSettings {
@@ -35,36 +35,26 @@ export interface SessionSettings {
manualViewTextPoll: '' | ViewMode
}
+export interface UserStatus {
+ isLoggedin: boolean
+ isAdmin: boolean
+}
+
interface Session {
token: string
appPermissions: AppPermissions
appSettings: AppSettings
currentUser: User
- preferences: UserPreferences
- params: SessionSettings
+ sessionSettings: SessionSettings
viewModes: ViewMode[]
+ router: Router
+ userStatus: UserStatus
+ share: Share | null
}
export const useSessionStore = defineStore('session', {
state: (): Session => ({
- viewModes: Object.values(ViewMode),
- params: {
- manualViewDatePoll: '',
- manualViewTextPoll: '',
- },
- preferences: {
- useCommentsAlternativeStyling: false,
- useAlternativeStyling: false,
- calendarPeek: false,
- checkCalendars: [],
- checkCalendarsBefore: 0,
- checkCalendarsAfter: 0,
- defaultViewTextPoll: ViewMode.TableView,
- defaultViewDatePoll: ViewMode.TableView,
- performanceThreshold: 1000,
- pollCombo: [],
- relevantOffset: 30,
- },
+ token: '',
currentUser: {
userId: '',
displayName: '',
@@ -82,7 +72,6 @@ export const useSessionStore = defineStore('session', {
timeZone: '',
categories: []
},
- token: '',
appPermissions: {
allAccess: false,
publicShares: false,
@@ -90,6 +79,11 @@ export const useSessionStore = defineStore('session', {
seeMailAddresses: false,
pollDownload: false,
},
+ viewModes: Object.values(ViewMode),
+ sessionSettings: {
+ manualViewDatePoll: '',
+ manualViewTextPoll: '',
+ },
appSettings: {
allAccessGroups: [],
allowCombo: true,
@@ -118,43 +112,86 @@ export const useSessionStore = defineStore('session', {
pollCreationGroups: [],
pollDownloadGroups: [],
showMailAddressesGroups: [],
- }
+ },
+ router: {
+ currentRoute: '',
+ name: '',
+ path: '',
+ params: {
+ id: 0,
+ token: '',
+ type: FilterType.Relevant,
+ }
+ },
+ userStatus: {
+ isLoggedin: !!getCurrentUser(),
+ isAdmin: !!getCurrentUser()?.isAdmin,
+ },
+ share: null,
}),
+ getters: {
+ viewTextPoll(state): ViewMode {
+ const preferencesStore = usePreferencesStore()
+
+ if (state.sessionSettings.manualViewTextPoll) {
+ return state.sessionSettings.manualViewTextPoll
+ }
+ if (window.innerWidth > 480) {
+ return preferencesStore.user.defaultViewTextPoll
+ }
+ return ViewMode.ListView
+ },
+
+ viewDatePoll(state): ViewMode {
+ const preferencesStore = usePreferencesStore()
+ if (state.sessionSettings.manualViewDatePoll) {
+ return state.sessionSettings.manualViewDatePoll
+ }
+ if (window.innerWidth > 480) {
+ return preferencesStore.user.defaultViewDatePoll
+ }
+ return ViewMode.ListView
+ },
+
+ pollPermissions(): PollPermissions {
+ const pollStore = usePollStore()
+ return pollStore.permissions
+ }
+ },
actions: {
async load() {
- const routerStore = useRouterStore()
- const response = {
- acl: null,
- preferences: null,
- }
+ let response = null
try {
- if (routerStore.name === 'publicVote') {
- response.acl = await PublicAPI.getAcl(routerStore.params.token)
+ if (this.router.name === 'publicVote') {
+ response = await PublicAPI.getSession(this.router.params.token)
} else {
- response.acl = await UserSettingsAPI.getAcl()
- response.preferences = await UserSettingsAPI.getUserSettings()
- Logger.debug('getAcl response', response.acl.data)
+ response = await SessionAPI.getSession()
}
- this.$patch(response.acl.data.acl)
- this.$patch({ preferences: response.preferences.data.preferences })
- Logger.debug('Acl loaded', this.$state)
+ this.$patch(response.data)
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
this.$reset()
- if (routerStore.name === null) {
- // TODO: for some reason unauthorized users first get the root route resulting in a 401
- // and after that the publicVote route is called as next route
- // therefore we just debug the error and reset the acl
-
- Logger.debug('getAcl failed', error)
+ if (this.router.name === null) {
this.$reset()
} else {
throw error
}
}
},
+
+ setViewDatePoll(viewMode: ViewMode) {
+ this.sessionSettings.manualViewDatePoll = viewMode
+ },
+
+ setViewTextPoll(viewMode: ViewMode) {
+ this.sessionSettings.manualViewTextPoll = viewMode
+ },
+
+ setRouter(payload: Router) {
+ this.router = payload
+ },
},
})
diff --git a/src/stores/share.ts b/src/stores/share.ts
index 2b02a7701..07abdd426 100644
--- a/src/stores/share.ts
+++ b/src/stores/share.ts
@@ -13,7 +13,7 @@ import { useVotesStore } from './votes.ts'
import { useOptionsStore } from './options.ts'
import { useSubscriptionStore } from './subscription.ts'
import { User, UserType } from '../Interfaces/interfaces.ts'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
export enum InvitationTypes {
Email = 'email',
@@ -100,14 +100,14 @@ export const useShareStore = defineStore('share', {
actions: {
async load() {
- const routerStore = useRouterStore()
- if (routerStore.name !== 'publicVote') {
+ const sessionStore = useSessionStore()
+ if (sessionStore.router.name !== 'publicVote') {
this.$reset()
return
}
try {
- const response = await PublicAPI.getShare(routerStore.params.token)
+ const response = await PublicAPI.getShare(sessionStore.router.params.token)
this.$patch(response.data.share)
return response.data
} catch (error) {
@@ -119,14 +119,14 @@ export const useShareStore = defineStore('share', {
async updateEmailAddress(payload) {
const pollStore = usePollStore()
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
- if (routerStore.name !== 'publicVote') {
+ if (sessionStore.router.name !== 'publicVote') {
return
}
try {
- const response = await PublicAPI.setEmailAddress(routerStore.params.token, payload.emailAddress)
+ const response = await PublicAPI.setEmailAddress(sessionStore.router.params.token, payload.emailAddress)
this.$patch(response.data.share)
pollStore.load()
@@ -142,14 +142,14 @@ export const useShareStore = defineStore('share', {
const commentsStore = useCommentsStore()
const votesStore = useVotesStore()
const optionsStore = useOptionsStore()
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
- if (routerStore.name !== 'publicVote') {
+ if (sessionStore.router.name !== 'publicVote') {
return
}
try {
- const response = await PublicAPI.setDisplayName(routerStore.params.token, payload.displayName)
+ const response = await PublicAPI.setDisplayName(sessionStore.router.params.token, payload.displayName)
this.$patch(response.data.share)
pollStore.load()
commentsStore.load()
@@ -166,14 +166,14 @@ export const useShareStore = defineStore('share', {
async deleteEmailAddress() {
const pollStore = usePollStore()
const subscriptionStore = useSubscriptionStore()
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
- if (routerStore.name !== 'publicVote') {
+ if (sessionStore.router.name !== 'publicVote') {
return
}
try {
- const response = await PublicAPI.deleteEmailAddress(routerStore.params.token)
+ const response = await PublicAPI.deleteEmailAddress(sessionStore.router.params.token)
this.$patch(response.data.share)
subscriptionStore.$state.subscribed = false
subscriptionStore.write()
@@ -186,13 +186,13 @@ export const useShareStore = defineStore('share', {
},
async resendInvitation(payload) {
- const routerStore = useRouterStore()
- if (routerStore.name !== 'publicVote') {
+ const sessionStore = useSessionStore()
+ if (sessionStore.router.name !== 'publicVote') {
return
}
try {
- return await PublicAPI.resendInvitation(routerStore.params.token)
+ return await PublicAPI.resendInvitation(sessionStore.router.params.token)
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
Logger.error('Error sending invitation', { error, payload })
diff --git a/src/stores/shares.ts b/src/stores/shares.ts
index 5468f3f1a..cfd72b128 100644
--- a/src/stores/shares.ts
+++ b/src/stores/shares.ts
@@ -8,7 +8,7 @@ import { defineStore } from 'pinia'
import { SharesAPI } from '../Api/index.js'
import { Logger } from '../helpers/index.js'
import { Share } from './share.ts'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
import { User, UserType } from '../Interfaces/interfaces.ts'
@@ -48,21 +48,21 @@ export const useSharesStore = defineStore('shares', {
actions: {
async load(): Promise{
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
- const response = await SharesAPI.getShares(routerStore.params.id)
+ const response = await SharesAPI.getShares(sessionStore.router.params.id)
this.list = response.data.shares
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
- Logger.error('Error loading shares', { error, pollId: routerStore.params.id })
+ Logger.error('Error loading shares', { error, pollId: sessionStore.router.params.id })
throw error
}
},
async add(payload: { user: User }): Promise {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
- await SharesAPI.addShare(routerStore.params.id, payload.user)
+ await SharesAPI.addShare(sessionStore.router.params.id, payload.user)
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
Logger.error('Error writing share', { error, payload })
diff --git a/src/stores/subscription.ts b/src/stores/subscription.ts
index 6afc555e1..9d545253c 100644
--- a/src/stores/subscription.ts
+++ b/src/stores/subscription.ts
@@ -7,7 +7,7 @@
import { defineStore } from 'pinia'
import { PublicAPI, PollsAPI } from '../Api/index.js'
import { Logger } from '../helpers/index.js'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
interface Subscription {
subscribed: boolean
@@ -20,13 +20,13 @@ export const useSubscriptionStore = defineStore('subscription', {
actions: {
async load() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.getSubscription(routerStore.params.token)
- } else if (routerStore.name === 'vote') {
- response = await PollsAPI.getSubscription(routerStore.params.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.getSubscription(sessionStore.router.params.token)
+ } else if (sessionStore.router.name === 'vote') {
+ response = await PollsAPI.getSubscription(sessionStore.router.params.id)
} else {
this.$reset()
return
@@ -40,13 +40,13 @@ export const useSubscriptionStore = defineStore('subscription', {
},
async write() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.setSubscription(routerStore.params.token, !this.subscribed)
- } else if (routerStore.name === 'vote') {
- response = await PollsAPI.setSubscription(routerStore.params.id, !this.subscribed)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.setSubscription(sessionStore.router.params.token, !this.subscribed)
+ } else if (sessionStore.router.name === 'vote') {
+ response = await PollsAPI.setSubscription(sessionStore.router.params.id, !this.subscribed)
} else {
this.$reset()
return
diff --git a/src/stores/votes.ts b/src/stores/votes.ts
index cda000ad4..fb08d9a0b 100644
--- a/src/stores/votes.ts
+++ b/src/stores/votes.ts
@@ -11,7 +11,7 @@ import { Logger } from '../helpers/index.js'
import { t } from '@nextcloud/l10n'
import { Option, useOptionsStore } from './options.ts'
import { usePollStore } from './poll.ts'
-import { useRouterStore } from './router.ts'
+import { useSessionStore } from './session.ts'
export enum Answer {
Yes = 'yes',
@@ -69,14 +69,14 @@ export const useVotesStore = defineStore('votes', {
},
async load() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.getVotes(routerStore.params.token)
- } else if (routerStore.name === 'vote') {
- Logger.debug('Loading votes for poll', { pollId: routerStore.params.id })
- response = await VotesAPI.getVotes(routerStore.params.id)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.getVotes(sessionStore.router.params.token)
+ } else if (sessionStore.router.name === 'vote') {
+ Logger.debug('Loading votes for poll', { pollId: sessionStore.router.params.id })
+ response = await VotesAPI.getVotes(sessionStore.router.params.id)
} else {
this.$reset()
return
@@ -118,13 +118,13 @@ export const useVotesStore = defineStore('votes', {
},
async set(payload: { option: Option; setTo: Answer }) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
const optionsStore = useOptionsStore()
const pollStore = usePollStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.setVote(routerStore.params.token, payload.option.id, payload.setTo)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.setVote(sessionStore.router.params.token, payload.option.id, payload.setTo)
} else {
response = await VotesAPI.setVote(payload.option.id, payload.setTo)
}
@@ -145,13 +145,13 @@ export const useVotesStore = defineStore('votes', {
},
async resetVotes() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
let response = null
- if (routerStore.name === 'publicVote') {
- response = await PublicAPI.removeVotes(routerStore.params.token)
+ if (sessionStore.router.name === 'publicVote') {
+ response = await PublicAPI.removeVotes(sessionStore.router.params.token)
} else {
- response = await VotesAPI.removeUser(routerStore.params.id)
+ response = await VotesAPI.removeUser(sessionStore.router.params.id)
}
this.list = this.list.filter((vote: Vote) => vote.user.userId !== response.data.deleted)
@@ -163,9 +163,9 @@ export const useVotesStore = defineStore('votes', {
},
async deleteUser(payload) {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
try {
- await VotesAPI.removeUser(routerStore.params.id, payload.userId)
+ await VotesAPI.removeUser(sessionStore.router.params.id, payload.userId)
this.list = this.list.filter((vote: Vote) => vote.user.userId !== payload.userId)
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
@@ -175,14 +175,14 @@ export const useVotesStore = defineStore('votes', {
},
async removeOrphanedVotes() {
- const routerStore = useRouterStore()
+ const sessionStore = useSessionStore()
const pollStore = usePollStore()
const optionsStore = useOptionsStore()
try {
- if (routerStore.name === 'publicVote') {
- await PublicAPI.removeOrphanedVotes(routerStore.params.token)
+ if (sessionStore.router.name === 'publicVote') {
+ await PublicAPI.removeOrphanedVotes(sessionStore.router.params.token)
} else {
- await VotesAPI.removeOrphanedVotes(routerStore.params.id)
+ await VotesAPI.removeOrphanedVotes(sessionStore.router.params.id)
}
pollStore.load()
optionsStore.load()
diff --git a/src/views/AdminSettingsPage.vue b/src/views/AdminSettingsPage.vue
index 7963a2d49..2f012cfb9 100644
--- a/src/views/AdminSettingsPage.vue
+++ b/src/views/AdminSettingsPage.vue
@@ -43,6 +43,7 @@
diff --git a/src/views/Administration.vue b/src/views/Administration.vue
index aafe5f3b3..1a914ffb4 100644
--- a/src/views/Administration.vue
+++ b/src/views/Administration.vue
@@ -9,7 +9,7 @@
{{ t('polls', 'Administrative poll management') }}
- {{ t('polls', 'Manage polls of other accounts. You can take over the ownership or delete pollsStore.') }}
+ {{ t('polls', 'Manage polls of other accounts. You can take over the ownership or delete polls.') }}
@@ -63,7 +63,7 @@
-
+
@@ -127,7 +127,6 @@ import RestorePollIcon from 'vue-material-design-icons/Recycle.vue'
import PlusIcon from 'vue-material-design-icons/Plus.vue'
import PollItem from '../components/PollList/PollItem.vue'
import { t } from '@nextcloud/l10n'
-import { usePollsStore } from '../stores/polls.ts'
import { usePollsAdminStore } from '../stores/pollsAdmin.ts'
export default {
@@ -164,10 +163,10 @@ export default {
},
computed: {
- ...mapStores(usePollsStore, usePollsAdminStore),
+ ...mapStores(usePollsAdminStore),
emptyContent() {
- if (this.pollsStore.status.loading) {
+ if (this.pollsAdminStore.status.loading) {
return {
name: t('polls', 'Loading polls…'),
description: '',
@@ -208,6 +207,10 @@ export default {
},
},
+ created() {
+ this.loadPolls()
+ },
+
mounted() {
this.refreshView()
},
@@ -228,7 +231,7 @@ export default {
async toggleArchive(pollId) {
try {
- await this.pollsStore.toggleArchive({ pollId })
+ await this.pollsAdminStore.toggleArchive({ pollId })
} catch {
showError(t('polls', 'Error archiving/restoring poll.'))
}
@@ -236,7 +239,7 @@ export default {
async deletePoll() {
try {
- await this.pollsStore.delete({ pollId: this.currentPoll.pollId })
+ await this.pollsAdminStore.delete({ pollId: this.currentPoll.pollId })
this.deleteModal = false
} catch {
showError(t('polls', 'Error deleting poll.'))
@@ -254,6 +257,14 @@ export default {
}
},
+ async loadPolls() {
+ try {
+ this.pollsAdminStore.load()
+ } catch {
+ showError(t('polls', 'Error loading polls list for admins'))
+ }
+ },
+
refreshView() {
window.document.title = `${t('polls', 'Polls')} - ${this.title}`
},
diff --git a/src/views/Navigation.vue b/src/views/Navigation.vue
index f907be2f1..c51d8fbb1 100644
--- a/src/views/Navigation.vue
+++ b/src/views/Navigation.vue
@@ -15,7 +15,7 @@
@@ -24,10 +24,10 @@
- {{ pollsStore.pollsByCategory(pollCategory.id).length }}
+ {{ pollsStore.pollsCount[pollCategory.id] }}
-
+
-
@@ -72,7 +72,7 @@ import SidebarActivityIcon from 'vue-material-design-icons/LightningBolt.vue'
import { SideBarTabConfiguration, SideBarTabComments, SideBarTabOptions, SideBarTabShare, SideBarTabActivity } from '../components/SideBar/index.js'
import { t } from '@nextcloud/l10n'
import { usePollStore } from '../stores/poll.ts'
-import { useAclStore } from '../stores/acl.ts'
+import { useSessionStore } from '../stores/session.ts'
export default {
name: 'SideBar',
@@ -100,7 +100,7 @@ export default {
},
computed: {
- ...mapStores(usePollStore, useAclStore),
+ ...mapStores(usePollStore, useSessionStore),
},
created() {
diff --git a/src/views/UserSettingsPage.vue b/src/views/UserSettingsPage.vue
index efcfafba3..3892f54ec 100644
--- a/src/views/UserSettingsPage.vue
+++ b/src/views/UserSettingsPage.vue
@@ -24,10 +24,12 @@
diff --git a/src/views/Vote.vue b/src/views/Vote.vue
index 468174292..5eca422ee 100644
--- a/src/views/Vote.vue
+++ b/src/views/Vote.vue
@@ -20,7 +20,7 @@
-
+
@@ -52,6 +52,7 @@
diff --git a/src/components/Settings/UserSettings/CalendarSettings.vue b/src/components/Settings/UserSettings/CalendarSettings.vue
index 906bc5b23..11b7c1a82 100644
--- a/src/components/Settings/UserSettings/CalendarSettings.vue
+++ b/src/components/Settings/UserSettings/CalendarSettings.vue
@@ -6,9 +6,9 @@
-
+ @update:model-value="preferencesStore.write()">
{{ t('polls', 'Use calendar lookup for conflicting calendar events') }}
@@ -16,9 +16,9 @@
{{ t('polls', 'Select the calendars to use for lookup.') }}
-
+ @update:model-value="clickedCalendar(calendar)">
{{ calendar.name }}
@@ -54,13 +54,14 @@
diff --git a/src/Interfaces/interfaces.ts b/src/Interfaces/interfaces.ts
index dc8de3df7..f18250ad6 100644
--- a/src/Interfaces/interfaces.ts
+++ b/src/Interfaces/interfaces.ts
@@ -4,7 +4,14 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-export interface PollPermissions {
+export enum StatusResults {
+ Error = 'error',
+ Warning = 'warning',
+ Success = 'success',
+ Loading = 'loading',
+ Loaded = 'loaded',
+}
+export type PollPermissions = {
addOptions: boolean
archive: boolean
comment: boolean
@@ -29,11 +36,19 @@ export enum UserType {
ContactGroup = 'contactGroup'
}
+export enum VirtualUserItemType {
+ AddPublicLink = 'addPublicLink',
+ InternalAccess = 'internalAccess',
+ Deleted = 'deleted',
+ Anonymous = 'anonymous',
+ None = '',
+}
+
export enum UpdateType {
NoPolling = 'noPolling'
}
-export interface AppSettings {
+export type AppSettings = {
usePrivacyUrl: string,
useImprintUrl: string,
useLogin: boolean
@@ -42,7 +57,7 @@ export interface AppSettings {
updateType: UpdateType,
}
-export interface AppPermissions {
+export type AppPermissions = {
allAccess: boolean
publicShares: boolean
pollCreation: boolean
@@ -50,7 +65,7 @@ export interface AppPermissions {
pollDownload: boolean
}
-export interface User {
+export type User = {
userId: string
displayName: string
emailAddress: string
diff --git a/src/components/Actions/modules/ActionChangeView.vue b/src/components/Actions/modules/ActionChangeView.vue
index 08c23b2e6..e134f91fb 100644
--- a/src/components/Actions/modules/ActionChangeView.vue
+++ b/src/components/Actions/modules/ActionChangeView.vue
@@ -3,6 +3,46 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
+
+
-
diff --git a/src/components/Base/modules/InputDiv.vue b/src/components/Base/modules/InputDiv.vue
index 1aa1366c2..0d5c288fa 100644
--- a/src/components/Base/modules/InputDiv.vue
+++ b/src/components/Base/modules/InputDiv.vue
@@ -18,7 +18,7 @@ const model = defineModel({
type: String | Number,
})
-const vFocus = {
+const vInputFocus = {
mounted: (el) => {
if (props.focus) el.focus()
}
@@ -190,7 +190,7 @@ onMounted(() => {
-
@@ -40,72 +40,50 @@
-
diff --git a/src/views/NotFound.vue b/src/views/NotFound.vue
index df84b725a..28377f54a 100644
--- a/src/views/NotFound.vue
+++ b/src/views/NotFound.vue
@@ -3,6 +3,17 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
+
+
@@ -12,27 +23,3 @@
-
-
From 54b97c216ee45d61cd8c02d61afbd1b33d1f6942 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?=
Date: Thu, 11 Jul 2024 10:06:27 +0200
Subject: [PATCH 046/178] fix: Catch exceptions thrown by NotificationMail
constructor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously when constructor would throw, it would stop there and on the
next run the notifications before the broken one would get resent.
Exceptions from constructor are now caught and the process continues.
Signed-off-by: Côme Chilliet
---
lib/Service/MailService.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php
index 020c443a1..7fd39db84 100644
--- a/lib/Service/MailService.php
+++ b/lib/Service/MailService.php
@@ -156,15 +156,14 @@ public function sendNotifications(): void {
}
foreach ($subscriptions as $subscription) {
- $subscription->setNotifyLogs($this->logs);
- $notication = new NotificationMail($subscription);
-
try {
+ $subscription->setNotifyLogs($this->logs);
+ $notication = new NotificationMail($subscription);
$notication->send();
} catch (InvalidEmailAddress $e) {
- $this->logger->warning('Invalid or no email address for notification: ' . json_encode($subscription));
+ $this->logger->warning('Invalid or no email address for notification: ' . json_encode($subscription), ['exception' => $e]);
} catch (\Exception $e) {
- $this->logger->error('Error sending notification to ' . json_encode($subscription));
+ $this->logger->error('Error sending notification to ' . json_encode($subscription), ['exception' => $e]);
continue;
}
}
From 7afcca0438ad6f14c9f5c9c3c32a4aba80ba4312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Gieling?=
<26707476+dartcafe@users.noreply.github.com>
Date: Mon, 15 Jul 2024 20:28:08 +0200
Subject: [PATCH 047/178] Update MailService.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
fixed typo
Signed-off-by: René Gieling <26707476+dartcafe@users.noreply.github.com>
---
lib/Service/MailService.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php
index 7fd39db84..df0a52ff0 100644
--- a/lib/Service/MailService.php
+++ b/lib/Service/MailService.php
@@ -158,8 +158,8 @@ public function sendNotifications(): void {
foreach ($subscriptions as $subscription) {
try {
$subscription->setNotifyLogs($this->logs);
- $notication = new NotificationMail($subscription);
- $notication->send();
+ $notification = new NotificationMail($subscription);
+ $notification->send();
} catch (InvalidEmailAddress $e) {
$this->logger->warning('Invalid or no email address for notification: ' . json_encode($subscription), ['exception' => $e]);
} catch (\Exception $e) {
From 3af3753cba8d45a949a2511ada826fc2f636041d Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Mon, 15 Jul 2024 22:45:56 +0200
Subject: [PATCH 048/178] following linter messages
Signed-off-by: dartcafe
---
src/App.vue | 20 +-
.../Actions/modules/ActionDelete.vue | 191 ++++---
.../Actions/modules/ActionSendConfirmed.vue | 97 ++--
src/components/Activity/ActivityItem.vue | 136 +++--
src/components/AppIcons/modules/MaybeIcon.vue | 56 +--
.../AppIcons/modules/PollsAppIcon.vue | 59 +--
src/components/AppIcons/modules/Spinner.vue | 57 ++-
src/components/Base/modules/RadioGroupDiv.vue | 15 +-
.../Cards/modules/CardSendConfirmations.vue | 65 ++-
.../Configuration/ConfigOptionLimit.vue | 54 +-
.../Configuration/ConfigVoteLimit.vue | 79 ++-
src/components/Export/ExportPoll.vue | 326 ++++++------
.../Navigation/PollNavigationItems.vue | 86 ++--
src/components/Options/OptionCloneDate.vue | 103 ++--
src/components/Options/OptionsDateAdd.vue | 467 +++++++++---------
src/components/Poll/PollHeaderButtons.vue | 74 ++-
src/components/Poll/PublicEmail.vue | 2 +-
src/components/Public/PublicRegisterModal.vue | 392 ++++++++-------
src/components/SideBar/SideBarTabActivity.vue | 67 +--
src/components/SideBar/SideBarTabComments.vue | 80 ++-
.../SideBar/SideBarTabConfiguration.vue | 154 +++---
.../SideBar/SideBarTabDatePolls.vue | 29 +-
src/components/SideBar/SideBarTabOptions.vue | 137 +++--
src/components/SideBar/SideBarTabShare.vue | 52 +-
src/components/User/UserItem.vue | 74 +--
src/components/VoteTable/VoteIndicator.vue | 90 ++--
src/composables/context.ts | 4 +
src/composables/handleScroll.ts | 32 ++
src/event-bus.d.ts | 16 +
src/router.ts | 18 +-
src/stores/options.ts | 1 -
src/views/SideBar.vue | 116 ++---
src/views/Vote.vue | 216 ++++----
33 files changed, 1581 insertions(+), 1784 deletions(-)
create mode 100644 src/composables/handleScroll.ts
create mode 100644 src/event-bus.d.ts
diff --git a/src/App.vue b/src/App.vue
index be6991a11..0ce9ab098 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,7 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
-
+
-
-
+../Types/index.ts
\ No newline at end of file
From 40aa5f08332acf654ddaf5605ba89b31e0e298de Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Sun, 21 Jul 2024 13:26:16 +0200
Subject: [PATCH 055/178] fine tuning and maintenance
Signed-off-by: dartcafe
---
.eslintrc.cjs | 4 +
src/App.vue | 144 +++----
src/Exceptions/Exceptions.js | 1 -
src/Types/index.ts | 58 +--
src/adminSettings.ts | 1 -
.../Actions/modules/ActionChangeView.vue | 66 +--
.../Actions/modules/ActionDelete.vue | 150 +++----
.../modules/ActionDeleteOrphanedVotes.vue | 10 +-
.../modules/ActionOpenOptionsSidebar.vue | 14 +-
.../modules/ActionOpenSharesSidebar.vue | 14 +-
.../Actions/modules/ActionRegister.vue | 14 +-
.../Actions/modules/ActionSendConfirmed.vue | 73 ++--
.../Actions/modules/ActionSortOptions.vue | 38 +-
.../Actions/modules/ActionSwitchSafeTable.vue | 10 +-
.../Actions/modules/ActionToggleSidebar.vue | 16 +-
src/components/Activity/Activities.vue | 6 +-
src/components/Activity/ActivityItem.vue | 131 +++---
src/components/AppIcons/modules/MaybeIcon.vue | 34 +-
.../AppIcons/modules/PollsAppIcon.vue | 34 +-
src/components/AppIcons/modules/Spinner.vue | 34 +-
src/components/Base/modules/BadgeDiv.vue | 16 +-
src/components/Base/modules/ConfigBox.vue | 32 +-
src/components/Base/modules/FlexSpacer.vue | 14 +-
src/components/Base/modules/HeaderBar.vue | 16 +-
src/components/Base/modules/InputDiv.vue | 313 +++++++-------
.../Base/modules/IntersectionObserver.vue | 41 +-
.../Base/modules/LoadingOverlay.vue | 2 +-
src/components/Base/modules/QrModal.vue | 71 ++-
src/components/Base/modules/RadioGroupDiv.vue | 50 +--
src/components/Calendar/CalendarInfo.vue | 130 +++---
src/components/Calendar/CalendarPeek.vue | 96 ++---
src/components/Cards/VoteInfoCards.vue | 44 +-
.../Cards/modules/CardAddProposals.vue | 16 +-
.../Cards/modules/CardAnonymousPollHint.vue | 6 +-
.../Cards/modules/CardClosedPoll.vue | 10 +-
.../Cards/modules/CardHiddenParticipants.vue | 12 +-
.../Cards/modules/CardLimitedVotes.vue | 18 +-
src/components/Cards/modules/CardLocked.vue | 14 +-
src/components/Cards/modules/CardRegister.vue | 32 +-
.../Cards/modules/CardSendConfirmations.vue | 46 +-
.../Cards/modules/CardUnpublishedPoll.vue | 12 +-
src/components/Combo/ComboTable.vue | 24 +-
src/components/Combo/VoteColumn.vue | 28 +-
src/components/Combo/VoteItem.vue | 67 ++-
src/components/Comments/CommentAdd.vue | 36 +-
src/components/Comments/CommentItem.vue | 78 ++--
src/components/Comments/Comments.vue | 18 +-
.../Configuration/ConfigAllowComment.vue | 8 +-
.../Configuration/ConfigAllowMayBe.vue | 10 +-
.../Configuration/ConfigAnonymous.vue | 8 +-
.../Configuration/ConfigClosing.vue | 94 ++--
.../Configuration/ConfigOptionLimit.vue | 40 +-
.../Configuration/ConfigProposals.vue | 96 ++---
.../Configuration/ConfigShowResults.vue | 18 +-
src/components/Configuration/ConfigTitle.vue | 22 +-
src/components/Configuration/ConfigUseNo.vue | 10 +-
.../Configuration/ConfigVoteLimit.vue | 54 +--
src/components/Create/CreateDlg.vue | 68 ++-
src/components/Export/ExportPoll.vue | 280 ++++++------
.../Navigation/PollNavigationItems.vue | 40 +-
src/components/Options/Counter.vue | 28 +-
src/components/Options/OptionCloneDate.vue | 76 ++--
src/components/Options/OptionItem.vue | 224 +++++-----
src/components/Options/OptionItemOwner.vue | 52 +--
src/components/Options/OptionProposals.vue | 6 +-
src/components/Options/OptionsDate.vue | 54 +--
src/components/Options/OptionsDateAdd.vue | 356 +++++++--------
src/components/Options/OptionsDateShift.vue | 30 +-
src/components/Options/OptionsText.vue | 81 ++--
src/components/Options/OptionsTextAdd.vue | 50 +--
src/components/Options/OptionsTextAddBulk.vue | 56 +--
src/components/Poll/MarkUpDescription.vue | 26 +-
src/components/Poll/PollHeaderButtons.vue | 39 +-
src/components/Poll/PollInfoLine.vue | 222 +++++-----
src/components/Poll/PollInformation.vue | 131 +++---
src/components/PollList/PollItem.vue | 160 +++----
src/components/Public/PublicRegisterModal.vue | 406 ++++++++---------
.../AdminSettings/AdminActivities.vue | 8 +-
.../AdminSettings/AdminArchivePolls.vue | 10 +-
.../Settings/AdminSettings/AdminCombo.vue | 8 +-
.../Settings/AdminSettings/AdminEmail.vue | 34 +-
.../Settings/AdminSettings/AdminJobs.vue | 112 ++---
.../Settings/AdminSettings/AdminLegal.vue | 32 +-
.../AdminSettings/AdminPerformance.vue | 18 +-
.../AdminSettings/AdminPollCreation.vue | 8 +-
.../AdminSettings/AdminPollDownload.vue | 8 +-
.../AdminSettings/AdminPollsInNavigation.vue | 8 +-
.../AdminSettings/AdminShareOpenPoll.vue | 8 +-
.../AdminSettings/AdminSharePublicCreate.vue | 8 +-
.../AdminSharePublicShowLogin.vue | 8 +-
.../AdminSettings/AdminShowMailAddresses.vue | 8 +-
.../UserSettings/CalendarSettings.vue | 36 +-
.../Settings/UserSettings/FeatureSettings.vue | 44 +-
src/components/Settings/UserSettingsDlg.vue | 52 +--
src/components/Shares/ShareItem.vue | 248 +++++------
src/components/Shares/ShareItemAllUsers.vue | 34 +-
src/components/Shares/SharePublicAdd.vue | 52 +--
src/components/Shares/SharesList.vue | 56 +--
src/components/Shares/SharesListLocked.vue | 22 +-
src/components/Shares/SharesListUnsent.vue | 50 +--
src/components/SideBar/SideBarTabActivity.vue | 36 +-
src/components/SideBar/SideBarTabComments.vue | 44 +-
.../SideBar/SideBarTabConfiguration.vue | 120 +++---
.../SideBar/SideBarTabDatePolls.vue | 10 +-
src/components/SideBar/SideBarTabOptions.vue | 110 +++--
.../Subscription/ActionSubscription.vue | 20 +-
src/components/Subscription/Subscription.vue | 22 +-
.../User/ActionInputDisplayName.vue | 116 ++---
.../User/ActionInputEmailAddress.vue | 106 ++---
src/components/User/UserItem.vue | 408 +++++++++---------
src/components/User/UserMenu.vue | 156 +++----
src/components/User/UserSearch.vue | 80 ++--
src/components/VoteTable/VoteColumn.vue | 104 ++---
src/components/VoteTable/VoteIndicator.vue | 77 ++--
src/components/VoteTable/VoteItem.vue | 110 ++---
src/components/VoteTable/VoteTable.vue | 58 +--
src/composables/watchPolls.ts | 8 +-
src/constants/dateUnits.ts | 1 -
src/dashboard.ts | 1 -
src/helpers/index.js | 10 -
src/helpers/index.ts | 2 +-
.../{GuestBubble.js => GuestBubble.ts} | 11 +-
src/helpers/modules/SimpleLink.js | 34 --
src/helpers/modules/arrayHelper.js | 102 -----
src/helpers/modules/arrayHelper.ts | 1 -
src/helpers/modules/comments.js | 74 ----
src/helpers/modules/comments.ts | 1 -
src/helpers/modules/cookieHelper.js | 63 ---
src/helpers/modules/cookieHelper.ts | 1 -
src/helpers/modules/logger.js | 14 -
src/helpers/modules/logger.ts | 1 -
src/main.ts | 1 -
src/mixins/dateMixins.js | 1 -
src/mixins/watchPolls.js | 8 +-
src/router.ts | 5 +-
src/stores/activity.ts | 5 +-
src/stores/appSettings.ts | 3 +-
src/stores/combo.ts | 7 +-
src/stores/comments.ts | 5 +-
src/stores/index.ts | 1 -
src/stores/options.ts | 13 +-
src/stores/poll.ts | 15 +-
src/stores/polls.ts | 20 +-
src/stores/pollsAdmin.ts | 1 -
src/stores/preferences.ts | 5 +-
src/stores/session.ts | 17 +-
src/stores/share.ts | 37 +-
src/stores/shares.ts | 15 +-
src/stores/subscription.ts | 5 +-
src/stores/votes.ts | 7 +-
src/userSettings.ts | 1 -
src/views/AdminSettingsPage.vue | 90 ++--
src/views/Administration.vue | 170 ++++----
src/views/Combo.vue | 48 +--
src/views/Dashboard.vue | 82 ++--
src/views/Navigation.vue | 240 +++++------
src/views/NotFound.vue | 14 +-
src/views/PollList.vue | 212 ++++-----
src/views/SideBar.vue | 74 ++--
src/views/SideBarCombo.vue | 16 +-
src/views/UserSettingsPage.vue | 62 +--
src/views/Vote.vue | 182 ++++----
tsconfig.json | 4 +
163 files changed, 4309 insertions(+), 4669 deletions(-)
delete mode 100644 src/helpers/index.js
rename src/helpers/modules/{GuestBubble.js => GuestBubble.ts} (58%)
delete mode 100644 src/helpers/modules/SimpleLink.js
delete mode 100644 src/helpers/modules/arrayHelper.js
delete mode 100644 src/helpers/modules/comments.js
delete mode 100644 src/helpers/modules/cookieHelper.js
delete mode 100644 src/helpers/modules/logger.js
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index fc4ff9db6..5d232cdf5 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -24,6 +24,10 @@ module.exports = {
'no-negated-condition': 'error',
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'prefer-template': 'error',
+ 'vue/script-indent': ['error', 'tab', {
+ baseIndent: 1,
+ switchCase: 1,
+ }],
'vue/no-v-model-argument': 'off',
'vue/no-unused-properties': ['error', {
groups: ['props', 'data', 'computed', 'methods'],
diff --git a/src/App.vue b/src/App.vue
index 60336541b..58447f7d4 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,87 +4,87 @@
-->
@@ -50,7 +50,7 @@ function changeView(): void {
:aria-label="caption"
@click="clickAction()">
-
+
diff --git a/src/components/Actions/modules/ActionDelete.vue b/src/components/Actions/modules/ActionDelete.vue
index 8dabc9067..beec05010 100644
--- a/src/components/Actions/modules/ActionDelete.vue
+++ b/src/components/Actions/modules/ActionDelete.vue
@@ -4,93 +4,93 @@
-->
diff --git a/src/components/Actions/modules/ActionDeleteOrphanedVotes.vue b/src/components/Actions/modules/ActionDeleteOrphanedVotes.vue
index a4b68dfb4..ee3488568 100644
--- a/src/components/Actions/modules/ActionDeleteOrphanedVotes.vue
+++ b/src/components/Actions/modules/ActionDeleteOrphanedVotes.vue
@@ -4,12 +4,12 @@
-->
diff --git a/src/components/Actions/modules/ActionOpenOptionsSidebar.vue b/src/components/Actions/modules/ActionOpenOptionsSidebar.vue
index 6974076c1..8f3f39d48 100644
--- a/src/components/Actions/modules/ActionOpenOptionsSidebar.vue
+++ b/src/components/Actions/modules/ActionOpenOptionsSidebar.vue
@@ -4,15 +4,15 @@
-->
diff --git a/src/components/Actions/modules/ActionOpenSharesSidebar.vue b/src/components/Actions/modules/ActionOpenSharesSidebar.vue
index bbeaa9533..3342a7750 100644
--- a/src/components/Actions/modules/ActionOpenSharesSidebar.vue
+++ b/src/components/Actions/modules/ActionOpenSharesSidebar.vue
@@ -4,15 +4,15 @@
-->
diff --git a/src/components/Actions/modules/ActionRegister.vue b/src/components/Actions/modules/ActionRegister.vue
index 7ea09b415..4a58f227e 100644
--- a/src/components/Actions/modules/ActionRegister.vue
+++ b/src/components/Actions/modules/ActionRegister.vue
@@ -4,14 +4,14 @@
-->
diff --git a/src/components/Actions/modules/ActionSendConfirmed.vue b/src/components/Actions/modules/ActionSendConfirmed.vue
index 3a55cc55e..bcbef52cd 100644
--- a/src/components/Actions/modules/ActionSendConfirmed.vue
+++ b/src/components/Actions/modules/ActionSendConfirmed.vue
@@ -4,45 +4,48 @@
-->
diff --git a/src/components/Actions/modules/ActionSortOptions.vue b/src/components/Actions/modules/ActionSortOptions.vue
index 92e7a4bb1..2e475c712 100644
--- a/src/components/Actions/modules/ActionSortOptions.vue
+++ b/src/components/Actions/modules/ActionSortOptions.vue
@@ -4,29 +4,29 @@
-->
diff --git a/src/components/Actions/modules/ActionSwitchSafeTable.vue b/src/components/Actions/modules/ActionSwitchSafeTable.vue
index 08befad38..549b1120a 100644
--- a/src/components/Actions/modules/ActionSwitchSafeTable.vue
+++ b/src/components/Actions/modules/ActionSwitchSafeTable.vue
@@ -4,12 +4,12 @@
-->
diff --git a/src/components/Actions/modules/ActionToggleSidebar.vue b/src/components/Actions/modules/ActionToggleSidebar.vue
index 2254e6c8c..30b8b091b 100644
--- a/src/components/Actions/modules/ActionToggleSidebar.vue
+++ b/src/components/Actions/modules/ActionToggleSidebar.vue
@@ -4,15 +4,15 @@
-->
diff --git a/src/components/Activity/Activities.vue b/src/components/Activity/Activities.vue
index f3dbc6fba..b612c4d9f 100644
--- a/src/components/Activity/Activities.vue
+++ b/src/components/Activity/Activities.vue
@@ -5,10 +5,10 @@
diff --git a/src/components/Activity/ActivityItem.vue b/src/components/Activity/ActivityItem.vue
index d549d729f..3d1831196 100644
--- a/src/components/Activity/ActivityItem.vue
+++ b/src/components/Activity/ActivityItem.vue
@@ -4,78 +4,79 @@
-->
diff --git a/src/components/AppIcons/modules/MaybeIcon.vue b/src/components/AppIcons/modules/MaybeIcon.vue
index 08445c5de..1dba26d9c 100644
--- a/src/components/AppIcons/modules/MaybeIcon.vue
+++ b/src/components/AppIcons/modules/MaybeIcon.vue
@@ -4,24 +4,24 @@
-->
diff --git a/src/components/AppIcons/modules/PollsAppIcon.vue b/src/components/AppIcons/modules/PollsAppIcon.vue
index 217608a75..9a7198415 100644
--- a/src/components/AppIcons/modules/PollsAppIcon.vue
+++ b/src/components/AppIcons/modules/PollsAppIcon.vue
@@ -4,24 +4,24 @@
-->
diff --git a/src/components/AppIcons/modules/Spinner.vue b/src/components/AppIcons/modules/Spinner.vue
index e5b0fef9f..9235d9975 100644
--- a/src/components/AppIcons/modules/Spinner.vue
+++ b/src/components/AppIcons/modules/Spinner.vue
@@ -3,24 +3,24 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
diff --git a/src/components/Base/modules/BadgeDiv.vue b/src/components/Base/modules/BadgeDiv.vue
index 5f67ace3b..1d63bf5c8 100644
--- a/src/components/Base/modules/BadgeDiv.vue
+++ b/src/components/Base/modules/BadgeDiv.vue
@@ -4,14 +4,14 @@
-->
diff --git a/src/components/Base/modules/ConfigBox.vue b/src/components/Base/modules/ConfigBox.vue
index f621090b4..b03f407b7 100644
--- a/src/components/Base/modules/ConfigBox.vue
+++ b/src/components/Base/modules/ConfigBox.vue
@@ -4,23 +4,23 @@
-->
diff --git a/src/components/Base/modules/FlexSpacer.vue b/src/components/Base/modules/FlexSpacer.vue
index baf2cd86f..13e601771 100644
--- a/src/components/Base/modules/FlexSpacer.vue
+++ b/src/components/Base/modules/FlexSpacer.vue
@@ -4,14 +4,14 @@
-->
diff --git a/src/components/Base/modules/HeaderBar.vue b/src/components/Base/modules/HeaderBar.vue
index 4b73d81c9..47f3c77c8 100644
--- a/src/components/Base/modules/HeaderBar.vue
+++ b/src/components/Base/modules/HeaderBar.vue
@@ -4,16 +4,16 @@
-->
diff --git a/src/components/Base/modules/InputDiv.vue b/src/components/Base/modules/InputDiv.vue
index 822d04105..e16c2157f 100644
--- a/src/components/Base/modules/InputDiv.vue
+++ b/src/components/Base/modules/InputDiv.vue
@@ -4,179 +4,172 @@
-->
diff --git a/src/components/Base/modules/IntersectionObserver.vue b/src/components/Base/modules/IntersectionObserver.vue
index 52a9337ca..66c893140 100644
--- a/src/components/Base/modules/IntersectionObserver.vue
+++ b/src/components/Base/modules/IntersectionObserver.vue
@@ -4,31 +4,32 @@
-->
diff --git a/src/components/Base/modules/LoadingOverlay.vue b/src/components/Base/modules/LoadingOverlay.vue
index 1d5eb9499..3ebbbc91a 100644
--- a/src/components/Base/modules/LoadingOverlay.vue
+++ b/src/components/Base/modules/LoadingOverlay.vue
@@ -5,7 +5,7 @@
diff --git a/src/components/Base/modules/QrModal.vue b/src/components/Base/modules/QrModal.vue
index f8786c3ea..0bac9daa6 100644
--- a/src/components/Base/modules/QrModal.vue
+++ b/src/components/Base/modules/QrModal.vue
@@ -4,48 +4,45 @@
-->
diff --git a/src/components/Base/modules/RadioGroupDiv.vue b/src/components/Base/modules/RadioGroupDiv.vue
index 089214e84..df4c37c96 100644
--- a/src/components/Base/modules/RadioGroupDiv.vue
+++ b/src/components/Base/modules/RadioGroupDiv.vue
@@ -4,35 +4,35 @@
-->
diff --git a/src/components/Calendar/CalendarInfo.vue b/src/components/Calendar/CalendarInfo.vue
index b2168ff9a..1596aa6d1 100644
--- a/src/components/Calendar/CalendarInfo.vue
+++ b/src/components/Calendar/CalendarInfo.vue
@@ -4,92 +4,92 @@
-->
diff --git a/src/components/Calendar/CalendarPeek.vue b/src/components/Calendar/CalendarPeek.vue
index f5217d144..ea35e2cc1 100644
--- a/src/components/Calendar/CalendarPeek.vue
+++ b/src/components/Calendar/CalendarPeek.vue
@@ -5,45 +5,45 @@
diff --git a/src/components/Cards/VoteInfoCards.vue b/src/components/Cards/VoteInfoCards.vue
index 263828e5d..e303f944d 100644
--- a/src/components/Cards/VoteInfoCards.vue
+++ b/src/components/Cards/VoteInfoCards.vue
@@ -4,30 +4,26 @@
-->
@@ -21,9 +21,9 @@ const cardType = 'info'
{{ t('polls', 'The proposal period ends {timeRelative}.',
{ timeRelative: pollStore.proposalsExpireRelative }) }}
-
+
-
+
diff --git a/src/components/Cards/modules/CardAnonymousPollHint.vue b/src/components/Cards/modules/CardAnonymousPollHint.vue
index 15f41541a..7f799878c 100644
--- a/src/components/Cards/modules/CardAnonymousPollHint.vue
+++ b/src/components/Cards/modules/CardAnonymousPollHint.vue
@@ -4,9 +4,9 @@
-->
diff --git a/src/components/Cards/modules/CardClosedPoll.vue b/src/components/Cards/modules/CardClosedPoll.vue
index a5056337d..cc4a2a2fe 100644
--- a/src/components/Cards/modules/CardClosedPoll.vue
+++ b/src/components/Cards/modules/CardClosedPoll.vue
@@ -4,12 +4,12 @@
-->
diff --git a/src/components/Cards/modules/CardHiddenParticipants.vue b/src/components/Cards/modules/CardHiddenParticipants.vue
index f470caa52..b14cd5762 100644
--- a/src/components/Cards/modules/CardHiddenParticipants.vue
+++ b/src/components/Cards/modules/CardHiddenParticipants.vue
@@ -4,13 +4,13 @@
-->
diff --git a/src/components/Cards/modules/CardLimitedVotes.vue b/src/components/Cards/modules/CardLimitedVotes.vue
index afe230555..5933197c6 100644
--- a/src/components/Cards/modules/CardLimitedVotes.vue
+++ b/src/components/Cards/modules/CardLimitedVotes.vue
@@ -4,25 +4,25 @@
-->
diff --git a/src/components/Cards/modules/CardLocked.vue b/src/components/Cards/modules/CardLocked.vue
index b6e174450..eede7f36a 100644
--- a/src/components/Cards/modules/CardLocked.vue
+++ b/src/components/Cards/modules/CardLocked.vue
@@ -4,15 +4,15 @@
-->
diff --git a/src/components/Cards/modules/CardRegister.vue b/src/components/Cards/modules/CardRegister.vue
index c4b2b6a66..36f133186 100644
--- a/src/components/Cards/modules/CardRegister.vue
+++ b/src/components/Cards/modules/CardRegister.vue
@@ -4,24 +4,24 @@
-->
diff --git a/src/components/Cards/modules/CardSendConfirmations.vue b/src/components/Cards/modules/CardSendConfirmations.vue
index e07e9a589..a06ef91c6 100644
--- a/src/components/Cards/modules/CardSendConfirmations.vue
+++ b/src/components/Cards/modules/CardSendConfirmations.vue
@@ -4,32 +4,32 @@
-->
diff --git a/src/components/Cards/modules/CardUnpublishedPoll.vue b/src/components/Cards/modules/CardUnpublishedPoll.vue
index 958ba0830..c85e97588 100644
--- a/src/components/Cards/modules/CardUnpublishedPoll.vue
+++ b/src/components/Cards/modules/CardUnpublishedPoll.vue
@@ -4,13 +4,13 @@
-->
diff --git a/src/components/Combo/ComboTable.vue b/src/components/Combo/ComboTable.vue
index a7af1e995..ffcc8b17f 100644
--- a/src/components/Combo/ComboTable.vue
+++ b/src/components/Combo/ComboTable.vue
@@ -4,20 +4,20 @@
-->
diff --git a/src/components/Combo/VoteColumn.vue b/src/components/Combo/VoteColumn.vue
index 7fb0a5331..53675b0e6 100644
--- a/src/components/Combo/VoteColumn.vue
+++ b/src/components/Combo/VoteColumn.vue
@@ -6,14 +6,14 @@
//TODO: Check correct usage of participants in template (v-for)
-
+
@@ -21,20 +21,20 @@
-../stores/polls.ts
\ No newline at end of file
diff --git a/src/views/Navigation.vue b/src/views/Navigation.vue
index ff99388b8..f20308551 100644
--- a/src/views/Navigation.vue
+++ b/src/views/Navigation.vue
@@ -4,138 +4,138 @@
-->
diff --git a/src/views/NotFound.vue b/src/views/NotFound.vue
index 28377f54a..ba96016db 100644
--- a/src/views/NotFound.vue
+++ b/src/views/NotFound.vue
@@ -4,14 +4,14 @@
-->
diff --git a/src/views/PollList.vue b/src/views/PollList.vue
index d8d047420..0b0a5d290 100644
--- a/src/views/PollList.vue
+++ b/src/views/PollList.vue
@@ -4,121 +4,121 @@
-->
diff --git a/src/views/SideBar.vue b/src/views/SideBar.vue
index 5788dacdb..ee5135992 100644
--- a/src/views/SideBar.vue
+++ b/src/views/SideBar.vue
@@ -4,50 +4,50 @@
-->
diff --git a/src/views/SideBarCombo.vue b/src/views/SideBarCombo.vue
index 1d39f5af1..63eefa12a 100644
--- a/src/views/SideBarCombo.vue
+++ b/src/views/SideBarCombo.vue
@@ -4,15 +4,15 @@
-->
diff --git a/src/views/UserSettingsPage.vue b/src/views/UserSettingsPage.vue
index 06b0e0ecc..d48c13b36 100644
--- a/src/views/UserSettingsPage.vue
+++ b/src/views/UserSettingsPage.vue
@@ -5,38 +5,38 @@
diff --git a/src/views/Vote.vue b/src/views/Vote.vue
index 08ac75bbe..4329d668d 100644
--- a/src/views/Vote.vue
+++ b/src/views/Vote.vue
@@ -4,104 +4,104 @@
-->
@@ -131,7 +131,7 @@ watch(() => route.params.id, () => {
-
+
diff --git a/tsconfig.json b/tsconfig.json
index 126d805ed..0196d31a4 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,5 +1,9 @@
{
"compilerOptions": {
+ "lib":[
+ "ES2022",
+ "dom"
+ ],
"allowImportingTsExtensions": true,
"noEmit": true,
"module": "esnext",
From d82cfc4c44f1054b0c6e9c59dfa78d9c93d27c3f Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Sun, 21 Jul 2024 13:27:51 +0200
Subject: [PATCH 056/178] updates
Signed-off-by: dartcafe
---
package-lock.json | 845 +++++++++++++++++++++++-----------------------
1 file changed, 419 insertions(+), 426 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 9d4a92584..8b78ddee1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -82,9 +82,9 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz",
- "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==",
+ "version": "7.24.9",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz",
+ "integrity": "sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==",
"dev": true,
"peer": true,
"engines": {
@@ -92,22 +92,22 @@
}
},
"node_modules/@babel/core": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz",
- "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==",
+ "version": "7.24.9",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz",
+ "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==",
"dev": true,
"peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.24.7",
- "@babel/generator": "^7.24.7",
- "@babel/helper-compilation-targets": "^7.24.7",
- "@babel/helper-module-transforms": "^7.24.7",
- "@babel/helpers": "^7.24.7",
- "@babel/parser": "^7.24.7",
+ "@babel/generator": "^7.24.9",
+ "@babel/helper-compilation-targets": "^7.24.8",
+ "@babel/helper-module-transforms": "^7.24.9",
+ "@babel/helpers": "^7.24.8",
+ "@babel/parser": "^7.24.8",
"@babel/template": "^7.24.7",
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7",
+ "@babel/traverse": "^7.24.8",
+ "@babel/types": "^7.24.9",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -123,9 +123,9 @@
}
},
"node_modules/@babel/eslint-parser": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.7.tgz",
- "integrity": "sha512-SO5E3bVxDuxyNxM5agFv480YA2HO6ohZbGxbazZdIk3KQOPOGVNw6q78I9/lbviIf95eq6tPozeYnJLbjnC8IA==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.8.tgz",
+ "integrity": "sha512-nYAikI4XTGokU2QX7Jx+v4rxZKhKivaQaREZjuW3mrJrbdWJ5yUfohnoUULge+zEEaKjPYNxhoRgUKktjXtbwA==",
"dev": true,
"peer": true,
"dependencies": {
@@ -142,13 +142,13 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz",
- "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==",
+ "version": "7.24.10",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz",
+ "integrity": "sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==",
"dev": true,
"peer": true,
"dependencies": {
- "@babel/types": "^7.24.7",
+ "@babel/types": "^7.24.9",
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25",
"jsesc": "^2.5.1"
@@ -158,15 +158,15 @@
}
},
"node_modules/@babel/helper-compilation-targets": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz",
- "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz",
+ "integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==",
"dev": true,
"peer": true,
"dependencies": {
- "@babel/compat-data": "^7.24.7",
- "@babel/helper-validator-option": "^7.24.7",
- "browserslist": "^4.22.2",
+ "@babel/compat-data": "^7.24.8",
+ "@babel/helper-validator-option": "^7.24.8",
+ "browserslist": "^4.23.1",
"lru-cache": "^5.1.1",
"semver": "^6.3.1"
},
@@ -229,9 +229,9 @@
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz",
- "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==",
+ "version": "7.24.9",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz",
+ "integrity": "sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==",
"dev": true,
"peer": true,
"dependencies": {
@@ -276,9 +276,9 @@
}
},
"node_modules/@babel/helper-string-parser": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz",
- "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz",
+ "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==",
"dev": true,
"peer": true,
"engines": {
@@ -296,9 +296,9 @@
}
},
"node_modules/@babel/helper-validator-option": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz",
- "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz",
+ "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==",
"dev": true,
"peer": true,
"engines": {
@@ -306,14 +306,14 @@
}
},
"node_modules/@babel/helpers": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz",
- "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.8.tgz",
+ "integrity": "sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/template": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/types": "^7.24.8"
},
"engines": {
"node": ">=6.9.0"
@@ -336,9 +336,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz",
- "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz",
+ "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -347,9 +347,9 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz",
- "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.8.tgz",
+ "integrity": "sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==",
"dependencies": {
"regenerator-runtime": "^0.14.0"
},
@@ -373,20 +373,20 @@
}
},
"node_modules/@babel/traverse": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz",
- "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==",
+ "version": "7.24.8",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz",
+ "integrity": "sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.24.7",
- "@babel/generator": "^7.24.7",
+ "@babel/generator": "^7.24.8",
"@babel/helper-environment-visitor": "^7.24.7",
"@babel/helper-function-name": "^7.24.7",
"@babel/helper-hoist-variables": "^7.24.7",
"@babel/helper-split-export-declaration": "^7.24.7",
- "@babel/parser": "^7.24.7",
- "@babel/types": "^7.24.7",
+ "@babel/parser": "^7.24.8",
+ "@babel/types": "^7.24.8",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
@@ -395,13 +395,13 @@
}
},
"node_modules/@babel/types": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz",
- "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==",
+ "version": "7.24.9",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz",
+ "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==",
"dev": true,
"peer": true,
"dependencies": {
- "@babel/helper-string-parser": "^7.24.7",
+ "@babel/helper-string-parser": "^7.24.8",
"@babel/helper-validator-identifier": "^7.24.7",
"to-fast-properties": "^2.0.0"
},
@@ -418,9 +418,9 @@
}
},
"node_modules/@ckpack/vue-color": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@ckpack/vue-color/-/vue-color-1.5.0.tgz",
- "integrity": "sha512-dj1zXVyay2m4LdlLJCQSdIS2FYwUl77BZqyKmUXiehyqjCP0bGYnPcL38lrShzYUc2FdkYQX8ANZZjRahd4PQw==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@ckpack/vue-color/-/vue-color-1.6.0.tgz",
+ "integrity": "sha512-b9kFTKhYbNArfgP1lmnaVm0VNsWdZjqIbyHUYry7mZ+E7JeTQclbjq1+2xWn0SE3wzqRYlXmAVjECPOgteWmMQ==",
"dependencies": {
"@ctrl/tinycolor": "^3.6.0",
"material-colors": "^1.2.6"
@@ -433,9 +433,9 @@
}
},
"node_modules/@csstools/css-parser-algorithms": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.0.tgz",
- "integrity": "sha512-qvBMcOU/uWFCH/VO0MYe0AMs0BGMWAt6FTryMbFIKYtZtVnqTZtT8ktv5o718llkaGZWomJezJZjq3vJDHeJNQ==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz",
+ "integrity": "sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==",
"dev": true,
"funding": [
{
@@ -452,13 +452,13 @@
"node": "^14 || ^16 || >=18"
},
"peerDependencies": {
- "@csstools/css-tokenizer": "^2.3.2"
+ "@csstools/css-tokenizer": "^2.4.1"
}
},
"node_modules/@csstools/css-tokenizer": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.3.2.tgz",
- "integrity": "sha512-0xYOf4pQpAaE6Sm2Q0x3p25oRukzWQ/O8hWVvhIt9Iv98/uu053u2CGm/g3kJ+P0vOYTAYzoU8Evq2pg9ZPXtw==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz",
+ "integrity": "sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==",
"dev": true,
"funding": [
{
@@ -476,9 +476,9 @@
}
},
"node_modules/@csstools/media-query-list-parser": {
- "version": "2.1.12",
- "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.12.tgz",
- "integrity": "sha512-t1/CdyVJzOQUiGUcIBXRzTAkWTFPxiPnoKwowKW2z9Uj78c2bBWI/X94BeVfUwVq1xtCjD7dnO8kS6WONgp8Jw==",
+ "version": "2.1.13",
+ "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.13.tgz",
+ "integrity": "sha512-XaHr+16KRU9Gf8XLi3q8kDlI18d5vzKSKCY510Vrtc9iNR0NJzbY9hhTmwhzYZj/ZwGL4VmB3TA9hJW0Um2qFA==",
"dev": true,
"funding": [
{
@@ -495,8 +495,8 @@
"node": "^14 || ^16 || >=18"
},
"peerDependencies": {
- "@csstools/css-parser-algorithms": "^2.7.0",
- "@csstools/css-tokenizer": "^2.3.2"
+ "@csstools/css-parser-algorithms": "^2.7.1",
+ "@csstools/css-tokenizer": "^2.4.1"
}
},
"node_modules/@csstools/selector-specificity": {
@@ -1157,9 +1157,9 @@
}
},
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.4.15",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
- "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.25",
@@ -1457,9 +1457,9 @@
}
},
"node_modules/@nextcloud/eslint-plugin/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -1483,9 +1483,9 @@
}
},
"node_modules/@nextcloud/event-bus/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"bin": {
"semver": "bin/semver.js"
},
@@ -1494,16 +1494,17 @@
}
},
"node_modules/@nextcloud/files": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.5.1.tgz",
- "integrity": "sha512-GkVWUgkBSVt27Carmp/DbnDiqHq03w3VQWt8xszacp/IQSB9G+8/KCvi8zxldac2q7lQ8NpHlB/Bqy8o+OOc0A==",
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.6.0.tgz",
+ "integrity": "sha512-/3kzEJ1TsCgjkSVhjdI+FnF0c2rvYtiTAQPoNqkNQYFa7Vbor+XPuypBQIJZFMDMzEgUexAL4QuQT3YmeSfBAA==",
"dependencies": {
"@nextcloud/auth": "^2.3.0",
+ "@nextcloud/capabilities": "^1.2.0",
"@nextcloud/l10n": "^3.1.0",
"@nextcloud/logger": "^3.0.2",
"@nextcloud/paths": "^2.1.0",
"@nextcloud/router": "^3.0.1",
- "@nextcloud/sharing": "^0.2.1",
+ "@nextcloud/sharing": "^0.2.2",
"cancelable-promise": "^4.3.1",
"is-svg": "^5.0.1",
"typescript-event-target": "^1.1.1",
@@ -1597,11 +1598,12 @@
}
},
"node_modules/@nextcloud/paths": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.1.0.tgz",
- "integrity": "sha512-8wX0gqwez0bTuAS8A0OEiqbbp0ZsqLr07zSErmS6OYhh9KZcSt/kO6lQV5tnrFqIqJVsxwz4kHUjtZXh6DSf9Q==",
- "dependencies": {
- "core-js": "^3.6.4"
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.2.0.tgz",
+ "integrity": "sha512-G2KZmDgI3Lt3zFWz2EZ9opVda7nfQN7TU4LaplMRSSJEd8nILX5lYc8fl01oDf3DiUKAtLwXHuPdJhVuHoN+Tg==",
+ "engines": {
+ "node": "^20.0.0",
+ "npm": "^9.0.0 || ^10.0.0"
}
},
"node_modules/@nextcloud/prettier-config": {
@@ -1668,9 +1670,9 @@
}
},
"node_modules/@nextcloud/typings": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.9.0.tgz",
- "integrity": "sha512-dR37j4bDmJTjWNjH85bNGiabvhOTWoxu5xGLEHOwv2hV1KI51GqbY+G62Pwmd9guGqmufQuTrZosCQSz7bMuWQ==",
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.9.1.tgz",
+ "integrity": "sha512-i0l/L5gKW8EACbXHVxXM6wn3sUhY2qmnL2OijppzU4dENC7/hqySMQDer7/+cJbNSNG7uHF/Z+9JmHtDfRfuGg==",
"dependencies": {
"@types/jquery": "3.5.16"
},
@@ -1708,12 +1710,12 @@
}
},
"node_modules/@nextcloud/vue": {
- "version": "9.0.0-alpha.4",
- "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-9.0.0-alpha.4.tgz",
- "integrity": "sha512-vpHV9liGPx63lAkB/NqWAv4SGxGoMlp05pxjOAYB45fv72BbI19JjQORBtBEkRrC5Jijyv+44LmcR2VyIOLwcw==",
+ "version": "9.0.0-alpha.5",
+ "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-9.0.0-alpha.5.tgz",
+ "integrity": "sha512-kbTgxJDi9b1zYh1JsLwhg+axnfRoPfnKBnVJx00VqsXPYj/PrxaaAYFA0HZZeVmscMGZwoVB7PRhMNSdms1HqA==",
"dependencies": {
"@ckpack/vue-color": "^1.5.0",
- "@floating-ui/dom": "^1.6.6",
+ "@floating-ui/dom": "^1.6.7",
"@nextcloud/auth": "^2.3.0",
"@nextcloud/axios": "^2.5.0",
"@nextcloud/browser-storage": "^0.4.0",
@@ -1748,7 +1750,7 @@
"unified": "^11.0.5",
"unist-builder": "^4.0.0",
"unist-util-visit": "^5.0.0",
- "vue": "^3.4.30",
+ "vue": "^3.4.31",
"vue-datepicker-next": "^1.0.3",
"vue-router": "^4.4.0",
"vue-select": "^4.0.0-beta.6"
@@ -1881,9 +1883,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz",
- "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz",
+ "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==",
"cpu": [
"arm"
],
@@ -1894,9 +1896,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz",
- "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz",
+ "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==",
"cpu": [
"arm64"
],
@@ -1907,9 +1909,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz",
- "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz",
+ "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==",
"cpu": [
"arm64"
],
@@ -1920,9 +1922,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz",
- "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz",
+ "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==",
"cpu": [
"x64"
],
@@ -1933,9 +1935,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz",
- "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz",
+ "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==",
"cpu": [
"arm"
],
@@ -1946,9 +1948,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz",
- "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz",
+ "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==",
"cpu": [
"arm"
],
@@ -1959,9 +1961,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz",
- "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz",
+ "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==",
"cpu": [
"arm64"
],
@@ -1972,9 +1974,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz",
- "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz",
+ "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==",
"cpu": [
"arm64"
],
@@ -1985,9 +1987,9 @@
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz",
- "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz",
+ "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==",
"cpu": [
"ppc64"
],
@@ -1998,9 +2000,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz",
- "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz",
+ "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==",
"cpu": [
"riscv64"
],
@@ -2011,9 +2013,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz",
- "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz",
+ "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==",
"cpu": [
"s390x"
],
@@ -2024,9 +2026,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz",
- "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz",
+ "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==",
"cpu": [
"x64"
],
@@ -2037,9 +2039,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz",
- "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz",
+ "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==",
"cpu": [
"x64"
],
@@ -2050,9 +2052,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz",
- "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz",
+ "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==",
"cpu": [
"arm64"
],
@@ -2063,9 +2065,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz",
- "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz",
+ "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==",
"cpu": [
"ia32"
],
@@ -2076,9 +2078,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz",
- "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz",
+ "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==",
"cpu": [
"x64"
],
@@ -2293,9 +2295,9 @@
"integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="
},
"node_modules/@types/node": {
- "version": "20.14.9",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
- "integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
+ "version": "20.14.11",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz",
+ "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==",
"dependencies": {
"undici-types": "~5.26.4"
}
@@ -2326,17 +2328,17 @@
"integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.14.1.tgz",
- "integrity": "sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz",
+ "integrity": "sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==",
"dev": true,
"peer": true,
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
- "@typescript-eslint/scope-manager": "7.14.1",
- "@typescript-eslint/type-utils": "7.14.1",
- "@typescript-eslint/utils": "7.14.1",
- "@typescript-eslint/visitor-keys": "7.14.1",
+ "@typescript-eslint/scope-manager": "7.16.1",
+ "@typescript-eslint/type-utils": "7.16.1",
+ "@typescript-eslint/utils": "7.16.1",
+ "@typescript-eslint/visitor-keys": "7.16.1",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
@@ -2360,16 +2362,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.14.1.tgz",
- "integrity": "sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.1.tgz",
+ "integrity": "sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==",
"dev": true,
"peer": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "7.14.1",
- "@typescript-eslint/types": "7.14.1",
- "@typescript-eslint/typescript-estree": "7.14.1",
- "@typescript-eslint/visitor-keys": "7.14.1",
+ "@typescript-eslint/scope-manager": "7.16.1",
+ "@typescript-eslint/types": "7.16.1",
+ "@typescript-eslint/typescript-estree": "7.16.1",
+ "@typescript-eslint/visitor-keys": "7.16.1",
"debug": "^4.3.4"
},
"engines": {
@@ -2389,14 +2391,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.14.1.tgz",
- "integrity": "sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz",
+ "integrity": "sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==",
"dev": true,
"peer": true,
"dependencies": {
- "@typescript-eslint/types": "7.14.1",
- "@typescript-eslint/visitor-keys": "7.14.1"
+ "@typescript-eslint/types": "7.16.1",
+ "@typescript-eslint/visitor-keys": "7.16.1"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -2407,14 +2409,14 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.14.1.tgz",
- "integrity": "sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz",
+ "integrity": "sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==",
"dev": true,
"peer": true,
"dependencies": {
- "@typescript-eslint/typescript-estree": "7.14.1",
- "@typescript-eslint/utils": "7.14.1",
+ "@typescript-eslint/typescript-estree": "7.16.1",
+ "@typescript-eslint/utils": "7.16.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.3.0"
},
@@ -2435,9 +2437,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.14.1.tgz",
- "integrity": "sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.1.tgz",
+ "integrity": "sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==",
"dev": true,
"peer": true,
"engines": {
@@ -2449,14 +2451,14 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.14.1.tgz",
- "integrity": "sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz",
+ "integrity": "sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==",
"dev": true,
"peer": true,
"dependencies": {
- "@typescript-eslint/types": "7.14.1",
- "@typescript-eslint/visitor-keys": "7.14.1",
+ "@typescript-eslint/types": "7.16.1",
+ "@typescript-eslint/visitor-keys": "7.16.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -2478,9 +2480,9 @@
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -2491,16 +2493,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.14.1.tgz",
- "integrity": "sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.1.tgz",
+ "integrity": "sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==",
"dev": true,
"peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
- "@typescript-eslint/scope-manager": "7.14.1",
- "@typescript-eslint/types": "7.14.1",
- "@typescript-eslint/typescript-estree": "7.14.1"
+ "@typescript-eslint/scope-manager": "7.16.1",
+ "@typescript-eslint/types": "7.16.1",
+ "@typescript-eslint/typescript-estree": "7.16.1"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -2514,13 +2516,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.14.1.tgz",
- "integrity": "sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==",
+ "version": "7.16.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz",
+ "integrity": "sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==",
"dev": true,
"peer": true,
"dependencies": {
- "@typescript-eslint/types": "7.14.1",
+ "@typescript-eslint/types": "7.16.1",
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
@@ -2591,49 +2593,49 @@
}
},
"node_modules/@vue/compiler-core": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.31.tgz",
- "integrity": "sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.33.tgz",
+ "integrity": "sha512-MoIREbkdPQlnGfSKDMgzTqzqx5nmEjIc0ydLVYlTACGBsfvOJ4tHSbZXKVF536n6fB+0eZaGEOqsGThPpdvF5A==",
"dependencies": {
"@babel/parser": "^7.24.7",
- "@vue/shared": "3.4.31",
+ "@vue/shared": "3.4.33",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.2.0"
}
},
"node_modules/@vue/compiler-dom": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.31.tgz",
- "integrity": "sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.33.tgz",
+ "integrity": "sha512-GzB8fxEHKw0gGet5BKlpfXEqoBnzSVWwMnT+dc25wE7pFEfrU/QsvjZMP9rD4iVXHBBoemTct8mN0GJEI6ZX5A==",
"dependencies": {
- "@vue/compiler-core": "3.4.31",
- "@vue/shared": "3.4.31"
+ "@vue/compiler-core": "3.4.33",
+ "@vue/shared": "3.4.33"
}
},
"node_modules/@vue/compiler-sfc": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.31.tgz",
- "integrity": "sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.33.tgz",
+ "integrity": "sha512-7rk7Vbkn21xMwIUpHQR4hCVejwE6nvhBOiDgoBcR03qvGqRKA7dCBSsHZhwhYUsmjlbJ7OtD5UFIyhP6BY+c8A==",
"dependencies": {
"@babel/parser": "^7.24.7",
- "@vue/compiler-core": "3.4.31",
- "@vue/compiler-dom": "3.4.31",
- "@vue/compiler-ssr": "3.4.31",
- "@vue/shared": "3.4.31",
+ "@vue/compiler-core": "3.4.33",
+ "@vue/compiler-dom": "3.4.33",
+ "@vue/compiler-ssr": "3.4.33",
+ "@vue/shared": "3.4.33",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.10",
- "postcss": "^8.4.38",
+ "postcss": "^8.4.39",
"source-map-js": "^1.2.0"
}
},
"node_modules/@vue/compiler-ssr": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.31.tgz",
- "integrity": "sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.33.tgz",
+ "integrity": "sha512-0WveC9Ai+eT/1b6LCV5IfsufBZ0HP7pSSTdDjcuW302tTEgoBw8rHVHKPbGUtzGReUFCRXbv6zQDDgucnV2WzQ==",
"dependencies": {
- "@vue/compiler-dom": "3.4.31",
- "@vue/shared": "3.4.31"
+ "@vue/compiler-dom": "3.4.33",
+ "@vue/shared": "3.4.33"
}
},
"node_modules/@vue/devtools-api": {
@@ -2692,49 +2694,49 @@
}
},
"node_modules/@vue/reactivity": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.31.tgz",
- "integrity": "sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.33.tgz",
+ "integrity": "sha512-B24QIelahDbyHipBgbUItQblbd4w5HpG3KccL+YkGyo3maXyS253FzcTR3pSz739OTphmzlxP7JxEMWBpewilA==",
"dependencies": {
- "@vue/shared": "3.4.31"
+ "@vue/shared": "3.4.33"
}
},
"node_modules/@vue/runtime-core": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.31.tgz",
- "integrity": "sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.33.tgz",
+ "integrity": "sha512-6wavthExzT4iAxpe8q37/rDmf44nyOJGISJPxCi9YsQO+8w9v0gLCFLfH5TzD1V1AYrTAdiF4Y1cgUmP68jP6w==",
"dependencies": {
- "@vue/reactivity": "3.4.31",
- "@vue/shared": "3.4.31"
+ "@vue/reactivity": "3.4.33",
+ "@vue/shared": "3.4.33"
}
},
"node_modules/@vue/runtime-dom": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.31.tgz",
- "integrity": "sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.33.tgz",
+ "integrity": "sha512-iHsMCUSFJ+4z432Bn9kZzHX+zOXa6+iw36DaVRmKYZpPt9jW9riF32SxNwB124i61kp9+AZtheQ/mKoJLerAaQ==",
"dependencies": {
- "@vue/reactivity": "3.4.31",
- "@vue/runtime-core": "3.4.31",
- "@vue/shared": "3.4.31",
+ "@vue/reactivity": "3.4.33",
+ "@vue/runtime-core": "3.4.33",
+ "@vue/shared": "3.4.33",
"csstype": "^3.1.3"
}
},
"node_modules/@vue/server-renderer": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.31.tgz",
- "integrity": "sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.33.tgz",
+ "integrity": "sha512-jTH0d6gQcaYideFP/k0WdEu8PpRS9MF8d0b6SfZzNi+ap972pZ0TNIeTaESwdOtdY0XPVj54XEJ6K0wXxir4fw==",
"dependencies": {
- "@vue/compiler-ssr": "3.4.31",
- "@vue/shared": "3.4.31"
+ "@vue/compiler-ssr": "3.4.33",
+ "@vue/shared": "3.4.33"
},
"peerDependencies": {
- "vue": "3.4.31"
+ "vue": "3.4.33"
}
},
"node_modules/@vue/shared": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.31.tgz",
- "integrity": "sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA=="
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.33.tgz",
+ "integrity": "sha512-aoRY0jQk3A/cuvdkodTrM4NMfxco8n55eG4H7ML/CRy7OryHfiqvug4xrCBBMbbN+dvXAetDDwZW9DXWWjBntA=="
},
"node_modules/@vue/tsconfig": {
"version": "0.5.1",
@@ -2861,9 +2863,9 @@
}
},
"node_modules/acorn": {
- "version": "8.12.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
- "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
+ "version": "8.12.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
+ "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
@@ -3379,9 +3381,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.23.1",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz",
- "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==",
+ "version": "4.23.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz",
+ "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==",
"dev": true,
"funding": [
{
@@ -3398,10 +3400,10 @@
}
],
"dependencies": {
- "caniuse-lite": "^1.0.30001629",
- "electron-to-chromium": "^1.4.796",
+ "caniuse-lite": "^1.0.30001640",
+ "electron-to-chromium": "^1.4.820",
"node-releases": "^2.0.14",
- "update-browserslist-db": "^1.0.16"
+ "update-browserslist-db": "^1.1.0"
},
"bin": {
"browserslist": "cli.js"
@@ -3488,9 +3490,9 @@
}
},
"node_modules/builtins/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -3548,9 +3550,9 @@
"integrity": "sha512-A/8PwLk/T7IJDfUdQ68NR24QHa8rIlnN/stiJEBo6dmVUkD4K14LswG0w3VwdeK/o7qOwRUR1k2MhK5Rpy2m7A=="
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001638",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz",
- "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==",
+ "version": "1.0.30001642",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz",
+ "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==",
"dev": true,
"funding": [
{
@@ -4338,15 +4340,15 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.4.815",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.815.tgz",
- "integrity": "sha512-OvpTT2ItpOXJL7IGcYakRjHCt8L5GrrN/wHCQsRB4PQa1X9fe+X9oen245mIId7s14xvArCGSTIq644yPUKKLg==",
+ "version": "1.4.832",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz",
+ "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==",
"dev": true
},
"node_modules/elliptic": {
- "version": "6.5.5",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz",
- "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==",
+ "version": "6.5.6",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.6.tgz",
+ "integrity": "sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==",
"dev": true,
"dependencies": {
"bn.js": "^4.11.9",
@@ -4704,9 +4706,9 @@
}
},
"node_modules/eslint-compat-utils/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -4849,9 +4851,9 @@
}
},
"node_modules/eslint-plugin-es-x": {
- "version": "7.7.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.7.0.tgz",
- "integrity": "sha512-aP3qj8BwiEDPttxQkZdI221DLKq9sI/qHolE2YSQL1/9+xk7dTV+tB1Fz8/IaCA+lnLA1bDEnvaS2LKs0k2Uig==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz",
+ "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==",
"dev": true,
"funding": [
"https://github.com/sponsors/ota-meshi",
@@ -4860,7 +4862,7 @@
"peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.1.2",
- "@eslint-community/regexpp": "^4.6.0",
+ "@eslint-community/regexpp": "^4.11.0",
"eslint-compat-utils": "^0.5.1"
},
"engines": {
@@ -4987,9 +4989,9 @@
}
},
"node_modules/eslint-plugin-jsdoc/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -5069,9 +5071,9 @@
}
},
"node_modules/eslint-plugin-n/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -5082,13 +5084,13 @@
}
},
"node_modules/eslint-plugin-prettier": {
- "version": "5.1.3",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
- "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz",
+ "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==",
"dev": true,
"dependencies": {
"prettier-linter-helpers": "^1.0.0",
- "synckit": "^0.8.6"
+ "synckit": "^0.9.1"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
@@ -5112,9 +5114,9 @@
}
},
"node_modules/eslint-plugin-promise": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.2.0.tgz",
- "integrity": "sha512-QmAqwizauvnKOlifxyDj2ObfULpHQawlg/zQdgEixur9vl0CvZGv/LCJV2rtj3210QCoeGBzVMfMXqGAOr/4fA==",
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.5.1.tgz",
+ "integrity": "sha512-KEYBjj9nCynXAquwKrYEnIJ1zK+e+O5jqwn/9Aln/FhdOXm6WwsmCVatDM6OAxkEzbigsyD79Fi3DUWWqulTEA==",
"dev": true,
"peer": true,
"engines": {
@@ -5128,9 +5130,9 @@
}
},
"node_modules/eslint-plugin-vue": {
- "version": "9.26.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.26.0.tgz",
- "integrity": "sha512-eTvlxXgd4ijE1cdur850G6KalZqk65k1JKoOI2d1kT3hr8sPD07j1q98FRFdNnpxBELGPWxZmInxeHGF/GxtqQ==",
+ "version": "9.27.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.27.0.tgz",
+ "integrity": "sha512-5Dw3yxEyuBSXTzT5/Ge1X5kIkRTQ3nvBn/VwPwInNiZBSJOO/timWMUaflONnFBzU6NhB68lxnCda7ULV5N7LA==",
"dev": true,
"peer": true,
"dependencies": {
@@ -5140,7 +5142,7 @@
"nth-check": "^2.1.1",
"postcss-selector-parser": "^6.0.15",
"semver": "^7.6.0",
- "vue-eslint-parser": "^9.4.2",
+ "vue-eslint-parser": "^9.4.3",
"xml-name-validator": "^4.0.0"
},
"engines": {
@@ -5167,9 +5169,9 @@
}
},
"node_modules/eslint-plugin-vue/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -5404,9 +5406,9 @@
}
},
"node_modules/esquery": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
- "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
+ "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
"dev": true,
"peer": true,
"dependencies": {
@@ -5570,6 +5572,13 @@
"dev": true,
"peer": true
},
+ "node_modules/fast-uri": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz",
+ "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==",
+ "dev": true,
+ "peer": true
+ },
"node_modules/fast-xml-parser": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz",
@@ -5927,9 +5936,9 @@
}
},
"node_modules/get-tsconfig": {
- "version": "4.7.5",
- "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz",
- "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==",
+ "version": "4.7.6",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz",
+ "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==",
"dev": true,
"peer": true,
"dependencies": {
@@ -6625,9 +6634,9 @@
}
},
"node_modules/is-core-module": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz",
- "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==",
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz",
+ "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==",
"dev": true,
"dependencies": {
"hasown": "^2.0.2"
@@ -7067,9 +7076,9 @@
}
},
"node_modules/known-css-properties": {
- "version": "0.31.0",
- "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.31.0.tgz",
- "integrity": "sha512-sBPIUGTNF0czz0mwGGUoKKJC8Q7On1GPbCSFPfyEsfHb2DyBG0Y4QtV+EVWpINSaiGKZblDNuF5AezxSgOhesQ==",
+ "version": "0.34.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz",
+ "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==",
"dev": true,
"peer": true
},
@@ -7653,9 +7662,9 @@
}
},
"node_modules/micromark-extension-gfm-autolink-literal": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.0.0.tgz",
- "integrity": "sha512-rTHfnpt/Q7dEAK1Y5ii0W8bhfJlVJFnJMHIPisfPK3gpVNuOP0VnRl96+YJ3RYWV/P4gFeQoGKNlT3RhuvpqAg==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz",
+ "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==",
"dependencies": {
"micromark-util-character": "^2.0.0",
"micromark-util-sanitize-uri": "^2.0.0",
@@ -7668,9 +7677,9 @@
}
},
"node_modules/micromark-extension-gfm-footnote": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.0.0.tgz",
- "integrity": "sha512-6Rzu0CYRKDv3BfLAUnZsSlzx3ak6HAoI85KTiijuKIz5UxZxbUI+pD6oHgw+6UtQuiRwnGRhzMmPRv4smcz0fg==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==",
"dependencies": {
"devlop": "^1.0.0",
"micromark-core-commonmark": "^2.0.0",
@@ -7687,9 +7696,9 @@
}
},
"node_modules/micromark-extension-gfm-strikethrough": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.0.0.tgz",
- "integrity": "sha512-c3BR1ClMp5fxxmwP6AoOY2fXO9U8uFMKs4ADD66ahLTNcwzSCyRVU4k7LPV5Nxo/VJiR4TdzxRQY2v3qIUceCw==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz",
+ "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==",
"dependencies": {
"devlop": "^1.0.0",
"micromark-util-chunked": "^2.0.0",
@@ -7704,9 +7713,9 @@
}
},
"node_modules/micromark-extension-gfm-table": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.0.0.tgz",
- "integrity": "sha512-PoHlhypg1ItIucOaHmKE8fbin3vTLpDOUg8KAr8gRCF1MOZI9Nquq2i/44wFvviM4WuxJzc3demT8Y3dkfvYrw==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz",
+ "integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==",
"dependencies": {
"devlop": "^1.0.0",
"micromark-factory-space": "^2.0.0",
@@ -7732,9 +7741,9 @@
}
},
"node_modules/micromark-extension-gfm-task-list-item": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.0.1.tgz",
- "integrity": "sha512-cY5PzGcnULaN5O7T+cOzfMoHjBW7j+T9D2sucA5d/KbsBTPcYdebm9zUd9zzdgJGCwahV+/W78Z3nbulBYVbTw==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz",
+ "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==",
"dependencies": {
"devlop": "^1.0.0",
"micromark-factory-space": "^2.0.0",
@@ -8281,9 +8290,9 @@
}
},
"node_modules/node-releases": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
- "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
+ "version": "2.0.17",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.17.tgz",
+ "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==",
"dev": true
},
"node_modules/node-stdlib-browser": {
@@ -8898,9 +8907,9 @@
}
},
"node_modules/postcss-selector-parser": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz",
- "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz",
+ "integrity": "sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==",
"dev": true,
"peer": true,
"dependencies": {
@@ -8956,13 +8965,13 @@
}
},
"node_modules/prettier-plugin-packagejson": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.5.0.tgz",
- "integrity": "sha512-6XkH3rpin5QEQodBSVNg+rBo4r91g/1mCaRwS1YGdQJZ6jwqrg2UchBsIG9tpS1yK1kNBvOt84OILsX8uHzBGg==",
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.5.1.tgz",
+ "integrity": "sha512-6i4PW1KxEA+VrokYNGeI/q8qQX3u5DNBc7eLr9GX4OrvWr9DMls1lhbuNopkKG7Li9rTNxerWnYQyjxoUO4ROA==",
"dev": true,
"dependencies": {
"sort-package-json": "2.10.0",
- "synckit": "0.9.0"
+ "synckit": "0.9.1"
},
"peerDependencies": {
"prettier": ">= 1.16.0"
@@ -8973,22 +8982,6 @@
}
}
},
- "node_modules/prettier-plugin-packagejson/node_modules/synckit": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.0.tgz",
- "integrity": "sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==",
- "dev": true,
- "dependencies": {
- "@pkgr/core": "^0.1.0",
- "tslib": "^2.6.2"
- },
- "engines": {
- "node": "^14.18.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/unts"
- }
- },
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -9065,9 +9058,9 @@
}
},
"node_modules/qs": {
- "version": "6.12.1",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz",
- "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==",
+ "version": "6.12.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.3.tgz",
+ "integrity": "sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==",
"dev": true,
"dependencies": {
"side-channel": "^1.0.6"
@@ -9413,9 +9406,9 @@
}
},
"node_modules/rollup": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz",
- "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz",
+ "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==",
"dev": true,
"dependencies": {
"@types/estree": "1.0.5"
@@ -9428,22 +9421,22 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.18.0",
- "@rollup/rollup-android-arm64": "4.18.0",
- "@rollup/rollup-darwin-arm64": "4.18.0",
- "@rollup/rollup-darwin-x64": "4.18.0",
- "@rollup/rollup-linux-arm-gnueabihf": "4.18.0",
- "@rollup/rollup-linux-arm-musleabihf": "4.18.0",
- "@rollup/rollup-linux-arm64-gnu": "4.18.0",
- "@rollup/rollup-linux-arm64-musl": "4.18.0",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0",
- "@rollup/rollup-linux-riscv64-gnu": "4.18.0",
- "@rollup/rollup-linux-s390x-gnu": "4.18.0",
- "@rollup/rollup-linux-x64-gnu": "4.18.0",
- "@rollup/rollup-linux-x64-musl": "4.18.0",
- "@rollup/rollup-win32-arm64-msvc": "4.18.0",
- "@rollup/rollup-win32-ia32-msvc": "4.18.0",
- "@rollup/rollup-win32-x64-msvc": "4.18.0",
+ "@rollup/rollup-android-arm-eabi": "4.19.0",
+ "@rollup/rollup-android-arm64": "4.19.0",
+ "@rollup/rollup-darwin-arm64": "4.19.0",
+ "@rollup/rollup-darwin-x64": "4.19.0",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.19.0",
+ "@rollup/rollup-linux-arm-musleabihf": "4.19.0",
+ "@rollup/rollup-linux-arm64-gnu": "4.19.0",
+ "@rollup/rollup-linux-arm64-musl": "4.19.0",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0",
+ "@rollup/rollup-linux-riscv64-gnu": "4.19.0",
+ "@rollup/rollup-linux-s390x-gnu": "4.19.0",
+ "@rollup/rollup-linux-x64-gnu": "4.19.0",
+ "@rollup/rollup-linux-x64-musl": "4.19.0",
+ "@rollup/rollup-win32-arm64-msvc": "4.19.0",
+ "@rollup/rollup-win32-ia32-msvc": "4.19.0",
+ "@rollup/rollup-win32-x64-msvc": "4.19.0",
"fsevents": "~2.3.2"
}
},
@@ -9482,9 +9475,9 @@
}
},
"node_modules/rollup-plugin-license": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-3.5.1.tgz",
- "integrity": "sha512-z/UN/d5KbJhyvmmAg6no/2M2XK1QH8DUZyhbQeuaxe48hkIBTvvMlUP97g4txOzEC82HlZzb7dlWslc/rmBskg==",
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-3.5.2.tgz",
+ "integrity": "sha512-NNeXBcE6RyQdZdSC8Vxe8Cheax2aUa/K0Ok6JDZwr9isjkSDer4aMg0sovas1Ua76ojLZX1BrNQ6ZFspztKkZQ==",
"dev": true,
"dependencies": {
"commenting": "~1.1.0",
@@ -9624,9 +9617,9 @@
}
},
"node_modules/sass": {
- "version": "1.77.6",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz",
- "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==",
+ "version": "1.77.8",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz",
+ "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==",
"dev": true,
"peer": true,
"dependencies": {
@@ -9877,9 +9870,9 @@
}
},
"node_modules/sort-package-json/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@@ -10244,9 +10237,9 @@
}
},
"node_modules/stylelint": {
- "version": "16.6.1",
- "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.6.1.tgz",
- "integrity": "sha512-yNgz2PqWLkhH2hw6X9AweV9YvoafbAD5ZsFdKN9BvSDVwGvPh+AUIrn7lYwy1S7IHmtFin75LLfX1m0D2tHu8Q==",
+ "version": "16.7.0",
+ "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.7.0.tgz",
+ "integrity": "sha512-Q1ATiXlz+wYr37a7TGsfvqYn2nSR3T/isw3IWlZQzFzCNoACHuGBb6xBplZXz56/uDRJHIygxjh7jbV/8isewA==",
"dev": true,
"funding": [
{
@@ -10260,9 +10253,9 @@
],
"peer": true,
"dependencies": {
- "@csstools/css-parser-algorithms": "^2.6.3",
- "@csstools/css-tokenizer": "^2.3.1",
- "@csstools/media-query-list-parser": "^2.1.11",
+ "@csstools/css-parser-algorithms": "^2.7.1",
+ "@csstools/css-tokenizer": "^2.4.1",
+ "@csstools/media-query-list-parser": "^2.1.13",
"@csstools/selector-specificity": "^3.1.1",
"@dual-bundle/import-meta-resolve": "^4.1.0",
"balanced-match": "^2.0.0",
@@ -10270,7 +10263,7 @@
"cosmiconfig": "^9.0.0",
"css-functions-list": "^3.2.2",
"css-tree": "^2.3.1",
- "debug": "^4.3.4",
+ "debug": "^4.3.5",
"fast-glob": "^3.3.2",
"fastest-levenshtein": "^1.0.16",
"file-entry-cache": "^9.0.0",
@@ -10281,13 +10274,13 @@
"ignore": "^5.3.1",
"imurmurhash": "^0.1.4",
"is-plain-object": "^5.0.0",
- "known-css-properties": "^0.31.0",
+ "known-css-properties": "^0.34.0",
"mathml-tag-names": "^2.1.3",
"meow": "^13.2.0",
"micromatch": "^4.0.7",
"normalize-path": "^3.0.0",
"picocolors": "^1.0.1",
- "postcss": "^8.4.38",
+ "postcss": "^8.4.39",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-safe-parser": "^7.0.0",
"postcss-selector-parser": "^6.1.0",
@@ -10348,22 +10341,22 @@
}
},
"node_modules/stylelint-config-recommended-scss": {
- "version": "14.0.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.0.0.tgz",
- "integrity": "sha512-HDvpoOAQ1RpF+sPbDOT2Q2/YrBDEJDnUymmVmZ7mMCeNiFSdhRdyGEimBkz06wsN+HaFwUh249gDR+I9JR7Onw==",
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz",
+ "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==",
"dev": true,
"peer": true,
"dependencies": {
"postcss-scss": "^4.0.9",
- "stylelint-config-recommended": "^14.0.0",
- "stylelint-scss": "^6.0.0"
+ "stylelint-config-recommended": "^14.0.1",
+ "stylelint-scss": "^6.4.0"
},
"engines": {
"node": ">=18.12.0"
},
"peerDependencies": {
"postcss": "^8.3.3",
- "stylelint": "^16.0.2"
+ "stylelint": "^16.6.1"
},
"peerDependenciesMeta": {
"postcss": {
@@ -10394,9 +10387,9 @@
}
},
"node_modules/stylelint-config-recommended-vue/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -10407,13 +10400,13 @@
}
},
"node_modules/stylelint-scss": {
- "version": "6.3.2",
- "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.3.2.tgz",
- "integrity": "sha512-pNk9mXOVKkQtd+SROPC9io8ISSgX+tOVPhFdBE+LaKQnJMLdWPbGKAGYv4Wmf/RrnOjkutunNTN9kKMhkdE5qA==",
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.4.1.tgz",
+ "integrity": "sha512-+clI2bQC2FPOt06ZwUlXZZ95IO2C5bKTP0GLN1LNQPVvISfSNcgMKv/VTwym1mK9vnqhHbOk8lO4rj4nY7L9pw==",
"dev": true,
"peer": true,
"dependencies": {
- "known-css-properties": "^0.31.0",
+ "known-css-properties": "^0.34.0",
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-selector-parser": "^6.1.0",
@@ -10596,9 +10589,9 @@
"peer": true
},
"node_modules/synckit": {
- "version": "0.8.8",
- "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
- "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz",
+ "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==",
"dev": true,
"dependencies": {
"@pkgr/core": "^0.1.0",
@@ -10634,16 +10627,16 @@
}
},
"node_modules/table/node_modules/ajv": {
- "version": "8.16.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz",
- "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.4.1"
+ "require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
@@ -10891,9 +10884,9 @@
}
},
"node_modules/typescript": {
- "version": "5.5.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
- "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
+ "version": "5.5.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
+ "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
"devOptional": true,
"peer": true,
"bin": {
@@ -11046,9 +11039,9 @@
}
},
"node_modules/update-browserslist-db": {
- "version": "1.0.16",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz",
- "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz",
+ "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==",
"dev": true,
"funding": [
{
@@ -11154,9 +11147,9 @@
}
},
"node_modules/vfile": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz",
- "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz",
+ "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==",
"dependencies": {
"@types/unist": "^3.0.0",
"unist-util-stringify-position": "^4.0.0",
@@ -11181,9 +11174,9 @@
}
},
"node_modules/vite": {
- "version": "5.3.3",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.3.tgz",
- "integrity": "sha512-NPQdeCU0Dv2z5fu+ULotpuq5yfCS1BzKUIPhNbP3YBfAMGJXbt2nS+sbTFu+qchaqWTD+H3JK++nRwr6XIcp6A==",
+ "version": "5.3.4",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.4.tgz",
+ "integrity": "sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==",
"dev": true,
"dependencies": {
"esbuild": "^0.21.3",
@@ -11700,15 +11693,15 @@
"dev": true
},
"node_modules/vue": {
- "version": "3.4.31",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.31.tgz",
- "integrity": "sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==",
+ "version": "3.4.33",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.33.tgz",
+ "integrity": "sha512-VdMCWQOummbhctl4QFMcW6eNtXHsFyDlX60O/tsSQuCcuDOnJ1qPOhhVla65Niece7xq/P2zyZReIO5mP+LGTQ==",
"dependencies": {
- "@vue/compiler-dom": "3.4.31",
- "@vue/compiler-sfc": "3.4.31",
- "@vue/runtime-dom": "3.4.31",
- "@vue/server-renderer": "3.4.31",
- "@vue/shared": "3.4.31"
+ "@vue/compiler-dom": "3.4.33",
+ "@vue/compiler-sfc": "3.4.33",
+ "@vue/runtime-dom": "3.4.33",
+ "@vue/server-renderer": "3.4.33",
+ "@vue/shared": "3.4.33"
},
"peerDependencies": {
"typescript": "*"
@@ -11797,9 +11790,9 @@
}
},
"node_modules/vue-eslint-parser/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"peer": true,
"bin": {
@@ -11872,9 +11865,9 @@
}
},
"node_modules/vue-tsc/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
From d8bac6efe67df739ead40bfdfdb8fe551ce93eac Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Sun, 21 Jul 2024 17:57:48 +0200
Subject: [PATCH 057/178] fixes
Signed-off-by: dartcafe
---
src/components/VoteTable/VoteIndicator.vue | 13 ++++----
src/composables/handleScroll.ts | 29 +++++++++--------
src/router.ts | 4 +--
src/views/Vote.vue | 36 ++++++----------------
4 files changed, 36 insertions(+), 46 deletions(-)
diff --git a/src/components/VoteTable/VoteIndicator.vue b/src/components/VoteTable/VoteIndicator.vue
index 78f429046..904af52ef 100644
--- a/src/components/VoteTable/VoteIndicator.vue
+++ b/src/components/VoteTable/VoteIndicator.vue
@@ -58,12 +58,6 @@
diff --git a/src/components/Options/OptionItemDateBox.vue b/src/components/Options/OptionItemDateBox.vue
new file mode 100644
index 000000000..699a07bb7
--- /dev/null
+++ b/src/components/Options/OptionItemDateBox.vue
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+ {{ dateLocalFormat }}
+
+
+
+
+
+
+ {{ eventOption.from.month }}
+
+
+ {{ eventOption.from.dow }} {{ eventOption.from.day }}
+
+
+ {{ eventOption.from.time }}
+
+ - {{ eventOption.to.time }}
+
+
+
+
+
+ -
+
+
+
+
+ {{ eventOption.to.month }}
+
+
+ {{ eventOption.to.dow }} {{ eventOption.to.day }}
+
+
+ {{ eventOption.to.time }}
+
+
+
+
+
+
+
diff --git a/src/components/Options/OptionsDate.vue b/src/components/Options/OptionsDate.vue
index 863285a7c..469249f12 100644
--- a/src/components/Options/OptionsDate.vue
+++ b/src/components/Options/OptionsDate.vue
@@ -28,7 +28,7 @@
const optionsStore = useOptionsStore()
const cloneModal = ref(false)
- const optionToClone = ref({})
+ const optionToClone = ref(null)
const pollType = ref(PollType.Date)
const cssVar = {
@@ -50,7 +50,6 @@
diff --git a/src/components/VoteTable/VoteTable.vue b/src/components/VoteTable/VoteTable.vue
index 49d792f26..93a4206ca 100644
--- a/src/components/VoteTable/VoteTable.vue
+++ b/src/components/VoteTable/VoteTable.vue
@@ -300,10 +300,6 @@
.option-item {
flex-direction: row;
padding: 8px 4px;
- &.date-box {
- flex: 0;
- align-items: baseline;
- }
}
.vote-item.currentuser {
From 18c134626213126d59f2d8a2aa6c4d4d8a28c762 Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Sun, 11 Aug 2024 08:18:11 +0200
Subject: [PATCH 083/178] fix adding option and correct list ordering
Signed-off-by: dartcafe
---
src/components/Options/OptionsDate.vue | 2 +-
src/components/VoteTable/VoteTable.vue | 2 +-
src/stores/options.ts | 21 +++++++++++++++------
src/views/Vote.vue | 4 ++--
4 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/components/Options/OptionsDate.vue b/src/components/Options/OptionsDate.vue
index 469249f12..771f8b902 100644
--- a/src/components/Options/OptionsDate.vue
+++ b/src/components/Options/OptionsDate.vue
@@ -47,7 +47,7 @@
-
-
diff --git a/src/stores/options.ts b/src/stores/options.ts
index e58137044..97092d59d 100644
--- a/src/stores/options.ts
+++ b/src/stores/options.ts
@@ -65,19 +65,28 @@ export const useOptionsStore = defineStore('options', {
}),
getters: {
- count(state) {
+ count(state): number {
return state.list.length
},
- rankedOptions(state) {
- return state.ranked ? orderBy(state.list, ['votes.yes', 'votes.maybe'], ['desc', 'desc']) : state.list
+ rankedOptions(state): Option[] {
+ return orderBy(state.list, ['votes.yes', 'votes.maybe'], ['desc', 'desc'])
},
- proposalsExist(state) {
+ sortedOptions(state): Option[] {
+ const pollStore = usePollStore()
+ return pollStore.type === PollType.Date ? orderBy(state.list, ['timestamp'], ['asc']) : state.list
+ },
+
+ orderedOptions(state): Option[] {
+ return state.ranked ? this.rankedOptions : this.sortedOptions
+ },
+
+ proposalsExist(state): boolean {
return !!state.list.filter((option) => option.owner.userId).length
},
- confirmed(state) {
+ confirmed(state): Option[] {
return state.list.filter((option) => option.confirmed > 0)
},
@@ -191,7 +200,7 @@ export const useOptionsStore = defineStore('options', {
},
)
}
- this.$patch({ option: response.data.option })
+ this.list.push(response.data.option)
} catch (error) {
if (error?.code === 'ERR_CANCELED') return
Logger.error('Error adding option', { error, payload })
diff --git a/src/views/Vote.vue b/src/views/Vote.vue
index aaa44c7b3..94cbd294c 100644
--- a/src/views/Vote.vue
+++ b/src/views/Vote.vue
@@ -89,9 +89,9 @@
-
+
-
From 0b498a5b8b4cec1c78e8449b6dd2b6b572b6aaad Mon Sep 17 00:00:00 2001
From: dartcafe
Date: Sun, 11 Aug 2024 08:19:49 +0200
Subject: [PATCH 084/178] fix and add transitions
Signed-off-by: dartcafe
---
src/App.vue | 2 +-
src/assets/scss/transitions.scss | 20 +++++++++++---------
src/components/Activity/Activities.vue | 2 +-
src/components/Cards/VoteInfoCards.vue | 18 +++++++++---------
src/components/Comments/Comments.vue | 2 +-
5 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 165e6fee9..4f1ccbd4f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -26,7 +26,7 @@
const loading = ref(false)
const appClass = computed(() => [
- transitionClass, {
+ transitionClass.value, {
edit: pollStore.permissions.edit,
},
])
diff --git a/src/assets/scss/transitions.scss b/src/assets/scss/transitions.scss
index acbe17b09..7c37a5af7 100644
--- a/src/assets/scss/transitions.scss
+++ b/src/assets/scss/transitions.scss
@@ -8,20 +8,22 @@
transition: all 0.5s ease;
}
- .list-enter,
+ .list-enter-from,
.list-leave-to {
opacity: 0;
}
.list-move {
- transition: transform 0.5s;
- }
-
- .fade-leave-active .fade-enter-active{
- transition: opacity 0.5s;
+ transition: transform 0.5s ease;
}
+}
- .fade-enter, .fade-leave-to {
- opacity: 0;
- }
+.v-enter-active,
+.v-leave-active {
+ transition: opacity 0.5s ease;
}
+
+.v-enter-from,
+.v-leave-to {
+ opacity: 0;
+}
\ No newline at end of file
diff --git a/src/components/Activity/Activities.vue b/src/components/Activity/Activities.vue
index b612c4d9f..dbf027434 100644
--- a/src/components/Activity/Activities.vue
+++ b/src/components/Activity/Activities.vue
@@ -12,7 +12,7 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Comments/Comments.vue b/src/components/Comments/Comments.vue
index 83f3742bf..e12741b7d 100644
--- a/src/components/Comments/Comments.vue
+++ b/src/components/Comments/Comments.vue
@@ -18,7 +18,7 @@
Date: Sun, 11 Aug 2024 08:32:36 +0200
Subject: [PATCH 085/178] remove change event when adding text options
Signed-off-by: dartcafe
---
src/components/Options/OptionsTextAdd.vue | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/components/Options/OptionsTextAdd.vue b/src/components/Options/OptionsTextAdd.vue
index b5c89316e..ec8bc344a 100644
--- a/src/components/Options/OptionsTextAdd.vue
+++ b/src/components/Options/OptionsTextAdd.vue
@@ -44,8 +44,7 @@
+ @submit="addOption()" />