@iapps/ng-dhis2-ui 1.2.103 → 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 +599 -372
- 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] && ':',
|
|
@@ -3474,7 +3530,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3474
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 */
|
|
3475
3531
|
}
|
|
3476
3532
|
if (options && options.options.length > 0) {
|
|
3477
|
-
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: () => {
|
|
3478
3534
|
setOpenDropdownKey(openDropdownKey === key ? null : key);
|
|
3479
3535
|
}, component: React__default.createElement("div", null,
|
|
3480
3536
|
React__default.createElement(FlyoutMenu, null,
|
|
@@ -3500,7 +3556,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3500
3556
|
}));
|
|
3501
3557
|
handleAdditionalFilters();
|
|
3502
3558
|
setOpenDropdownKey(null);
|
|
3503
|
-
} }, "
|
|
3559
|
+
} }, "Update"),
|
|
3504
3560
|
React__default.createElement(Button$1, { disabled: !inputValues[key], onClick: () => {
|
|
3505
3561
|
setInputValues((prevValues) => ({
|
|
3506
3562
|
...prevValues,
|
|
@@ -3515,7 +3571,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3515
3571
|
setDataQueryFiltersState(filteredFilters);
|
|
3516
3572
|
setTempDataQueryFiltersState(filteredFilters);
|
|
3517
3573
|
setOpenDropdownKey(null);
|
|
3518
|
-
} }, "
|
|
3574
|
+
} }, "Reset")))))) },
|
|
3519
3575
|
label,
|
|
3520
3576
|
" ",
|
|
3521
3577
|
prevInputValues[key] && ':',
|
|
@@ -3566,7 +3622,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3566
3622
|
}));
|
|
3567
3623
|
handleAdditionalFilters();
|
|
3568
3624
|
setOpenDropdownKey(null);
|
|
3569
|
-
} }, "
|
|
3625
|
+
} }, "Update"),
|
|
3570
3626
|
React__default.createElement(Button$1, { disabled: !inputValues[key], onClick: () => {
|
|
3571
3627
|
setInputValues((prevValues) => ({
|
|
3572
3628
|
...prevValues,
|
|
@@ -3581,7 +3637,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3581
3637
|
setDataQueryFiltersState(filteredFilters);
|
|
3582
3638
|
setTempDataQueryFiltersState(filteredFilters);
|
|
3583
3639
|
setOpenDropdownKey(null);
|
|
3584
|
-
} }, "
|
|
3640
|
+
} }, "Reset")))))) },
|
|
3585
3641
|
label,
|
|
3586
3642
|
" ",
|
|
3587
3643
|
prevInputValues[key] && ':',
|
|
@@ -4003,10 +4059,10 @@ class LineListService {
|
|
|
4003
4059
|
return orgUnitsMap;
|
|
4004
4060
|
}));
|
|
4005
4061
|
}
|
|
4006
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4007
|
-
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 }); }
|
|
4008
4064
|
}
|
|
4009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListService, decorators: [{
|
|
4010
4066
|
type: Injectable
|
|
4011
4067
|
}], ctorParameters: () => [{ type: i1.NgxDhis2HttpClientService }] });
|
|
4012
4068
|
|
|
@@ -4056,7 +4112,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
4056
4112
|
}));
|
|
4057
4113
|
const tableColumns = [
|
|
4058
4114
|
{
|
|
4059
|
-
label: orgUnitLabel || '
|
|
4115
|
+
label: orgUnitLabel || 'Registering unit',
|
|
4060
4116
|
key: 'orgUnit',
|
|
4061
4117
|
},
|
|
4062
4118
|
...attributeColumns,
|
|
@@ -4665,28 +4721,103 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4665
4721
|
// Returns black for light backgrounds, white for dark backgrounds
|
|
4666
4722
|
return yiq >= 128 ? colors$1.grey700 : '#FFFFFF';
|
|
4667
4723
|
}
|
|
4668
|
-
return
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
gap: 8,
|
|
4672
|
-
padding: 8,
|
|
4673
|
-
} },
|
|
4674
|
-
React__default.createElement(CircularLoader$1, { small: true }),
|
|
4675
|
-
React__default.createElement("div", { style: {
|
|
4676
|
-
fontSize: 14,
|
|
4677
|
-
} }, "Loading"))) : (React__default.createElement("div", null,
|
|
4678
|
-
this.showDownloadButton && (React__default.createElement("div", { style: {
|
|
4679
|
-
paddingBottom: '1rem',
|
|
4724
|
+
return React__default.createElement('div', null, loading
|
|
4725
|
+
? React__default.createElement('div', {
|
|
4726
|
+
style: {
|
|
4680
4727
|
display: 'flex',
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
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
|
+
})));
|
|
4690
4821
|
};
|
|
4691
4822
|
}
|
|
4692
4823
|
ngOnChanges(changes) {
|
|
@@ -4734,10 +4865,10 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4734
4865
|
this.component = this.LineList;
|
|
4735
4866
|
this.render();
|
|
4736
4867
|
}
|
|
4737
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4738
|
-
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"] }); }
|
|
4739
4870
|
}
|
|
4740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListTableComponent, decorators: [{
|
|
4741
4872
|
type: Component,
|
|
4742
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"] }]
|
|
4743
4874
|
}], propDecorators: { triggerToken: [{
|
|
@@ -4799,11 +4930,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
4799
4930
|
}] } });
|
|
4800
4931
|
|
|
4801
4932
|
class LineListModule {
|
|
4802
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4803
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4804
|
-
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] }); }
|
|
4805
4936
|
}
|
|
4806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListModule, decorators: [{
|
|
4807
4938
|
type: NgModule,
|
|
4808
4939
|
args: [{
|
|
4809
4940
|
declarations: [LineListTableComponent],
|
|
@@ -4953,27 +5084,29 @@ class DataTableUIComponent extends ReactWrapperModule {
|
|
|
4953
5084
|
},
|
|
4954
5085
|
}));
|
|
4955
5086
|
};
|
|
4956
|
-
return
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
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: {
|
|
4964
5097
|
fontSize: 14,
|
|
4965
|
-
}
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
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
|
+
})))));
|
|
4977
5110
|
};
|
|
4978
5111
|
}
|
|
4979
5112
|
async ngAfterViewInit() {
|
|
@@ -4992,10 +5125,10 @@ class DataTableUIComponent extends ReactWrapperModule {
|
|
|
4992
5125
|
this.render();
|
|
4993
5126
|
}
|
|
4994
5127
|
}
|
|
4995
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4996
|
-
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: [""] }); }
|
|
4997
5130
|
}
|
|
4998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIComponent, decorators: [{
|
|
4999
5132
|
type: Component,
|
|
5000
5133
|
args: [{ selector: 'app-data-table-ui', standalone: false, template: '<ng-content></ng-content>' }]
|
|
5001
5134
|
}], propDecorators: { data: [{
|
|
@@ -5009,11 +5142,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
5009
5142
|
}] } });
|
|
5010
5143
|
|
|
5011
5144
|
class DataTableUIModule {
|
|
5012
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5013
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
5014
|
-
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] }); }
|
|
5015
5148
|
}
|
|
5016
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DataTableUIModule, decorators: [{
|
|
5017
5150
|
type: NgModule,
|
|
5018
5151
|
args: [{
|
|
5019
5152
|
declarations: [DataTableUIComponent],
|
|
@@ -6455,24 +6588,24 @@ class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
6455
6588
|
super(...arguments);
|
|
6456
6589
|
this.ngZone = inject(NgZone);
|
|
6457
6590
|
this.fieldType = 'textbox';
|
|
6458
|
-
this.field = input.required();
|
|
6459
|
-
this.fieldError = input();
|
|
6460
|
-
this.fieldConfig = input(new FieldConfig());
|
|
6461
|
-
this.form = model.required();
|
|
6462
|
-
this.isValid = input();
|
|
6463
|
-
this.isValueAssigned = input();
|
|
6464
|
-
this.dataId = input();
|
|
6465
|
-
this.customOrgUnitRoots = input();
|
|
6466
|
-
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" }] : []));
|
|
6467
6600
|
this.value$ = toObservable(this.value);
|
|
6468
6601
|
this.isValueAssigned$ = toObservable(this.isValueAssigned);
|
|
6469
6602
|
this.fieldError$ = toObservable(this.fieldError);
|
|
6470
6603
|
this.label = computed(() => {
|
|
6471
6604
|
return !this.fieldConfig()?.hideLabel ? this.field().label : undefined;
|
|
6472
|
-
});
|
|
6605
|
+
}, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
6473
6606
|
this.placeholder = computed(() => {
|
|
6474
6607
|
return (this.field()?.placeholder || `Enter ${this.field()?.label || 'value'}`);
|
|
6475
|
-
});
|
|
6608
|
+
}, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
6476
6609
|
this.InputField = this.#getInputField();
|
|
6477
6610
|
this.update = new EventEmitter();
|
|
6478
6611
|
this.immediateUpdate = new EventEmitter();
|
|
@@ -6698,10 +6831,10 @@ class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
6698
6831
|
return false;
|
|
6699
6832
|
}
|
|
6700
6833
|
}
|
|
6701
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6702
|
-
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 }); }
|
|
6703
6836
|
}
|
|
6704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormFieldComponent, decorators: [{
|
|
6705
6838
|
type: Directive
|
|
6706
6839
|
}], propDecorators: { update: [{
|
|
6707
6840
|
type: Output
|
|
@@ -6710,10 +6843,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
6710
6843
|
}] } });
|
|
6711
6844
|
|
|
6712
6845
|
class FormFieldItemComponent extends BaseFormFieldComponent {
|
|
6713
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6714
|
-
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 }); }
|
|
6715
6848
|
}
|
|
6716
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldItemComponent, decorators: [{
|
|
6717
6850
|
type: Component,
|
|
6718
6851
|
args: [{
|
|
6719
6852
|
selector: 'ng-dhis2-ui-form-field-item',
|
|
@@ -6724,30 +6857,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
6724
6857
|
|
|
6725
6858
|
class FormFieldComponent {
|
|
6726
6859
|
constructor() {
|
|
6727
|
-
this.field = input.required();
|
|
6728
|
-
this.fieldConfig = input.required();
|
|
6729
|
-
this.isCheckBoxButton = input();
|
|
6730
|
-
this.fieldClass = input('');
|
|
6731
|
-
this.programRuleActions = input([]);
|
|
6732
|
-
this.dataEntities = input({});
|
|
6733
|
-
this.minDate = input();
|
|
6734
|
-
this.maxDate = input(new Date());
|
|
6735
|
-
this.dataId = input();
|
|
6736
|
-
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" }] : []));
|
|
6737
6870
|
this.color = 'primary';
|
|
6738
6871
|
this.fieldUpdate = new EventEmitter();
|
|
6739
6872
|
this.immediateFieldUpdate = new EventEmitter();
|
|
6740
6873
|
this.runtimeOptionChange = new EventEmitter();
|
|
6741
|
-
this.value = signal('');
|
|
6742
|
-
this.runtimeError = signal(undefined);
|
|
6874
|
+
this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
6875
|
+
this.runtimeError = signal(undefined, ...(ngDevMode ? [{ debugName: "runtimeError" }] : []));
|
|
6743
6876
|
this._runtimeOptions = [];
|
|
6744
6877
|
this.runtimeOptions = [];
|
|
6745
6878
|
this.fieldFilterControl = new FormControl();
|
|
6746
6879
|
this._onDestroy = new Subject();
|
|
6747
|
-
this.isValueAssigned = signal(false);
|
|
6880
|
+
this.isValueAssigned = signal(false, ...(ngDevMode ? [{ debugName: "isValueAssigned" }] : []));
|
|
6748
6881
|
this.ruleProcessor = effect(() => {
|
|
6749
6882
|
this.#processRules(this.programRuleActions());
|
|
6750
|
-
});
|
|
6883
|
+
}, ...(ngDevMode ? [{ debugName: "ruleProcessor" }] : []));
|
|
6751
6884
|
}
|
|
6752
6885
|
ngOnChanges(changes) {
|
|
6753
6886
|
if (changes && changes['dataEntities'] && this.field()?.dependentField) {
|
|
@@ -6911,10 +7044,10 @@ class FormFieldComponent {
|
|
|
6911
7044
|
onUpdateRuntimeOptions(options) {
|
|
6912
7045
|
this._runtimeOptions = [...options];
|
|
6913
7046
|
}
|
|
6914
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6915
|
-
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" }] }); }
|
|
6916
7049
|
}
|
|
6917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
6918
7051
|
type: Component,
|
|
6919
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"] }]
|
|
6920
7053
|
}], ctorParameters: () => [], propDecorators: { form: [{
|
|
@@ -6964,18 +7097,18 @@ class FormComponent {
|
|
|
6964
7097
|
return 'col-sm-4';
|
|
6965
7098
|
}
|
|
6966
7099
|
constructor() {
|
|
6967
|
-
this.formConfig = input();
|
|
6968
|
-
this.fields = input.required();
|
|
6969
|
-
this.form = input.required();
|
|
6970
|
-
this.isFormHorizontal = input(false);
|
|
6971
|
-
this.showSaveButton = input(false);
|
|
6972
|
-
this.fieldsData = input();
|
|
6973
|
-
this.fieldClass = input('');
|
|
6974
|
-
this.shouldRenderAsCheckBoxesButton = input(false);
|
|
6975
|
-
this.programRuleActions = input([]);
|
|
6976
|
-
this.dataEntities = input(undefined);
|
|
6977
|
-
this.dataId = input();
|
|
6978
|
-
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" }] : []));
|
|
6979
7112
|
this.configuration = computed(() => {
|
|
6980
7113
|
if (!this.formConfig()) {
|
|
6981
7114
|
return new FormConfig({
|
|
@@ -6983,12 +7116,12 @@ class FormComponent {
|
|
|
6983
7116
|
});
|
|
6984
7117
|
}
|
|
6985
7118
|
return this.formConfig();
|
|
6986
|
-
});
|
|
7119
|
+
}, ...(ngDevMode ? [{ debugName: "configuration" }] : []));
|
|
6987
7120
|
this.formUpdate = new EventEmitter();
|
|
6988
7121
|
this.formValidityUpdate = new EventEmitter();
|
|
6989
7122
|
this.ruleProcessor = effect(() => {
|
|
6990
7123
|
this.#processRules(this.programRuleActions());
|
|
6991
|
-
});
|
|
7124
|
+
}, ...(ngDevMode ? [{ debugName: "ruleProcessor" }] : []));
|
|
6992
7125
|
}
|
|
6993
7126
|
ngOnInit() {
|
|
6994
7127
|
this.values = this.form().getRawValue();
|
|
@@ -7051,10 +7184,10 @@ class FormComponent {
|
|
|
7051
7184
|
ngOnDestroy() {
|
|
7052
7185
|
this.ruleProcessor.destroy();
|
|
7053
7186
|
}
|
|
7054
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7055
|
-
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"] }] }); }
|
|
7056
7189
|
}
|
|
7057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormComponent, decorators: [{
|
|
7058
7191
|
type: Component,
|
|
7059
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"] }]
|
|
7060
7193
|
}], ctorParameters: () => [], propDecorators: { formUpdate: [{
|
|
@@ -7072,15 +7205,15 @@ class RepeatableFormComponent {
|
|
|
7072
7205
|
#events$;
|
|
7073
7206
|
constructor() {
|
|
7074
7207
|
this.ngZone = inject(NgZone);
|
|
7075
|
-
this.fieldGroup = input.required();
|
|
7076
|
-
this.events = model();
|
|
7077
|
-
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" }] : []));
|
|
7078
7211
|
this.repeatableEvents = [];
|
|
7079
7212
|
this.repeatableData = {};
|
|
7080
7213
|
this.repeatableStageUpdate = new EventEmitter();
|
|
7081
|
-
this.eventFormValue = signal(null);
|
|
7082
|
-
this.showForm = signal(false);
|
|
7083
|
-
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" }] : []));
|
|
7084
7217
|
this.#eventFormValue$ = toObservable(this.eventFormValue);
|
|
7085
7218
|
this.#showForm$ = toObservable(this.showForm);
|
|
7086
7219
|
this.#events$ = toObservable(this.events);
|
|
@@ -7115,10 +7248,10 @@ class RepeatableFormComponent {
|
|
|
7115
7248
|
[this.eventIndex()]: formValue,
|
|
7116
7249
|
};
|
|
7117
7250
|
}
|
|
7118
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7119
|
-
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"] }] }); }
|
|
7120
7253
|
}
|
|
7121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: RepeatableFormComponent, decorators: [{
|
|
7122
7255
|
type: Component,
|
|
7123
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"] }]
|
|
7124
7257
|
}], ctorParameters: () => [], propDecorators: { formObject: [{
|
|
@@ -7145,18 +7278,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7145
7278
|
class SectionFormComponent {
|
|
7146
7279
|
constructor() {
|
|
7147
7280
|
this.ngZone = inject(NgZone);
|
|
7148
|
-
this.loading = input();
|
|
7149
|
-
this.formMetaData = input.required();
|
|
7150
|
-
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" }] : []));
|
|
7151
7284
|
this.formGroups = {};
|
|
7152
7285
|
this.formValueEntity = {};
|
|
7153
7286
|
this.repeatableFormValueEntity = {};
|
|
7154
|
-
this.ruleActions = signal([]);
|
|
7287
|
+
this.ruleActions = signal([], ...(ngDevMode ? [{ debugName: "ruleActions" }] : []));
|
|
7155
7288
|
this.save = new EventEmitter();
|
|
7156
7289
|
this.formUpdate = new EventEmitter();
|
|
7157
7290
|
this.cancel = new EventEmitter();
|
|
7158
7291
|
this.formValidityUpdate = new EventEmitter();
|
|
7159
|
-
this.inValid = signal(true);
|
|
7292
|
+
this.inValid = signal(true, ...(ngDevMode ? [{ debugName: "inValid" }] : []));
|
|
7160
7293
|
this.inValid$ = toObservable(this.inValid);
|
|
7161
7294
|
}
|
|
7162
7295
|
ngOnInit() {
|
|
@@ -7243,10 +7376,10 @@ class SectionFormComponent {
|
|
|
7243
7376
|
.some((validity) => !validity);
|
|
7244
7377
|
return valueValidity || repeatableDataValidity;
|
|
7245
7378
|
}
|
|
7246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7247
|
-
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"] }] }); }
|
|
7248
7381
|
}
|
|
7249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SectionFormComponent, decorators: [{
|
|
7250
7383
|
type: Component,
|
|
7251
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"] }]
|
|
7252
7385
|
}], ctorParameters: () => [], propDecorators: { save: [{
|
|
@@ -7266,15 +7399,15 @@ class BaseFormWrapperComponent {
|
|
|
7266
7399
|
#updatedDataValues;
|
|
7267
7400
|
constructor() {
|
|
7268
7401
|
this.ngZone = inject(NgZone);
|
|
7269
|
-
this.name = input();
|
|
7270
|
-
this.fields = input.required();
|
|
7271
|
-
this.rules = input([]);
|
|
7272
|
-
this.dataValues = input({});
|
|
7273
|
-
this.dataId = input();
|
|
7274
|
-
this.customOrgUnitRoots = input();
|
|
7275
|
-
this.ruleActions = signal([]);
|
|
7276
|
-
this.isFormValid = signal(true);
|
|
7277
|
-
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" }] : []));
|
|
7278
7411
|
this.formSave = new EventEmitter();
|
|
7279
7412
|
this.formUpdate = new EventEmitter();
|
|
7280
7413
|
this.formCancel = new EventEmitter();
|
|
@@ -7283,7 +7416,7 @@ class BaseFormWrapperComponent {
|
|
|
7283
7416
|
if (this.#updatedDataValues()) {
|
|
7284
7417
|
this.executeRules();
|
|
7285
7418
|
}
|
|
7286
|
-
});
|
|
7419
|
+
}, ...(ngDevMode ? [{ debugName: "ruleProcessor" }] : []));
|
|
7287
7420
|
}
|
|
7288
7421
|
updateDataValues(dataValues) {
|
|
7289
7422
|
this.#updatedDataValues.set(dataValues);
|
|
@@ -7302,10 +7435,10 @@ class BaseFormWrapperComponent {
|
|
|
7302
7435
|
ngOnDestroy() {
|
|
7303
7436
|
this.ruleProcessor.destroy();
|
|
7304
7437
|
}
|
|
7305
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7306
|
-
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 }); }
|
|
7307
7440
|
}
|
|
7308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormWrapperComponent, decorators: [{
|
|
7309
7442
|
type: Directive
|
|
7310
7443
|
}], ctorParameters: () => [], propDecorators: { formSave: [{
|
|
7311
7444
|
type: Output
|
|
@@ -7334,17 +7467,17 @@ class FlatFormComponent extends BaseFormWrapperComponent {
|
|
|
7334
7467
|
this.updateDataValues(this.formGroup.getRawValue());
|
|
7335
7468
|
this.updateFormValidity(this.formGroup.valid);
|
|
7336
7469
|
}
|
|
7337
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7338
|
-
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"] }] }); }
|
|
7339
7472
|
}
|
|
7340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FlatFormComponent, decorators: [{
|
|
7341
7474
|
type: Component,
|
|
7342
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" }]
|
|
7343
7476
|
}] });
|
|
7344
7477
|
|
|
7345
7478
|
class D2FormModule {
|
|
7346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7347
|
-
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,
|
|
7348
7481
|
FormComponent,
|
|
7349
7482
|
RepeatableFormComponent,
|
|
7350
7483
|
SectionFormComponent,
|
|
@@ -7357,11 +7490,11 @@ class D2FormModule {
|
|
|
7357
7490
|
RepeatableFormComponent,
|
|
7358
7491
|
SectionFormComponent,
|
|
7359
7492
|
FlatFormComponent] }); }
|
|
7360
|
-
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,
|
|
7361
7494
|
ReactiveFormsModule,
|
|
7362
7495
|
OrganisationUnitSelectorModule] }); }
|
|
7363
7496
|
}
|
|
7364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: D2FormModule, decorators: [{
|
|
7365
7498
|
type: NgModule,
|
|
7366
7499
|
args: [{
|
|
7367
7500
|
declarations: [
|
|
@@ -7431,22 +7564,38 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7431
7564
|
subscription.unsubscribe(); // Cleanup to avoid memory leaks
|
|
7432
7565
|
};
|
|
7433
7566
|
}, []);
|
|
7434
|
-
return config
|
|
7435
|
-
React__default.createElement(
|
|
7436
|
-
|
|
7437
|
-
|
|
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) => {
|
|
7438
7579
|
setSelected(selectionEvent.items);
|
|
7439
|
-
},
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
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 });
|
|
7448
7597
|
};
|
|
7449
|
-
this.showOrgUnitTree = signal(false);
|
|
7598
|
+
this.showOrgUnitTree = signal(false, ...(ngDevMode ? [{ debugName: "showOrgUnitTree" }] : []));
|
|
7450
7599
|
this.orgUnitSelectionConfig = {
|
|
7451
7600
|
hideGroupSelect: true,
|
|
7452
7601
|
hideLevelSelect: true,
|
|
@@ -7454,7 +7603,7 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7454
7603
|
allowSingleSelection: true,
|
|
7455
7604
|
usageType: 'DATA_ENTRY',
|
|
7456
7605
|
};
|
|
7457
|
-
this.selectedOrgUnit = signal(null);
|
|
7606
|
+
this.selectedOrgUnit = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrgUnit" }] : []));
|
|
7458
7607
|
this.selectedOrgUnit$ = toObservable(this.selectedOrgUnit);
|
|
7459
7608
|
this.SelectionFiltersUI = () => {
|
|
7460
7609
|
const [filters, setFilters] = useState({
|
|
@@ -7582,66 +7731,144 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7582
7731
|
}
|
|
7583
7732
|
return 'span 1';
|
|
7584
7733
|
};
|
|
7585
|
-
return
|
|
7734
|
+
return React__default.createElement('div', {
|
|
7735
|
+
style: {
|
|
7586
7736
|
fontFamily: 'Arial, sans-serif',
|
|
7587
7737
|
padding: '20px',
|
|
7588
7738
|
backgroundColor: '#f9f9f9',
|
|
7589
7739
|
borderRadius: '8px',
|
|
7590
7740
|
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
|
|
7591
|
-
}
|
|
7592
|
-
|
|
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: {
|
|
7593
7817
|
display: 'grid',
|
|
7594
|
-
gridTemplateColumns: '
|
|
7818
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
7595
7819
|
gap: '16px',
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
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')))));
|
|
7645
7872
|
};
|
|
7646
7873
|
}
|
|
7647
7874
|
async getAppConfig() {
|
|
@@ -7696,10 +7923,10 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
7696
7923
|
this.component = this.SelectionFiltersUI;
|
|
7697
7924
|
this.render();
|
|
7698
7925
|
}
|
|
7699
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7700
|
-
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"] }); }
|
|
7701
7928
|
}
|
|
7702
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersComponent, decorators: [{
|
|
7703
7930
|
type: Component,
|
|
7704
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"] }]
|
|
7705
7932
|
}], propDecorators: { actionOptions: [{
|
|
@@ -7721,11 +7948,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7721
7948
|
}] } });
|
|
7722
7949
|
|
|
7723
7950
|
class SelectionFiltersUiModule {
|
|
7724
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7725
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7726
|
-
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] }); }
|
|
7727
7954
|
}
|
|
7728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SelectionFiltersUiModule, decorators: [{
|
|
7729
7956
|
type: NgModule,
|
|
7730
7957
|
args: [{
|
|
7731
7958
|
declarations: [SelectionFiltersComponent],
|
|
@@ -7736,9 +7963,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7736
7963
|
|
|
7737
7964
|
class TrackerFormComponent {
|
|
7738
7965
|
constructor() {
|
|
7739
|
-
this.program = input.required();
|
|
7740
|
-
this.programStage = input();
|
|
7741
|
-
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" }] : []));
|
|
7742
7969
|
this.d2 = window.d2Web;
|
|
7743
7970
|
}
|
|
7744
7971
|
async ngOnInit() {
|
|
@@ -7764,20 +7991,20 @@ class TrackerFormComponent {
|
|
|
7764
7991
|
}
|
|
7765
7992
|
onSave(event) { }
|
|
7766
7993
|
onCancel() { }
|
|
7767
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7768
|
-
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"] }] }); }
|
|
7769
7996
|
}
|
|
7770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormComponent, decorators: [{
|
|
7771
7998
|
type: Component,
|
|
7772
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" }]
|
|
7773
8000
|
}] });
|
|
7774
8001
|
|
|
7775
8002
|
class TrackerFormModule {
|
|
7776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7777
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7778
|
-
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] }); }
|
|
7779
8006
|
}
|
|
7780
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TrackerFormModule, decorators: [{
|
|
7781
8008
|
type: NgModule,
|
|
7782
8009
|
args: [{
|
|
7783
8010
|
imports: [CommonModule, D2FormModule],
|
|
@@ -7792,11 +8019,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
7792
8019
|
|
|
7793
8020
|
class EventFormComponent {
|
|
7794
8021
|
constructor() {
|
|
7795
|
-
this.program = input.required();
|
|
7796
|
-
this.programStage = input.required();
|
|
7797
|
-
this.eventId = input();
|
|
7798
|
-
this.enrollment = input();
|
|
7799
|
-
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" }] : []));
|
|
7800
8027
|
this.d2 = window.d2Web;
|
|
7801
8028
|
}
|
|
7802
8029
|
async ngOnInit() {
|
|
@@ -7823,20 +8050,20 @@ class EventFormComponent {
|
|
|
7823
8050
|
}
|
|
7824
8051
|
onSave(event) { }
|
|
7825
8052
|
onCancel() { }
|
|
7826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7827
|
-
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"] }] }); }
|
|
7828
8055
|
}
|
|
7829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormComponent, decorators: [{
|
|
7830
8057
|
type: Component,
|
|
7831
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" }]
|
|
7832
8059
|
}] });
|
|
7833
8060
|
|
|
7834
8061
|
class EventFormModule {
|
|
7835
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7836
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
7837
|
-
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] }); }
|
|
7838
8065
|
}
|
|
7839
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EventFormModule, decorators: [{
|
|
7840
8067
|
type: NgModule,
|
|
7841
8068
|
args: [{
|
|
7842
8069
|
imports: [CommonModule, D2FormModule],
|
|
@@ -8220,19 +8447,19 @@ class ProgramEntryFormSection {
|
|
|
8220
8447
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
8221
8448
|
class ProgramEntryFormModule {
|
|
8222
8449
|
constructor() {
|
|
8223
|
-
this.config = input.required();
|
|
8224
|
-
this.trackedEntity = input();
|
|
8225
|
-
this.event = input();
|
|
8226
|
-
this.enrollment = input();
|
|
8227
|
-
this.orgUnit = input();
|
|
8228
|
-
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" }] : []));
|
|
8229
8456
|
this.ngZone = inject(NgZone);
|
|
8230
8457
|
this.d2 = window.d2Web;
|
|
8231
|
-
this.loading = signal(false);
|
|
8232
|
-
this.metaData = signal(null);
|
|
8233
|
-
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" }] : []));
|
|
8234
8461
|
this.isFormValid$ = toObservable(this.isFormValid);
|
|
8235
|
-
this.instance = signal(null);
|
|
8462
|
+
this.instance = signal(null, ...(ngDevMode ? [{ debugName: "instance" }] : []));
|
|
8236
8463
|
this.instanceSave = new EventEmitter();
|
|
8237
8464
|
this.instanceSaveCompleted = new EventEmitter();
|
|
8238
8465
|
this.instanceUpdate = new EventEmitter();
|
|
@@ -8252,7 +8479,7 @@ class ProgramEntryFormModule {
|
|
|
8252
8479
|
return this.instance()?.trackedEntity;
|
|
8253
8480
|
}
|
|
8254
8481
|
return undefined;
|
|
8255
|
-
});
|
|
8482
|
+
}, ...(ngDevMode ? [{ debugName: "dataId" }] : []));
|
|
8256
8483
|
this.FormActionButtons = computed(() => {
|
|
8257
8484
|
if (this.config().hideActionButtons) {
|
|
8258
8485
|
return React__default.createElement(React__default.Fragment, null);
|
|
@@ -8284,7 +8511,7 @@ class ProgramEntryFormModule {
|
|
|
8284
8511
|
});
|
|
8285
8512
|
} }, this.config().cancelButtonLabel))));
|
|
8286
8513
|
};
|
|
8287
|
-
});
|
|
8514
|
+
}, ...(ngDevMode ? [{ debugName: "FormActionButtons" }] : []));
|
|
8288
8515
|
}
|
|
8289
8516
|
async ngOnInit() {
|
|
8290
8517
|
this.loading.set(true);
|
|
@@ -8406,10 +8633,10 @@ class ProgramEntryFormModule {
|
|
|
8406
8633
|
return firstValueFrom(of(null));
|
|
8407
8634
|
}
|
|
8408
8635
|
}
|
|
8409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8410
|
-
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"] }] }); }
|
|
8411
8638
|
}
|
|
8412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ProgramEntryFormModule, decorators: [{
|
|
8413
8640
|
type: Component,
|
|
8414
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"] }]
|
|
8415
8642
|
}], propDecorators: { instanceSave: [{
|