From fba83b01df095906d4bc73a12f2a21acd5e9ed88 Mon Sep 17 00:00:00 2001 From: Gregory <117281520+gca-axelor@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:12:31 +0100 Subject: [PATCH 1/4] fix: restore old version of calendar --- packages/core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/package.json b/packages/core/package.json index c39c4809e..6130454b1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -35,7 +35,7 @@ "i18next": "^23.14.0", "moment": "^2.30.1", "react-i18next": "^15.0.1", - "react-native-calendars": "1.1306.0", + "react-native-calendars": "1.1284", "react-native-reanimated": "3.8.1", "react-native-signature-canvas": "4.5.1", "react-native-syntax-highlighter": "^2.1.0", From fa83731498f305e01da7addbff1bc2be4775635d Mon Sep 17 00:00:00 2001 From: Gregory <117281520+gca-axelor@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:45:08 +0100 Subject: [PATCH 2/4] fix: refresh issue on agenda --- changelogs/unreleased/88597.json | 5 ++ packages/core/package.json | 2 +- patches/react-native-calendars+1.1306.0.patch | 57 +++++++++++++++++++ yarn.lock | 37 ++---------- 4 files changed, 69 insertions(+), 32 deletions(-) create mode 100644 changelogs/unreleased/88597.json create mode 100644 patches/react-native-calendars+1.1306.0.patch diff --git a/changelogs/unreleased/88597.json b/changelogs/unreleased/88597.json new file mode 100644 index 000000000..6fc5cafab --- /dev/null +++ b/changelogs/unreleased/88597.json @@ -0,0 +1,5 @@ +{ + "title": "Agenda: fix refresh issue", + "type": "fix", + "packages": "core" +} diff --git a/packages/core/package.json b/packages/core/package.json index 6130454b1..c39c4809e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -35,7 +35,7 @@ "i18next": "^23.14.0", "moment": "^2.30.1", "react-i18next": "^15.0.1", - "react-native-calendars": "1.1284", + "react-native-calendars": "1.1306.0", "react-native-reanimated": "3.8.1", "react-native-signature-canvas": "4.5.1", "react-native-syntax-highlighter": "^2.1.0", diff --git a/patches/react-native-calendars+1.1306.0.patch b/patches/react-native-calendars+1.1306.0.patch new file mode 100644 index 000000000..ccbece2fe --- /dev/null +++ b/patches/react-native-calendars+1.1306.0.patch @@ -0,0 +1,57 @@ +diff --git a/node_modules/react-native-calendars/src/agenda/index.js b/node_modules/react-native-calendars/src/agenda/index.js +index 973e34c..3215e07 100644 +--- a/node_modules/react-native-calendars/src/agenda/index.js ++++ b/node_modules/react-native-calendars/src/agenda/index.js +@@ -4,9 +4,9 @@ import XDate from 'xdate'; + import memoize from 'memoize-one'; + import React, { Component } from 'react'; + import { View, Dimensions, Animated } from 'react-native'; +-import { extractCalendarListProps, extractReservationListProps } from '../componentUpdater'; + import { xdateToData, toMarkingFormat } from '../interface'; + import { sameDate, sameMonth } from '../dateutils'; ++// @ts-expect-error + import { AGENDA_CALENDAR_KNOB } from '../testIDs'; + import { VelocityTracker } from '../velocityTracker'; + import { getCalendarDateString } from '../services'; +@@ -14,6 +14,7 @@ import styleConstructor from './style'; + import WeekDaysNames from '../commons/WeekDaysNames'; + import CalendarList from '../calendar-list'; + import ReservationList from './reservation-list'; ++import {extractComponentProps,extractCalendarListProps, extractReservationListProps} from '../componentUpdater'; + const HEADER_HEIGHT = 104; + const KNOB_HEIGHT = 24; + /** +@@ -238,20 +239,25 @@ export default class Agenda extends Component { + renderReservations() { + const reservationListProps = extractReservationListProps(this.props); + if (isFunction(this.props.renderList)) { +- return this.props.renderList({ +- ...reservationListProps, +- selectedDay: this.state.selectedDay, +- topDay: this.state.topDay, +- onDayChange: this.onDayChange, +- }); ++ return this.props.renderList({ ++ ...reservationListProps, ++ selectedDay: this.state.selectedDay, ++ topDay: this.state.topDay, ++ onDayChange: this.onDayChange, ++ }); + } ++ + return (); + } + renderCalendarList() { + const { markedDates, items } = this.props; + const shouldHideExtraDays = this.state.calendarScrollable ? this.props.hideExtraDays : false; +- const calendarListProps = extractCalendarListProps(this.props); +- return (); ++ const calendarListProps = extractComponentProps(CalendarList, this.props) ++ ++ return (); + } + renderKnob() { + const { showClosingKnob, hideKnob, renderKnob } = this.props; diff --git a/yarn.lock b/yarn.lock index cef9b2d3a..074afff25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11479,9 +11479,9 @@ recast@^0.23.1, recast@^0.23.3: tslib "^2.0.1" recyclerlistview@^4.0.0: - version "4.2.0" - resolved "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.0.tgz#a140149aaa470c9787a1426452651934240d69ef" - integrity sha512-uuBCi0c+ggqHKwrzPX4Z/mJOzsBbjZEAwGGmlwpD/sD7raXixdAbdJ6BTcAmuWG50Cg4ru9p12M94Njwhr/27A== + version "4.2.1" + resolved "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.1.tgz#4537a0959400cdce1df1f38d26aab823786e9b13" + integrity sha512-NtVYjofwgUCt1rEsTp6jHQg/47TWjnO92TU2kTVgJ9wsc/ely4HnizHHa+f/dI7qaw4+zcSogElrLjhMltN2/g== dependencies: lodash.debounce "4.0.8" prop-types "15.8.1" @@ -12156,16 +12156,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -12243,7 +12234,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12257,13 +12248,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -13184,7 +13168,7 @@ wordwrap@^1.0.0: resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -13202,15 +13186,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 38d9f8f93484ba9d662e9408884f67103b70752c Mon Sep 17 00:00:00 2001 From: vhu-axelor <146069039+vhu-axelor@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:09:17 +0100 Subject: [PATCH 3/4] chore: restore yarn.lock --- yarn.lock | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 074afff25..cef9b2d3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11479,9 +11479,9 @@ recast@^0.23.1, recast@^0.23.3: tslib "^2.0.1" recyclerlistview@^4.0.0: - version "4.2.1" - resolved "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.1.tgz#4537a0959400cdce1df1f38d26aab823786e9b13" - integrity sha512-NtVYjofwgUCt1rEsTp6jHQg/47TWjnO92TU2kTVgJ9wsc/ely4HnizHHa+f/dI7qaw4+zcSogElrLjhMltN2/g== + version "4.2.0" + resolved "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.0.tgz#a140149aaa470c9787a1426452651934240d69ef" + integrity sha512-uuBCi0c+ggqHKwrzPX4Z/mJOzsBbjZEAwGGmlwpD/sD7raXixdAbdJ6BTcAmuWG50Cg4ru9p12M94Njwhr/27A== dependencies: lodash.debounce "4.0.8" prop-types "15.8.1" @@ -12156,7 +12156,16 @@ string-natural-compare@^3.0.1: resolved "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -12234,7 +12243,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12248,6 +12257,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -13168,7 +13184,7 @@ wordwrap@^1.0.0: resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -13186,6 +13202,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 21e9c59afa5888ed87d7ce0bf461524d8b3dcef6 Mon Sep 17 00:00:00 2001 From: lme-axelor <102581501+lme-axelor@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:10:51 +0100 Subject: [PATCH 4/4] chore: improve changelog --- changelogs/unreleased/88597.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/unreleased/88597.json b/changelogs/unreleased/88597.json index 6fc5cafab..19e054365 100644 --- a/changelogs/unreleased/88597.json +++ b/changelogs/unreleased/88597.json @@ -1,5 +1,5 @@ { - "title": "Agenda: fix refresh issue", + "title": "Agenda: patch package to restore load of items on component layout", "type": "fix", "packages": "core" }