@openmrs/ngx-formentry 3.0.1-pre.19 → 3.0.1-pre.38
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/bundles/openmrs-ngx-formentry.umd.js +356 -354
- package/bundles/openmrs-ngx-formentry.umd.js.map +1 -1
- package/bundles/openmrs-ngx-formentry.umd.min.js +16 -1
- package/bundles/openmrs-ngx-formentry.umd.min.js.map +1 -1
- package/components/check-box/checkbox.component.d.ts +1 -0
- package/components/ngx-datetime-picker/ngx-datetime-picker.component.d.ts +1 -0
- package/components/ngx-tabset/components/{tab-set.d.ts → ngx-tab-set.component.d.ts} +2 -2
- package/components/ngx-tabset/components/{tab.d.ts → tab.component.d.ts} +0 -0
- package/esm2015/components/appointments-overview/appointments-overview.component.js +2 -2
- package/esm2015/components/check-box/checkbox.component.js +3 -2
- package/esm2015/components/custom-component-wrapper/custom-component-wrapper.component.js +2 -2
- package/esm2015/components/custom-control-wrapper/custom-control-wrapper.component.js +2 -2
- package/esm2015/components/date-time-picker/date-picker/date-picker.component.js +1 -1
- package/esm2015/components/date-time-picker/time-picker/time-picker.component.js +1 -1
- package/esm2015/components/ngx-datetime-picker/ngx-datetime-picker.component.js +4 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/calendar-body.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/calendar-month-view.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/calendar-multi-year-view.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/calendar-year-view.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/calendar.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/date-time-inline.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/date-time-picker-container.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/date-time.class.js +1 -1
- package/esm2015/components/ngx-pick-datetime/lib/date-time/timer-box.component.js +2 -2
- package/esm2015/components/ngx-pick-datetime/lib/date-time/timer.component.js +2 -2
- package/esm2015/components/ngx-remote-select/ngx-remote-select.component.js +2 -2
- package/esm2015/components/ngx-tabset/components/ngx-tab-set.component.js +67 -0
- package/esm2015/components/ngx-tabset/components/tab.component.js +26 -0
- package/esm2015/components/ngx-tabset/modules/ngx-tabset.module.js +5 -5
- package/esm2015/components/number-input/number-input.component.js +2 -2
- package/esm2015/form-entry/error-renderer/error-renderer.component.js +2 -2
- package/esm2015/form-entry/form-factory/form-node.js +1 -1
- package/esm2015/form-entry/form-factory/form.factory.js +4 -1
- package/esm2015/form-entry/form-factory/question.factory.js +47 -1
- package/esm2015/form-entry/form-renderer/form-renderer.component.js +4 -37
- package/esm2015/form-entry/question-models/interfaces/base-options.js +1 -1
- package/esm2015/form-entry/question-models/question-base.js +1 -1
- package/esm2015/form-entry/services/historical-encounter-data.service.js +2 -2
- package/esm2015/form-entry/value-adapters/encounter.adapter.js +1 -1
- package/esm2015/form-entry/value-adapters/obs-adapter-helper.js +24 -4
- package/esm2015/openmrs-ngx-formentry.js +14 -15
- package/fesm2015/openmrs-ngx-formentry.js +227 -379
- package/fesm2015/openmrs-ngx-formentry.js.map +1 -1
- package/form-entry/form-factory/form-node.d.ts +1 -0
- package/form-entry/form-factory/form.factory.d.ts +1 -0
- package/form-entry/form-factory/question.factory.d.ts +1 -0
- package/form-entry/form-renderer/form-renderer.component.d.ts +1 -1
- package/form-entry/question-models/interfaces/base-options.d.ts +1 -0
- package/form-entry/question-models/question-base.d.ts +4 -0
- package/form-entry/value-adapters/obs-adapter-helper.d.ts +4 -0
- package/openmrs-ngx-formentry.d.ts +23 -24
- package/openmrs-ngx-formentry.metadata.json +1 -1
- package/package.json +1 -1
- package/styles/ngx-formentry.css +1 -1
- package/esm2015/components/ngx-tabset/components/tab-set.js +0 -67
- package/esm2015/components/ngx-tabset/components/tab.js +0 -35
- package/esm2015/form-entry/form-renderer/form-renderer.component.css.js +0 -182
- package/form-entry/form-renderer/form-renderer.component.css.d.ts +0 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Injectable, Pipe, ChangeDetectorRef, NgZone, Component, Inject, Input, EventEmitter, Directive, Output, HostListener, ElementRef, Renderer2, HostBinding, TemplateRef, forwardRef, NgModule, WrappedValue, ChangeDetectionStrategy, InjectionToken, inject, LOCALE_ID, Optional, ViewChild, Injector, SkipSelf, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA, ContentChild, ContentChildren } from '@angular/core';
|
|
1
|
+
import { Injectable, Pipe, ChangeDetectorRef, NgZone, Component, Inject, Input, EventEmitter, Directive, Output, HostListener, ElementRef, Renderer2, HostBinding, TemplateRef, forwardRef, NgModule, WrappedValue, ChangeDetectionStrategy, ɵɵdefineInjectable, InjectionToken, inject, LOCALE_ID, Optional, ViewChild, Injector, SkipSelf, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA, ContentChild, ContentChildren } from '@angular/core';
|
|
3
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
4
3
|
import { AbstractControl, FormControl, FormGroup, FormArray, Validators, NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS, ReactiveFormsModule, FormBuilder } from '@angular/forms';
|
|
5
4
|
import { Subject, BehaviorSubject, Subscription, defer, merge, of, concat } from 'rxjs';
|
|
6
5
|
import moment from 'moment';
|
|
7
|
-
import
|
|
8
|
-
import ___default from 'lodash';
|
|
6
|
+
import _, { first, forEach, last, findIndex, filter, isArray, each, isUndefined, isEmpty, includes, find, intersection, isEqual } from 'lodash';
|
|
9
7
|
import { style, animate, AnimationBuilder, trigger, state, transition, group, query, animateChild, keyframes } from '@angular/animations';
|
|
10
8
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
11
9
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
@@ -16,7 +14,7 @@ import { NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayMo
|
|
|
16
14
|
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalInjector, PortalModule } from '@angular/cdk/portal';
|
|
17
15
|
import { SPACE, LEFT_ARROW, UP_ARROW, RIGHT_ARROW, DOWN_ARROW, ESCAPE, ENTER, PAGE_DOWN, PAGE_UP, END, HOME } from '@angular/cdk/keycodes';
|
|
18
16
|
import { coerceBooleanProperty, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
|
|
19
|
-
import { take, filter, startWith, debounceTime, distinctUntilChanged, tap, switchMap, catchError } from 'rxjs/operators';
|
|
17
|
+
import { take, filter as filter$1, startWith, debounceTime, distinctUntilChanged, tap, switchMap, catchError } from 'rxjs/operators';
|
|
20
18
|
import { Platform, PlatformModule } from '@angular/cdk/platform';
|
|
21
19
|
import { LazyElementsModule } from '@angular-extensions/elements';
|
|
22
20
|
|
|
@@ -1333,7 +1331,7 @@ class JsExpressionHelper {
|
|
|
1333
1331
|
if (height && weight) {
|
|
1334
1332
|
bmi = (weight / (((height / 100) * height) / 100)).toFixed(1);
|
|
1335
1333
|
}
|
|
1336
|
-
const refSectionObject =
|
|
1334
|
+
const refSectionObject = first(bmiForAgeRef);
|
|
1337
1335
|
let formattedSDValue;
|
|
1338
1336
|
if (refSectionObject) {
|
|
1339
1337
|
const refObjectValues = Object.keys(refSectionObject)
|
|
@@ -1346,14 +1344,14 @@ class JsExpressionHelper {
|
|
|
1346
1344
|
minReferencePoint.push(minimumValue);
|
|
1347
1345
|
}
|
|
1348
1346
|
else {
|
|
1349
|
-
|
|
1347
|
+
forEach(refObjectValues, (value) => {
|
|
1350
1348
|
if (value <= bmi) {
|
|
1351
1349
|
minReferencePoint.push(value);
|
|
1352
1350
|
}
|
|
1353
1351
|
});
|
|
1354
1352
|
}
|
|
1355
|
-
const lastReferenceValue =
|
|
1356
|
-
const lastValueIndex =
|
|
1353
|
+
const lastReferenceValue = last(minReferencePoint);
|
|
1354
|
+
const lastValueIndex = findIndex(refObjectValues, (o) => {
|
|
1357
1355
|
return o === lastReferenceValue;
|
|
1358
1356
|
});
|
|
1359
1357
|
const SDValue = refObjectKeys[lastValueIndex];
|
|
@@ -1383,11 +1381,11 @@ class JsExpressionHelper {
|
|
|
1383
1381
|
formattedSDValue = -4;
|
|
1384
1382
|
}
|
|
1385
1383
|
else {
|
|
1386
|
-
refSection =
|
|
1384
|
+
refSection = filter(weightForHeightRef, (refObject) => {
|
|
1387
1385
|
return parseFloat(refObject['Length']).toFixed(1) === height;
|
|
1388
1386
|
});
|
|
1389
1387
|
}
|
|
1390
|
-
const refSectionObject =
|
|
1388
|
+
const refSectionObject = first(refSection);
|
|
1391
1389
|
if (refSectionObject) {
|
|
1392
1390
|
const refObjectValues = Object.keys(refSectionObject)
|
|
1393
1391
|
.map((key) => refSectionObject[key])
|
|
@@ -1399,14 +1397,14 @@ class JsExpressionHelper {
|
|
|
1399
1397
|
minReferencePoint.push(minimumValue);
|
|
1400
1398
|
}
|
|
1401
1399
|
else {
|
|
1402
|
-
|
|
1400
|
+
forEach(refObjectValues, (value) => {
|
|
1403
1401
|
if (value <= weight) {
|
|
1404
1402
|
minReferencePoint.push(value);
|
|
1405
1403
|
}
|
|
1406
1404
|
});
|
|
1407
1405
|
}
|
|
1408
|
-
const lastReferenceValue =
|
|
1409
|
-
const lastValueIndex =
|
|
1406
|
+
const lastReferenceValue = last(minReferencePoint);
|
|
1407
|
+
const lastValueIndex = findIndex(refObjectValues, (o) => {
|
|
1410
1408
|
return o === lastReferenceValue;
|
|
1411
1409
|
});
|
|
1412
1410
|
const SDValue = refObjectKeys[lastValueIndex];
|
|
@@ -1425,7 +1423,7 @@ class JsExpressionHelper {
|
|
|
1425
1423
|
return height && weight ? formattedSDValue : null;
|
|
1426
1424
|
}
|
|
1427
1425
|
calcHeightForAgeZscore(heightForAgeRef, height, weight) {
|
|
1428
|
-
const refSectionObject =
|
|
1426
|
+
const refSectionObject = first(heightForAgeRef);
|
|
1429
1427
|
let formattedSDValue;
|
|
1430
1428
|
if (refSectionObject) {
|
|
1431
1429
|
const refObjectValues = Object.keys(refSectionObject)
|
|
@@ -1438,14 +1436,14 @@ class JsExpressionHelper {
|
|
|
1438
1436
|
minReferencePoint.push(minimumValue);
|
|
1439
1437
|
}
|
|
1440
1438
|
else {
|
|
1441
|
-
|
|
1439
|
+
forEach(refObjectValues, (value) => {
|
|
1442
1440
|
if (value <= height) {
|
|
1443
1441
|
minReferencePoint.push(value);
|
|
1444
1442
|
}
|
|
1445
1443
|
});
|
|
1446
1444
|
}
|
|
1447
|
-
const lastReferenceValue =
|
|
1448
|
-
const lastValueIndex =
|
|
1445
|
+
const lastReferenceValue = last(minReferencePoint);
|
|
1446
|
+
const lastValueIndex = findIndex(refObjectValues, (o) => {
|
|
1449
1447
|
return o === lastReferenceValue;
|
|
1450
1448
|
});
|
|
1451
1449
|
const SDValue = refObjectKeys[lastValueIndex];
|
|
@@ -1593,7 +1591,7 @@ class ValidationFactory {
|
|
|
1593
1591
|
getValidators(question, form) {
|
|
1594
1592
|
const list = [];
|
|
1595
1593
|
if (question.validators) {
|
|
1596
|
-
|
|
1594
|
+
forEach(question.validators, (validator) => {
|
|
1597
1595
|
switch (validator.type) {
|
|
1598
1596
|
case 'date':
|
|
1599
1597
|
list.push(this.dateValidator);
|
|
@@ -1917,188 +1915,6 @@ FormControlService.ctorParameters = () => [
|
|
|
1917
1915
|
{ type: AlertsFactory }
|
|
1918
1916
|
];
|
|
1919
1917
|
|
|
1920
|
-
const DEFAULT_STYLES = `a {
|
|
1921
|
-
color: white;
|
|
1922
|
-
text-decoration: none;
|
|
1923
|
-
font-size: 12px;
|
|
1924
|
-
text-transform: uppercase;
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
ul {
|
|
1928
|
-
list-style-type: none;
|
|
1929
|
-
margin: 2px auto;
|
|
1930
|
-
position: relative;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
li {
|
|
1934
|
-
display: block;
|
|
1935
|
-
padding: 10px 20px;
|
|
1936
|
-
white-space: nowrap;
|
|
1937
|
-
transition: all 0.3s ease-in;
|
|
1938
|
-
border-bottom: 4px solid transparent;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
li:hover {
|
|
1942
|
-
border-bottom: 4px solid white;
|
|
1943
|
-
opacity: 0.7;
|
|
1944
|
-
cursor: pointer;
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
.owl-theme .owl-controls .owl-nav {
|
|
1948
|
-
position: absolute;
|
|
1949
|
-
width: 100%;
|
|
1950
|
-
top: 0;
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
.owl-theme .owl-controls .owl-nav [class*="owl-"] {
|
|
1954
|
-
position: absolute;
|
|
1955
|
-
background: none;
|
|
1956
|
-
color: black;
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
.owl-theme .owl-controls .owl-nav [class*="owl-"]:hover {
|
|
1960
|
-
background: none;
|
|
1961
|
-
color: black;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
.owl-theme .owl-controls .owl-nav .owl-next {
|
|
1965
|
-
right: 0;
|
|
1966
|
-
transform: translate(120%);
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
.owl-theme .owl-controls .owl-nav .owl-prev {
|
|
1970
|
-
left: 0;
|
|
1971
|
-
transform: translate(-120%);
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
.slick-initialized .swipe-tab-content {
|
|
1975
|
-
position: relative;
|
|
1976
|
-
min-height: 365px;
|
|
1977
|
-
}
|
|
1978
|
-
@media screen and (min-width: 767px) {
|
|
1979
|
-
.slick-initialized .swipe-tab-content {
|
|
1980
|
-
min-height: 500px;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
.slick-initialized .swipe-tab {
|
|
1984
|
-
display: flex;
|
|
1985
|
-
align-items: center;
|
|
1986
|
-
justify-content: center;
|
|
1987
|
-
height: 50px;
|
|
1988
|
-
background: none;
|
|
1989
|
-
border: 0;
|
|
1990
|
-
color: #757575;
|
|
1991
|
-
cursor: pointer;
|
|
1992
|
-
text-align: center;
|
|
1993
|
-
border-bottom: 2px solid rgba(51, 122, 183, 0);
|
|
1994
|
-
transition: all 0.5s;
|
|
1995
|
-
}
|
|
1996
|
-
.slick-initialized .swipe-tab:hover {
|
|
1997
|
-
color: #337AB7;
|
|
1998
|
-
}
|
|
1999
|
-
.slick-initialized .swipe-tab.active-tab {
|
|
2000
|
-
border-bottom-color: #337AB7;
|
|
2001
|
-
color: #337AB7;
|
|
2002
|
-
font-weight: bold;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
.disabled {
|
|
2006
|
-
opacity: .5;
|
|
2007
|
-
pointer-events: none;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
.select2-container {
|
|
2011
|
-
margin-top: -5px;
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
.btn {
|
|
2015
|
-
padding: 0px 12px !important;
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
.form-tooltip{
|
|
2019
|
-
color:rgb(51, 122, 183);
|
|
2020
|
-
display: inline-block;
|
|
2021
|
-
}
|
|
2022
|
-
.question-info{
|
|
2023
|
-
opacity:0;
|
|
2024
|
-
height:0px;
|
|
2025
|
-
display: none;
|
|
2026
|
-
transition-duration: opacity 1s ease-out;
|
|
2027
|
-
transtion-delay: 0.5s;
|
|
2028
|
-
padding-top: 2px;
|
|
2029
|
-
padding-bottom: 2px;
|
|
2030
|
-
color: #696969;
|
|
2031
|
-
border-style: ridge;
|
|
2032
|
-
border-width: 1px;
|
|
2033
|
-
border-color: #337ab7;
|
|
2034
|
-
margin-top: 2px;
|
|
2035
|
-
}
|
|
2036
|
-
.hide-info{
|
|
2037
|
-
display:none;
|
|
2038
|
-
height:0px;
|
|
2039
|
-
}
|
|
2040
|
-
.form-tooltip:hover ~ .question-info {
|
|
2041
|
-
display:block;
|
|
2042
|
-
opacity:1;
|
|
2043
|
-
height:auto;
|
|
2044
|
-
}
|
|
2045
|
-
.form-tooltip .tooltipcontent::after {
|
|
2046
|
-
content: " ";
|
|
2047
|
-
position: absolute;
|
|
2048
|
-
bottom: 100%; /* At the top of the tooltip */
|
|
2049
|
-
right: 0%;
|
|
2050
|
-
margin-left: -5px;
|
|
2051
|
-
border-width: 5px;
|
|
2052
|
-
border-style: solid;
|
|
2053
|
-
border-top-color: transparent;
|
|
2054
|
-
border-right-color: transparent;
|
|
2055
|
-
border-bottom-color: #337ab7;
|
|
2056
|
-
border-left-color: transparent;
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
ng-select.form-control {
|
|
2060
|
-
padding-top: 0;
|
|
2061
|
-
height: auto;
|
|
2062
|
-
padding-bottom: 0;
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
.forms-dropdown-menu {
|
|
2066
|
-
max-height: 450px;
|
|
2067
|
-
overflow-y: scroll;
|
|
2068
|
-
}
|
|
2069
|
-
.no-border {
|
|
2070
|
-
border: 0;
|
|
2071
|
-
box-shadow: none;
|
|
2072
|
-
}
|
|
2073
|
-
.text-danger{
|
|
2074
|
-
color: var(--cds-support-01, #da1e28);
|
|
2075
|
-
}
|
|
2076
|
-
.error{
|
|
2077
|
-
margin-bottom: 3rem;
|
|
2078
|
-
}
|
|
2079
|
-
.afe-control{
|
|
2080
|
-
margin-bottom: 1.5rem;
|
|
2081
|
-
}
|
|
2082
|
-
[hidden] {
|
|
2083
|
-
display: none !important;
|
|
2084
|
-
}
|
|
2085
|
-
.accordion-content-dark {
|
|
2086
|
-
background-color: #f4f4f4;
|
|
2087
|
-
padding-right: 1rem;
|
|
2088
|
-
}
|
|
2089
|
-
.accordion-content-override{
|
|
2090
|
-
|
|
2091
|
-
box-sizing: content-box;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
.question-area {
|
|
2095
|
-
width: 100%;
|
|
2096
|
-
display: flex;
|
|
2097
|
-
justify-content:flex-start;
|
|
2098
|
-
flex-direction: column;
|
|
2099
|
-
}
|
|
2100
|
-
`;
|
|
2101
|
-
|
|
2102
1918
|
class DataSources {
|
|
2103
1919
|
constructor() {
|
|
2104
1920
|
this._dataSources = {};
|
|
@@ -2128,10 +1944,6 @@ DataSources.decorators = [
|
|
|
2128
1944
|
];
|
|
2129
1945
|
DataSources.ctorParameters = () => [];
|
|
2130
1946
|
|
|
2131
|
-
// import { concat, of, Observable, Subject, BehaviorSubject } from 'rxjs';
|
|
2132
|
-
// import * as _ from 'lodash';
|
|
2133
|
-
// import { debounceTime, distinctUntilChanged, tap, switchMap, catchError, map } from 'rxjs/operators';
|
|
2134
|
-
// import { QuestionBase } from '../question-models';
|
|
2135
1947
|
class FormRendererComponent {
|
|
2136
1948
|
constructor(validationFactory, dataSources, formErrorsService, document) {
|
|
2137
1949
|
this.validationFactory = validationFactory;
|
|
@@ -2182,30 +1994,7 @@ class FormRendererComponent {
|
|
|
2182
1994
|
if (this.node &&
|
|
2183
1995
|
this.node.question.extras &&
|
|
2184
1996
|
this.node.question.renderingType === 'remote-select') {
|
|
2185
|
-
// let selectQuestion = this.node.form.searchNodeByQuestionId(this.node.question.key)[0];
|
|
2186
1997
|
this.dataSource = this.dataSources.dataSources[this.node.question.dataSource];
|
|
2187
|
-
/*
|
|
2188
|
-
let defaltValues = of([]);
|
|
2189
|
-
if (this.dataSource.resolveSelectedValue(selectQuestion.control.value)) {
|
|
2190
|
-
defaltValues = this.dataSource.resolveSelectedValue(selectQuestion.control.value).pipe(
|
|
2191
|
-
catchError(() => of([])), // empty list on error
|
|
2192
|
-
);
|
|
2193
|
-
}
|
|
2194
|
-
this.items$ = concat(
|
|
2195
|
-
defaltValues,
|
|
2196
|
-
this.itemsInput$.pipe(
|
|
2197
|
-
debounceTime(200),
|
|
2198
|
-
distinctUntilChanged(),
|
|
2199
|
-
tap(() => this.itemsLoading = true),
|
|
2200
|
-
switchMap(term => this.dataSource.searchOptions(term).pipe(
|
|
2201
|
-
catchError(() => of([])), // empty list on error
|
|
2202
|
-
tap(() => {
|
|
2203
|
-
this.itemsLoading = false
|
|
2204
|
-
})
|
|
2205
|
-
))
|
|
2206
|
-
)
|
|
2207
|
-
);
|
|
2208
|
-
*/
|
|
2209
1998
|
if (this.dataSource && this.node.question.dataSourceOptions) {
|
|
2210
1999
|
this.dataSource.dataSourceOptions = this.node.question.dataSourceOptions;
|
|
2211
2000
|
}
|
|
@@ -2216,8 +2005,6 @@ class FormRendererComponent {
|
|
|
2216
2005
|
this.node.question.extras &&
|
|
2217
2006
|
this.node.question.renderingType === 'file') {
|
|
2218
2007
|
this.dataSource = this.dataSources.dataSources[this.node.question.dataSource];
|
|
2219
|
-
// console.log('Key', this.node.question);
|
|
2220
|
-
// console.log('Data source', this.dataSource);
|
|
2221
2008
|
}
|
|
2222
2009
|
}
|
|
2223
2010
|
loadLabels() {
|
|
@@ -2305,12 +2092,10 @@ class FormRendererComponent {
|
|
|
2305
2092
|
}, 200);
|
|
2306
2093
|
}
|
|
2307
2094
|
onDateChanged(node) {
|
|
2308
|
-
// console.log('Node', node);
|
|
2309
2095
|
this.node = node;
|
|
2310
2096
|
}
|
|
2311
2097
|
upload(event) {
|
|
2312
|
-
//
|
|
2313
|
-
// console.log('Data', this.dataSource);
|
|
2098
|
+
// TO DO Add upload functionality
|
|
2314
2099
|
}
|
|
2315
2100
|
toggleInformation(infoId) {
|
|
2316
2101
|
const e = document.getElementById(infoId);
|
|
@@ -2332,8 +2117,8 @@ class FormRendererComponent {
|
|
|
2332
2117
|
FormRendererComponent.decorators = [
|
|
2333
2118
|
{ type: Component, args: [{
|
|
2334
2119
|
selector: 'form-renderer',
|
|
2335
|
-
template: "<!--CONTAINERS-->\n<div *ngIf=\"node.question.renderingType === 'form'\">\n <ngx-tabset (onSelect)=\"tabSelected($event)\" [selectedIndex]=\"activeTab\">\n <ngx-tab [tabTitle]=\"question.label\" *ngFor=\"let question of node.question.questions; let i = index\">\n <form-renderer [node]=\"node.children[question.key]\" [parentComponent]=\"this\" [parentGroup]=\"node.control\" [labelMap]=\"labelMap\">\n </form-renderer>\n </ngx-tab>\n <error-renderer [form]=\"node.form\"></error-renderer>\n </ngx-tabset>\n\n</div>\n<div *ngIf=\"node.question.renderingType === 'page'\">\n <!--Page Components-->\n <app-custom-component-wrapper [dark]=\"theme === 'light'\" [componentConfigs]=\"node.question.componentConfigs\">\n </app-custom-component-wrapper>\n <form-renderer *ngFor=\"let question of node.question.questions\" [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\" [parentGroup]=\"parentGroup\" [labelMap]=\"labelMap\"></form-renderer>\n</div>\n<div *ngIf=\"node.question.renderingType === 'section' && checkSection(node)\">\n <div class=\"cds--accordion__item\" [ngClass]=\"{ 'cds--accordion__item--active': !isCollapsed }\">\n <button class=\"cds--accordion__heading\" type=\"button\" [attr.aria-expanded]=\"isCollapsed ? 'false' : 'true'\"\n aria-controls=\"accordion-item-0\" (click)=\"isCollapsed = !isCollapsed\">\n <svg class=\"cds--accordion__arrow\" ibmIcon=\"chevron--right\" size=\"16\" xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" aria-hidden=\"true\" width=\"16\" height=\"16\"\n viewBox=\"0 0 16 16\">\n <path d=\"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z\"></path>\n </svg>\n <p class=\"cds--accordion__title\">\n {{ node.question.label }}\n </p>\n </button>\n <div [collapse]=\"isCollapsed\">\n <!--Section Components-->\n <app-custom-component-wrapper [dark]=\"(theme === 'light')\" [componentConfigs]=\"node.question.componentConfigs\">\n </app-custom-component-wrapper>\n <div class=\"cds--accordion__content accordion-content-override\" [ngClass]=\"{\n 'accordion-content-dark': theme === 'light'}\">\n <form-renderer *ngFor=\"let question of node.question.questions\" [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\" [parentGroup]=\"parentGroup\" [labelMap]=\"labelMap\"></form-renderer>\n </div>\n </div>\n </div>\n</div>\n\n<!-- MESSAGES -->\n<div *ngIf=\"node.control && node.control.alert && node.control.alert !== ''\" class=\"alert alert-warning\">\n <a class=\"close\" data-dismiss=\"alert\">×</a> {{ node.control.alert }}\n</div>\n\n<!--CONTROLS-->\n\n\n<div *ngIf=\"node.question.controlType === 0\" [formGroup]=\"parentGroup\" [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\">\n <app-custom-component-wrapper [dark]=\"!(theme === 'light')\" [componentConfigs]=\"node.question.componentConfigs\">\n </app-custom-component-wrapper>\n <div class=\"cds--form-item\">\n <!--LEAF CONTROL-->\n <div class=\"question-area\">\n <a class=\"form-tooltip pull-right\" (click)=\"toggleInformation(node.question.extras.id)\" data-placement=\"right\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \">\n <i class=\"glyphicon glyphicon-question-sign\" aria-hidden=\"true\"></i>\n </a>\n\n <label *ngIf=\"node.question.label\" [style.color]=\"hasErrors() ? 'red' : ''\" class=\"cds--label\"\n [attr.for]=\"node.question.key\">\n {{ node.question.required ? '*' : '' }} {{ node.question.label }}\n </label>\n\n <div *ngIf=\"node.question.extras.questionOptions.customControl; else nativeControls\">\n <app-custom-control-wrapper [formControlName]=\"node.question.key\" [id]=\"node.question.key + 'id'\"\n [question]=\"node.question\">\n </app-custom-control-wrapper>\n </div>\n\n <ng-template #nativeControls>\n <div class=\"afe-control\" [ngSwitch]=\"node.question.renderingType\">\n <ibm-select [theme]=\"theme\" *ngSwitchCase=\"'select'\" [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\">\n <option *ngFor=\"let o of node.question.options\" [value]=\"o.value\">\n {{ o.label }}\n </option>\n </ibm-select>\n\n <!-- <app-file-upload *ngSwitchCase=\"'file'\" [dataSource]=\"dataSource\" [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\" (fileChanged)=\"upload($event)\">\n </app-file-upload> -->\n <div *ngSwitchCase=\"'file'\">\n <app-file-upload [dataSource]=\"dataSource\" [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\" (fileChanged)=\"upload($event)\">\n </app-file-upload>\n </div>\n\n <textarea [theme]=\"theme\" ibmTextArea [ngClass]=\"{\n 'cds--text-area--light': theme === 'light',\n 'cds--text-area--invalid': !node.control.valid\n }\" [placeholder]=\"node.question.placeholder\" [rows]=\"node.question.rows\" class=\"cds--text-area\"\n *ngSwitchCase=\"'textarea'\" [formControlName]=\"node.question.key\" [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\">\n </textarea>\n\n <ngx-remote-select [theme]=\"theme\" *ngSwitchCase=\"'remote-select'\" [placeholder]=\"node.question.placeholder\"\n tabindex=\"0\" [dataSource]=\"dataSource\" [componentID]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\" [id]=\"node.question.key + 'id'\"></ngx-remote-select>\n\n <ngx-datetimepicker [weeks]=\"node.question.extras.questionOptions.weeksList\"\n [showWeeks]=\"node.question.showWeeksAdder\" [theme]=\"theme\" [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\" *ngSwitchCase=\"'date'\">\n </ngx-datetimepicker>\n <ng-select [ngClass]=\"{'afe-custom': theme === 'light'}\" [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'multi-select'\" [items]=\"node.question.options\" bindLabel=\"label\" bindValue=\"value\"\n [multiple]=\"true\" placeholder=\"\" clearAllText=\"Clear\" [formControlName]=\"node.question.key\">\n </ng-select>\n\n <ng-select [ngClass]=\"{'afe-custom': theme === 'light'}\" [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'single-select'\" [items]=\"node.question.options\" bindLabel=\"label\" bindValue=\"value\"\n placeholder=\"\" clearAllText=\"Clear\" [formControlName]=\"node.question.key\">\n </ng-select>\n\n <number-input [theme]=\"theme\" *ngSwitchCase=\"'number'\" [id]=\"node.question.key + 'id'\"\n [min]=\"node.question.extras.questionOptions.min\" [max]=\"node.question.extras.questionOptions.max\"\n [formControlName]=\"node.question.key\" [attr.placeholder]=\"node.question.placeholder\">\n </number-input>\n\n <input [theme]=\"theme\" class=\"cds--text-input\" ibmText *ngSwitchDefault [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\" [type]=\"node.question.renderingType\"\n [id]=\"node.question.key + 'id'\" [readOnly]=\"node.question.extras.readOnly\"/>\n\n <div *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let o of node.question.options\">\n <label class=\"form-control no-border\">\n <input type=\"radio\" [formControlName]=\"node.question.key\" [id]=\"node.question.key + 'id'\"\n [value]=\"o.value\" />\n {{ o.label }}\n </label>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'checkbox'\">\n <checkbox [id]=\"node.question.key + 'id'\" [formControlName]=\"node.question.key\"\n [options]=\"node.question.options\" [selected]=\"node.control.value\"></checkbox>\n </div>\n\n <div *ngIf=\"\n node.question.enableHistoricalValue && node.question.historicalDisplay\n \" style=\"margin-top: 2px\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-xs-9\">\n <span class=\"text-warning\">Previous Value: </span>\n <strong>{{ node.question.historicalDisplay?.text }}</strong>\n <span *ngIf=\"node.question.showHistoricalValueDate\">\n <span> | </span>\n <strong class=\"text-primary\">{{ node.question.historicalDisplay?._date }}\n </strong>\n <span class=\"text-primary\" *ngIf=\"\n node.question.historicalDisplay &&\n node.question.historicalDisplay._date\n \">\n ({{ node.question.historicalDisplay._date | timeAgo }})</span>\n </span>\n </div>\n <button type=\"button\" [node]=\"node\" [name]=\"'historyValue'\"\n class=\"cds--btn cds--btn--primary cds--btn--sm col-xs-3\">\n Use Value\n </button>\n </div>\n </div>\n </div>\n <appointments-overview [node]=\"node\"></appointments-overview>\n <div *ngIf=\"hasErrors()\">\n <div *ngFor=\"let e of errors()\">\n <span class=\"text-danger\">{{ e }}</span>\n </div>\n </div>\n </div>\n </ng-template>\n\n\n\n <div class=\"question-info col-md-12 col-lg-12 col-sm-12\" id=\"{{ node.question.extras.id }}\" *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \">\n {{ node.question.extras.questionInfo }}\n </div>\n </div>\n </div>\n</div>\n<div *ngIf=\"node.question.controlType === 1\" [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\">\n <!--ARRAY CONTROL-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div class=\"well\" style=\"padding: 2px\" *ngSwitchCase=\"'repeating'\">\n <h4 style=\"margin: 2px; font-weight: bold\">{{ node.question.label }}</h4>\n <hr style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 2px;\n \" />\n <div [ngSwitch]=\"node.question.extras.type\">\n <div *ngSwitchCase=\"'testOrder'\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <form-renderer *ngFor=\"let question of child.question.questions\" [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\" [parentGroup]=\"child.control\" [labelMap]=\"labelMap\"></form-renderer>\n <div>{{ child.orderNumber }}</div>\n <button type=\"button \" class=\"cds--btn cds--btn--danger cds--btn--sm\" (click)=\"node.removeAt(i)\">\n Remove\n </button>\n <br />\n <hr style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \" />\n </div>\n </div>\n\n <div *ngSwitchCase=\"'obsGroup'\" style=\"margin-bottom: 20px\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <form-renderer *ngFor=\"let question of child.question.questions\" [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\" [parentGroup]=\"child.control\" [labelMap]=\"labelMap\"></form-renderer>\n <button type=\"button \" class=\"cds--btn cds--btn--danger cds--btn--sm\" (click)=\"node.removeAt(i)\">\n Remove\n </button>\n <br />\n <hr style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \" />\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"cds--btn cds--btn--primary\" (click)=\"node.createChildNode()\">\n Add\n </button>\n </div>\n </div>\n</div>\n<div *ngIf=\"node.question.controlType === 2\" [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\">\n <!--GROUP-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div *ngSwitchCase=\"'group'\">\n <form-renderer *ngFor=\"let question of node.question.questions\" [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\" [parentGroup]=\"node.control\" [labelMap]=\"labelMap\"></form-renderer>\n </div>\n <div *ngSwitchCase=\"'field-set'\" style=\"border: 1px solid #eeeeee; padding: 2px; margin: 2px\">\n <form-renderer *ngFor=\"let question of node.question.questions\" [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\" [parentGroup]=\"node.control\" [labelMap]=\"labelMap\"></form-renderer>\n </div>\n </div>\n</div>\n",
|
|
2336
|
-
styles: [
|
|
2120
|
+
template: "<!--CONTAINERS-->\n<div *ngIf=\"node.question.renderingType === 'form'\">\n <ngx-tab-set (onSelect)=\"tabSelected($event)\" [selectedIndex]=\"activeTab\">\n <ngx-tab\n [tabTitle]=\"question.label\"\n *ngFor=\"let question of node.question.questions; let i = index\"\n >\n <form-renderer\n [node]=\"node.children[question.key]\"\n [parentComponent]=\"this\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n >\n </form-renderer>\n </ngx-tab>\n <error-renderer [form]=\"node.form\"></error-renderer>\n </ngx-tab-set>\n</div>\n<div *ngIf=\"node.question.renderingType === 'page'\">\n <!--Page Components-->\n <app-custom-component-wrapper\n [dark]=\"theme === 'light'\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </app-custom-component-wrapper>\n <form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"parentGroup\"\n [labelMap]=\"labelMap\"\n ></form-renderer>\n</div>\n<div *ngIf=\"node.question.renderingType === 'section' && checkSection(node)\">\n <div\n class=\"cds--accordion__item\"\n [ngClass]=\"{ 'cds--accordion__item--active': !isCollapsed }\"\n >\n <button\n class=\"cds--accordion__heading\"\n type=\"button\"\n [attr.aria-expanded]=\"isCollapsed ? 'false' : 'true'\"\n aria-controls=\"accordion-item-0\"\n (click)=\"isCollapsed = !isCollapsed\"\n >\n <svg\n class=\"cds--accordion__arrow\"\n ibmIcon=\"chevron--right\"\n size=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n aria-hidden=\"true\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n >\n <path d=\"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z\"></path>\n </svg>\n <p class=\"cds--accordion__title\">\n {{ node.question.label }}\n </p>\n </button>\n <div [collapse]=\"isCollapsed\">\n <!--Section Components-->\n <app-custom-component-wrapper\n [dark]=\"theme === 'light'\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </app-custom-component-wrapper>\n <div\n class=\"cds--accordion__content accordion-content-override\"\n [ngClass]=\"{\n 'accordion-content-dark': theme === 'light'\n }\"\n >\n <form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"parentGroup\"\n [labelMap]=\"labelMap\"\n ></form-renderer>\n </div>\n </div>\n </div>\n</div>\n\n<!-- MESSAGES -->\n<div\n *ngIf=\"node.control && node.control.alert && node.control.alert !== ''\"\n class=\"alert alert-warning\"\n>\n <a class=\"close\" data-dismiss=\"alert\">×</a> {{ node.control.alert }}\n</div>\n\n<!--CONTROLS-->\n\n<div\n *ngIf=\"node.question.controlType === 0\"\n [formGroup]=\"parentGroup\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <app-custom-component-wrapper\n [dark]=\"!(theme === 'light')\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </app-custom-component-wrapper>\n <div class=\"cds--form-item\">\n <!--LEAF CONTROL-->\n <div class=\"question-area\">\n <a\n class=\"form-tooltip pull-right\"\n (click)=\"toggleInformation(node.question.extras.id)\"\n data-placement=\"right\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \"\n >\n <i class=\"glyphicon glyphicon-question-sign\" aria-hidden=\"true\"></i>\n </a>\n\n <label\n *ngIf=\"node.question.label\"\n [style.color]=\"hasErrors() ? 'red' : ''\"\n class=\"cds--label\"\n [attr.for]=\"node.question.key\"\n >\n {{ node.question.required ? '*' : '' }}\n {{ node.question.prefix ? node.question.prefix + ' ' : ''\n }}{{ node.question.label }}\n </label>\n\n <div\n *ngIf=\"\n node.question.extras.questionOptions.customControl;\n else nativeControls\n \"\n >\n <app-custom-control-wrapper\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [question]=\"node.question\"\n >\n </app-custom-control-wrapper>\n </div>\n\n <ng-template #nativeControls>\n <div class=\"afe-control\" [ngSwitch]=\"node.question.renderingType\">\n <ibm-select\n [theme]=\"theme\"\n *ngSwitchCase=\"'select'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n >\n <option *ngFor=\"let o of node.question.options\" [value]=\"o.value\">\n {{ o.label }}\n </option>\n </ibm-select>\n\n <div *ngSwitchCase=\"'file'\">\n <app-file-upload\n [dataSource]=\"dataSource\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n (fileChanged)=\"upload($event)\"\n >\n </app-file-upload>\n </div>\n\n <textarea\n [theme]=\"theme\"\n ibmTextArea\n [ngClass]=\"{\n 'cds--text-area--light': theme === 'light',\n 'cds--text-area--invalid': !node.control.valid\n }\"\n [placeholder]=\"node.question.placeholder\"\n [rows]=\"node.question.rows\"\n class=\"cds--text-area\"\n *ngSwitchCase=\"'textarea'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\"\n >\n </textarea>\n\n <ngx-remote-select\n [theme]=\"theme\"\n *ngSwitchCase=\"'remote-select'\"\n [placeholder]=\"node.question.placeholder\"\n tabindex=\"0\"\n [dataSource]=\"dataSource\"\n [componentID]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n ></ngx-remote-select>\n\n <ngx-datetimepicker\n [weeks]=\"node.question.extras.questionOptions.weeksList\"\n [showWeeks]=\"node.question.showWeeksAdder\"\n [theme]=\"theme\"\n [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n *ngSwitchCase=\"'date'\"\n [datePickerFormat]=\"node.question.datePickerFormat\"\n >\n </ngx-datetimepicker>\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'multi-select'\"\n [items]=\"node.question.options\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [multiple]=\"true\"\n placeholder=\"\"\n clearAllText=\"Clear\"\n [formControlName]=\"node.question.key\"\n >\n </ng-select>\n\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'single-select'\"\n [items]=\"node.question.options\"\n bindLabel=\"label\"\n bindValue=\"value\"\n placeholder=\"\"\n clearAllText=\"Clear\"\n [formControlName]=\"node.question.key\"\n >\n </ng-select>\n\n <number-input\n [theme]=\"theme\"\n *ngSwitchCase=\"'number'\"\n [id]=\"node.question.key + 'id'\"\n [min]=\"node.question.extras.questionOptions.min\"\n [max]=\"node.question.extras.questionOptions.max\"\n [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\"\n >\n </number-input>\n\n <input\n [theme]=\"theme\"\n class=\"cds--text-input\"\n ibmText\n *ngSwitchDefault\n [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\"\n [type]=\"node.question.renderingType\"\n [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\"\n />\n\n <div *ngSwitchCase=\"'radio'\">\n <div\n *ngFor=\"let o of node.question.options\"\n [ngClass]=\"{\n 'in-line': node.question.orientation === 'horizontal'\n }\"\n >\n <label class=\"form-control no-border\">\n <input\n type=\"radio\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [value]=\"o.value\"\n />\n {{ o.label }}\n </label>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'checkbox'\">\n <checkbox\n [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n [options]=\"node.question.options\"\n [selected]=\"node.control.value\"\n ></checkbox>\n </div>\n\n <div\n *ngIf=\"\n node.question.enableHistoricalValue &&\n node.question.historicalDisplay\n \"\n style=\"margin-top: 2px\"\n >\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-xs-9\">\n <span class=\"text-warning\">Previous Value: </span>\n <strong>{{ node.question.historicalDisplay?.text }}</strong>\n <span *ngIf=\"node.question.showHistoricalValueDate\">\n <span> | </span>\n <strong class=\"text-primary\"\n >{{ node.question.historicalDisplay?._date | date }}\n </strong>\n <span\n class=\"text-primary\"\n *ngIf=\"\n node.question.historicalDisplay &&\n node.question.historicalDisplay._date\n \"\n >\n ({{\n node.question.historicalDisplay._date | timeAgo\n }})</span\n >\n </span>\n </div>\n <button\n type=\"button\"\n [node]=\"node\"\n [name]=\"'historyValue'\"\n class=\"cds--btn cds--btn--primary cds--btn--sm col-xs-3\"\n >\n Use Value\n </button>\n </div>\n </div>\n </div>\n <appointments-overview [node]=\"node\"></appointments-overview>\n <div *ngIf=\"hasErrors()\">\n <div *ngFor=\"let e of errors()\">\n <span class=\"text-danger\">{{ e }}</span>\n </div>\n </div>\n </div>\n </ng-template>\n\n <div\n class=\"question-info col-md-12 col-lg-12 col-sm-12\"\n id=\"{{ node.question.extras.id }}\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \"\n >\n {{ node.question.extras.questionInfo }}\n </div>\n </div>\n </div>\n</div>\n<div\n *ngIf=\"node.question.controlType === 1\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <!--ARRAY CONTROL-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div class=\"well\" style=\"padding: 2px\" *ngSwitchCase=\"'repeating'\">\n <h4 style=\"margin: 2px; font-weight: bold\">{{ node.question.label }}</h4>\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 2px;\n \"\n />\n <div [ngSwitch]=\"node.question.extras.type\">\n <div *ngSwitchCase=\"'testOrder'\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <form-renderer\n *ngFor=\"let question of child.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\"\n [parentGroup]=\"child.control\"\n [labelMap]=\"labelMap\"\n ></form-renderer>\n <div>{{ child.orderNumber }}</div>\n <button\n type=\"button \"\n class=\"cds--btn cds--btn--danger cds--btn--sm\"\n (click)=\"node.removeAt(i)\"\n >\n Remove\n </button>\n <br />\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \"\n />\n </div>\n </div>\n\n <div *ngSwitchCase=\"'obsGroup'\" style=\"margin-bottom: 20px\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <form-renderer\n *ngFor=\"let question of child.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\"\n [parentGroup]=\"child.control\"\n [labelMap]=\"labelMap\"\n ></form-renderer>\n <button\n type=\"button \"\n class=\"cds--btn cds--btn--danger cds--btn--sm\"\n (click)=\"node.removeAt(i)\"\n >\n Remove\n </button>\n <br />\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \"\n />\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--primary\"\n (click)=\"node.createChildNode()\"\n >\n Add\n </button>\n </div>\n </div>\n</div>\n<div\n *ngIf=\"node.question.controlType === 2\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <!--GROUP-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div *ngSwitchCase=\"'group'\">\n <form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n ></form-renderer>\n </div>\n <div\n *ngSwitchCase=\"'field-set'\"\n style=\"border: 1px solid #eeeeee; padding: 2px; margin: 2px\"\n >\n <form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n ></form-renderer>\n </div>\n </div>\n</div>\n",
|
|
2121
|
+
styles: [".slider{width:auto;margin:30px}.slick-next:before,.slick-prev:before{color:#337ab7}.slick-dots{bottom:-40px}.slick-slide{outline:none}", "a{color:#fff;text-decoration:none;font-size:12px;text-transform:uppercase}ul{list-style-type:none;margin:2px auto;position:relative}li{display:block;padding:10px 20px;white-space:nowrap;transition:all .3s ease-in;border-bottom:4px solid transparent}li:hover{border-bottom:4px solid #fff;opacity:.7;cursor:pointer}.owl-theme .owl-controls .owl-nav{position:absolute;width:100%;top:0}.owl-theme .owl-controls .owl-nav [class*=owl-]{position:absolute;background:none;color:#000}.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{background:none;color:#000}.owl-theme .owl-controls .owl-nav .owl-next{right:0;transform:translate(120%)}.owl-theme .owl-controls .owl-nav .owl-prev{left:0;transform:translate(-120%)}.slick-initialized .swipe-tab-content{position:relative;min-height:365px}@media screen and (min-width:767px){.slick-initialized .swipe-tab-content{min-height:500px}}.slick-initialized .swipe-tab{display:flex;align-items:center;justify-content:center;height:50px;background:none;border:0;color:#757575;cursor:pointer;text-align:center;border-bottom:2px solid rgba(51,122,183,0);transition:all .5s}.slick-initialized .swipe-tab:hover{color:#337ab7}.slick-initialized .swipe-tab.active-tab{border-bottom-color:#337ab7;color:#337ab7;font-weight:700}.disabled{opacity:.5;pointer-events:none}.select2-container{margin-top:-5px}.btn{padding:0 12px!important}.form-tooltip{color:#337ab7;display:inline-block}.question-info{opacity:0;transition-duration:opacity 1s ease-out;transtion-delay:.5s;padding-top:2px;padding-bottom:2px;color:#696969;border:1px ridge #337ab7;margin-top:2px}.hide-info,.question-info{height:0;display:none}.form-tooltip:hover~.question-info{display:block;opacity:1;height:auto}.form-tooltip .tooltipcontent:after{content:\" \";position:absolute;bottom:100%;right:0;margin-left:-5px;border:5px solid transparent;border-bottom-color:#337ab7}ng-select.form-control{padding-top:0;height:auto;padding-bottom:0}.forms-dropdown-menu{max-height:450px;overflow-y:scroll}.no-border{border:0;box-shadow:none}.text-danger{color:var(--cds-support-01,#da1e28)}.error{margin-bottom:3rem}.afe-control{margin-bottom:1.5rem}[hidden]{display:none!important}.accordion-content-dark{background-color:#f4f4f4;padding-right:1rem}.accordion-content-override{box-sizing:content-box}.question-area{width:100%;max-width:18rem}.in-line{display:inline-block;padding-right:.5rem}"]
|
|
2337
2122
|
},] }
|
|
2338
2123
|
];
|
|
2339
2124
|
FormRendererComponent.ctorParameters = () => [
|
|
@@ -2480,7 +2265,7 @@ class Form {
|
|
|
2480
2265
|
if (arrayNode &&
|
|
2481
2266
|
arrayNode.children &&
|
|
2482
2267
|
arrayNode.children.length > 0) {
|
|
2483
|
-
|
|
2268
|
+
forEach(arrayNode.children, (groupNode) => {
|
|
2484
2269
|
this.markInvalidControls(groupNode, invalidControlNodes);
|
|
2485
2270
|
});
|
|
2486
2271
|
}
|
|
@@ -2562,7 +2347,7 @@ class ErrorRendererComponent {
|
|
|
2562
2347
|
}
|
|
2563
2348
|
announceErrorField(errorNode) {
|
|
2564
2349
|
const nodes = this.form.searchNodeByQuestionId(errorNode.path.substring(0, errorNode.path.indexOf('.')));
|
|
2565
|
-
|
|
2350
|
+
forEach(nodes, (node) => {
|
|
2566
2351
|
if (node.question.renderingType === 'page') {
|
|
2567
2352
|
const pageIndex = this.getPageIndex(node);
|
|
2568
2353
|
this.formErrorsService.announceErrorField(pageIndex + ',' + errorNode.question.key);
|
|
@@ -2578,7 +2363,7 @@ class ErrorRendererComponent {
|
|
|
2578
2363
|
ErrorRendererComponent.decorators = [
|
|
2579
2364
|
{ type: Component, args: [{
|
|
2580
2365
|
selector: 'error-renderer',
|
|
2581
|
-
template: "<div *ngIf=\"showErrors()\" class=\"container\">\n <div
|
|
2366
|
+
template: "<div *ngIf=\"showErrors()\" class=\"container\">\n <div\n data-notification\n *ngFor=\"let errorNode of errorNodes\"\n class=\"cds--inline-notification cds--inline-notification--error cds--inline-notification--low-contrast pointer\"\n role=\"alert\"\n (click)=\"announceErrorField(errorNode)\"\n >\n <div class=\"cds--inline-notification__details\">\n <div class=\"cds--inline-notification__text-wrapper\">\n <p class=\"cds--inline-notification__title\">\n {{ errorNode.question.label }}\n </p>\n <p class=\"cds--inline-notification__subtitle\">\n {{ getControlError(errorNode) }}\n </p>\n </div>\n </div>\n <button\n tabindex=\"0\"\n class=\"cds--inline-notification__action-button cds--btn cds--btn--sm cds--btn--ghost\"\n type=\"button\"\n >\n Fix\n </button>\n <svg\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n style=\"will-change: transform\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"cds--inline-notification__icon\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n ></path>\n <path\n d=\"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n ></path>\n </svg>\n </div>\n</div>\n",
|
|
2582
2367
|
styles: ["ul{list-style:none}.list-group-item{padding:2px 15px;cursor:pointer}ul li:hover{background-color:#fff}h4{margin-top:7px;margin-bottom:7px}.pointer{cursor:pointer}"]
|
|
2583
2368
|
},] }
|
|
2584
2369
|
];
|
|
@@ -2594,10 +2379,10 @@ class HistoricalFieldHelperService {
|
|
|
2594
2379
|
getDisplayTextFromOptions(question, valueProperty, displayProperty) {
|
|
2595
2380
|
let displayText = '';
|
|
2596
2381
|
const historicalValue = question.historicalDataValue;
|
|
2597
|
-
if (
|
|
2382
|
+
if (isArray(historicalValue.value)) {
|
|
2598
2383
|
let valueConverted = 0;
|
|
2599
|
-
|
|
2600
|
-
|
|
2384
|
+
each(historicalValue.value, (val) => {
|
|
2385
|
+
each(question.options, (option) => {
|
|
2601
2386
|
if (option[valueProperty] === val) {
|
|
2602
2387
|
if (valueConverted === 0) {
|
|
2603
2388
|
displayText = displayText + option[displayProperty];
|
|
@@ -2611,7 +2396,7 @@ class HistoricalFieldHelperService {
|
|
|
2611
2396
|
});
|
|
2612
2397
|
}
|
|
2613
2398
|
else {
|
|
2614
|
-
|
|
2399
|
+
each(question.options, (option) => {
|
|
2615
2400
|
if (option[valueProperty] === historicalValue.value) {
|
|
2616
2401
|
displayText = option[displayProperty];
|
|
2617
2402
|
}
|
|
@@ -2653,7 +2438,7 @@ class HistoricalValueDirective {
|
|
|
2653
2438
|
if (node) {
|
|
2654
2439
|
this._node = node;
|
|
2655
2440
|
if (this._node.question.enableHistoricalValue &&
|
|
2656
|
-
!
|
|
2441
|
+
!isUndefined(this._node.question.historicalDataValue)) {
|
|
2657
2442
|
const display = { text: '', _date: '' };
|
|
2658
2443
|
if (this._node.question.renderingType === 'select' ||
|
|
2659
2444
|
this._node.question.renderingType === 'multi-select' ||
|
|
@@ -2662,7 +2447,7 @@ class HistoricalValueDirective {
|
|
|
2662
2447
|
display._date = this._node.question.historicalDataValue.valueDate;
|
|
2663
2448
|
this._node.question['historicalDisplay'] = display;
|
|
2664
2449
|
}
|
|
2665
|
-
else if (!
|
|
2450
|
+
else if (!isUndefined(this._node.question.historicalDataValue)) {
|
|
2666
2451
|
display.text = this._node.question.historicalDataValue.value;
|
|
2667
2452
|
display._date = this._node.question.historicalDataValue.valueDate;
|
|
2668
2453
|
this._node.question['historicalDisplay'] = display;
|
|
@@ -3016,7 +2801,7 @@ NumberInputComponent.numberCount = 0;
|
|
|
3016
2801
|
NumberInputComponent.decorators = [
|
|
3017
2802
|
{ type: Component, args: [{
|
|
3018
2803
|
selector: 'number-input',
|
|
3019
|
-
template: "<div
|
|
2804
|
+
template: "<div\n data-numberinput\n [attr.data-invalid]=\"invalid ? true : null\"\n class=\"cds--number\"\n [ngClass]=\"{\n 'cds--number--light': theme === 'light',\n 'cds--number--nolabel': !label,\n 'cds--number--helpertext': helperText,\n 'cds--skeleton': skeleton,\n 'cds--number--sm': size === 'sm',\n 'cds--number--xl': size === 'xl'\n }\"\n>\n <div\n class=\"cds--number__input-wrapper\"\n [ngClass]=\"{\n 'cds--number__input-wrapper--warning': warn\n }\"\n >\n <input\n type=\"number\"\n [id]=\"id\"\n [value]=\"value\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n (input)=\"onNumberInputChange($event)\"\n />\n <div class=\"cds--number__controls\">\n <button\n type=\"button\"\n class=\"cds--number__control-btn down-icon\"\n (click)=\"onDecrement()\"\n title=\"Decrement number\"\n [attr.aria-label]=\"decrementLabel\"\n tabindex=\"-1\"\n >\n <svg\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\"\n class=\"down-icon\"\n >\n <path d=\"M8 15H24V17H8z\"></path>\n </svg>\n </button>\n <div class=\"cds--number__rule-divider\"></div>\n <button\n type=\"button\"\n class=\"cds--number__control-btn up-icon\"\n (click)=\"onIncrement()\"\n title=\"Increment number\"\n [attr.aria-label]=\"incrementLabel\"\n tabindex=\"-1\"\n >\n <svg\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 32 32\"\n aria-hidden=\"true\"\n class=\"up-icon\"\n >\n <path\n d=\"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z\"\n ></path>\n </svg>\n </button>\n <div class=\"cds--number__rule-divider\"></div>\n </div>\n </div>\n <div *ngIf=\"helperText && !invalid && !warn\" class=\"cds--form__helper-text\">\n <ng-container *ngIf=\"!isTemplate(helperText)\">{{\n helperText\n }}</ng-container>\n <ng-template\n *ngIf=\"isTemplate(helperText)\"\n [ngTemplateOutlet]=\"helperText\"\n ></ng-template>\n </div>\n <div *ngIf=\"!warn && invalid\" class=\"cds--form-requirement\">\n <ng-container *ngIf=\"!isTemplate(invalidText)\">{{\n invalidText\n }}</ng-container>\n <ng-template\n *ngIf=\"isTemplate(invalidText)\"\n [ngTemplateOutlet]=\"invalidText\"\n ></ng-template>\n </div>\n <div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n <ng-container *ngIf=\"!isTemplate(warnText)\">{{ warnText }}</ng-container>\n <ng-template\n *ngIf=\"isTemplate(warnText)\"\n [ngTemplateOutlet]=\"warnText\"\n ></ng-template>\n </div>\n</div>\n",
|
|
3020
2805
|
providers: [
|
|
3021
2806
|
{
|
|
3022
2807
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -3318,7 +3103,7 @@ class DatePickerComponent {
|
|
|
3318
3103
|
ngOnInit() {
|
|
3319
3104
|
this.initValue();
|
|
3320
3105
|
// default to current year range
|
|
3321
|
-
|
|
3106
|
+
_.each(this.fullYearRange, (v, i) => {
|
|
3322
3107
|
this.currentYear = this.calendarDate.clone().startOf('year').year();
|
|
3323
3108
|
if (v.indexOf(this.currentYear) !== -1) {
|
|
3324
3109
|
this.displayYearsIndex = i;
|
|
@@ -3402,7 +3187,7 @@ class DatePickerComponent {
|
|
|
3402
3187
|
for (let year = startYr; year <= currentYear; year++) {
|
|
3403
3188
|
years.push(year);
|
|
3404
3189
|
}
|
|
3405
|
-
this.fullYearRange =
|
|
3190
|
+
this.fullYearRange = _.chunk(years, 14);
|
|
3406
3191
|
}
|
|
3407
3192
|
initValue() {
|
|
3408
3193
|
// set moment locale (default is en)
|
|
@@ -3463,7 +3248,7 @@ DatePickerComponent.decorators = [
|
|
|
3463
3248
|
{ type: Component, args: [{
|
|
3464
3249
|
selector: 'date-picker',
|
|
3465
3250
|
template: "<picker-modal (onOverlayClick)=\"cancelDatePicker()\">\n <div class=\"picker-wrap\">\n <div class=\"picker-box\">\n <div class=\"picker-header\">\n <div class=\"picker-header-nav\">\n <span class=\"nav-prev\" (click)=\"prev()\"></span>\n </div>\n <div class=\"picker-header-content\">\n <div class=\"content\">\n <span (click)=\"showMonthSelection()\" class=\"month\">{{\n calendarDate | moment: 'MMMM'\n }}</span>\n <span class=\"seperator\">|</span>\n <span (click)=\"showYearSelection()\" class=\"year\">{{\n calendarDate | moment: 'YYYY'\n }}</span>\n </div>\n </div>\n <div class=\"picker-header-nav\">\n <span class=\"nav-next\" (click)=\"next()\"></span>\n </div>\n </div>\n <div class=\"picker-calendar\">\n <div\n class=\"picker-calendar-row\"\n *ngIf=\"!onDisplayMonths && !onDisplayYears\"\n >\n <span class=\"picker-weekday\" *ngFor=\"let day of dayNames\">{{\n day\n }}</span>\n </div>\n <div\n class=\"picker-calendar-row\"\n *ngIf=\"!onDisplayMonths && !onDisplayYears\"\n >\n <span\n class=\"picker-day\"\n (click)=\"selectDay(day)\"\n [ngClass]=\"{\n 'out-focus': day.month() != calendarDate.month(),\n today: day.isSame(today),\n selected: day.isSame(selectedDate)\n }\"\n *ngFor=\"let day of calendarDays\"\n >\n {{ day | moment: 'D' }}\n </span>\n </div>\n <div class=\"picker-calendar-row\" *ngIf=\"onDisplayMonths\">\n <span\n class=\"picker-month\"\n *ngFor=\"let month of monthsShort\"\n (click)=\"selectMonth(month)\"\n [ngClass]=\"{\n selected: month === currentMonth\n }\"\n >\n {{ month }}\n </span>\n </div>\n <div class=\"picker-calendar-row\" *ngIf=\"onDisplayYears\">\n <span\n class=\"picker-year\"\n *ngFor=\"let year of displayYearRange\"\n (click)=\"selectYear(year)\"\n [ngClass]=\"{\n selected: year === currentYear\n }\"\n >\n {{ year }}\n </span>\n </div>\n </div>\n <div class=\"picker-footer\">\n <div class=\"picker-action action-today\" (click)=\"selectToday()\">\n <span class=\"text\">Today</span>\n </div>\n <div class=\"picker-action action-clear\" (click)=\"clearPickDate()\">\n <span class=\"text\">Clear</span>\n </div>\n <div class=\"picker-action action-close\" (click)=\"cancelDatePicker()\">\n <span class=\"text\">Close</span>\n </div>\n </div>\n </div>\n </div>\n</picker-modal>\n",
|
|
3466
|
-
styles: ["*,:after,:before{box-sizing:border-box}.picker-wrap{width:95vw;max-width:666px}.picker-box{font-family:Open Sans;min-width:400px!important;padding:.625rem 1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.picker-footer,.picker-header{font-size:1.333rem;line-height:2.5rem;display:flex;height:2.5rem;width:100%}.picker-header-nav{position:relative;cursor:pointer;width:calc(100% / 8)}.picker-header-nav>*{position:absolute;top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}.picker-header-nav .nav-next:before,.picker-header-nav .nav-prev:before{content:\" \";border-top:.5em solid transparent;border-bottom:.5em solid transparent;border-right:.75em solid #000;width:0;height:0;display:block;margin:0 auto}.picker-header-nav .nav-next:before{border-right:0;border-left:.75em solid #000}.picker-header-content{width:calc(100% * 6 / 8);text-align:center}.picker-header-content .month{font-size:1.778rem;line-height:2.5rem;margin-right:.5rem;font-weight:700}.picker-header-content .year{font-style:italic;color:#999}.picker-calendar{width:100%}.picker-calendar .picker-calendar-row{display:flex;flex-wrap:wrap;width:100%;margin-bottom:.625rem}.picker-calendar .picker-weekday{font-weight:700;text-align:left;color:#999;width:calc(100% / 7)}.picker-calendar .picker-day,.picker-calendar .picker-month,.picker-calendar .picker-year{font-size:1.333rem;line-height:2.5rem;position:relative;height:2.5rem;text-align:center;cursor:pointer;width:calc(100% / 7)}.picker-calendar .picker-day:hover,.picker-calendar .picker-month:hover,.picker-calendar .picker-year:hover{background:#b1dcfb}.picker-calendar .out-focus{color:#ddd}.picker-calendar .out-focus:hover{color:#000}.picker-calendar .selected{background:#0089ec;color:#fff}.picker-calendar .selected:hover{background:#0089ec}.picker-calendar .today:before{content:\" \";position:absolute;top:2px;right:2px;width:0;height:0;border-top:.5em solid #0059bc;border-left:.5em solid transparent}.picker-footer{cursor:pointer}.picker-footer .picker-action{text-align:center;width:calc(100% / 3)}.picker-footer .picker-action:hover{background-color:#b1dcfb}.picker-footer .picker-action .text{padding-left:.8rem}.picker-footer .action-clear:before,.picker-footer .action-close:before,.picker-footer .action-today:before{content:\" \";position:relative;display:inline-block;height:0;width:0}.picker-footer .action-today:before{border-top:.66em solid #0059bc;border-left:.66em solid transparent}.picker-footer .action-clear:before{top:-.5rem;width:1rem;border-top:3px solid #e20}.picker-footer .action-close:before{width:1rem;height:1rem;background:linear-gradient(180deg,transparent 35%,#777 0,#777 65%,transparent 0),linear-gradient(90deg,transparent 35%,#777 0,#777 65%,transparent 0);transform:rotate(45deg)}"]
|
|
3251
|
+
styles: ["*,:after,:before{box-sizing:border-box}.picker-wrap{width:95vw;max-width:666px}.picker-box{font-family:Open Sans;min-width:400px!important;padding:.625rem 1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker-footer,.picker-header{font-size:1.333rem;line-height:2.5rem;display:flex;height:2.5rem;width:100%}.picker-header-nav{position:relative;cursor:pointer;width:calc(100% / 8)}.picker-header-nav>*{position:absolute;top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}.picker-header-nav .nav-next:before,.picker-header-nav .nav-prev:before{content:\" \";border-top:.5em solid transparent;border-bottom:.5em solid transparent;border-right:.75em solid #000;width:0;height:0;display:block;margin:0 auto}.picker-header-nav .nav-next:before{border-right:0;border-left:.75em solid #000}.picker-header-content{width:calc(100% * 6 / 8);text-align:center}.picker-header-content .month{font-size:1.778rem;line-height:2.5rem;margin-right:.5rem;font-weight:700}.picker-header-content .year{font-style:italic;color:#999}.picker-calendar{width:100%}.picker-calendar .picker-calendar-row{display:flex;flex-wrap:wrap;width:100%;margin-bottom:.625rem}.picker-calendar .picker-weekday{font-weight:700;text-align:left;color:#999;width:calc(100% / 7)}.picker-calendar .picker-day,.picker-calendar .picker-month,.picker-calendar .picker-year{font-size:1.333rem;line-height:2.5rem;position:relative;height:2.5rem;text-align:center;cursor:pointer;width:calc(100% / 7)}.picker-calendar .picker-day:hover,.picker-calendar .picker-month:hover,.picker-calendar .picker-year:hover{background:#b1dcfb}.picker-calendar .out-focus{color:#ddd}.picker-calendar .out-focus:hover{color:#000}.picker-calendar .selected{background:#0089ec;color:#fff}.picker-calendar .selected:hover{background:#0089ec}.picker-calendar .today:before{content:\" \";position:absolute;top:2px;right:2px;width:0;height:0;border-top:.5em solid #0059bc;border-left:.5em solid transparent}.picker-footer{cursor:pointer}.picker-footer .picker-action{text-align:center;width:calc(100% / 3)}.picker-footer .picker-action:hover{background-color:#b1dcfb}.picker-footer .picker-action .text{padding-left:.8rem}.picker-footer .action-clear:before,.picker-footer .action-close:before,.picker-footer .action-today:before{content:\" \";position:relative;display:inline-block;height:0;width:0}.picker-footer .action-today:before{border-top:.66em solid #0059bc;border-left:.66em solid transparent}.picker-footer .action-clear:before{top:-.5rem;width:1rem;border-top:3px solid #e20}.picker-footer .action-close:before{width:1rem;height:1rem;background:linear-gradient(180deg,transparent 35%,#777 0,#777 65%,transparent 0),linear-gradient(90deg,transparent 35%,#777 0,#777 65%,transparent 0);transform:rotate(45deg)}"]
|
|
3467
3252
|
},] }
|
|
3468
3253
|
];
|
|
3469
3254
|
DatePickerComponent.ctorParameters = () => [];
|
|
@@ -3574,7 +3359,7 @@ TimePickerComponent.decorators = [
|
|
|
3574
3359
|
{ type: Component, args: [{
|
|
3575
3360
|
selector: 'time-picker',
|
|
3576
3361
|
template: "<picker-modal (onOverlayClick)=\"cancelTimePicker()\">\n <div class=\"picker-wrap\">\n <div class=\"picker-box\">\n <div class=\"picker-header\">Time Picker</div>\n <div class=\"picker-table\">\n <ul class=\"picker-table-time\">\n <li class=\"picker-table-number hour\">\n <span class=\"arrow up\" (click)=\"increaseHour()\"></span>\n {{ time | moment: hourFormat }}\n <span class=\"arrow down\" (click)=\"decreaseHour()\"></span>\n </li>\n <li class=\"picker-table-separator\">:</li>\n <li class=\"picker-table-number minute\">\n <span class=\"arrow up\" (click)=\"increaseMinute()\"></span>\n {{ time | moment: 'mm' }}\n <span class=\"arrow down\" (click)=\"decreaseMinute()\"></span>\n </li>\n <li *ngIf=\"showSecond\" class=\"picker-table-separator\">:</li>\n <li *ngIf=\"showSecond\" class=\"picker-table-number second\">\n <span class=\"arrow up\" (click)=\"increaseSecond()\"></span>\n {{ time | moment: 'ss' }}\n <span class=\"arrow down\" (click)=\"decreaseSecond()\"></span>\n </li>\n <li *ngIf=\"use12Hour\" class=\"picker-table-meridiem meridiem\">\n {{ time | moment: 'A' }}\n </li>\n </ul>\n </div>\n <div class=\"picker-footer\">\n <div class=\"picker-action action-now\" (click)=\"selectNow()\">\n <span class=\"text\">Now</span>\n </div>\n <div class=\"picker-action action-confirm\" (click)=\"selectTime()\">\n <span class=\"text\">Confirm</span>\n </div>\n <div class=\"picker-action action-clear\" (click)=\"clearTime()\">\n <span class=\"text\">Clear</span>\n </div>\n <div class=\"picker-action action-close\" (click)=\"cancelTimePicker()\">\n <span class=\"text\">Close</span>\n </div>\n </div>\n </div>\n </div>\n</picker-modal>\n",
|
|
3577
|
-
styles: ["*,:after,:before{box-sizing:border-box}.picker-wrap{width:95vw;max-width:40rem;font-family:Open Sans}.picker-box{width:100%;padding:.625rem 1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.picker-footer,.picker-header{font-size:1.333rem;line-height:2.5rem;height:2.5rem;width:100%}.picker-header{text-align:center}.picker-table{width:100%;margin:2.5rem 0}.picker-table-time{font-size:2.37rem;line-height:2.5rem;list-style:none;margin:0;padding:0;display:flex;justify-content:center;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.picker-table-meridiem,.picker-table-number,.picker-table-separator{text-align:center}.picker-table-meridiem,.picker-table-number{position:relative;width:20%}.arrow{position:absolute;left:50%;border:solid #777;border-width:0 .2rem .2rem 0;display:inline-block;padding:.25rem;cursor:pointer}.arrow.up{top:-1rem;transform:translateX(-50%) rotate(-135deg)}.arrow.down{bottom:-1rem;transform:translateX(-50%) rotate(45deg)}.arrow:hover{border-color:#1975d2}.picker-table-separator{width:calc(20% / 3)}.picker-footer{display:flex;justify-content:center;width:100%;cursor:pointer}.picker-footer .picker-action{width:25%;text-align:center}.picker-footer .picker-action:hover{background-color:#b1dcfb}.picker-footer .picker-action .text{padding-left:.8rem}.picker-footer .action-clear:before,.picker-footer .action-close:before,.picker-footer .action-confirm:before,.picker-footer .action-now:before{content:\" \";position:relative;display:inline-block;height:0;width:0}.picker-footer .action-now:before{border-top:.66em solid #0059bc;border-left:.66em solid transparent}.picker-footer .action-confirm:before{width:1rem;height:1rem;border-radius:100%;background-color:#00b5ad}.picker-footer .action-clear:before{top:-.5rem;width:1rem;border-top:3px solid #e20}.picker-footer .action-close:before{width:1rem;height:1rem;background:linear-gradient(180deg,transparent 35%,#777 0,#777 65%,transparent 0),linear-gradient(90deg,transparent 35%,#777 0,#777 65%,transparent 0);transform:rotate(45deg)}"]
|
|
3362
|
+
styles: ["*,:after,:before{box-sizing:border-box}.picker-wrap{width:95vw;max-width:40rem;font-family:Open Sans}.picker-box{width:100%;padding:.625rem 1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker-footer,.picker-header{font-size:1.333rem;line-height:2.5rem;height:2.5rem;width:100%}.picker-header{text-align:center}.picker-table{width:100%;margin:2.5rem 0}.picker-table-time{font-size:2.37rem;line-height:2.5rem;list-style:none;margin:0;padding:0;display:flex;justify-content:center;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker-table-meridiem,.picker-table-number,.picker-table-separator{text-align:center}.picker-table-meridiem,.picker-table-number{position:relative;width:20%}.arrow{position:absolute;left:50%;border:solid #777;border-width:0 .2rem .2rem 0;display:inline-block;padding:.25rem;cursor:pointer}.arrow.up{top:-1rem;transform:translateX(-50%) rotate(-135deg)}.arrow.down{bottom:-1rem;transform:translateX(-50%) rotate(45deg)}.arrow:hover{border-color:#1975d2}.picker-table-separator{width:calc(20% / 3)}.picker-footer{display:flex;justify-content:center;width:100%;cursor:pointer}.picker-footer .picker-action{width:25%;text-align:center}.picker-footer .picker-action:hover{background-color:#b1dcfb}.picker-footer .picker-action .text{padding-left:.8rem}.picker-footer .action-clear:before,.picker-footer .action-close:before,.picker-footer .action-confirm:before,.picker-footer .action-now:before{content:\" \";position:relative;display:inline-block;height:0;width:0}.picker-footer .action-now:before{border-top:.66em solid #0059bc;border-left:.66em solid transparent}.picker-footer .action-confirm:before{width:1rem;height:1rem;border-radius:100%;background-color:#00b5ad}.picker-footer .action-clear:before{top:-.5rem;width:1rem;border-top:3px solid #e20}.picker-footer .action-close:before{width:1rem;height:1rem;background:linear-gradient(180deg,transparent 35%,#777 0,#777 65%,transparent 0),linear-gradient(90deg,transparent 35%,#777 0,#777 65%,transparent 0);transform:rotate(45deg)}"]
|
|
3578
3363
|
},] }
|
|
3579
3364
|
];
|
|
3580
3365
|
TimePickerComponent.ctorParameters = () => [];
|
|
@@ -3762,6 +3547,7 @@ class NgxDatetimeComponent {
|
|
|
3762
3547
|
this.isDisabled = false;
|
|
3763
3548
|
this.id = '';
|
|
3764
3549
|
this.theme = 'dark';
|
|
3550
|
+
this.datePickerFormat = '';
|
|
3765
3551
|
this.showWeeks = false;
|
|
3766
3552
|
this.onChange = (_) => { };
|
|
3767
3553
|
this.onTouch = () => { };
|
|
@@ -3795,7 +3581,7 @@ class NgxDatetimeComponent {
|
|
|
3795
3581
|
NgxDatetimeComponent.decorators = [
|
|
3796
3582
|
{ type: Component, args: [{
|
|
3797
3583
|
selector: 'ngx-datetimepicker',
|
|
3798
|
-
template: "<div class=\"date-time-picker-container\">\n
|
|
3584
|
+
template: "<div class=\"date-time-picker-container\">\n <div\n data-date-picker\n data-date-picker-type=\"single\"\n class=\"cds--date-picker cds--date-picker--single cds--date-picker--light\"\n [ngClass]=\"{\n 'cds--date-picker--light': theme === 'light'\n}\"\n >\n <div class=\"cds--date-picker-container fill\">\n <div class=\"cds--date-picker-input__wrapper\">\n <input\n [disabled]=\"isDisabled\"\n (dateTimeChange)=\"onInput($event)\"\n type=\"text\"\n class=\"cds--date-picker__input fill\"\n [id]=\"id\"\n [value]=\"value\"\n [owlDateTime]=\"dt1\"\n [owlDateTimeTrigger]=\"dt1\"\n placeholder=\"mm/dd/yyyy\"\n data-date-picker-input\n />\n <svg\n [owlDateTimeTrigger]=\"dt1\"\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n style=\"will-change: transform\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-date-picker-icon=\"true\"\n class=\"cds--date-picker__icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13,2h-2V1h-1v1H6V1H5v1H3C2.4,2,2,2.4,2,3v10c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1V3C14,2.4,13.6,2,13,2z M13,13H3V6h10V13z M13,5H3V3h2v1h1V3h4v1h1V3h2V5z\"\n ></path>\n </svg>\n </div>\n </div>\n </div>\n\n <div\n *ngIf=\"showWeeks\"\n class=\"cds--select some-class week-select-wrapper\"\n [ngClass]=\"{'cds--select--light': theme === 'light'}\"\n >\n <div class=\"cds--select-input__wrapper\">\n <select\n (change)=\"onWeeksSelected($event.target.value)\"\n id=\"select-1\"\n class=\"cds--select-input\"\n >\n <option\n class=\"cds--select-option\"\n value=\"placeholder-item\"\n disabled=\"\"\n hidden=\"\"\n selected=\"\"\n >\n Select Weeks\n </option>\n <option\n class=\"cds--select-option\"\n [value]=\"week\"\n *ngFor=\"let week of weeks\"\n >\n {{week}} Weeks\n </option>\n </select>\n <svg\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n aria-hidden=\"true\"\n class=\"cds--select__arrow\"\n >\n <path d=\"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z\"></path>\n </svg>\n </div>\n </div>\n</div>\n<owl-date-time\n [pickerType]=\"datePickerFormat ? datePickerFormat :'calendar'\"\n [disabled]=\"isDisabled\"\n #dt1\n></owl-date-time>\n",
|
|
3799
3585
|
providers: [
|
|
3800
3586
|
{
|
|
3801
3587
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -3809,6 +3595,7 @@ NgxDatetimeComponent.decorators = [
|
|
|
3809
3595
|
NgxDatetimeComponent.propDecorators = {
|
|
3810
3596
|
id: [{ type: Input }],
|
|
3811
3597
|
theme: [{ type: Input }],
|
|
3598
|
+
datePickerFormat: [{ type: Input }],
|
|
3812
3599
|
showWeeks: [{ type: Input }],
|
|
3813
3600
|
weeks: [{ type: Input }]
|
|
3814
3601
|
};
|
|
@@ -3865,7 +3652,7 @@ class OwlDateTimeIntl {
|
|
|
3865
3652
|
this.hour12PMLabel = 'PM';
|
|
3866
3653
|
}
|
|
3867
3654
|
}
|
|
3868
|
-
OwlDateTimeIntl.ɵprov =
|
|
3655
|
+
OwlDateTimeIntl.ɵprov = ɵɵdefineInjectable({ factory: function OwlDateTimeIntl_Factory() { return new OwlDateTimeIntl(); }, token: OwlDateTimeIntl, providedIn: "root" });
|
|
3869
3656
|
OwlDateTimeIntl.decorators = [
|
|
3870
3657
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3871
3658
|
];
|
|
@@ -4278,7 +4065,7 @@ OwlCalendarComponent.decorators = [
|
|
|
4278
4065
|
{ type: Component, args: [{
|
|
4279
4066
|
selector: 'owl-date-time-calendar',
|
|
4280
4067
|
exportAs: 'owlDateTimeCalendar',
|
|
4281
|
-
template: "<div class=\"owl-dt-calendar-control\">\n
|
|
4068
|
+
template: "<div class=\"owl-dt-calendar-control\">\n <!-- focus when keyboard tab (http://kizu.ru/en/blog/keyboard-only-focus/#x) -->\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"0\"\n [style.visibility]=\"showControlArrows ? 'visible' : 'hidden'\"\n [disabled]=\"!prevButtonEnabled()\"\n [attr.aria-label]=\"prevButtonLabel\"\n (click)=\"previousClicked()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n <!-- <editor-fold desc=\"SVG Arrow Left\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M96.633,125.369l95.053-94.533c7.101-7.055,7.101-18.492,0-25.546 c-7.1-7.054-18.613-7.054-25.714,0L58.989,111.689c-3.784,3.759-5.487,8.759-5.238,13.68c-0.249,4.922,1.454,9.921,5.238,13.681 l106.983,106.398c7.101,7.055,18.613,7.055,25.714,0c7.101-7.054,7.101-18.491,0-25.544L96.633,125.369z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n </button>\n <div class=\"owl-dt-calendar-control-content\">\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-period-button\"\n type=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"periodButtonLabel\"\n (click)=\"toggleViews()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ periodButtonText }}\n\n <span\n class=\"owl-dt-control-button-arrow\"\n [style.transform]=\"'rotate(' + (isMonthView ? 0 : 180) + 'deg)'\"\n >\n <!-- <editor-fold desc=\"SVG Arrow\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n width=\"50%\"\n height=\"50%\"\n viewBox=\"0 0 292.362 292.362\"\n style=\"enable-background: new 0 0 292.362 292.362\"\n xml:space=\"preserve\"\n >\n <g>\n <path\n d=\"M286.935,69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952,0-9.233,1.807-12.85,5.424\n C1.807,72.998,0,77.279,0,82.228c0,4.948,1.807,9.229,5.424,12.847l127.907,127.907c3.621,3.617,7.902,5.428,12.85,5.428\n s9.233-1.811,12.847-5.428L286.935,95.074c3.613-3.617,5.427-7.898,5.427-12.847C292.362,77.279,290.548,72.998,286.935,69.377z\"\n />\n </g>\n </svg>\n <!-- </editor-fold> -->\n </span>\n </span>\n </button>\n </div>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"0\"\n [style.visibility]=\"showControlArrows ? 'visible' : 'hidden'\"\n [disabled]=\"!nextButtonEnabled()\"\n [attr.aria-label]=\"nextButtonLabel\"\n (click)=\"nextClicked()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n <!-- <editor-fold desc=\"SVG Arrow Right\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M191.75,111.689L84.766,5.291c-7.1-7.055-18.613-7.055-25.713,0\n c-7.101,7.054-7.101,18.49,0,25.544l95.053,94.534l-95.053,94.533c-7.101,7.054-7.101,18.491,0,25.545\n c7.1,7.054,18.613,7.054,25.713,0L191.75,139.05c3.784-3.759,5.487-8.759,5.238-13.681\n C197.237,120.447,195.534,115.448,191.75,111.689z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n </button>\n</div>\n<div\n class=\"owl-dt-calendar-main\"\n cdkMonitorSubtreeFocus\n [ngSwitch]=\"currentView\"\n tabindex=\"-1\"\n>\n <owl-date-time-month-view\n *ngSwitchCase=\"'month'\"\n [pickerMoment]=\"pickerMoment\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter\"\n [hideOtherMonths]=\"hideOtherMonths\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (selectedChange)=\"dateSelected($event)\"\n (userSelection)=\"userSelected()\"\n ></owl-date-time-month-view>\n\n <owl-date-time-year-view\n *ngSwitchCase=\"'year'\"\n [pickerMoment]=\"pickerMoment\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter\"\n (keyboardEnter)=\"focusActiveCell()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (monthSelected)=\"selectMonthInYearView($event)\"\n (change)=\"goToDateInView($event, 'month')\"\n ></owl-date-time-year-view>\n\n <owl-date-time-multi-year-view\n *ngSwitchCase=\"'multi-years'\"\n [pickerMoment]=\"pickerMoment\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter\"\n (keyboardEnter)=\"focusActiveCell()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (yearSelected)=\"selectYearInMultiYearView($event)\"\n (change)=\"goToDateInView($event, 'year')\"\n ></owl-date-time-multi-year-view>\n</div>\n",
|
|
4282
4069
|
host: {
|
|
4283
4070
|
'[class.owl-dt-calendar]': 'owlDTCalendarClass'
|
|
4284
4071
|
},
|
|
@@ -4569,7 +4356,7 @@ OwlTimerComponent.decorators = [
|
|
|
4569
4356
|
{ type: Component, args: [{
|
|
4570
4357
|
exportAs: 'owlDateTimeTimer',
|
|
4571
4358
|
selector: 'owl-date-time-timer',
|
|
4572
|
-
template: "<owl-date-time-timer-box\n
|
|
4359
|
+
template: "<owl-date-time-timer-box\n [upBtnAriaLabel]=\"upHourButtonLabel\"\n [downBtnAriaLabel]=\"downHourButtonLabel\"\n [upBtnDisabled]=\"!upHourEnabled()\"\n [downBtnDisabled]=\"!downHourEnabled()\"\n [boxValue]=\"hourBoxValue\"\n [value]=\"hourValue\"\n [min]=\"0\"\n [max]=\"23\"\n [step]=\"stepHour\"\n [inputLabel]=\"'Hour'\"\n (inputChange)=\"setHourValueViaInput($event)\"\n (valueChange)=\"setHourValue($event)\"\n></owl-date-time-timer-box>\n<owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upMinuteButtonLabel\"\n [downBtnAriaLabel]=\"downMinuteButtonLabel\"\n [upBtnDisabled]=\"!upMinuteEnabled()\"\n [downBtnDisabled]=\"!downMinuteEnabled()\"\n [value]=\"minuteValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepMinute\"\n [inputLabel]=\"'Minute'\"\n (inputChange)=\"setMinuteValue($event)\"\n (valueChange)=\"setMinuteValue($event)\"\n></owl-date-time-timer-box>\n<owl-date-time-timer-box\n *ngIf=\"showSecondsTimer\"\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upSecondButtonLabel\"\n [downBtnAriaLabel]=\"downSecondButtonLabel\"\n [upBtnDisabled]=\"!upSecondEnabled()\"\n [downBtnDisabled]=\"!downSecondEnabled()\"\n [value]=\"secondValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepSecond\"\n [inputLabel]=\"'Second'\"\n (inputChange)=\"setSecondValue($event)\"\n (valueChange)=\"setSecondValue($event)\"\n></owl-date-time-timer-box>\n\n<div *ngIf=\"hour12Timer\" class=\"owl-dt-timer-hour12\">\n <button\n class=\"owl-dt-control-button owl-dt-timer-hour12-box\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"setMeridiem($event)\"\n >\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n {{ hour12ButtonLabel }}\n </span>\n </button>\n</div>\n",
|
|
4573
4360
|
preserveWhitespaces: false,
|
|
4574
4361
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4575
4362
|
host: {
|
|
@@ -4956,7 +4743,7 @@ OwlDateTimeContainerComponent.decorators = [
|
|
|
4956
4743
|
{ type: Component, args: [{
|
|
4957
4744
|
exportAs: 'owlDateTimeContainer',
|
|
4958
4745
|
selector: 'owl-date-time-container',
|
|
4959
|
-
template: "<div
|
|
4746
|
+
template: "<div\n [cdkTrapFocus]=\"picker.pickerMode !== 'inline'\"\n [@fadeInPicker]=\"picker.pickerMode === 'inline' ? '' : 'enter'\"\n class=\"owl-dt-container-inner\"\n>\n <owl-date-time-calendar\n *ngIf=\"pickerType === 'both' || pickerType === 'calendar'\"\n class=\"owl-dt-container-row\"\n [firstDayOfWeek]=\"picker.firstDayOfWeek\"\n [(pickerMoment)]=\"pickerMoment\"\n [selected]=\"picker.selected\"\n [selecteds]=\"picker.selecteds\"\n [selectMode]=\"picker.selectMode\"\n [minDate]=\"picker.minDateTime\"\n [maxDate]=\"picker.maxDateTime\"\n [dateFilter]=\"picker.dateTimeFilter\"\n [startView]=\"picker.startView\"\n [hideOtherMonths]=\"picker.hideOtherMonths\"\n (yearSelected)=\"picker.selectYear($event)\"\n (monthSelected)=\"picker.selectMonth($event)\"\n (selectedChange)=\"dateSelected($event)\"\n ></owl-date-time-calendar>\n\n <owl-date-time-timer\n *ngIf=\"pickerType === 'both' || pickerType === 'timer'\"\n class=\"owl-dt-container-row\"\n [pickerMoment]=\"pickerMoment\"\n [minDateTime]=\"picker.minDateTime\"\n [maxDateTime]=\"picker.maxDateTime\"\n [showSecondsTimer]=\"picker.showSecondsTimer\"\n [hour12Timer]=\"picker.hour12Timer\"\n [stepHour]=\"picker.stepHour\"\n [stepMinute]=\"picker.stepMinute\"\n [stepSecond]=\"picker.stepSecond\"\n (selectedChange)=\"timeSelected($event)\"\n ></owl-date-time-timer>\n\n <div\n *ngIf=\"picker.isInRangeMode\"\n role=\"radiogroup\"\n class=\"owl-dt-container-info owl-dt-container-row\"\n >\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 0 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 0\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-from\"\n [ngClass]=\"{ 'owl-dt-container-info-active': activeSelectedIndex === 0 }\"\n (click)=\"handleClickOnInfoGroup($event, 0)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, to, 0)\"\n #from\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\">{{ fromLabel }}:</span>\n <span class=\"owl-dt-container-info-value\">{{\n fromFormattedValue\n }}</span>\n </span>\n </div>\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 1 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 1\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-to\"\n [ngClass]=\"{ 'owl-dt-container-info-active': activeSelectedIndex === 1 }\"\n (click)=\"handleClickOnInfoGroup($event, 1)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, from, 1)\"\n #to\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\">{{ toLabel }}:</span>\n <span class=\"owl-dt-container-info-value\">{{ toFormattedValue }}</span>\n </span>\n </div>\n </div>\n\n <div\n *ngIf=\"showControlButtons\"\n class=\"owl-dt-container-buttons owl-dt-container-row\"\n >\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onCancelClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ cancelLabel }}\n </span>\n </button>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onSetClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ setLabel }}\n </span>\n </button>\n </div>\n</div>\n",
|
|
4960
4747
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4961
4748
|
preserveWhitespaces: false,
|
|
4962
4749
|
animations: [
|
|
@@ -5204,13 +4991,13 @@ class OwlDialogRef {
|
|
|
5204
4991
|
/** Whether the user is allowed to close the dialog. */
|
|
5205
4992
|
this.disableClose = this.container.config.disableClose;
|
|
5206
4993
|
this.container.animationStateChanged
|
|
5207
|
-
.pipe(filter((event) => event.phaseName === 'done' && event.toState === 'enter'), take(1))
|
|
4994
|
+
.pipe(filter$1((event) => event.phaseName === 'done' && event.toState === 'enter'), take(1))
|
|
5208
4995
|
.subscribe(() => {
|
|
5209
4996
|
this._afterOpen$.next();
|
|
5210
4997
|
this._afterOpen$.complete();
|
|
5211
4998
|
});
|
|
5212
4999
|
this.container.animationStateChanged
|
|
5213
|
-
.pipe(filter((event) => event.phaseName === 'done' && event.toState === 'exit'), take(1))
|
|
5000
|
+
.pipe(filter$1((event) => event.phaseName === 'done' && event.toState === 'exit'), take(1))
|
|
5214
5001
|
.subscribe(() => {
|
|
5215
5002
|
this.overlayRef.dispose();
|
|
5216
5003
|
this.locationChanged.unsubscribe();
|
|
@@ -5220,7 +5007,7 @@ class OwlDialogRef {
|
|
|
5220
5007
|
});
|
|
5221
5008
|
this.overlayRef
|
|
5222
5009
|
.keydownEvents()
|
|
5223
|
-
.pipe(filter((event) => event.keyCode === ESCAPE && !this.disableClose))
|
|
5010
|
+
.pipe(filter$1((event) => event.keyCode === ESCAPE && !this.disableClose))
|
|
5224
5011
|
.subscribe(() => this.close());
|
|
5225
5012
|
if (location) {
|
|
5226
5013
|
this.locationChanged = location.subscribe(() => {
|
|
@@ -5233,7 +5020,7 @@ class OwlDialogRef {
|
|
|
5233
5020
|
close(dialogResult) {
|
|
5234
5021
|
this.result = dialogResult;
|
|
5235
5022
|
this.container.animationStateChanged
|
|
5236
|
-
.pipe(filter((event) => event.phaseName === 'start'), take(1))
|
|
5023
|
+
.pipe(filter$1((event) => event.phaseName === 'start'), take(1))
|
|
5237
5024
|
.subscribe(() => {
|
|
5238
5025
|
this._beforeClose$.next(dialogResult);
|
|
5239
5026
|
this._beforeClose$.complete();
|
|
@@ -6157,7 +5944,7 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
6157
5944
|
this.popupRef = this.overlay.create(overlayConfig);
|
|
6158
5945
|
merge(this.popupRef.backdropClick(), this.popupRef.detachments(), this.popupRef
|
|
6159
5946
|
.keydownEvents()
|
|
6160
|
-
.pipe(filter((event) => event.keyCode === ESCAPE ||
|
|
5947
|
+
.pipe(filter$1((event) => event.keyCode === ESCAPE ||
|
|
6161
5948
|
(this._dtInput && event.altKey && event.keyCode === UP_ARROW)))).subscribe(() => this.close());
|
|
6162
5949
|
}
|
|
6163
5950
|
/**
|
|
@@ -6314,7 +6101,7 @@ OwlDateTimeTriggerDirective.propDecorators = {
|
|
|
6314
6101
|
};
|
|
6315
6102
|
|
|
6316
6103
|
/* eslint-disable @angular-eslint/no-host-metadata-property */
|
|
6317
|
-
const OWL_DATETIME_VALUE_ACCESSOR
|
|
6104
|
+
const OWL_DATETIME_VALUE_ACCESSOR = {
|
|
6318
6105
|
provide: NG_VALUE_ACCESSOR,
|
|
6319
6106
|
useExisting: forwardRef(() => OwlDateTimeInputDirective),
|
|
6320
6107
|
multi: true
|
|
@@ -6869,7 +6656,7 @@ OwlDateTimeInputDirective.decorators = [
|
|
|
6869
6656
|
'[attr.max]': 'maxIso8601',
|
|
6870
6657
|
'[disabled]': 'owlDateTimeInputDisabled'
|
|
6871
6658
|
},
|
|
6872
|
-
providers: [OWL_DATETIME_VALUE_ACCESSOR
|
|
6659
|
+
providers: [OWL_DATETIME_VALUE_ACCESSOR, OWL_DATETIME_VALIDATORS]
|
|
6873
6660
|
},] }
|
|
6874
6661
|
];
|
|
6875
6662
|
OwlDateTimeInputDirective.ctorParameters = () => [
|
|
@@ -7012,7 +6799,7 @@ OwlCalendarBodyComponent.decorators = [
|
|
|
7012
6799
|
{ type: Component, args: [{
|
|
7013
6800
|
selector: '[owl-date-time-calendar-body]',
|
|
7014
6801
|
exportAs: 'owlDateTimeCalendarBody',
|
|
7015
|
-
template: "<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\n
|
|
6802
|
+
template: "<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\n <td\n *ngFor=\"let item of row; let colIndex = index\"\n class=\"owl-dt-calendar-cell {{ item.cellClass }}\"\n [tabindex]=\"isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [class.owl-dt-calendar-cell-active]=\"isActiveCell(rowIndex, colIndex)\"\n [class.owl-dt-calendar-cell-disabled]=\"!item.enabled\"\n [class.owl-dt-calendar-cell-in-range]=\"isInRange(item.value)\"\n [class.owl-dt-calendar-cell-range-from]=\"isRangeFrom(item.value)\"\n [class.owl-dt-calendar-cell-range-to]=\"isRangeTo(item.value)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [style.width.%]=\"100 / numCols\"\n [style.paddingTop.%]=\"(50 * cellRatio) / numCols\"\n [style.paddingBottom.%]=\"(50 * cellRatio) / numCols\"\n (click)=\"selectCell(item)\"\n >\n <span\n class=\"owl-dt-calendar-cell-content\"\n [ngClass]=\"{\n 'owl-dt-calendar-cell-out': item.out,\n 'owl-dt-calendar-cell-today': item.value === todayValue,\n 'owl-dt-calendar-cell-selected': isSelected(item.value)\n }\"\n >\n {{ item.displayValue }}\n </span>\n </td>\n</tr>\n",
|
|
7016
6803
|
host: {
|
|
7017
6804
|
'[class.owl-dt-calendar-body]': 'owlDTCalendarBodyClass'
|
|
7018
6805
|
},
|
|
@@ -7425,7 +7212,7 @@ OwlMonthViewComponent.decorators = [
|
|
|
7425
7212
|
{ type: Component, args: [{
|
|
7426
7213
|
selector: 'owl-date-time-month-view',
|
|
7427
7214
|
exportAs: 'owlYearView',
|
|
7428
|
-
template: "<table
|
|
7215
|
+
template: "<table\n class=\"owl-dt-calendar-table owl-dt-calendar-month-table\"\n [class.owl-dt-calendar-only-current-month]=\"hideOtherMonths\"\n>\n <thead class=\"owl-dt-calendar-header\">\n <tr class=\"owl-dt-weekdays\">\n <th\n *ngFor=\"let weekday of weekdays\"\n [attr.aria-label]=\"weekday.long\"\n class=\"owl-dt-weekday\"\n scope=\"col\"\n >\n <span>{{ weekday.short }}</span>\n </th>\n </tr>\n <tr>\n <th\n class=\"owl-dt-calendar-table-divider\"\n aria-hidden=\"true\"\n colspan=\"7\"\n ></th>\n </tr>\n </thead>\n <tbody\n owl-date-time-calendar-body\n role=\"grid\"\n [rows]=\"days\"\n [todayValue]=\"todayDate\"\n [selectedValues]=\"selectedDates\"\n [selectMode]=\"selectMode\"\n [activeCell]=\"activeCell\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\"\n ></tbody>\n</table>\n",
|
|
7429
7216
|
host: {
|
|
7430
7217
|
'[class.owl-dt-calendar-view]': 'owlDTCalendarView'
|
|
7431
7218
|
},
|
|
@@ -7776,7 +7563,7 @@ OwlYearViewComponent.decorators = [
|
|
|
7776
7563
|
{ type: Component, args: [{
|
|
7777
7564
|
selector: 'owl-date-time-year-view',
|
|
7778
7565
|
exportAs: 'owlMonthView',
|
|
7779
|
-
template: "<table class=\"owl-dt-calendar-table owl-dt-calendar-year-table\">\n
|
|
7566
|
+
template: "<table class=\"owl-dt-calendar-table owl-dt-calendar-year-table\">\n <thead class=\"owl-dt-calendar-header\">\n <tr>\n <th\n class=\"owl-dt-calendar-table-divider\"\n aria-hidden=\"true\"\n colspan=\"3\"\n ></th>\n </tr>\n </thead>\n <tbody\n owl-date-time-calendar-body\n role=\"grid\"\n [rows]=\"months\"\n [numCols]=\"3\"\n [cellRatio]=\"3 / 7\"\n [activeCell]=\"activeCell\"\n [todayValue]=\"todayMonth\"\n [selectedValues]=\"selectedMonths\"\n [selectMode]=\"selectMode\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\"\n ></tbody>\n</table>\n",
|
|
7780
7567
|
host: {
|
|
7781
7568
|
'[class.owl-dt-calendar-view]': 'owlDTCalendarView'
|
|
7782
7569
|
},
|
|
@@ -8134,7 +7921,7 @@ class OwlMultiYearViewComponent {
|
|
|
8134
7921
|
OwlMultiYearViewComponent.decorators = [
|
|
8135
7922
|
{ type: Component, args: [{
|
|
8136
7923
|
selector: 'owl-date-time-multi-year-view',
|
|
8137
|
-
template: "<button
|
|
7924
|
+
template: "<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n [disabled]=\"!previousEnabled()\"\n [attr.aria-label]=\"prevButtonLabel\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"prevYearList($event)\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Left\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M96.633,125.369l95.053-94.533c7.101-7.055,7.101-18.492,0-25.546 c-7.1-7.054-18.613-7.054-25.714,0L58.989,111.689c-3.784,3.759-5.487,8.759-5.238,13.68c-0.249,4.922,1.454,9.921,5.238,13.681 l106.983,106.398c7.101,7.055,18.613,7.055,25.714,0c7.101-7.054,7.101-18.491,0-25.544L96.633,125.369z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n<table class=\"owl-dt-calendar-table owl-dt-calendar-multi-year-table\">\n <thead class=\"owl-dt-calendar-header\">\n <tr>\n <th colspan=\"3\">{{ tableHeader }}</th>\n </tr>\n </thead>\n <tbody\n owl-date-time-calendar-body\n role=\"grid\"\n [rows]=\"years\"\n [numCols]=\"3\"\n [cellRatio]=\"3 / 7\"\n [activeCell]=\"activeCell\"\n [todayValue]=\"todayYear\"\n [selectedValues]=\"selectedYears\"\n [selectMode]=\"selectMode\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\"\n ></tbody>\n</table>\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n [disabled]=\"!nextEnabled()\"\n [attr.aria-label]=\"nextButtonLabel\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"nextYearList($event)\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Right\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M191.75,111.689L84.766,5.291c-7.1-7.055-18.613-7.055-25.713,0\n c-7.101,7.054-7.101,18.49,0,25.544l95.053,94.534l-95.053,94.533c-7.101,7.054-7.101,18.491,0,25.545\n c7.1,7.054,18.613,7.054,25.713,0L191.75,139.05c3.784-3.759,5.487-8.759,5.238-13.681\n C197.237,120.447,195.534,115.448,191.75,111.689z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n",
|
|
8138
7925
|
host: {
|
|
8139
7926
|
'[class.owl-dt-calendar-view]': 'owlDTCalendarView',
|
|
8140
7927
|
'[class.owl-dt-calendar-multi-year-view]': 'owlDTCalendarMultiYearView'
|
|
@@ -8216,7 +8003,7 @@ OwlTimerBoxComponent.decorators = [
|
|
|
8216
8003
|
{ type: Component, args: [{
|
|
8217
8004
|
exportAs: 'owlDateTimeTimerBox',
|
|
8218
8005
|
selector: 'owl-date-time-timer-box',
|
|
8219
|
-
template: "<div *ngIf=\"showDivider\" class=\"owl-dt-timer-divider\" aria-hidden=\"true\"></div>\n<button
|
|
8006
|
+
template: "<div *ngIf=\"showDivider\" class=\"owl-dt-timer-divider\" aria-hidden=\"true\"></div>\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"upBtnDisabled\"\n [attr.aria-label]=\"upBtnAriaLabel\"\n (click)=\"upBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Up\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M248.292,106.406l194.281,194.29c12.365,12.359,12.365,32.391,0,44.744c-12.354,12.354-32.391,12.354-44.744,0\n L225.923,173.529L54.018,345.44c-12.36,12.354-32.395,12.354-44.748,0c-12.359-12.354-12.359-32.391,0-44.75L203.554,106.4\n c6.18-6.174,14.271-9.259,22.369-9.259C234.018,97.141,242.115,100.232,248.292,106.406z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n<label class=\"owl-dt-timer-content\">\n <input\n class=\"owl-dt-timer-input\"\n maxlength=\"2\"\n [value]=\"displayValue | numberFixedLen: 2\"\n (input)=\"handleInputChange(valueInput.value)\"\n #valueInput\n />\n <span class=\"owl-hidden-accessible\">{{ inputLabel }}</span>\n</label>\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"downBtnDisabled\"\n [attr.aria-label]=\"downBtnAriaLabel\"\n (click)=\"downBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Down\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751\n c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0\n c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n",
|
|
8220
8007
|
preserveWhitespaces: false,
|
|
8221
8008
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8222
8009
|
host: {
|
|
@@ -8266,7 +8053,7 @@ NumberFixedLenPipe.decorators = [
|
|
|
8266
8053
|
];
|
|
8267
8054
|
|
|
8268
8055
|
/* eslint-disable @angular-eslint/no-host-metadata-property */
|
|
8269
|
-
const OWL_DATETIME_VALUE_ACCESSOR = {
|
|
8056
|
+
const OWL_DATETIME_VALUE_ACCESSOR$1 = {
|
|
8270
8057
|
provide: NG_VALUE_ACCESSOR,
|
|
8271
8058
|
useExisting: forwardRef(() => OwlDateTimeInlineComponent),
|
|
8272
8059
|
multi: true
|
|
@@ -8476,13 +8263,13 @@ class OwlDateTimeInlineComponent extends OwlDateTime {
|
|
|
8476
8263
|
OwlDateTimeInlineComponent.decorators = [
|
|
8477
8264
|
{ type: Component, args: [{
|
|
8478
8265
|
selector: 'owl-date-time-inline',
|
|
8479
|
-
template: "<owl-date-time-container></owl-date-time-container
|
|
8266
|
+
template: "<owl-date-time-container></owl-date-time-container>\n",
|
|
8480
8267
|
host: {
|
|
8481
8268
|
'[class.owl-dt-inline]': 'owlDTInlineClass'
|
|
8482
8269
|
},
|
|
8483
8270
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8484
8271
|
preserveWhitespaces: false,
|
|
8485
|
-
providers: [OWL_DATETIME_VALUE_ACCESSOR],
|
|
8272
|
+
providers: [OWL_DATETIME_VALUE_ACCESSOR$1],
|
|
8486
8273
|
styles: [""]
|
|
8487
8274
|
},] }
|
|
8488
8275
|
];
|
|
@@ -8609,9 +8396,9 @@ const DEFAULT_DAY_OF_WEEK_NAMES = {
|
|
|
8609
8396
|
short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
8610
8397
|
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
|
|
8611
8398
|
};
|
|
8612
|
-
const ɵ0
|
|
8399
|
+
const ɵ0 = (i) => String(i + 1);
|
|
8613
8400
|
/** The default date names to use if Intl API is not available. */
|
|
8614
|
-
const DEFAULT_DATE_NAMES = range(31, ɵ0
|
|
8401
|
+
const DEFAULT_DATE_NAMES = range(31, ɵ0);
|
|
8615
8402
|
/** Whether the browser supports the Intl API. */
|
|
8616
8403
|
const SUPPORTS_INTL_API = typeof Intl !== 'undefined';
|
|
8617
8404
|
/**
|
|
@@ -8927,14 +8714,14 @@ NativeDateTimeModule.decorators = [
|
|
|
8927
8714
|
providers: [{ provide: DateTimeAdapter, useClass: NativeDateTimeAdapter }]
|
|
8928
8715
|
},] }
|
|
8929
8716
|
];
|
|
8930
|
-
const ɵ0 = OWL_NATIVE_DATE_TIME_FORMATS;
|
|
8717
|
+
const ɵ0$1 = OWL_NATIVE_DATE_TIME_FORMATS;
|
|
8931
8718
|
class OwlNativeDateTimeModule {
|
|
8932
8719
|
}
|
|
8933
8720
|
OwlNativeDateTimeModule.decorators = [
|
|
8934
8721
|
{ type: NgModule, args: [{
|
|
8935
8722
|
imports: [NativeDateTimeModule],
|
|
8936
8723
|
providers: [
|
|
8937
|
-
{ provide: OWL_DATE_TIME_FORMATS, useValue: ɵ0 }
|
|
8724
|
+
{ provide: OWL_DATE_TIME_FORMATS, useValue: ɵ0$1 }
|
|
8938
8725
|
]
|
|
8939
8726
|
},] }
|
|
8940
8727
|
];
|
|
@@ -8959,7 +8746,7 @@ NgxDateTimePickerModule.decorators = [
|
|
|
8959
8746
|
},] }
|
|
8960
8747
|
];
|
|
8961
8748
|
|
|
8962
|
-
class Option
|
|
8749
|
+
class Option {
|
|
8963
8750
|
constructor(options) {
|
|
8964
8751
|
this.label = options.label;
|
|
8965
8752
|
this.value = options.value;
|
|
@@ -9000,7 +8787,7 @@ class AfeNgSelectComponent {
|
|
|
9000
8787
|
// console.log('options', options);
|
|
9001
8788
|
const mappedOptions = new Array();
|
|
9002
8789
|
for (let i = 0; i < options.length; i++) {
|
|
9003
|
-
mappedOptions.push(new Option
|
|
8790
|
+
mappedOptions.push(new Option(options[i]));
|
|
9004
8791
|
}
|
|
9005
8792
|
this.subject.next(mappedOptions);
|
|
9006
8793
|
}, (error) => {
|
|
@@ -9054,12 +8841,12 @@ class FormSchemaCompiler {
|
|
|
9054
8841
|
compileFormSchema(formSchema, referencedComponents) {
|
|
9055
8842
|
// get all referenced forms
|
|
9056
8843
|
const refForms = this.getReferencedForms(formSchema, referencedComponents);
|
|
9057
|
-
if (
|
|
8844
|
+
if (isEmpty(refForms)) {
|
|
9058
8845
|
return formSchema;
|
|
9059
8846
|
}
|
|
9060
8847
|
// get all place-holders from the form schema
|
|
9061
8848
|
const placeHolders = this.getAllPlaceholderObjects(formSchema);
|
|
9062
|
-
if (
|
|
8849
|
+
if (isEmpty(placeHolders)) {
|
|
9063
8850
|
return formSchema;
|
|
9064
8851
|
}
|
|
9065
8852
|
// replace all placeHolders
|
|
@@ -9067,11 +8854,11 @@ class FormSchemaCompiler {
|
|
|
9067
8854
|
return formSchema;
|
|
9068
8855
|
}
|
|
9069
8856
|
findSchemaByName(schemaArray, nameOfSchema) {
|
|
9070
|
-
if (
|
|
8857
|
+
if (isEmpty(schemaArray) || isEmpty(nameOfSchema)) {
|
|
9071
8858
|
return;
|
|
9072
8859
|
}
|
|
9073
8860
|
let foundSchema = {};
|
|
9074
|
-
|
|
8861
|
+
each(schemaArray, (schema) => {
|
|
9075
8862
|
if (schema.name === nameOfSchema) {
|
|
9076
8863
|
foundSchema = schema;
|
|
9077
8864
|
}
|
|
@@ -9079,11 +8866,11 @@ class FormSchemaCompiler {
|
|
|
9079
8866
|
return foundSchema;
|
|
9080
8867
|
}
|
|
9081
8868
|
getPageInSchemaByLabel(schema, pageLabel) {
|
|
9082
|
-
if (
|
|
8869
|
+
if (isEmpty(schema) || isEmpty(pageLabel)) {
|
|
9083
8870
|
return;
|
|
9084
8871
|
}
|
|
9085
8872
|
let foundPage = {};
|
|
9086
|
-
|
|
8873
|
+
each(schema.pages, (page) => {
|
|
9087
8874
|
if (page.label === pageLabel) {
|
|
9088
8875
|
foundPage = page;
|
|
9089
8876
|
}
|
|
@@ -9091,15 +8878,15 @@ class FormSchemaCompiler {
|
|
|
9091
8878
|
return foundPage;
|
|
9092
8879
|
}
|
|
9093
8880
|
getSectionInSchemaByPageLabelBySectionLabel(schema, pageLabel, sectionLabel) {
|
|
9094
|
-
if (
|
|
8881
|
+
if (isEmpty(schema) || isEmpty(pageLabel) || isEmpty(sectionLabel)) {
|
|
9095
8882
|
return;
|
|
9096
8883
|
}
|
|
9097
8884
|
const foundPage = this.getPageInSchemaByLabel(schema, pageLabel);
|
|
9098
|
-
if (
|
|
8885
|
+
if (isEmpty(foundPage)) {
|
|
9099
8886
|
return;
|
|
9100
8887
|
}
|
|
9101
8888
|
let foundSection = {};
|
|
9102
|
-
|
|
8889
|
+
each(foundPage.sections, (section) => {
|
|
9103
8890
|
if (section.label === sectionLabel) {
|
|
9104
8891
|
foundSection = section;
|
|
9105
8892
|
}
|
|
@@ -9107,16 +8894,16 @@ class FormSchemaCompiler {
|
|
|
9107
8894
|
return foundSection;
|
|
9108
8895
|
}
|
|
9109
8896
|
getQuestionByIdInSchema(schema, questionId) {
|
|
9110
|
-
if (
|
|
8897
|
+
if (isEmpty(schema) || isEmpty(questionId)) {
|
|
9111
8898
|
return;
|
|
9112
8899
|
}
|
|
9113
8900
|
if (Array.isArray(schema)) {
|
|
9114
8901
|
let question;
|
|
9115
8902
|
for (let i = 0; i < schema.length; i++) {
|
|
9116
|
-
if (!
|
|
8903
|
+
if (!isEmpty(schema[i])) {
|
|
9117
8904
|
question = this.getQuestionByIdInSchema(schema[i], questionId);
|
|
9118
8905
|
}
|
|
9119
|
-
if (!
|
|
8906
|
+
if (!isEmpty(question)) {
|
|
9120
8907
|
break;
|
|
9121
8908
|
}
|
|
9122
8909
|
}
|
|
@@ -9139,7 +8926,7 @@ class FormSchemaCompiler {
|
|
|
9139
8926
|
}
|
|
9140
8927
|
}
|
|
9141
8928
|
getQuestionsArrayByQuestionIdInSchema(schema, questionId) {
|
|
9142
|
-
if (
|
|
8929
|
+
if (isEmpty(schema) || isEmpty(questionId)) {
|
|
9143
8930
|
return;
|
|
9144
8931
|
}
|
|
9145
8932
|
return this.getQuestionsArrayByQuestionId(schema, schema, questionId);
|
|
@@ -9148,10 +8935,10 @@ class FormSchemaCompiler {
|
|
|
9148
8935
|
if (Array.isArray(object)) {
|
|
9149
8936
|
let returnedValue;
|
|
9150
8937
|
for (let i = 0; i < object.length; i++) {
|
|
9151
|
-
if (!
|
|
8938
|
+
if (!isEmpty(object[i])) {
|
|
9152
8939
|
returnedValue = this.getQuestionsArrayByQuestionId(object, object[i], questionId);
|
|
9153
8940
|
}
|
|
9154
|
-
if (!
|
|
8941
|
+
if (!isEmpty(returnedValue)) {
|
|
9155
8942
|
break;
|
|
9156
8943
|
}
|
|
9157
8944
|
}
|
|
@@ -9177,9 +8964,9 @@ class FormSchemaCompiler {
|
|
|
9177
8964
|
isSchemaSubObjectExpandable(object) {
|
|
9178
8965
|
if (typeof object === 'object') {
|
|
9179
8966
|
const objectKeys = Object.keys(object);
|
|
9180
|
-
if (
|
|
9181
|
-
|
|
9182
|
-
|
|
8967
|
+
if (includes(objectKeys, 'pages') ||
|
|
8968
|
+
includes(objectKeys, 'sections') ||
|
|
8969
|
+
includes(objectKeys, 'questions')) {
|
|
9183
8970
|
return true;
|
|
9184
8971
|
}
|
|
9185
8972
|
}
|
|
@@ -9194,18 +8981,18 @@ class FormSchemaCompiler {
|
|
|
9194
8981
|
return referencedObjects;
|
|
9195
8982
|
}
|
|
9196
8983
|
extractPlaceholderObjects(subSchema, objectsArray) {
|
|
9197
|
-
if (
|
|
8984
|
+
if (isEmpty(subSchema)) {
|
|
9198
8985
|
return;
|
|
9199
8986
|
}
|
|
9200
8987
|
if (Array.isArray(subSchema)) {
|
|
9201
8988
|
for (let i = 0; i < subSchema.length; i++) {
|
|
9202
|
-
if (!
|
|
8989
|
+
if (!isEmpty(subSchema[i])) {
|
|
9203
8990
|
this.extractPlaceholderObjects(subSchema[i], objectsArray);
|
|
9204
8991
|
}
|
|
9205
8992
|
}
|
|
9206
8993
|
}
|
|
9207
8994
|
else if (typeof subSchema === 'object') {
|
|
9208
|
-
if (!
|
|
8995
|
+
if (!isEmpty(subSchema.reference)) {
|
|
9209
8996
|
objectsArray.push(subSchema);
|
|
9210
8997
|
}
|
|
9211
8998
|
else if (this.isSchemaSubObjectExpandable(subSchema)) {
|
|
@@ -9216,16 +9003,16 @@ class FormSchemaCompiler {
|
|
|
9216
9003
|
}
|
|
9217
9004
|
fillPlaceholderObject(placeHolderObject, referenceObject) {
|
|
9218
9005
|
for (const member in referenceObject) {
|
|
9219
|
-
if (
|
|
9006
|
+
if (isEmpty(placeHolderObject[member])) {
|
|
9220
9007
|
placeHolderObject[member] = referenceObject[member];
|
|
9221
9008
|
}
|
|
9222
9009
|
}
|
|
9223
9010
|
return placeHolderObject;
|
|
9224
9011
|
}
|
|
9225
9012
|
replaceAllPlaceholdersWithActualObjects(keyValReferencedForms, placeHoldersArray) {
|
|
9226
|
-
|
|
9013
|
+
each(placeHoldersArray, (placeHolder) => {
|
|
9227
9014
|
const referencedObject = this.getReferencedObject(placeHolder.reference, keyValReferencedForms);
|
|
9228
|
-
if (
|
|
9015
|
+
if (isEmpty(referencedObject)) {
|
|
9229
9016
|
console.error('Form compile: Error finding referenced object', placeHolder.reference);
|
|
9230
9017
|
}
|
|
9231
9018
|
else {
|
|
@@ -9245,7 +9032,7 @@ class FormSchemaCompiler {
|
|
|
9245
9032
|
}
|
|
9246
9033
|
removeExcludedQuestionsFromPlaceholder(placeHolder) {
|
|
9247
9034
|
if (Array.isArray(placeHolder.reference.excludeQuestions)) {
|
|
9248
|
-
|
|
9035
|
+
each(placeHolder.reference.excludeQuestions, (excludedQuestionId) => {
|
|
9249
9036
|
const questionsArray = this.getQuestionsArrayByQuestionIdInSchema(placeHolder, excludedQuestionId);
|
|
9250
9037
|
if (!Array.isArray(questionsArray)) {
|
|
9251
9038
|
return;
|
|
@@ -9257,32 +9044,32 @@ class FormSchemaCompiler {
|
|
|
9257
9044
|
return placeHolder;
|
|
9258
9045
|
}
|
|
9259
9046
|
getReferencedObject(referenceData, keyValReferencedForms) {
|
|
9260
|
-
if (
|
|
9047
|
+
if (isEmpty(referenceData.form)) {
|
|
9261
9048
|
console.error('Form compile: reference missing form attribute', referenceData);
|
|
9262
9049
|
return;
|
|
9263
9050
|
}
|
|
9264
|
-
if (
|
|
9051
|
+
if (isEmpty(keyValReferencedForms[referenceData.form])) {
|
|
9265
9052
|
console.error('Form compile: referenced form alias not found', referenceData);
|
|
9266
9053
|
return;
|
|
9267
9054
|
}
|
|
9268
|
-
if (!
|
|
9055
|
+
if (!isEmpty(referenceData.questionId)) {
|
|
9269
9056
|
return this.getQuestionByIdInSchema(keyValReferencedForms[referenceData.form], referenceData.questionId);
|
|
9270
9057
|
}
|
|
9271
|
-
if (!
|
|
9058
|
+
if (!isEmpty(referenceData.page) && !isEmpty(referenceData.section)) {
|
|
9272
9059
|
return this.getSectionInSchemaByPageLabelBySectionLabel(keyValReferencedForms[referenceData.form], referenceData.page, referenceData.section);
|
|
9273
9060
|
}
|
|
9274
|
-
if (!
|
|
9061
|
+
if (!isEmpty(referenceData.page)) {
|
|
9275
9062
|
return this.getPageInSchemaByLabel(keyValReferencedForms[referenceData.form], referenceData.page);
|
|
9276
9063
|
}
|
|
9277
9064
|
console.error('Form compile: Unsupported reference type', referenceData.reference);
|
|
9278
9065
|
}
|
|
9279
9066
|
getReferencedForms(formSchema, formSchemasLookupArray) {
|
|
9280
9067
|
const referencedForms = formSchema.referencedForms;
|
|
9281
|
-
if (
|
|
9068
|
+
if (isEmpty(referencedForms)) {
|
|
9282
9069
|
return;
|
|
9283
9070
|
}
|
|
9284
9071
|
const keyValReferencedForms = {};
|
|
9285
|
-
|
|
9072
|
+
each(referencedForms, (reference) => {
|
|
9286
9073
|
keyValReferencedForms[reference.alias] = this.findSchemaByName(formSchemasLookupArray, reference.formName);
|
|
9287
9074
|
});
|
|
9288
9075
|
return keyValReferencedForms;
|
|
@@ -9440,7 +9227,7 @@ class DummyDataSource {
|
|
|
9440
9227
|
resolveSelectedValue(value) {
|
|
9441
9228
|
let selectOptions = this.sampleData();
|
|
9442
9229
|
selectOptions = selectOptions.map(function (obj) {
|
|
9443
|
-
const option = new Option
|
|
9230
|
+
const option = new Option({
|
|
9444
9231
|
label: obj.label,
|
|
9445
9232
|
value: obj.concept
|
|
9446
9233
|
});
|
|
@@ -9465,7 +9252,7 @@ class DummyDataSource {
|
|
|
9465
9252
|
searchOptions(searchText) {
|
|
9466
9253
|
let selectOptions = this.sampleData();
|
|
9467
9254
|
selectOptions = selectOptions.map(function (obj) {
|
|
9468
|
-
const option = new Option
|
|
9255
|
+
const option = new Option({
|
|
9469
9256
|
label: obj.label,
|
|
9470
9257
|
value: obj.concept
|
|
9471
9258
|
});
|
|
@@ -9556,13 +9343,13 @@ class HistoricalEncounterDataService {
|
|
|
9556
9343
|
return encStore.data[index];
|
|
9557
9344
|
}
|
|
9558
9345
|
};
|
|
9559
|
-
if (
|
|
9346
|
+
if (_.isArray(encounters)) {
|
|
9560
9347
|
const group = [];
|
|
9561
|
-
|
|
9348
|
+
_.each(encounters, (encounter) => {
|
|
9562
9349
|
group.push(this._transformEncounter(encounter));
|
|
9563
9350
|
});
|
|
9564
9351
|
// Sort them in reverse chronological order
|
|
9565
|
-
encStore.data =
|
|
9352
|
+
encStore.data = _.sortBy(group, 'encounterDatetime').reverse();
|
|
9566
9353
|
}
|
|
9567
9354
|
else {
|
|
9568
9355
|
// Assume a single openmrs rest encounter object.
|
|
@@ -9582,24 +9369,24 @@ class HistoricalEncounterDataService {
|
|
|
9582
9369
|
if (answers.length > 0) {
|
|
9583
9370
|
return {
|
|
9584
9371
|
value: answers[0],
|
|
9585
|
-
valueDate: moment(object.encounterDatetime).format('
|
|
9372
|
+
valueDate: moment(object.encounterDatetime).format('YYYY-MM-DDTHH:mm:ss')
|
|
9586
9373
|
};
|
|
9587
9374
|
}
|
|
9588
9375
|
}
|
|
9589
9376
|
getAllValues(path, object, answers) {
|
|
9590
|
-
if (
|
|
9377
|
+
if (_.isNil(object)) {
|
|
9591
9378
|
return;
|
|
9592
9379
|
}
|
|
9593
9380
|
if (path.length <= 1) {
|
|
9594
|
-
if (!
|
|
9381
|
+
if (!_.isNil(object[path[0]])) {
|
|
9595
9382
|
answers.push(object[path[0]]);
|
|
9596
9383
|
}
|
|
9597
9384
|
return;
|
|
9598
9385
|
}
|
|
9599
9386
|
const newpath = path.splice(1);
|
|
9600
9387
|
const key = path[0];
|
|
9601
|
-
if (
|
|
9602
|
-
|
|
9388
|
+
if (_.isArray(object[key]) && object[key].length > 0) {
|
|
9389
|
+
_.each(object[key], (childObject) => {
|
|
9603
9390
|
this.getAllValues(newpath.slice(0), childObject, answers);
|
|
9604
9391
|
});
|
|
9605
9392
|
}
|
|
@@ -9608,7 +9395,7 @@ class HistoricalEncounterDataService {
|
|
|
9608
9395
|
}
|
|
9609
9396
|
}
|
|
9610
9397
|
_transformEncounter(encounter) {
|
|
9611
|
-
if (
|
|
9398
|
+
if (_.isNil(encounter)) {
|
|
9612
9399
|
return;
|
|
9613
9400
|
}
|
|
9614
9401
|
// Transform encounter Level details to key value pairs.
|
|
@@ -9635,7 +9422,7 @@ class HistoricalEncounterDataService {
|
|
|
9635
9422
|
if (encounter.obs) {
|
|
9636
9423
|
const processedObs = this._transformObs(encounter.obs);
|
|
9637
9424
|
// add in individual processed obs to prevEncounter
|
|
9638
|
-
|
|
9425
|
+
_.extend(prevEncounter, processedObs);
|
|
9639
9426
|
}
|
|
9640
9427
|
return prevEncounter;
|
|
9641
9428
|
}
|
|
@@ -9644,19 +9431,19 @@ class HistoricalEncounterDataService {
|
|
|
9644
9431
|
return null;
|
|
9645
9432
|
}
|
|
9646
9433
|
const obsRep = {};
|
|
9647
|
-
if (
|
|
9648
|
-
|
|
9434
|
+
if (_.isArray(obs)) {
|
|
9435
|
+
_.each(obs, (singleObs) => {
|
|
9649
9436
|
this._augumentObs(obsRep, this._transformObs(singleObs));
|
|
9650
9437
|
});
|
|
9651
9438
|
return obsRep;
|
|
9652
9439
|
}
|
|
9653
9440
|
else if (obs.groupMembers) {
|
|
9654
9441
|
const group = {};
|
|
9655
|
-
|
|
9442
|
+
_.each(obs.groupMembers, (member) => {
|
|
9656
9443
|
this._augumentObs(group, this._transformObs(member));
|
|
9657
9444
|
});
|
|
9658
9445
|
// Handle already existing data
|
|
9659
|
-
if (obsRep[obs.concept.uuid] &&
|
|
9446
|
+
if (obsRep[obs.concept.uuid] && _.isArray(obsRep[obs.concept.uuid])) {
|
|
9660
9447
|
obsRep[obs.concept.uuid].push(group);
|
|
9661
9448
|
}
|
|
9662
9449
|
else {
|
|
@@ -9676,14 +9463,14 @@ class HistoricalEncounterDataService {
|
|
|
9676
9463
|
}
|
|
9677
9464
|
_augumentObs(existing, toAdd) {
|
|
9678
9465
|
for (const key in toAdd) {
|
|
9679
|
-
if (
|
|
9466
|
+
if (_.has(existing, key)) {
|
|
9680
9467
|
// check if not an array yet
|
|
9681
|
-
if (!
|
|
9468
|
+
if (!_.isArray(existing[key])) {
|
|
9682
9469
|
const temp = existing[key];
|
|
9683
9470
|
existing[key] = [temp];
|
|
9684
9471
|
}
|
|
9685
9472
|
// Check whether the incoming is array (for group members)
|
|
9686
|
-
if (
|
|
9473
|
+
if (_.isArray(toAdd[key])) {
|
|
9687
9474
|
Array.prototype.push.apply(existing[key], toAdd[key]);
|
|
9688
9475
|
}
|
|
9689
9476
|
else {
|
|
@@ -9739,6 +9526,7 @@ class QuestionFactory {
|
|
|
9739
9526
|
constructor() {
|
|
9740
9527
|
this.dataSources = {};
|
|
9741
9528
|
this.historicalHelperService = new HistoricalHelperService();
|
|
9529
|
+
this.quetionIndex = 0;
|
|
9742
9530
|
}
|
|
9743
9531
|
createQuestionModel(formSchema, form) {
|
|
9744
9532
|
if (form) {
|
|
@@ -9749,7 +9537,9 @@ class QuestionFactory {
|
|
|
9749
9537
|
}
|
|
9750
9538
|
toSelectQuestion(schemaQuestion) {
|
|
9751
9539
|
const question = new SelectQuestion({ options: [], type: '', key: '' });
|
|
9540
|
+
question.questionIndex = this.quetionIndex;
|
|
9752
9541
|
question.label = schemaQuestion.label;
|
|
9542
|
+
question.prefix = schemaQuestion.prefix;
|
|
9753
9543
|
question.key = schemaQuestion.id;
|
|
9754
9544
|
question.componentConfigs = schemaQuestion.componentConfigs || [];
|
|
9755
9545
|
question.options = schemaQuestion.questionOptions.answers.map(function (obj) {
|
|
@@ -9784,7 +9574,9 @@ class QuestionFactory {
|
|
|
9784
9574
|
type: '',
|
|
9785
9575
|
key: ''
|
|
9786
9576
|
});
|
|
9577
|
+
question.questionIndex = this.quetionIndex;
|
|
9787
9578
|
question.label = schemaQuestion.label;
|
|
9579
|
+
question.prefix = schemaQuestion.prefix;
|
|
9788
9580
|
question.key = schemaQuestion.id;
|
|
9789
9581
|
question.renderingType = 'number';
|
|
9790
9582
|
question.placeholder = schemaQuestion.questionOptions.placeholder;
|
|
@@ -9810,7 +9602,9 @@ class QuestionFactory {
|
|
|
9810
9602
|
type: '',
|
|
9811
9603
|
key: ''
|
|
9812
9604
|
});
|
|
9605
|
+
question.questionIndex = this.quetionIndex;
|
|
9813
9606
|
question.label = schemaQuestion.label;
|
|
9607
|
+
question.prefix = schemaQuestion.prefix;
|
|
9814
9608
|
question.key = schemaQuestion.id;
|
|
9815
9609
|
question.renderingType = 'number';
|
|
9816
9610
|
question.placeholder = schemaQuestion.questionOptions.placeholder || '';
|
|
@@ -9834,6 +9628,7 @@ class QuestionFactory {
|
|
|
9834
9628
|
return this.toEncounterDatetimeQuestion(schemaQuestion);
|
|
9835
9629
|
}
|
|
9836
9630
|
const question = new DateQuestion({ type: '', key: '' });
|
|
9631
|
+
question.questionIndex = this.quetionIndex;
|
|
9837
9632
|
question.renderingType = 'date';
|
|
9838
9633
|
question.validators = this.addValidators(schemaQuestion);
|
|
9839
9634
|
question.extras = schemaQuestion;
|
|
@@ -9855,8 +9650,11 @@ class QuestionFactory {
|
|
|
9855
9650
|
return question;
|
|
9856
9651
|
}
|
|
9857
9652
|
toEncounterDatetimeQuestion(schemaQuestion) {
|
|
9653
|
+
var _a;
|
|
9858
9654
|
const question = new DateQuestion({ type: '', key: '' });
|
|
9655
|
+
question.questionIndex = this.quetionIndex;
|
|
9859
9656
|
question.label = schemaQuestion.label;
|
|
9657
|
+
question.prefix = schemaQuestion.prefix;
|
|
9860
9658
|
question.renderingType = 'date';
|
|
9861
9659
|
question.key = schemaQuestion.id;
|
|
9862
9660
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -9871,6 +9669,7 @@ class QuestionFactory {
|
|
|
9871
9669
|
};
|
|
9872
9670
|
question.showTime = true;
|
|
9873
9671
|
question.componentConfigs = schemaQuestion.componentConfigs || [];
|
|
9672
|
+
question.datePickerFormat = (_a = schemaQuestion.datePickerFormat) !== null && _a !== void 0 ? _a : 'calendar';
|
|
9874
9673
|
this.copyProperties(mappings, schemaQuestion, question);
|
|
9875
9674
|
this.addDisableOrHideProperty(schemaQuestion, question);
|
|
9876
9675
|
this.addAlertProperty(schemaQuestion, question);
|
|
@@ -9880,9 +9679,12 @@ class QuestionFactory {
|
|
|
9880
9679
|
}
|
|
9881
9680
|
toCheckBoxQuestion(schemaQuestion) {
|
|
9882
9681
|
const question = new CheckBoxQuestion({ options: [], type: '', key: '' });
|
|
9682
|
+
question.questionIndex = this.quetionIndex;
|
|
9883
9683
|
question.label = schemaQuestion.label;
|
|
9684
|
+
question.prefix = schemaQuestion.prefix;
|
|
9884
9685
|
question.key = schemaQuestion.id;
|
|
9885
9686
|
question.extras = schemaQuestion;
|
|
9687
|
+
question.orientation = schemaQuestion.questionOptions.orientation;
|
|
9886
9688
|
question.options = schemaQuestion.questionOptions.answers.map((obj) => {
|
|
9887
9689
|
return {
|
|
9888
9690
|
label: obj.label,
|
|
@@ -9911,7 +9713,9 @@ class QuestionFactory {
|
|
|
9911
9713
|
type: '',
|
|
9912
9714
|
key: ''
|
|
9913
9715
|
});
|
|
9716
|
+
question.questionIndex = this.quetionIndex;
|
|
9914
9717
|
question.label = schemaQuestion.label;
|
|
9718
|
+
question.prefix = schemaQuestion.prefix;
|
|
9915
9719
|
question.key = schemaQuestion.id;
|
|
9916
9720
|
question.options = schemaQuestion.questionOptions.answers.map(function (obj) {
|
|
9917
9721
|
return {
|
|
@@ -9943,7 +9747,9 @@ class QuestionFactory {
|
|
|
9943
9747
|
type: '',
|
|
9944
9748
|
key: ''
|
|
9945
9749
|
});
|
|
9750
|
+
question.questionIndex = this.quetionIndex;
|
|
9946
9751
|
question.label = schemaQuestion.label;
|
|
9752
|
+
question.prefix = schemaQuestion.prefix;
|
|
9947
9753
|
question.key = schemaQuestion.id;
|
|
9948
9754
|
question.placeholder = schemaQuestion.questionOptions.placeholder;
|
|
9949
9755
|
question.isExpanded = schemaQuestion.isExpanded;
|
|
@@ -9970,7 +9776,9 @@ class QuestionFactory {
|
|
|
9970
9776
|
type: '',
|
|
9971
9777
|
key: ''
|
|
9972
9778
|
});
|
|
9779
|
+
question.questionIndex = this.quetionIndex;
|
|
9973
9780
|
question.label = schemaQuestion.label;
|
|
9781
|
+
question.prefix = schemaQuestion.prefix;
|
|
9974
9782
|
question.key = schemaQuestion.id;
|
|
9975
9783
|
question.renderingType = 'text';
|
|
9976
9784
|
question.placeholder = schemaQuestion.questionOptions.placeholder;
|
|
@@ -9992,7 +9800,9 @@ class QuestionFactory {
|
|
|
9992
9800
|
}
|
|
9993
9801
|
toFileUploadQuestion(schemaQuestion) {
|
|
9994
9802
|
const question = new FileUploadQuestion({ type: '', key: '' });
|
|
9803
|
+
question.questionIndex = this.quetionIndex;
|
|
9995
9804
|
question.label = schemaQuestion.label;
|
|
9805
|
+
question.prefix = schemaQuestion.prefix;
|
|
9996
9806
|
question.key = schemaQuestion.id;
|
|
9997
9807
|
question.renderingType = 'file';
|
|
9998
9808
|
question.dataSource = 'file';
|
|
@@ -10013,7 +9823,9 @@ class QuestionFactory {
|
|
|
10013
9823
|
}
|
|
10014
9824
|
toDrugQuestion(schemaQuestion) {
|
|
10015
9825
|
const question = new SelectQuestion({ options: [], type: '', key: '' });
|
|
9826
|
+
question.questionIndex = this.quetionIndex;
|
|
10016
9827
|
question.label = schemaQuestion.label;
|
|
9828
|
+
question.prefix = schemaQuestion.prefix;
|
|
10017
9829
|
question.key = schemaQuestion.id;
|
|
10018
9830
|
question.renderingType = 'remote-select';
|
|
10019
9831
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10034,7 +9846,9 @@ class QuestionFactory {
|
|
|
10034
9846
|
}
|
|
10035
9847
|
toProblemQuestion(schemaQuestion) {
|
|
10036
9848
|
const question = new SelectQuestion({ options: [], type: '', key: '' });
|
|
9849
|
+
question.questionIndex = this.quetionIndex;
|
|
10037
9850
|
question.label = schemaQuestion.label;
|
|
9851
|
+
question.prefix = schemaQuestion.prefix;
|
|
10038
9852
|
question.key = schemaQuestion.id;
|
|
10039
9853
|
question.renderingType = 'remote-select';
|
|
10040
9854
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10055,7 +9869,9 @@ class QuestionFactory {
|
|
|
10055
9869
|
}
|
|
10056
9870
|
toConceptAnswerSelect(schemaQuestion) {
|
|
10057
9871
|
const question = new SelectQuestion({ options: [], type: '', key: '' });
|
|
9872
|
+
question.questionIndex = this.quetionIndex;
|
|
10058
9873
|
question.label = schemaQuestion.label;
|
|
9874
|
+
question.prefix = schemaQuestion.prefix;
|
|
10059
9875
|
question.key = schemaQuestion.id;
|
|
10060
9876
|
question.renderingType = 'remote-select';
|
|
10061
9877
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10084,7 +9900,9 @@ class QuestionFactory {
|
|
|
10084
9900
|
type: '',
|
|
10085
9901
|
key: ''
|
|
10086
9902
|
});
|
|
9903
|
+
question.questionIndex = this.quetionIndex;
|
|
10087
9904
|
question.label = schemaQuestion.label;
|
|
9905
|
+
question.prefix = schemaQuestion.prefix;
|
|
10088
9906
|
question.questions = this.getChildrenQuestionModels(schemaQuestion.questions);
|
|
10089
9907
|
question.key = schemaQuestion.id;
|
|
10090
9908
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10110,7 +9928,9 @@ class QuestionFactory {
|
|
|
10110
9928
|
}
|
|
10111
9929
|
toGroupQuestion(schemaQuestion) {
|
|
10112
9930
|
const question = new QuestionGroup({ questions: [], type: '', key: '' });
|
|
9931
|
+
question.questionIndex = this.quetionIndex;
|
|
10113
9932
|
question.label = schemaQuestion.label;
|
|
9933
|
+
question.prefix = schemaQuestion.prefix;
|
|
10114
9934
|
question.questions = this.getChildrenQuestionModels(schemaQuestion.questions);
|
|
10115
9935
|
question.key = schemaQuestion.id;
|
|
10116
9936
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10131,6 +9951,7 @@ class QuestionFactory {
|
|
|
10131
9951
|
toPageQuestion(schemaQuestion) {
|
|
10132
9952
|
const question = new QuestionGroup({ questions: [], type: '', key: '' });
|
|
10133
9953
|
question.label = schemaQuestion.label;
|
|
9954
|
+
question.prefix = schemaQuestion.prefix;
|
|
10134
9955
|
question.key = schemaQuestion.label;
|
|
10135
9956
|
question.renderingType = 'page';
|
|
10136
9957
|
question.controlType = AfeControlType.None;
|
|
@@ -10145,6 +9966,7 @@ class QuestionFactory {
|
|
|
10145
9966
|
const question = new QuestionGroup({ questions: [], type: '', key: '' });
|
|
10146
9967
|
question.label = schemaQuestion.label;
|
|
10147
9968
|
question.key = schemaQuestion.label;
|
|
9969
|
+
question.prefix = schemaQuestion.prefix;
|
|
10148
9970
|
question.renderingType = 'form';
|
|
10149
9971
|
question.controlType = AfeControlType.AfeFormGroup;
|
|
10150
9972
|
question.extras = schemaQuestion;
|
|
@@ -10158,6 +9980,7 @@ class QuestionFactory {
|
|
|
10158
9980
|
toSectionQuestion(schemaQuestion) {
|
|
10159
9981
|
const question = new QuestionGroup({ questions: [], type: '', key: '' });
|
|
10160
9982
|
question.label = schemaQuestion.label;
|
|
9983
|
+
question.prefix = schemaQuestion.prefix;
|
|
10161
9984
|
question.key = schemaQuestion.label;
|
|
10162
9985
|
question.renderingType = 'section';
|
|
10163
9986
|
question.controlType = AfeControlType.None;
|
|
@@ -10174,7 +9997,9 @@ class QuestionFactory {
|
|
|
10174
9997
|
searchFunction: function () { },
|
|
10175
9998
|
resolveFunction: function () { }
|
|
10176
9999
|
});
|
|
10000
|
+
question.questionIndex = this.quetionIndex;
|
|
10177
10001
|
question.label = schemaQuestion.label;
|
|
10002
|
+
question.prefix = schemaQuestion.prefix;
|
|
10178
10003
|
question.key = schemaQuestion.id;
|
|
10179
10004
|
question.renderingType = 'remote-select';
|
|
10180
10005
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10202,7 +10027,9 @@ class QuestionFactory {
|
|
|
10202
10027
|
searchFunction: function () { },
|
|
10203
10028
|
resolveFunction: function () { }
|
|
10204
10029
|
});
|
|
10030
|
+
question.questionIndex = this.quetionIndex;
|
|
10205
10031
|
question.label = schemaQuestion.label;
|
|
10032
|
+
question.prefix = schemaQuestion.prefix;
|
|
10206
10033
|
question.key = schemaQuestion.id;
|
|
10207
10034
|
question.renderingType = 'remote-select';
|
|
10208
10035
|
question.validators = this.addValidators(schemaQuestion);
|
|
@@ -10235,7 +10062,9 @@ class QuestionFactory {
|
|
|
10235
10062
|
searchFunction: function () { },
|
|
10236
10063
|
resolveFunction: function () { }
|
|
10237
10064
|
});
|
|
10065
|
+
question.questionIndex = this.quetionIndex;
|
|
10238
10066
|
question.label = schemaQuestion.label;
|
|
10067
|
+
question.prefix = schemaQuestion.prefix;
|
|
10239
10068
|
question.key = schemaQuestion.id;
|
|
10240
10069
|
question.renderingType = schemaQuestion.type;
|
|
10241
10070
|
question.renderingType = 'remote-select';
|
|
@@ -10265,7 +10094,9 @@ class QuestionFactory {
|
|
|
10265
10094
|
label: '',
|
|
10266
10095
|
rendering: ''
|
|
10267
10096
|
});
|
|
10097
|
+
question.questionIndex = this.quetionIndex;
|
|
10268
10098
|
question.label = schemaQuestion.label;
|
|
10099
|
+
question.prefix = schemaQuestion.prefix;
|
|
10269
10100
|
question.key = schemaQuestion.id;
|
|
10270
10101
|
question.validators = this.addValidators(schemaQuestion);
|
|
10271
10102
|
question.extras = schemaQuestion;
|
|
@@ -10328,6 +10159,7 @@ class QuestionFactory {
|
|
|
10328
10159
|
return children;
|
|
10329
10160
|
}
|
|
10330
10161
|
toModel(schema, renderType) {
|
|
10162
|
+
this.quetionIndex++;
|
|
10331
10163
|
if (renderType === 'ui-select-extended') {
|
|
10332
10164
|
renderType = schema.type;
|
|
10333
10165
|
}
|
|
@@ -10400,6 +10232,7 @@ class QuestionFactory {
|
|
|
10400
10232
|
const converted = {};
|
|
10401
10233
|
converted.type = 'complex-obs';
|
|
10402
10234
|
converted.label = schemaQuestion.label;
|
|
10235
|
+
converted.prefix = schemaQuestion.prefix;
|
|
10403
10236
|
converted.id = 'complex_' + schemaQuestion.id;
|
|
10404
10237
|
converted.questionOptions = {};
|
|
10405
10238
|
converted.questionOptions.concept = schemaQuestion.questionOptions.concept;
|
|
@@ -10438,7 +10271,7 @@ class QuestionFactory {
|
|
|
10438
10271
|
const validators = [];
|
|
10439
10272
|
if (schemaQuestion.validators) {
|
|
10440
10273
|
// TODO - add more validator types
|
|
10441
|
-
|
|
10274
|
+
_.forEach(schemaQuestion.validators, (validator) => {
|
|
10442
10275
|
switch (validator.type) {
|
|
10443
10276
|
case 'date':
|
|
10444
10277
|
validators.push(new DateValidationModel(validator));
|
|
@@ -10581,6 +10414,7 @@ class FormFactory {
|
|
|
10581
10414
|
this.controlService = controlService;
|
|
10582
10415
|
this.questionFactroy = questionFactroy;
|
|
10583
10416
|
this.controlRelationsFactory = controlRelationsFactory;
|
|
10417
|
+
this.nodeIndex = 0;
|
|
10584
10418
|
this.hd = {
|
|
10585
10419
|
getValue: () => {
|
|
10586
10420
|
return 20;
|
|
@@ -10622,6 +10456,8 @@ class FormFactory {
|
|
|
10622
10456
|
else {
|
|
10623
10457
|
node = this.createLeafNode(question, parentNode, parentControl, form);
|
|
10624
10458
|
}
|
|
10459
|
+
node.nodeIndex = this.nodeIndex;
|
|
10460
|
+
this.nodeIndex++;
|
|
10625
10461
|
return node;
|
|
10626
10462
|
}
|
|
10627
10463
|
createLeafNode(question, parentNode, parentControl, form) {
|
|
@@ -10699,15 +10535,19 @@ FormFactory.ctorParameters = () => [
|
|
|
10699
10535
|
];
|
|
10700
10536
|
|
|
10701
10537
|
class ObsAdapterHelper {
|
|
10702
|
-
constructor() {
|
|
10538
|
+
constructor() {
|
|
10539
|
+
this.formFieldNamespace = 'O3';
|
|
10540
|
+
this.obsIndex = 0;
|
|
10541
|
+
}
|
|
10703
10542
|
findObsAnswerToQuestion(node, obsArray) {
|
|
10543
|
+
// Find and Order the obs based on form_namespace_and_path
|
|
10704
10544
|
const found = [];
|
|
10705
10545
|
if (!this.isObsNode(node)) {
|
|
10706
10546
|
return found;
|
|
10707
10547
|
}
|
|
10708
10548
|
if (node instanceof LeafNode ||
|
|
10709
10549
|
(node instanceof GroupNode && node.question.extras.type === 'complex-obs')) {
|
|
10710
|
-
|
|
10550
|
+
_.each(obsArray, (item) => {
|
|
10711
10551
|
if (item.concept &&
|
|
10712
10552
|
item.concept.uuid === node.question.extras.questionOptions.concept) {
|
|
10713
10553
|
found.push(item);
|
|
@@ -10718,7 +10558,7 @@ class ObsAdapterHelper {
|
|
|
10718
10558
|
// At this point the node is either a group or a repeating node
|
|
10719
10559
|
const childQuestionsUuids = this.getChildQuestionsConceptUuids(node);
|
|
10720
10560
|
if (childQuestionsUuids.length > 0) {
|
|
10721
|
-
|
|
10561
|
+
_.each(obsArray, (obs) => {
|
|
10722
10562
|
if (obs.concept &&
|
|
10723
10563
|
obs.concept.uuid === node.question.extras.questionOptions.concept &&
|
|
10724
10564
|
Array.isArray(obs.groupMembers) &&
|
|
@@ -10732,7 +10572,7 @@ class ObsAdapterHelper {
|
|
|
10732
10572
|
getChildQuestionsConceptUuids(node) {
|
|
10733
10573
|
const found = [];
|
|
10734
10574
|
if (node.question.extras && node.question.extras.questions) {
|
|
10735
|
-
|
|
10575
|
+
_.each(node.question.extras.questions, (question) => {
|
|
10736
10576
|
if (question.questionOptions && question.questionOptions.concept) {
|
|
10737
10577
|
found.push(question.questionOptions.concept);
|
|
10738
10578
|
}
|
|
@@ -10743,7 +10583,7 @@ class ObsAdapterHelper {
|
|
|
10743
10583
|
getGroupMembersConceptUuids(obsWithGroupMembers) {
|
|
10744
10584
|
const found = [];
|
|
10745
10585
|
if (Array.isArray(obsWithGroupMembers.groupMembers)) {
|
|
10746
|
-
|
|
10586
|
+
_.each(obsWithGroupMembers.groupMembers, (member) => {
|
|
10747
10587
|
found.push(member.concept.uuid);
|
|
10748
10588
|
});
|
|
10749
10589
|
}
|
|
@@ -10780,6 +10620,7 @@ class ObsAdapterHelper {
|
|
|
10780
10620
|
}
|
|
10781
10621
|
setMultiselectObsNodeValue(node, obs) {
|
|
10782
10622
|
if (node && obs.length > 0) {
|
|
10623
|
+
obs = obs.sort(this.comparePath);
|
|
10783
10624
|
node.initialValue = obs;
|
|
10784
10625
|
const obsUuids = [];
|
|
10785
10626
|
for (const m of obs) {
|
|
@@ -10825,6 +10666,7 @@ class ObsAdapterHelper {
|
|
|
10825
10666
|
setRepeatingGroupObsNodeValue(node, obs) {
|
|
10826
10667
|
if (node && obs.length > 0) {
|
|
10827
10668
|
const arrayNode = node;
|
|
10669
|
+
obs = obs.sort(this.comparePath);
|
|
10828
10670
|
arrayNode.initialValue = obs;
|
|
10829
10671
|
for (let i = 0; i < obs.length; i++) {
|
|
10830
10672
|
const createdNode = arrayNode.createChildNode();
|
|
@@ -10832,6 +10674,12 @@ class ObsAdapterHelper {
|
|
|
10832
10674
|
}
|
|
10833
10675
|
}
|
|
10834
10676
|
}
|
|
10677
|
+
comparePath(first, second) {
|
|
10678
|
+
if (!first || !second) {
|
|
10679
|
+
return -1;
|
|
10680
|
+
}
|
|
10681
|
+
return Number(first.formFieldPath) - Number(second.formFieldPath);
|
|
10682
|
+
}
|
|
10835
10683
|
setNodeValue(node, obs) {
|
|
10836
10684
|
switch (this.getObsNodeType(node)) {
|
|
10837
10685
|
case 'unknown':
|
|
@@ -10956,6 +10804,13 @@ class ObsAdapterHelper {
|
|
|
10956
10804
|
delete obs.concept;
|
|
10957
10805
|
obs.uuid = node.initialValue.uuid;
|
|
10958
10806
|
}
|
|
10807
|
+
return this.addFieldNameSpaceandPath(node, obs);
|
|
10808
|
+
}
|
|
10809
|
+
addFieldNameSpaceandPath(node, obs) {
|
|
10810
|
+
var _a;
|
|
10811
|
+
obs.formFieldNamespace = this.formFieldNamespace;
|
|
10812
|
+
obs.formFieldPath = `${(_a = node === null || node === void 0 ? void 0 : node.question) === null || _a === void 0 ? void 0 : _a.questionIndex}${node === null || node === void 0 ? void 0 : node.nodeIndex}${this.obsIndex}`;
|
|
10813
|
+
this.obsIndex++;
|
|
10959
10814
|
return obs;
|
|
10960
10815
|
}
|
|
10961
10816
|
getComplexObsPayload(node) {
|
|
@@ -10996,7 +10851,7 @@ class ObsAdapterHelper {
|
|
|
10996
10851
|
const existingUuids = [];
|
|
10997
10852
|
// add voided obs i.e. deleted options
|
|
10998
10853
|
if (Array.isArray(node.initialValue)) {
|
|
10999
|
-
|
|
10854
|
+
_.each(node.initialValue, (item) => {
|
|
11000
10855
|
existingUuids.push(item.value.uuid);
|
|
11001
10856
|
if (Array.isArray(node.control.value)) {
|
|
11002
10857
|
if (node.control.value.indexOf(item.value.uuid) < 0) {
|
|
@@ -11017,12 +10872,12 @@ class ObsAdapterHelper {
|
|
|
11017
10872
|
}
|
|
11018
10873
|
// add new obs i.e they didn't exisit originally
|
|
11019
10874
|
if (Array.isArray(node.control.value)) {
|
|
11020
|
-
|
|
10875
|
+
_.each(node.control.value, (item) => {
|
|
11021
10876
|
if (existingUuids.indexOf(item) < 0) {
|
|
11022
|
-
payload.push({
|
|
10877
|
+
payload.push(this.addFieldNameSpaceandPath(node, {
|
|
11023
10878
|
concept: node.question.extras.questionOptions.concept,
|
|
11024
10879
|
value: item
|
|
11025
|
-
});
|
|
10880
|
+
}));
|
|
11026
10881
|
}
|
|
11027
10882
|
});
|
|
11028
10883
|
}
|
|
@@ -11031,7 +10886,7 @@ class ObsAdapterHelper {
|
|
|
11031
10886
|
getGroupPayload(node) {
|
|
11032
10887
|
const nodeAsGroup = node;
|
|
11033
10888
|
let childrenPayload = [];
|
|
11034
|
-
|
|
10889
|
+
_.each(nodeAsGroup.children, (child) => {
|
|
11035
10890
|
const payload = this.getObsNodePayload(child);
|
|
11036
10891
|
if (payload.length > 0) {
|
|
11037
10892
|
childrenPayload = childrenPayload.concat(payload);
|
|
@@ -11050,13 +10905,14 @@ class ObsAdapterHelper {
|
|
|
11050
10905
|
groupPayload.concept =
|
|
11051
10906
|
nodeAsGroup.question.extras.questionOptions.concept;
|
|
11052
10907
|
}
|
|
10908
|
+
this.addFieldNameSpaceandPath(node, groupPayload);
|
|
11053
10909
|
return groupPayload;
|
|
11054
10910
|
}
|
|
11055
10911
|
getRepeatingGroupPayload(node) {
|
|
11056
10912
|
const nodeAsArray = node;
|
|
11057
10913
|
let childrenPayload = [];
|
|
11058
10914
|
const groupsUuidsAfterEditting = [];
|
|
11059
|
-
|
|
10915
|
+
_.each(nodeAsArray.children, (child) => {
|
|
11060
10916
|
const payload = this.getObsNodePayload(child);
|
|
11061
10917
|
if (payload.length > 0) {
|
|
11062
10918
|
childrenPayload = childrenPayload.concat(payload);
|
|
@@ -11068,7 +10924,7 @@ class ObsAdapterHelper {
|
|
|
11068
10924
|
// void deleted groups
|
|
11069
10925
|
// console.log('groupsUuidsAfterEditting', groupsUuidsAfterEditting);
|
|
11070
10926
|
if (nodeAsArray.initialValue && Array.isArray(nodeAsArray.initialValue)) {
|
|
11071
|
-
|
|
10927
|
+
_.each(nodeAsArray.initialValue, (obs) => {
|
|
11072
10928
|
if (groupsUuidsAfterEditting.indexOf(obs.uuid) < 0) {
|
|
11073
10929
|
const voidedGroup = {
|
|
11074
10930
|
uuid: obs.uuid,
|
|
@@ -11230,7 +11086,7 @@ class ObsValueAdapter {
|
|
|
11230
11086
|
node.question.extras &&
|
|
11231
11087
|
node.question.renderingType === 'group') ||
|
|
11232
11088
|
forcegroup) {
|
|
11233
|
-
const groupObs =
|
|
11089
|
+
const groupObs = find(payload, (o) => {
|
|
11234
11090
|
return (o.concept.uuid === node.question.extras.questionOptions.concept &&
|
|
11235
11091
|
o.groupMembers);
|
|
11236
11092
|
});
|
|
@@ -11270,7 +11126,7 @@ class ObsValueAdapter {
|
|
|
11270
11126
|
node.question.extras.questionOptions.rendering !== 'multiCheckbox') ||
|
|
11271
11127
|
node.question.extras.questionOptions.rendering !== 'checkbox' ||
|
|
11272
11128
|
node.question.extras.questionOptions.rendering !== 'multi-select') {
|
|
11273
|
-
const obs =
|
|
11129
|
+
const obs = find(payload, (o) => {
|
|
11274
11130
|
return o.concept.uuid === node.question.extras.questionOptions.concept;
|
|
11275
11131
|
});
|
|
11276
11132
|
if (obs) {
|
|
@@ -11286,7 +11142,7 @@ class ObsValueAdapter {
|
|
|
11286
11142
|
}
|
|
11287
11143
|
}
|
|
11288
11144
|
else {
|
|
11289
|
-
const multiObs =
|
|
11145
|
+
const multiObs = filter(payload, (o) => {
|
|
11290
11146
|
return o.concept.uuid === node.question.extras.questionOptions.concept;
|
|
11291
11147
|
});
|
|
11292
11148
|
if (multiObs && multiObs.length > 0) {
|
|
@@ -11313,7 +11169,7 @@ class ObsValueAdapter {
|
|
|
11313
11169
|
// set the usual obs value
|
|
11314
11170
|
this.setObsValue(valueField, payload);
|
|
11315
11171
|
// set the obs date
|
|
11316
|
-
const obs =
|
|
11172
|
+
const obs = find(payload, (o) => {
|
|
11317
11173
|
return o.concept.uuid === node.question.extras.questionOptions.concept;
|
|
11318
11174
|
});
|
|
11319
11175
|
if (obs) {
|
|
@@ -11330,7 +11186,7 @@ class ObsValueAdapter {
|
|
|
11330
11186
|
return values;
|
|
11331
11187
|
}
|
|
11332
11188
|
setRepeatingGroupValues(node, payload) {
|
|
11333
|
-
const groupRepeatingObs =
|
|
11189
|
+
const groupRepeatingObs = filter(payload, (o) => {
|
|
11334
11190
|
const found = o.concept.uuid === node.question.extras.questionOptions.concept;
|
|
11335
11191
|
let intersect = false;
|
|
11336
11192
|
if (found && o.groupMembers) {
|
|
@@ -11340,7 +11196,7 @@ class ObsValueAdapter {
|
|
|
11340
11196
|
const schemaQuestions = node.question.questions.map((a) => {
|
|
11341
11197
|
return a.extras.questionOptions.concept;
|
|
11342
11198
|
});
|
|
11343
|
-
intersect =
|
|
11199
|
+
intersect = intersection(obs, schemaQuestions).length > 0;
|
|
11344
11200
|
}
|
|
11345
11201
|
return found && intersect;
|
|
11346
11202
|
});
|
|
@@ -11390,7 +11246,7 @@ class ObsValueAdapter {
|
|
|
11390
11246
|
if (obs.question &&
|
|
11391
11247
|
obs.question.extras &&
|
|
11392
11248
|
obs.question.extras.questionOptions.rendering === 'group') {
|
|
11393
|
-
const members =
|
|
11249
|
+
const members = filter(this.getObsPayload(obs.groupMembers), (o) => {
|
|
11394
11250
|
return o.value !== '';
|
|
11395
11251
|
});
|
|
11396
11252
|
const mappedMembers = members.map((a) => {
|
|
@@ -11439,7 +11295,7 @@ class ObsValueAdapter {
|
|
|
11439
11295
|
const current = {};
|
|
11440
11296
|
for (const key in value) {
|
|
11441
11297
|
if (value.hasOwnProperty(key)) {
|
|
11442
|
-
const groupQuestion =
|
|
11298
|
+
const groupQuestion = find(node.question.questions, {
|
|
11443
11299
|
key: key
|
|
11444
11300
|
});
|
|
11445
11301
|
const modelValue = value[key];
|
|
@@ -11491,7 +11347,7 @@ class ObsValueAdapter {
|
|
|
11491
11347
|
leftOuterJoinArrays(first, second) {
|
|
11492
11348
|
const unique = first.filter(function (obj) {
|
|
11493
11349
|
return !second.some(function (obj2) {
|
|
11494
|
-
return
|
|
11350
|
+
return isEqual(obj.value, obj2.value);
|
|
11495
11351
|
});
|
|
11496
11352
|
});
|
|
11497
11353
|
return unique;
|
|
@@ -11798,7 +11654,7 @@ class OrderValueAdapter {
|
|
|
11798
11654
|
dateVoided: o.auditInfo.dateVoided
|
|
11799
11655
|
};
|
|
11800
11656
|
});
|
|
11801
|
-
return (existingOrders =
|
|
11657
|
+
return (existingOrders = filter(existingOrders, (order) => {
|
|
11802
11658
|
if (order.voided === true || order.dateVoided) {
|
|
11803
11659
|
return false;
|
|
11804
11660
|
}
|
|
@@ -12261,7 +12117,7 @@ class RemoteSelectComponent {
|
|
|
12261
12117
|
RemoteSelectComponent.decorators = [
|
|
12262
12118
|
{ type: Component, args: [{
|
|
12263
12119
|
selector: 'ngx-remote-select',
|
|
12264
|
-
template: "<div>\n <ng-select
|
|
12120
|
+
template: "<div>\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [disabled]=\"disabled\"\n [items]=\"remoteOptions$ | async\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [multiple]=\"false\"\n [hideSelected]=\"true\"\n [compareWith]=\"compareItems\"\n [trackByFn]=\"trackByFn\"\n [loading]=\"loading\"\n typeToSearchText=\"Please enter 2 or more characters\"\n [typeahead]=\"remoteOptionInput$\"\n [(ngModel)]=\"selectedRemoteOptions\"\n (ngModelChange)=\"selected($event)\"\n >\n </ng-select>\n</div>\n",
|
|
12265
12121
|
providers: [
|
|
12266
12122
|
{
|
|
12267
12123
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -12401,7 +12257,7 @@ class AppointmentsOverviewComponent {
|
|
|
12401
12257
|
AppointmentsOverviewComponent.decorators = [
|
|
12402
12258
|
{ type: Component, args: [{
|
|
12403
12259
|
selector: 'appointments-overview',
|
|
12404
|
-
template: "<div *ngIf=\"showAppointments\" class=\"container\">\n <div *ngIf=\"loadingAppointments\">\n <span *ngIf=\"!appointmentsLoaded && errorLoadingAppointments\">Error checking appointments</span>\n <div
|
|
12260
|
+
template: "<div *ngIf=\"showAppointments\" class=\"container\">\n <div *ngIf=\"loadingAppointments\">\n <span *ngIf=\"!appointmentsLoaded && errorLoadingAppointments\"\n >Error checking appointments</span\n >\n <div\n *ngIf=\"loadingAppointments\"\n class=\"cds--inline-loading\"\n aria-live=\"assertive\"\n >\n <div class=\"cds--inline-loading__animation\">\n <div\n aria-atomic=\"true\"\n aria-labelledby=\"loading-id-2\"\n aria-live=\"assertive\"\n class=\"cds--loading cds--loading--small\"\n >\n <label id=\"loading-id-2\" class=\"cds--visually-hidden\"\n >Active loading indicator</label\n ><svg class=\"cds--loading__svg\" viewBox=\"0 0 100 100\">\n <title>Active loading indicator</title>\n <circle\n class=\"cds--loading__background\"\n cx=\"50%\"\n cy=\"50%\"\n r=\"44\"\n ></circle>\n <circle\n class=\"cds--loading__stroke\"\n cx=\"50%\"\n cy=\"50%\"\n r=\"44\"\n ></circle>\n </svg>\n </div>\n </div>\n <div class=\"cds--inline-loading__text\">Loading...</div>\n </div>\n </div>\n\n <div\n class=\"cds--data-table-content\"\n *ngIf=\"appointmentsLoaded && !errorLoadingAppointments\"\n >\n <table class=\"cds--data-table cds--data-table--no-border\">\n <thead>\n <tr>\n <th\n *ngFor=\"let appointment of appointments\"\n scope=\"col\"\n [ngClass]=\"{ active: appointment.date === today }\"\n >\n {{ appointment.date }}\n </th>\n </tr>\n </thead>\n <tbody aria-live=\"polite\">\n <tr>\n <td\n *ngFor=\"let appointment of appointments\"\n [ngClass]=\"{ active: appointment.date === today }\"\n >\n {{ appointment.count }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n",
|
|
12405
12261
|
styles: [".container{margin-top:.625rem}.active{background-color:#e0e0e0;cursor:pointer}"]
|
|
12406
12262
|
},] }
|
|
12407
12263
|
];
|
|
@@ -12470,7 +12326,7 @@ class CheckboxControlComponent {
|
|
|
12470
12326
|
CheckboxControlComponent.decorators = [
|
|
12471
12327
|
{ type: Component, args: [{
|
|
12472
12328
|
selector: 'checkbox',
|
|
12473
|
-
template: "<fieldset class=\"cds--fieldset\">\n <div
|
|
12329
|
+
template: "<fieldset class=\"cds--fieldset\">\n <div\n class=\"cds--form-item cds--checkbox-wrapper\"\n *ngFor=\"let option of options; let i = index\"\n >\n <input\n type=\"checkbox\"\n class=\"cds--checkbox\"\n [id]=\"i + id\"\n [checked]=\"option.checked\"\n (change)=\"selectOpt(option, $event)\"\n [value]=\"option.value\"\n />\n <label [for]=\"i + id\" class=\"cds--checkbox-label\">\n <span class=\"cds--checkbox-label-text\">{{ option.label }}</span>\n </label>\n </div>\n</fieldset>\n",
|
|
12474
12330
|
providers: [
|
|
12475
12331
|
{
|
|
12476
12332
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -12481,6 +12337,7 @@ CheckboxControlComponent.decorators = [
|
|
|
12481
12337
|
},] }
|
|
12482
12338
|
];
|
|
12483
12339
|
CheckboxControlComponent.propDecorators = {
|
|
12340
|
+
id: [{ type: Input }],
|
|
12484
12341
|
options: [{ type: Input }],
|
|
12485
12342
|
selected: [{ type: Input }]
|
|
12486
12343
|
};
|
|
@@ -12506,17 +12363,8 @@ class TabComponent {
|
|
|
12506
12363
|
TabComponent.decorators = [
|
|
12507
12364
|
{ type: Component, args: [{
|
|
12508
12365
|
selector: 'ngx-tab',
|
|
12509
|
-
template:
|
|
12510
|
-
|
|
12511
|
-
<h4>{{ tabTitle }}</h4>
|
|
12512
|
-
<div *ngIf="bypassDOM">
|
|
12513
|
-
<ng-container [ngTemplateOutlet]="template"></ng-container>
|
|
12514
|
-
</div>
|
|
12515
|
-
<div *ngIf="!bypassDOM">
|
|
12516
|
-
<ng-content></ng-content>
|
|
12517
|
-
</div>
|
|
12518
|
-
</div>
|
|
12519
|
-
`
|
|
12366
|
+
template: "<div *ngIf=\"active\" class=\"pane\" [ngClass]=\"customPaneClass\">\n <h4>{{ tabTitle }}</h4>\n <div *ngIf=\"bypassDOM\">\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n </div>\n <div *ngIf=\"!bypassDOM\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
12367
|
+
styles: ["h4{padding-left:1rem;margin-bottom:.5rem}h4:after{content:\"\";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-01)}.pane{background-color:#f4f4f4;margin:.5rem .125rem}"]
|
|
12520
12368
|
},] }
|
|
12521
12369
|
];
|
|
12522
12370
|
TabComponent.propDecorators = {
|
|
@@ -12529,7 +12377,7 @@ TabComponent.propDecorators = {
|
|
|
12529
12377
|
template: [{ type: ContentChild, args: [TemplateRef,] }]
|
|
12530
12378
|
};
|
|
12531
12379
|
|
|
12532
|
-
class
|
|
12380
|
+
class TabSetComponent {
|
|
12533
12381
|
constructor() {
|
|
12534
12382
|
this.disableStyle = false;
|
|
12535
12383
|
this.customNavClass = '';
|
|
@@ -12578,14 +12426,14 @@ class TabsetComponent {
|
|
|
12578
12426
|
}
|
|
12579
12427
|
}
|
|
12580
12428
|
}
|
|
12581
|
-
|
|
12429
|
+
TabSetComponent.decorators = [
|
|
12582
12430
|
{ type: Component, args: [{
|
|
12583
|
-
selector: 'ngx-
|
|
12584
|
-
template: "<div class=\"tab-container\">\n <div class=\"tab\">\n <button
|
|
12585
|
-
styles: [".tab-container{overflow-x:hidden;display:flex
|
|
12431
|
+
selector: 'ngx-tab-set',
|
|
12432
|
+
template: "<div class=\"tab-container\">\n <div class=\"tab\">\n <button\n hover-class=\"hover\"\n class=\"tablinks completed\"\n *ngFor=\"let tab of tabs\"\n (click)=\"selectTab(tab)\"\n [class]=\"getStatusClasses(tab.active, tab.disabled)\"\n >\n <span>{{ tab.tabTitle }}</span>\n </button>\n </div>\n <div id=\"tab\" class=\"tab-content\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
12433
|
+
styles: [".tab-container{overflow-x:hidden;display:flex}.tab{width:10rem;position:fixed}.tab button{font-family:inherit;display:block;background-color:inherit;width:100%;border:none;outline:none;text-align:left;transition:.3s;min-height:2rem;white-space:normal;word-wrap:break-word;margin:0 0 .063rem}.tab button :hover{cursor:pointer}@media screen and (max-width:768px){.tab button{height:3rem;border-bottom:.0125rem solid var(--open-mrs-background-gray);width:10rem}}.tab button.active.hover,.tab button.enabled.hover{background-color:var(--gray-gray-10)}.tab button.completed{border-left:.5rem solid var(--inverse-support-02);background-color:var(--color-green-10);font-weight:400}.tab button.active,.tab button.completed{font-size:.875rem;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:.16px;color:#161616}.tab button.active{background-color:#ededed;border-left:.5rem solid #009d9a;font-weight:600}.tab button.enabled{background-color:#fff;border-left:.5rem solid #9ef0f0;line-height:1.43;color:var(--color-gray-100)}.tab button.enabled,.tab button.error{font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;letter-spacing:.16px}.tab button.error{background-color:var(--color-red-10);border-left:.5rem solid var(--open-mrs-danger-red-60);line-height:1.29;color:#da1e28}.tab button.disabled{background-color:#fff;border-left:.5rem solid #dae0e0;font-weight:400;line-height:1.43;color:var(--gray-gray-30)}.tab button.active.error,.tab button.disabled{font-size:.875rem;font-stretch:normal;font-style:normal;letter-spacing:.16px}.tab button.active.error{background-color:var(--color-red-20);border-left:.5rem solid var(--open-mrs-danger-red-60);font-weight:600;line-height:1.29;color:#da1e28}.tab-content{width:100%;margin-left:10rem}"]
|
|
12586
12434
|
},] }
|
|
12587
12435
|
];
|
|
12588
|
-
|
|
12436
|
+
TabSetComponent.propDecorators = {
|
|
12589
12437
|
tabs: [{ type: ContentChildren, args: [TabComponent,] }],
|
|
12590
12438
|
disableStyle: [{ type: Input }],
|
|
12591
12439
|
customNavClass: [{ type: Input }],
|
|
@@ -12641,8 +12489,8 @@ class NgxTabSetModule {
|
|
|
12641
12489
|
}
|
|
12642
12490
|
NgxTabSetModule.decorators = [
|
|
12643
12491
|
{ type: NgModule, args: [{
|
|
12644
|
-
declarations: [TabComponent,
|
|
12645
|
-
exports: [TabComponent,
|
|
12492
|
+
declarations: [TabComponent, TabSetComponent, HoverClassDirective],
|
|
12493
|
+
exports: [TabComponent, TabSetComponent],
|
|
12646
12494
|
imports: [CommonModule]
|
|
12647
12495
|
},] }
|
|
12648
12496
|
];
|
|
@@ -12939,18 +12787,18 @@ Select.propDecorators = {
|
|
|
12939
12787
|
};
|
|
12940
12788
|
|
|
12941
12789
|
/* eslint-disable @angular-eslint/component-class-suffix, @angular-eslint/directive-class-suffix */
|
|
12942
|
-
class Option {
|
|
12790
|
+
class Option$1 {
|
|
12943
12791
|
constructor() {
|
|
12944
12792
|
this.inputClass = 'cds--select-option';
|
|
12945
12793
|
}
|
|
12946
12794
|
}
|
|
12947
|
-
Option.decorators = [
|
|
12795
|
+
Option$1.decorators = [
|
|
12948
12796
|
{ type: Directive, args: [{
|
|
12949
12797
|
// eslint-disable-next-line
|
|
12950
12798
|
selector: 'option'
|
|
12951
12799
|
},] }
|
|
12952
12800
|
];
|
|
12953
|
-
Option.propDecorators = {
|
|
12801
|
+
Option$1.propDecorators = {
|
|
12954
12802
|
inputClass: [{ type: HostBinding, args: ['class',] }]
|
|
12955
12803
|
};
|
|
12956
12804
|
|
|
@@ -12975,8 +12823,8 @@ class SelectModule {
|
|
|
12975
12823
|
}
|
|
12976
12824
|
SelectModule.decorators = [
|
|
12977
12825
|
{ type: NgModule, args: [{
|
|
12978
|
-
declarations: [Select, Option, OptGroup],
|
|
12979
|
-
exports: [Select, Option, OptGroup],
|
|
12826
|
+
declarations: [Select, Option$1, OptGroup],
|
|
12827
|
+
exports: [Select, Option$1, OptGroup],
|
|
12980
12828
|
imports: [CommonModule, FormsModule]
|
|
12981
12829
|
},] }
|
|
12982
12830
|
];
|
|
@@ -13314,7 +13162,7 @@ class CustomControlWrapperComponent {
|
|
|
13314
13162
|
CustomControlWrapperComponent.decorators = [
|
|
13315
13163
|
{ type: Component, args: [{
|
|
13316
13164
|
selector: 'app-custom-control-wrapper',
|
|
13317
|
-
template: "<div>\n
|
|
13165
|
+
template: "<div>\n <ng-template #error>Loading failed...</ng-template>\n <ng-template #loading>Loading...</ng-template>\n <ax-lazy-element\n *axLazyElementDynamic=\"\n customControlConfig.tag;\n url: customControlConfig.url;\n module: true;\n errorTemplate: error;\n loadingTemplate: loading\n \"\n [question]=\"question\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n (on-change)=\"onValueChange($event)\"\n [config]=\"config\"\n >\n </ax-lazy-element>\n</div>\n",
|
|
13318
13166
|
providers: [
|
|
13319
13167
|
{
|
|
13320
13168
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -13349,7 +13197,7 @@ class CustomComponentWrapperComponent {
|
|
|
13349
13197
|
CustomComponentWrapperComponent.decorators = [
|
|
13350
13198
|
{ type: Component, args: [{
|
|
13351
13199
|
selector: 'app-custom-component-wrapper',
|
|
13352
|
-
template: "<div>\n
|
|
13200
|
+
template: "<div>\n <ng-template #error>Component Loading failed...</ng-template>\n <ng-template #loading>Loading Component...</ng-template>\n <div *ngFor=\"let componentConfig of componentConfigs\">\n <ax-lazy-element\n *axLazyElementDynamic=\"\n componentConfig.tag;\n url: componentConfig.url;\n module: true;\n errorTemplate: error;\n loadingTemplate: loading\n \"\n [config]=\"componentConfig\"\n [dark]=\"dark\"\n >\n </ax-lazy-element>\n </div>\n</div>\n"
|
|
13353
13201
|
},] }
|
|
13354
13202
|
];
|
|
13355
13203
|
CustomComponentWrapperComponent.propDecorators = {
|
|
@@ -13457,5 +13305,5 @@ var RenderingType;
|
|
|
13457
13305
|
* Generated bundle index. Do not edit.
|
|
13458
13306
|
*/
|
|
13459
13307
|
|
|
13460
|
-
export { AfeControlType, AfeFormArray, AfeFormControl, AfeFormGroup, CheckBoxQuestion, ConditionalValidationModel, ControlRelationsFactory, DataSources, DateQuestion, DateTimePickerModule, DateValidationModel, EncounterAdapter, FileUploadQuestion, Form, FormControlService, FormEntryModule, FormErrorsService, FormFactory, FormSchemaCompiler, HistoricalEncounterDataService, JsExpressionHelper, JsExpressionValidationModel, MaxValidationModel, MinValidationModel, MultiSelectQuestion, NestedQuestion, NgxDateTimePickerModule, ObsAdapterHelper, ObsValueAdapter, Option
|
|
13308
|
+
export { AfeControlType, AfeFormArray, AfeFormControl, AfeFormGroup, CheckBoxQuestion, ConditionalValidationModel, ControlRelationsFactory, DataSources, DateQuestion, DateTimePickerModule, DateValidationModel, EncounterAdapter, FileUploadQuestion, Form, FormControlService, FormEntryModule, FormErrorsService, FormFactory, FormSchemaCompiler, HistoricalEncounterDataService, JsExpressionHelper, JsExpressionValidationModel, MaxValidationModel, MinValidationModel, MultiSelectQuestion, NestedQuestion, NgxDateTimePickerModule, ObsAdapterHelper, ObsValueAdapter, Option, OrderValueAdapter, Pair, PersonAttribuAdapter, QuestionBase, QuestionFactory, QuestionGroup, RenderingType, RepeatingQuestion, SelectQuestion, TestOrderQuestion, TextAreaInputQuestion, TextInputQuestion, UiSelectQuestion, ValidationFactory, ValidationModel, SelectModule as ɵa, Select as ɵb, OWL_DIALOG_SCROLL_STRATEGY as ɵba, OWL_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵbb, OWL_DIALOG_SCROLL_STRATEGY_PROVIDER as ɵbc, OWL_DIALOG_DEFAULT_OPTIONS as ɵbd, OwlDialogService as ɵbe, OwlDialogConfig as ɵbf, OwlCalendarComponent as ɵbg, OWL_DATE_TIME_FORMATS as ɵbi, OwlDateTimeIntl as ɵbj, OWL_DATE_TIME_LOCALE as ɵbk, OWL_DATE_TIME_LOCALE_FACTORY as ɵbl, DateTimeAdapter as ɵbm, OwlTimerComponent as ɵbn, OwlDateTimeTriggerDirective as ɵbo, OWL_DATETIME_VALUE_ACCESSOR as ɵbp, OWL_DATETIME_VALIDATORS as ɵbq, OwlDateTimeInputDirective as ɵbr, OWL_DTPICKER_SCROLL_STRATEGY as ɵbs, OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵbt, OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER as ɵbu, OwlDateTimeComponent as ɵbv, OwlDateTime as ɵbw, OWL_DATETIME_VALUE_ACCESSOR$1 as ɵbx, OwlDateTimeInlineComponent as ɵby, OwlDateTimeContainerComponent as ɵbz, Option$1 as ɵc, owlDateTimePickerAnimations as ɵca, OwlMultiYearViewComponent as ɵcb, OwlCalendarBodyComponent as ɵcc, OwlYearViewComponent as ɵcd, OwlMonthViewComponent as ɵce, OwlTimerBoxComponent as ɵcf, NumberFixedLenPipe as ɵcg, NativeDateTimeModule as ɵch, OwlNativeDateTimeModule as ɵci, NativeDateTimeAdapter as ɵcj, OWL_NATIVE_DATE_TIME_FORMATS as ɵck, NgxDatetimeComponent as ɵcl, CustomControlWrapperModule as ɵcm, CustomControlWrapperComponent as ɵcn, CustomComponentWrapperModule as ɵco, CustomComponentWrapperComponent as ɵcp, NgxTabSetModule as ɵcq, TabComponent as ɵcr, TabSetComponent as ɵcs, HoverClassDirective as ɵct, FormRendererComponent as ɵcu, AfeNgSelectComponent as ɵcv, AppointmentsOverviewComponent as ɵcw, HistoricalValueDirective as ɵcx, HistoricalFieldHelperService as ɵcy, ErrorRendererComponent as ɵcz, OptGroup as ɵd, TimeAgoPipe as ɵda, CollapseDirective as ɵdb, HidersDisablersFactory as ɵdc, ExpressionRunner as ɵdd, DebugModeService as ɵde, AlertsFactory as ɵdf, NumberInputModule as ɵe, NumberInputComponent as ɵf, InputModule as ɵg, Label as ɵh, TextArea as ɵi, TextInput as ɵj, DatePickerComponent as ɵk, TimePickerComponent as ɵl, ModalComponent as ɵm, MomentPipe as ɵn, DateTimePickerComponent as ɵo, NgxRemoteSelectModule as ɵp, RemoteSelectComponent as ɵq, RemoteFileUploadModule as ɵr, SharedModule as ɵs, SecurePipe as ɵt, FileUploadComponent as ɵu, CheckboxModule as ɵv, CheckboxControlComponent as ɵw, OwlDateTimeModule as ɵx, OwlDialogModule as ɵy, OwlDialogContainerComponent as ɵz };
|
|
13461
13309
|
//# sourceMappingURL=openmrs-ngx-formentry.js.map
|