Skip to content

Commit 8603b4b

Browse files
authored
Merge branch 'feature/update-vue' into fix-deprecation-errors
2 parents 16f1c27 + 1e61f66 commit 8603b4b

File tree

7 files changed

+1567
-1657
lines changed

7 files changed

+1567
-1657
lines changed

.eslintrc.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ module.exports = {
1212
rules: {
1313
'max-len': [ 'error', 120 ],
1414
'no-multiple-empty-lines' : ['error', { 'max': 1 }],
15-
'vue/multi-word-component-names' : [ 'off' ]
16-
},
15+
'vue/multi-word-component-names' : [ 'off' ],
16+
// Migration changes
17+
'vue/no-deprecated-v-bind-sync': 'off',
18+
'vue/no-deprecated-slot-attribute': 'off',
19+
'vue/require-explicit-emits': 'off',
20+
'vue/no-deprecated-v-on-native-modifier': 'off',
21+
'vue/no-deprecated-slot-scope-attribute': 'off',
22+
'vue/no-v-for-template-key-on-child': 'off',
23+
'vue/no-deprecated-destroyed-lifecycle': 'off',
24+
'vue/no-v-model-argument': 'off'
25+
},
1726
};

package-lock.json

Lines changed: 1508 additions & 1327 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"@types/lodash": "^4.14.199",
2020
"@typescript-eslint/eslint-plugin": "^6.7.5",
2121
"@typescript-eslint/parser": "^6.7.5",
22-
"@vue/compiler-sfc": "3.2.0",
22+
"@vue/compiler-sfc": "^3.3.8",
2323
"@vue/eslint-config-typescript": "^12.0.0",
2424
"@vue/test-utils": "^2.0.0",
2525
"@vue/vue3-jest": "^29.2.4",
26-
"@vue/runtime-dom": "3.2.0",
26+
"@vue/runtime-dom": "^3.3.8",
2727
"@wikimedia/codex": "^0.20.0",
2828
"@wikimedia/codex-design-tokens": "^0.20.0",
2929
"@wikimedia/codex-icons": "^0.20.0",
@@ -49,25 +49,14 @@
4949
"dependencies": {
5050
"@inertiajs/inertia": "^0.11.0",
5151
"@inertiajs/inertia-vue3": "^0.6.0",
52-
"@vue/compat": "3.2.0",
52+
"@vue/compat": "^3.3.8",
5353
"@wmde/wikit-tokens": "^2.1.0-alpha.15",
5454
"@wmde/wikit-vue-components": "^2.1.0-alpha.16",
5555
"date-fns": "^2.30.0",
5656
"lodash": "^4.17.21",
5757
"pinia": "2.0.36",
5858
"ress": "^5.0.2",
59-
"vue": "3.2.0",
59+
"vue": "^3.3.8",
6060
"vue-banana-i18n": "2.3.0"
61-
},
62-
"overrides": {
63-
"pinia": {
64-
"vue": "3.2.0"
65-
},
66-
"@wikimedia/codex": {
67-
"vue": "3.2.0"
68-
},
69-
"vue-banana-i18n": {
70-
"banana-i18n": "2.2.0"
71-
}
7261
}
7362
}

resources/js/Components/MismatchRow.vue

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
</span>
4747
</td>
4848
<td :data-header="$i18n('column-review-status')">
49-
<dropdown
50-
:menuItems="Object.values(statusOptions)"
49+
<cdx-select
50+
:menu-items="Object.values(statusOptions)"
5151
:disabled="disabled"
52-
v-model="decision"
53-
@input="$bubble('decision', {
52+
v-model:selected="reviewStatus"
53+
@update:selected="$bubble('decision', {
5454
id: mismatch.id,
5555
item_id: mismatch.item_id,
56-
review_status: $event.value
56+
review_status: $event
5757
})"
5858
/>
5959
</td>
@@ -79,15 +79,16 @@
7979
</wikit-button>
8080
</div>
8181
</div>
82-
<wikit-dialog class="full-description-dialog"
82+
<cdx-dialog class="full-description-dialog"
8383
:title="$i18n('column-upload-info')"
84-
ref="fullDescriptionDialog"
85-
:actions="[{
84+
:open="fullDescriptionDialog"
85+
:primary-action="{
8686
label: $i18n('confirm-dialog-button'),
87-
namespace: 'next-steps-confirm'
88-
}]"
89-
@action="(_, dialog) => dialog.hide()"
90-
dismiss-button
87+
namespace: 'next-steps-confirm',
88+
actionType: 'progressive'
89+
}"
90+
@primary="() => fullDescriptionDialog = false"
91+
close-button-label="X"
9192
>
9293
<wikit-link class="uploader"
9394
:href="`https://www.wikidata.org/wiki/User:${mismatch.import_meta.user.username}`"
@@ -99,7 +100,7 @@
99100
<div class="description">
100101
{{this.mismatch.import_meta.description}}
101102
</div>
102-
</wikit-dialog>
103+
</cdx-dialog>
103104
</td>
104105
</tr>
105106
</template>
@@ -111,10 +112,9 @@ import type { PropType } from 'vue';
111112
import { defineComponent } from 'vue';
112113
import {
113114
Button as WikitButton,
114-
Dialog as WikitDialog,
115-
Dropdown,
116115
Link as WikitLink
117116
} from '@wmde/wikit-vue-components';
117+
import { CdxDialog, CdxSelect } from "@wikimedia/codex";
118118
import { MenuItem } from '@wmde/wikit-vue-components/dist/components/MenuItem';
119119
120120
import { LabelledMismatch, ReviewDecision } from "../types/Mismatch";
@@ -132,14 +132,16 @@ type ReviewOptionMap = {
132132
interface MismatchRowState {
133133
statusOptions: ReviewOptionMap;
134134
decision: ReviewMenuItem;
135+
reviewStatus: string;
136+
fullDescriptionDialog: boolean;
135137
}
136138
137139
export default defineComponent({
138140
components: {
139141
WikitButton,
140142
WikitLink,
141-
WikitDialog,
142-
Dropdown,
143+
CdxDialog,
144+
CdxSelect
143145
},
144146
props: {
145147
mismatch: Object as PropType<LabelledMismatch>,
@@ -183,14 +185,14 @@ export default defineComponent({
183185
return {
184186
statusOptions,
185187
decision: statusOptions[this.mismatch.review_status],
188+
reviewStatus: String(this.mismatch.review_status),
189+
fullDescriptionDialog: false
186190
};
187191
},
188192
methods: {
189193
showDialog(e: Event) {
190194
e.preventDefault();
191-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
192-
const descriptionDialog = this.$refs.fullDescriptionDialog! as any;
193-
descriptionDialog.show();
195+
this.fullDescriptionDialog = true;
194196
}
195197
}
196198
});

0 commit comments

Comments
 (0)