Skip to content

Commit

Permalink
Merge pull request #106 from howljs/develop
Browse files Browse the repository at this point in the history
Release v2.0.0
  • Loading branch information
howljs authored Sep 24, 2024
2 parents 03491e8 + efbaadf commit c049aaa
Show file tree
Hide file tree
Showing 280 changed files with 35,001 additions and 34,772 deletions.
98 changes: 0 additions & 98 deletions .circleci/config.yml

This file was deleted.

13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,19 @@ buck-out/
android/app/libs
android/keystores/debug.keystore

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Expo
.expo/*
.expo/

# Turborepo
.turbo/

# generated by bob
lib/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions .yarnrc

This file was deleted.

10 changes: 10 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.1.cjs
20 changes: 15 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:

- The library package in the root directory.
- An example app in the `example/` directory.

To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:

```sh
yarn
```

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.

While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.

You can use various commands from the root directory to work with the project.

To start the packager:

Expand Down Expand Up @@ -43,7 +52,7 @@ yarn example web
Make sure your code passes TypeScript and ESLint. Run the following to verify:

```sh
yarn typescript
yarn typecheck
yarn lint
```

Expand All @@ -58,6 +67,7 @@ Remember to add tests for your change if possible. Run the unit tests by:
```sh
yarn test
```

### Commit message convention

We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
Expand Down Expand Up @@ -93,8 +103,8 @@ yarn release

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn typescript`: type-check files with TypeScript.
- `yarn`: setup project by installing dependencies.
- `yarn typecheck`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn example start`: start the Metro server for the example app.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 howljs
Copyright (c) 2024 howljs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
69 changes: 31 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 📅 React Native Calendar Kit

React Native Calendar component, fully implemented using @shopify/flash-list, react-native-gesture-handler and react-native-reanimated. Support pinch to zoom, drag and drop to create/update event.
## Status: Development

React Native Calendar component, fully implemented using react-native-gesture-handler and react-native-reanimated. Support pinch to zoom, drag and drop to create/update event.

[![Version][npm-shield]][npm-link]
[![PayPal_Me][paypal-me-shield]][paypal-me]
[![ko-fi][ko-fi-shield]][ko-fi-profile]

[![Demo](./assets/demo.gif)](https://user-images.githubusercontent.com/33460888/199891737-af6957ba-6a2c-49ee-8312-6feca89a2c39.MP4)

## Installation

Using Yarn:
Expand All @@ -22,64 +22,57 @@ Using NPM:
$ npm install --save @howljs/calendar-kit
```

The libraries we will install now are [@shopify/flash-list](https://shopify.github.io/flash-list/), [react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/) and [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/). If you already have these libraries installed and at the latest version, you are done here! Otherwise, read on.

## Installing dependencies into a bare React Native project
The libraries we will install now are [react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/) and [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/). If you already have these libraries installed and at the latest version, you are done here! Otherwise, read on.

Using Yarn:
## Installing dependencies into an Expo managed project

```
$ yarn add @shopify/flash-list react-native-gesture-handler react-native-reanimated
$ npx expo install react-native-gesture-handler react-native-reanimated
```

Using NPM:

```
$ npm install --save @shopify/flash-list react-native-gesture-handler react-native-reanimated
```
> Follow installation instructions for [React Native Reanimated](https://docs.expo.dev/versions/latest/sdk/reanimated/) and [React Native Gesture Handler](https://docs.expo.dev/versions/latest/sdk/gesture-handler/).
> Follow installation instructions for [React Native Reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) and [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/docs/installation).

## Installing dependencies into an Expo managed project
If you enable `useHaptic`, you need to install [expo-haptics](https://docs.expo.dev/versions/latest/sdk/haptics/)

```
$ npx expo install @shopify/flash-list react-native-gesture-handler react-native-reanimated
$ npx expo install expo-haptics
```

> Follow installation instructions for [React Native Reanimated](https://docs.expo.dev/versions/latest/sdk/reanimated/) and [React Native Gesture Handler](https://docs.expo.dev/versions/latest/sdk/gesture-handler/).
## Documentation
## Installing dependencies into a bare React Native project

- [Guides](https://howljs.github.io/react-native-calendar-kit/docs/intro)
Using Yarn:

- [Example](./example/)
```
$ yarn add react-native-gesture-handler react-native-reanimated
```

## Features
Using NPM:

- [Pinch to zoom](https://howljs.github.io/react-native-calendar-kit/docs/guides/pinch-to-zoom)
- [Drag and drop to create a new event](https://howljs.github.io/react-native-calendar-kit/docs/guides/drag-to-create)
- [Drag and drop to edit the event](https://howljs.github.io/react-native-calendar-kit/docs/guides/drag-to-edit)
- [Set unavailable hours and unavailable days](https://howljs.github.io/react-native-calendar-kit/docs/guides/unavailable-time)
```
$ npm install --save react-native-gesture-handler react-native-reanimated
```

## Basic Usage
> Follow installation instructions for [React Native Reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) and [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/docs/installation).
```tsx
import { TimelineCalendar } from '@howljs/calendar-kit';
If you enable `useHaptic`, you need to install [react-native-haptic-feedback](https://github.com/mkuczera/react-native-haptic-feedback).

// Week View
<TimelineCalendar viewMode="week" />;
Using Yarn:

// Day View
<TimelineCalendar viewMode="day" />;
```
$ yarn add react-native-haptic-feedback
```

// 3-days
<TimelineCalendar viewMode="threeDays" />;
Using NPM:

// Work week
<TimelineCalendar viewMode="workWeek" />;
```
$ npm install --save react-native-haptic-feedback
```

![View mode](./assets/mode.jpg)
## TODO:
- [ ] Update documentation
- [ ] Cache events to speed up rendering
- [ ] Month View

[npm-shield]: https://img.shields.io/npm/v/@howljs/calendar-kit
[ko-fi-shield]: https://img.shields.io/static/v1.svg?label=%20&message=ko-fi&logo=ko-fi&color=13C3FF
Expand Down
Binary file removed assets/demo.gif
Binary file not shown.
Binary file removed assets/mode.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
20 changes: 0 additions & 20 deletions documentation/.gitignore

This file was deleted.

41 changes: 0 additions & 41 deletions documentation/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions documentation/babel.config.js

This file was deleted.

8 changes: 0 additions & 8 deletions documentation/docs/guides/_category_.json

This file was deleted.

Loading

0 comments on commit c049aaa

Please sign in to comment.