1.0.8-beta.15 • Published 3 years ago

@iapps/ngx-dhis2-selection-filters v1.0.8-beta.15

Weekly downloads
138
License
-
Repository
-
Last release
3 years ago

DHIS2 selection filters

Container for DHIS2 selection filters .i.e. Data, Period, Organisation uni and other based on angular 6+

installation

npm i @iapps/ngx-dhis2-selection-filters

Usage

If the module is to be imported in the app.module or any other feature module, then import as

import { NgxDhis2SelectionFiltersModule } from '@iapps/ngx-dhis2-selection-filters';

then add this in the imports

imports: [
  ...
  NgxDhis2SelectionFiltersModule,
  ...
]

Once imported, dhis2 selection filters can be called in as

<ngx-dhis2-selection-filters
  (filterUpdate)="onFilterUpdateAction($event)"
  [dataSelections]="dataSelections"
  [selectionFilterConfig]="selectionFilterConfig">
</ngx-dhis2-selection-filters>

Inputs

InputDescription
dataSelectionsThis is a list of selected dimensions data, period organisation collectively
selectionFilterConfigThis when passed overrides default configuration for the selection filters

Input models

dataSelections, List as based on the following model

ItemDescription
dimensionSpecify dimension type eg pe, ou, dx etc
itemsList of selected items based on dimension

orgUnitFilterConfig

ItemDescriptionDefault value
showDataFilterSpecify whether to show or hide data(dx) selection filtertrue
showPeriodFilter (optional)Specify whether to show or hide period(pe) selection filtertrue
showOrgUnitFilter (optional)Specify whether to show or hide organisation unit(ou) selection filternone
showLayout (optional)Specify whether to show or hide layout selection filterfalse
showDynamicDimension (optional)Specify whether to show or hide dynamic dimension selection filtertrue
orgUnitFilterConfigOrg unit filter configurations, Read more

Outputs

OutputDescription
filterUpdateThis emitted data selection as based on what has been updated

Selection Filter Component Output

[
  {
  "dimension": "ou",
  "items": [
    {
      "id": "PMa2VCrupOd",
      "name": "Kambia",
      "level": 2,
      "type": "ORGANISATION_UNIT"
    },
    {
      "id": "at6UHUQatSo",
      "name": "Western Area",
      "level": 2,
      "type": "ORGANISATION_UNIT"
    },
    {
      "id": "TEQlaapDQoK",
      "name": "Port Loko",
      "level": 2,
      "type": "ORGANISATION_UNIT"
    }
  ]
},
{
  "dimension": "dx",
  "items": [
    {
      "id": "PMa2VCewpOd",
      "name": "ANC Coverage",
      "type": "INDICATOR"
    }
  ]
}, {
  "dimension": "pe",
  "items": [
      {
        "id": "LAST_YEAR",
        "name": "Last year",
        "type": "RelativeYearly"
      }
    ]
  },
  {
    "items": [
      {
        "name": "ANC",
        "id": "UP1lctvalPn"
      }
    ],
    "periodType": {
      "id": "Monthly",
      "name": "Monthly",
      "rank": 3
    },
    "dimension": "vrg",
    "changed": true,
    "layout": "filters"
  }
]
1.0.8-beta.15

3 years ago

1.0.8-beta.14

4 years ago

1.0.8-beta.13

4 years ago

1.0.8-beta.11

4 years ago

1.0.8-beta.10

4 years ago

1.0.8-beta.9

4 years ago

1.0.8-beta.8

5 years ago

1.0.8-beta.7

5 years ago

1.0.8-beta.6

5 years ago

1.0.8-beta.5

5 years ago

1.0.8-beta.4

5 years ago

1.0.8-beta.3

5 years ago

1.0.8-beta.2

5 years ago

1.0.8-beta.1

5 years ago

1.0.7

5 years ago

1.0.6-alpha.1

5 years ago

1.0.4-alpha.3

5 years ago

1.0.6

5 years ago

1.0.4-alpha.2

5 years ago

1.0.4-alpha.1

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago