Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some changes #1

Open
wants to merge 15 commits into
base: source
Choose a base branch
from
14 changes: 8 additions & 6 deletions docs/component-camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Camera
sidebar_label: Camera
---

Camera component is used to **take pictures**.
The Camera component is used to **take pictures**.

## Example

Expand All @@ -24,16 +24,18 @@ Take a picture with the camera.

![take picture](assets/camera/take-picture.png)

| Type | Explanation | Required |
| ------ | ---------------- | -------- |
| Camera | Camera Component | Yes |
| Type | Explanation | Required |
| ------ | -------------------------| -------- |
| Camera | Targeted camera component| Yes |

## Events

### onPictureTaken

Triggered when the picture is taken.
The `onPictureTaken` event is triggered when a picture is taken by the user.

**filePath** - The path where the picture is stored after the photo is being taken.

### onPictureTakenCancel

Triggered when the picture taking event is cancelled.
The `onPictureTakenCancel` event is triggered when the user cancels when taking a picture.
50 changes: 26 additions & 24 deletions docs/component-dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Dialog is a popup that is often used to confirm user's action.

## Example

Create and show a dialog with the `title` and `message` with OK and Cancel button.
Create and show a dialog with the `title` and `message` with OK, Cancel, and a optional neutral button.

![example](assets/dialog/example.png)

Expand All @@ -20,67 +20,69 @@ Create and show a dialog with the `title` and `message` with OK and Cancel butto

### setTitle

Set the title of the dialog.
Set the title of the selected dialog.

![set title](assets/dialog/set-title.png)

| Type | Explanation | Required |
| ------ | ------------------- | -------- |
| Dialog | Dialog Component | Yes |
| String | Title of the dialog | Yes |
| Type | Explanation | Required |
| ------ | -------------------------| -------- |
| Dialog | Targeted dialog component| Yes |
| String | Title of the dialog | Yes |

### setMessage

Set the message of the dialog.

![set message](assets/dialog/set-message.png)

| Type | Explanation | Required |
| ------ | --------------------- | -------- |
| Dialog | Dialog Component | Yes |
| String | Message of the dialog | Yes |
| Type | Explanation | Required |
| ------ | -------------------------| -------- |
| Dialog | Targeted dialog component| Yes |
| String | Message of the dialog | Yes |


### OK Button Clicked

Add an OK button, and determine the action to perform when clicked.

Adds an OK button, and determine the action to perform when the button is clicked.
**Action of the button will only be excuted within the block**
![ok button](assets/dialog/ok-button.png)

| Type | Explanation | Required |
| ------ | --------------------- | -------- |
| Dialog | Dialog Component | Yes |
| String | Text of the OK Button | Yes |
| Type | Explanation | Required |
| ------ | -------------------------| -------- |
| Dialog | Targeted dialog component| Yes |
| String | Text of the OK Button | Yes |

### Cancel Button Clicked

Add a Cancel button, and determine the action to perform when clicked.
Adds a Cancel button, and determine the action to perform when the button is clicked.
**Action of the button will only be excuted within the block**

![cancel button](assets/dialog/cancel-button.png)

| Type | Explanation | Required |
| ------ | ------------------------- | -------- |
| Dialog | Dialog Component | Yes |
| Dialog | Targeted dialog component | Yes |
| String | Text of the Cancel Button | Yes |

### Neutral Button Clicked

Add a Neutral button, and determine the action to perform when clicked.
Adds a Neutral button, and determine the action to perform when the button is cilcked.
**Action of the button will only be excuted within the block**

![neutral button](assets/dialog/neutral-button.png)

| Type | Explanation | Required |
| ------ | -------------------------- | -------- |
| Dialog | Dialog Component | Yes |
| Dialog | Targeted dialog component | Yes |
| String | Text of the Neutral Button | Yes |

### Show

Show the created dialog. Note that the dialog will not show without this block.
Show the created dialog. **Note that the dialog will not show without this block.**

![show](assets/dialog/show.png)

| Type | Explanation | Required |
| ------ | ---------------- | -------- |
| Dialog | Dialog Component | Yes |
| Type | Explanation | Required |
| ------ | ------------------------ | -------- |
| Dialog | Targeted dialog component| Yes |

17 changes: 9 additions & 8 deletions docs/component-filepicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: FilePicker
sidebar_label: FilePicker
---

FilePicker component is used to **pick files from the device**.
FilePicker component is used to **pick files from the device storage, MicroSD card and from the cloud (Google drive, Dropbox and etc)**. The FilePicker component can also filter on what type of files the user can pick using the MIME filter.

## Example

Expand All @@ -20,20 +20,21 @@ Picking files from the device.

### pick files

Pick files from the device.
This block triggers the file picker.

![pick files](assets/filepicker/pick-files.png)

| Type | Explanation | Required |
| ---------- | --------------------- | -------- |
| FilePicker | File Picker Component | Yes |
| Type | Explanation | Required |
| ---------- | ------------------------------- | -------- |
| FilePicker | Targeted File Picker component | Yes |

## Events

### onFilesPicked

Triggered when the file is picked.
This event triggers when the user has successfully picked a file from the file picker
**filePath (List string)** - The file path(s) where the user has selected

### onPictureTakenCancel
### onFilesPickedCancel

Triggered when the file pick event is cancelled.
This event triggers when the user did not pick a file successfully.
71 changes: 38 additions & 33 deletions docs/component-firebase-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ title: Firebase Auth
sidebar_label: Firebase Auth
---

Firebase Auth component is used to authenticate users.
Firebase Auth component is used to authenticate users. It also ensures that users are only accessible to certain data.

## Example
## Examples and uses

Creating a new user with given username and password.
- Creating a new user with given username and password.
- Logging in an existing user
- Making sure users recevive the correct infomation

![example](assets/component-firebase-auth/example.png)

Expand All @@ -20,83 +22,86 @@ Creating a new user with given username and password.

### create user with email and password

Create a new user with given email and password.
The 'create user with email and password' block creates a new user on the Firebase database using the E-mail and password given by the user.

![create user](assets/component-firebase-auth/create-user.png)

| Type | Explanation | Required |
| ------------- | ----------------------- | -------- |
| Firebase Auth | Firebase Auth Component | Yes |
| String | Email | Yes |
| String | Password | Yes |
| Type | Explanation | Required |
| ------------- | -------------------------------- | -------- |
| Firebase Auth | Targeted Firebase Auth component | Yes |
| String | User E-mail | Yes |
| String | User password | Yes |

### sign in user with email and password

Sign in a user with given email and password.
The 'sign in user with email and password' block signs the user in the app by checking against the Firebase database.

![sign in user](assets/component-firebase-auth/sign-in.png)

| Type | Explanation | Required |
| ------------- | ----------------------- | -------- |
| Firebase Auth | Firebase Auth Component | Yes |
| String | Email | Yes |
| String | Password | Yes |
| Type | Explanation | Required |
| ------------- | -------------------------------- | -------- |
| Firebase Auth | Targeted Firebase Auth component | Yes |
| String | User E-mail | Yes |
| String | User password | Yes |

### sign in anonymously

Sign in a user with an anonymous credential.
The 'sign in anonymously' block signs in the user without any login infomation or registration needed.

![sign in anonymously](assets/component-firebase-auth/sign-in-anonymously.png)

| Type | Explanation | Required |
| ------------- | ----------------------- | -------- |
| Firebase Auth | Firebase Auth Component | Yes |
| Type | Explanation | Required |
| ------------- | -------------------------------- | -------- |
| Firebase Auth | Targeted Firebase Auth component | Yes |

### is logged in

True if logged in.
The 'is logged in' boolean will return a True if the user has been authenticated via Firebase, otherwise it will return a False.

![is logged in](assets/component-firebase-auth/is-logged-in.png)

### get email

Retrieve the email of the current user.
The 'get email' block retrieves the e-mail address of the current user.

![get email](assets/component-firebase-auth/get-email.png)

### get Uid

Retrieve the unique identification of the current user.
The 'get Uid' block retrieves the unique identification (Uid) of the current user.

![get uid](assets/component-firebase-auth/get-uid.png)

### send password reset email to

Send a password reset email to the given email.
The 'send password reset email to' block sends a password reset e-mail to the given e-mail address.

![create user](assets/component-firebase-auth/send-password-reset.png)

| Type | Explanation | Required |
| ------------- | ----------------------- | -------- |
| Firebase Auth | Firebase Auth Component | Yes |
| String | Email address | Yes |
| Type | Explanation | Required |
| ------------- | -------------------------------- | -------- |
| Firebase Auth | Targeted Firebase Auth component | Yes |
| String | Email address | Yes |

### sign out

Sign out the logged in user.
The 'sign out' block logs the user out from the app and deletes its infomation from the app data

![sign out](assets/component-firebase-auth/sign-out.png)

## Events

### onCreateUserComplete

Triggered after create user block is used.
The 'onCreateUserComplete' event triggers when Firebase auth finishes attampting to create a new user in the database.
**Success (Boolean)** - Tells whether the user creation was successful. True if the user was created successfully, otherwise False
**errorMessage (String)** - The error message can be retrived here if the user creation was not successful.

### onSignInUserComplete

Triggered after sign in user block is used.
### onLogInUserComplete

The 'onLogInUserComplete' event triggers when Firebase auth finishes attampting to log in an user using the database.
**Success (Boolean)** - Tells whether the user log-in was successful. True if the user was created successfully, otherwise False
**errorMessage (String)** - The error message can be retrived here if the user log-in was not successful.
### onResetPasswordEmailSent

Triggered after reset password block is used.
The 'onResetPasswordEmailSent' event triggers when a password reset E-Mail has been sent to the selected E-mail address.
Loading