### Inclouded Library
Ionic 4 components for Inclouded applications.

### NPM
`
npm install --save @inclouded/ionic4-inclouded-lib
`
## Components
### Navigation
#### API reference for Inclouded Navigation Module
```typescript
import { NavigationModule } from  'ionic4-inclouded-lib';
```
#### NavLink
```typescript
import { NavLink } from 'ionic4-inclouded-lib';
```
Exported as: `NavLink`
##### properties
Name| Description
------------- | -------------
`id: string` | Id of the navigation link.
`label: string` | Label of the navigation link.
`url: string` | URL of the landing page. 
`icon?: string` | Icon of the navigation link.
`disabled?: boolean` | Whether the menu is disabled.
`shouldLogout?: boolean` | When it's true the user will logout.

![NavLink](./assets/NavLink.png)

#### NavBar
Selector: `inc-navbar`
Exported as:  `NavbarComponent`
##### properties
Name| Description
------------- | -------------
@Input() `navTitle: string` | Title of the navigation bar.
@Input() `navList: NavLink[]` | List of the links for navigation. 

![Navbar](./assets/inc-navbar.png)

### Toolbar
#### API reference for Inclouded Toolbar Module
```typescript
import { ToolbarModule } from 'ionic4-inclouded-lib';
```
#### Toolbar Component
Selector: `inc-toolbar`
Exported as: `ToolbarComponent`
##### properties
Name | Description
------------- | -------------
@Input() `withBack: boolean` | When it's true the menuButton, otherwise the backButton will display.
@Input() `title: string` | Title of the toolbar. 
@Input() `defHref = '/'` | Define Href where the toolbar is.
@Input() `color = 'primary'` | Color of the toolbar.

![Toolbar](./assets/inc-toolbar.png)

### PrevRoute Service
Exported as: PrevRouteService

### Title Service
Exported as: TitleService

### Container
#### API reference for Inclouded Container Module
```typescript
import { ContainerModule } from 'ionic4-inclouded-lib';
```
#### Container Component
Selector: `inc-container`
Exported as: ContainerComponent

![Container](./assets/inc-container.png)

### PageLoader
#### API reference for Inclouded PageLoader Module
```typescript
import { PageLoaderModule } from 'ionic4-inclouded-lib';
```
#### PageLoader Component
Selector: `inc-page-loader`
Exported as: PageLoaderComponent
##### properties
Name | Description
------------- | -------------
@Input() `loading: boolean` | When it's true, the page is loading...

![PageLoader](./assets/inc-page-loader.png)

### ErrNoData
#### API reference for Inclouded ErrNoData Module
```typescript
import { ErrNoDataModule } from 'ionic4-inclouded-lib';
```
#### ErrNoData Component
Selector: `inc-err-no-data`
Exported as: ErrNoDataComponent
##### properties
Name | Description
------------- | -------------
@Input() `subjectName: string` | Subject name of error no data, when this name is't defined the else template will display.
@Input() `noDesc: boolean` | When it's false, then no description, if the subject name defined too.
@Input() `fullText: boolean` | When it's false, then full text not shown.

![ErrNodata](./assets/inc-err-no-data.png)

#### Form Generator
```typescript
import { FormGenModel } from 'ionic4-inclouded-lib';
```
Exported as: `FormGenModel`
##### properties
Name| Description
------------- | -------------
`label: string` | Label for the placeholder of the inputField.
`value: string` | Value of the inputField.
`autofocus?: boolean` | When it's true, the inputField will autofocus.
`size?: string` | Size of the ion-col of the ion-grid in the system.
`required?: boolean` | When it's true, the red star needed for the placeholder of the inputField. 
`fGroupName?: string` | Name of the form group.
`subList?: KeyValue<any, any>[]` | Sub list of the inputField.
`formArray?: string` | Type of the formArray.
`id?: string` | Id of the Model.

![FormGenModel](./assets/FormGenModel.png)

### Inclouded Page
#### API reference for Inclouded Inclouded Page Module
```typescript
import { IncPageModule } from 'ionic4-inclouded-lib';
```

### MonoAvatar
#### API reference for Inclouded MonoAvatar Module
```typescript
import { MonoAvatarModule } from 'ionic4-inclouded-lib';
```
### MonoAvatar Directive
Selector: `[incMonoAvatar]`
Exported as: MonoAvatarDirective
##### properties
Name | Description
------------- | -------------
@Input() `name: string` | Name of the mono avatar.

![MonoAvatar](./assets/incMonoAvatar.png)

### Alert Service
Exported as: AlertService

![AlertService](./assets/AlertService.png)

### Toast Service
Exported as: ToastService

![ToastService](./assets/ToastService.png)

### Loading Service
Exported as: LoadingService

![LoadingService](./assets/LoadingService.png)

### Modals
#### API reference for Inclouded Modals Module
```typescript
import { ModalsModule } from 'ionic4-inclouded-lib';
```
### Header Component
Selector: `inc-modal-header`
Exported as: HeaderComponent
##### properties
Name | Description
------------- | -------------
@Input() `label: string` | Label of the header title.
@Input() `color: string` | Color of the header.
@Input() `mode: string` | Type of the header.

![ModalHeader](./assets/inc-modal-header.png)

### Footer Component
Selector: `inc-modal-footer`
Exported as: FooterComponent
##### properties
Name | Description
------------- | -------------
@Input() `formInvalidity: boolean` | Invalidity of the form.
@Output() `result: EventEmitter<boolean> = new EventEmitter<boolean>()` | The result will true with save, false with close.

![ModalFooter](./assets/inc-modal-footer.png)

### Translate
#### API reference for Inclouded Translate Module
```typescript
import { TranslateModule } from 'ionic4-inclouded-lib';
```
### Translate Pipe
Pipe: `translate`
Exported as: TranslatePipe
### Translate Service
Exported as: TranslateService

![TranslateModuleEnglish](./assets/Translate_english.png)
![TranslateModuleHungary](./assets/Translate_hungary.png)

### DeviceAdd
#### API reference for Inclouded DeviceAdd Module
```typescript
import { DeviceAddModule } from 'ionic4-inclouded-lib';
```
### DeviceAdd Component
Selector: `inc-device-add`
Exported as: DeviceAddComponent
##### properties
Name | Description
------------- | -------------
@Input() `inData: IDevice` | Device for the device add.
@Input() `typeList: FormGenModel[]` | Type list for the device add.
@Output() `callSave = new EventEmitter()` | When the device is't defined, calls for save the device to database.
@Output() `callUpdate = new EventEmitter()` | When the device is defined, calls for update the device to database.

![DeviceAdd](./assets/inc-device-add.png)

### DeviceTable
#### API reference for Inclouded DeviceTable Module
```typescript
import { DeviceTableModule } from 'ionic4-inclouded-lib';
```
### DeviceTable Component
Selector: `inc-device-table`
Exported as: DeviceTableComponent
##### properties
Name | Description
------------- | -------------
@Input() `typeDisabled: boolean` | When it's true, the type not shown.
@Input() `statusDisabled: boolean` | When it's true, the status not shown.
@Input() `deviceList: any[]` | Devices for the device table.
@Input() `filtered: boolean` | When it's true, the list is filtered.
@Input() `actPage: number` | The actual page number.
@Input() `pageSize: number` | The size of the page.
@Output() `callSortSizeChanged = new EventEmitter<{ pageSize: number, sort: { active: string, direction: string } }>()` | Calls for sort size changed
@Output() `callDelete = new EventEmitter<string>()` | Calls for delete the device from database. 

![DeviceTable](./assets/inc-device-table.png)

### TableRowInner Component
Selector: `inc-table-row-inner`
Exported as: TableRowInnerComponent
##### properties
Name | Description
------------- | -------------
@Input() `element: any` | Element of the table row inner

![TableRowInner](./assets/inc-table-row-inner.png)

### DeviceListPage
#### API reference for Inclouded DeviceListPage Module
```typescript
import { DeviceListPageModule } from 'ionic4-inclouded-lib';
```
### DeviceListPage Component
Selector: `inc-device-list`
Exported as: DeviceListPage

### DeviceDetails
#### API reference for Inclouded DeviceDetails Module
```typescript
import { DeviceDetailsModule } from 'ionic4-inclouded-lib';
```
### DeviceDetails Component
Selector: `inc-device-details`
Exported as: DeviceDetailsComponent
##### properties
Name | Description
------------- | -------------
@Input() `inData: IDevice` | Device of the device details.
@Output() `callDelete = new EventEmitter<string>()` | Calls for delete the device from database. 

![DeviceDetails](./assets/inc-device-details.png)

### PatientAdd
#### API reference for Inclouded PatientAdd Module
```typescript
import { PatientAddModule } from 'ionic4-inclouded-lib';
```
### PatientAdd Component
Selector: `inc-patient-add`
Exported as: PatientAddComponent
##### properties
Name | Description
------------- | -------------
@Input() `inData: IPatient` | Patient data to add.
@Input() `extraValidators?: any` | Extra validators.
@Input() `modalParameters?: any` | The Modal Parameters.
@Input() `requiredEmail: boolean` | When it's true, the email is requeired.

![PatientAdd](./assets/inc-patient-add.png)

### PatientListModule
#### API reference for Inclouded PatientList Module
```typescript
import { PatientListModule } from 'ionic4-inclouded-lib';
```
### PatientList Component
Selector: `inc-patient-list`
Exported as: PatientListComponent
##### properties
Name | Description
------------- | -------------
@Input() `patientList: IPatient[]` | Patientlist of the patient list.

![PatientList](./assets/inc-patient-list.png)

### Login
#### API reference for Inclouded Login Module
```typescript
import { LoginModule } from 'ionic4-inclouded-lib';
```
### Login Page
Selector: `inc-login`
Exported as: LoginPage
##### properties
Name | Description
------------- | -------------
@Input() `alertMessage: string` | Text of the Alert Message.
@Input() `loginConfig: LoginConfig` | Parameters of the login page.
@Output() `callLogin = new EventEmitter<{ email: string, password: string, isRememberMe: boolean }>()` | Calls for login to the App. 
@Output() `callPasswordReminder = new EventEmitter<string>()` | Calls for the password reminder. 

![Login](./assets/inc-login.png)

### Auth Service
Exported as: AuthService

### Setting
#### API reference for Inclouded Setting Module
```typescript
import { SettingModule } from 'ionic4-inclouded-lib';
```
### Settings Component
Selector: `inc-settings`
Exported as: SettingsComponent

![Settings](./assets/inc-settings.png)

### Profile
#### API reference for Inclouded Profile Module
```typescript
import { ProfileModule } from 'ionic4-inclouded-lib';
```
### Profile Component
Selector: `inc-profile`
Exported as: ProfileComponent

![Profile](./assets/inc-profile.png)

### FireUser
#### API reference for Inclouded FireUser Module
```typescript
import { FireUserModule } from 'ionic4-inclouded-lib';
```
### FireUserComponent
Selector: `inc-fire-user`
Exported as: FireUserComponent

![FireUser](./assets/inc-fire-user.png)

### ChEmail
#### API reference for Inclouded ChEmail Module
```typescript
import { ChEmailModule } from 'ionic4-inclouded-lib';
```
### ChEmail Component
Selector: `inc-ch-email`
Exported as: ChEmailComponent
##### properties
Name | Description
------------- | -------------
@Output() `callSave = new EventEmitter<string>()` | Calls for the email change.

![ChEmail](./assets/inc-ch-email.png)

### ChPassword
#### API reference for Inclouded ChPassword Module
```typescript
import { ChPasswordModule } from 'ionic4-inclouded-lib';
```
### ChPassword Component
Selector: `inc-ch-password`
Exported as: ChPasswordComponent
##### properties
Name | Description
------------- | -------------
@Output() `callSave = new EventEmitter<string>()` | Calls for the password change.

![ChPassword](./assets/inc-ch-password.png)

### PractitionerInfo
#### API reference for Inclouded PractitionerInfo Module
```typescript
import { PractitionerInfoModule } from 'ionic4-inclouded-lib';
```
### PractitionerInfo Component
Selector: `inc-practitioner-info`
Exported as: PractitionerInfoComponent
##### properties
Name | Description
------------- | -------------
@Input() `practitioner: IPractitioner` | Data of the Practitioner.
@Input() `role: string` | Role of the Practitioner.
@Output() `callUpdatePractitioner = new EventEmitter<{ practitioner: IPractitioner, componentName: string }>()` | Calls for the Practitioner data update.

![PractitionerInfo](./assets/inc-practitioner-info.png)








### Visits
#### API reference for Inclouded Visits Module
```typescript
import { VisitsModule } from  'ionic4-inclouded-lib';
```
##### properties
Name| Description
------------- | -------------
`id: string` | Idendifie a visit.
`date: Date` | Date of the visit's creation.
`updater: string` | Name of the visit's creator. 
`examination: string` | Type of the visit's examination.
`description: string` | A short description about the visit.

#### VisitDetails
Selector: `inc-visits`
Exported as: `VisitDetailsComponent`
##### properties
Name| Description
------------- | -------------
@Input() `visits: Visit[] = []` | Array of the visits for display.
@Output() `newVisit = new EventEmitter<Visit>()` | A visit for add to the database.
@Output() `editableVisit = new EventEmitter<Visit>()` | A visit for edit in the database.
@Output() `deletableVisitId = new EventEmitter<string>()` | A visit for delete from the database.

#### VisitModifier
Selector: `inc-visit-modifier`
Exported as: `VisitModifierComponent`
##### properties
Name| Description
------------- | -------------
@Input() `editableVisit: Visit` | It's a visit, that will be modified.



### Medication
#### API reference for Inclouded Medication Module
```typescript
import { MedicinesModule } from  'ionic4-inclouded-lib';
```
##### properties
Name| Description
------------- | -------------
`id: string` | Identifie a medication,
`medicineGroup: string` | It specifes the kind of the medicine.
`medicineName: string` | The name of the medicine.
`dosage: string` | It specifies the right dosage.
`days: string[]` | The days, when the patients have to  take the medicine.
`dose: number` | The amount of the dosage.
`doseUnit: string` | The unit of the dose.
`amount: string` | Amount of the dose.
`amountUnit: string` | The unit of the amount.
`additionalDosageInfo: string` | Plus information for the medication.
`responsiblePerson: string` | The person who set the medication.
`startOfDosage` | The day when the medication starts.
`endOfDosage` | The day when the medication finishes.
`associatedCareplan` | A careplan which associate with the medication.

#### MedicationDetails
Selector: `inc-medication-details`
Exported as: `MedicationDetailsComponent`
##### properties
Name| Description
------------- | -------------
@Input() `showAddBtn: boolean` | When it's true the addButton will display.
@Input() `showEditBtn: boolean` | When it's true the editButton will display.
@Input() `showDeleteBtn: boolean` | When it's true the deleteButton will display.
@Input() `medications: Medication[] = []` | Array of the medications for display. 
@Output() `newMedication = new EventEmitter<Medication>()` | A medication for add to the database.
@Output() `editableMedication = new EventEmitter<Medication>()` | A medication for edit in the database.
@Output() `deletableMedication = new EventEmitter<Medication>()` | A medication for delete from the database.
 
#### MedicationModifier
Selector: `inc-medication-modifier`
Exported as: `MedicationModifierComponent`
##### properties
Name| Description
------------- | -------------
@Input() `editableMedication: Medication` |  It's a medication, that will be modified.



### BasicTherapyPlan
#### API reference for Inclouded BasicTherapyPlan Module
```typescript
import { BasicTherapyPlanModule } from  'ionic4-inclouded-lib';
```
##### properties
Name| Description
------------- | -------------
`summary: string` | Description of the therapy plan.
`startDate: Date` | Start date of the therapy plan.
`endDate: Date` | Finish date of the therapy plpan.
`updated: Date` | Date of the last modify.
`updater: string` | Name of the modifier.

#### BasicTherapyPlanDetailsComponent
Selector: `inc-basic-therapy-plan`
Exported as: `BasicTherapyPlanDetailsComponent`
##### properties
Name| Description
------------- | -------------
@Input() `basicTherapyPlans: BasicTherapyPlan[] = []` | Array of the basic therapy plans for display the newest elemnt.
@Output() `editableBasicTherapyPlan = new EventEmitter<BasicTherapyPlan>()` | The edited therapyplan that will be saved as a history.

#### BasicTherapyPlanHistoryComponent
Selector: `inc-basic-therapy-plan-history`
Exported as: `BasicTherapyPlanHistoryComponent`
##### properties
Name| Description
------------- | -------------
@Input() `basicTherapyPlans: BasicTherapyPlan[] = []` | Array of the basic therapy plans for display.


### SpecificTherapyPlan
#### API reference for Inclouded SpecificTherapyPlan Module
```typescript
import { SpecificTherapyPlanModule } from  'ionic4-inclouded-lib';
```
#### SpecificTherapyPlan: 
##### properties
Name| Description
------------- | -------------
`responsible: string` | A person, who responsible for the therapy plan.
`updated: Date` | Date of the update.
`updater: string` | The person who update the therapy plan.
`monitors: Monitors[]` | Description below.

#### Monitors:
##### properties
Name| Description
------------- | -------------
`value: string` | Type of the monitor(destinition or alert)
`targets: Targets[]` | Description below.

#### Targets:
##### properties
Name| Description
------------- | -------------
`title: string` | Title of the destinition/target.
`target: string` | The concrete destinition.
`start: Date` | Start date of the destinition.
`end: Date` | Finish of the destinition.
`updated: Date` | Date of the update.
`updater: string` | The person who updated.


#### SpecificTherapyPlanComponent
Selector: `inc-specific-therapy-plan`
Exported as: `SpecificTherapyPlanComponent`
##### properties
Name| Description
------------- | -------------
@Input() `header = ''` | Displayed title of the therapy plan.
@Input() `specificTherapyPlans: SpecificTherapyPlan[] = []` | Array of the specific therapy plans for display.


### DropDownCard
#### API reference for Inclouded BasicTherapyPlan Module
```typescript
import { DropdownCardModule } from  'ionic4-inclouded-lib';
```

#### DropDownCardComponent
Selector: `inc-dropdown-card`
Exported as: `DropdownCardComponent`
##### properties
Name| Description
------------- | -------------
@Input() `cardname: string` | Name that displays on the label of the card.

