From 65de817d6d092194c469bea24f54e3862d212a3b Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Thu, 1 Dec 2022 17:25:26 +0100 Subject: [PATCH] Fix the current year selection in the date picker --- .../bugfix-date-picker-current-year-selection | 6 ++++ package.json | 7 ++++- packages/design-system/package.json | 4 +-- packages/web-runtime/package.json | 1 - patches/v-calendar@2.3.4.patch | 13 +++++++++ pnpm-lock.yaml | 29 +++++++++++++++---- 6 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 changelog/unreleased/bugfix-date-picker-current-year-selection create mode 100644 patches/v-calendar@2.3.4.patch diff --git a/changelog/unreleased/bugfix-date-picker-current-year-selection b/changelog/unreleased/bugfix-date-picker-current-year-selection new file mode 100644 index 00000000000..b3a1c89cecb --- /dev/null +++ b/changelog/unreleased/bugfix-date-picker-current-year-selection @@ -0,0 +1,6 @@ +Bugfix: Current year selection in the date picker + +We applied a hotpatch to fix the selection of the current year in December in the date picker. + +https://github.com/owncloud/web/pull/8058 +https://github.com/owncloud/web/issues/8042 diff --git a/package.json b/package.json index 4a86c351fea..df0696dfd60 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,8 @@ "@cucumber/messages": "17.1.1", "@cucumber/pretty-formatter": "1.0.0", "@noble/hashes": "1.1.3", - "@ownclouders/design-system": "workspace:*", "@ownclouders/babel-preset": "workspace:*", + "@ownclouders/design-system": "workspace:*", "@ownclouders/eslint-config": "workspace:*", "@ownclouders/prettier-config": "workspace:*", "@ownclouders/tsconfig": "workspace:*", @@ -125,5 +125,10 @@ "packageManager": "pnpm@7.14.0", "volta": { "node": "16.18.1" + }, + "pnpm": { + "patchedDependencies": { + "v-calendar@2.3.4": "patches/v-calendar@2.3.4.patch" + } } } diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 97d9dbd6603..31247c25403 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -106,7 +106,7 @@ "tippy.js": "^6.3.7", "typescript": "^4.3.2", "url-loader": "^4.1.1", - "v-calendar": "^2.3.2", + "v-calendar": "^2.3.4", "vue-gettext": "^2.1.12", "vue-inline-svg": "^2.0.0", "vue-jest": "^3.0.4", @@ -133,7 +133,7 @@ "postcss-import": "^12.0.1", "postcss-url": "^9.0.0", "tippy.js": "^6.3.7", - "v-calendar": "^2.3.2", + "v-calendar": "^2.3.4", "vue": "^2.7.13", "vue-inline-svg": "^2.0.0", "vue-select": "^3.12.0", diff --git a/packages/web-runtime/package.json b/packages/web-runtime/package.json index c299bdebdd1..4efca5d4370 100644 --- a/packages/web-runtime/package.json +++ b/packages/web-runtime/package.json @@ -37,7 +37,6 @@ "tippy.js": "^6.3.7", "utf8": "^3.0.0", "uuid": "^9.0.0", - "v-calendar": "^2.3.2", "vue-async-computed": "^3.9.0", "vue-concurrency": "4.0.0", "vue-events": "^3.1.0", diff --git a/patches/v-calendar@2.3.4.patch b/patches/v-calendar@2.3.4.patch new file mode 100644 index 00000000000..3a398e15974 --- /dev/null +++ b/patches/v-calendar@2.3.4.patch @@ -0,0 +1,13 @@ +diff --git a/lib/components/date-picker.umd.js b/lib/components/date-picker.umd.js +index 571ada2a0d82ed79833600b75eca9a5ec670660f..124df53b7b8fe976c5afcc4588783b3c626cd8e2 100644 +--- a/lib/components/date-picker.umd.js ++++ b/lib/components/date-picker.umd.js +@@ -17351,7 +17351,7 @@ const _yearGroupCount = 12; + for (let year = startYear; year < endYear; year += 1) { + let enabled = false; + +- for (let month = 1; month < 12; month++) { ++ for (let month = 1; month <= 12; month++) { + enabled = this.validator({ + month, + year \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb844a20bd5..69db8d4f431 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,10 @@ lockfileVersion: 5.4 +patchedDependencies: + v-calendar@2.3.4: + hash: y3xp3q23722rnj6ewses6p57yq + path: patches/v-calendar@2.3.4.patch + importers: .: @@ -252,7 +257,7 @@ importers: tippy.js: ^6.3.7 typescript: ^4.3.2 url-loader: ^4.1.1 - v-calendar: ^2.3.2 + v-calendar: ^2.3.4 vue: 2.7.14 vue-gettext: ^2.1.12 vue-inline-svg: ^2.0.0 @@ -334,7 +339,7 @@ importers: tippy.js: 6.3.7 typescript: 4.9.3 url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy - v-calendar: 2.3.4_2swpk75dthi2ukkvfa23v6u5ei + v-calendar: 2.3.4_y3xp3q23722rnj6ewses6p57yq_2swpk75dthi2ukkvfa23v6u5ei vue: 2.7.14 vue-gettext: 2.1.12 vue-inline-svg: 2.0.0 @@ -641,7 +646,6 @@ importers: tippy.js: ^6.3.7 utf8: ^3.0.0 uuid: ^9.0.0 - v-calendar: ^2.3.2 vue: 2.7.14 vue-async-computed: ^3.9.0 vue-concurrency: 4.0.0 @@ -694,7 +698,6 @@ importers: tippy.js: 6.3.7 utf8: 3.0.0 uuid: 9.0.0 - v-calendar: 2.3.4_2swpk75dthi2ukkvfa23v6u5ei vue: 2.7.14 vue-async-computed: 3.9.0_vue@2.7.14 vue-concurrency: 4.0.0_vue@2.7.14 @@ -7068,7 +7071,7 @@ packages: minipass-pipeline: 1.2.4 mkdirp: 1.0.4 p-map: 4.0.0 - promise-inflight: 1.0.1_bluebird@3.7.2 + promise-inflight: 1.0.1 rimraf: 3.0.2 ssri: 8.0.1 tar: 6.1.12 @@ -8769,6 +8772,7 @@ packages: /core-js/3.26.1: resolution: {integrity: sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA==} requiresBuild: true + dev: true /core-util-is/1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} @@ -9427,10 +9431,12 @@ packages: date-fns: '>=2.0.0-alpha.13' dependencies: date-fns: 2.25.0 + dev: true /date-fns/2.25.0: resolution: {integrity: sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w==} engines: {node: '>=0.11'} + dev: true /dateformat/4.6.3: resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} @@ -17711,6 +17717,15 @@ packages: engines: {node: '>=0.4.0'} dev: true + /promise-inflight/1.0.1: + resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + dev: true + /promise-inflight/1.0.1_bluebird@3.7.2: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} peerDependencies: @@ -21227,7 +21242,7 @@ packages: hasBin: true dev: false - /v-calendar/2.3.4_2swpk75dthi2ukkvfa23v6u5ei: + /v-calendar/2.3.4_y3xp3q23722rnj6ewses6p57yq_2swpk75dthi2ukkvfa23v6u5ei: resolution: {integrity: sha512-jH9cCuryt7++LWkHE4zvkqORQYUmmfLwhYxaDzndTrd3hWyLtm3WGyfanc++PEqchTkPP31VewFTXqlSf3Gk7Q==} peerDependencies: '@popperjs/core': ^2.4.0 @@ -21239,6 +21254,8 @@ packages: date-fns-tz: 1.1.6_date-fns@2.25.0 lodash: 4.17.21 vue: 2.7.14 + dev: true + patched: true /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}