From c5a4b0fc11306dfd77b2d0eecdf2641c8e09970d Mon Sep 17 00:00:00 2001 From: Dmytro Kardava Date: Tue, 17 Jan 2023 17:34:19 +0100 Subject: [PATCH] stocky hours --- lib/Timetable.d.ts | 2 +- lib/Timetable.d.ts.map | 2 +- lib/Timetable.js | 6 +++--- lib/Timetable.js.map | 2 +- lib/types.d.ts | 3 ++- lib/types.d.ts.map | 2 +- package.json | 2 +- src/Timetable.tsx | 5 +++-- src/types.ts | 4 +++- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/Timetable.d.ts b/lib/Timetable.d.ts index c4a61a1..73b2897 100644 --- a/lib/Timetable.d.ts +++ b/lib/Timetable.d.ts @@ -1,5 +1,5 @@ /// import { TimetableProps } from "./types"; -declare function Timetable({ items, renderItem, date, range: rangeProp, fromHour, toHour, style, width, timeWidth, itemMinHeightInMinutes, hourHeight, linesTopOffset, linesLeftInset, columnHorizontalPadding, renderHeader, renderHour, startProperty, endProperty, ...props }: TimetableProps): JSX.Element; +declare function Timetable({ items, renderItem, date, range: rangeProp, fromHour, toHour, style, width, timeWidth, itemMinHeightInMinutes, hourHeight, linesTopOffset, linesLeftInset, columnHorizontalPadding, stickyHours, renderHeader, renderHour, startProperty, endProperty, ...props }: TimetableProps): JSX.Element; export default Timetable; //# sourceMappingURL=Timetable.d.ts.map \ No newline at end of file diff --git a/lib/Timetable.d.ts.map b/lib/Timetable.d.ts.map index 264bae0..a067d7e 100644 --- a/lib/Timetable.d.ts.map +++ b/lib/Timetable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Timetable.d.ts","sourceRoot":"","sources":["../src/Timetable.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAiB,cAAc,EAAC,MAAM,SAAS,CAAC;AAQvD,iBAAS,SAAS,CAAC,CAAC,EAAE,EAClB,KAAK,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EAAE,SAAS,EAChB,QAAY,EACZ,MAAW,EAEX,KAAK,EAEL,KAAK,EACL,SAAc,EACd,sBAA2B,EAC3B,UAAe,EACf,cAAmB,EACnB,cAAmB,EACnB,uBAA4B,EAE5B,YAAY,EACZ,UAAU,EACV,aAAsC,EACtC,WAAkC,EAClC,GAAG,KAAK,EACX,EAAE,cAAc,CAAC,CAAC,CAAC,eAyLnB;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"Timetable.d.ts","sourceRoot":"","sources":["../src/Timetable.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAiB,cAAc,EAAC,MAAM,SAAS,CAAC;AAQvD,iBAAS,SAAS,CAAC,CAAC,EAAE,EAClB,KAAK,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EAAE,SAAS,EAChB,QAAY,EACZ,MAAW,EAEX,KAAK,EAEL,KAAK,EACL,SAAc,EACd,sBAA2B,EAC3B,UAAe,EACf,cAAmB,EACnB,cAAmB,EACnB,uBAA4B,EAE5B,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAsC,EACtC,WAAkC,EAClC,GAAG,KAAK,EACX,EAAE,cAAc,CAAC,CAAC,CAAC,eAyLnB;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/lib/Timetable.js b/lib/Timetable.js index 65530d7..4e131ae 100644 --- a/lib/Timetable.js +++ b/lib/Timetable.js @@ -8,7 +8,7 @@ import Hours from "./components/Hours"; function withDefault(value, defaultValue) { return typeof value === "undefined" ? defaultValue : value; } -function Timetable({ items, renderItem, date, range: rangeProp, fromHour = 0, toHour = 24, style, width, timeWidth = 50, itemMinHeightInMinutes = 25, hourHeight = 60, linesTopOffset = 18, linesLeftInset = 15, columnHorizontalPadding = 10, renderHeader, renderHour, startProperty = 'startDate', endProperty = 'endDate', ...props }) { +function Timetable({ items, renderItem, date, range: rangeProp, fromHour = 0, toHour = 24, style, width, timeWidth = 50, itemMinHeightInMinutes = 25, hourHeight = 60, linesTopOffset = 18, linesLeftInset = 15, columnHorizontalPadding = 10, stickyHours, renderHeader, renderHour, startProperty = 'startDate', endProperty = 'endDate', ...props }) { const screenWidth = useWindowDimensions().width; const range = { from: normalizeTime(date || rangeProp?.from), @@ -105,9 +105,9 @@ function Timetable({ items, renderItem, date, range: rangeProp, fromHour = 0, to linesLeftInset, minuteHeight, ]); - return ( + }) : undefined} {...props.scrollViewProps}> diff --git a/lib/Timetable.js.map b/lib/Timetable.js.map index 56b7048..2558761 100644 --- a/lib/Timetable.js.map +++ b/lib/Timetable.js.map @@ -1 +1 @@ -{"version":3,"file":"Timetable.js","sourceRoot":"","sources":["../src/Timetable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAC,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAEnF,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAEvC,SAAS,WAAW,CAAI,KAAQ,EAAE,YAA4B;IAC1D,OAAO,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAuB,CAAC;AACjF,CAAC;AAED,SAAS,SAAS,CAAI,EAClB,KAAK,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,GAAG,CAAC,EACZ,MAAM,GAAG,EAAE,EAEX,KAAK,EAEL,KAAK,EACL,SAAS,GAAG,EAAE,EACd,sBAAsB,GAAG,EAAE,EAC3B,UAAU,GAAG,EAAE,EACf,cAAc,GAAG,EAAE,EACnB,cAAc,GAAG,EAAE,EACnB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e,CAAC,CAAC,eAAe,CAAC,CACjC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,SAAS,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CACvB,kBAAkB,CAAC,CAAC,KAAK,EAAE,aAAa,CAAC,CACzC,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CACzB,QAAQ,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAC1B,UAAU,CAAC,CAAC,UAAU,CAAC,EAG3B;;oBAAA,CAAC,CAAC,KAAK,CAAC,WAAW,IAAI,CACnB,CAAC,OAAO,CACJ,KAAK,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CACtB,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,IAAI,CAAC,CAAC,eAAe,CAAC,CACtB,KAAK,CAAC,CAAC,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,EACzC,CACL,CAED;;oBAAA,CAAC,WAAW,CACZ;oBAAA,CAAC,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAC1C;gBAAA,EAAE,IAAI,CACV;YAAA,EAAE,IAAI,CACV;QAAA,EAAE,QAAQ,CAAC,UAAU,CAAC,CACzB,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/lib/types.d.ts b/lib/types.d.ts index 4bfc0b7..30296f1 100644 --- a/lib/types.d.ts +++ b/lib/types.d.ts @@ -38,7 +38,7 @@ export interface NowLineProps { calculateTopOffset: (date: number) => number; } export interface HoursProps { - offsetX: Animated.Value; + offsetX?: Animated.Value; columnDays: Day[]; columnWidth: number; linesTopOffset: number; @@ -86,6 +86,7 @@ export type TimetableProps = Values & { linesTopOffset?: number; linesLeftInset?: number; columnHorizontalPadding?: number; + stickyHours?: boolean; hideNowLine?: boolean; enableSnapping?: boolean; scrollViewProps?: ScrollViewProps; diff --git a/lib/types.d.ts.map b/lib/types.d.ts.map index 578558a..e561173 100644 --- a/lib/types.d.ts.map +++ b/lib/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAExF,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE;QACH,QAAQ,EAAE,UAAU,CAAC;QACrB,MAAM,EAAE,CAAC,CAAC;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,SAAS,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,oBAAoB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5C,eAAe,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,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AAC,CAAC;IAEtC,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC;IAExB,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IAEtB,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAElC,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE9B,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACrC,CAAA"} \ No newline at end of file diff --git a/package.json b/package.json index dfa4254..814568d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-calendar-timetable", "description": "Timetable (schedule) component for React Native applications", - "version": "1.0.2", + "version": "1.0.3", "private": false, "main": "./lib/Timetable.js", "types": "./lib/Timetable.d.ts", diff --git a/src/Timetable.tsx b/src/Timetable.tsx index d526396..fb3be62 100644 --- a/src/Timetable.tsx +++ b/src/Timetable.tsx @@ -29,6 +29,7 @@ function Timetable({ linesLeftInset = 15, columnHorizontalPadding = 10, + stickyHours, renderHeader, renderHour, startProperty = 'startDate' as keyof I, @@ -169,9 +170,9 @@ function Timetable({ diff --git a/src/types.ts b/src/types.ts index 9f2dd0a..cd3c575 100644 --- a/src/types.ts +++ b/src/types.ts @@ -45,7 +45,7 @@ export interface NowLineProps { } export interface HoursProps { - offsetX: Animated.Value, + offsetX?: Animated.Value, columnDays: Day[], columnWidth: number, linesTopOffset: number, @@ -118,6 +118,8 @@ export type TimetableProps = Values & { // Space between column borders and column cards columnHorizontalPadding?: number, + // Enables sticky hours for horizontal scroll + stickyHours?: boolean, // Hiding line, example if you don't want to show line on other days hideNowLine?: boolean, // Enables snapping to columns on scroll