@iapps/ng-dhis2-ui 1.2.102 → 1.2.104
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.
- package/fesm2022/iapps-ng-dhis2-ui.mjs +658 -376
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +1311 -13
- package/package.json +1 -1
- package/lib/modules/breadcrumb/breadcrumb.module.d.ts +0 -8
- package/lib/modules/breadcrumb/components/breadcrumb-item.component.d.ts +0 -6
- package/lib/modules/breadcrumb/containers/breadcrumb.component.d.ts +0 -12
- package/lib/modules/breadcrumb/index.d.ts +0 -3
- package/lib/modules/breadcrumb/models/breadcrumb-item.model.d.ts +0 -6
- package/lib/modules/breadcrumb/models/index.d.ts +0 -1
- package/lib/modules/button/button.component.d.ts +0 -18
- package/lib/modules/button/button.module.d.ts +0 -9
- package/lib/modules/button/index.d.ts +0 -2
- package/lib/modules/data-table-ui/components/dropdown-menu/dropdown-menu.d.ts +0 -19
- package/lib/modules/data-table-ui/components/dropdown-menu/dropdown-menu.styles.d.ts +0 -5
- package/lib/modules/data-table-ui/components/dropdown-menu/index.d.ts +0 -1
- package/lib/modules/data-table-ui/containers/data-table-ui/data-table-ui.component.d.ts +0 -20
- package/lib/modules/data-table-ui/data-table-ui.module.d.ts +0 -10
- package/lib/modules/data-table-ui/hooks/index.d.ts +0 -1
- package/lib/modules/data-table-ui/hooks/use-dynamic-styles.hook.d.ts +0 -1
- package/lib/modules/data-table-ui/index.d.ts +0 -3
- package/lib/modules/data-table-ui/models/data-table.models.d.ts +0 -10
- package/lib/modules/event-form/event-form.component.d.ts +0 -21
- package/lib/modules/event-form/event-form.module.d.ts +0 -9
- package/lib/modules/event-form/index.d.ts +0 -2
- package/lib/modules/form/components/base-form-field.component.d.ts +0 -41
- package/lib/modules/form/components/file-upload-field.component.d.ts +0 -15
- package/lib/modules/form/components/form-field-item.component.d.ts +0 -6
- package/lib/modules/form/components/org-unit-form-field.component.d.ts +0 -20
- package/lib/modules/form/containers/flat-form/flat-form.component.d.ts +0 -11
- package/lib/modules/form/containers/form/form.component.d.ts +0 -41
- package/lib/modules/form/containers/form-field/form-field.component.d.ts +0 -59
- package/lib/modules/form/containers/repeatable-form/repeatable-form.component.d.ts +0 -38
- package/lib/modules/form/containers/section-form/section-form.component.d.ts +0 -33
- package/lib/modules/form/form.module.d.ts +0 -16
- package/lib/modules/form/hooks/field-validation.hook.d.ts +0 -13
- package/lib/modules/form/hooks/index.d.ts +0 -1
- package/lib/modules/form/index.d.ts +0 -9
- package/lib/modules/form/interfaces/field-control-type.interface.d.ts +0 -1
- package/lib/modules/form/interfaces/field-dropdown.interface.d.ts +0 -7
- package/lib/modules/form/interfaces/field-type.interface.d.ts +0 -16
- package/lib/modules/form/interfaces/form-configuration.model.d.ts +0 -63
- package/lib/modules/form/interfaces/form-field-extension.interface.d.ts +0 -6
- package/lib/modules/form/interfaces/form-field-group.interface.d.ts +0 -15
- package/lib/modules/form/interfaces/form-field-meta-type.interface.d.ts +0 -1
- package/lib/modules/form/interfaces/form-field.interface.d.ts +0 -47
- package/lib/modules/form/interfaces/form-metadata-section.interface.d.ts +0 -10
- package/lib/modules/form/interfaces/form-metadata.interface.d.ts +0 -11
- package/lib/modules/form/interfaces/index.d.ts +0 -10
- package/lib/modules/form/models/boolean.model.d.ts +0 -5
- package/lib/modules/form/models/check-box.model.d.ts +0 -5
- package/lib/modules/form/models/date-field.model.d.ts +0 -7
- package/lib/modules/form/models/date-range-value.model.d.ts +0 -4
- package/lib/modules/form/models/dropdown-option.model.d.ts +0 -6
- package/lib/modules/form/models/dropdown.model.d.ts +0 -5
- package/lib/modules/form/models/field-config.model.d.ts +0 -5
- package/lib/modules/form/models/field-dropdown.model.d.ts +0 -10
- package/lib/modules/form/models/fields-data.model.d.ts +0 -8
- package/lib/modules/form/models/form-config.model.d.ts +0 -10
- package/lib/modules/form/models/form-field-group.model.d.ts +0 -23
- package/lib/modules/form/models/form-field.model.d.ts +0 -50
- package/lib/modules/form/models/form-metadata-rule.model.d.ts +0 -35
- package/lib/modules/form/models/form-metadata-section.model.d.ts +0 -33
- package/lib/modules/form/models/form-metadata.model.d.ts +0 -26
- package/lib/modules/form/models/form-value.model.d.ts +0 -19
- package/lib/modules/form/models/form.model.d.ts +0 -14
- package/lib/modules/form/models/index.d.ts +0 -17
- package/lib/modules/form/shared/components/base-form-wrapper.component.d.ts +0 -29
- package/lib/modules/form/shared/components/index.d.ts +0 -1
- package/lib/modules/form/shared/index.d.ts +0 -1
- package/lib/modules/form/utils/field-control-type.util.d.ts +0 -4
- package/lib/modules/form/utils/field-type.util.d.ts +0 -3
- package/lib/modules/form/utils/field.util.d.ts +0 -9
- package/lib/modules/form/utils/form-value.util.d.ts +0 -4
- package/lib/modules/form/utils/form.util.d.ts +0 -9
- package/lib/modules/form/utils/index.d.ts +0 -6
- package/lib/modules/form/utils/translation.util.d.ts +0 -3
- package/lib/modules/header-bar/header-bar.component.d.ts +0 -11
- package/lib/modules/header-bar/header-bar.module.d.ts +0 -9
- package/lib/modules/header-bar/index.d.ts +0 -2
- package/lib/modules/header-bar/models/header-bar-app.model.d.ts +0 -10
- package/lib/modules/header-bar/models/header-bar-data.model.d.ts +0 -16
- package/lib/modules/header-bar/models/header-bar-notification.model.d.ts +0 -5
- package/lib/modules/header-bar/models/index.d.ts +0 -2
- package/lib/modules/header-bar/utils/apps.d.ts +0 -16
- package/lib/modules/header-bar/utils/debug-info/debug-info-menu-item.d.ts +0 -15
- package/lib/modules/header-bar/utils/debug-info/debug-info-modal.d.ts +0 -8
- package/lib/modules/header-bar/utils/debug-info/debug-info-table.d.ts +0 -8
- package/lib/modules/header-bar/utils/debug-info/use-debug-info.d.ts +0 -7
- package/lib/modules/header-bar/utils/header-bar-context.d.ts +0 -14
- package/lib/modules/header-bar/utils/header-bar.d.ts +0 -19
- package/lib/modules/header-bar/utils/join-path.d.ts +0 -1
- package/lib/modules/header-bar/utils/logo-image.d.ts +0 -8
- package/lib/modules/header-bar/utils/logo.d.ts +0 -12
- package/lib/modules/header-bar/utils/notification-icon.d.ts +0 -21
- package/lib/modules/header-bar/utils/notifications.d.ts +0 -16
- package/lib/modules/header-bar/utils/profile/use-on-doc-click.d.ts +0 -1
- package/lib/modules/header-bar/utils/profile-menu/index.d.ts +0 -1
- package/lib/modules/header-bar/utils/profile-menu/profile-header.d.ts +0 -16
- package/lib/modules/header-bar/utils/profile-menu/profile-menu.d.ts +0 -13
- package/lib/modules/header-bar/utils/profile-menu/update-notification.d.ts +0 -14
- package/lib/modules/header-bar/utils/profile.d.ts +0 -18
- package/lib/modules/header-bar/utils/title.d.ts +0 -15
- package/lib/modules/line-list/components/data-table-actions/data-table-actions.d.ts +0 -9
- package/lib/modules/line-list/components/data-table-actions/index.d.ts +0 -1
- package/lib/modules/line-list/components/dropdown-menu/dropdown-menu.d.ts +0 -12
- package/lib/modules/line-list/components/dropdown-menu/dropdown-menu.styles.d.ts +0 -5
- package/lib/modules/line-list/components/dropdown-menu/index.d.ts +0 -1
- package/lib/modules/line-list/components/org-unit-form-field.component.d.ts +0 -14
- package/lib/modules/line-list/components/orgUnitSelector.d.ts +0 -2
- package/lib/modules/line-list/components/table/filterToolbar.d.ts +0 -3
- package/lib/modules/line-list/components/table/lineListTable.d.ts +0 -2
- package/lib/modules/line-list/components/table/pagination.d.ts +0 -8
- package/lib/modules/line-list/components/table/tableBody.d.ts +0 -2
- package/lib/modules/line-list/components/table/tableCell.d.ts +0 -5
- package/lib/modules/line-list/components/table/tableFooter.d.ts +0 -2
- package/lib/modules/line-list/components/table/tableHeader.d.ts +0 -8
- package/lib/modules/line-list/components/table/tableRow.d.ts +0 -2
- package/lib/modules/line-list/containers/line-list.component.d.ts +0 -52
- package/lib/modules/line-list/hooks/index.d.ts +0 -1
- package/lib/modules/line-list/hooks/use-dynamic-styles.hook.d.ts +0 -1
- package/lib/modules/line-list/index.d.ts +0 -3
- package/lib/modules/line-list/line-list.module.d.ts +0 -10
- package/lib/modules/line-list/models/action-option-orientation.model.d.ts +0 -1
- package/lib/modules/line-list/models/attribute-filter.model.d.ts +0 -10
- package/lib/modules/line-list/models/dropdown-menu.model.d.ts +0 -9
- package/lib/modules/line-list/models/filter-config.model.d.ts +0 -6
- package/lib/modules/line-list/models/index.d.ts +0 -3
- package/lib/modules/line-list/models/line-list-action-option.model.d.ts +0 -6
- package/lib/modules/line-list/models/line-list.models.d.ts +0 -262
- package/lib/modules/line-list/services/line-list.service.d.ts +0 -13
- package/lib/modules/line-list/utils/event-table-data-util.d.ts +0 -6
- package/lib/modules/line-list/utils/tei-table-data-utils.d.ts +0 -9
- package/lib/modules/organisation-unit-selector/components/OrgUnitDimension.d.ts +0 -28
- package/lib/modules/organisation-unit-selector/components/index.d.ts +0 -2
- package/lib/modules/organisation-unit-selector/components/styles/OrgUnitDimension.style.d.ts +0 -1
- package/lib/modules/organisation-unit-selector/components/utils/index.d.ts +0 -2
- package/lib/modules/organisation-unit-selector/components/utils/ouIdHelper/index.d.ts +0 -10
- package/lib/modules/organisation-unit-selector/components/utils/ouLevelUtils/index.d.ts +0 -1
- package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.d.ts +0 -27
- package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector-modal/organisation-unit-selector-modal.component-modal.d.ts +0 -30
- package/lib/modules/organisation-unit-selector/index.d.ts +0 -4
- package/lib/modules/organisation-unit-selector/models/index.d.ts +0 -1
- package/lib/modules/organisation-unit-selector/models/organisation-unit-config.model.d.ts +0 -13
- package/lib/modules/organisation-unit-selector/organisation-unit-selector.module.d.ts +0 -10
- package/lib/modules/period-selector/components/FixedPeriodFilter.d.ts +0 -18
- package/lib/modules/period-selector/components/PeriodDimension.d.ts +0 -15
- package/lib/modules/period-selector/components/PeriodTransfer.d.ts +0 -28
- package/lib/modules/period-selector/components/RelativePeriodFilter.d.ts +0 -11
- package/lib/modules/period-selector/components/utils/fixedPeriods.d.ts +0 -17
- package/lib/modules/period-selector/components/utils/index.d.ts +0 -4
- package/lib/modules/period-selector/components/utils/periodTypes.d.ts +0 -19
- package/lib/modules/period-selector/components/utils/relativePeriods.d.ts +0 -17
- package/lib/modules/period-selector/containers/period-selector/period-selector.component.d.ts +0 -21
- package/lib/modules/period-selector/containers/period-selector-modal/period-selector-modal.component.d.ts +0 -16
- package/lib/modules/period-selector/index.d.ts +0 -3
- package/lib/modules/period-selector/period-selector.module.d.ts +0 -10
- package/lib/modules/program-entry-form/index.d.ts +0 -2
- package/lib/modules/program-entry-form/models/index.d.ts +0 -3
- package/lib/modules/program-entry-form/models/program-entry-form-metadata.d.ts +0 -29
- package/lib/modules/program-entry-form/models/program-entry-form-section.model.d.ts +0 -16
- package/lib/modules/program-entry-form/models/program-entry-form.config.d.ts +0 -58
- package/lib/modules/program-entry-form/program-entry-form.component.d.ts +0 -38
- package/lib/modules/program-entry-form/utils/index.d.ts +0 -2
- package/lib/modules/program-entry-form/utils/program-entry-form-field.util.d.ts +0 -80
- package/lib/modules/program-entry-form/utils/program-entry-form-section.util.d.ts +0 -8
- package/lib/modules/react-wrapper/react-wrapper.component.d.ts +0 -17
- package/lib/modules/selection-filters-ui/containers/selection-filters-ui/selection-filters-ui.component.d.ts +0 -39
- package/lib/modules/selection-filters-ui/index.d.ts +0 -2
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.model.d.ts +0 -54
- package/lib/modules/selection-filters-ui/selection-filters-ui.module.d.ts +0 -11
- package/lib/modules/tracker-form/index.d.ts +0 -2
- package/lib/modules/tracker-form/tracker-form.component.d.ts +0 -19
- package/lib/modules/tracker-form/tracker-form.module.d.ts +0 -9
- package/lib/shared/assets/AssignedCategoriesIcon.d.ts +0 -2
- package/lib/shared/assets/DimensionItemIcons/PeriodIcon.d.ts +0 -3
- package/lib/shared/components/index.d.ts +0 -1
- package/lib/shared/components/transfer-option.component.d.ts +0 -19
- package/lib/shared/hooks/dynamic-styles.hook.d.ts +0 -1
- package/lib/shared/hooks/index.d.ts +0 -1
- package/lib/shared/index.d.ts +0 -4
- package/lib/shared/shared.module.d.ts +0 -7
- package/lib/shared/styles/DimensionSelector.style.d.ts +0 -2
- package/lib/shared/styles/index.d.ts +0 -1
- package/lib/shared/utils/axis.d.ts +0 -11
- package/lib/shared/utils/axisGetDimension.d.ts +0 -1
- package/lib/shared/utils/axisHasDimension.d.ts +0 -1
- package/lib/shared/utils/dimension.d.ts +0 -55
- package/lib/shared/utils/dimensionGetItems.d.ts +0 -1
- package/lib/shared/utils/dimensionIs.d.ts +0 -1
- package/lib/shared/utils/dimensionIsEmpty.d.ts +0 -3
- package/lib/shared/utils/dimensionIsValid.d.ts +0 -3
- package/lib/shared/utils/dimensionSelectorHelper.d.ts +0 -3
- package/lib/shared/utils/index.d.ts +0 -11
- package/lib/shared/utils/layoutGetAllAxes.d.ts +0 -1
- package/lib/shared/utils/layoutGetAllDimensions.d.ts +0 -1
- package/lib/shared/utils/layoutGetDimension.d.ts +0 -1
- package/lib/shared/utils/layoutReplaceDimension.d.ts +0 -1
- package/lib/shared/utils/list.d.ts +0 -1
- package/lib/shared/utils/predefinedDimensions.d.ts +0 -67
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { NgModule,
|
|
4
|
+
import { NgModule, ContentChild, Input, Directive, Component, EventEmitter, Output, inject, NgZone, input, ChangeDetectionStrategy, Injectable, model, computed, signal, effect, ViewChildren } from '@angular/core';
|
|
5
5
|
import { useDataQuery, useConfig, useAlert, clearSensitiveCaches, DataProvider, useDataEngine, Provider } from '@dhis2/app-runtime';
|
|
6
6
|
import * as i1 from '@iapps/ngx-dhis2-http-client';
|
|
7
7
|
import * as React from 'react';
|
|
@@ -24,7 +24,7 @@ import { Layer } from '@dhis2-ui/layer';
|
|
|
24
24
|
import { CircularLoader } from '@dhis2-ui/loader';
|
|
25
25
|
import { MenuItem, MenuDivider } from '@dhis2-ui/menu';
|
|
26
26
|
import parse from 'html-react-parser';
|
|
27
|
-
import { Button as Button$1,
|
|
27
|
+
import { Button as Button$1, IconDimensionOrgUnit16, IconClock16, IconDimensionData16, spacers as spacers$1, colors as colors$1, IconEdit16, theme as theme$1, Tooltip, IconChevronRight16, SingleSelectField, SingleSelectOption, InputField as InputField$1, TabBar, Tab, Transfer, Modal as Modal$1, ModalTitle as ModalTitle$1, ModalContent as ModalContent$1, ModalActions as ModalActions$1, ButtonStrip as ButtonStrip$1, Checkbox, OrganisationUnitTree, MultiSelect, MultiSelectOption, IconWarningFilled16, CircularLoader as CircularLoader$1, Chip, DataTableToolbar, DropdownButton, FlyoutMenu, CalendarInput, TableHead, DataTableRow, DataTableColumnHeader, Layer as Layer$1, Popper, MenuItem as MenuItem$1, IconMore24, DataTableCell, TableBody as TableBody$1, Pagination as Pagination$1, TableFoot, DataTable, FileInputField, FileListItem, MultiSelectField, TextAreaField } from '@dhis2/ui';
|
|
28
28
|
import { isObject, isString, debounce, sortBy, isArray, find, camelCase, flatten, isUndefined, head, isEmpty } from 'lodash';
|
|
29
29
|
import cx from 'classnames';
|
|
30
30
|
import { getNowInCalendar, generateFixedPeriods } from '@dhis2/multi-calendar-dates';
|
|
@@ -38,11 +38,11 @@ import { toObservable } from '@angular/core/rxjs-interop';
|
|
|
38
38
|
import moment from 'moment';
|
|
39
39
|
|
|
40
40
|
class SharedDhis2UiModule {
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
42
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
43
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SharedDhis2UiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
42
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: SharedDhis2UiModule, imports: [CommonModule] }); }
|
|
43
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SharedDhis2UiModule, imports: [CommonModule] }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SharedDhis2UiModule, decorators: [{
|
|
46
46
|
type: NgModule,
|
|
47
47
|
args: [{
|
|
48
48
|
imports: [CommonModule],
|
|
@@ -1041,16 +1041,13 @@ class ReactWrapperModule {
|
|
|
1041
1041
|
const jsxContent = this.content?.nativeElement?.outerHTML
|
|
1042
1042
|
? parse(this.content?.nativeElement?.outerHTML)
|
|
1043
1043
|
: undefined;
|
|
1044
|
-
this.reactDomRoot.render(React.createElement(this.component,
|
|
1045
|
-
" ",
|
|
1046
|
-
jsxContent || '',
|
|
1047
|
-
" "));
|
|
1044
|
+
this.reactDomRoot.render(React.createElement(this.component, this.props, jsxContent || ''));
|
|
1048
1045
|
}
|
|
1049
1046
|
}
|
|
1050
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1051
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1047
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ReactWrapperModule, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1048
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.3", type: ReactWrapperModule, isStandalone: true, selector: "ng-dhis2-ui-wrapper", inputs: { props: "props", component: "component" }, queries: [{ propertyName: "content", first: true, predicate: ["ngDhis2UiContent"], descendants: true }], ngImport: i0 }); }
|
|
1052
1049
|
}
|
|
1053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ReactWrapperModule, decorators: [{
|
|
1054
1051
|
type: Directive,
|
|
1055
1052
|
args: [{
|
|
1056
1053
|
selector: 'ng-dhis2-ui-wrapper',
|
|
@@ -1076,14 +1073,20 @@ class HeaderBarComponent extends ReactWrapperModule {
|
|
|
1076
1073
|
const manifest = await firstValueFrom(this.httpClient.manifest());
|
|
1077
1074
|
const data = await firstValueFrom(new HeaderBarData(this.httpClient).get());
|
|
1078
1075
|
this.component = data
|
|
1079
|
-
? () =>
|
|
1080
|
-
|
|
1076
|
+
? () => {
|
|
1077
|
+
const headerBarElement = React__default.createElement(HeaderBar, {
|
|
1078
|
+
appName: manifest?.name,
|
|
1079
|
+
data: data,
|
|
1080
|
+
});
|
|
1081
|
+
return React__default.createElement(DataProvider, null, headerBarElement);
|
|
1082
|
+
}
|
|
1083
|
+
: () => React__default.createElement('div', null, 'Something went wrong');
|
|
1081
1084
|
this.render();
|
|
1082
1085
|
}
|
|
1083
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1084
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1086
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HeaderBarComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1087
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: HeaderBarComponent, isStandalone: false, selector: "ng-dhis2-ui-header-bar", usesInheritance: true, ngImport: i0, template: `<ng-container></ng-container>`, isInline: true }); }
|
|
1085
1088
|
}
|
|
1086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HeaderBarComponent, decorators: [{
|
|
1087
1090
|
type: Component,
|
|
1088
1091
|
args: [{
|
|
1089
1092
|
selector: 'ng-dhis2-ui-header-bar',
|
|
@@ -1093,11 +1096,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1093
1096
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgxDhis2HttpClientService }] });
|
|
1094
1097
|
|
|
1095
1098
|
class HeaderBarModule {
|
|
1096
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1097
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1098
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1099
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HeaderBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1100
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: HeaderBarModule, declarations: [HeaderBarComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [HeaderBarComponent] }); }
|
|
1101
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HeaderBarModule, imports: [CommonModule, SharedDhis2UiModule] }); }
|
|
1099
1102
|
}
|
|
1100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HeaderBarModule, decorators: [{
|
|
1101
1104
|
type: NgModule,
|
|
1102
1105
|
args: [{
|
|
1103
1106
|
imports: [CommonModule, SharedDhis2UiModule],
|
|
@@ -1119,9 +1122,21 @@ class ButtonComponent extends ReactWrapperModule {
|
|
|
1119
1122
|
if (!this.elementRef)
|
|
1120
1123
|
throw new Error('No element ref');
|
|
1121
1124
|
this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);
|
|
1122
|
-
this.component = () =>
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
+
this.component = () => {
|
|
1126
|
+
const buttonProps = {
|
|
1127
|
+
onClick: (e) => {
|
|
1128
|
+
this.onButtonClick(e);
|
|
1129
|
+
},
|
|
1130
|
+
primary: this.primary,
|
|
1131
|
+
secondary: this.secondary,
|
|
1132
|
+
destructive: this.destructive,
|
|
1133
|
+
disabled: this.disabled,
|
|
1134
|
+
small: this.small,
|
|
1135
|
+
large: this.large,
|
|
1136
|
+
...this.props,
|
|
1137
|
+
};
|
|
1138
|
+
return React__default.createElement(Button$1, buttonProps, this.label);
|
|
1139
|
+
};
|
|
1125
1140
|
this.render();
|
|
1126
1141
|
}
|
|
1127
1142
|
ngOnInit() {
|
|
@@ -1137,10 +1152,10 @@ class ButtonComponent extends ReactWrapperModule {
|
|
|
1137
1152
|
onButtonClick(event) {
|
|
1138
1153
|
this.buttonClick.emit(event);
|
|
1139
1154
|
}
|
|
1140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1156
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: ButtonComponent, isStandalone: false, 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 }); }
|
|
1142
1157
|
}
|
|
1143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
1144
1159
|
type: Component,
|
|
1145
1160
|
args: [{
|
|
1146
1161
|
selector: 'ng-dhis2-ui-button',
|
|
@@ -1166,11 +1181,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1166
1181
|
}] } });
|
|
1167
1182
|
|
|
1168
1183
|
class ButtonModule {
|
|
1169
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1170
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1171
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1185
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [ButtonComponent] }); }
|
|
1186
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ButtonModule, imports: [CommonModule, SharedDhis2UiModule] }); }
|
|
1172
1187
|
}
|
|
1173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ButtonModule, decorators: [{
|
|
1174
1189
|
type: NgModule,
|
|
1175
1190
|
args: [{
|
|
1176
1191
|
declarations: [ButtonComponent],
|
|
@@ -1667,7 +1682,7 @@ class BreadcrumbComponent extends ReactWrapperModule {
|
|
|
1667
1682
|
constructor() {
|
|
1668
1683
|
super(...arguments);
|
|
1669
1684
|
this.#ngZone = inject(NgZone);
|
|
1670
|
-
this.breadcrumbs = input.required();
|
|
1685
|
+
this.breadcrumbs = input.required(...(ngDevMode ? [{ debugName: "breadcrumbs" }] : []));
|
|
1671
1686
|
this.selectBreadcrumb = new EventEmitter();
|
|
1672
1687
|
}
|
|
1673
1688
|
#ngZone;
|
|
@@ -1683,20 +1698,23 @@ class BreadcrumbComponent extends ReactWrapperModule {
|
|
|
1683
1698
|
};
|
|
1684
1699
|
this.component = () => {
|
|
1685
1700
|
const classes = useDynamicStyles$2(breadcrumbStyles);
|
|
1686
|
-
return
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1701
|
+
return React__default.createElement('div', { className: classes.container }, this.breadcrumbs().map((breadcrumb, index) => React__default.createElement(React__default.Fragment, { key: index }, React__default.createElement(BreadcrumbItemComponent, {
|
|
1702
|
+
key: index,
|
|
1703
|
+
breadcrumb: breadcrumb,
|
|
1704
|
+
onClick: () => {
|
|
1705
|
+
this.#ngZone.run(() => {
|
|
1706
|
+
this.selectBreadcrumb.emit(breadcrumb);
|
|
1707
|
+
});
|
|
1708
|
+
},
|
|
1709
|
+
}), index < this.breadcrumbs().length - 1 &&
|
|
1710
|
+
React__default.createElement(IconChevronRight16, { color: colors$1.grey800 }))));
|
|
1693
1711
|
};
|
|
1694
1712
|
this.render();
|
|
1695
1713
|
}
|
|
1696
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1697
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BreadcrumbComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1715
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: BreadcrumbComponent, isStandalone: false, selector: "ng-dhis2-ui-breadcrumb", inputs: { breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectBreadcrumb: "selectBreadcrumb" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1698
1716
|
}
|
|
1699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
1700
1718
|
type: Component,
|
|
1701
1719
|
args: [{
|
|
1702
1720
|
selector: 'ng-dhis2-ui-breadcrumb',
|
|
@@ -1709,11 +1727,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1709
1727
|
}] } });
|
|
1710
1728
|
|
|
1711
1729
|
class BreadcrumbModule {
|
|
1712
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1713
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1714
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1730
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BreadcrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1731
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: BreadcrumbModule, declarations: [BreadcrumbComponent], imports: [CommonModule], exports: [BreadcrumbComponent] }); }
|
|
1732
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BreadcrumbModule, imports: [CommonModule] }); }
|
|
1715
1733
|
}
|
|
1716
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BreadcrumbModule, decorators: [{
|
|
1717
1735
|
type: NgModule,
|
|
1718
1736
|
args: [{
|
|
1719
1737
|
declarations: [BreadcrumbComponent],
|
|
@@ -2425,18 +2443,22 @@ class PeriodSelectorModalComponent extends ReactWrapperModule {
|
|
|
2425
2443
|
const excludedPeriodTypes = this.getExcludedPeriodTypes(systemInfo);
|
|
2426
2444
|
this.component = () => {
|
|
2427
2445
|
const [selected, setSelected] = useState(this.selectedPeriods);
|
|
2428
|
-
return
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2446
|
+
return React__default.createElement(DataProvider, null, React__default.createElement(Modal$1, { position: 'middle', large: true }, React__default.createElement(ModalTitle$1, null, 'Period'), React__default.createElement(ModalContent$1, null, React__default.createElement(PeriodDimension, {
|
|
2447
|
+
selectedPeriods: selected,
|
|
2448
|
+
onSelect: (selectionEvent) => setSelected(selectionEvent.items),
|
|
2449
|
+
excludedPeriodTypes: excludedPeriodTypes,
|
|
2450
|
+
systemInfo: systemInfo,
|
|
2451
|
+
})), React__default.createElement(ModalActions$1, null, React__default.createElement(ButtonStrip$1, { end: true }, React__default.createElement(Button$1, {
|
|
2452
|
+
onClick: () => {
|
|
2453
|
+
this.onCancel();
|
|
2454
|
+
},
|
|
2455
|
+
}, 'Cancel'), React__default.createElement(Button$1, {
|
|
2456
|
+
primary: true,
|
|
2457
|
+
disabled: selected.length === 0,
|
|
2458
|
+
onClick: () => {
|
|
2459
|
+
this.onConfirm(selected);
|
|
2460
|
+
},
|
|
2461
|
+
}, 'Confirm')))));
|
|
2440
2462
|
};
|
|
2441
2463
|
this.render();
|
|
2442
2464
|
}
|
|
@@ -2446,10 +2468,10 @@ class PeriodSelectorModalComponent extends ReactWrapperModule {
|
|
|
2446
2468
|
onConfirm(selectedItems) {
|
|
2447
2469
|
this.confirm.emit(selectedItems);
|
|
2448
2470
|
}
|
|
2449
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2450
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2471
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorModalComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2472
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: PeriodSelectorModalComponent, isStandalone: false, 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"] }); }
|
|
2451
2473
|
}
|
|
2452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorModalComponent, decorators: [{
|
|
2453
2475
|
type: Component,
|
|
2454
2476
|
args: [{ selector: 'ng-dhis2-ui-period-selector-modal', template: `<ng-container></ng-container>`, standalone: false, styles: ["::ng-deep .layer{z-index:2!important}\n"] }]
|
|
2455
2477
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { selectedPeriods: [{
|
|
@@ -2498,18 +2520,23 @@ class PeriodSelectorComponent extends ReactWrapperModule {
|
|
|
2498
2520
|
this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);
|
|
2499
2521
|
const systemInfo = this.d2.systemInfo;
|
|
2500
2522
|
const excludedPeriodTypes = this.getExcludedPeriodTypes(systemInfo);
|
|
2501
|
-
this.component = () => (React__default.createElement(DataProvider, null, React__default.createElement(PeriodDimension, {
|
|
2523
|
+
this.component = () => (React__default.createElement(DataProvider, null, React__default.createElement(PeriodDimension, {
|
|
2524
|
+
selectedPeriods: this.selectedPeriods,
|
|
2525
|
+
onSelect: (selectionEvent) => this.ngZone.run(() => {
|
|
2502
2526
|
this.onSelectItems(selectionEvent);
|
|
2503
|
-
}),
|
|
2527
|
+
}),
|
|
2528
|
+
excludedPeriodTypes: excludedPeriodTypes,
|
|
2529
|
+
systemInfo: systemInfo
|
|
2530
|
+
})));
|
|
2504
2531
|
this.render();
|
|
2505
2532
|
}
|
|
2506
2533
|
onSelectItems(selectionEvent) {
|
|
2507
2534
|
this.selectPeriods.emit(selectionEvent.items);
|
|
2508
2535
|
}
|
|
2509
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2536
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2537
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: PeriodSelectorComponent, isStandalone: false, 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"] }); }
|
|
2511
2538
|
}
|
|
2512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorComponent, decorators: [{
|
|
2513
2540
|
type: Component,
|
|
2514
2541
|
args: [{ selector: 'ng-dhis2-ui-period-selector', template: `<ng-container></ng-container>`, standalone: false, styles: ["::ng-deep .content-container{z-index:0!important}\n"] }]
|
|
2515
2542
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { selectedPeriods: [{
|
|
@@ -2519,11 +2546,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
2519
2546
|
}] } });
|
|
2520
2547
|
|
|
2521
2548
|
class PeriodSelectorModule {
|
|
2522
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2523
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2524
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2550
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorModule, declarations: [PeriodSelectorComponent, PeriodSelectorModalComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [PeriodSelectorComponent, PeriodSelectorModalComponent] }); }
|
|
2551
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorModule, imports: [CommonModule, SharedDhis2UiModule] }); }
|
|
2525
2552
|
}
|
|
2526
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PeriodSelectorModule, decorators: [{
|
|
2527
2554
|
type: NgModule,
|
|
2528
2555
|
args: [{
|
|
2529
2556
|
imports: [CommonModule, SharedDhis2UiModule],
|
|
@@ -2919,9 +2946,24 @@ class OrganisationUnitSelectorComponent extends ReactWrapperModule {
|
|
|
2919
2946
|
const rootOrgUnits = await this.getRootOrgUnits();
|
|
2920
2947
|
const config = await this.getAppConfig();
|
|
2921
2948
|
if (config) {
|
|
2922
|
-
this.component = () =>
|
|
2923
|
-
|
|
2924
|
-
|
|
2949
|
+
this.component = () => React__default.createElement(Provider, {
|
|
2950
|
+
config: config,
|
|
2951
|
+
plugin: false,
|
|
2952
|
+
parentAlertsAdd: undefined,
|
|
2953
|
+
showAlertsInPlugin: false,
|
|
2954
|
+
children: React__default.createElement(OrgUnitDimension, {
|
|
2955
|
+
selected: this.selectedOrgUnits,
|
|
2956
|
+
hideGroupSelect: this.orgUnitSelectionConfig.hideGroupSelect,
|
|
2957
|
+
hideLevelSelect: this.orgUnitSelectionConfig.hideLevelSelect,
|
|
2958
|
+
hideUserOrgUnits: this.orgUnitSelectionConfig.hideUserOrgUnits,
|
|
2959
|
+
onSelect: (selectionEvent) => this.ngZone.run(() => {
|
|
2960
|
+
this.onSelectItems(selectionEvent);
|
|
2961
|
+
}),
|
|
2962
|
+
orgUnitGroupPromise: this.getOrgUnitGroups(),
|
|
2963
|
+
orgUnitLevelPromise: this.getOrgUnitLevels(),
|
|
2964
|
+
roots: rootOrgUnits,
|
|
2965
|
+
}),
|
|
2966
|
+
});
|
|
2925
2967
|
this.render();
|
|
2926
2968
|
}
|
|
2927
2969
|
}
|
|
@@ -2967,10 +3009,10 @@ class OrganisationUnitSelectorComponent extends ReactWrapperModule {
|
|
|
2967
3009
|
onSelectItems(selectionEvent) {
|
|
2968
3010
|
this.selectOrgUnits.emit(selectionEvent.items);
|
|
2969
3011
|
}
|
|
2970
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2971
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3012
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3013
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: OrganisationUnitSelectorComponent, isStandalone: false, 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 }); }
|
|
2972
3014
|
}
|
|
2973
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorComponent, decorators: [{
|
|
2974
3016
|
type: Component,
|
|
2975
3017
|
args: [{
|
|
2976
3018
|
selector: 'ng-dhis2-ui-org-unit-selector',
|
|
@@ -3009,20 +3051,34 @@ class OrganisationUnitSelectorModalComponent extends ReactWrapperModule {
|
|
|
3009
3051
|
if (config) {
|
|
3010
3052
|
this.component = () => {
|
|
3011
3053
|
const [selected, setSelected] = useState(this.selectedOrgUnits);
|
|
3012
|
-
return
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3054
|
+
return React__default.createElement(Provider, {
|
|
3055
|
+
config: config,
|
|
3056
|
+
plugin: false,
|
|
3057
|
+
parentAlertsAdd: undefined,
|
|
3058
|
+
showAlertsInPlugin: false,
|
|
3059
|
+
children: React__default.createElement(Modal$1, { position: 'middle', large: true }, React__default.createElement(ModalTitle$1, null, 'Organisation unit'), React__default.createElement(ModalContent$1, null, React__default.createElement(OrgUnitDimension, {
|
|
3060
|
+
selected: selected,
|
|
3061
|
+
hideGroupSelect: this.orgUnitSelectionConfig.hideGroupSelect,
|
|
3062
|
+
hideLevelSelect: this.orgUnitSelectionConfig.hideLevelSelect,
|
|
3063
|
+
hideUserOrgUnits: this.orgUnitSelectionConfig.hideUserOrgUnits,
|
|
3064
|
+
onSelect: (selectionEvent) => {
|
|
3065
|
+
setSelected(selectionEvent.items);
|
|
3066
|
+
},
|
|
3067
|
+
orgUnitGroupPromise: this.getOrgUnitGroups(),
|
|
3068
|
+
orgUnitLevelPromise: this.getOrgUnitLevels(),
|
|
3069
|
+
roots: rootOrgUnits,
|
|
3070
|
+
})), React__default.createElement(ModalActions$1, null, React__default.createElement(ButtonStrip$1, { end: true }, React__default.createElement(Button$1, {
|
|
3071
|
+
onClick: () => {
|
|
3072
|
+
this.onCancel();
|
|
3073
|
+
},
|
|
3074
|
+
}, 'Cancel'), React__default.createElement(Button$1, {
|
|
3075
|
+
primary: true,
|
|
3076
|
+
disabled: selected.length === 0,
|
|
3077
|
+
onClick: () => {
|
|
3078
|
+
this.onConfirm(selected);
|
|
3079
|
+
},
|
|
3080
|
+
}, 'Confirm')))),
|
|
3081
|
+
});
|
|
3026
3082
|
};
|
|
3027
3083
|
this.render();
|
|
3028
3084
|
}
|
|
@@ -3075,10 +3131,10 @@ class OrganisationUnitSelectorModalComponent extends ReactWrapperModule {
|
|
|
3075
3131
|
onSelectItems(selectionEvent) {
|
|
3076
3132
|
this.selectOrgUnits.emit(selectionEvent.items);
|
|
3077
3133
|
}
|
|
3078
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3079
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorModalComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3135
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: OrganisationUnitSelectorModalComponent, isStandalone: false, 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"] }); }
|
|
3080
3136
|
}
|
|
3081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorModalComponent, decorators: [{
|
|
3082
3138
|
type: Component,
|
|
3083
3139
|
args: [{ selector: 'ng-dhis2-ui-org-unit-selector-modal', template: '<ng-container><ng-container>', standalone: false, styles: ["::ng-deep .layer{z-index:2!important}\n"] }]
|
|
3084
3140
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { selectedOrgUnits: [{
|
|
@@ -3094,13 +3150,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
3094
3150
|
}] } });
|
|
3095
3151
|
|
|
3096
3152
|
class OrganisationUnitSelectorModule {
|
|
3097
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3098
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
3153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3154
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorModule, declarations: [OrganisationUnitSelectorComponent,
|
|
3099
3155
|
OrganisationUnitSelectorModalComponent], imports: [CommonModule, SharedDhis2UiModule], exports: [OrganisationUnitSelectorComponent,
|
|
3100
3156
|
OrganisationUnitSelectorModalComponent] }); }
|
|
3101
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3157
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorModule, imports: [CommonModule, SharedDhis2UiModule] }); }
|
|
3102
3158
|
}
|
|
3103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: OrganisationUnitSelectorModule, decorators: [{
|
|
3104
3160
|
type: NgModule,
|
|
3105
3161
|
args: [{
|
|
3106
3162
|
imports: [CommonModule, SharedDhis2UiModule],
|
|
@@ -3337,7 +3393,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3337
3393
|
React__default.createElement(DropdownButton, { name: "customDropdown", open: isOpenOrgUnitDropdown, onClick: () => setIsOpenOrgUnitDropdown(!isOpenOrgUnitDropdown), component: React__default.createElement("div", null,
|
|
3338
3394
|
React__default.createElement(FlyoutMenu, null,
|
|
3339
3395
|
React__default.createElement("div", { style: { padding: '16px' } },
|
|
3340
|
-
React__default.createElement(InputField$1, { key: "location", placeholder: orgUnitLabel ? orgUnitLabel : '
|
|
3396
|
+
React__default.createElement(InputField$1, { key: "location", placeholder: orgUnitLabel ? orgUnitLabel : 'Registering unit', value: selectedOrgUnit, onFocus: () => {
|
|
3341
3397
|
SetOrgUnitModalVisible(true);
|
|
3342
3398
|
setHide(false);
|
|
3343
3399
|
} }),
|
|
@@ -3351,15 +3407,15 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3351
3407
|
setPrevSelectedOrgUnit(selectedOrgUnit);
|
|
3352
3408
|
handleOrgUnitFilter();
|
|
3353
3409
|
setIsOpenOrgUnitDropdown(false);
|
|
3354
|
-
} }, "
|
|
3410
|
+
} }, "Update"),
|
|
3355
3411
|
React__default.createElement(Button$1, { disabled: !selectedOrgUnit, onClick: () => {
|
|
3356
3412
|
setSelectedOrgUnit('');
|
|
3357
3413
|
setPrevSelectedOrgUnit('');
|
|
3358
3414
|
setOrgUnitState(defaultOrgUnit);
|
|
3359
3415
|
setTempOrgUnitState(defaultOrgUnit);
|
|
3360
3416
|
setIsOpenOrgUnitDropdown(false);
|
|
3361
|
-
} }, "
|
|
3362
|
-
orgUnitLabel ? orgUnitLabel : '
|
|
3417
|
+
} }, "Reset")))))) },
|
|
3418
|
+
orgUnitLabel ? orgUnitLabel : 'Registering unit',
|
|
3363
3419
|
' ',
|
|
3364
3420
|
prevSelectedOrgUnit && ':',
|
|
3365
3421
|
" ",
|
|
@@ -3399,15 +3455,15 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3399
3455
|
handleStartDateFilter();
|
|
3400
3456
|
handleEndDateFilter();
|
|
3401
3457
|
setIsOpen(false);
|
|
3402
|
-
} }, "
|
|
3458
|
+
} }, "Update"),
|
|
3403
3459
|
React__default.createElement(Button$1, { onClick: () => {
|
|
3404
3460
|
setStartDateState(null);
|
|
3405
3461
|
setTempEndDateState(null);
|
|
3406
3462
|
setTempStartDateState(null);
|
|
3407
3463
|
setEndDateState(null);
|
|
3408
3464
|
setIsOpen(false);
|
|
3409
|
-
} }, "
|
|
3410
|
-
"
|
|
3465
|
+
} }, "Reset")))))) },
|
|
3466
|
+
"Enrollment dates ",
|
|
3411
3467
|
(startDateState || endDateState) && ':',
|
|
3412
3468
|
' ',
|
|
3413
3469
|
startDateState,
|
|
@@ -3423,7 +3479,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3423
3479
|
React__default.createElement(ClearIcon, { className: "my-icon-class" }))))))),
|
|
3424
3480
|
(visibleFilters ?? []).map(({ label, key, valueType, options, type }) => {
|
|
3425
3481
|
if (valueType === 'DATE') {
|
|
3426
|
-
return (React__default.createElement(DropdownButton, { name: "customDropdown", open: openDropdownKey === key, onClick: () => {
|
|
3482
|
+
return (React__default.createElement(DropdownButton, { name: "customDropdown", key: key, open: openDropdownKey === key, onClick: () => {
|
|
3427
3483
|
setOpenDropdownKey(openDropdownKey === key ? null : key);
|
|
3428
3484
|
}, component: React__default.createElement("div", null,
|
|
3429
3485
|
React__default.createElement(FlyoutMenu, null,
|
|
@@ -3444,10 +3500,10 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3444
3500
|
}));
|
|
3445
3501
|
handleAdditionalFilters();
|
|
3446
3502
|
setOpenDropdownKey(null);
|
|
3447
|
-
} }, "
|
|
3503
|
+
} }, "Update"),
|
|
3448
3504
|
React__default.createElement(Button$1, { onClick: () => {
|
|
3449
3505
|
setIsOpen(false);
|
|
3450
|
-
} }, "
|
|
3506
|
+
} }, "Reset")))))) },
|
|
3451
3507
|
label,
|
|
3452
3508
|
" ",
|
|
3453
3509
|
prevDateStates[key] && ':',
|
|
@@ -3470,8 +3526,11 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3470
3526
|
}, style: { display: 'inline-flex', alignItems: 'center' } },
|
|
3471
3527
|
React__default.createElement(ClearIcon, { className: "my-icon-class" })))));
|
|
3472
3528
|
}
|
|
3529
|
+
{
|
|
3530
|
+
/* TODO: I HAVE DUPLICATED DROPDOWN AND CLEAR ICON IN MULTIPLE PLACES REQUIRED TO CREATE A REUSABLE DROPDOWN COMPONENT WITH THE CLEAR ICON TO AVOID DUPLICATION */
|
|
3531
|
+
}
|
|
3473
3532
|
if (options && options.options.length > 0) {
|
|
3474
|
-
return (React__default.createElement(DropdownButton, { name: "customDropdown", open: openDropdownKey === key, onClick: () => {
|
|
3533
|
+
return (React__default.createElement(DropdownButton, { name: "customDropdown", key: key, open: openDropdownKey === key, onClick: () => {
|
|
3475
3534
|
setOpenDropdownKey(openDropdownKey === key ? null : key);
|
|
3476
3535
|
}, component: React__default.createElement("div", null,
|
|
3477
3536
|
React__default.createElement(FlyoutMenu, null,
|
|
@@ -3497,7 +3556,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3497
3556
|
}));
|
|
3498
3557
|
handleAdditionalFilters();
|
|
3499
3558
|
setOpenDropdownKey(null);
|
|
3500
|
-
} }, "
|
|
3559
|
+
} }, "Update"),
|
|
3501
3560
|
React__default.createElement(Button$1, { disabled: !inputValues[key], onClick: () => {
|
|
3502
3561
|
setInputValues((prevValues) => ({
|
|
3503
3562
|
...prevValues,
|
|
@@ -3512,7 +3571,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3512
3571
|
setDataQueryFiltersState(filteredFilters);
|
|
3513
3572
|
setTempDataQueryFiltersState(filteredFilters);
|
|
3514
3573
|
setOpenDropdownKey(null);
|
|
3515
|
-
} }, "
|
|
3574
|
+
} }, "Reset")))))) },
|
|
3516
3575
|
label,
|
|
3517
3576
|
" ",
|
|
3518
3577
|
prevInputValues[key] && ':',
|
|
@@ -3563,7 +3622,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3563
3622
|
}));
|
|
3564
3623
|
handleAdditionalFilters();
|
|
3565
3624
|
setOpenDropdownKey(null);
|
|
3566
|
-
} }, "
|
|
3625
|
+
} }, "Update"),
|
|
3567
3626
|
React__default.createElement(Button$1, { disabled: !inputValues[key], onClick: () => {
|
|
3568
3627
|
setInputValues((prevValues) => ({
|
|
3569
3628
|
...prevValues,
|
|
@@ -3578,7 +3637,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3578
3637
|
setDataQueryFiltersState(filteredFilters);
|
|
3579
3638
|
setTempDataQueryFiltersState(filteredFilters);
|
|
3580
3639
|
setOpenDropdownKey(null);
|
|
3581
|
-
} }, "
|
|
3640
|
+
} }, "Reset")))))) },
|
|
3582
3641
|
label,
|
|
3583
3642
|
" ",
|
|
3584
3643
|
prevInputValues[key] && ':',
|
|
@@ -3621,6 +3680,49 @@ function formatDateForDisplay(dateString) {
|
|
|
3621
3680
|
return 'dd-mm-yyyy';
|
|
3622
3681
|
}
|
|
3623
3682
|
}
|
|
3683
|
+
// case 'date':
|
|
3684
|
+
// case 'date-time':
|
|
3685
|
+
// return (
|
|
3686
|
+
// // <InputField
|
|
3687
|
+
// // error={hasError}
|
|
3688
|
+
// // validationText={validationError}
|
|
3689
|
+
// // type={this.field().type as any}
|
|
3690
|
+
// // inputWidth={inputWidth}
|
|
3691
|
+
// // required={this.field().required}
|
|
3692
|
+
// // name={this.field().id}
|
|
3693
|
+
// // label={this.label()}
|
|
3694
|
+
// // min={this.field().min?.toString()}
|
|
3695
|
+
// // max={this.field().max?.toString()}
|
|
3696
|
+
// // placeholder={this.placeholder()}
|
|
3697
|
+
// // value={value}
|
|
3698
|
+
// // readOnly={disabled}
|
|
3699
|
+
// // onChange={(event: any) => {
|
|
3700
|
+
// // onValueChange(event.value);
|
|
3701
|
+
// // }}
|
|
3702
|
+
// // onBlur={() => {
|
|
3703
|
+
// // checkValueUniqueness();
|
|
3704
|
+
// // }}
|
|
3705
|
+
// // />
|
|
3706
|
+
// <CalendarInput
|
|
3707
|
+
// label={this.label()}
|
|
3708
|
+
// error={hasError}
|
|
3709
|
+
// validationText={validationError}
|
|
3710
|
+
// date={value}
|
|
3711
|
+
// readOnly={disabled}
|
|
3712
|
+
// min={this.field().min?.toString()}
|
|
3713
|
+
// max={this.field().max?.toString()}
|
|
3714
|
+
// placeholder={this.placeholder()}
|
|
3715
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3716
|
+
// onValueChange(selectedDate.calendarDateString);
|
|
3717
|
+
// }}
|
|
3718
|
+
// disabled={disabled}
|
|
3719
|
+
// inputWidth={inputWidth}
|
|
3720
|
+
// required={this.field().required}
|
|
3721
|
+
// calendar="gregory"
|
|
3722
|
+
// locale="en-GB"
|
|
3723
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3724
|
+
// />
|
|
3725
|
+
// );
|
|
3624
3726
|
|
|
3625
3727
|
const TableHeader = ({ columns, allSelected, onSelectAll, selectable, showActionButtons, }) => {
|
|
3626
3728
|
const handleCheckboxChange = () => {
|
|
@@ -3957,10 +4059,10 @@ class LineListService {
|
|
|
3957
4059
|
return orgUnitsMap;
|
|
3958
4060
|
}));
|
|
3959
4061
|
}
|
|
3960
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3961
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4062
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService, deps: [{ token: i1.NgxDhis2HttpClientService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4063
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService }); }
|
|
3962
4064
|
}
|
|
3963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService, decorators: [{
|
|
3964
4066
|
type: Injectable
|
|
3965
4067
|
}], ctorParameters: () => [{ type: i1.NgxDhis2HttpClientService }] });
|
|
3966
4068
|
|
|
@@ -3976,7 +4078,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
3976
4078
|
const attributeColumns = metaData.displayInListTrackedEntityAttributes
|
|
3977
4079
|
.sort((a, b) => a.sortOrder - b.sortOrder)
|
|
3978
4080
|
.map((trackedEntityAttribute) => ({
|
|
3979
|
-
label: trackedEntityAttribute.
|
|
4081
|
+
label: trackedEntityAttribute.name ?? trackedEntityAttribute.formName,
|
|
3980
4082
|
key: trackedEntityAttribute.id,
|
|
3981
4083
|
}));
|
|
3982
4084
|
const tableSearcheableDataElements = metaData
|
|
@@ -3985,7 +4087,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
3985
4087
|
.programStageDataElements.filter((psde) => psde.displayInReports)
|
|
3986
4088
|
.sort((a, b) => a.sortOrder - b.sortOrder)
|
|
3987
4089
|
.map((psde) => ({
|
|
3988
|
-
label: psde.dataElement.
|
|
4090
|
+
label: psde.dataElement.name || psde.dataElement.formName || 'default',
|
|
3989
4091
|
key: psde.dataElement.id,
|
|
3990
4092
|
valueType: psde.dataElement.valueType,
|
|
3991
4093
|
options: psde.dataElement.optionSet,
|
|
@@ -3998,7 +4100,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
3998
4100
|
.programStageDataElements.filter((psde) => psde.displayInReports)
|
|
3999
4101
|
.sort((a, b) => a.sortOrder - b.sortOrder) // Sorts data elements within stage
|
|
4000
4102
|
.map((psde) => ({
|
|
4001
|
-
label: psde.dataElement.
|
|
4103
|
+
label: psde.dataElement.name || psde.dataElement.formName || 'default',
|
|
4002
4104
|
key: psde.dataElement.id,
|
|
4003
4105
|
})));
|
|
4004
4106
|
const dataElementOptions = metaData.displayInListDataElements.map((element) => ({
|
|
@@ -4010,7 +4112,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
4010
4112
|
}));
|
|
4011
4113
|
const tableColumns = [
|
|
4012
4114
|
{
|
|
4013
|
-
label: orgUnitLabel || '
|
|
4115
|
+
label: orgUnitLabel || 'Registering unit',
|
|
4014
4116
|
key: 'orgUnit',
|
|
4015
4117
|
},
|
|
4016
4118
|
...attributeColumns,
|
|
@@ -4619,28 +4721,103 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4619
4721
|
// Returns black for light backgrounds, white for dark backgrounds
|
|
4620
4722
|
return yiq >= 128 ? colors$1.grey700 : '#FFFFFF';
|
|
4621
4723
|
}
|
|
4622
|
-
return
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
gap: 8,
|
|
4626
|
-
padding: 8,
|
|
4627
|
-
} },
|
|
4628
|
-
React__default.createElement(CircularLoader$1, { small: true }),
|
|
4629
|
-
React__default.createElement("div", { style: {
|
|
4630
|
-
fontSize: 14,
|
|
4631
|
-
} }, "Loading"))) : (React__default.createElement("div", null,
|
|
4632
|
-
this.showDownloadButton && (React__default.createElement("div", { style: {
|
|
4633
|
-
paddingBottom: '1rem',
|
|
4724
|
+
return React__default.createElement('div', null, loading
|
|
4725
|
+
? React__default.createElement('div', {
|
|
4726
|
+
style: {
|
|
4634
4727
|
display: 'flex',
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4728
|
+
alignItems: 'center',
|
|
4729
|
+
gap: 8,
|
|
4730
|
+
padding: 8,
|
|
4731
|
+
},
|
|
4732
|
+
}, React__default.createElement(CircularLoader$1, { small: true }), React__default.createElement('div', {
|
|
4733
|
+
style: {
|
|
4734
|
+
fontSize: 14,
|
|
4735
|
+
},
|
|
4736
|
+
}, 'Loading'))
|
|
4737
|
+
: React__default.createElement('div', null, this.showDownloadButton &&
|
|
4738
|
+
React__default.createElement('div', {
|
|
4739
|
+
style: {
|
|
4740
|
+
paddingBottom: '1rem',
|
|
4741
|
+
display: 'flex',
|
|
4742
|
+
justifyContent: 'flex-end',
|
|
4743
|
+
},
|
|
4744
|
+
}, React__default.createElement(DropdownButton, {
|
|
4745
|
+
name: 'Download',
|
|
4746
|
+
component: React__default.createElement('span', null, ' ', React__default.createElement(MenuItem$1, {
|
|
4747
|
+
label: 'Download Csv',
|
|
4748
|
+
onClick: handleCsvDownload,
|
|
4749
|
+
}), React__default.createElement(MenuItem$1, {
|
|
4750
|
+
label: 'Download Excel',
|
|
4751
|
+
onClick: handleExcelDownload,
|
|
4752
|
+
})),
|
|
4753
|
+
value: 'Download',
|
|
4754
|
+
}, 'Download')), orgUnitModalVisible &&
|
|
4755
|
+
React__default.createElement(OrgUnitSelector, {
|
|
4756
|
+
hide: hide,
|
|
4757
|
+
setHide: setHide,
|
|
4758
|
+
selectedOrgUnit: selectedOrgUnit,
|
|
4759
|
+
setSelectedOrgUnit: setSelectedOrgUnit,
|
|
4760
|
+
setOrgUnitState: setOrgUnitState,
|
|
4761
|
+
setTempOrgUnitState: setTempOrgUnitState,
|
|
4762
|
+
tempOrgUnitState: tempOrgUnitState,
|
|
4763
|
+
}), this.showFilters &&
|
|
4764
|
+
React__default.createElement(FilterToolbar, {
|
|
4765
|
+
orgUnitLabel: orgUnitLabel,
|
|
4766
|
+
selectedOrgUnit: selectedOrgUnit,
|
|
4767
|
+
setSelectedOrgUnit: setSelectedOrgUnit,
|
|
4768
|
+
setOrgUnitState: setOrgUnitState,
|
|
4769
|
+
defaultOrgUnit: defaultOrgUnit,
|
|
4770
|
+
setHide: setHide,
|
|
4771
|
+
startDateState: startDateState,
|
|
4772
|
+
setStartDateState: setStartDateState,
|
|
4773
|
+
endDateState: endDateState,
|
|
4774
|
+
setEndDateState: setEndDateState,
|
|
4775
|
+
visibleFilters: visibleFilters,
|
|
4776
|
+
dateStates: dateStates,
|
|
4777
|
+
inputValues: inputValues,
|
|
4778
|
+
setInputValues: setInputValues,
|
|
4779
|
+
handleInputChange: handleInputChange,
|
|
4780
|
+
handleInputChangeForSelectField: handleInputChangeForSelectField,
|
|
4781
|
+
handleDateSelect: handleDateSelect,
|
|
4782
|
+
showAllFilters: showAllFilters,
|
|
4783
|
+
setShowAllFilters: setShowAllFilters,
|
|
4784
|
+
setTempStartDateState: setTempStartDateState,
|
|
4785
|
+
setTempEndDateState: setTempEndDateState,
|
|
4786
|
+
setTempOrgUnitState: setTempOrgUnitState,
|
|
4787
|
+
tempStartDateState: tempStartDateState,
|
|
4788
|
+
tempEndDateState: tempEndDateState,
|
|
4789
|
+
tempOrgUnitState: tempOrgUnitState,
|
|
4790
|
+
dataQueryFiltersState: dataQueryFiltersState,
|
|
4791
|
+
setDataQueryFiltersState: setDataQueryFiltersState,
|
|
4792
|
+
SetOrgUnitModalVisible: setOrgUnitModalVisible,
|
|
4793
|
+
showEnrollmentDates: this.showEnrollmentDates,
|
|
4794
|
+
handleAdditionalFilters: handleAdditionalFilters,
|
|
4795
|
+
handleStartDateFilter: handleStartDateFilter,
|
|
4796
|
+
handleEndDateFilter: handleEndDateFilter,
|
|
4797
|
+
handleOrgUnitFilter: handleOrgUnitFilter,
|
|
4798
|
+
setDateStates: setDateStates,
|
|
4799
|
+
prevInputValues: prevInputValues,
|
|
4800
|
+
setPrevInputValues: setPrevInputValues,
|
|
4801
|
+
setTempDataQueryFiltersState: setTempDataQueryFiltersState,
|
|
4802
|
+
prevDateStates: prevDateStates,
|
|
4803
|
+
setPrevDateStates: setPrevDateStates,
|
|
4804
|
+
prevSelectedOrgUnit: prevSelectedOrgUnit,
|
|
4805
|
+
setPrevSelectedOrgUnit: setPrevSelectedOrgUnit,
|
|
4806
|
+
// filteredFilters: filteredFilters
|
|
4807
|
+
}), React__default.createElement(LineListTable, {
|
|
4808
|
+
columns: columns,
|
|
4809
|
+
data: data,
|
|
4810
|
+
pager: pager,
|
|
4811
|
+
setPager: setPager,
|
|
4812
|
+
getTextColorFromBackGround: getTextColorFromBackGround,
|
|
4813
|
+
actionOptions: this.actionOptions,
|
|
4814
|
+
actionOptionOrientation: this.actionOptionOrientation,
|
|
4815
|
+
actionSelected: this.actionSelected,
|
|
4816
|
+
selectable: selectable,
|
|
4817
|
+
rowsSelected: this.rowsSelected,
|
|
4818
|
+
showActionButtons: showActionButtons,
|
|
4819
|
+
error: error,
|
|
4820
|
+
})));
|
|
4644
4821
|
};
|
|
4645
4822
|
}
|
|
4646
4823
|
ngOnChanges(changes) {
|
|
@@ -4688,10 +4865,10 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4688
4865
|
this.component = this.LineList;
|
|
4689
4866
|
this.render();
|
|
4690
4867
|
}
|
|
4691
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4692
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
4868
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4869
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LineListTableComponent, isStandalone: false, selector: "ng-dhis2-ui-line-list", inputs: { triggerToken: "triggerToken", programId: "programId", orgUnit: "orgUnit", programStageId: "programStageId", actionOptions: "actionOptions", actionOptionOrientation: "actionOptionOrientation", attributeFilters: "attributeFilters", useOuModeWithOlderDHIS2Instance: "useOuModeWithOlderDHIS2Instance", startDate: "startDate", endDate: "endDate", dataQueryFilters: "dataQueryFilters", ouMode: "ouMode", isButtonLoading: "isButtonLoading", buttonFilter: "buttonFilter", filterRootOrgUnit: "filterRootOrgUnit", showFilters: "showFilters", isOptionSetNameVisible: "isOptionSetNameVisible", allowRowsSelection: "allowRowsSelection", enrollmentStatus: "enrollmentStatus", filterableColumnIds: "filterableColumnIds", triggerRefetch: "triggerRefetch", eventStatus: "eventStatus", showActionButtons: "showActionButtons", showEnrollmentDates: "showEnrollmentDates", showDownloadButton: "showDownloadButton", searcheableDataElements: "searcheableDataElements" }, outputs: { actionSelected: "actionSelected", rowsSelected: "rowsSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";::ng-deep .custom-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-input div{margin:0!important}::ng-deep .custom-input label{font-size:12px;padding-right:0}::ng-deep .custom-input input{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-input input:focus{border:none!important;box-shadow:none!important}::ng-deep .custom-input [data-test=calendar-clear-button]{background-color:#f2f2f2!important;color:#870808!important;border-radius:6px!important;padding:4px 10px!important;font-size:0!important}::ng-deep .custom-input [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:14px;color:#870808}::ng-deep .custom-input [data-test=calendar-clear-button]:hover{background-color:#ddd}::ng-deep .calendar-input-wrapper{position:relative}::ng-deep .calendar-input-wrapper .custom-input{position:relative;width:100%;display:flex;align-items:center}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]{right:8px;bottom:14px;margin:auto;display:flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:0!important;background-color:#a0adba!important;border-radius:50%;padding:2px;cursor:pointer}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:10px;color:#f0f0f0}::ng-deep .calendar-input-wrapper input{padding-right:40px!important;height:40px;line-height:40px;box-sizing:border-box}::ng-deep .custom-input label{color:gray!important;opacity:1}::ng-deep .table-top-toolbar{background-color:var(--colors-grey100)!important;color:var(--colors-grey900)!important}::ng-deep .custom-select-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-select-input div{margin:0!important}::ng-deep .custom-select-input [data-test=dhis2-uiwidgets-singleselectfield-label]{font-size:12px;color:gray!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]:focus-within{box-shadow:none!important}::ng-deep .custom-select-input input:focus{border:none!important;box-shadow:none!important}\n"] }); }
|
|
4693
4870
|
}
|
|
4694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListTableComponent, decorators: [{
|
|
4695
4872
|
type: Component,
|
|
4696
4873
|
args: [{ selector: 'ng-dhis2-ui-line-list', template: '<ng-content></ng-content>', standalone: false, styles: ["@charset \"UTF-8\";::ng-deep .custom-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-input div{margin:0!important}::ng-deep .custom-input label{font-size:12px;padding-right:0}::ng-deep .custom-input input{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-input input:focus{border:none!important;box-shadow:none!important}::ng-deep .custom-input [data-test=calendar-clear-button]{background-color:#f2f2f2!important;color:#870808!important;border-radius:6px!important;padding:4px 10px!important;font-size:0!important}::ng-deep .custom-input [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:14px;color:#870808}::ng-deep .custom-input [data-test=calendar-clear-button]:hover{background-color:#ddd}::ng-deep .calendar-input-wrapper{position:relative}::ng-deep .calendar-input-wrapper .custom-input{position:relative;width:100%;display:flex;align-items:center}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]{right:8px;bottom:14px;margin:auto;display:flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:0!important;background-color:#a0adba!important;border-radius:50%;padding:2px;cursor:pointer}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:10px;color:#f0f0f0}::ng-deep .calendar-input-wrapper input{padding-right:40px!important;height:40px;line-height:40px;box-sizing:border-box}::ng-deep .custom-input label{color:gray!important;opacity:1}::ng-deep .table-top-toolbar{background-color:var(--colors-grey100)!important;color:var(--colors-grey900)!important}::ng-deep .custom-select-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-select-input div{margin:0!important}::ng-deep .custom-select-input [data-test=dhis2-uiwidgets-singleselectfield-label]{font-size:12px;color:gray!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]:focus-within{box-shadow:none!important}::ng-deep .custom-select-input input:focus{border:none!important;box-shadow:none!important}\n"] }]
|
|
4697
4874
|
}], propDecorators: { triggerToken: [{
|
|
@@ -4753,11 +4930,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
4753
4930
|
}] } });
|
|
4754
4931
|
|
|
4755
4932
|
class LineListModule {
|
|
4756
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4757
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4758
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4933
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4934
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: LineListModule, declarations: [LineListTableComponent], imports: [CommonModule, SharedDhis2UiModule, ReactWrapperModule], exports: [LineListTableComponent] }); }
|
|
4935
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListModule, providers: [LineListService], imports: [CommonModule, SharedDhis2UiModule] }); }
|
|
4759
4936
|
}
|
|
4760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListModule, decorators: [{
|
|
4761
4938
|
type: NgModule,
|
|
4762
4939
|
args: [{
|
|
4763
4940
|
declarations: [LineListTableComponent],
|
|
@@ -4907,27 +5084,29 @@ class DataTableUIComponent extends ReactWrapperModule {
|
|
|
4907
5084
|
},
|
|
4908
5085
|
}));
|
|
4909
5086
|
};
|
|
4910
|
-
return
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
5087
|
+
return React__default.createElement('div', null, loading
|
|
5088
|
+
? React__default.createElement('div', {
|
|
5089
|
+
style: {
|
|
5090
|
+
display: 'flex',
|
|
5091
|
+
alignItems: 'center',
|
|
5092
|
+
gap: 8,
|
|
5093
|
+
padding: 8,
|
|
5094
|
+
},
|
|
5095
|
+
}, React__default.createElement(CircularLoader$1, { small: true }), React__default.createElement('div', {
|
|
5096
|
+
style: {
|
|
4918
5097
|
fontSize: 14,
|
|
4919
|
-
}
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
5098
|
+
},
|
|
5099
|
+
}, 'Loading'))
|
|
5100
|
+
: React__default.createElement(DataTable, null, React__default.createElement(TableHead, null, React__default.createElement(DataTableRow, null, ...columns.map((col) => React__default.createElement(DataTableColumnHeader, { key: col.column }, col.display)), this.actionOptions && this.actionOptions.length > 0
|
|
5101
|
+
? React__default.createElement(DataTableColumnHeader, null, 'Actions')
|
|
5102
|
+
: null)), React__default.createElement(TableBody$1, null, ...tableData.map((row, rowIndex) => React__default.createElement(DataTableRow, { key: rowIndex }, ...columns.map((col) => React__default.createElement(DataTableCell, { key: col.column }, row[col.column] || '-')), this.actionOptions && this.actionOptions.length > 0
|
|
5103
|
+
? React__default.createElement(DataTableCell, null, React__default.createElement(DropdownMenu, {
|
|
5104
|
+
dropdownOptions: getDropdownOptions(row),
|
|
5105
|
+
onClick: (option) => option.onClick?.(row),
|
|
5106
|
+
}))
|
|
5107
|
+
: null))), React__default.createElement(TableFoot, null, React__default.createElement(DataTableRow, null, React__default.createElement(DataTableCell, {
|
|
5108
|
+
colSpan: (columns.length + 1).toString(),
|
|
5109
|
+
})))));
|
|
4931
5110
|
};
|
|
4932
5111
|
}
|
|
4933
5112
|
async ngAfterViewInit() {
|
|
@@ -4946,10 +5125,10 @@ class DataTableUIComponent extends ReactWrapperModule {
|
|
|
4946
5125
|
this.render();
|
|
4947
5126
|
}
|
|
4948
5127
|
}
|
|
4949
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4950
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5129
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: DataTableUIComponent, isStandalone: false, selector: "app-data-table-ui", inputs: { data: "data", columnDefinitions: "columnDefinitions", actionOptions: "actionOptions" }, outputs: { actionSelected: "actionSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [""] }); }
|
|
4951
5130
|
}
|
|
4952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIComponent, decorators: [{
|
|
4953
5132
|
type: Component,
|
|
4954
5133
|
args: [{ selector: 'app-data-table-ui', standalone: false, template: '<ng-content></ng-content>' }]
|
|
4955
5134
|
}], propDecorators: { data: [{
|
|
@@ -4963,11 +5142,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
4963
5142
|
}] } });
|
|
4964
5143
|
|
|
4965
5144
|
class DataTableUIModule {
|
|
4966
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4967
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4968
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
5145
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5146
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIModule, declarations: [DataTableUIComponent], imports: [CommonModule, SharedDhis2UiModule, ReactWrapperModule], exports: [DataTableUIComponent] }); }
|
|
5147
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIModule, imports: [CommonModule, SharedDhis2UiModule] }); }
|
|
4969
5148
|
}
|
|
4970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIModule, decorators: [{
|
|
4971
5150
|
type: NgModule,
|
|
4972
5151
|
args: [{
|
|
4973
5152
|
declarations: [DataTableUIComponent],
|
|
@@ -6409,24 +6588,24 @@ class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
6409
6588
|
super(...arguments);
|
|
6410
6589
|
this.ngZone = inject(NgZone);
|
|
6411
6590
|
this.fieldType = 'textbox';
|
|
6412
|
-
this.field = input.required();
|
|
6413
|
-
this.fieldError = input();
|
|
6414
|
-
this.fieldConfig = input(new FieldConfig());
|
|
6415
|
-
this.form = model.required();
|
|
6416
|
-
this.isValid = input();
|
|
6417
|
-
this.isValueAssigned = input();
|
|
6418
|
-
this.dataId = input();
|
|
6419
|
-
this.customOrgUnitRoots = input();
|
|
6420
|
-
this.value = model();
|
|
6591
|
+
this.field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
6592
|
+
this.fieldError = input(...(ngDevMode ? [undefined, { debugName: "fieldError" }] : []));
|
|
6593
|
+
this.fieldConfig = input(new FieldConfig(), ...(ngDevMode ? [{ debugName: "fieldConfig" }] : []));
|
|
6594
|
+
this.form = model.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
6595
|
+
this.isValid = input(...(ngDevMode ? [undefined, { debugName: "isValid" }] : []));
|
|
6596
|
+
this.isValueAssigned = input(...(ngDevMode ? [undefined, { debugName: "isValueAssigned" }] : []));
|
|
6597
|
+
this.dataId = input(...(ngDevMode ? [undefined, { debugName: "dataId" }] : []));
|
|
6598
|
+
this.customOrgUnitRoots = input(...(ngDevMode ? [undefined, { debugName: "customOrgUnitRoots" }] : []));
|
|
6599
|
+
this.value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
6421
6600
|
this.value$ = toObservable(this.value);
|
|
6422
6601
|
this.isValueAssigned$ = toObservable(this.isValueAssigned);
|
|
6423
6602
|
this.fieldError$ = toObservable(this.fieldError);
|
|
6424
6603
|
this.label = computed(() => {
|
|
6425
6604
|
return !this.fieldConfig()?.hideLabel ? this.field().label : undefined;
|
|
6426
|
-
});
|
|
6605
|
+
}, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
6427
6606
|
this.placeholder = computed(() => {
|
|
6428
6607
|
return (this.field()?.placeholder || `Enter ${this.field()?.label || 'value'}`);
|
|
6429
|
-
});
|
|
6608
|
+
}, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
6430
6609
|
this.InputField = this.#getInputField();
|
|
6431
6610
|
this.update = new EventEmitter();
|
|
6432
6611
|
this.immediateUpdate = new EventEmitter();
|
|
@@ -6652,10 +6831,10 @@ class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
6652
6831
|
return false;
|
|
6653
6832
|
}
|
|
6654
6833
|
}
|
|
6655
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6656
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
6834
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6835
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: BaseFormFieldComponent, isStandalone: true, inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, fieldError: { classPropertyName: "fieldError", publicName: "fieldError", isSignal: true, isRequired: false, transformFunction: null }, fieldConfig: { classPropertyName: "fieldConfig", publicName: "fieldConfig", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, isValueAssigned: { classPropertyName: "isValueAssigned", publicName: "isValueAssigned", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { form: "formChange", value: "valueChange", update: "update", immediateUpdate: "immediateUpdate" }, usesInheritance: true, ngImport: i0 }); }
|
|
6657
6836
|
}
|
|
6658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormFieldComponent, decorators: [{
|
|
6659
6838
|
type: Directive
|
|
6660
6839
|
}], propDecorators: { update: [{
|
|
6661
6840
|
type: Output
|
|
@@ -6664,10 +6843,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
6664
6843
|
}] } });
|
|
6665
6844
|
|
|
6666
6845
|
class FormFieldItemComponent extends BaseFormFieldComponent {
|
|
6667
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6668
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6846
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6847
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: FormFieldItemComponent, isStandalone: false, selector: "ng-dhis2-ui-form-field-item", usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
6669
6848
|
}
|
|
6670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldItemComponent, decorators: [{
|
|
6671
6850
|
type: Component,
|
|
6672
6851
|
args: [{
|
|
6673
6852
|
selector: 'ng-dhis2-ui-form-field-item',
|
|
@@ -6678,30 +6857,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
6678
6857
|
|
|
6679
6858
|
class FormFieldComponent {
|
|
6680
6859
|
constructor() {
|
|
6681
|
-
this.field = input.required();
|
|
6682
|
-
this.fieldConfig = input.required();
|
|
6683
|
-
this.isCheckBoxButton = input();
|
|
6684
|
-
this.fieldClass = input('');
|
|
6685
|
-
this.programRuleActions = input([]);
|
|
6686
|
-
this.dataEntities = input({});
|
|
6687
|
-
this.minDate = input();
|
|
6688
|
-
this.maxDate = input(new Date());
|
|
6689
|
-
this.dataId = input();
|
|
6690
|
-
this.customOrgUnitRoots = input();
|
|
6860
|
+
this.field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
6861
|
+
this.fieldConfig = input.required(...(ngDevMode ? [{ debugName: "fieldConfig" }] : []));
|
|
6862
|
+
this.isCheckBoxButton = input(...(ngDevMode ? [undefined, { debugName: "isCheckBoxButton" }] : []));
|
|
6863
|
+
this.fieldClass = input('', ...(ngDevMode ? [{ debugName: "fieldClass" }] : []));
|
|
6864
|
+
this.programRuleActions = input([], ...(ngDevMode ? [{ debugName: "programRuleActions" }] : []));
|
|
6865
|
+
this.dataEntities = input({}, ...(ngDevMode ? [{ debugName: "dataEntities" }] : []));
|
|
6866
|
+
this.minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : []));
|
|
6867
|
+
this.maxDate = input(new Date(), ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
6868
|
+
this.dataId = input(...(ngDevMode ? [undefined, { debugName: "dataId" }] : []));
|
|
6869
|
+
this.customOrgUnitRoots = input(...(ngDevMode ? [undefined, { debugName: "customOrgUnitRoots" }] : []));
|
|
6691
6870
|
this.color = 'primary';
|
|
6692
6871
|
this.fieldUpdate = new EventEmitter();
|
|
6693
6872
|
this.immediateFieldUpdate = new EventEmitter();
|
|
6694
6873
|
this.runtimeOptionChange = new EventEmitter();
|
|
6695
|
-
this.value = signal('');
|
|
6696
|
-
this.runtimeError = signal(undefined);
|
|
6874
|
+
this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
6875
|
+
this.runtimeError = signal(undefined, ...(ngDevMode ? [{ debugName: "runtimeError" }] : []));
|
|
6697
6876
|
this._runtimeOptions = [];
|
|
6698
6877
|
this.runtimeOptions = [];
|
|
6699
6878
|
this.fieldFilterControl = new FormControl();
|
|
6700
6879
|
this._onDestroy = new Subject();
|
|
6701
|
-
this.isValueAssigned = signal(false);
|
|
6880
|
+
this.isValueAssigned = signal(false, ...(ngDevMode ? [{ debugName: "isValueAssigned" }] : []));
|
|
6702
6881
|
this.ruleProcessor = effect(() => {
|
|
6703
6882
|
this.#processRules(this.programRuleActions());
|
|
6704
|
-
});
|
|
6883
|
+
}, ...(ngDevMode ? [{ debugName: "ruleProcessor" }] : []));
|
|
6705
6884
|
}
|
|
6706
6885
|
ngOnChanges(changes) {
|
|
6707
6886
|
if (changes && changes['dataEntities'] && this.field()?.dependentField) {
|
|
@@ -6865,10 +7044,10 @@ class FormFieldComponent {
|
|
|
6865
7044
|
onUpdateRuntimeOptions(options) {
|
|
6866
7045
|
this._runtimeOptions = [...options];
|
|
6867
7046
|
}
|
|
6868
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6869
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
7047
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7048
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: FormFieldComponent, isStandalone: false, selector: "ng-dhis2-ui-form-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, fieldConfig: { classPropertyName: "fieldConfig", publicName: "fieldConfig", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: false, isRequired: false, transformFunction: null }, isCheckBoxButton: { classPropertyName: "isCheckBoxButton", publicName: "isCheckBoxButton", isSignal: true, isRequired: false, transformFunction: null }, fieldClass: { classPropertyName: "fieldClass", publicName: "fieldClass", isSignal: true, isRequired: false, transformFunction: null }, programRuleActions: { classPropertyName: "programRuleActions", publicName: "programRuleActions", isSignal: true, isRequired: false, transformFunction: null }, dataEntities: { classPropertyName: "dataEntities", publicName: "dataEntities", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fieldUpdate: "fieldUpdate", immediateFieldUpdate: "immediateFieldUpdate", runtimeOptionChange: "runtimeOptionChange" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"field()\" class=\"form-field-item\">\n <ng-dhis2-ui-form-field-item\n [field]=\"field()\"\n [fieldError]=\"runtimeError()\"\n [isValueAssigned]=\"isValueAssigned()\"\n [fieldConfig]=\"fieldConfig()\"\n [(form)]=\"form\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [value]=\"value()\"\n (update)=\"onValueChange()\"\n (immediateUpdate)=\"onImmediateChange($event)\"\n />\n</div>\n", styles: [".form-field-item{margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FormFieldItemComponent, selector: "ng-dhis2-ui-form-field-item" }] }); }
|
|
6870
7049
|
}
|
|
6871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
6872
7051
|
type: Component,
|
|
6873
7052
|
args: [{ selector: 'ng-dhis2-ui-form-field', standalone: false, template: "<div *ngIf=\"field()\" class=\"form-field-item\">\n <ng-dhis2-ui-form-field-item\n [field]=\"field()\"\n [fieldError]=\"runtimeError()\"\n [isValueAssigned]=\"isValueAssigned()\"\n [fieldConfig]=\"fieldConfig()\"\n [(form)]=\"form\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [value]=\"value()\"\n (update)=\"onValueChange()\"\n (immediateUpdate)=\"onImmediateChange($event)\"\n />\n</div>\n", styles: [".form-field-item{margin-bottom:16px}\n"] }]
|
|
6874
7053
|
}], ctorParameters: () => [], propDecorators: { form: [{
|
|
@@ -6918,18 +7097,18 @@ class FormComponent {
|
|
|
6918
7097
|
return 'col-sm-4';
|
|
6919
7098
|
}
|
|
6920
7099
|
constructor() {
|
|
6921
|
-
this.formConfig = input();
|
|
6922
|
-
this.fields = input.required();
|
|
6923
|
-
this.form = input.required();
|
|
6924
|
-
this.isFormHorizontal = input(false);
|
|
6925
|
-
this.showSaveButton = input(false);
|
|
6926
|
-
this.fieldsData = input();
|
|
6927
|
-
this.fieldClass = input('');
|
|
6928
|
-
this.shouldRenderAsCheckBoxesButton = input(false);
|
|
6929
|
-
this.programRuleActions = input([]);
|
|
6930
|
-
this.dataEntities = input(undefined);
|
|
6931
|
-
this.dataId = input();
|
|
6932
|
-
this.customOrgUnitRoots = input();
|
|
7100
|
+
this.formConfig = input(...(ngDevMode ? [undefined, { debugName: "formConfig" }] : []));
|
|
7101
|
+
this.fields = input.required(...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
7102
|
+
this.form = input.required(...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
7103
|
+
this.isFormHorizontal = input(false, ...(ngDevMode ? [{ debugName: "isFormHorizontal" }] : []));
|
|
7104
|
+
this.showSaveButton = input(false, ...(ngDevMode ? [{ debugName: "showSaveButton" }] : []));
|
|
7105
|
+
this.fieldsData = input(...(ngDevMode ? [undefined, { debugName: "fieldsData" }] : []));
|
|
7106
|
+
this.fieldClass = input('', ...(ngDevMode ? [{ debugName: "fieldClass" }] : []));
|
|
7107
|
+
this.shouldRenderAsCheckBoxesButton = input(false, ...(ngDevMode ? [{ debugName: "shouldRenderAsCheckBoxesButton" }] : []));
|
|
7108
|
+
this.programRuleActions = input([], ...(ngDevMode ? [{ debugName: "programRuleActions" }] : []));
|
|
7109
|
+
this.dataEntities = input(undefined, ...(ngDevMode ? [{ debugName: "dataEntities" }] : []));
|
|
7110
|
+
this.dataId = input(...(ngDevMode ? [undefined, { debugName: "dataId" }] : []));
|
|
7111
|
+
this.customOrgUnitRoots = input(...(ngDevMode ? [undefined, { debugName: "customOrgUnitRoots" }] : []));
|
|
6933
7112
|
this.configuration = computed(() => {
|
|
6934
7113
|
if (!this.formConfig()) {
|
|
6935
7114
|
return new FormConfig({
|
|
@@ -6937,12 +7116,12 @@ class FormComponent {
|
|
|
6937
7116
|
});
|
|
6938
7117
|
}
|
|
6939
7118
|
return this.formConfig();
|
|
6940
|
-
});
|
|
7119
|
+
}, ...(ngDevMode ? [{ debugName: "configuration" }] : []));
|
|
6941
7120
|
this.formUpdate = new EventEmitter();
|
|
6942
7121
|
this.formValidityUpdate = new EventEmitter();
|
|
6943
7122
|
this.ruleProcessor = effect(() => {
|
|
6944
7123
|
this.#processRules(this.programRuleActions());
|
|
6945
|
-
});
|
|
7124
|
+
}, ...(ngDevMode ? [{ debugName: "ruleProcessor" }] : []));
|
|
6946
7125
|
}
|
|
6947
7126
|
ngOnInit() {
|
|
6948
7127
|
this.values = this.form().getRawValue();
|
|
@@ -7005,10 +7184,10 @@ class FormComponent {
|
|
|
7005
7184
|
ngOnDestroy() {
|
|
7006
7185
|
this.ruleProcessor.destroy();
|
|
7007
7186
|
}
|
|
7008
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7009
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
7187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7188
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: FormComponent, isStandalone: false, selector: "ng-dhis2-ui-form", inputs: { formConfig: { classPropertyName: "formConfig", publicName: "formConfig", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, isFormHorizontal: { classPropertyName: "isFormHorizontal", publicName: "isFormHorizontal", isSignal: true, isRequired: false, transformFunction: null }, showSaveButton: { classPropertyName: "showSaveButton", publicName: "showSaveButton", isSignal: true, isRequired: false, transformFunction: null }, fieldsData: { classPropertyName: "fieldsData", publicName: "fieldsData", isSignal: true, isRequired: false, transformFunction: null }, fieldClass: { classPropertyName: "fieldClass", publicName: "fieldClass", isSignal: true, isRequired: false, transformFunction: null }, shouldRenderAsCheckBoxesButton: { classPropertyName: "shouldRenderAsCheckBoxesButton", publicName: "shouldRenderAsCheckBoxesButton", isSignal: true, isRequired: false, transformFunction: null }, programRuleActions: { classPropertyName: "programRuleActions", publicName: "programRuleActions", isSignal: true, isRequired: false, transformFunction: null }, dataEntities: { classPropertyName: "dataEntities", publicName: "dataEntities", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formUpdate: "formUpdate", formValidityUpdate: "formValidityUpdate" }, viewQueries: [{ propertyName: "fieldComponents", predicate: FormFieldComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form()\" class=\"{{ configuration().directionClassName }}\">\n <!-- form name -->\n <div class=\"form-name\">\n <h2>{{ configuration().formName }}</h2>\n </div>\n <div\n *ngFor=\"let field of sanitizedFields\"\n class=\"form-field-{{ configuration().direction }}\"\n >\n <ng-dhis2-ui-form-field\n [field]=\"field\"\n [fieldConfig]=\"configuration().fieldConfig\"\n [form]=\"form()\"\n [fieldClass]=\"fieldClass()\"\n [dataEntities]=\"dataEntities()\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [programRuleActions]=\"programRuleActions()\"\n [isCheckBoxButton]=\"shouldRenderAsCheckBoxesButton()\"\n (fieldUpdate)=\"onFieldUpdate($event, field)\"\n (runtimeOptionChange)=\"onRunTimeOptionUpdate($event)\"\n />\n </div>\n</form>\n", styles: [".form-horizontal{display:flex;flex-wrap:wrap;gap:16px;width:100%}.hidden-field{display:none}.units-and-ranges span{margin-left:1%;font-weight:600}.for-warning{margin-left:8px}.form-field-vertical{margin-bottom:8px}.form-field-horizontal{flex:1;margin-bottom:8px;width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "ng-dhis2-ui-form-field", inputs: ["field", "fieldConfig", "form", "isCheckBoxButton", "fieldClass", "programRuleActions", "dataEntities", "minDate", "maxDate", "dataId", "customOrgUnitRoots"], outputs: ["fieldUpdate", "immediateFieldUpdate", "runtimeOptionChange"] }] }); }
|
|
7010
7189
|
}
|
|
7011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormComponent, decorators: [{
|
|
7012
7191
|
type: Component,
|
|
7013
7192
|
args: [{ selector: 'ng-dhis2-ui-form', standalone: false, template: "<form [formGroup]=\"form()\" class=\"{{ configuration().directionClassName }}\">\n <!-- form name -->\n <div class=\"form-name\">\n <h2>{{ configuration().formName }}</h2>\n </div>\n <div\n *ngFor=\"let field of sanitizedFields\"\n class=\"form-field-{{ configuration().direction }}\"\n >\n <ng-dhis2-ui-form-field\n [field]=\"field\"\n [fieldConfig]=\"configuration().fieldConfig\"\n [form]=\"form()\"\n [fieldClass]=\"fieldClass()\"\n [dataEntities]=\"dataEntities()\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [programRuleActions]=\"programRuleActions()\"\n [isCheckBoxButton]=\"shouldRenderAsCheckBoxesButton()\"\n (fieldUpdate)=\"onFieldUpdate($event, field)\"\n (runtimeOptionChange)=\"onRunTimeOptionUpdate($event)\"\n />\n </div>\n</form>\n", styles: [".form-horizontal{display:flex;flex-wrap:wrap;gap:16px;width:100%}.hidden-field{display:none}.units-and-ranges span{margin-left:1%;font-weight:600}.for-warning{margin-left:8px}.form-field-vertical{margin-bottom:8px}.form-field-horizontal{flex:1;margin-bottom:8px;width:100%}\n"] }]
|
|
7014
7193
|
}], ctorParameters: () => [], propDecorators: { formUpdate: [{
|
|
@@ -7026,15 +7205,15 @@ class RepeatableFormComponent {
|
|
|
7026
7205
|
#events$;
|
|
7027
7206
|
constructor() {
|
|
7028
7207
|
this.ngZone = inject(NgZone);
|
|
7029
|
-
this.fieldGroup = input.required();
|
|
7030
|
-
this.events = model();
|
|
7031
|
-
this.dataEntities = input.required();
|
|
7208
|
+
this.fieldGroup = input.required(...(ngDevMode ? [{ debugName: "fieldGroup" }] : []));
|
|
7209
|
+
this.events = model(...(ngDevMode ? [undefined, { debugName: "events" }] : []));
|
|
7210
|
+
this.dataEntities = input.required(...(ngDevMode ? [{ debugName: "dataEntities" }] : []));
|
|
7032
7211
|
this.repeatableEvents = [];
|
|
7033
7212
|
this.repeatableData = {};
|
|
7034
7213
|
this.repeatableStageUpdate = new EventEmitter();
|
|
7035
|
-
this.eventFormValue = signal(null);
|
|
7036
|
-
this.showForm = signal(false);
|
|
7037
|
-
this.eventIndex = signal(0);
|
|
7214
|
+
this.eventFormValue = signal(null, ...(ngDevMode ? [{ debugName: "eventFormValue" }] : []));
|
|
7215
|
+
this.showForm = signal(false, ...(ngDevMode ? [{ debugName: "showForm" }] : []));
|
|
7216
|
+
this.eventIndex = signal(0, ...(ngDevMode ? [{ debugName: "eventIndex" }] : []));
|
|
7038
7217
|
this.#eventFormValue$ = toObservable(this.eventFormValue);
|
|
7039
7218
|
this.#showForm$ = toObservable(this.showForm);
|
|
7040
7219
|
this.#events$ = toObservable(this.events);
|
|
@@ -7069,10 +7248,10 @@ class RepeatableFormComponent {
|
|
|
7069
7248
|
[this.eventIndex()]: formValue,
|
|
7070
7249
|
};
|
|
7071
7250
|
}
|
|
7072
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7073
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
7251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: RepeatableFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: RepeatableFormComponent, isStandalone: false, selector: "ng-dhis2-ui-repeatable-form", inputs: { formObject: { classPropertyName: "formObject", publicName: "formObject", isSignal: false, isRequired: false, transformFunction: null }, formData: { classPropertyName: "formData", publicName: "formData", isSignal: false, isRequired: false, transformFunction: null }, fieldGroup: { classPropertyName: "fieldGroup", publicName: "fieldGroup", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: false, isRequired: false, transformFunction: null }, numberOfRows: { classPropertyName: "numberOfRows", publicName: "numberOfRows", isSignal: false, isRequired: false, transformFunction: null }, programRuleActions: { classPropertyName: "programRuleActions", publicName: "programRuleActions", isSignal: false, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, program: { classPropertyName: "program", publicName: "program", isSignal: false, isRequired: false, transformFunction: null }, programStage: { classPropertyName: "programStage", publicName: "programStage", isSignal: false, isRequired: false, transformFunction: null }, repeatDependentField: { classPropertyName: "repeatDependentField", publicName: "repeatDependentField", isSignal: false, isRequired: false, transformFunction: null }, dataEntities: { classPropertyName: "dataEntities", publicName: "dataEntities", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { events: "eventsChange", repeatableStageUpdate: "repeatableStageUpdate" }, ngImport: i0, template: "<div class=\"form__repeatable-stage-container\">\n <!-- <ng-dhis2-ui-wrapper [component]=\"EventTable()\"></ng-dhis2-ui-wrapper> -->\n @if(showForm()) {\n <div class=\"form__repeatable-stage-form\">\n <ng-dhis2-ui-form\n [fields]=\"fieldGroup().fields || []\"\n [form]=\"eventForm\"\n [programRuleActions]=\"programRuleActions\"\n [dataEntities]=\"{}\"\n [isFormHorizontal]=\"false\"\n (formUpdate)=\"onFormUpdate($event)\"\n >\n </ng-dhis2-ui-form>\n\n <!-- <ng-dhis2-ui-wrapper [component]=\"FormActionButtons\"></ng-dhis2-ui-wrapper> -->\n </div>\n }\n</div>\n", styles: [".form__repeatable-stage-container{margin-top:16px}.form__repeatable-stage-form{border:solid 1px rgb(232,237,242);border-top-style:none;background-color:#fff;padding:16px}\n"], dependencies: [{ kind: "component", type: FormComponent, selector: "ng-dhis2-ui-form", inputs: ["formConfig", "fields", "form", "isFormHorizontal", "showSaveButton", "fieldsData", "fieldClass", "shouldRenderAsCheckBoxesButton", "programRuleActions", "dataEntities", "dataId", "customOrgUnitRoots"], outputs: ["formUpdate", "formValidityUpdate"] }] }); }
|
|
7074
7253
|
}
|
|
7075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: RepeatableFormComponent, decorators: [{
|
|
7076
7255
|
type: Component,
|
|
7077
7256
|
args: [{ selector: 'ng-dhis2-ui-repeatable-form', standalone: false, template: "<div class=\"form__repeatable-stage-container\">\n <!-- <ng-dhis2-ui-wrapper [component]=\"EventTable()\"></ng-dhis2-ui-wrapper> -->\n @if(showForm()) {\n <div class=\"form__repeatable-stage-form\">\n <ng-dhis2-ui-form\n [fields]=\"fieldGroup().fields || []\"\n [form]=\"eventForm\"\n [programRuleActions]=\"programRuleActions\"\n [dataEntities]=\"{}\"\n [isFormHorizontal]=\"false\"\n (formUpdate)=\"onFormUpdate($event)\"\n >\n </ng-dhis2-ui-form>\n\n <!-- <ng-dhis2-ui-wrapper [component]=\"FormActionButtons\"></ng-dhis2-ui-wrapper> -->\n </div>\n }\n</div>\n", styles: [".form__repeatable-stage-container{margin-top:16px}.form__repeatable-stage-form{border:solid 1px rgb(232,237,242);border-top-style:none;background-color:#fff;padding:16px}\n"] }]
|
|
7078
7257
|
}], ctorParameters: () => [], propDecorators: { formObject: [{
|
|
@@ -7099,18 +7278,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7099
7278
|
class SectionFormComponent {
|
|
7100
7279
|
constructor() {
|
|
7101
7280
|
this.ngZone = inject(NgZone);
|
|
7102
|
-
this.loading = input();
|
|
7103
|
-
this.formMetaData = input.required();
|
|
7104
|
-
this.dataValueEntities = input.required();
|
|
7281
|
+
this.loading = input(...(ngDevMode ? [undefined, { debugName: "loading" }] : []));
|
|
7282
|
+
this.formMetaData = input.required(...(ngDevMode ? [{ debugName: "formMetaData" }] : []));
|
|
7283
|
+
this.dataValueEntities = input.required(...(ngDevMode ? [{ debugName: "dataValueEntities" }] : []));
|
|
7105
7284
|
this.formGroups = {};
|
|
7106
7285
|
this.formValueEntity = {};
|
|
7107
7286
|
this.repeatableFormValueEntity = {};
|
|
7108
|
-
this.ruleActions = signal([]);
|
|
7287
|
+
this.ruleActions = signal([], ...(ngDevMode ? [{ debugName: "ruleActions" }] : []));
|
|
7109
7288
|
this.save = new EventEmitter();
|
|
7110
7289
|
this.formUpdate = new EventEmitter();
|
|
7111
7290
|
this.cancel = new EventEmitter();
|
|
7112
7291
|
this.formValidityUpdate = new EventEmitter();
|
|
7113
|
-
this.inValid = signal(true);
|
|
7292
|
+
this.inValid = signal(true, ...(ngDevMode ? [{ debugName: "inValid" }] : []));
|
|
7114
7293
|
this.inValid$ = toObservable(this.inValid);
|
|
7115
7294
|
}
|
|
7116
7295
|
ngOnInit() {
|
|
@@ -7197,10 +7376,10 @@ class SectionFormComponent {
|
|
|
7197
7376
|
.some((validity) => !validity);
|
|
7198
7377
|
return valueValidity || repeatableDataValidity;
|
|
7199
7378
|
}
|
|
7200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7201
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
7379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SectionFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7380
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SectionFormComponent, isStandalone: false, selector: "ng-dhis2-ui-section-form", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, formMetaData: { classPropertyName: "formMetaData", publicName: "formMetaData", isSignal: true, isRequired: true, transformFunction: null }, dataValueEntities: { classPropertyName: "dataValueEntities", publicName: "dataValueEntities", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { save: "save", formUpdate: "formUpdate", cancel: "cancel", formValidityUpdate: "formValidityUpdate" }, ngImport: i0, template: "<ng-container *ngIf=\"formMetaData()\">\n <ng-container *ngFor=\"let formSection of formMetaData().sections\">\n @if(formSection?.name; as sectionName) {\n <div class=\"form__section-name\">\n {{ sectionName }}\n </div>\n }\n <div class=\"form__section-content\">\n <ng-container *ngIf=\"formSection\">\n <div *ngFor=\"let fieldGroup of formSection?.fieldGroups\">\n <ng-container *ngIf=\"formGroups[fieldGroup.id] as formGroup\">\n <div\n *ngIf=\"fieldGroup.name && !fieldGroup.repeatableStage\"\n class=\"form__field-group-name\"\n >\n {{ fieldGroup?.name }}\n </div>\n <div *ngIf=\"fieldGroup.fields\">\n <!-- Single stage form section -->\n <ng-container *ngIf=\"!fieldGroup.repeatableStage\">\n <ng-dhis2-ui-form\n *ngIf=\"fieldGroup.fields.length > 0\"\n [fields]=\"fieldGroup.fields\"\n [form]=\"formGroup\"\n [dataEntities]=\"dataValueEntities()\"\n [programRuleActions]=\"ruleActions()\"\n [isFormHorizontal]=\"fieldGroup.isFormHorizontal || false\"\n (formUpdate)=\"onFormUpdate($event, fieldGroup.id)\"\n ></ng-dhis2-ui-form>\n </ng-container>\n\n <!-- Repeatable stage form section -->\n <ng-container *ngIf=\"fieldGroup.repeatableStage\">\n @if(fieldGroup.repeatDependentField) {\n\n <ng-container *ngIf=\"fieldGroup.repeatDependentField\">\n <ng-container\n *ngIf=\"{\n numberOfRows:\n dataValueEntities()[fieldGroup.repeatDependentField]\n } as dataParams\"\n >\n <ng-dhis2-ui-repeatable-form\n *ngIf=\"\n dataParams.numberOfRows &&\n dataParams.numberOfRows !== '0'\n \"\n [fieldGroup]=\"fieldGroup\"\n [dataEntities]=\"dataValueEntities()\"\n [form]=\"formGroup\"\n [program]=\"formSection.program || ''\"\n [programStage]=\"fieldGroup.repeatableStage\"\n [programRuleActions]=\"ruleActions()\"\n [numberOfRows]=\"+dataParams.numberOfRows\"\n [repeatDependentField]=\"\n fieldGroup.repeatDependentField || ''\n \"\n [events]=\"dataValueEntities()[fieldGroup.dataKey!]\"\n (repeatableStageUpdate)=\"\n onUpdateRepeatableStage($event, fieldGroup)\n \"\n ></ng-dhis2-ui-repeatable-form\n ></ng-container>\n </ng-container>\n } @else {\n <ng-dhis2-ui-repeatable-form\n [fieldGroup]=\"fieldGroup\"\n [dataEntities]=\"dataValueEntities()\"\n [form]=\"formGroup\"\n [program]=\"formSection.program || ''\"\n [programStage]=\"fieldGroup.repeatableStage\"\n [programRuleActions]=\"ruleActions()\"\n [numberOfRows]=\"1\"\n [repeatDependentField]=\"fieldGroup.repeatDependentField || ''\"\n [events]=\"dataValueEntities()[fieldGroup.dataKey!]\"\n (repeatableStageUpdate)=\"\n onUpdateRepeatableStage($event, fieldGroup)\n \"\n ></ng-dhis2-ui-repeatable-form>\n }\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".form__section-name{font-size:16px;font-weight:600;margin-bottom:16px}.form__section-content{margin-bottom:24px}.form__field-group-name{font-size:14px;font-weight:500;padding-bottom:8px;border-bottom:solid 1px rgb(232,237,242);margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FormComponent, selector: "ng-dhis2-ui-form", inputs: ["formConfig", "fields", "form", "isFormHorizontal", "showSaveButton", "fieldsData", "fieldClass", "shouldRenderAsCheckBoxesButton", "programRuleActions", "dataEntities", "dataId", "customOrgUnitRoots"], outputs: ["formUpdate", "formValidityUpdate"] }, { kind: "component", type: RepeatableFormComponent, selector: "ng-dhis2-ui-repeatable-form", inputs: ["formObject", "formData", "fieldGroup", "form", "numberOfRows", "programRuleActions", "events", "program", "programStage", "repeatDependentField", "dataEntities"], outputs: ["eventsChange", "repeatableStageUpdate"] }] }); }
|
|
7202
7381
|
}
|
|
7203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SectionFormComponent, decorators: [{
|
|
7204
7383
|
type: Component,
|
|
7205
7384
|
args: [{ selector: 'ng-dhis2-ui-section-form', standalone: false, template: "<ng-container *ngIf=\"formMetaData()\">\n <ng-container *ngFor=\"let formSection of formMetaData().sections\">\n @if(formSection?.name; as sectionName) {\n <div class=\"form__section-name\">\n {{ sectionName }}\n </div>\n }\n <div class=\"form__section-content\">\n <ng-container *ngIf=\"formSection\">\n <div *ngFor=\"let fieldGroup of formSection?.fieldGroups\">\n <ng-container *ngIf=\"formGroups[fieldGroup.id] as formGroup\">\n <div\n *ngIf=\"fieldGroup.name && !fieldGroup.repeatableStage\"\n class=\"form__field-group-name\"\n >\n {{ fieldGroup?.name }}\n </div>\n <div *ngIf=\"fieldGroup.fields\">\n <!-- Single stage form section -->\n <ng-container *ngIf=\"!fieldGroup.repeatableStage\">\n <ng-dhis2-ui-form\n *ngIf=\"fieldGroup.fields.length > 0\"\n [fields]=\"fieldGroup.fields\"\n [form]=\"formGroup\"\n [dataEntities]=\"dataValueEntities()\"\n [programRuleActions]=\"ruleActions()\"\n [isFormHorizontal]=\"fieldGroup.isFormHorizontal || false\"\n (formUpdate)=\"onFormUpdate($event, fieldGroup.id)\"\n ></ng-dhis2-ui-form>\n </ng-container>\n\n <!-- Repeatable stage form section -->\n <ng-container *ngIf=\"fieldGroup.repeatableStage\">\n @if(fieldGroup.repeatDependentField) {\n\n <ng-container *ngIf=\"fieldGroup.repeatDependentField\">\n <ng-container\n *ngIf=\"{\n numberOfRows:\n dataValueEntities()[fieldGroup.repeatDependentField]\n } as dataParams\"\n >\n <ng-dhis2-ui-repeatable-form\n *ngIf=\"\n dataParams.numberOfRows &&\n dataParams.numberOfRows !== '0'\n \"\n [fieldGroup]=\"fieldGroup\"\n [dataEntities]=\"dataValueEntities()\"\n [form]=\"formGroup\"\n [program]=\"formSection.program || ''\"\n [programStage]=\"fieldGroup.repeatableStage\"\n [programRuleActions]=\"ruleActions()\"\n [numberOfRows]=\"+dataParams.numberOfRows\"\n [repeatDependentField]=\"\n fieldGroup.repeatDependentField || ''\n \"\n [events]=\"dataValueEntities()[fieldGroup.dataKey!]\"\n (repeatableStageUpdate)=\"\n onUpdateRepeatableStage($event, fieldGroup)\n \"\n ></ng-dhis2-ui-repeatable-form\n ></ng-container>\n </ng-container>\n } @else {\n <ng-dhis2-ui-repeatable-form\n [fieldGroup]=\"fieldGroup\"\n [dataEntities]=\"dataValueEntities()\"\n [form]=\"formGroup\"\n [program]=\"formSection.program || ''\"\n [programStage]=\"fieldGroup.repeatableStage\"\n [programRuleActions]=\"ruleActions()\"\n [numberOfRows]=\"1\"\n [repeatDependentField]=\"fieldGroup.repeatDependentField || ''\"\n [events]=\"dataValueEntities()[fieldGroup.dataKey!]\"\n (repeatableStageUpdate)=\"\n onUpdateRepeatableStage($event, fieldGroup)\n \"\n ></ng-dhis2-ui-repeatable-form>\n }\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".form__section-name{font-size:16px;font-weight:600;margin-bottom:16px}.form__section-content{margin-bottom:24px}.form__field-group-name{font-size:14px;font-weight:500;padding-bottom:8px;border-bottom:solid 1px rgb(232,237,242);margin-bottom:16px}\n"] }]
|
|
7206
7385
|
}], ctorParameters: () => [], propDecorators: { save: [{
|
|
@@ -7220,15 +7399,15 @@ class BaseFormWrapperComponent {
|
|
|
7220
7399
|
#updatedDataValues;
|
|
7221
7400
|
constructor() {
|
|
7222
7401
|
this.ngZone = inject(NgZone);
|
|
7223
|
-
this.name = input();
|
|
7224
|
-
this.fields = input.required();
|
|
7225
|
-
this.rules = input([]);
|
|
7226
|
-
this.dataValues = input({});
|
|
7227
|
-
this.dataId = input();
|
|
7228
|
-
this.customOrgUnitRoots = input();
|
|
7229
|
-
this.ruleActions = signal([]);
|
|
7230
|
-
this.isFormValid = signal(true);
|
|
7231
|
-
this.#updatedDataValues = signal({});
|
|
7402
|
+
this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
|
|
7403
|
+
this.fields = input.required(...(ngDevMode ? [{ debugName: "fields" }] : []));
|
|
7404
|
+
this.rules = input([], ...(ngDevMode ? [{ debugName: "rules" }] : []));
|
|
7405
|
+
this.dataValues = input({}, ...(ngDevMode ? [{ debugName: "dataValues" }] : []));
|
|
7406
|
+
this.dataId = input(...(ngDevMode ? [undefined, { debugName: "dataId" }] : []));
|
|
7407
|
+
this.customOrgUnitRoots = input(...(ngDevMode ? [undefined, { debugName: "customOrgUnitRoots" }] : []));
|
|
7408
|
+
this.ruleActions = signal([], ...(ngDevMode ? [{ debugName: "ruleActions" }] : []));
|
|
7409
|
+
this.isFormValid = signal(true, ...(ngDevMode ? [{ debugName: "isFormValid" }] : []));
|
|
7410
|
+
this.#updatedDataValues = signal({}, ...(ngDevMode ? [{ debugName: "#updatedDataValues" }] : []));
|
|
7232
7411
|
this.formSave = new EventEmitter();
|
|
7233
7412
|
this.formUpdate = new EventEmitter();
|
|
7234
7413
|
this.formCancel = new EventEmitter();
|
|
@@ -7237,7 +7416,7 @@ class BaseFormWrapperComponent {
|
|
|
7237
7416
|
if (this.#updatedDataValues()) {
|
|
7238
7417
|
this.executeRules();
|
|
7239
7418
|
}
|
|
7240
|
-
});
|
|
7419
|
+
}, ...(ngDevMode ? [{ debugName: "ruleProcessor" }] : []));
|
|
7241
7420
|
}
|
|
7242
7421
|
updateDataValues(dataValues) {
|
|
7243
7422
|
this.#updatedDataValues.set(dataValues);
|
|
@@ -7256,10 +7435,10 @@ class BaseFormWrapperComponent {
|
|
|
7256
7435
|
ngOnDestroy() {
|
|
7257
7436
|
this.ruleProcessor.destroy();
|
|
7258
7437
|
}
|
|
7259
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7260
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
7438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7439
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: BaseFormWrapperComponent, isStandalone: true, inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, rules: { classPropertyName: "rules", publicName: "rules", isSignal: true, isRequired: false, transformFunction: null }, dataValues: { classPropertyName: "dataValues", publicName: "dataValues", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formSave: "formSave", formUpdate: "formUpdate", formCancel: "formCancel", formValidityUpdate: "formValidityUpdate" }, ngImport: i0 }); }
|
|
7261
7440
|
}
|
|
7262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormWrapperComponent, decorators: [{
|
|
7263
7442
|
type: Directive
|
|
7264
7443
|
}], ctorParameters: () => [], propDecorators: { formSave: [{
|
|
7265
7444
|
type: Output
|
|
@@ -7288,17 +7467,17 @@ class FlatFormComponent extends BaseFormWrapperComponent {
|
|
|
7288
7467
|
this.updateDataValues(this.formGroup.getRawValue());
|
|
7289
7468
|
this.updateFormValidity(this.formGroup.valid);
|
|
7290
7469
|
}
|
|
7291
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7292
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
7470
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FlatFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7471
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: FlatFormComponent, isStandalone: false, selector: "ng-dhis2-ui-flat-form", usesInheritance: true, ngImport: i0, template: "<ng-dhis2-ui-form\n [fields]=\"fields()\"\n [form]=\"formGroup\"\n [dataEntities]=\"dataValues()\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [programRuleActions]=\"ruleActions()\"\n (formUpdate)=\"onFormUpdate()\"\n/>\n", dependencies: [{ kind: "component", type: FormComponent, selector: "ng-dhis2-ui-form", inputs: ["formConfig", "fields", "form", "isFormHorizontal", "showSaveButton", "fieldsData", "fieldClass", "shouldRenderAsCheckBoxesButton", "programRuleActions", "dataEntities", "dataId", "customOrgUnitRoots"], outputs: ["formUpdate", "formValidityUpdate"] }] }); }
|
|
7293
7472
|
}
|
|
7294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FlatFormComponent, decorators: [{
|
|
7295
7474
|
type: Component,
|
|
7296
7475
|
args: [{ selector: 'ng-dhis2-ui-flat-form', standalone: false, template: "<ng-dhis2-ui-form\n [fields]=\"fields()\"\n [form]=\"formGroup\"\n [dataEntities]=\"dataValues()\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [programRuleActions]=\"ruleActions()\"\n (formUpdate)=\"onFormUpdate()\"\n/>\n" }]
|
|
7297
7476
|
}] });
|
|
7298
7477
|
|
|
7299
7478
|
class D2FormModule {
|
|
7300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7301
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7479
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: D2FormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7480
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: D2FormModule, declarations: [FormFieldComponent,
|
|
7302
7481
|
FormComponent,
|
|
7303
7482
|
RepeatableFormComponent,
|
|
7304
7483
|
SectionFormComponent,
|
|
@@ -7311,11 +7490,11 @@ class D2FormModule {
|
|
|
7311
7490
|
RepeatableFormComponent,
|
|
7312
7491
|
SectionFormComponent,
|
|
7313
7492
|
FlatFormComponent] }); }
|
|
7314
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
7493
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: D2FormModule, imports: [CommonModule,
|
|
7315
7494
|
ReactiveFormsModule,
|
|
7316
7495
|
OrganisationUnitSelectorModule] }); }
|
|
7317
7496
|
}
|
|
7318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: D2FormModule, decorators: [{
|
|
7319
7498
|
type: NgModule,
|
|
7320
7499
|
args: [{
|
|
7321
7500
|
declarations: [
|
|
@@ -7385,22 +7564,38 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7385
7564
|
subscription.unsubscribe(); // Cleanup to avoid memory leaks
|
|
7386
7565
|
};
|
|
7387
7566
|
}, []);
|
|
7388
|
-
return config
|
|
7389
|
-
React__default.createElement(
|
|
7390
|
-
|
|
7391
|
-
|
|
7567
|
+
return config
|
|
7568
|
+
? React__default.createElement(Provider, {
|
|
7569
|
+
config: config,
|
|
7570
|
+
plugin: false,
|
|
7571
|
+
parentAlertsAdd: undefined,
|
|
7572
|
+
showAlertsInPlugin: false,
|
|
7573
|
+
children: React__default.createElement(Modal$1, { position: 'middle', large: true }, React__default.createElement(ModalTitle$1, null, 'Organisation unit'), React__default.createElement(ModalContent$1, null, React__default.createElement(OrgUnitDimension, {
|
|
7574
|
+
selected: selected,
|
|
7575
|
+
hideGroupSelect: this.orgUnitSelectionConfig.hideGroupSelect,
|
|
7576
|
+
hideLevelSelect: this.orgUnitSelectionConfig.hideLevelSelect,
|
|
7577
|
+
hideUserOrgUnits: this.orgUnitSelectionConfig.hideUserOrgUnits,
|
|
7578
|
+
onSelect: (selectionEvent) => {
|
|
7392
7579
|
setSelected(selectionEvent.items);
|
|
7393
|
-
},
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7580
|
+
},
|
|
7581
|
+
orgUnitGroupPromise: this.getOrgUnitGroups(),
|
|
7582
|
+
orgUnitLevelPromise: this.getOrgUnitLevels(),
|
|
7583
|
+
roots: rootOrgUnits,
|
|
7584
|
+
})), React__default.createElement(ModalActions$1, null, React__default.createElement(ButtonStrip$1, { end: true }, React__default.createElement(Button$1, {
|
|
7585
|
+
onClick: () => {
|
|
7586
|
+
onCancelOrgUnit();
|
|
7587
|
+
},
|
|
7588
|
+
}, 'Cancel'), React__default.createElement(Button$1, {
|
|
7589
|
+
primary: true,
|
|
7590
|
+
disabled: selected.length === 0,
|
|
7591
|
+
onClick: () => {
|
|
7592
|
+
onSelectOrgUnit(selected);
|
|
7593
|
+
},
|
|
7594
|
+
}, 'Confirm')))),
|
|
7595
|
+
})
|
|
7596
|
+
: React__default.createElement(CircularLoader$1, { small: true });
|
|
7402
7597
|
};
|
|
7403
|
-
this.showOrgUnitTree = signal(false);
|
|
7598
|
+
this.showOrgUnitTree = signal(false, ...(ngDevMode ? [{ debugName: "showOrgUnitTree" }] : []));
|
|
7404
7599
|
this.orgUnitSelectionConfig = {
|
|
7405
7600
|
hideGroupSelect: true,
|
|
7406
7601
|
hideLevelSelect: true,
|
|
@@ -7408,7 +7603,7 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7408
7603
|
allowSingleSelection: true,
|
|
7409
7604
|
usageType: 'DATA_ENTRY',
|
|
7410
7605
|
};
|
|
7411
|
-
this.selectedOrgUnit = signal(null);
|
|
7606
|
+
this.selectedOrgUnit = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrgUnit" }] : []));
|
|
7412
7607
|
this.selectedOrgUnit$ = toObservable(this.selectedOrgUnit);
|
|
7413
7608
|
this.SelectionFiltersUI = () => {
|
|
7414
7609
|
const [filters, setFilters] = useState({
|
|
@@ -7536,66 +7731,144 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7536
7731
|
}
|
|
7537
7732
|
return 'span 1';
|
|
7538
7733
|
};
|
|
7539
|
-
return
|
|
7734
|
+
return React__default.createElement('div', {
|
|
7735
|
+
style: {
|
|
7540
7736
|
fontFamily: 'Arial, sans-serif',
|
|
7541
7737
|
padding: '20px',
|
|
7542
7738
|
backgroundColor: '#f9f9f9',
|
|
7543
7739
|
borderRadius: '8px',
|
|
7544
7740
|
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
|
|
7545
|
-
}
|
|
7546
|
-
|
|
7741
|
+
},
|
|
7742
|
+
}, React__default.createElement('div', {
|
|
7743
|
+
style: {
|
|
7744
|
+
display: 'grid',
|
|
7745
|
+
gridTemplateColumns: '1fr 1fr 1fr auto', // Ensure proper button sizing
|
|
7746
|
+
gap: '16px',
|
|
7747
|
+
alignItems: 'center', // Align inputs and button on the same row
|
|
7748
|
+
marginBottom: '16px',
|
|
7749
|
+
},
|
|
7750
|
+
},
|
|
7751
|
+
/* Organization Unit Selector */
|
|
7752
|
+
React__default.createElement('div', { style: { width: '100%' } }, React__default.createElement(InputField$1, {
|
|
7753
|
+
value: displayValue,
|
|
7754
|
+
label: 'Organization Unit',
|
|
7755
|
+
readOnly: false,
|
|
7756
|
+
onFocus: () => setShowOrgUnit(true),
|
|
7757
|
+
onBlur: () => {
|
|
7758
|
+
setTouched(true);
|
|
7759
|
+
},
|
|
7760
|
+
}), showOrgUnit &&
|
|
7761
|
+
React__default.createElement(this.FieldOrgUnitSelector, {
|
|
7762
|
+
onCancelOrgUnit: () => {
|
|
7763
|
+
setShowOrgUnit(false);
|
|
7764
|
+
setTouched(true);
|
|
7765
|
+
},
|
|
7766
|
+
onSelectOrgUnit: (selectedOrgUnits) => {
|
|
7767
|
+
if ((selectedOrgUnits || [])[0]) {
|
|
7768
|
+
const selectedOrgUnit = selectedOrgUnits[0];
|
|
7769
|
+
setDisplayValue(selectedOrgUnit.name);
|
|
7770
|
+
setSelected(selectedOrgUnit.id);
|
|
7771
|
+
setSelectedOrganisationUnit(selectedOrgUnit.id);
|
|
7772
|
+
setValue(selectedOrgUnit.id);
|
|
7773
|
+
setShowOrgUnit(false);
|
|
7774
|
+
setTouched(true);
|
|
7775
|
+
}
|
|
7776
|
+
},
|
|
7777
|
+
})),
|
|
7778
|
+
/* Start Date */
|
|
7779
|
+
React__default.createElement(InputField$1, {
|
|
7780
|
+
className: 'input-field',
|
|
7781
|
+
label: 'Start Date',
|
|
7782
|
+
type: 'date',
|
|
7783
|
+
value: filters.startDate,
|
|
7784
|
+
onChange: (event) => setFilters({ ...filters, startDate: event.value }),
|
|
7785
|
+
}),
|
|
7786
|
+
/* End Date */
|
|
7787
|
+
React__default.createElement(InputField$1, {
|
|
7788
|
+
className: 'input-field',
|
|
7789
|
+
label: 'End Date',
|
|
7790
|
+
type: 'date',
|
|
7791
|
+
value: filters.endDate,
|
|
7792
|
+
onChange: (event) => setFilters({ ...filters, endDate: event.value }),
|
|
7793
|
+
}),
|
|
7794
|
+
/* Toggle Button with Hidden Label */
|
|
7795
|
+
React__default.createElement('div', {
|
|
7796
|
+
style: {
|
|
7797
|
+
display: 'flex',
|
|
7798
|
+
flexDirection: 'column',
|
|
7799
|
+
alignItems: 'center',
|
|
7800
|
+
justifyContent: 'center',
|
|
7801
|
+
height: '100%',
|
|
7802
|
+
},
|
|
7803
|
+
}, React__default.createElement('label', {
|
|
7804
|
+
style: {
|
|
7805
|
+
color: 'transparent', // Hides label text but keeps spacing
|
|
7806
|
+
fontSize: '14px',
|
|
7807
|
+
marginBottom: '4px',
|
|
7808
|
+
},
|
|
7809
|
+
}, 'Toggle'), React__default.createElement(Button$1, {
|
|
7810
|
+
style: { height: '40px' }, // Match input field height
|
|
7811
|
+
onClick: () => setShowMoreFilters(!showMoreFilters),
|
|
7812
|
+
}, showMoreFilters ? 'Hide Filters' : 'More Filters')), showMoreFilters &&
|
|
7813
|
+
React__default.createElement(React__default.Fragment, null,
|
|
7814
|
+
/* Attribute Filters Grid */
|
|
7815
|
+
React__default.createElement('div', {
|
|
7816
|
+
style: {
|
|
7547
7817
|
display: 'grid',
|
|
7548
|
-
gridTemplateColumns: '
|
|
7818
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
7549
7819
|
gap: '16px',
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7820
|
+
},
|
|
7821
|
+
}, filters.programAttributesFilters.map((filter, index) => React__default.createElement('div', {
|
|
7822
|
+
key: index,
|
|
7823
|
+
style: { gridColumn: getAttributeColumnSpan(index) },
|
|
7824
|
+
}, filter.hasOptions && filter.options.length > 0
|
|
7825
|
+
? React__default.createElement(SingleSelectField, {
|
|
7826
|
+
className: 'single-select',
|
|
7827
|
+
label: filter.name || 'Select Option',
|
|
7828
|
+
selected: filter.value,
|
|
7829
|
+
onChange: (event) => handleAttributeChange(index, event.selected),
|
|
7830
|
+
}, filter.options.map((option, i) => React__default.createElement(SingleSelectOption, {
|
|
7831
|
+
key: crypto.randomUUID() || i,
|
|
7832
|
+
label: option.name,
|
|
7833
|
+
value: option.code,
|
|
7834
|
+
})))
|
|
7835
|
+
: React__default.createElement(InputField$1, {
|
|
7836
|
+
className: 'input-field',
|
|
7837
|
+
label: filter.name || 'Program name',
|
|
7838
|
+
type: filter.valueType,
|
|
7839
|
+
value: filter.value,
|
|
7840
|
+
onChange: (event) => handleAttributeChange(index, event.value),
|
|
7841
|
+
})))),
|
|
7842
|
+
/* Data Element Filters Grid */
|
|
7843
|
+
React__default.createElement('div', {
|
|
7844
|
+
style: {
|
|
7845
|
+
display: 'grid',
|
|
7846
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
7847
|
+
gap: '16px',
|
|
7848
|
+
},
|
|
7849
|
+
}, filters.programStageDataElementFilters.map((filter, index) => React__default.createElement('div', {
|
|
7850
|
+
key: index,
|
|
7851
|
+
style: { gridColumn: getDataElementColumnSpan(index) },
|
|
7852
|
+
}, filter.hasOptions && filter.options.length > 0
|
|
7853
|
+
? React__default.createElement(SingleSelectField, {
|
|
7854
|
+
className: 'single-select',
|
|
7855
|
+
label: filter.name || 'Aggregation type',
|
|
7856
|
+
selected: filter.value,
|
|
7857
|
+
onChange: (event) => handleDataElementChange(index, event.selected),
|
|
7858
|
+
}, filter.options.map((option, i) => React__default.createElement(SingleSelectOption, {
|
|
7859
|
+
key: crypto.randomUUID() || i,
|
|
7860
|
+
label: option.name,
|
|
7861
|
+
value: option.code,
|
|
7862
|
+
})))
|
|
7863
|
+
: React__default.createElement(InputField$1, {
|
|
7864
|
+
className: 'input-field',
|
|
7865
|
+
type: filter.valueType,
|
|
7866
|
+
label: filter.name || 'Program name',
|
|
7867
|
+
value: filter.value,
|
|
7868
|
+
onChange: (event) => handleDataElementChange(index, event.value),
|
|
7869
|
+
})))),
|
|
7870
|
+
/* Search Button */
|
|
7871
|
+
React__default.createElement('div', { style: { textAlign: 'right', marginTop: '16px' } }, React__default.createElement(Button$1, { onClick: handleSearch }, 'Search')))));
|
|
7599
7872
|
};
|
|
7600
7873
|
}
|
|
7601
7874
|
async getAppConfig() {
|
|
@@ -7650,10 +7923,10 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7650
7923
|
this.component = this.SelectionFiltersUI;
|
|
7651
7924
|
this.render();
|
|
7652
7925
|
}
|
|
7653
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7654
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
7926
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7927
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: SelectionFiltersComponent, isStandalone: false, selector: "app-selection-filters-ui", inputs: { actionOptions: "actionOptions", programAttributesFilters: "programAttributesFilters", programStageDataElementFilters: "programStageDataElementFilters", startDate: "startDate", endDate: "endDate", program: "program", organisationUnit: "organisationUnit" }, outputs: { actionSelected: "actionSelected" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".react-filters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:20px}.input-field,.single-select{width:100%}\n"] }); }
|
|
7655
7928
|
}
|
|
7656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersComponent, decorators: [{
|
|
7657
7930
|
type: Component,
|
|
7658
7931
|
args: [{ selector: 'app-selection-filters-ui', template: '<ng-content></ng-content>', standalone: false, styles: [".react-filters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:20px}.input-field,.single-select{width:100%}\n"] }]
|
|
7659
7932
|
}], propDecorators: { actionOptions: [{
|
|
@@ -7675,11 +7948,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7675
7948
|
}] } });
|
|
7676
7949
|
|
|
7677
7950
|
class SelectionFiltersUiModule {
|
|
7678
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7679
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7680
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
7951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7952
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersUiModule, declarations: [SelectionFiltersComponent], imports: [CommonModule, SharedDhis2UiModule, ReactWrapperModule, OrganisationUnitSelectorModule], exports: [SelectionFiltersComponent] }); }
|
|
7953
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersUiModule, imports: [CommonModule, SharedDhis2UiModule, OrganisationUnitSelectorModule] }); }
|
|
7681
7954
|
}
|
|
7682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersUiModule, decorators: [{
|
|
7683
7956
|
type: NgModule,
|
|
7684
7957
|
args: [{
|
|
7685
7958
|
declarations: [SelectionFiltersComponent],
|
|
@@ -7690,9 +7963,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7690
7963
|
|
|
7691
7964
|
class TrackerFormComponent {
|
|
7692
7965
|
constructor() {
|
|
7693
|
-
this.program = input.required();
|
|
7694
|
-
this.programStage = input();
|
|
7695
|
-
this.trackedEntity = input();
|
|
7966
|
+
this.program = input.required(...(ngDevMode ? [{ debugName: "program" }] : []));
|
|
7967
|
+
this.programStage = input(...(ngDevMode ? [undefined, { debugName: "programStage" }] : []));
|
|
7968
|
+
this.trackedEntity = input(...(ngDevMode ? [undefined, { debugName: "trackedEntity" }] : []));
|
|
7696
7969
|
this.d2 = window.d2Web;
|
|
7697
7970
|
}
|
|
7698
7971
|
async ngOnInit() {
|
|
@@ -7718,20 +7991,20 @@ class TrackerFormComponent {
|
|
|
7718
7991
|
}
|
|
7719
7992
|
onSave(event) { }
|
|
7720
7993
|
onCancel() { }
|
|
7721
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7722
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
7994
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7995
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: TrackerFormComponent, isStandalone: false, selector: "ng-dhis2-ui-tracker-form", inputs: { program: { classPropertyName: "program", publicName: "program", isSignal: true, isRequired: true, transformFunction: null }, programStage: { classPropertyName: "programStage", publicName: "programStage", isSignal: true, isRequired: false, transformFunction: null }, trackedEntity: { classPropertyName: "trackedEntity", publicName: "trackedEntity", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(formMetaData) {\n<ng-dhis2-ui-section-form\n [formMetaData]=\"formMetaData\"\n [dataValueEntities]=\"instance\"\n (formUpdate)=\"onFormUpdate($event)\"\n (save)=\"onSave($event)\"\n (cancel)=\"onCancel()\"\n/>\n}\n", dependencies: [{ kind: "component", type: SectionFormComponent, selector: "ng-dhis2-ui-section-form", inputs: ["loading", "formMetaData", "dataValueEntities"], outputs: ["save", "formUpdate", "cancel", "formValidityUpdate"] }] }); }
|
|
7723
7996
|
}
|
|
7724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormComponent, decorators: [{
|
|
7725
7998
|
type: Component,
|
|
7726
7999
|
args: [{ selector: 'ng-dhis2-ui-tracker-form', standalone: false, template: "@if(formMetaData) {\n<ng-dhis2-ui-section-form\n [formMetaData]=\"formMetaData\"\n [dataValueEntities]=\"instance\"\n (formUpdate)=\"onFormUpdate($event)\"\n (save)=\"onSave($event)\"\n (cancel)=\"onCancel()\"\n/>\n}\n" }]
|
|
7727
8000
|
}] });
|
|
7728
8001
|
|
|
7729
8002
|
class TrackerFormModule {
|
|
7730
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7731
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7732
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
8003
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8004
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormModule, declarations: [TrackerFormComponent], imports: [CommonModule, D2FormModule], exports: [TrackerFormComponent] }); }
|
|
8005
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormModule, imports: [CommonModule, D2FormModule] }); }
|
|
7733
8006
|
}
|
|
7734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormModule, decorators: [{
|
|
7735
8008
|
type: NgModule,
|
|
7736
8009
|
args: [{
|
|
7737
8010
|
imports: [CommonModule, D2FormModule],
|
|
@@ -7746,11 +8019,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7746
8019
|
|
|
7747
8020
|
class EventFormComponent {
|
|
7748
8021
|
constructor() {
|
|
7749
|
-
this.program = input.required();
|
|
7750
|
-
this.programStage = input.required();
|
|
7751
|
-
this.eventId = input();
|
|
7752
|
-
this.enrollment = input();
|
|
7753
|
-
this.trackedEntity = input();
|
|
8022
|
+
this.program = input.required(...(ngDevMode ? [{ debugName: "program" }] : []));
|
|
8023
|
+
this.programStage = input.required(...(ngDevMode ? [{ debugName: "programStage" }] : []));
|
|
8024
|
+
this.eventId = input(...(ngDevMode ? [undefined, { debugName: "eventId" }] : []));
|
|
8025
|
+
this.enrollment = input(...(ngDevMode ? [undefined, { debugName: "enrollment" }] : []));
|
|
8026
|
+
this.trackedEntity = input(...(ngDevMode ? [undefined, { debugName: "trackedEntity" }] : []));
|
|
7754
8027
|
this.d2 = window.d2Web;
|
|
7755
8028
|
}
|
|
7756
8029
|
async ngOnInit() {
|
|
@@ -7777,20 +8050,20 @@ class EventFormComponent {
|
|
|
7777
8050
|
}
|
|
7778
8051
|
onSave(event) { }
|
|
7779
8052
|
onCancel() { }
|
|
7780
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7781
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
8053
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8054
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: EventFormComponent, isStandalone: false, selector: "ng-dhis2-ui-event-form", inputs: { program: { classPropertyName: "program", publicName: "program", isSignal: true, isRequired: true, transformFunction: null }, programStage: { classPropertyName: "programStage", publicName: "programStage", isSignal: true, isRequired: true, transformFunction: null }, eventId: { classPropertyName: "eventId", publicName: "eventId", isSignal: true, isRequired: false, transformFunction: null }, enrollment: { classPropertyName: "enrollment", publicName: "enrollment", isSignal: true, isRequired: false, transformFunction: null }, trackedEntity: { classPropertyName: "trackedEntity", publicName: "trackedEntity", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(formMetaData) {\n<ng-dhis2-ui-section-form\n [formMetaData]=\"formMetaData\"\n [dataValueEntities]=\"instance\"\n (formUpdate)=\"onFormUpdate($event)\"\n (save)=\"onSave($event)\"\n (cancel)=\"onCancel()\"\n/>\n}\n", dependencies: [{ kind: "component", type: SectionFormComponent, selector: "ng-dhis2-ui-section-form", inputs: ["loading", "formMetaData", "dataValueEntities"], outputs: ["save", "formUpdate", "cancel", "formValidityUpdate"] }] }); }
|
|
7782
8055
|
}
|
|
7783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormComponent, decorators: [{
|
|
7784
8057
|
type: Component,
|
|
7785
8058
|
args: [{ selector: 'ng-dhis2-ui-event-form', standalone: false, template: "@if(formMetaData) {\n<ng-dhis2-ui-section-form\n [formMetaData]=\"formMetaData\"\n [dataValueEntities]=\"instance\"\n (formUpdate)=\"onFormUpdate($event)\"\n (save)=\"onSave($event)\"\n (cancel)=\"onCancel()\"\n/>\n}\n" }]
|
|
7786
8059
|
}] });
|
|
7787
8060
|
|
|
7788
8061
|
class EventFormModule {
|
|
7789
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7790
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7791
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
8062
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8063
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: EventFormModule, declarations: [EventFormComponent], imports: [CommonModule, D2FormModule], exports: [EventFormComponent] }); }
|
|
8064
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormModule, imports: [CommonModule, D2FormModule] }); }
|
|
7792
8065
|
}
|
|
7793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormModule, decorators: [{
|
|
7794
8067
|
type: NgModule,
|
|
7795
8068
|
args: [{
|
|
7796
8069
|
imports: [CommonModule, D2FormModule],
|
|
@@ -8174,19 +8447,19 @@ class ProgramEntryFormSection {
|
|
|
8174
8447
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
8175
8448
|
class ProgramEntryFormModule {
|
|
8176
8449
|
constructor() {
|
|
8177
|
-
this.config = input.required();
|
|
8178
|
-
this.trackedEntity = input();
|
|
8179
|
-
this.event = input();
|
|
8180
|
-
this.enrollment = input();
|
|
8181
|
-
this.orgUnit = input();
|
|
8182
|
-
this.customOrgUnitRoots = input();
|
|
8450
|
+
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
8451
|
+
this.trackedEntity = input(...(ngDevMode ? [undefined, { debugName: "trackedEntity" }] : []));
|
|
8452
|
+
this.event = input(...(ngDevMode ? [undefined, { debugName: "event" }] : []));
|
|
8453
|
+
this.enrollment = input(...(ngDevMode ? [undefined, { debugName: "enrollment" }] : []));
|
|
8454
|
+
this.orgUnit = input(...(ngDevMode ? [undefined, { debugName: "orgUnit" }] : []));
|
|
8455
|
+
this.customOrgUnitRoots = input(...(ngDevMode ? [undefined, { debugName: "customOrgUnitRoots" }] : []));
|
|
8183
8456
|
this.ngZone = inject(NgZone);
|
|
8184
8457
|
this.d2 = window.d2Web;
|
|
8185
|
-
this.loading = signal(false);
|
|
8186
|
-
this.metaData = signal(null);
|
|
8187
|
-
this.isFormValid = signal(true);
|
|
8458
|
+
this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
8459
|
+
this.metaData = signal(null, ...(ngDevMode ? [{ debugName: "metaData" }] : []));
|
|
8460
|
+
this.isFormValid = signal(true, ...(ngDevMode ? [{ debugName: "isFormValid" }] : []));
|
|
8188
8461
|
this.isFormValid$ = toObservable(this.isFormValid);
|
|
8189
|
-
this.instance = signal(null);
|
|
8462
|
+
this.instance = signal(null, ...(ngDevMode ? [{ debugName: "instance" }] : []));
|
|
8190
8463
|
this.instanceSave = new EventEmitter();
|
|
8191
8464
|
this.instanceSaveCompleted = new EventEmitter();
|
|
8192
8465
|
this.instanceUpdate = new EventEmitter();
|
|
@@ -8195,9 +8468,18 @@ class ProgramEntryFormModule {
|
|
|
8195
8468
|
this.FormLoader = () => {
|
|
8196
8469
|
return React__default.createElement(CircularLoader$1, { small: true });
|
|
8197
8470
|
};
|
|
8471
|
+
// dataId = computed(() => {
|
|
8472
|
+
// return this.instance()?.trackedEntity || this.instance()?.event;
|
|
8473
|
+
// });
|
|
8198
8474
|
this.dataId = computed(() => {
|
|
8199
|
-
|
|
8200
|
-
|
|
8475
|
+
if (this.config().formType === 'EVENT') {
|
|
8476
|
+
return this.instance()?.event;
|
|
8477
|
+
}
|
|
8478
|
+
if (this.config().formType === 'TRACKER') {
|
|
8479
|
+
return this.instance()?.trackedEntity;
|
|
8480
|
+
}
|
|
8481
|
+
return undefined;
|
|
8482
|
+
}, ...(ngDevMode ? [{ debugName: "dataId" }] : []));
|
|
8201
8483
|
this.FormActionButtons = computed(() => {
|
|
8202
8484
|
if (this.config().hideActionButtons) {
|
|
8203
8485
|
return React__default.createElement(React__default.Fragment, null);
|
|
@@ -8229,7 +8511,7 @@ class ProgramEntryFormModule {
|
|
|
8229
8511
|
});
|
|
8230
8512
|
} }, this.config().cancelButtonLabel))));
|
|
8231
8513
|
};
|
|
8232
|
-
});
|
|
8514
|
+
}, ...(ngDevMode ? [{ debugName: "FormActionButtons" }] : []));
|
|
8233
8515
|
}
|
|
8234
8516
|
async ngOnInit() {
|
|
8235
8517
|
this.loading.set(true);
|
|
@@ -8351,10 +8633,10 @@ class ProgramEntryFormModule {
|
|
|
8351
8633
|
return firstValueFrom(of(null));
|
|
8352
8634
|
}
|
|
8353
8635
|
}
|
|
8354
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8355
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
8636
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ProgramEntryFormModule, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8637
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: ProgramEntryFormModule, isStandalone: true, selector: "ng-dhis2-ui-program-entry-form", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, trackedEntity: { classPropertyName: "trackedEntity", publicName: "trackedEntity", isSignal: true, isRequired: false, transformFunction: null }, event: { classPropertyName: "event", publicName: "event", isSignal: true, isRequired: false, transformFunction: null }, enrollment: { classPropertyName: "enrollment", publicName: "enrollment", isSignal: true, isRequired: false, transformFunction: null }, orgUnit: { classPropertyName: "orgUnit", publicName: "orgUnit", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { instanceSave: "instanceSave", instanceSaveCompleted: "instanceSaveCompleted", instanceUpdate: "instanceUpdate", formValidityUpdate: "formValidityUpdate", formCancel: "formCancel" }, ngImport: i0, template: "@if (loading()) {\n<div className=\"program-entry__form-loader\">\n <ng-dhis2-ui-wrapper [component]=\"FormLoader\" />\n</div>\n} @else if(metaData()) {\n\n<div>\n <!-- Form content -->\n @switch (config().displayType) {\n\n <!-- Flat display -->\n @case ('FLAT') {\n\n <ng-dhis2-ui-flat-form\n [name]=\"metaData()!.name\"\n [dataValues]=\"instance() || {}\"\n [dataId]=\"dataId()\"\n [rules]=\"metaData()!.rules\"\n [fields]=\"metaData()!.formFields\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n (formUpdate)=\"onFormUpdate($event)\"\n (formValidityUpdate)=\"onValidityUpdate($event)\"\n />\n }\n\n <!-- SECTION display -->\n @case ('SECTION') { Section form }\n\n <!-- CUSTOM FORM -->\n @case ('CUSTOM') { } }\n\n <!-- Action buttons -->\n\n @if(!config().hideActionButtons) {\n <ng-dhis2-ui-wrapper [component]=\"FormActionButtons()\" />\n }\n</div>\n}\n", styles: ["::ng-deep .program-entry__form-loader{padding:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: D2FormModule }, { kind: "component", type: FlatFormComponent, selector: "ng-dhis2-ui-flat-form" }, { kind: "directive", type: ReactWrapperModule, selector: "ng-dhis2-ui-wrapper", inputs: ["props", "component"] }] }); }
|
|
8356
8638
|
}
|
|
8357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ProgramEntryFormModule, decorators: [{
|
|
8358
8640
|
type: Component,
|
|
8359
8641
|
args: [{ selector: 'ng-dhis2-ui-program-entry-form', imports: [CommonModule, D2FormModule, ReactWrapperModule], template: "@if (loading()) {\n<div className=\"program-entry__form-loader\">\n <ng-dhis2-ui-wrapper [component]=\"FormLoader\" />\n</div>\n} @else if(metaData()) {\n\n<div>\n <!-- Form content -->\n @switch (config().displayType) {\n\n <!-- Flat display -->\n @case ('FLAT') {\n\n <ng-dhis2-ui-flat-form\n [name]=\"metaData()!.name\"\n [dataValues]=\"instance() || {}\"\n [dataId]=\"dataId()\"\n [rules]=\"metaData()!.rules\"\n [fields]=\"metaData()!.formFields\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n (formUpdate)=\"onFormUpdate($event)\"\n (formValidityUpdate)=\"onValidityUpdate($event)\"\n />\n }\n\n <!-- SECTION display -->\n @case ('SECTION') { Section form }\n\n <!-- CUSTOM FORM -->\n @case ('CUSTOM') { } }\n\n <!-- Action buttons -->\n\n @if(!config().hideActionButtons) {\n <ng-dhis2-ui-wrapper [component]=\"FormActionButtons()\" />\n }\n</div>\n}\n", styles: ["::ng-deep .program-entry__form-loader{padding:8px}\n"] }]
|
|
8360
8642
|
}], propDecorators: { instanceSave: [{
|