@iapps/ng-dhis2-ui 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/README.md +60 -3
  2. package/esm2022/lib/modules/button/button.component.mjs +3 -3
  3. package/esm2022/lib/modules/button/button.module.mjs +4 -4
  4. package/esm2022/lib/modules/header-bar/header-bar.component.mjs +3 -3
  5. package/esm2022/lib/modules/header-bar/header-bar.module.mjs +4 -4
  6. package/esm2022/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.mjs +11 -8
  7. package/esm2022/lib/modules/organisation-unit-selector/containers/organisation-unit-selector-modal/organisation-unit-selector-modal.component-modal.mjs +3 -3
  8. package/esm2022/lib/modules/organisation-unit-selector/organisation-unit-selector.module.mjs +4 -4
  9. package/esm2022/lib/modules/period-selector/containers/period-selector/period-selector.component.mjs +11 -8
  10. package/esm2022/lib/modules/period-selector/containers/period-selector-modal/period-selector-modal.component.mjs +3 -3
  11. package/esm2022/lib/modules/period-selector/period-selector.module.mjs +4 -4
  12. package/esm2022/lib/modules/react-wrapper/react-wrapper.component.mjs +16 -16
  13. package/esm2022/lib/modules/react-wrapper/react-wrapper.module.mjs +4 -4
  14. package/esm2022/lib/shared/shared.module.mjs +4 -4
  15. package/esm2022/lib/shared/utils/dimensionIsEmpty.mjs +1 -1
  16. package/esm2022/lib/shared/utils/dimensionIsValid.mjs +3 -2
  17. package/fesm2022/iapps-ng-dhis2-ui.mjs +73 -66
  18. package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
  19. package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.d.ts +3 -2
  20. package/lib/modules/period-selector/containers/period-selector/period-selector.component.d.ts +3 -2
  21. package/lib/shared/utils/axis.d.ts +1 -1
  22. package/lib/shared/utils/dimension.d.ts +20 -10
  23. package/lib/shared/utils/dimensionIsEmpty.d.ts +3 -1
  24. package/lib/shared/utils/dimensionIsValid.d.ts +3 -1
  25. package/package.json +1 -1
@@ -160,11 +160,11 @@ TransferOption.propTypes = {
160
160
  const sharedComponents = [];
161
161
 
162
162
  class SharedDhis2UiModule {
163
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: SharedDhis2UiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
164
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: SharedDhis2UiModule, imports: [CommonModule] }); }
165
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: SharedDhis2UiModule, imports: [CommonModule] }); }
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SharedDhis2UiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
164
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: SharedDhis2UiModule, imports: [CommonModule] }); }
165
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SharedDhis2UiModule, imports: [CommonModule] }); }
166
166
  }
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: SharedDhis2UiModule, decorators: [{
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SharedDhis2UiModule, decorators: [{
168
168
  type: NgModule,
169
169
  args: [{
170
170
  imports: [CommonModule],
@@ -1151,8 +1151,7 @@ class ReactWrapperComponent {
1151
1151
  this.render();
1152
1152
  }
1153
1153
  ngOnChanges() {
1154
- if (this.elementRef)
1155
- this.render();
1154
+ // if (this.elementRef) this.render();
1156
1155
  }
1157
1156
  ngOnDestroy() {
1158
1157
  this.reactDomRoot?.unmount();
@@ -1160,22 +1159,23 @@ class ReactWrapperComponent {
1160
1159
  render() {
1161
1160
  if (!this.component) {
1162
1161
  console.warn('React component must be supplied');
1163
- return;
1164
- }
1165
- if (!this.reactDomRoot)
1166
- return;
1167
- const jsxContent = this.content?.nativeElement?.outerHTML
1168
- ? parse(this.content?.nativeElement?.outerHTML)
1169
- : undefined;
1170
- this.reactDomRoot.render(React.createElement(this.component, { ...this.props },
1171
- " ",
1172
- jsxContent || '',
1173
- " "));
1174
- }
1175
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ReactWrapperComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1176
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: ReactWrapperComponent, selector: "ng-dhis2-ui-wrapper", inputs: { props: "props", component: "component" }, queries: [{ propertyName: "content", first: true, predicate: ["ngDhis2UiContent"], descendants: true }], usesOnChanges: true, ngImport: i0 }); }
1162
+ }
1163
+ else {
1164
+ if (!this.reactDomRoot)
1165
+ return;
1166
+ const jsxContent = this.content?.nativeElement?.outerHTML
1167
+ ? parse(this.content?.nativeElement?.outerHTML)
1168
+ : undefined;
1169
+ this.reactDomRoot.render(React.createElement(this.component, { ...this.props },
1170
+ " ",
1171
+ jsxContent || '',
1172
+ " "));
1173
+ }
1174
+ }
1175
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ReactWrapperComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1176
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: ReactWrapperComponent, selector: "ng-dhis2-ui-wrapper", inputs: { props: "props", component: "component" }, queries: [{ propertyName: "content", first: true, predicate: ["ngDhis2UiContent"], descendants: true }], usesOnChanges: true, ngImport: i0 }); }
1177
1177
  }
1178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ReactWrapperComponent, decorators: [{
1178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ReactWrapperComponent, decorators: [{
1179
1179
  type: Directive,
1180
1180
  args: [{
1181
1181
  selector: 'ng-dhis2-ui-wrapper',
@@ -1190,11 +1190,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
1190
1190
  }] } });
1191
1191
 
1192
1192
  class ReactWrapperModule {
1193
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ReactWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1194
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: ReactWrapperModule, declarations: [ReactWrapperComponent], imports: [CommonModule], exports: [ReactWrapperComponent] }); }
1195
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ReactWrapperModule, imports: [CommonModule] }); }
1193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ReactWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1194
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: ReactWrapperModule, declarations: [ReactWrapperComponent], imports: [CommonModule], exports: [ReactWrapperComponent] }); }
1195
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ReactWrapperModule, imports: [CommonModule] }); }
1196
1196
  }
1197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ReactWrapperModule, decorators: [{
1197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ReactWrapperModule, decorators: [{
1198
1198
  type: NgModule,
1199
1199
  args: [{
1200
1200
  imports: [CommonModule],
@@ -1223,10 +1223,10 @@ class HeaderBarComponent extends ReactWrapperComponent {
1223
1223
  : () => React__default.createElement("div", null, "Something went wrong");
1224
1224
  this.render();
1225
1225
  }
1226
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: HeaderBarComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
1227
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: HeaderBarComponent, selector: "ng-dhis2-ui-header-bar", usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true }); }
1226
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: HeaderBarComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
1227
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: HeaderBarComponent, selector: "ng-dhis2-ui-header-bar", usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true }); }
1228
1228
  }
1229
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: HeaderBarComponent, decorators: [{
1229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: HeaderBarComponent, decorators: [{
1230
1230
  type: Component,
1231
1231
  args: [{
1232
1232
  selector: 'ng-dhis2-ui-header-bar',
@@ -1235,11 +1235,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
1235
1235
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }] });
1236
1236
 
1237
1237
  class HeaderBarModule {
1238
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: HeaderBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1239
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: HeaderBarModule, declarations: [HeaderBarComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [HeaderBarComponent] }); }
1240
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: HeaderBarModule, imports: [CommonModule, SharedDhis2UiModule] }); }
1238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: HeaderBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1239
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: HeaderBarModule, declarations: [HeaderBarComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [HeaderBarComponent] }); }
1240
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: HeaderBarModule, imports: [CommonModule, SharedDhis2UiModule] }); }
1241
1241
  }
1242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: HeaderBarModule, decorators: [{
1242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: HeaderBarModule, decorators: [{
1243
1243
  type: NgModule,
1244
1244
  args: [{
1245
1245
  imports: [CommonModule, SharedDhis2UiModule],
@@ -1279,10 +1279,10 @@ class ButtonComponent extends ReactWrapperComponent {
1279
1279
  onButtonClick(event) {
1280
1280
  this.buttonClick.emit(event);
1281
1281
  }
1282
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1283
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: ButtonComponent, selector: "ng-dhis2-ui-button", inputs: { label: "label", primary: "primary", secondary: "secondary", destructive: "destructive", disabled: "disabled", small: "small", large: "large" }, outputs: { buttonClick: "buttonClick" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
1282
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1283
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: ButtonComponent, selector: "ng-dhis2-ui-button", inputs: { label: "label", primary: "primary", secondary: "secondary", destructive: "destructive", disabled: "disabled", small: "small", large: "large" }, outputs: { buttonClick: "buttonClick" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
1284
1284
  }
1285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ButtonComponent, decorators: [{
1285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ButtonComponent, decorators: [{
1286
1286
  type: Component,
1287
1287
  args: [{
1288
1288
  selector: 'ng-dhis2-ui-button',
@@ -1307,11 +1307,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
1307
1307
  }] } });
1308
1308
 
1309
1309
  class ButtonModule {
1310
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1311
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [ButtonComponent] }); }
1312
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ButtonModule, imports: [CommonModule, SharedDhis2UiModule] }); }
1310
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1311
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [ButtonComponent] }); }
1312
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ButtonModule, imports: [CommonModule, SharedDhis2UiModule] }); }
1313
1313
  }
1314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ButtonModule, decorators: [{
1314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: ButtonModule, decorators: [{
1315
1315
  type: NgModule,
1316
1316
  args: [{
1317
1317
  declarations: [ButtonComponent],
@@ -1518,7 +1518,8 @@ const dimensionIsValid = (dimension, { requireItems } = {}) => {
1518
1518
  if (!requiredProps.every((prop) => prop.isValid(dimension[prop.name]))) {
1519
1519
  return false;
1520
1520
  }
1521
- if (requireItems === true && dimensionIsEmpty(dimension)) {
1521
+ if (requireItems === true &&
1522
+ dimensionIsEmpty(dimension)) {
1522
1523
  return false;
1523
1524
  }
1524
1525
  return true;
@@ -2298,10 +2299,10 @@ class PeriodSelectorModalComponent extends ReactWrapperComponent {
2298
2299
  onConfirm(selectedItems) {
2299
2300
  this.confirm.emit(selectedItems);
2300
2301
  }
2301
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
2302
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: PeriodSelectorModalComponent, selector: "ng-dhis2-ui-period-selector-modal", inputs: { selectedPeriods: "selectedPeriods" }, outputs: { cancel: "cancel", confirm: "confirm" }, usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true, styles: ["::ng-deep .layer{z-index:2!important}\n"] }); }
2302
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
2303
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: PeriodSelectorModalComponent, selector: "ng-dhis2-ui-period-selector-modal", inputs: { selectedPeriods: "selectedPeriods" }, outputs: { cancel: "cancel", confirm: "confirm" }, usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true, styles: ["::ng-deep .layer{z-index:2!important}\n"] }); }
2303
2304
  }
2304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorModalComponent, decorators: [{
2305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorModalComponent, decorators: [{
2305
2306
  type: Component,
2306
2307
  args: [{ selector: 'ng-dhis2-ui-period-selector-modal', template: `<ng-container></ng-container>`, styles: ["::ng-deep .layer{z-index:2!important}\n"] }]
2307
2308
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }], propDecorators: { selectedPeriods: [{
@@ -2313,9 +2314,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
2313
2314
  }] } });
2314
2315
 
2315
2316
  class PeriodSelectorComponent extends ReactWrapperComponent {
2316
- constructor(elementRef, httpClient) {
2317
+ constructor(elementRef, httpClient, ngZone) {
2317
2318
  super(elementRef);
2318
2319
  this.httpClient = httpClient;
2320
+ this.ngZone = ngZone;
2319
2321
  this.selectedPeriods = [];
2320
2322
  this.selectPeriods = new EventEmitter();
2321
2323
  this.props = {
@@ -2349,30 +2351,32 @@ class PeriodSelectorComponent extends ReactWrapperComponent {
2349
2351
  this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);
2350
2352
  const systemInfo = await firstValueFrom(this.httpClient.systemInfo());
2351
2353
  const excludedPeriodTypes = this.getExcludedPeriodTypes(systemInfo);
2352
- this.component = () => (React__default.createElement(DataProvider, null, React__default.createElement(PeriodDimension, { selectedPeriods: this.selectedPeriods, onSelect: (selectionEvent) => this.onSelectItems(selectionEvent), excludedPeriodTypes: excludedPeriodTypes, systemInfo: systemInfo })));
2354
+ this.component = () => (React__default.createElement(DataProvider, null, React__default.createElement(PeriodDimension, { selectedPeriods: this.selectedPeriods, onSelect: (selectionEvent) => this.ngZone.run(() => {
2355
+ this.onSelectItems(selectionEvent);
2356
+ }), excludedPeriodTypes: excludedPeriodTypes, systemInfo: systemInfo })));
2353
2357
  this.render();
2354
2358
  }
2355
2359
  onSelectItems(selectionEvent) {
2356
2360
  this.selectPeriods.emit(selectionEvent.items);
2357
2361
  }
2358
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
2359
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: PeriodSelectorComponent, selector: "ng-dhis2-ui-period-selector", inputs: { selectedPeriods: "selectedPeriods" }, outputs: { selectPeriods: "selectPeriods" }, usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true, styles: ["::ng-deep .content-container{z-index:0!important}\n"] }); }
2362
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
2363
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: PeriodSelectorComponent, selector: "ng-dhis2-ui-period-selector", inputs: { selectedPeriods: "selectedPeriods" }, outputs: { selectPeriods: "selectPeriods" }, usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true, styles: ["::ng-deep .content-container{z-index:0!important}\n"] }); }
2360
2364
  }
2361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorComponent, decorators: [{
2365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorComponent, decorators: [{
2362
2366
  type: Component,
2363
2367
  args: [{ selector: 'ng-dhis2-ui-period-selector', template: `<ng-container></ng-container>`, styles: ["::ng-deep .content-container{z-index:0!important}\n"] }]
2364
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }], propDecorators: { selectedPeriods: [{
2368
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }, { type: i0.NgZone }], propDecorators: { selectedPeriods: [{
2365
2369
  type: Input
2366
2370
  }], selectPeriods: [{
2367
2371
  type: Output
2368
2372
  }] } });
2369
2373
 
2370
2374
  class PeriodSelectorModule {
2371
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2372
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorModule, declarations: [PeriodSelectorComponent, PeriodSelectorModalComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [PeriodSelectorComponent, PeriodSelectorModalComponent] }); }
2373
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorModule, imports: [CommonModule, SharedDhis2UiModule] }); }
2375
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2376
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorModule, declarations: [PeriodSelectorComponent, PeriodSelectorModalComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [PeriodSelectorComponent, PeriodSelectorModalComponent] }); }
2377
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorModule, imports: [CommonModule, SharedDhis2UiModule] }); }
2374
2378
  }
2375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: PeriodSelectorModule, decorators: [{
2379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: PeriodSelectorModule, decorators: [{
2376
2380
  type: NgModule,
2377
2381
  args: [{
2378
2382
  imports: [CommonModule, SharedDhis2UiModule],
@@ -2745,9 +2749,10 @@ class OrganisationUnitSelectionConfig {
2745
2749
  // license that can be found in the LICENSE file.
2746
2750
 
2747
2751
  class OrganisationUnitSelectorComponent extends ReactWrapperComponent {
2748
- constructor(elementRef, httpClient) {
2752
+ constructor(elementRef, httpClient, ngZone) {
2749
2753
  super(elementRef);
2750
2754
  this.httpClient = httpClient;
2755
+ this.ngZone = ngZone;
2751
2756
  this.selectedOrgUnits = [];
2752
2757
  this.orgUnitSelectionConfig = new OrganisationUnitSelectionConfig();
2753
2758
  this.selectOrgUnits = new EventEmitter();
@@ -2763,7 +2768,9 @@ class OrganisationUnitSelectorComponent extends ReactWrapperComponent {
2763
2768
  this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);
2764
2769
  const rootOrgUnits = await this.getRootOrgUnits();
2765
2770
  const config = await this.getAppConfig();
2766
- this.component = () => (React__default.createElement(Provider, { config: config }, React__default.createElement(OrgUnitDimension, { selected: this.selectedOrgUnits, hideGroupSelect: this.orgUnitSelectionConfig.hideGroupSelect, hideLevelSelect: this.orgUnitSelectionConfig.hideLevelSelect, hideUserOrgUnits: this.orgUnitSelectionConfig.hideUserOrgUnits, onSelect: (selectionEvent) => this.onSelectItems(selectionEvent), orgUnitGroupPromise: this.getOrgUnitGroups(), orgUnitLevelPromise: this.getOrgUnitLevels(), roots: rootOrgUnits })));
2771
+ this.component = () => (React__default.createElement(Provider, { config: config }, React__default.createElement(OrgUnitDimension, { selected: this.selectedOrgUnits, hideGroupSelect: this.orgUnitSelectionConfig.hideGroupSelect, hideLevelSelect: this.orgUnitSelectionConfig.hideLevelSelect, hideUserOrgUnits: this.orgUnitSelectionConfig.hideUserOrgUnits, onSelect: (selectionEvent) => this.ngZone.run(() => {
2772
+ this.onSelectItems(selectionEvent);
2773
+ }), orgUnitGroupPromise: this.getOrgUnitGroups(), orgUnitLevelPromise: this.getOrgUnitLevels(), roots: rootOrgUnits })));
2767
2774
  this.render();
2768
2775
  }
2769
2776
  async getAppConfig() {
@@ -2804,16 +2811,16 @@ class OrganisationUnitSelectorComponent extends ReactWrapperComponent {
2804
2811
  onSelectItems(selectionEvent) {
2805
2812
  this.selectOrgUnits.emit(selectionEvent.items);
2806
2813
  }
2807
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
2808
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrganisationUnitSelectorComponent, selector: "ng-dhis2-ui-org-unit-selector", inputs: { selectedOrgUnits: "selectedOrgUnits", orgUnitSelectionConfig: "orgUnitSelectionConfig" }, outputs: { selectOrgUnits: "selectOrgUnits" }, usesInheritance: true, ngImport: i0, template: '<ng-container><ng-container>', isInline: true }); }
2814
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
2815
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: OrganisationUnitSelectorComponent, selector: "ng-dhis2-ui-org-unit-selector", inputs: { selectedOrgUnits: "selectedOrgUnits", orgUnitSelectionConfig: "orgUnitSelectionConfig" }, outputs: { selectOrgUnits: "selectOrgUnits" }, usesInheritance: true, ngImport: i0, template: '<ng-container><ng-container>', isInline: true }); }
2809
2816
  }
2810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorComponent, decorators: [{
2817
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorComponent, decorators: [{
2811
2818
  type: Component,
2812
2819
  args: [{
2813
2820
  selector: 'ng-dhis2-ui-org-unit-selector',
2814
2821
  template: '<ng-container><ng-container>',
2815
2822
  }]
2816
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }], propDecorators: { selectedOrgUnits: [{
2823
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }, { type: i0.NgZone }], propDecorators: { selectedOrgUnits: [{
2817
2824
  type: Input
2818
2825
  }], orgUnitSelectionConfig: [{
2819
2826
  type: Input
@@ -2905,10 +2912,10 @@ class OrganisationUnitSelectorModalComponent extends ReactWrapperComponent {
2905
2912
  onSelectItems(selectionEvent) {
2906
2913
  this.selectOrgUnits.emit(selectionEvent.items);
2907
2914
  }
2908
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
2909
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: OrganisationUnitSelectorModalComponent, selector: "ng-dhis2-ui-org-unit-selector-modal", inputs: { selectedOrgUnits: "selectedOrgUnits", orgUnitSelectionConfig: "orgUnitSelectionConfig" }, outputs: { selectOrgUnits: "selectOrgUnits", cancel: "cancel", confirm: "confirm" }, usesInheritance: true, ngImport: i0, template: '<ng-container><ng-container>', isInline: true, styles: ["::ng-deep .layer{z-index:2!important}\n"] }); }
2915
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
2916
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: OrganisationUnitSelectorModalComponent, selector: "ng-dhis2-ui-org-unit-selector-modal", inputs: { selectedOrgUnits: "selectedOrgUnits", orgUnitSelectionConfig: "orgUnitSelectionConfig" }, outputs: { selectOrgUnits: "selectOrgUnits", cancel: "cancel", confirm: "confirm" }, usesInheritance: true, ngImport: i0, template: '<ng-container><ng-container>', isInline: true, styles: ["::ng-deep .layer{z-index:2!important}\n"] }); }
2910
2917
  }
2911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorModalComponent, decorators: [{
2918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorModalComponent, decorators: [{
2912
2919
  type: Component,
2913
2920
  args: [{ selector: 'ng-dhis2-ui-org-unit-selector-modal', template: '<ng-container><ng-container>', styles: ["::ng-deep .layer{z-index:2!important}\n"] }]
2914
2921
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }], propDecorators: { selectedOrgUnits: [{
@@ -2924,13 +2931,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
2924
2931
  }] } });
2925
2932
 
2926
2933
  class OrganisationUnitSelectorModule {
2927
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2928
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorModule, declarations: [OrganisationUnitSelectorComponent,
2934
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2935
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorModule, declarations: [OrganisationUnitSelectorComponent,
2929
2936
  OrganisationUnitSelectorModalComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [OrganisationUnitSelectorComponent,
2930
2937
  OrganisationUnitSelectorModalComponent] }); }
2931
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorModule, imports: [CommonModule, SharedDhis2UiModule] }); }
2938
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorModule, imports: [CommonModule, SharedDhis2UiModule] }); }
2932
2939
  }
2933
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: OrganisationUnitSelectorModule, decorators: [{
2940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: OrganisationUnitSelectorModule, decorators: [{
2934
2941
  type: NgModule,
2935
2942
  args: [{
2936
2943
  imports: [CommonModule, SharedDhis2UiModule],