@mtna/web-form-angular 1.0.6-SNAPSHOT.22 → 1.0.6-SNAPSHOT.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/bundles/mtna-web-form-angular.umd.js +1466 -644
  2. package/bundles/mtna-web-form-angular.umd.js.map +1 -1
  3. package/esm2015/lib/components/form-item-impl/date/date.component.js +6 -29
  4. package/esm2015/lib/components/form-item-impl/date/date.module.js +2 -5
  5. package/esm2015/lib/components/form-item-impl/year-quarter/year-quarter.component.js +1 -1
  6. package/esm2015/lib/components/form-item-injector/form-item-injector.component.js +43 -2
  7. package/esm2015/lib/components/template-item-impl/date/year-quarter-item/year-quarter-item.component.js +105 -12
  8. package/esm2015/lib/components/template-item-impl/date/year-quarter-range-item/year-quarter-range-item.component.js +11 -2
  9. package/esm2015/lib/components/template-item-impl/date-item/date-item.component.js +3 -27
  10. package/esm2015/lib/components/template-item-impl/date-item/date-item.module.js +2 -5
  11. package/esm2015/lib/components/template-item-impl/decimal-answer-item/decimal-answer-item.component.js +4 -4
  12. package/esm2015/lib/components/template-item-impl/decimal-answer-item/decimal-answer-item.module.js +15 -8
  13. package/esm2015/lib/components/template-item-impl/template-display-viewer/template-display-viewer.component.js +25 -4
  14. package/esm2015/lib/components/template-item-impl/template-item/template-item.component.js +7 -3
  15. package/esm2015/lib/components/template-item-impl/template-item-injector/template-item-injector.component.js +49 -4
  16. package/esm2015/lib/components/template-item-impl/template-section/template-section.component.js +1 -1
  17. package/esm2015/lib/models/design/design-constants/index.js +2 -0
  18. package/esm2015/lib/models/design/design-constants/template-design-constants.model.js +54 -0
  19. package/esm2015/lib/models/design/design-mapper/bulleted-list-item-template-mapper.js +2 -2
  20. package/esm2015/lib/models/design/design-mapper/date-item-template-mapper.js +10 -18
  21. package/esm2015/lib/models/design/design-mapper/dropdown-item-template-mapper.js +1 -12
  22. package/esm2015/lib/models/design/design-mapper/file-upload-item-template-mapper.js +4 -8
  23. package/esm2015/lib/models/design/design-mapper/i18n-text-response-item-template-mapper.js +2 -2
  24. package/esm2015/lib/models/design/design-mapper/mapper-classes.model.js +35 -26
  25. package/esm2015/lib/models/design/design-mapper/mapping-logic-core.js +23 -5
  26. package/esm2015/lib/models/design/design-mapper/multiple-choice-item-template-mapper.js +1 -11
  27. package/esm2015/lib/models/design/design-mapper/numbered-list-item-template-mapper.js +2 -2
  28. package/esm2015/lib/models/design/design-mapper/numeric-response-item-template-mapper.js +2 -2
  29. package/esm2015/lib/models/design/design-mapper/offset-date-range-template-mapper.js +11 -9
  30. package/esm2015/lib/models/design/design-mapper/option-group-item-mapper.js +27 -10
  31. package/esm2015/lib/models/design/design-mapper/option-item-mapper.js +4 -3
  32. package/esm2015/lib/models/design/design-mapper/option-selector-mapper.js +17 -5
  33. package/esm2015/lib/models/design/design-mapper/repeatable-item-template-mapper.js +2 -2
  34. package/esm2015/lib/models/design/design-mapper/template-item-group-mapper.js +48 -13
  35. package/esm2015/lib/models/design/design-mapper/template-item-mapper.js +47 -33
  36. package/esm2015/lib/models/design/design-mapper/template-mapper.js +7 -5
  37. package/esm2015/lib/models/design/design-mapper/template-section-mapper.js +14 -12
  38. package/esm2015/lib/models/design/design-mapper/text-item-template-mapper.js +2 -2
  39. package/esm2015/lib/models/design/design-mapper/text-response-item-template-mapper.js +2 -2
  40. package/esm2015/lib/models/design/design-mapper/time-item-template-mapper.js +2 -2
  41. package/esm2015/lib/models/design/design-mapper/title-item-template-mapper.js +18 -9
  42. package/esm2015/lib/models/design/design-mapper/year-quarter-range-template-mapper.js +27 -7
  43. package/esm2015/lib/models/design/design-properties/engagement-property-type.model.js +2 -0
  44. package/esm2015/lib/models/design/design-properties/enumeration-value-functions/date-format.js +29 -0
  45. package/esm2015/lib/models/design/design-properties/enumeration-value-functions/index.js +4 -0
  46. package/esm2015/lib/models/design/design-properties/enumeration-value-functions/layout.js +14 -0
  47. package/esm2015/lib/models/design/design-properties/enumeration-value-functions/quarter-range.js +20 -0
  48. package/esm2015/lib/models/design/design-properties/enumerations/date-display-format-enumeration.model.js +38 -0
  49. package/esm2015/lib/models/design/design-properties/enumerations/index.js +4 -0
  50. package/esm2015/lib/models/design/design-properties/enumerations/layout-enumeration.model.js +11 -0
  51. package/esm2015/lib/models/design/design-properties/enumerations/quarter-range-enumeration.model.js +24 -0
  52. package/esm2015/lib/models/design/design-properties/properties/date-format.model.js +14 -0
  53. package/esm2015/lib/models/design/design-properties/properties/index.js +4 -0
  54. package/esm2015/lib/models/design/design-properties/properties/layout.model.js +14 -0
  55. package/esm2015/lib/models/design/design-properties/properties/quarter-range.model.js +23 -0
  56. package/esm2015/lib/models/design/index.js +4 -3
  57. package/esm2015/lib/models/design/potential-designs.model.js +24 -2
  58. package/esm2015/lib/models/design/unavailable-template-item-name-map.model.js +27 -0
  59. package/esm2015/lib/models/i18n-constants.model.js +58 -12
  60. package/esm2015/lib/pipes/get-form-control-error.pipe.js +1 -1
  61. package/esm2015/lib/pipes/get-i18n-string-value-from-locale.pipe.js +2 -2
  62. package/esm2015/lib/pipes/instance-of-template-item.pipe.js +3 -3
  63. package/esm2015/lib/services/api.service.js +58 -28
  64. package/esm2015/lib/services/ui.service.js +2 -2
  65. package/esm2015/lib/state/design/template-design.facade.js +124 -45
  66. package/esm2015/lib/state/form/template-form.effects.js +30 -18
  67. package/esm2015/lib/utilities/enum-property-handlers-util.js +14 -0
  68. package/esm2015/lib/utilities/form-option-design-util.js +5 -5
  69. package/esm2015/lib/utilities/get-design-properties.util.js +8 -0
  70. package/esm2015/lib/utilities/index.js +7 -1
  71. package/esm2015/lib/utilities/is-template-util.js +68 -0
  72. package/esm2015/lib/utilities/item-to-design-base.util.js +25 -0
  73. package/esm2015/lib/utilities/merge-template-util.js +1 -2
  74. package/esm2015/lib/utilities/model-map-util.js +27 -0
  75. package/esm2015/lib/utilities/new-base-designs.util.js +5 -4
  76. package/esm2015/lib/utilities/serializer-util.js +2 -50
  77. package/esm2015/lib/utilities/template-design-core-util.js +8 -7
  78. package/esm2015/lib/utilities/template-design-util.js +7 -74
  79. package/esm2015/lib/utilities/to-design-util.js +24 -0
  80. package/esm2015/lib/utilities/validator-functions-util.js +59 -0
  81. package/fesm2015/mtna-web-form-angular.js +1169 -476
  82. package/fesm2015/mtna-web-form-angular.js.map +1 -1
  83. package/lib/components/form-item-impl/date/date.component.d.ts +2 -8
  84. package/lib/components/form-item-injector/form-item-injector.component.d.ts +1 -0
  85. package/lib/components/template-item-impl/date/year-quarter-item/year-quarter-item.component.d.ts +20 -2
  86. package/lib/components/template-item-impl/date/year-quarter-range-item/year-quarter-range-item.component.d.ts +4 -0
  87. package/lib/components/template-item-impl/date-item/date-item.component.d.ts +1 -8
  88. package/lib/components/template-item-impl/decimal-answer-item/decimal-answer-item.module.d.ts +7 -5
  89. package/lib/components/template-item-impl/template-display-viewer/template-display-viewer.component.d.ts +4 -2
  90. package/lib/components/template-item-impl/template-item/template-item.component.d.ts +1 -0
  91. package/lib/components/template-item-impl/template-item-injector/template-item-injector.component.d.ts +1 -0
  92. package/lib/components/template-item-impl/template-section/template-section.component.d.ts +1 -1
  93. package/lib/models/design/design-constants/index.d.ts +1 -0
  94. package/lib/models/design/{template-design-constants.model.d.ts → design-constants/template-design-constants.model.d.ts} +8 -2
  95. package/lib/models/design/design-mapper/dropdown-item-template-mapper.d.ts +0 -1
  96. package/lib/models/design/design-mapper/mapping-logic-core.d.ts +23 -4
  97. package/lib/models/design/design-mapper/option-selector-mapper.d.ts +1 -0
  98. package/lib/models/design/design-mapper/template-item-group-mapper.d.ts +1 -0
  99. package/lib/models/design/design-mapper/template-item-mapper.d.ts +2 -2
  100. package/lib/models/design/design-mapper/title-item-template-mapper.d.ts +1 -0
  101. package/lib/models/design/design-properties/engagement-property-type.model.d.ts +14 -0
  102. package/lib/models/design/design-properties/enumeration-value-functions/date-format.d.ts +2 -0
  103. package/lib/models/design/design-properties/enumeration-value-functions/index.d.ts +3 -0
  104. package/lib/models/design/design-properties/enumeration-value-functions/layout.d.ts +3 -0
  105. package/lib/models/design/design-properties/enumeration-value-functions/quarter-range.d.ts +2 -0
  106. package/lib/models/design/{enumerations/date-enumeration.model.d.ts → design-properties/enumerations/date-display-format-enumeration.model.d.ts} +2 -1
  107. package/lib/models/design/design-properties/enumerations/index.d.ts +3 -0
  108. package/lib/models/design/design-properties/enumerations/layout-enumeration.model.d.ts +4 -0
  109. package/lib/models/design/design-properties/enumerations/quarter-range-enumeration.model.d.ts +6 -0
  110. package/lib/models/design/design-properties/properties/date-format.model.d.ts +2 -0
  111. package/lib/models/design/design-properties/properties/index.d.ts +3 -0
  112. package/lib/models/design/design-properties/properties/layout.model.d.ts +2 -0
  113. package/lib/models/design/design-properties/properties/quarter-range.model.d.ts +3 -0
  114. package/lib/models/design/index.d.ts +3 -2
  115. package/lib/models/design/unavailable-template-item-name-map.model.d.ts +1 -0
  116. package/lib/models/i18n-constants.model.d.ts +56 -10
  117. package/lib/pipes/get-form-control-error.pipe.d.ts +2 -2
  118. package/lib/pipes/get-i18n-string-value-from-locale.pipe.d.ts +1 -1
  119. package/lib/services/api.service.d.ts +52 -18
  120. package/lib/services/ui.service.d.ts +2 -2
  121. package/lib/state/design/template-design.facade.d.ts +26 -0
  122. package/lib/state/form/template-form.effects.d.ts +0 -6
  123. package/lib/utilities/enum-property-handlers-util.d.ts +4 -0
  124. package/lib/utilities/form-option-design-util.d.ts +2 -2
  125. package/lib/utilities/get-design-properties.util.d.ts +3 -0
  126. package/lib/utilities/index.d.ts +6 -0
  127. package/lib/utilities/is-template-util.d.ts +5 -0
  128. package/lib/utilities/item-to-design-base.util.d.ts +5 -0
  129. package/lib/utilities/model-map-util.d.ts +2 -0
  130. package/lib/utilities/template-design-core-util.d.ts +4 -4
  131. package/lib/utilities/template-design-util.d.ts +4 -7
  132. package/lib/utilities/to-design-util.d.ts +4 -0
  133. package/lib/utilities/validator-functions-util.d.ts +12 -0
  134. package/package.json +2 -2
  135. package/esm2015/lib/models/design/enumerations/date-enumeration.model.js +0 -33
  136. package/esm2015/lib/models/design/enumerations/index.js +0 -2
  137. package/esm2015/lib/models/design/template-design-constants.model.js +0 -48
  138. package/lib/models/design/enumerations/index.d.ts +0 -1
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, InjectionToken, Optional, Inject, Component, Input, HostBinding, EventEmitter, Output, Pipe, NgModule, ChangeDetectionStrategy, ViewEncapsulation, HostListener, ViewChild, LOCALE_ID } from '@angular/core';
2
+ import { Injectable, InjectionToken, Optional, Inject, Component, Input, HostBinding, EventEmitter, Output, Injector, Pipe, NgModule, ChangeDetectionStrategy, ViewEncapsulation, HostListener, ViewChild, LOCALE_ID } from '@angular/core';
3
3
  import * as i1 from '@angular/material/dialog';
4
4
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
5
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
6
- import { BOOLEAN_ITEM_TEMPLATE_ID, CHECKBOX_ITEM_TEMPLATE_ID, OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID, YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID, DATE_ITEM_TEMPLATE_ID, DECIMAL_ANSWER_ITEM_TEMPLATE_ID, DROPDOWN_ITEM_TEMPLATE_ID, FILE_UPLOAD_ITEM_TEMPLATE_ID, INTERNATIONALIZED_PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID, INTERNATIONALIZED_SHORT_ANSWER_ITEM_TEMPLATE_ID, MULTIPLE_CHOICE_ITEM_TEMPLATE_ID, NUMBERED_LIST_ITEM_TEMPLATE_ID, PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID, REPEATABLE_ITEM_TEMPLATE_IMPL_ID, TEMPLATE_SECTION_IMPL_ID, SHORT_ANSWER_ITEM_TEMPLATE_ID, TEMPLATE_ITEM_GROUP_IMPL_ID, TEXT_ITEM_TEMPLATE_ID, TITLE_ITEM_TEMPLATE_ID, BULLETED_LIST_ITEM_TEMPLATE_ID, WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID, TIME_ITEM_TEMPLATE_ID, TEMPLATE_IMPL_ID, REQUEST_ID_ITEM_TEMPLATE_ID, MULTIPLE_CHOICE_GRID_ITEM_TEMPLATE_ID, LINEAR_SCALE_ITEM_TEMPLATE_ID, HIDDEN_REFERENCE_ITEM_TEMPLATE_ID, CHECKBOX_GRID_TEMPLATE_ID, instanceOfBooleanItemTemplate, instanceOfBulletedListItemTemplate, instanceOfCheckboxGridTemplate, instanceOfCheckboxItemTemplate, instanceOfDateItemTemplate, instanceOfDecimalAnswerItemTemplate, instanceOfDropdownItemTemplate, instanceOfFileUploadItemTemplate, instanceOfHiddenReferenceItemTemplate, instanceOfInternationalizedParagraphAnswerItemTemplate, instanceOfInternationalizedShortAnswerItemTemplate, instanceOfLinearScaleItemTemplate, instanceOfMultipleChoiceGridItemTemplate, instanceOfMultipleChoiceItemTemplate, instanceOfNumberedListItemTemplate, instanceOfOffsetDateRangeTemplate, instanceOfParagraphAnswerItemTemplate, instanceOfRepeatableItemTemplate, instanceOfRequestIdItemTemplate, instanceOfShortAnswerItemTemplate, instanceOfTemplateItemGroupImpl, instanceOfTemplateSectionImpl, instanceOfTextItemTemplate, instanceOfTimeItemTemplate, instanceOfTitleItemTemplate, instanceOfWholeNumberAnswerItemTemplate, instanceOfYearQuarterRangeTemplate, isForm, I18N_SHORT_ANSWER_ITEM_ID, I18N_PARAGRAPH_ANSWER_ITEM_ID, SHORT_ANSWER_ITEM_ID, PARAGRAPH_ANSWER_ITEM_ID, WHOLE_NUMBER_ANSWER_ITEM_ID, isWholeNumberItem, DECIMAL_ANSWER_ITEM_ID, CHECKBOX_ITEM_ID, isProgressiveForm, isRepeatableItem, isSection, isFormItemGroupImpl, isTableItem, isOffsetDateRangeItem, isYearQuarterRangeItem, isDataCubeItem, TITLE_ITEM_ID, TEXT_ITEM_ID, SECTION_ID, FORM_ITEM_GROUP_IMPL_ID, isConditionalItem, isOptionItemImpl, isOptionGroupItemImpl, instanceOfTemplateImpl, isValueItem, MtnaWfFormItemChange, DROPDOWN_ITEM_ID, isInternationalizedParagraphAnswerItem, isDecimalAnswerItem, isParagraphAnswerItem, BOOLEAN_ITEM_ID, DATE_ITEM_ID, OFFSET_DATE_RANGE_ITEM_ID, FILE_UPLOAD_ITEM_ID, MULTIPLE_CHOICE_ITEM_ID, NUMBERED_LIST_ITEM_ID, REPEATABLE_ITEM_ID, RESOURCE_SEARCH_ITEM_ID, BULLETED_LIST_ITEM_ID, YEAR_QUARTER_RANGE_ITEM_ID } from '@mtna/web-form-ts';
6
+ import { BOOLEAN_ITEM_TEMPLATE_ID, CHECKBOX_ITEM_TEMPLATE_ID, OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID, YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID, DATE_ITEM_TEMPLATE_ID, DECIMAL_ANSWER_ITEM_TEMPLATE_ID, DROPDOWN_ITEM_TEMPLATE_ID, FILE_UPLOAD_ITEM_TEMPLATE_ID, INTERNATIONALIZED_PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID, INTERNATIONALIZED_SHORT_ANSWER_ITEM_TEMPLATE_ID, MULTIPLE_CHOICE_ITEM_TEMPLATE_ID, NUMBERED_LIST_ITEM_TEMPLATE_ID, PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID, REPEATABLE_ITEM_TEMPLATE_IMPL_ID, TEMPLATE_SECTION_IMPL_ID, SHORT_ANSWER_ITEM_TEMPLATE_ID, TEMPLATE_ITEM_GROUP_IMPL_ID, TEXT_ITEM_TEMPLATE_ID, TITLE_ITEM_TEMPLATE_ID, BULLETED_LIST_ITEM_TEMPLATE_ID, WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID, TIME_ITEM_TEMPLATE_ID, TEMPLATE_IMPL_ID, isForm, I18N_SHORT_ANSWER_ITEM_ID, I18N_PARAGRAPH_ANSWER_ITEM_ID, SHORT_ANSWER_ITEM_ID, PARAGRAPH_ANSWER_ITEM_ID, WHOLE_NUMBER_ANSWER_ITEM_ID, isWholeNumberItem, DECIMAL_ANSWER_ITEM_ID, CHECKBOX_ITEM_ID, isProgressiveForm, isRepeatableItem, isSection, isFormItemGroupImpl, isTableItem, isOffsetDateRangeItem, isYearQuarterRangeItem, instanceOfCheckboxItemTemplate, instanceOfDropdownItemTemplate, instanceOfMultipleChoiceItemTemplate, instanceOfBooleanItemTemplate, instanceOfTemplateItemGroupImpl, instanceOfTemplateSectionImpl, isConditionalItem, instanceOfInternationalizedShortAnswerItemTemplate, instanceOfWholeNumberAnswerItemTemplate, instanceOfBulletedListItemTemplate, instanceOfDateItemTemplate, instanceOfDecimalAnswerItemTemplate, instanceOfFileUploadItemTemplate, instanceOfInternationalizedParagraphAnswerItemTemplate, instanceOfNumberedListItemTemplate, instanceOfOffsetDateRangeTemplate, instanceOfParagraphAnswerItemTemplate, instanceOfRepeatableItemTemplate, instanceOfShortAnswerItemTemplate, instanceOfTextItemTemplate, instanceOfTimeItemTemplate, instanceOfTitleItemTemplate, instanceOfYearQuarterRangeTemplate, instanceOfTemplateImpl, isDataCubeItem, TITLE_ITEM_ID, TEXT_ITEM_ID, SECTION_ID, FORM_ITEM_GROUP_IMPL_ID, REQUEST_ID_ITEM_TEMPLATE_ID, MULTIPLE_CHOICE_GRID_ITEM_TEMPLATE_ID, LINEAR_SCALE_ITEM_TEMPLATE_ID, HIDDEN_REFERENCE_ITEM_TEMPLATE_ID, CHECKBOX_GRID_TEMPLATE_ID, instanceOfCheckboxGridTemplate, instanceOfHiddenReferenceItemTemplate, instanceOfLinearScaleItemTemplate, instanceOfMultipleChoiceGridItemTemplate, instanceOfRequestIdItemTemplate, isOptionItemImpl, isOptionGroupItemImpl, isDateItem, isValueItem, MtnaWfFormItemChange, DROPDOWN_ITEM_ID, isInternationalizedParagraphAnswerItem, isDecimalAnswerItem, isParagraphAnswerItem, BOOLEAN_ITEM_ID, DATE_ITEM_ID, OFFSET_DATE_RANGE_ITEM_ID, FILE_UPLOAD_ITEM_ID, MULTIPLE_CHOICE_ITEM_ID, NUMBERED_LIST_ITEM_ID, REPEATABLE_ITEM_ID, RESOURCE_SEARCH_ITEM_ID, BULLETED_LIST_ITEM_ID, YEAR_QUARTER_RANGE_ITEM_ID } from '@mtna/web-form-ts';
7
7
  import { BehaviorSubject, Subject, of, Subscription, merge } from 'rxjs';
8
8
  import * as i2$6 from '@mtna/core-i18n-angular';
9
9
  import { getI18nString, MtnaLocaleIds, mtnaToLanguageId, mtnaLanguageIdToDisplay } from '@mtna/core-i18n-angular';
10
- import { instanceOfModelDesignProperty, getLiteralProperties, getLiteralDesignProperty, getModelDesignProperty, getReferenceDesignProperty, getReferenceProperties, getI18nListProperties, getI18nListDesignProperty } from '@mtna/designer-ts';
10
+ import { instanceOfModelDesignProperty, getLiteralProperties, getLiteralDesignProperty, getModelDesignProperty, getReferenceDesignProperty, getReferenceProperties, getI18nListProperties, getI18nListDesignProperty, getEnumerationLiteralDesignProperty, getEnumerationLiteralProperties } from '@mtna/designer-ts';
11
11
  import { isPresent, isKey, isNullOrUndefined, isType, isObject, toLetters } from '@mtna/core-ts';
12
12
  import * as i1$c from '@mtna/designer-angular';
13
13
  import { DesignMapper, DesignFacade, getDesignMap } from '@mtna/designer-angular';
@@ -15,7 +15,7 @@ import { v4 } from 'uuid';
15
15
  import * as i6 from '@angular/forms';
16
16
  import { FormGroup, Validators, FormControl, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
17
17
  import * as i3$3 from '@angular/material/core';
18
- import { ErrorStateMatcher, mixinColor, MatRippleModule, MAT_DATE_FORMATS } from '@angular/material/core';
18
+ import { ErrorStateMatcher, MAT_DATE_FORMATS, mixinColor, MatRippleModule } from '@angular/material/core';
19
19
  import { trigger, state, style, transition, animate } from '@angular/animations';
20
20
  import * as i2 from '@mtna/pojo-social-angular';
21
21
  import { MtnaAnnotationsIndicatorModule } from '@mtna/pojo-social-angular';
@@ -31,7 +31,7 @@ import * as i1$2 from '@angular/platform-browser';
31
31
  import * as i3$1 from '@angular/material/button';
32
32
  import { MatButtonModule } from '@angular/material/button';
33
33
  import { MatMomentDateModule } from '@angular/material-moment-adapter';
34
- import { skipWhile, take, takeUntil, distinctUntilChanged, switchMap, map, catchError } from 'rxjs/operators';
34
+ import { skipWhile, take, takeUntil, distinctUntilChanged, tap } from 'rxjs/operators';
35
35
  import * as i1$3 from '@angular/common/http';
36
36
  import * as i1$8 from '@mtna/search-manager-angular';
37
37
  import { MtnaSearchSelectionService, MtnaSearchDialogComponent, MtnaSearchDialogData } from '@mtna/search-manager-angular';
@@ -69,7 +69,6 @@ import { MatTableModule } from '@angular/material/table';
69
69
  import * as i1$a from '@ngrx/store';
70
70
  import { createAction, props, createReducer, on, createFeatureSelector, createSelector } from '@ngrx/store';
71
71
  import * as i1$b from '@ngrx/effects';
72
- import { createEffect, ofType } from '@ngrx/effects';
73
72
  import * as i5$2 from '@angular/router';
74
73
 
75
74
  // I18N Constants for the Template Item Mapper
@@ -97,9 +96,17 @@ const i18n_bulletedListItemInstructions = $localize `The items that make up this
97
96
  const i18n_checkboxConfiguration = $localize `Checkbox Configuration`;
98
97
  const i18n_codeOption = $localize `Code Option`;
99
98
  const i18n_codeOptionInstructions = $localize `The code option that should be presented to the user.`;
99
+ const i18n_column = $localize `Column`;
100
+ const i18n_conditions = $localize `Conditions`;
101
+ const i18n_conditionAllRequired = $localize `All Required`;
102
+ const i18n_conditionAllRequiredInstructions = $localize `Set to true if all item references must have the specified value for the condition to be met. Setting this as false means one to all of the values must match for the condition to be met.`;
103
+ const i18n_conditionItemIds = $localize `Item References`;
104
+ const i18n_conditionItemIdsInstructions = $localize `The item references that determine when the condition is met. These are references to other items in the form that affect the state of this item.`;
100
105
  const i18n_core = $localize `Core`;
101
106
  const i18n_childItems = $localize `Child Items`;
102
107
  const i18n_dateConfiguration = $localize `Date Configuration`;
108
+ const i18n_dateFormat = $localize `Date Format`;
109
+ const i18n_dateFormatInstructions = $localize `The format that the date should be displayed in the form. This is typically used to ensure that the date is presented in a way that is consistent with the user's expectations.`;
103
110
  const i18n_description = $localize `Description`;
104
111
  const i18n_descriptionInstructions = $localize `The description is a short representation of what the value for the input should be.`;
105
112
  const i18n_descriptive = $localize `Descriptive Information`;
@@ -132,7 +139,7 @@ const i18n_itemsInstructions = $localize `The items that make up this template.`
132
139
  const i18n_label = $localize `Label`;
133
140
  const i18n_labelInstructions = $localize `The label is a short representation of what the value for the input should be. This will be presented as a greyed out value in the input and shift to the input title once the user provides an input of their own.`;
134
141
  const i18n_layout = $localize `Layout`;
135
- const i18n_layoutInstructions = $localize `Indicates how the child items of this item should be presented, ROW indicates that multiple items should be put on a single row (to save space), COLUMN indicates the items should be placed in a vertical way.`;
142
+ const i18n_layoutInstructions = $localize `Indicates how the child items of this item should be presented. "Row" indicates that multiple items should be put on a single row (to save space), while "Column" indicates the items should be placed in a vertical way.`;
136
143
  const i18n_maxCharCount = $localize `Maximum Character Count`;
137
144
  const i18n_maxCharCountInstructions = $localize `The maximum character count of the values that are input to be considered valid, this is optional.`;
138
145
  const i18n_minCharCount = $localize `Minimum Character Count`;
@@ -186,6 +193,7 @@ const i18n_repeatableItemTemplateId = $localize `Repeatable Item Template Id`;
186
193
  const i18n_repeatableItemTemplateIdInstructions = $localize `The id of the template that should be used to create a new instance of this item.`;
187
194
  const i18n_required = $localize `Required`;
188
195
  const i18n_requiredInstructions = $localize `Indicates that this item requires a value to be considered complete / valid.`;
196
+ const i18n_row = $localize `Row`;
189
197
  const i18n_selectAReference = $localize `Select a Reference`;
190
198
  const i18n_selectAReferenceDialogTitle = $localize `Select a Reference Dialog`;
191
199
  const i18n_settings = $localize `Settings`;
@@ -213,60 +221,99 @@ const i18n_yearQuarterRangeConfiguration = $localize `Year Quarter Range Configu
213
221
  const i18n_listValue = $localize `List Value`;
214
222
  const i18n_newListValue = $localize `New List Value`;
215
223
  const i18n_newItem = $localize `New Item`;
216
- const i18n_exampleText = $localize `Example Text`;
224
+ const i18n_startYear = $localize `Start Year`;
225
+ const i18n_startYearInstructions = $localize `The starting year for the year quarter range.`;
226
+ const i18n_startQuarter = $localize `Start Quarter`;
227
+ const i18n_startQuarterInstructions = $localize `The starting quarter for the year quarter range.`;
228
+ const i18n_endYear = $localize `End Year`;
229
+ const i18n_endYearInstructions = $localize `The ending year for the year quarter range.`;
230
+ const i18n_endQuarter = $localize `End Quarter`;
231
+ const i18n_endQuarterInstructions = $localize `The ending quarter for the year quarter range.`;
232
+ const i18n_quarterOne = $localize `Q1`;
233
+ const i18n_quarterTwo = $localize `Q2`;
234
+ const i18n_quarterThree = $localize `Q3`;
235
+ const i18n_quarterFour = $localize `Q4`;
217
236
  const i18n_boolean = $localize `Boolean`;
218
237
  const i18n_booleanItem = $localize `Boolean Item`;
238
+ const i18n_booleanItemDescription = $localize `A simple yes/no or true/false question.`;
219
239
  const i18n_bulletedListItem = $localize `Bulleted List Item`;
240
+ const i18n_bulletedListItemDescription = $localize `Displays a list of items using bullet points.`;
220
241
  const i18n_checkbox = $localize `Checkbox`;
221
242
  const i18n_checkboxItem = $localize `Checkbox Item`;
222
- const i18n_offsetDateRange = $localize `Offset Date Range`;
223
- const i18n_offsetDateRangeItem = $localize `Offset Date Range Item`;
224
- const i18n_yearQuarterRange = $localize `Year Quarter Range`;
225
- const i18n_yearQuarterRangeItem = $localize `Year Quarter Range Item`;
243
+ const i18n_checkboxItemDescription = $localize `Allows users to select one or more options from a list.`;
226
244
  const i18n_date = $localize `Date`;
227
245
  const i18n_dateItem = $localize `Date Item`;
246
+ const i18n_dateItemDescription = $localize `Allows users to select a specific calendar date.`;
228
247
  const i18n_decimalAnswer = $localize `Decimal Answer`;
229
- const i18n_decimalValue = $localize `Decimal Value`;
230
248
  const i18n_decimalAnswerItem = $localize `Decimal Answer Item`;
249
+ const i18n_decimalAnswerItemDescription = $localize `A field for entering numbers that may include decimals.`;
250
+ const i18n_decimalValue = $localize `Decimal Value`;
231
251
  const i18n_dropdown = $localize `Dropdown`;
232
252
  const i18n_dropdownItem = $localize `Dropdown Item`;
253
+ const i18n_dropdownItemDescription = $localize `A compact list of options where users select one item from a dropdown menu.`;
254
+ const i18n_exampleText = $localize `Example Text`;
233
255
  const i18n_fileUpload = $localize `File Upload`;
234
256
  const i18n_fileUploadItem = $localize `File Upload Item`;
257
+ const i18n_fileUploadItemDescription = $localize `Allows users to upload one or more files.`;
258
+ const i18n_group = $localize `Group`;
259
+ const i18n_groupItem = $localize `Group Item`;
260
+ const i18n_groupItemDescription = $localize `Groups related fields together within a section.`;
235
261
  const i18n_internationalizedParagraphAnswer = $localize `Internationalized Paragraph Answer`;
236
262
  const i18n_internationalizedParagraphAnswerItem = $localize `Internationalized Paragraph Answer Item`;
263
+ const i18n_internationalizedParagraphAnswerItemDescription = $localize `A long text response that supports multiple languages.`;
237
264
  const i18n_internationalizedShortAnswer = $localize `Internationalized Short Answer`;
238
265
  const i18n_internationalizedShortAnswerItem = $localize `Internationalized Short Answer Item`;
266
+ const i18n_internationalizedShortAnswerItemDescription = $localize `A short text response that supports multiple languages.`;
239
267
  const i18n_multipleChoice = $localize `Multiple Choice`;
240
268
  const i18n_multipleChoiceItem = $localize `Multiple Choice Item`;
269
+ const i18n_multipleChoiceItemDescription = $localize `Allows users to select a single option from a list.`;
270
+ const i18n_newOptionDescription = $localize `Adds a new selectable option to a list of choices.`;
241
271
  const i18n_numberedListItem = $localize `Numbered List Item`;
272
+ const i18n_numberedListItemDescription = $localize `Displays a list of items in a numbered format.`;
273
+ const i18n_offsetDateRange = $localize `Offset Date Range`;
274
+ const i18n_offsetDateRangeItem = $localize `Offset Date Range Item`;
275
+ const i18n_offsetDateRangeItemDescription = $localize `Defines a date range relative to another date.`;
242
276
  const i18n_orderedList = $localize `Ordered List`;
243
277
  const i18n_orderedListItem = $localize `Ordered List Item`;
244
278
  const i18n_paragraphAnswer = $localize `Paragraph Answer`;
245
279
  const i18n_paragraphAnswerItem = $localize `Paragraph Answer Item`;
280
+ const i18n_paragraphAnswerItemDescription = $localize `A multi-line text field for longer, detailed responses.`;
246
281
  const i18n_repeatable = $localize `Repeatable`;
247
282
  const i18n_repeatableItem = $localize `Repeatable Item`;
248
- const i18n_shortAnswer = $localize `Short Answer`;
249
- const i18n_shortAnswerItem = $localize `Short Answer Item`;
250
- const i18n_group = $localize `Group`;
251
- const i18n_groupItem = $localize `Group Item`;
283
+ const i18n_repeatableItemDescription = $localize `Allows a set of fields to be repeated multiple times by the user.`;
252
284
  const i18n_section = $localize `Section`;
285
+ const i18n_sectionDescription = $localize `A container used to organize content into distinct sections.`;
253
286
  const i18n_sectionItem = $localize `Section Item`;
287
+ const i18n_sectionStepName = $localize `Section Step Name`;
288
+ const i18n_sectionStepNameInstructions = $localize `The name of the step that this section represents. This is used to group sections together into a single step in the form.`;
289
+ const i18n_sectionTitleItem = $localize `Section Title Item`;
290
+ const i18n_shortAnswer = $localize `Short Answer`;
291
+ const i18n_shortAnswerItem = $localize `Short Answer Item`;
292
+ const i18n_shortAnswerItemDescription = $localize `A single-line text field for brief responses.`;
254
293
  const i18n_text = $localize `Text`;
255
294
  const i18n_textItem = $localize `Text Item`;
295
+ const i18n_textItemDescription = $localize `Displays static informational text to guide users.`;
256
296
  const i18n_time = $localize `Time`;
257
297
  const i18n_timeItem = $localize `Time Item`;
258
298
  const i18n_title = $localize `Title`;
259
299
  const i18n_titleItem = $localize `Title Item`;
300
+ const i18n_titleItemDescription = $localize `Displays a heading or title for a section or group.`;
260
301
  const i18n_unorderedList = $localize `Unordered List`;
261
302
  const i18n_unorderedListItem = $localize `Unordered List Item`;
262
303
  const i18n_wholeNumberAnswer = $localize `Whole Number Answer`;
263
304
  const i18n_wholeNumberAnswerItem = $localize `Whole Number Answer Item`;
305
+ const i18n_wholeNumberAnswerItemDescription = $localize `A field for entering whole numbers only (no decimals).`;
264
306
  const i18n_wholeNumberValue = $localize `Whole Number Value`;
307
+ const i18n_yearQuarterRange = $localize `Year Quarter Range`;
308
+ const i18n_yearQuarterRangeItem = $localize `Year Quarter Range Item`;
309
+ const i18n_yearQuarterRangeItemDescription = $localize `Allows users to select a range based on year and quarter.`;
265
310
 
266
311
  const prop_option_enabled_items = 'enabledItems';
267
312
  const prop_option_disabled_items = 'disabledItems';
268
313
  const prop_option_template = 'optionTemplate';
269
- const prop_item_acknowledgement = 'acknowledgement'; // maps to FormOptionSelector.acknowledgement property
314
+ const prop_item_condition_allRequired = 'allRequired';
315
+ const prop_item_condition_itemIds = 'itemIds';
316
+ const prop_item_acknowledgementTemplate = 'acknowledgementTemplate'; // maps to FormOptionSelector.acknowledgement property
270
317
  const prop_item_additional_text = 'additionalText'; // maps to RepeatableItemTemplate.additionalText property
271
318
  const prop_item_annotation_enabled = 'annotationEnabled';
272
319
  const prop_item_code_option = 'codeOption'; // maps to TemplateOptionItem.codeOption property
@@ -298,6 +345,8 @@ const prop_item_option_subsets = 'optionSubsets'; // maps to CheckboxItemTemplat
298
345
  const prop_item_option_template_map = 'optionTemplateMap'; // maps to CheckboxItemTemplate.optionTemplateMap
299
346
  const prop_item_preset_value = 'presetValue'; // maps to DateItemTemplate.presetValue
300
347
  const prop_item_positive_only = 'positiveOnly'; // maps to wholeNumber/decimal AnswerItem.positiveOnly
348
+ const prop_item_startQuarter = 'quarter'; // maps to QuarterRangeTemplate.rangeLimits.start/end.quarter
349
+ const prop_item_endQuarter = 'endQuarter';
301
350
  const prop_item_question_text = 'questionText'; // maps to templateItem.questionText
302
351
  const prop_item_range_limits = 'rangeLimits'; // maps to OffsetDateRangeTemplate.rangeLimits
303
352
  const prop_item_repeatable_item_template_id = 'repeatableItemTemplateId'; // maps to RepeatableItemTemplate.repeatableItemTemplateId
@@ -307,139 +356,163 @@ const prop_item_text = 'text'; // maps to TextItemTemplate.value
307
356
  const prop_item_title = 'title'; // maps to templateSection.title
308
357
  const prop_item_value = 'value'; // maps to TitleItem.value
309
358
  const prop_item_values = 'values'; // maps to BulletedListItemTemplate.values
310
- const prop_template_descriptive_text = 'template-descriptive-text'; // maps to template.descriptiveText property
359
+ const prop_item_startYear = 'startYear'; // maps to YearQuarterRangeTemplate.rangeLimits.start/end.year
360
+ const prop_item_endYear = 'endYear'; // maps to YearQuarterRangeTemplate.rangeLimits.start/end.year
361
+ const prop_template_descriptive_text = 'descriptiveText'; // maps to template.descriptiveText property
311
362
  const prop_template_items = 'items'; // maps to template.items property
312
363
  const prop_template_title = 'title'; // maps to template.title property
313
364
 
314
365
  const BOOLEAN_POTENTIAL_DESIGN = {
315
366
  id: v4(),
316
367
  display: i18n_booleanItem,
368
+ description: i18n_booleanItemDescription,
317
369
  type: BOOLEAN_ITEM_TEMPLATE_ID,
318
370
  focusType: 'SET_FOCUS',
319
371
  };
320
372
  const CHECKBOX_POTENTIAL_DESIGN = {
321
373
  id: v4(),
322
374
  display: i18n_checkboxItem,
375
+ description: i18n_checkboxItemDescription,
323
376
  type: CHECKBOX_ITEM_TEMPLATE_ID,
324
377
  focusType: 'SET_FOCUS',
325
378
  };
326
379
  const OFFSET_DATE_RANGE_POTENTIAL_DESIGN = {
327
380
  id: v4(),
328
381
  display: i18n_offsetDateRangeItem,
382
+ description: i18n_offsetDateRangeItemDescription,
329
383
  type: OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID,
330
384
  focusType: 'SET_FOCUS',
331
385
  };
332
386
  const YEAR_QUARTER_RANGE_POTENTIAL_DESIGN = {
333
387
  id: v4(),
334
388
  display: i18n_yearQuarterRangeItem,
389
+ description: i18n_yearQuarterRangeItemDescription,
335
390
  type: YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID,
336
391
  focusType: 'SET_FOCUS',
337
392
  };
338
393
  const DATE_POTENTIAL_DESIGN = {
339
394
  id: v4(),
340
395
  display: i18n_dateItem,
396
+ description: i18n_dateItemDescription,
341
397
  type: DATE_ITEM_TEMPLATE_ID,
342
398
  focusType: 'SET_FOCUS',
343
399
  };
344
400
  const DECIMAL_ANSWER_POTENTIAL_DESIGN = {
345
401
  id: v4(),
346
402
  display: i18n_decimalAnswerItem,
403
+ description: i18n_decimalAnswerItemDescription,
347
404
  type: DECIMAL_ANSWER_ITEM_TEMPLATE_ID,
348
405
  focusType: 'SET_FOCUS',
349
406
  };
350
407
  const DROPDOWN_POTENTIAL_DESIGN = {
351
408
  id: v4(),
352
409
  display: i18n_dropdownItem,
410
+ description: i18n_dropdownItemDescription,
353
411
  type: DROPDOWN_ITEM_TEMPLATE_ID,
354
412
  focusType: 'SET_FOCUS',
355
413
  };
356
414
  const FILE_UPLOAD_POTENTIAL_DESIGN = {
357
415
  id: v4(),
358
416
  display: i18n_fileUploadItem,
417
+ description: i18n_fileUploadItemDescription,
359
418
  type: FILE_UPLOAD_ITEM_TEMPLATE_ID,
360
419
  focusType: 'SET_FOCUS',
361
420
  };
362
421
  const I18N_PARAGRAPH_ANSWER_POTENTIAL_DESIGN = {
363
422
  id: v4(),
364
423
  display: i18n_internationalizedParagraphAnswerItem,
424
+ description: i18n_internationalizedParagraphAnswerItemDescription,
365
425
  type: INTERNATIONALIZED_PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID,
366
426
  focusType: 'SET_FOCUS',
367
427
  };
368
428
  const I18N_SHORT_ANSWER_POTENTIAL_DESIGN = {
369
429
  id: v4(),
370
430
  display: i18n_internationalizedShortAnswerItem,
431
+ description: i18n_internationalizedShortAnswerItemDescription,
371
432
  type: INTERNATIONALIZED_SHORT_ANSWER_ITEM_TEMPLATE_ID,
372
433
  focusType: 'SET_FOCUS',
373
434
  };
374
435
  const MULTIPLE_CHOICE_POTENTIAL_DESIGN = {
375
436
  id: v4(),
376
437
  display: i18n_multipleChoiceItem,
438
+ description: i18n_multipleChoiceItemDescription,
377
439
  type: MULTIPLE_CHOICE_ITEM_TEMPLATE_ID,
378
440
  focusType: 'SET_FOCUS',
379
441
  };
380
442
  const NUMBERED_LIST_POTENTIAL_DESIGN = {
381
443
  id: v4(),
382
444
  display: i18n_numberedListItem,
445
+ description: i18n_numberedListItemDescription,
383
446
  type: NUMBERED_LIST_ITEM_TEMPLATE_ID,
384
447
  focusType: 'SET_FOCUS',
385
448
  };
386
449
  const PARAGRAPH_ANSWER_POTENTIAL_DESIGN = {
387
450
  id: v4(),
388
451
  display: i18n_paragraphAnswerItem,
452
+ description: i18n_paragraphAnswerItemDescription,
389
453
  type: PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID,
390
454
  focusType: 'SET_FOCUS',
391
455
  };
392
456
  const REPEATABLE_POTENTIAL_DESIGN = {
393
457
  id: v4(),
394
458
  display: i18n_repeatableItem,
459
+ description: i18n_repeatableItemDescription,
395
460
  type: REPEATABLE_ITEM_TEMPLATE_IMPL_ID,
396
461
  focusType: 'SET_FOCUS',
397
462
  };
398
463
  const SECTION_POTENTIAL_DESIGN = {
399
464
  id: v4(),
400
465
  display: i18n_section,
466
+ description: i18n_sectionDescription,
401
467
  type: TEMPLATE_SECTION_IMPL_ID,
402
468
  focusType: 'SET_FOCUS',
403
469
  };
404
470
  const SHORT_ANSWER_POTENTIAL_DESIGN = {
405
471
  id: v4(),
406
472
  display: i18n_shortAnswerItem,
473
+ description: i18n_shortAnswerItemDescription,
407
474
  type: SHORT_ANSWER_ITEM_TEMPLATE_ID,
408
475
  focusType: 'SET_FOCUS',
409
476
  };
410
477
  const GROUP_POTENTIAL_DESIGN = {
411
478
  id: v4(),
412
479
  display: i18n_groupItem,
480
+ description: i18n_groupItemDescription,
413
481
  type: TEMPLATE_ITEM_GROUP_IMPL_ID,
414
482
  focusType: 'SET_FOCUS',
415
483
  };
416
484
  const TEXT_POTENTIAL_DESIGN = {
417
485
  id: v4(),
418
486
  display: i18n_textItem,
487
+ description: i18n_textItemDescription,
419
488
  type: TEXT_ITEM_TEMPLATE_ID,
420
489
  focusType: 'SET_FOCUS',
421
490
  };
422
491
  const TITLE_POTENTIAL_DESIGN = {
423
492
  id: v4(),
424
493
  display: i18n_titleItem,
494
+ description: i18n_titleItemDescription,
425
495
  type: TITLE_ITEM_TEMPLATE_ID,
426
496
  focusType: 'SET_FOCUS',
427
497
  };
428
498
  const BULLETED_LIST_POTENTIAL_DESIGN = {
429
499
  id: v4(),
430
500
  display: i18n_bulletedListItem,
501
+ description: i18n_bulletedListItemDescription,
431
502
  type: BULLETED_LIST_ITEM_TEMPLATE_ID,
432
503
  focusType: 'SET_FOCUS',
433
504
  };
434
505
  const WHOLE_NUMBER_ANSWER_POTENTIAL_DESIGN = {
435
506
  id: v4(),
436
507
  display: i18n_wholeNumberAnswerItem,
508
+ description: i18n_wholeNumberAnswerItemDescription,
437
509
  type: WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID,
438
510
  focusType: 'SET_FOCUS',
439
511
  };
440
512
  const FORM_OPTION_SELECTOR_POTENTIAL_DESIGN = {
441
513
  id: v4(),
442
514
  display: i18n_newOption,
515
+ description: i18n_newOptionDescription,
443
516
  type: 'OPTION',
444
517
  focusType: 'MAINTAIN_FOCUS',
445
518
  };
@@ -468,22 +541,40 @@ const SECTION_POTENTIAL_DESIGN_LIST = [GROUP_POTENTIAL_DESIGN, ...GROUP_POTENTIA
468
541
  const TEMPLATE_POTENTIAL_DESIGN_LIST = [SECTION_POTENTIAL_DESIGN, ...SECTION_POTENTIAL_DESIGN_LIST];
469
542
  const OPTION_SELECTOR_POTENTIAL_DESIGN_LIST = [...SECTION_POTENTIAL_DESIGN_LIST];
470
543
 
544
+ const templateMapperRegistry = {};
545
+ const templateMapperToDesignRegistry = {};
546
+ function registerTemplateMapper(id, ctor, toDesignFn) {
547
+ templateMapperRegistry[id] = ctor;
548
+ templateMapperToDesignRegistry[id] = toDesignFn;
549
+ }
550
+ function getTemplateMapperFromDesign$1(design, context, customParams) {
551
+ const MapperClass = templateMapperRegistry[design.type];
552
+ if (!MapperClass) {
553
+ throw new Error(`No mapper registered for design type: "${design.type}". Did you forget to import mapper-classes.model.ts?`);
554
+ }
555
+ return new MapperClass({ design, context, customParams });
556
+ }
557
+ function mapperTemplateToDesign(model, languageId, context, customParams) {
558
+ const fn = templateMapperToDesignRegistry[model.itemId];
559
+ const design = fn({ model, languageId, context, customParams });
560
+ return Object.assign({}, design);
561
+ }
471
562
  const mapperRegistry = {};
472
563
  const mapperToDesignRegistry = {};
473
564
  function registerMapper(id, ctor, toDesignFn) {
474
565
  mapperRegistry[id] = ctor;
475
566
  mapperToDesignRegistry[id] = toDesignFn;
476
567
  }
477
- function getItemMapperFromDesign(design, context) {
568
+ function getItemMapperFromDesign(design, context, customParams) {
478
569
  const MapperClass = mapperRegistry[design.type];
479
570
  if (!MapperClass) {
480
571
  throw new Error(`No mapper registered for design type: "${design.type}". Did you forget to import mapper-classes.model.ts?`);
481
572
  }
482
- return new MapperClass({ design, context });
573
+ return new MapperClass({ design, context, customParams });
483
574
  }
484
- function mapperItemToDesign(item, languageId, parent, context) {
575
+ function mapperItemToDesign(item, languageId, parent, context, customParams) {
485
576
  const fn = mapperToDesignRegistry[item.itemId];
486
- const design = fn({ model: item, languageId, context });
577
+ const design = fn({ model: item, languageId, context, customParams });
487
578
  return Object.assign(Object.assign({}, design), { parent });
488
579
  }
489
580
 
@@ -550,7 +641,7 @@ const stringOption = {
550
641
  const newFormOptionSelectorStringOption = {
551
642
  containerDescription: '',
552
643
  codeValue: '',
553
- acknowledgement: undefined,
644
+ acknowledgementTemplate: undefined,
554
645
  disabledItems: [],
555
646
  enabledItems: [],
556
647
  multiSelect: false,
@@ -562,7 +653,7 @@ const newFormOptionSelectorStringOption = {
562
653
  const newFormOptionSelectorBooleanOption = {
563
654
  containerDescription: '',
564
655
  codeValue: '',
565
- acknowledgement: undefined,
656
+ acknowledgementTemplate: undefined,
566
657
  disabledItems: [],
567
658
  enabledItems: [],
568
659
  multiSelect: false,
@@ -638,7 +729,7 @@ const getNewTemplateItemGroup = (designBase, languageId) => {
638
729
  return Object.assign(Object.assign({}, baseTemplateItem(designBase, languageId)), { items: [], layout: 'COLUMN' });
639
730
  };
640
731
  const getNewTemplateSection = (designBase, languageId) => {
641
- return Object.assign(Object.assign({}, getNewTemplateItemGroup(designBase, languageId)), { title: getNewTitleItemTemplate(designBase, languageId) });
732
+ return Object.assign(Object.assign({}, getNewTemplateItemGroup(designBase, languageId)), { title: getNewTitleItemTemplate(TITLE_POTENTIAL_DESIGN, languageId) });
642
733
  };
643
734
  const standardFactories = {
644
735
  [BOOLEAN_ITEM_TEMPLATE_ID]: getNewBooleanItemTemplate,
@@ -677,21 +768,22 @@ function getNewInitTemplateItem(designBase, languageId, languageTags) {
677
768
  return baseTemplateItem(designBase, languageId);
678
769
  }
679
770
 
771
+ // TEMPLATE ITEM UTILS
680
772
  function getNewTemplateItem(designBase, languageId, languageIds) {
681
773
  return getNewInitTemplateItem(designBase, languageId, languageIds);
682
774
  }
683
- function toTemplateItem(design, context) {
684
- const model = getItemMapperFromDesign(design, context).getModel();
775
+ function toTemplateItem(design, context, customParams) {
776
+ const model = getItemMapperFromDesign(design, context, customParams).getModel();
685
777
  return model;
686
778
  }
687
779
  function getTemplateItemPotentialDesigns(design, property) {
688
780
  return getItemMapperFromDesign(design).getPotentialDesigns(property);
689
781
  }
690
- function itemToDesign(item, languageId, parent, context) {
691
- const design = mapperItemToDesign(item, languageId, parent, context);
782
+ function itemToDesign(item, languageId, parent, context, customParams) {
783
+ const design = mapperItemToDesign(item, languageId, parent, context, customParams);
692
784
  return Object.assign(Object.assign({}, design), { parent });
693
785
  }
694
- function getTemplateItems(design, sectionId, propertyIds, context) {
786
+ function getTemplateItems(design, sectionId, propertyIds, context, customParams) {
695
787
  const values = {};
696
788
  const section = design.sections.find((designSection) => designSection.display === sectionId);
697
789
  if (section) {
@@ -700,7 +792,7 @@ function getTemplateItems(design, sectionId, propertyIds, context) {
700
792
  if (property && instanceOfModelDesignProperty(property)) {
701
793
  values[propertyId] = [];
702
794
  for (const value of property.values) {
703
- values[propertyId].push(toTemplateItem(value, context));
795
+ values[propertyId].push(toTemplateItem(value, context, customParams));
704
796
  }
705
797
  }
706
798
  }
@@ -723,7 +815,7 @@ class TemplateMapper extends DesignMapper {
723
815
  }
724
816
  getPotentialDesigns(property) {
725
817
  if (property.property === prop_template_items) {
726
- return GROUP_POTENTIAL_DESIGN_LIST;
818
+ return TEMPLATE_POTENTIAL_DESIGN_LIST;
727
819
  }
728
820
  else {
729
821
  return [];
@@ -756,7 +848,9 @@ class TemplateMapper extends DesignMapper {
756
848
  }
757
849
  getSectionTemplateItems(template, languageId, parent) {
758
850
  const properties = [];
759
- properties.push(getModelDesignProperty(i18n_templateItems, i18n_templateItemsInstructions, prop_template_items, true, template.items ? template.items.map((item) => itemToDesign(item, languageId, parent, this.context)) : []));
851
+ properties.push(getModelDesignProperty(i18n_templateItems, i18n_templateItemsInstructions, prop_template_items, true, template.items
852
+ ? template.items.map((item) => itemToDesign(item, languageId, parent, this.context, this.customParams))
853
+ : []));
760
854
  return { display: i18n_templateItems, properties };
761
855
  }
762
856
  templateToDesignBase(model, languageId) {
@@ -784,83 +878,17 @@ function getNewTemplate(designBase) {
784
878
  function initializeDesign(designBase) {
785
879
  return Object.assign(Object.assign({}, designBase), { sections: [] });
786
880
  }
787
- function isTemplateDesign(design) {
788
- return design.type === TEMPLATE_IMPL_ID;
789
- }
790
- function isTemplateItemDesign(design) {
791
- switch (design.type) {
792
- case BOOLEAN_ITEM_TEMPLATE_ID:
793
- case BULLETED_LIST_ITEM_TEMPLATE_ID:
794
- case CHECKBOX_GRID_TEMPLATE_ID:
795
- case CHECKBOX_ITEM_TEMPLATE_ID:
796
- case DATE_ITEM_TEMPLATE_ID:
797
- case DECIMAL_ANSWER_ITEM_TEMPLATE_ID:
798
- case DROPDOWN_ITEM_TEMPLATE_ID:
799
- case FILE_UPLOAD_ITEM_TEMPLATE_ID:
800
- case HIDDEN_REFERENCE_ITEM_TEMPLATE_ID:
801
- case INTERNATIONALIZED_PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID:
802
- case INTERNATIONALIZED_SHORT_ANSWER_ITEM_TEMPLATE_ID:
803
- case LINEAR_SCALE_ITEM_TEMPLATE_ID:
804
- case MULTIPLE_CHOICE_GRID_ITEM_TEMPLATE_ID:
805
- case MULTIPLE_CHOICE_ITEM_TEMPLATE_ID:
806
- case NUMBERED_LIST_ITEM_TEMPLATE_ID:
807
- case OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID:
808
- case PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID:
809
- case REPEATABLE_ITEM_TEMPLATE_IMPL_ID:
810
- case REQUEST_ID_ITEM_TEMPLATE_ID:
811
- case SHORT_ANSWER_ITEM_TEMPLATE_ID:
812
- case TEMPLATE_ITEM_GROUP_IMPL_ID:
813
- case TEMPLATE_SECTION_IMPL_ID:
814
- case TEXT_ITEM_TEMPLATE_ID:
815
- case TIME_ITEM_TEMPLATE_ID:
816
- case TITLE_ITEM_TEMPLATE_ID:
817
- case WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID:
818
- case YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID:
819
- return true;
820
- default:
821
- return false;
822
- }
823
- }
824
- function isTemplateItem(something) {
825
- return (instanceOfBooleanItemTemplate(something) ||
826
- instanceOfBulletedListItemTemplate(something) ||
827
- instanceOfCheckboxGridTemplate(something) ||
828
- instanceOfCheckboxItemTemplate(something) ||
829
- instanceOfDateItemTemplate(something) ||
830
- instanceOfDecimalAnswerItemTemplate(something) ||
831
- instanceOfDropdownItemTemplate(something) ||
832
- instanceOfFileUploadItemTemplate(something) ||
833
- instanceOfHiddenReferenceItemTemplate(something) ||
834
- instanceOfInternationalizedParagraphAnswerItemTemplate(something) ||
835
- instanceOfInternationalizedShortAnswerItemTemplate(something) ||
836
- instanceOfLinearScaleItemTemplate(something) ||
837
- instanceOfMultipleChoiceGridItemTemplate(something) ||
838
- instanceOfMultipleChoiceItemTemplate(something) ||
839
- instanceOfNumberedListItemTemplate(something) ||
840
- instanceOfOffsetDateRangeTemplate(something) ||
841
- instanceOfParagraphAnswerItemTemplate(something) ||
842
- instanceOfRepeatableItemTemplate(something) ||
843
- instanceOfRequestIdItemTemplate(something) ||
844
- instanceOfShortAnswerItemTemplate(something) ||
845
- instanceOfTemplateItemGroupImpl(something) ||
846
- instanceOfTemplateSectionImpl(something) ||
847
- instanceOfTextItemTemplate(something) ||
848
- instanceOfTimeItemTemplate(something) ||
849
- instanceOfTitleItemTemplate(something) ||
850
- instanceOfWholeNumberAnswerItemTemplate(something) ||
851
- instanceOfYearQuarterRangeTemplate(something));
852
- }
853
881
  function getTemplatePotentialDesigns(design, property) {
854
882
  return getTemplateMapperFromDesign(design).getPotentialDesigns(property);
855
883
  }
856
- function templateToDesign(template, languageId, context) {
857
- return new TemplateMapper({ model: template, languageId, context }).getDesign();
884
+ function templateToDesign(template, languageId, context, customParams) {
885
+ return new TemplateMapper({ model: template, languageId, context, customParams }).getDesign();
858
886
  }
859
- function toTemplate(design, context) {
860
- return new TemplateMapper({ design, context }).getModel();
887
+ function toTemplate(design, context, customParams) {
888
+ return new TemplateMapper({ design, context, customParams }).getModel();
861
889
  }
862
- function getTemplateMapperFromDesign(design) {
863
- return new TemplateMapper({ design });
890
+ function getTemplateMapperFromDesign(design, customParams) {
891
+ return new TemplateMapper({ design, customParams });
864
892
  }
865
893
  function getText(properties, key, i18n, languageId, fallback = '') {
866
894
  var _a;
@@ -881,9 +909,6 @@ var templateDesignUtil = /*#__PURE__*/Object.freeze({
881
909
  __proto__: null,
882
910
  getNewTemplate: getNewTemplate,
883
911
  initializeDesign: initializeDesign,
884
- isTemplateDesign: isTemplateDesign,
885
- isTemplateItemDesign: isTemplateItemDesign,
886
- isTemplateItem: isTemplateItem,
887
912
  getTemplatePotentialDesigns: getTemplatePotentialDesigns,
888
913
  templateToDesign: templateToDesign,
889
914
  toTemplate: toTemplate,
@@ -927,6 +952,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
927
952
  args: [{ providedIn: 'root' }]
928
953
  }] });
929
954
 
955
+ /** RegEx to validate number items contain only negative, digits, or decimals */
956
+ const numOnlyWithoutComma$1 = /^-?\d+(\.\d*)?$/;
957
+ /** RegEx to validate number items contain only negative, digits, or decimals in comma format */
958
+ const numOnlyWithComma$1 = /^-?\d{1,3}(,\d{3})*(\.\d*)?$/;
959
+ /** RegEx to validate 'positive only' item conains non-negative characters */
960
+ const posOnly$1 = /^[^-]*$/;
961
+ /** RegEx to validate 'whole number' item contains only negative, digits, or comma format */
962
+ const wholeNumber$1 = /^-?\d+(,\d{3})*$/;
963
+ function wholeNumberPattern() {
964
+ return (control) => {
965
+ if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
966
+ return null;
967
+ }
968
+ return wholeNumber$1.test(control.value) ? null : { wholeNumber: true };
969
+ };
970
+ }
971
+ function numericalValueCheck() {
972
+ return (control) => {
973
+ if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
974
+ return null;
975
+ }
976
+ return numOnlyWithoutComma$1.test(control.value) || numOnlyWithComma$1.test(control.value) ? null : { nonDigit: true };
977
+ };
978
+ }
979
+ function positiveNumberPattern() {
980
+ return (control) => {
981
+ if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
982
+ return null;
983
+ }
984
+ return posOnly$1.test(control.value) ? null : { positive: true };
985
+ };
986
+ }
987
+ /**
988
+ * This works as a combination of the angular 'min'/'max' Validators. Using the built-in validators
989
+ * appears to take precedence over custom validators, regardless of order in the array. Using this function
990
+ * ensures validators set before this one maintain priority. For instance, the input value failing numerical validation
991
+ * is more important than the value being within min-max range.
992
+ */
993
+ function numValueLimit(type, limit) {
994
+ return (control) => {
995
+ if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
996
+ return null;
997
+ }
998
+ const value = parseFloat(control.value);
999
+ return !isNaN(value) && (type === 'min' ? value < limit : value > limit)
1000
+ ? {
1001
+ [type]: {
1002
+ [type]: limit,
1003
+ actual: control.value,
1004
+ },
1005
+ }
1006
+ : null;
1007
+ };
1008
+ }
1009
+ function isEmptyString(value) {
1010
+ return typeof value === 'string' && !value.length;
1011
+ }
1012
+
930
1013
  /** RegEx to validate number items contain only negative, digits, or decimals */
931
1014
  const numOnlyWithoutComma = /^-?\d+(\.\d*)?$/;
932
1015
  /** RegEx to validate number items contain only negative, digits, or decimals in comma format */
@@ -1304,55 +1387,6 @@ function _isDisabled(item, disabledState) {
1304
1387
  const disabled = disabledState[item.instanceId];
1305
1388
  return isNullOrUndefined(disabled) ? item.disabled : disabled;
1306
1389
  }
1307
- function wholeNumberPattern() {
1308
- return (control) => {
1309
- if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
1310
- return null;
1311
- }
1312
- return wholeNumber.test(control.value) ? null : { wholeNumber: true };
1313
- };
1314
- }
1315
- function numericalValueCheck() {
1316
- return (control) => {
1317
- if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
1318
- return null;
1319
- }
1320
- return numOnlyWithoutComma.test(control.value) || numOnlyWithComma.test(control.value) ? null : { nonDigit: true };
1321
- };
1322
- }
1323
- function positiveNumberPattern() {
1324
- return (control) => {
1325
- if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
1326
- return null;
1327
- }
1328
- return posOnly.test(control.value) ? null : { positive: true };
1329
- };
1330
- }
1331
- /**
1332
- * This works as a combination of the angular 'min'/'max' Validators. Using the built-in validators
1333
- * appears to take precedence over custom validators, regardless of order in the array. Using this function
1334
- * ensures validators set before this one maintain priority. For instance, the input value failing numerical validation
1335
- * is more important than the value being within min-max range.
1336
- */
1337
- function numValueLimit(type, limit) {
1338
- return (control) => {
1339
- if (isNullOrUndefined(control.value) || isEmptyString(control.value)) {
1340
- return null;
1341
- }
1342
- const value = parseFloat(control.value);
1343
- return !isNaN(value) && (type === 'min' ? value < limit : value > limit)
1344
- ? {
1345
- [type]: {
1346
- [type]: limit,
1347
- actual: control.value,
1348
- },
1349
- }
1350
- : null;
1351
- };
1352
- }
1353
- function isEmptyString(value) {
1354
- return typeof value === 'string' && !value.length;
1355
- }
1356
1390
 
1357
1391
  var serializerUtil = /*#__PURE__*/Object.freeze({
1358
1392
  __proto__: null,
@@ -1556,6 +1590,29 @@ function findFormItem(instanceId, group) {
1556
1590
 
1557
1591
  const MTNA_WF_DEFAULT_YEAR_RANGE = new InjectionToken('mtna.wf.default.year.range');
1558
1592
 
1593
+ function getTypeDisplay(itemId) {
1594
+ // FIXME this will work for now, but needs to be i18n
1595
+ // Get the part after the last "."
1596
+ const lastSegment = itemId.split('.').pop() || '';
1597
+ // Remove "Item" and "Template"
1598
+ const cleaned = lastSegment.replace(/(Item|Template)/g, '');
1599
+ // Insert spaces between lowercase and uppercase letters
1600
+ const spaced = cleaned.replace(/([a-z])([A-Z])/g, '$1 $2');
1601
+ return spaced.trim();
1602
+ }
1603
+ function itemToDesignBase(model, languageId) {
1604
+ const id = model.instanceId;
1605
+ // let display = isPresent(model.descriptiveText) ? getI18nString(model.descriptiveText, languageId, true) : undefined;
1606
+ let display = isPresent(model.name) && model.name !== '' ? model.name : undefined;
1607
+ if (!isPresent(display)) {
1608
+ display = i18n_newTemplateItem;
1609
+ }
1610
+ const type = model.itemId;
1611
+ const typeDisplay = getTypeDisplay(model.itemId);
1612
+ const focusType = 'SET_FOCUS';
1613
+ return { id, display, type, typeDisplay, focusType };
1614
+ }
1615
+
1559
1616
  class TemplateItemMapper extends DesignMapper {
1560
1617
  constructor(params) {
1561
1618
  super(params);
@@ -1564,11 +1621,13 @@ class TemplateItemMapper extends DesignMapper {
1564
1621
  return [];
1565
1622
  }
1566
1623
  toDesign(model, languageId, parent) {
1567
- const sections = [
1568
- this.getSectionItemCore(model),
1569
- // this.getSectionItemConditions(model, languageId)
1570
- ];
1571
- return Object.assign(Object.assign({}, this.itemToDesignBase(model, languageId)), { sections, parent });
1624
+ const sectionItemCore = this.getSectionItemCore(model);
1625
+ const sections = [sectionItemCore];
1626
+ if (isConditionalItem(model)) {
1627
+ const sectionItemConditions = this.getSectionItemConditions(model);
1628
+ sections.push(sectionItemConditions);
1629
+ }
1630
+ return Object.assign(Object.assign({}, itemToDesignBase(model, languageId)), { sections, parent });
1572
1631
  }
1573
1632
  toModel(design) {
1574
1633
  let templateItem = {
@@ -1591,7 +1650,12 @@ class TemplateItemMapper extends DesignMapper {
1591
1650
  prop_item_name,
1592
1651
  prop_item_annotation_enabled,
1593
1652
  ]);
1594
- templateItem = Object.assign(Object.assign({}, templateItem), coreProperties);
1653
+ const conditionalItemIds = this.getConditionalItemIdsFromDesign(design);
1654
+ const conditionalProperties = getLiteralProperties(design, i18n_conditions, [prop_item_condition_allRequired]);
1655
+ const condition = {
1656
+ condition: Object.assign(Object.assign({}, conditionalItemIds), conditionalProperties),
1657
+ };
1658
+ templateItem = Object.assign(Object.assign(Object.assign({}, templateItem), coreProperties), condition);
1595
1659
  return templateItem;
1596
1660
  }
1597
1661
  getSectionItemCore(item) {
@@ -1603,30 +1667,35 @@ class TemplateItemMapper extends DesignMapper {
1603
1667
  properties.push(getLiteralDesignProperty(i18n_templateItemAnnotation, i18n_templateItemAnnotationInstructions, prop_item_annotation_enabled, 'BOOLEAN', item.annotationEnabled));
1604
1668
  return { display: i18n_templateItemBasicSettings, properties };
1605
1669
  }
1606
- // private getSectionItemConditions(item: TemplateItem, languageId: MtnaLanguageId): DesignSection {
1607
- // return { display: i18n_conditions, properties };
1608
- // }
1609
- getTypeDisplay(itemId) {
1610
- // FIXME this will work for now, but needs to be i18n
1611
- // Get the part after the last "."
1612
- const lastSegment = itemId.split('.').pop() || '';
1613
- // Remove "Item" and "Template"
1614
- const cleaned = lastSegment.replace(/(Item|Template)/g, '');
1615
- // Insert spaces between lowercase and uppercase letters
1616
- const spaced = cleaned.replace(/([a-z])([A-Z])/g, '$1 $2');
1617
- return spaced.trim();
1618
- }
1619
- itemToDesignBase(model, languageId) {
1620
- const id = model.instanceId;
1621
- // let display = isPresent(model.descriptiveText) ? getI18nString(model.descriptiveText, languageId, true) : undefined;
1622
- let display = isPresent(model.name) && model.name !== '' ? model.name : undefined;
1623
- if (!isPresent(display)) {
1624
- display = i18n_newTemplateItem;
1670
+ getSectionItemConditions(item) {
1671
+ var _a, _b;
1672
+ const properties = [];
1673
+ properties.push(getLiteralDesignProperty(i18n_conditionAllRequired, i18n_conditionAllRequiredInstructions, prop_item_condition_allRequired, 'BOOLEAN', (_b = (_a = item.condition) === null || _a === void 0 ? void 0 : _a.allRequired) !== null && _b !== void 0 ? _b : false));
1674
+ const itemIdReferenceDesignValues = [];
1675
+ if (this.customParams && this.customParams.references) {
1676
+ const references = this.customParams.references;
1677
+ if (item.condition) {
1678
+ item.condition.itemIds.forEach((itemId) => {
1679
+ if (isPresent(references[itemId])) {
1680
+ itemIdReferenceDesignValues.push(references[itemId]);
1681
+ }
1682
+ });
1683
+ }
1625
1684
  }
1626
- const type = model.itemId;
1627
- const typeDisplay = this.getTypeDisplay(model.itemId);
1628
- const focusType = 'SET_FOCUS';
1629
- return { id, display, type, typeDisplay, focusType };
1685
+ properties.push(getReferenceDesignProperty(i18n_conditionItemIds, i18n_conditionItemIdsInstructions, prop_item_condition_itemIds, itemIdReferenceDesignValues, false));
1686
+ return { display: i18n_conditions, properties };
1687
+ }
1688
+ getConditionalItemIdsFromDesign(design) {
1689
+ const itemIds = [];
1690
+ const referenceProperties = getReferenceProperties(design, i18n_conditions, [prop_item_condition_itemIds]);
1691
+ if (referenceProperties[prop_item_condition_itemIds]) {
1692
+ for (const referenceDesignProperty of referenceProperties[prop_item_condition_itemIds]) {
1693
+ if (isPresent(referenceDesignProperty)) {
1694
+ itemIds.push(referenceDesignProperty.id);
1695
+ }
1696
+ }
1697
+ }
1698
+ return { itemIds };
1630
1699
  }
1631
1700
  }
1632
1701
 
@@ -1686,14 +1755,19 @@ class OptionSelectorMapper extends DesignMapper {
1686
1755
  if (optionTemplateProperties.length > 0) {
1687
1756
  properties.push(...optionTemplateProperties);
1688
1757
  }
1689
- // const optionAcknowledgementProperties: DesignProperty[] = this.getOptionAcknowledgementProperties(model, languageId, parent);
1758
+ const optionAcknowledgementProperties = this.getOptionAcknowledgementProperties(model, languageId, parent);
1759
+ if (optionAcknowledgementProperties.length > 0) {
1760
+ properties.push(...optionAcknowledgementProperties);
1761
+ }
1690
1762
  return { display: i18n_optionProperties, properties };
1691
1763
  }
1692
1764
  getOptionTemplateProperties(model, languageId, parent) {
1693
1765
  const properties = [];
1694
1766
  if (this.customParams && this.customParams.optionTemplateMap) {
1695
1767
  const templateItem = this.customParams.optionTemplateMap[model.option.id];
1696
- properties.push(getModelDesignProperty(i18n_optionTemplate, i18n_optionTemplateInstructions, prop_option_template, false, isPresent(templateItem) ? [itemToDesign(templateItem, languageId, parent, this.context)] : []));
1768
+ properties.push(getModelDesignProperty(i18n_optionTemplate, i18n_optionTemplateInstructions, prop_option_template, false, isPresent(templateItem)
1769
+ ? [itemToDesign(templateItem, languageId, parent, this.context, this.customParams)]
1770
+ : []));
1697
1771
  }
1698
1772
  return properties;
1699
1773
  }
@@ -1738,6 +1812,13 @@ class OptionSelectorMapper extends DesignMapper {
1738
1812
  }
1739
1813
  return { enabledItems, disabledItems };
1740
1814
  }
1815
+ getOptionAcknowledgementProperties(model, languageId, parent) {
1816
+ const properties = [];
1817
+ properties.push(getModelDesignProperty(i18n_acknowledgement, i18n_acknowledgementInstructions, prop_item_acknowledgementTemplate, false, isPresent(model.acknowledgementTemplate)
1818
+ ? [itemToDesign(model.acknowledgementTemplate, languageId, parent, this.context, this.customParams)]
1819
+ : []));
1820
+ return properties;
1821
+ }
1741
1822
  }
1742
1823
 
1743
1824
  const optionGroupItemSectionDisplayNameMap = {
@@ -1815,7 +1896,7 @@ function getOptionTemplateDesign(optionDesign) {
1815
1896
  const designs = getDesignsBySectionAndProperty(optionDesign, i18n_optionProperties, prop_option_template);
1816
1897
  return isPresent(designs[0]) ? designs[0] : undefined;
1817
1898
  }
1818
- function getOptionsAndTemplateMap(design, mapperType, toTemplateItemFn, context) {
1899
+ function getOptionsAndTemplateMap(design, mapperType, toTemplateItemFn, context, customParams) {
1819
1900
  const options = [];
1820
1901
  const optionTemplateMap = {};
1821
1902
  const optionDesigns = getOptionDesigns(design, mapperType);
@@ -1824,7 +1905,7 @@ function getOptionsAndTemplateMap(design, mapperType, toTemplateItemFn, context)
1824
1905
  options.push(optionSelector);
1825
1906
  const optionTemplateDesign = getOptionTemplateDesign(optionDesign);
1826
1907
  if (isPresent(optionTemplateDesign)) {
1827
- const optionTemplate = toTemplateItemFn(optionTemplateDesign, context);
1908
+ const optionTemplate = toTemplateItemFn(optionTemplateDesign, context, customParams);
1828
1909
  optionTemplateMap[optionSelector.option.id] = optionTemplate;
1829
1910
  }
1830
1911
  }
@@ -1863,7 +1944,7 @@ class OptionItemMapper extends TemplateItemMapper {
1863
1944
  display = i18n_newTemplateItem;
1864
1945
  }
1865
1946
  const type = model.itemId;
1866
- const typeDisplay = this.getTypeDisplay(model.itemId);
1947
+ const typeDisplay = getTypeDisplay(model.itemId);
1867
1948
  const focusType = 'MAINTAIN_FOCUS';
1868
1949
  return { id, display, type, typeDisplay, focusType };
1869
1950
  }
@@ -1927,10 +2008,18 @@ class OptionGroupItemMapper extends TemplateItemMapper {
1927
2008
  }
1928
2009
  toModel(design) {
1929
2010
  let model = super.toModel(design);
1930
- const groupProperties = getLiteralProperties(design, optionGroupItemSectionDisplayNameMap[design.type], [
1931
- prop_item_min_selections,
1932
- prop_item_max_selections,
1933
- ]);
2011
+ const sectionId = optionGroupItemSectionDisplayNameMap[design.type];
2012
+ const propertyIds = [prop_item_min_selections, prop_item_max_selections];
2013
+ if (instanceOfDropdownItemTemplate(model)) {
2014
+ propertyIds.push(prop_item_label);
2015
+ }
2016
+ const groupProperties = getLiteralProperties(design, sectionId, propertyIds);
2017
+ // Check here if the model is a CheckboxItemTemplate to ensure that min and max selections are set correctly. Use the required property
2018
+ // to determine if min selections should be 1 or 0, and set max selections to 1 for checkbox items.
2019
+ if (instanceOfMultipleChoiceItemTemplate(model)) {
2020
+ groupProperties[prop_item_max_selections] = 1;
2021
+ groupProperties[prop_item_min_selections] = model.required ? 1 : 0;
2022
+ }
1934
2023
  const { options, optionTemplateMap } = getOptionsAndTemplateMap(design, 'optionGroupItem', toTemplateItem, this.context);
1935
2024
  model = Object.assign(Object.assign(Object.assign({}, model), groupProperties), { optionTemplateMap, options });
1936
2025
  return model;
@@ -1943,15 +2032,22 @@ class OptionGroupItemMapper extends TemplateItemMapper {
1943
2032
  display = i18n_newTemplateItem;
1944
2033
  }
1945
2034
  const type = model.itemId;
1946
- const typeDisplay = this.getTypeDisplay(model.itemId);
2035
+ const typeDisplay = getTypeDisplay(model.itemId);
1947
2036
  const focusType = 'MAINTAIN_FOCUS';
1948
2037
  return { id, display, type, typeDisplay, focusType };
1949
2038
  }
1950
2039
  getGroupSectionItems(model, languageId, parent) {
1951
2040
  const properties = [];
1952
2041
  const designOptions = [];
1953
- properties.push(getLiteralDesignProperty(i18n_minSelections, i18n_minSelectionsInstructions, prop_item_min_selections, 'INTEGER', model.minSelections));
1954
- properties.push(getLiteralDesignProperty(i18n_maxSelections, i18n_maxSelectionsInstructions, prop_item_max_selections, 'INTEGER', model.maxSelections));
2042
+ if (instanceOfDropdownItemTemplate(model)) {
2043
+ properties.push(getLiteralDesignProperty(i18n_label, i18n_labelInstructions, prop_item_label, 'STRING_I18N', model.label));
2044
+ }
2045
+ // Don't include the min and max selections properties for checkbox items, as they are determined by the required property and should not
2046
+ // be editable by the user. Instead, set them automatically in the toModel method based on the required property.
2047
+ if (!instanceOfMultipleChoiceItemTemplate(model)) {
2048
+ properties.push(getLiteralDesignProperty(i18n_minSelections, i18n_minSelectionsInstructions, prop_item_min_selections, 'INTEGER', model.minSelections));
2049
+ properties.push(getLiteralDesignProperty(i18n_maxSelections, i18n_maxSelectionsInstructions, prop_item_max_selections, 'INTEGER', model.maxSelections));
2050
+ }
1955
2051
  const parentForFormOptionSelector = this.getParentForFormOptionSelector(model, languageId);
1956
2052
  for (const formOptionSelector of model.options) {
1957
2053
  const designOption = optionSelectorToDesign(formOptionSelector, languageId, model.optionTemplateMap, this.customParams && this.customParams.references ? this.customParams.references : {}, parentForFormOptionSelector, this.context);
@@ -1976,6 +2072,195 @@ class CheckboxItemTemplateMapper extends OptionGroupItemMapper {
1976
2072
  }
1977
2073
  }
1978
2074
 
2075
+ function getEnumDesignProperty(propertyType, model) {
2076
+ const enumFunction = propertyType.enumFunction;
2077
+ const displayValue = model === null || model === void 0 ? void 0 : model[propertyType.propName];
2078
+ const value = enumFunction(displayValue, propertyType.defaultValue);
2079
+ return getEnumerationLiteralDesignProperty(propertyType.title, propertyType.instructions, propertyType.propName, value, propertyType.enumValues);
2080
+ }
2081
+
2082
+ const SLASHED_DATE_DISPLAY_VALUE = {
2083
+ value: 'MM/DD/YYYY',
2084
+ display: 'MM/DD/YYYY',
2085
+ };
2086
+ const DASHED_DATE_DISPLAY_VALUE = {
2087
+ value: 'MM-DD-YYYY',
2088
+ display: 'MM-DD-YYYY',
2089
+ };
2090
+ const LONG_DATE_DISPLAY_VALUE = {
2091
+ value: 'MMMM D, YYYY',
2092
+ display: 'MMMM D, YYYY',
2093
+ };
2094
+ const EURO_LONG_DATE_DISPLAY_VALUE = {
2095
+ value: 'D MMMM YYYY',
2096
+ display: 'D MMMM YYYY',
2097
+ };
2098
+ const DOTTED_DATE_DISPLAY_VALUE = {
2099
+ value: 'DD.MM.YYYY',
2100
+ display: 'DD.MM.YYYY',
2101
+ };
2102
+ const ISO_8601_DATE_DISPLAY_VALUE = {
2103
+ value: 'YYYY-MM-DD',
2104
+ display: 'YYYY-MM-DD',
2105
+ };
2106
+ const MTNA_DEFAULT_USE_DISPLAY_VALUE = {
2107
+ value: 'YYYY/MM/dd',
2108
+ display: 'YYYY/MM/dd',
2109
+ };
2110
+ const DATE_DISPLAY_ENUM_VALUES = [
2111
+ MTNA_DEFAULT_USE_DISPLAY_VALUE,
2112
+ ISO_8601_DATE_DISPLAY_VALUE,
2113
+ LONG_DATE_DISPLAY_VALUE,
2114
+ EURO_LONG_DATE_DISPLAY_VALUE,
2115
+ SLASHED_DATE_DISPLAY_VALUE,
2116
+ DASHED_DATE_DISPLAY_VALUE,
2117
+ DOTTED_DATE_DISPLAY_VALUE,
2118
+ ];
2119
+
2120
+ const LAYOUT_ROW_DISPLAY_VALUE = {
2121
+ value: 'ROW',
2122
+ display: i18n_row,
2123
+ };
2124
+ const LAYOUT_COLUMN_DISPLAY_VALUE = {
2125
+ value: 'COLUMN',
2126
+ display: i18n_column,
2127
+ };
2128
+ const LAYOUT_ENUM_VALUES = [LAYOUT_ROW_DISPLAY_VALUE, LAYOUT_COLUMN_DISPLAY_VALUE];
2129
+
2130
+ const QUARTER_ONE_DISPLAY_VALUE = {
2131
+ value: 0,
2132
+ display: i18n_quarterOne,
2133
+ };
2134
+ const QUARTER_TWO_DISPLAY_VALUE = {
2135
+ value: 1,
2136
+ display: i18n_quarterTwo,
2137
+ };
2138
+ const QUARTER_THREE_DISPLAY_VALUE = {
2139
+ value: 2,
2140
+ display: i18n_quarterThree,
2141
+ };
2142
+ const QUARTER_FOUR_DISPLAY_VALUE = {
2143
+ value: 3,
2144
+ display: i18n_quarterFour,
2145
+ };
2146
+ const QUARTER_RANGE_ENUM_VALUES = [
2147
+ QUARTER_ONE_DISPLAY_VALUE,
2148
+ QUARTER_TWO_DISPLAY_VALUE,
2149
+ QUARTER_THREE_DISPLAY_VALUE,
2150
+ QUARTER_FOUR_DISPLAY_VALUE,
2151
+ ];
2152
+
2153
+ function getDateFormatValue(displayValue, defaultValue) {
2154
+ let enumValue = defaultValue;
2155
+ if (displayValue) {
2156
+ if (displayValue === 'MM/DD/YYYY') {
2157
+ enumValue = SLASHED_DATE_DISPLAY_VALUE;
2158
+ }
2159
+ else if (displayValue === 'MM-DD-YYYY') {
2160
+ enumValue = DASHED_DATE_DISPLAY_VALUE;
2161
+ }
2162
+ else if (displayValue === 'MMMM D, YYYY') {
2163
+ enumValue = LONG_DATE_DISPLAY_VALUE;
2164
+ }
2165
+ else if (displayValue === 'D MMMM YYYY') {
2166
+ enumValue = EURO_LONG_DATE_DISPLAY_VALUE;
2167
+ }
2168
+ else if (displayValue === 'DD.MM.YYYY') {
2169
+ enumValue = DOTTED_DATE_DISPLAY_VALUE;
2170
+ }
2171
+ else if (displayValue === 'YYYY-MM-DD') {
2172
+ enumValue = ISO_8601_DATE_DISPLAY_VALUE;
2173
+ }
2174
+ else if (displayValue === 'YYYY/MM/dd') {
2175
+ enumValue = MTNA_DEFAULT_USE_DISPLAY_VALUE;
2176
+ }
2177
+ }
2178
+ return enumValue;
2179
+ }
2180
+
2181
+ function getLayoutValue(displayValue, defaultValue) {
2182
+ let enumValue = defaultValue;
2183
+ if (displayValue) {
2184
+ if (displayValue === 'ROW') {
2185
+ enumValue = LAYOUT_ROW_DISPLAY_VALUE;
2186
+ }
2187
+ else if (displayValue === 'COLUMN') {
2188
+ enumValue = LAYOUT_COLUMN_DISPLAY_VALUE;
2189
+ }
2190
+ }
2191
+ return enumValue;
2192
+ }
2193
+
2194
+ function getQuarterRangeValue(displayValue, defaultValue) {
2195
+ let enumValue = defaultValue;
2196
+ if (displayValue) {
2197
+ if (displayValue === 0) {
2198
+ enumValue = QUARTER_ONE_DISPLAY_VALUE;
2199
+ }
2200
+ else if (displayValue === 1) {
2201
+ enumValue = QUARTER_TWO_DISPLAY_VALUE;
2202
+ }
2203
+ else if (displayValue === 2) {
2204
+ enumValue = QUARTER_THREE_DISPLAY_VALUE;
2205
+ }
2206
+ else if (displayValue === 3) {
2207
+ enumValue = QUARTER_FOUR_DISPLAY_VALUE;
2208
+ }
2209
+ }
2210
+ return enumValue;
2211
+ }
2212
+
2213
+ const PROP_DATE_FORMAT = {
2214
+ defaultValue: MTNA_DEFAULT_USE_DISPLAY_VALUE,
2215
+ enumFunction: getDateFormatValue,
2216
+ enumValues: DATE_DISPLAY_ENUM_VALUES,
2217
+ instructions: i18n_dateFormatInstructions,
2218
+ propName: prop_item_format,
2219
+ title: i18n_dateFormat,
2220
+ type: 'ENUMERATION',
2221
+ };
2222
+
2223
+ const PROP_LAYOUT = {
2224
+ defaultValue: LAYOUT_COLUMN_DISPLAY_VALUE,
2225
+ enumFunction: getLayoutValue,
2226
+ enumValues: LAYOUT_ENUM_VALUES,
2227
+ instructions: i18n_layoutInstructions,
2228
+ propName: prop_item_layout,
2229
+ title: i18n_layout,
2230
+ type: 'ENUMERATION',
2231
+ };
2232
+
2233
+ const PROP_QUARTER_RANGE_START = {
2234
+ defaultValue: QUARTER_ONE_DISPLAY_VALUE,
2235
+ enumFunction: getQuarterRangeValue,
2236
+ enumValues: QUARTER_RANGE_ENUM_VALUES,
2237
+ instructions: i18n_startQuarterInstructions,
2238
+ propName: prop_item_startQuarter,
2239
+ title: i18n_startQuarter,
2240
+ type: 'ENUMERATION',
2241
+ };
2242
+ const PROP_QUARTER_RANGE_END = {
2243
+ defaultValue: QUARTER_ONE_DISPLAY_VALUE,
2244
+ enumFunction: getQuarterRangeValue,
2245
+ enumValues: QUARTER_RANGE_ENUM_VALUES,
2246
+ instructions: i18n_endQuarterInstructions,
2247
+ propName: prop_item_endQuarter,
2248
+ title: i18n_endQuarter,
2249
+ type: 'ENUMERATION',
2250
+ };
2251
+
2252
+ function setEnumValue(design, sectionId, enumPropertyId) {
2253
+ const enumerationLiteralProperties = getEnumerationLiteralProperties(design, sectionId, [enumPropertyId]);
2254
+ if (isPresent(enumerationLiteralProperties[enumPropertyId])) {
2255
+ return {
2256
+ [enumPropertyId]: enumerationLiteralProperties[enumPropertyId].value,
2257
+ };
2258
+ }
2259
+ else {
2260
+ return {};
2261
+ }
2262
+ }
2263
+
1979
2264
  class DateItemTemplateMapper extends TemplateItemMapper {
1980
2265
  constructor(params) {
1981
2266
  super(params);
@@ -1987,26 +2272,15 @@ class DateItemTemplateMapper extends TemplateItemMapper {
1987
2272
  }
1988
2273
  toModel(design) {
1989
2274
  let model = super.toModel(design);
1990
- const dateProperties = getLiteralProperties(design, i18n_dateConfiguration, [
1991
- prop_item_label,
1992
- // TODO: See the comment in getSectionItemDate method
1993
- // prop_item_format,
1994
- prop_item_preset_value,
1995
- ]);
1996
- model = Object.assign(Object.assign({}, model), dateProperties);
2275
+ const dateProperties = getLiteralProperties(design, i18n_dateConfiguration, [prop_item_label]);
2276
+ const dateFormatEnumProperty = setEnumValue(design, i18n_dateConfiguration, prop_item_format);
2277
+ model = Object.assign(Object.assign(Object.assign({}, model), dateProperties), dateFormatEnumProperty);
1997
2278
  return model;
1998
2279
  }
1999
2280
  getSectionItemDate(item) {
2000
2281
  const properties = [];
2001
2282
  properties.push(getLiteralDesignProperty(i18n_label, i18n_labelInstructions, prop_item_label, 'STRING_I18N', item.label));
2002
- /*
2003
- * TODO: Needs to be looked into further. This would mean that we would need to have a service (or similar) that could use the provided
2004
- * format and provide a custom MAT_DATE_FORMATS provider with the format attached to it. We do this because the 'display' prop of MatDateFormats
2005
- * is an object, so only one type of display is available at a time, and it should match the provided format given in the model. This should
2006
- * be an enumeration or have a way of constraining the values (available formats in the enumerations folder inside models/design/enumerations).
2007
- */
2008
- // properties.push(getLiteralDesignProperty(i18n_format, i18n_formatInstructions, prop_item_format, 'STRING', item.format));
2009
- properties.push(getLiteralDesignProperty(i18n_presetValue, i18n_presetValueInstructions, prop_item_preset_value, 'DATE', item.presetValue));
2283
+ properties.push(getEnumDesignProperty(PROP_DATE_FORMAT, item));
2010
2284
  return { display: i18n_dateConfiguration, properties };
2011
2285
  }
2012
2286
  }
@@ -2017,20 +2291,12 @@ class DropdownItemTemplateMapper extends OptionGroupItemMapper {
2017
2291
  }
2018
2292
  toDesign(model, languageId, parent) {
2019
2293
  const design = super.toDesign(model, languageId, parent);
2020
- design.sections = [design.sections[0], this.getSectionItemDropdown(model), design.sections[1]];
2021
2294
  return design;
2022
2295
  }
2023
2296
  toModel(design) {
2024
2297
  let model = super.toModel(design);
2025
- const dropdownProperties = getLiteralProperties(design, i18n_dropdownProperties, [prop_item_label]);
2026
- model = Object.assign(Object.assign({}, model), dropdownProperties);
2027
2298
  return model;
2028
2299
  }
2029
- getSectionItemDropdown(item) {
2030
- const properties = [];
2031
- properties.push(getLiteralDesignProperty(i18n_label, i18n_labelInstructions, prop_item_label, 'STRING_I18N', item.label));
2032
- return { display: i18n_dropdownProperties, properties };
2033
- }
2034
2300
  }
2035
2301
 
2036
2302
  class FileUploadItemTemplateMapper extends TemplateItemMapper {
@@ -2044,17 +2310,13 @@ class FileUploadItemTemplateMapper extends TemplateItemMapper {
2044
2310
  }
2045
2311
  toModel(design) {
2046
2312
  let model = super.toModel(design);
2047
- const fileUploadProperties = getLiteralProperties(design, i18n_fileUploadConfiguration, [
2048
- prop_item_download_allowed,
2049
- prop_item_file_type_id,
2050
- ]);
2313
+ const fileUploadProperties = getLiteralProperties(design, i18n_fileUploadConfiguration, [prop_item_download_allowed]);
2051
2314
  model = Object.assign(Object.assign({}, model), fileUploadProperties);
2052
2315
  return model;
2053
2316
  }
2054
2317
  getSectionItemFileUpload(item) {
2055
2318
  const properties = [];
2056
2319
  properties.push(getLiteralDesignProperty(i18n_downloadAllowed, i18n_downloadAllowedInstructions, prop_item_download_allowed, 'BOOLEAN', isPresent(item.downloadAllowed) ? item.downloadAllowed : true));
2057
- properties.push(getLiteralDesignProperty(i18n_fileTypeId, i18n_fileTypeIdInstructions, prop_item_file_type_id, 'STRING', item.fileTypeId));
2058
2320
  return { display: i18n_fileUploadConfiguration, properties };
2059
2321
  }
2060
2322
  }
@@ -2088,18 +2350,10 @@ class MultipleChoiceItemTemplateMapper extends OptionGroupItemMapper {
2088
2350
  }
2089
2351
  toDesign(model, languageId, parent) {
2090
2352
  const design = super.toDesign(model, languageId, parent);
2091
- const checkboxConfigSection = design.sections.find((section) => section.display === i18n_checkboxConfiguration);
2092
- if (checkboxConfigSection) {
2093
- checkboxConfigSection.properties.filter((property) => property.property !== prop_item_min_selections && property.property !== prop_item_max_selections);
2094
- }
2095
2353
  return design;
2096
2354
  }
2097
2355
  toModel(design) {
2098
2356
  let model = super.toModel(design);
2099
- // TODO - Since we no longer provide this in the 'toDesign' method above, we still need to make sure the model is correctly set.
2100
- // This is a temporary fix until we can merge the models in the 'setModifiedModel' method of the TemplateDesignFacade.
2101
- model.minSelections = 0;
2102
- model.maxSelections = 1;
2103
2357
  return model;
2104
2358
  }
2105
2359
  }
@@ -2170,18 +2424,17 @@ class OffsetDateRangeTemplateMapper extends TemplateItemMapper {
2170
2424
  toModel(design) {
2171
2425
  let model = super.toModel(design);
2172
2426
  const offsetDateRangeProperties = getLiteralProperties(design, i18n_offsetDateRangeConfiguration, [
2173
- prop_item_format,
2174
- // prop_item_range_limits
2427
+ // prop_item_range_limits
2175
2428
  ]);
2176
- model = Object.assign(Object.assign({}, model), offsetDateRangeProperties);
2429
+ const offsetDateRangeFormatEnumProperty = setEnumValue(design, i18n_offsetDateRangeConfiguration, prop_item_format);
2430
+ model = Object.assign(Object.assign({}, model), offsetDateRangeFormatEnumProperty);
2177
2431
  return model;
2178
2432
  }
2179
2433
  getSectionItemOffsetDateRange(item) {
2180
2434
  const properties = [];
2181
2435
  // TODO need to handle for the range limits input
2182
2436
  // properties.push(getLiteralDesignProperty(i18n_rangeLimits, i18n_rangeLimitsInstructions, prop_item_range_limits, '', item.rangeLimits));
2183
- // TODO need a way to constrain the values that the format can take instead of just a string
2184
- properties.push(getLiteralDesignProperty(i18n_format, i18n_formatInstructions, prop_item_format, 'STRING', item.format));
2437
+ properties.push(getEnumDesignProperty(PROP_DATE_FORMAT, item));
2185
2438
  return { display: i18n_offsetDateRangeConfiguration, properties };
2186
2439
  }
2187
2440
  }
@@ -2313,20 +2566,28 @@ class TitleItemTemplateMapper extends TemplateItemMapper {
2313
2566
  super(params);
2314
2567
  }
2315
2568
  toDesign(model, languageId, parent) {
2316
- const design = super.toDesign(model, languageId, parent);
2317
- design.sections = [...design.sections, this.getSectionItemTitle(model)];
2318
- return design;
2569
+ const sectionTitleItemCore = this.getSectionTitleItemCore(model);
2570
+ const sectionItemTitle = this.getSectionItemTitle(model);
2571
+ const sections = [sectionTitleItemCore, sectionItemTitle];
2572
+ return Object.assign(Object.assign({}, itemToDesignBase(model, languageId)), { sections, parent });
2319
2573
  }
2320
2574
  toModel(design) {
2321
2575
  let model = super.toModel(design);
2322
- const titleProperties = getLiteralProperties(design, i18n_childItems, [prop_item_value]);
2323
- model = Object.assign(Object.assign({}, model), titleProperties);
2576
+ const coreProperties = getLiteralProperties(design, i18n_templateItemBasicSettings, [prop_item_name, prop_item_annotation_enabled]);
2577
+ const titleProperties = getLiteralProperties(design, i18n_title, [prop_item_value]);
2578
+ model = Object.assign(Object.assign(Object.assign({}, model), coreProperties), titleProperties);
2324
2579
  return model;
2325
2580
  }
2326
2581
  getSectionItemTitle(item) {
2327
2582
  const properties = [];
2328
2583
  properties.push(getLiteralDesignProperty(i18n_title, i18n_titleInstructionsSection, prop_item_value, 'STRING_I18N', item.value));
2329
- return { display: i18n_childItems, properties };
2584
+ return { display: i18n_title, properties };
2585
+ }
2586
+ getSectionTitleItemCore(item) {
2587
+ const properties = [];
2588
+ properties.push(getLiteralDesignProperty(i18n_templateItemLabel, i18n_templateItemLabelInstructions, prop_item_name, 'STRING', item.name));
2589
+ properties.push(getLiteralDesignProperty(i18n_templateItemAnnotation, i18n_templateItemAnnotationInstructions, prop_item_annotation_enabled, 'BOOLEAN', item.annotationEnabled));
2590
+ return { display: i18n_templateItemBasicSettings, properties };
2330
2591
  }
2331
2592
  }
2332
2593
 
@@ -2341,14 +2602,30 @@ class YearQuarterRangeItemTemplateMapper extends TemplateItemMapper {
2341
2602
  }
2342
2603
  toModel(design) {
2343
2604
  let model = super.toModel(design);
2344
- const yearQuarterRangeProperties = getLiteralProperties(design, i18n_yearQuarterRangeConfiguration, [
2345
- // prop_item_range_limits,
2346
- ]);
2347
- model = Object.assign(Object.assign({}, model), yearQuarterRangeProperties);
2605
+ const startQuarterRangeYearProperties = getLiteralProperties(design, i18n_yearQuarterRangeConfiguration, [prop_item_startYear]);
2606
+ const endQuarterRangeYearProperties = getLiteralProperties(design, i18n_yearQuarterRangeConfiguration, [prop_item_endYear]);
2607
+ const startQuarterRangeQuarterProperties = setEnumValue(design, i18n_yearQuarterRangeConfiguration, prop_item_startQuarter);
2608
+ const endQuarterRangeQuarterProperties = setEnumValue(design, i18n_yearQuarterRangeConfiguration, prop_item_endQuarter);
2609
+ const startYearQuarter = {
2610
+ year: startQuarterRangeYearProperties[prop_item_startYear],
2611
+ quarter: startQuarterRangeQuarterProperties[prop_item_startQuarter],
2612
+ };
2613
+ const endYearQuarter = {
2614
+ year: endQuarterRangeYearProperties[prop_item_endYear],
2615
+ quarter: endQuarterRangeQuarterProperties[prop_item_endQuarter],
2616
+ };
2617
+ model = Object.assign(Object.assign({}, model), { rangeLimits: {
2618
+ start: startYearQuarter,
2619
+ end: endYearQuarter,
2620
+ } });
2348
2621
  return model;
2349
2622
  }
2350
2623
  getSectionItemYearQuarterRange(item) {
2351
2624
  const properties = [];
2625
+ properties.push(getLiteralDesignProperty(i18n_startYear, i18n_startYearInstructions, prop_item_startYear, 'INTEGER', item.rangeLimits.start.year));
2626
+ properties.push(getEnumDesignProperty(PROP_QUARTER_RANGE_START, item.rangeLimits.start));
2627
+ properties.push(getLiteralDesignProperty(i18n_endYear, i18n_endYearInstructions, prop_item_endYear, 'INTEGER', item.rangeLimits.end.year));
2628
+ properties.push(getEnumDesignProperty(PROP_QUARTER_RANGE_END, item.rangeLimits.end));
2352
2629
  // TODO need to handle for the range limits input
2353
2630
  // properties.push(getLiteralDesignProperty(i18n_rangeLimits, i18n_rangeLimitsInstructions, prop_item_range_limits, '', item.rangeLimits));
2354
2631
  return { display: i18n_yearQuarterRangeConfiguration, properties };
@@ -2363,22 +2640,53 @@ class TemplateItemGroupMapper extends TemplateItemMapper {
2363
2640
  return GROUP_POTENTIAL_DESIGN_LIST;
2364
2641
  }
2365
2642
  toDesign(model, languageId, parent) {
2366
- const design = super.toDesign(model, languageId, parent);
2367
- design.sections = [...design.sections, this.getSectionItemGroup(model, languageId, parent)];
2368
- return design;
2643
+ const designBase = Object.assign({}, itemToDesignBase(model, languageId));
2644
+ const designSections = [
2645
+ this.getGroupItemCore(model),
2646
+ // Use the current design as the parent for the template item group, in that it only needs to see the actual template item group design base.
2647
+ this.getSectionItemGroup(model, languageId, designBase),
2648
+ ];
2649
+ return Object.assign(Object.assign({}, designBase), { sections: designSections, parent });
2369
2650
  }
2370
2651
  toModel(design) {
2371
- let model = super.toModel(design);
2372
- const itemGroupProperties = getLiteralProperties(design, i18n_childItems, [prop_item_layout]);
2652
+ let templateItem = {
2653
+ itemId: design.type,
2654
+ instanceId: design.id,
2655
+ annotatableId: design.id,
2656
+ descriptiveText: [],
2657
+ name: '',
2658
+ questionText: [],
2659
+ annotationEnabled: false,
2660
+ excludeFromPrint: false,
2661
+ required: false,
2662
+ ignoreConditionalInstructions: false,
2663
+ printAlternative: '',
2664
+ };
2665
+ const coreProperties = getLiteralProperties(design, i18n_templateItemBasicSettings, [
2666
+ prop_item_name,
2667
+ prop_item_descriptive_text,
2668
+ prop_item_required,
2669
+ prop_item_annotation_enabled,
2670
+ ]);
2671
+ const itemGroupProperties = setEnumValue(design, i18n_childItems, prop_item_layout);
2373
2672
  const itemGroupModelProperties = getTemplateItems(design, i18n_childItems, [prop_item_items]);
2374
- model = Object.assign(Object.assign(Object.assign({}, model), itemGroupProperties), itemGroupModelProperties);
2375
- return model;
2673
+ templateItem = Object.assign(Object.assign(Object.assign(Object.assign({}, templateItem), coreProperties), itemGroupProperties), itemGroupModelProperties);
2674
+ return templateItem;
2675
+ }
2676
+ getGroupItemCore(item) {
2677
+ const properties = [];
2678
+ properties.push(getLiteralDesignProperty(i18n_templateItemLabel, i18n_templateItemLabelInstructions, prop_item_name, 'STRING', item.name));
2679
+ properties.push(getLiteralDesignProperty(i18n_templateItemHelp, i18n_templateItemHelpInstructions, prop_item_descriptive_text, 'RICH_TEXT_I18N', item.descriptiveText));
2680
+ properties.push(getLiteralDesignProperty(i18n_templateItemRequired, i18n_templateItemRequiredInstructions, prop_item_required, 'BOOLEAN', item.required));
2681
+ properties.push(getLiteralDesignProperty(i18n_templateItemAnnotation, i18n_templateItemAnnotationInstructions, prop_item_annotation_enabled, 'BOOLEAN', item.annotationEnabled));
2682
+ return { display: i18n_templateItemBasicSettings, properties };
2376
2683
  }
2377
2684
  getSectionItemGroup(item, languageId, parent) {
2378
2685
  const properties = [];
2379
- // TODO there needs a way to set possible values on enumerations, not just the actual value
2380
- properties.push(getLiteralDesignProperty(i18n_layout, i18n_layoutInstructions, prop_item_layout, 'ENUMERATION', item.layout));
2381
- properties.push(getModelDesignProperty(i18n_templateItems, i18n_templateItemsInstructionsGroup, prop_item_items, true, item.items ? item.items.map((item) => itemToDesign(item, languageId, parent, this.context)) : []));
2686
+ properties.push(getEnumDesignProperty(PROP_LAYOUT, item));
2687
+ properties.push(getModelDesignProperty(i18n_templateItems, i18n_templateItemsInstructionsGroup, prop_item_items, true, item.items
2688
+ ? item.items.map((tempItem) => itemToDesign(tempItem, languageId, parent, this.context, this.customParams))
2689
+ : []));
2382
2690
  return { display: i18n_childItems, properties };
2383
2691
  }
2384
2692
  }
@@ -2389,7 +2697,7 @@ class TemplateSectionMapper extends TemplateItemGroupMapper {
2389
2697
  }
2390
2698
  getPotentialDesigns(property) {
2391
2699
  if (property.property === prop_item_title) {
2392
- return SECTION_POTENTIAL_DESIGN_LIST;
2700
+ return [TITLE_POTENTIAL_DESIGN];
2393
2701
  }
2394
2702
  else if (property.property === prop_item_items) {
2395
2703
  return GROUP_POTENTIAL_DESIGN_LIST;
@@ -2399,123 +2707,99 @@ class TemplateSectionMapper extends TemplateItemGroupMapper {
2399
2707
  }
2400
2708
  }
2401
2709
  toDesign(model, languageId, parent) {
2402
- // TODO: add way to handle parent sections
2403
2710
  const design = super.toDesign(model, languageId, parent);
2404
- design.sections = [...design.sections, this.getSectionItemSection(model, languageId, parent)];
2711
+ // Use the current design as the parent for the section item section, in that it only needs to see the actual section design base.
2712
+ const currentTemplateSectionAsParent = itemToDesignBase(model, languageId);
2713
+ design.sections = [...design.sections, this.getSectionItemSection(model, languageId, currentTemplateSectionAsParent)];
2405
2714
  return design;
2406
2715
  }
2407
2716
  toModel(design) {
2408
2717
  let model = super.toModel(design);
2409
- const sectionProperties = getLiteralProperties(design, i18n_childItems, [prop_item_title]);
2410
- model = Object.assign(Object.assign({}, model), sectionProperties);
2718
+ const sectionTitleProperties = getTemplateItems(design, i18n_sectionTitleItem, [prop_item_title]);
2719
+ model = Object.assign(Object.assign({}, model), sectionTitleProperties);
2411
2720
  return model;
2412
2721
  }
2413
2722
  getSectionItemSection(item, languageId, parent) {
2414
2723
  const properties = [];
2415
- properties.push(getModelDesignProperty(i18n_title, i18n_titleInstructionsSection, prop_item_title, false, item.title ? [itemToDesign(item, languageId, parent, this.context)] : []));
2416
- return { display: i18n_childItems, properties };
2724
+ properties.push(getModelDesignProperty(i18n_title, i18n_titleInstructionsSection, prop_item_title, false, item.title ? [itemToDesign(item.title, languageId, parent, this.context, this.customParams)] : [], false));
2725
+ return { display: i18n_sectionTitleItem, properties };
2417
2726
  }
2418
2727
  }
2419
2728
 
2420
2729
  registerMapper(BOOLEAN_ITEM_TEMPLATE_ID, BooleanItemTemplateMapper, (params) => instanceOfBooleanItemTemplate(params.model)
2421
- ? new BooleanItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2730
+ ? new BooleanItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2422
2731
  : new TemplateItemMapper(params).getDesign());
2423
2732
  registerMapper(BULLETED_LIST_ITEM_TEMPLATE_ID, BulletedListItemTemplateMapper, (params) => instanceOfBulletedListItemTemplate(params.model)
2424
- ? new BulletedListItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2733
+ ? new BulletedListItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2425
2734
  : new TemplateItemMapper(params).getDesign());
2426
2735
  registerMapper(CHECKBOX_ITEM_TEMPLATE_ID, CheckboxItemTemplateMapper, (params) => instanceOfCheckboxItemTemplate(params.model)
2427
- ? new CheckboxItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2736
+ ? new CheckboxItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2428
2737
  : new TemplateItemMapper(params).getDesign());
2429
2738
  registerMapper(DATE_ITEM_TEMPLATE_ID, DateItemTemplateMapper, (params) => instanceOfDateItemTemplate(params.model)
2430
- ? new DateItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2739
+ ? new DateItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2431
2740
  : new TemplateItemMapper(params).getDesign());
2432
2741
  registerMapper(DECIMAL_ANSWER_ITEM_TEMPLATE_ID, NumericResponseItemTemplateMapper, (params) => instanceOfDecimalAnswerItemTemplate(params.model)
2433
- ? new NumericResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2742
+ ? new NumericResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2434
2743
  : new TemplateItemMapper(params).getDesign());
2435
2744
  registerMapper(DROPDOWN_ITEM_TEMPLATE_ID, DropdownItemTemplateMapper, (params) => instanceOfDropdownItemTemplate(params.model)
2436
- ? new DropdownItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2745
+ ? new DropdownItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2437
2746
  : new TemplateItemMapper(params).getDesign());
2438
2747
  registerMapper(FILE_UPLOAD_ITEM_TEMPLATE_ID, FileUploadItemTemplateMapper, (params) => instanceOfFileUploadItemTemplate(params.model)
2439
- ? new FileUploadItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2748
+ ? new FileUploadItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2440
2749
  : new TemplateItemMapper(params).getDesign());
2441
2750
  registerMapper(INTERNATIONALIZED_PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID, I18nTextResponseItemTemplateMapper, (params) => instanceOfInternationalizedParagraphAnswerItemTemplate(params.model)
2442
- ? new I18nTextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2751
+ ? new I18nTextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2443
2752
  : new TemplateItemMapper(params).getDesign());
2444
2753
  registerMapper(INTERNATIONALIZED_SHORT_ANSWER_ITEM_TEMPLATE_ID, I18nTextResponseItemTemplateMapper, (params) => instanceOfInternationalizedShortAnswerItemTemplate(params.model)
2445
- ? new I18nTextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2754
+ ? new I18nTextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2446
2755
  : new TemplateItemMapper(params).getDesign());
2447
2756
  registerMapper(MULTIPLE_CHOICE_ITEM_TEMPLATE_ID, MultipleChoiceItemTemplateMapper, (params) => instanceOfMultipleChoiceItemTemplate(params.model)
2448
- ? new MultipleChoiceItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2757
+ ? new MultipleChoiceItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2449
2758
  : new TemplateItemMapper(params).getDesign());
2450
2759
  registerMapper(NUMBERED_LIST_ITEM_TEMPLATE_ID, NumberedListItemTemplateMapper, (params) => instanceOfNumberedListItemTemplate(params.model)
2451
- ? new NumberedListItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2760
+ ? new NumberedListItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2452
2761
  : new TemplateItemMapper(params).getDesign());
2453
2762
  registerMapper(OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID, OffsetDateRangeTemplateMapper, (params) => instanceOfOffsetDateRangeTemplate(params.model)
2454
- ? new OffsetDateRangeTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2763
+ ? new OffsetDateRangeTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2455
2764
  : new TemplateItemMapper(params).getDesign());
2456
2765
  registerMapper(PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID, TextResponseItemTemplateMapper, (params) => instanceOfParagraphAnswerItemTemplate(params.model)
2457
- ? new TextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2766
+ ? new TextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2458
2767
  : new TemplateItemMapper(params).getDesign());
2459
2768
  registerMapper(REPEATABLE_ITEM_TEMPLATE_IMPL_ID, RepeatableItemTemplateMapper, (params) => instanceOfRepeatableItemTemplate(params.model)
2460
- ? new RepeatableItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2769
+ ? new RepeatableItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2461
2770
  : new TemplateItemMapper(params).getDesign());
2462
2771
  registerMapper(SHORT_ANSWER_ITEM_TEMPLATE_ID, TextResponseItemTemplateMapper, (params) => instanceOfShortAnswerItemTemplate(params.model)
2463
- ? new TextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2772
+ ? new TextResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2464
2773
  : new TemplateItemMapper(params).getDesign());
2465
2774
  registerMapper(TEMPLATE_ITEM_GROUP_IMPL_ID, TemplateItemGroupMapper, (params) => instanceOfTemplateItemGroupImpl(params.model)
2466
- ? new TemplateItemGroupMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2775
+ ? new TemplateItemGroupMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2467
2776
  : new TemplateItemMapper(params).getDesign());
2468
2777
  registerMapper(TEMPLATE_SECTION_IMPL_ID, TemplateSectionMapper, (params) => instanceOfTemplateSectionImpl(params.model)
2469
- ? new TemplateSectionMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2778
+ ? new TemplateSectionMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2470
2779
  : new TemplateItemMapper(params).getDesign());
2471
2780
  registerMapper(TEXT_ITEM_TEMPLATE_ID, TextItemTemplateMapper, (params) => instanceOfTextItemTemplate(params.model)
2472
- ? new TextItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2781
+ ? new TextItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2473
2782
  : new TemplateItemMapper(params).getDesign());
2474
2783
  registerMapper(TIME_ITEM_TEMPLATE_ID, TimeItemTemplateMapper, (params) => instanceOfTimeItemTemplate(params.model)
2475
- ? new TimeItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2784
+ ? new TimeItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2476
2785
  : new TemplateItemMapper(params).getDesign());
2477
2786
  registerMapper(TITLE_ITEM_TEMPLATE_ID, TitleItemTemplateMapper, (params) => instanceOfTitleItemTemplate(params.model)
2478
- ? new TitleItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2787
+ ? new TitleItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2479
2788
  : new TemplateItemMapper(params).getDesign());
2480
2789
  registerMapper(WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID, NumericResponseItemTemplateMapper, (params) => instanceOfWholeNumberAnswerItemTemplate(params.model)
2481
- ? new NumericResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2790
+ ? new NumericResponseItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2482
2791
  : new TemplateItemMapper(params).getDesign());
2483
2792
  registerMapper(YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID, YearQuarterRangeItemTemplateMapper, (params) => instanceOfYearQuarterRangeTemplate(params.model)
2484
- ? new YearQuarterRangeItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign()
2793
+ ? new YearQuarterRangeItemTemplateMapper(Object.assign(Object.assign({}, params), { model: params.model, customParams: params.customParams })).getDesign()
2485
2794
  : new TemplateItemMapper(params).getDesign());
2486
-
2487
- const SLASHED_DATE_DISPLAY_VALUE = {
2488
- value: 'MM/DD/YYYY',
2489
- display: 'MM/DD/YYYY',
2490
- };
2491
- const DASHED_DATE_DISPLAY_VALUE = {
2492
- value: 'MM-DD-YYYY',
2493
- display: 'MM-DD-YYYY',
2494
- };
2495
- const LONG_DATE_DISPLAY_VALUE = {
2496
- value: 'MMMM D, YYYY',
2497
- display: 'MMMM D, YYYY',
2498
- };
2499
- const EURO_LONG_DATE_DISPLAY_VALUE = {
2500
- value: 'D MMMM YYYY',
2501
- display: 'D MMMM YYYY',
2502
- };
2503
- const DOTTED_DATE_DISPLAY_VALUE = {
2504
- value: 'DD.MM.YYYY',
2505
- display: 'DD.MM.YYYY',
2506
- };
2507
- const ISO_8601_DATE_DISPLAY_VALUE = {
2508
- value: 'YYYY-MM-DD',
2509
- display: 'YYYY-MM-DD',
2510
- };
2511
- const DATE_ENUM_VALUES = [
2512
- ISO_8601_DATE_DISPLAY_VALUE,
2513
- LONG_DATE_DISPLAY_VALUE,
2514
- EURO_LONG_DATE_DISPLAY_VALUE,
2515
- SLASHED_DATE_DISPLAY_VALUE,
2516
- DASHED_DATE_DISPLAY_VALUE,
2517
- DOTTED_DATE_DISPLAY_VALUE,
2518
- ];
2795
+ registerTemplateMapper(TEMPLATE_IMPL_ID, TemplateMapper, (params) => {
2796
+ if (instanceOfTemplateImpl(params.model)) {
2797
+ return new TemplateMapper(Object.assign(Object.assign({}, params), { model: params.model })).getDesign();
2798
+ }
2799
+ else {
2800
+ throw new Error(`The model provided is not an instance of TemplateImpl. We do not support mapping it to a design. Model: ${JSON.stringify(params.model)}`);
2801
+ }
2802
+ });
2519
2803
 
2520
2804
  const template = {
2521
2805
  id: 'template',
@@ -2526,6 +2810,31 @@ const form = {
2526
2810
  display: i18n_form,
2527
2811
  };
2528
2812
 
2813
+ const UnavailableTemplateItemNameMap = {
2814
+ [BOOLEAN_ITEM_TEMPLATE_ID]: i18n_booleanItem,
2815
+ [BULLETED_LIST_ITEM_TEMPLATE_ID]: i18n_bulletedListItem,
2816
+ [CHECKBOX_ITEM_TEMPLATE_ID]: i18n_checkboxItem,
2817
+ [DATE_ITEM_TEMPLATE_ID]: i18n_dateItem,
2818
+ [DECIMAL_ANSWER_ITEM_TEMPLATE_ID]: i18n_decimalAnswerItem,
2819
+ [DROPDOWN_ITEM_TEMPLATE_ID]: i18n_dropdownItem,
2820
+ [FILE_UPLOAD_ITEM_TEMPLATE_ID]: i18n_fileUploadItem,
2821
+ [I18N_PARAGRAPH_ANSWER_ITEM_ID]: i18n_internationalizedParagraphAnswerItem,
2822
+ [I18N_SHORT_ANSWER_ITEM_ID]: i18n_internationalizedShortAnswerItem,
2823
+ [MULTIPLE_CHOICE_ITEM_TEMPLATE_ID]: i18n_multipleChoiceItem,
2824
+ [NUMBERED_LIST_ITEM_TEMPLATE_ID]: i18n_numberedListItem,
2825
+ [OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID]: i18n_offsetDateRangeItem,
2826
+ [PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID]: i18n_paragraphAnswerItem,
2827
+ [REPEATABLE_ITEM_TEMPLATE_IMPL_ID]: i18n_repeatableItem,
2828
+ [SHORT_ANSWER_ITEM_TEMPLATE_ID]: i18n_shortAnswerItem,
2829
+ [TEMPLATE_ITEM_GROUP_IMPL_ID]: i18n_groupItem,
2830
+ [TEMPLATE_SECTION_IMPL_ID]: i18n_sectionItem,
2831
+ [TEXT_ITEM_TEMPLATE_ID]: i18n_textItem,
2832
+ [TIME_ITEM_TEMPLATE_ID]: i18n_timeItem,
2833
+ [TITLE_ITEM_TEMPLATE_ID]: i18n_titleItem,
2834
+ [WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID]: i18n_wholeNumberAnswerItem,
2835
+ [YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID]: i18n_yearQuarterRangeItem,
2836
+ };
2837
+
2529
2838
  class BaseFormStep {
2530
2839
  constructor(instanceId) {
2531
2840
  this.instanceId = instanceId;
@@ -2711,6 +3020,73 @@ function isFormControl(something) {
2711
3020
  return isObject(something) && isType(something, 'value') && typeof something.value === 'string';
2712
3021
  }
2713
3022
 
3023
+ function isTemplateDesign(design) {
3024
+ return design.type === TEMPLATE_IMPL_ID;
3025
+ }
3026
+ function isTemplateItemDesign(design) {
3027
+ switch (design.type) {
3028
+ case BOOLEAN_ITEM_TEMPLATE_ID:
3029
+ case BULLETED_LIST_ITEM_TEMPLATE_ID:
3030
+ case CHECKBOX_GRID_TEMPLATE_ID:
3031
+ case CHECKBOX_ITEM_TEMPLATE_ID:
3032
+ case DATE_ITEM_TEMPLATE_ID:
3033
+ case DECIMAL_ANSWER_ITEM_TEMPLATE_ID:
3034
+ case DROPDOWN_ITEM_TEMPLATE_ID:
3035
+ case FILE_UPLOAD_ITEM_TEMPLATE_ID:
3036
+ case HIDDEN_REFERENCE_ITEM_TEMPLATE_ID:
3037
+ case INTERNATIONALIZED_PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID:
3038
+ case INTERNATIONALIZED_SHORT_ANSWER_ITEM_TEMPLATE_ID:
3039
+ case LINEAR_SCALE_ITEM_TEMPLATE_ID:
3040
+ case MULTIPLE_CHOICE_GRID_ITEM_TEMPLATE_ID:
3041
+ case MULTIPLE_CHOICE_ITEM_TEMPLATE_ID:
3042
+ case NUMBERED_LIST_ITEM_TEMPLATE_ID:
3043
+ case OFFSET_DATE_RANGE_ITEM_TEMPLATE_ID:
3044
+ case PARAGRAPH_ANSWER_ITEM_TEMPLATE_ID:
3045
+ case REPEATABLE_ITEM_TEMPLATE_IMPL_ID:
3046
+ case REQUEST_ID_ITEM_TEMPLATE_ID:
3047
+ case SHORT_ANSWER_ITEM_TEMPLATE_ID:
3048
+ case TEMPLATE_ITEM_GROUP_IMPL_ID:
3049
+ case TEMPLATE_SECTION_IMPL_ID:
3050
+ case TEXT_ITEM_TEMPLATE_ID:
3051
+ case TIME_ITEM_TEMPLATE_ID:
3052
+ case TITLE_ITEM_TEMPLATE_ID:
3053
+ case WHOLE_NUMBER_ANSWER_ITEM_TEMPLATE_ID:
3054
+ case YEAR_QUARTER_RANGE_ITEM_TEMPLATE_ID:
3055
+ return true;
3056
+ default:
3057
+ return false;
3058
+ }
3059
+ }
3060
+ function isTemplateItem(something) {
3061
+ return (instanceOfBooleanItemTemplate(something) ||
3062
+ instanceOfBulletedListItemTemplate(something) ||
3063
+ instanceOfCheckboxGridTemplate(something) ||
3064
+ instanceOfCheckboxItemTemplate(something) ||
3065
+ instanceOfDateItemTemplate(something) ||
3066
+ instanceOfDecimalAnswerItemTemplate(something) ||
3067
+ instanceOfDropdownItemTemplate(something) ||
3068
+ instanceOfFileUploadItemTemplate(something) ||
3069
+ instanceOfHiddenReferenceItemTemplate(something) ||
3070
+ instanceOfInternationalizedParagraphAnswerItemTemplate(something) ||
3071
+ instanceOfInternationalizedShortAnswerItemTemplate(something) ||
3072
+ instanceOfLinearScaleItemTemplate(something) ||
3073
+ instanceOfMultipleChoiceGridItemTemplate(something) ||
3074
+ instanceOfMultipleChoiceItemTemplate(something) ||
3075
+ instanceOfNumberedListItemTemplate(something) ||
3076
+ instanceOfOffsetDateRangeTemplate(something) ||
3077
+ instanceOfParagraphAnswerItemTemplate(something) ||
3078
+ instanceOfRepeatableItemTemplate(something) ||
3079
+ instanceOfRequestIdItemTemplate(something) ||
3080
+ instanceOfShortAnswerItemTemplate(something) ||
3081
+ instanceOfTemplateItemGroupImpl(something) ||
3082
+ instanceOfTemplateSectionImpl(something) ||
3083
+ instanceOfTextItemTemplate(something) ||
3084
+ instanceOfTimeItemTemplate(something) ||
3085
+ instanceOfTitleItemTemplate(something) ||
3086
+ instanceOfWholeNumberAnswerItemTemplate(something) ||
3087
+ instanceOfYearQuarterRangeTemplate(something));
3088
+ }
3089
+
2714
3090
  function mergeFormOptionSelector(source, target) {
2715
3091
  const mergedFormOptionSelector = Object.assign(Object.assign(Object.assign({}, target), source), { disabledItems: source.disabledItems, enabledItems: source.enabledItems, option: Object.assign(Object.assign({}, target.option), source.option) });
2716
3092
  return mergedFormOptionSelector;
@@ -2728,7 +3104,6 @@ function mergeOptionTemplateMap(source, target) {
2728
3104
  return mergedOptionTemplateMap;
2729
3105
  }
2730
3106
  function mergeBooleanItemTemplate(source, target) {
2731
- // const conditional: Conditional = mergeConditional(source.conditional, target.conditional);
2732
3107
  const option = mergeFormOptionSelector(source.option, target.option);
2733
3108
  const optionTemplateMap = mergeOptionTemplateMap(source.optionTemplateMap, target.optionTemplateMap);
2734
3109
  const mergedBooleanItemTemplate = Object.assign(Object.assign(Object.assign({}, target), source), { codeOption: target.codeOption || source.codeOption, option,
@@ -2826,6 +3201,49 @@ function mergeTemplate(source, target) {
2826
3201
  return mergedTemplate;
2827
3202
  }
2828
3203
 
3204
+ function getModelMap(items, itemIdExclusions) {
3205
+ const modelMap = new Map();
3206
+ traverseItems(items, modelMap, itemIdExclusions);
3207
+ return modelMap;
3208
+ }
3209
+ function traverseItems(items, modelMap, itemIdExclusions) {
3210
+ for (const item of items) {
3211
+ const propertyNameNotExcluded = isPresent(itemIdExclusions) && !itemIdExclusions.includes(item.itemId);
3212
+ if (propertyNameNotExcluded) {
3213
+ if (instanceOfTemplateItemGroupImpl(item)) {
3214
+ modelMap.set(item.instanceId, item);
3215
+ traverseItems(item.items, modelMap, itemIdExclusions);
3216
+ }
3217
+ else if (instanceOfTemplateSectionImpl(item)) {
3218
+ modelMap.set(item.instanceId, item);
3219
+ traverseItems(item.items, modelMap, itemIdExclusions);
3220
+ }
3221
+ else if (isTemplateItem(item)) {
3222
+ modelMap.set(item.instanceId, item);
3223
+ }
3224
+ }
3225
+ }
3226
+ }
3227
+
3228
+ function getModelToDesign(model, languageId, contextSelected, references) {
3229
+ if (instanceOfTemplateImpl(model)) {
3230
+ return templateToDesign(model, languageId, contextSelected, {
3231
+ references,
3232
+ });
3233
+ }
3234
+ else if (isTemplateItem(model)) {
3235
+ return itemToDesign(model, languageId, undefined, contextSelected, {
3236
+ references,
3237
+ });
3238
+ }
3239
+ else if (instanceOfFormOptionSelector(model)) {
3240
+ return optionSelectorToDesign(model, languageId, {}, references, undefined, contextSelected);
3241
+ }
3242
+ else {
3243
+ throw new Error(`Cannot convert model to design. Model is not recognized. Supported types are instances of TEMPLATE, TEMPLATE_ITEM, and OPTION.`);
3244
+ }
3245
+ }
3246
+
2829
3247
  /**
2830
3248
  * Update a {@link FormStep}'s `status`.
2831
3249
  * The server side form validation errors will trump the provided `status`.
@@ -3611,6 +4029,45 @@ class MtnaWfItemInjector extends MtnaComponentInjector {
3611
4029
  }
3612
4030
  }
3613
4031
  }
4032
+ configureInjectedComponent() {
4033
+ if (isDateItem(this.item) || isOffsetDateRangeItem(this.item)) {
4034
+ const itemWithDateFormat = this.item;
4035
+ const key = this.getInjectedComponentKey();
4036
+ if (key && this.injectionService) {
4037
+ const injectedComponent = this.injectionService.getInjectedComponent(key);
4038
+ if (injectedComponent) {
4039
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(injectedComponent.component);
4040
+ const compModule = componentFactory.ngModule;
4041
+ // TODO:
4042
+ const providers = [];
4043
+ const updatedMatDateFormats = {
4044
+ parse: {
4045
+ dateInput: itemWithDateFormat.format,
4046
+ },
4047
+ display: {
4048
+ dateInput: itemWithDateFormat.format,
4049
+ monthLabel: 'MMM',
4050
+ monthYearLabel: 'YYYY MMM',
4051
+ dateA11yLabel: 'LL',
4052
+ monthYearA11yLabel: 'MMMM YYYY', // Accessible month-year, e.g., "July 2025"
4053
+ },
4054
+ };
4055
+ providers.push({ provide: MAT_DATE_FORMATS, useValue: updatedMatDateFormats });
4056
+ const componentRef = this.viewContainerRef.createComponent(componentFactory, undefined, providers.length > 0 ? Injector.create({ providers }) : this.injector, undefined, compModule);
4057
+ this.configureComponent(componentRef);
4058
+ }
4059
+ else {
4060
+ console.error('No injection component found for key [' + key + ']');
4061
+ }
4062
+ }
4063
+ else {
4064
+ console.warn('No key provided for injection');
4065
+ }
4066
+ }
4067
+ else {
4068
+ super.configureInjectedComponent();
4069
+ }
4070
+ }
3614
4071
  getInjectedComponentKey() {
3615
4072
  if (this.item) {
3616
4073
  return this.item.itemId;
@@ -4721,7 +5178,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
4721
5178
  class GetI18nStringValueFromLocalePipe {
4722
5179
  transform(displayLocale, i18nStrings) {
4723
5180
  let stringValue = '';
4724
- if (i18nStrings.length > 0 && isPresent(displayLocale)) {
5181
+ if (isPresent(i18nStrings) && i18nStrings.length > 0 && isPresent(displayLocale)) {
4725
5182
  const i18nString = i18nStrings.find((i18nSt) => i18nSt.facetId === displayLocale);
4726
5183
  if (i18nString) {
4727
5184
  stringValue = i18nString.value ? i18nString.value : '';
@@ -4854,13 +5311,6 @@ class MtnaWfApiService extends BaseUrlService {
4854
5311
  this.API_URL = `${this.BASE_URL}`;
4855
5312
  this.FORM_URL = `${this.API_URL}/form`;
4856
5313
  this.TEMPLATE_URL = `${this.API_URL}/template`;
4857
- this.NEW_TEMPLATE_URL = `${this.TEMPLATE_URL}/new`;
4858
- this.NEW_SECTION_URL = `${this.TEMPLATE_URL}/section`;
4859
- this.ITEMS_URL = `${this.TEMPLATE_URL}/items`;
4860
- this.ITEM_INSTANCE_URL = `${this.TEMPLATE_URL}/item`;
4861
- this.TEMPLATE_SAVE_URL = `${this.TEMPLATE_URL}/save`;
4862
- this.TEMPLATE_DELETE_URL = `${this.TEMPLATE_URL}/delete`;
4863
- this.ALL_TEMPLATES_URL = `${this.API_URL}/templates`;
4864
5314
  }
4865
5315
  /**
4866
5316
  * Download a web form
@@ -4878,32 +5328,69 @@ class MtnaWfApiService extends BaseUrlService {
4878
5328
  getRepeatableItem(templateId, itemTemplateId) {
4879
5329
  return this.http.get(`${this.FORM_URL}/${templateId}/item/${itemTemplateId}`);
4880
5330
  }
4881
- getNewTemplate() {
4882
- return this.http.get(this.NEW_TEMPLATE_URL);
4883
- }
4884
- getAllTemplates() {
4885
- return this.http.get(this.ALL_TEMPLATES_URL);
4886
- }
4887
- getNewSection() {
4888
- return this.http.get(this.NEW_SECTION_URL);
5331
+ /**
5332
+ * Get all of the user's currently defined {@link Template}s.
5333
+ *
5334
+ * @return the {@link Template}s that the user has access to.
5335
+ */
5336
+ getTemplates() {
5337
+ return this.http.get(`${this.TEMPLATE_URL}/list`);
4889
5338
  }
4890
- getItems() {
4891
- return this.http.get(this.ITEMS_URL);
5339
+ /**
5340
+ * Creates a new Template
5341
+ *
5342
+ * @return the newly created template
5343
+ */
5344
+ createTemplate() {
5345
+ return this.http.post(`${this.TEMPLATE_URL}`, undefined);
4892
5346
  }
4893
- getTemplateItem(id) {
4894
- return this.http.get(`${this.ITEM_INSTANCE_URL}?id=${id}`);
5347
+ /**
5348
+ * Get the specified {@link Template}.
5349
+ *
5350
+ * @param id the ID of the {@link Template} to retrieve
5351
+ * @return the specified template.
5352
+ */
5353
+ getTemplate(id) {
5354
+ return this.http.get(`${this.TEMPLATE_URL}/${id}`);
4895
5355
  }
4896
- saveTemplate() {
4897
- return this.http.get(this.TEMPLATE_SAVE_URL);
5356
+ /**
5357
+ * Updates the specified {@link Template} with the values provided in the
5358
+ * {@link Template} POJO. This will not update child items, only the properties
5359
+ * at the template level.
5360
+ *
5361
+ * @param id the ID of the {@link Template} to update
5362
+ * @param template the {@link Template} POJO to use to update the persisted
5363
+ * resource
5364
+ * @return the updated {@link Template}
5365
+ */
5366
+ updateTemplate(id, template) {
5367
+ return this.http.post(`${this.TEMPLATE_URL}/${id}`, template);
4898
5368
  }
4899
- getDeleteTemplate() {
4900
- return this.http.get(this.TEMPLATE_DELETE_URL);
5369
+ /**
5370
+ * Deletes the specified {@link Template}
5371
+ *
5372
+ * @param id the ID of the {@link Template} to delete
5373
+ */
5374
+ deleteTemplate(id) {
5375
+ return this.http.delete(`${this.TEMPLATE_URL}/${id}`);
4901
5376
  }
4902
- getTemplateInstance(template) {
4903
- return this.http.post(`${this.TEMPLATE_URL}/convert`, template);
5377
+ /**
5378
+ * Creates a new {@link Template} by copying an existing {@link Template}.
5379
+ *
5380
+ * @param id the ID of the {@link Template} to clone
5381
+ * @return the newly cloned {@link Template}
5382
+ */
5383
+ copyTemplate(id) {
5384
+ return this.http.post(`${this.TEMPLATE_URL}/${id}/copy`, undefined);
4904
5385
  }
4905
- getTemplateItemInstance(templateItem) {
4906
- return this.http.post(`${this.ITEM_INSTANCE_URL}/convert`, templateItem);
5386
+ /**
5387
+ * Gets a {@link Form} instance of the specified {@link Template}.
5388
+ *
5389
+ * @param id the ID of the {@link Template} to preview
5390
+ * @return a form created from the template
5391
+ */
5392
+ previewTemplate(id) {
5393
+ return this.http.get(`${this.TEMPLATE_URL}/${id}/preview`);
4907
5394
  }
4908
5395
  }
4909
5396
  MtnaWfApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfApiService, deps: [{ token: MTNA_API_CONFIG }, { token: i1$3.HttpClient }, { token: i1$1.MtnaLogger }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -6607,33 +7094,9 @@ class MtnaWfDateComponent extends MtnaWfBaseValueItem {
6607
7094
  }
6608
7095
  set item(value) {
6609
7096
  super.item = value;
6610
- if (this.item.format) {
6611
- this.configureDatePickerFormatter();
6612
- }
6613
- }
6614
- ngAfterViewInit() {
6615
- this.configureDatePickerFormatter();
6616
- }
6617
- /**
6618
- * Manually change the parse and display formats of the date picker.
6619
- * @see https://github.com/angular/components/issues/8355#issuecomment-376783293
6620
- */
6621
- configureDatePickerFormatter() {
6622
- if (this.picker) {
6623
- const datepickerInput = this.picker.datepickerInput;
6624
- // @ts-ignore: access the private date formats on the date picker
6625
- const d = JSON.parse(JSON.stringify(datepickerInput._dateFormats));
6626
- // Convert the Java SimpleDateFormat to the moment equivalents using moment-jdateformatparser
6627
- const momentFormatString = moment().toMomentFormatString(this.item.format);
6628
- // Use the converted format for the date picker display
6629
- d.display.dateInput = momentFormatString;
6630
- // Use the converted format for the date picker parser (user input)
6631
- d.parse.dateInput = momentFormatString;
6632
- // @ts-ignore: set the updated date formats
6633
- datepickerInput._dateFormats = d;
6634
- // @ts-ignore: manually format the current value in the date picker
6635
- datepickerInput._formatValue(datepickerInput.value);
6636
- }
7097
+ // if (this.item.format) {
7098
+ // this.configureDatePickerFormatter();
7099
+ // }
6637
7100
  }
6638
7101
  }
6639
7102
  MtnaWfDateComponent.dateFormItemComponentInstances = 0;
@@ -6670,7 +7133,7 @@ MtnaWfDateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
6670
7133
  MtnaHighlightModule,
6671
7134
  ReactiveFormsModule,
6672
7135
  MtnaWfGetFormControlErrorPipeModule], exports: [MtnaWfDateComponent] });
6673
- MtnaWfDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_MAT_DATE_FORMAT }], imports: [[
7136
+ MtnaWfDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateModule, imports: [[
6674
7137
  CommonModule,
6675
7138
  FormsModule,
6676
7139
  MatFormFieldModule,
@@ -6697,7 +7160,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
6697
7160
  ],
6698
7161
  declarations: [MtnaWfDateComponent],
6699
7162
  exports: [MtnaWfDateComponent],
6700
- providers: [{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_MAT_DATE_FORMAT }],
6701
7163
  }]
6702
7164
  }] });
6703
7165
 
@@ -7696,7 +8158,7 @@ class MtnaWfYearQuarterComponent extends MtnaWfBaseValueItem {
7696
8158
  }
7697
8159
  }
7698
8160
  MtnaWfYearQuarterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: MTNA_WF_DEFAULT_YEAR_RANGE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
7699
- MtnaWfYearQuarterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterComponent, selector: "mtna-wf-year-quarter-item", host: { properties: { "class.mtna-wf-year-quarter-item": "this.yearQuarterItemClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"header\"></ng-container>\n<div\n *ngIf=\"control\"\n class=\"year-quarter-container\"\n fxLayout=\"row\"\n fxLayoutGap=\"8px\"\n [mtnaHighlight]=\"indicatorStatus === 'ACTIVE' && !hasItemHeader\"\n>\n <mat-form-field>\n <mat-select [formControl]=\"_yearControl\" aria-label=\"Year Selection\" i18n-aria-label>\n <mat-option *ngFor=\"let year of _yearSelection\" [value]=\"year\">{{ year }}</mat-option>\n </mat-select>\n <mat-error *ngFor=\"let error of control.errors | keyvalue\">\n {{ error | mtnaWfGetControlError : item }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-select [formControl]=\"_quarterControl\" aria-label=\"Quarter Selection\" i18n-aria-label>\n <mat-option i18n>None</mat-option>\n <mat-option *ngFor=\"let quarter of _yearControl.value | mtnaWfGetQuarters : componentRangeLimits\" [value]=\"quarter\">{{\n $any(quarter) | mtnaWfDateQuarter : 'short'\n }}</mat-option>\n </mat-select>\n <mat-error *ngFor=\"let error of control.errors | keyvalue\">\n {{ error | mtnaWfGetControlError : item }}\n </mat-error>\n </mat-form-field>\n</div>\n", styles: ["mtna-wf-year-quarter-item.mtna-wf-control-item .mat-form-field{width:100%}mtna-wf-year-quarter-item.mtna-wf-control-item .mtna-wf-error-container{font-size:75%;line-height:1;min-height:1em;margin-top:-.75rem}mtna-wf-year-quarter-item.mtna-wf-control-item .control-item-content{padding:.35em .75em .625em}mtna-wf-year-quarter-item.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list){padding-left:.75em}mtna-wf-year-quarter-item.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list).mat-form-field{width:calc(100% - .75em)}mtna-wf-year-quarter-item.mtna-wf-year-quarter-item .year-quarter-container>.mat-form-field{max-width:75px}mtna-wf-year-quarter-item.mtna-wf-year-quarter-item .year-quarter-container>.mat-form-field:first-of-type{margin-right:8px}\n"], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i1$1.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$5.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "keyvalue": i3.KeyValuePipe, "mtnaWfGetControlError": MtnaWfGetFormControlErrorPipe, "mtnaWfGetQuarters": MtnaWfGetAvailableQuartersPipe, "mtnaWfDateQuarter": MtnaWfDateQuarterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8161
+ MtnaWfYearQuarterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterComponent, selector: "mtna-wf-year-quarter-item", host: { properties: { "class.mtna-wf-year-quarter-item": "this.yearQuarterItemClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"header\"></ng-container>\n<div\n *ngIf=\"control\"\n class=\"year-quarter-container\"\n fxLayout=\"row\"\n fxLayoutGap=\"8px\"\n [mtnaHighlight]=\"indicatorStatus === 'ACTIVE' && !hasItemHeader\"\n>\n <mat-form-field>\n <mat-select [formControl]=\"_yearControl\" aria-label=\"Year Selection\" i18n-aria-label>\n <mat-option *ngFor=\"let year of _yearSelection\" [value]=\"year\">{{ year }}</mat-option>\n </mat-select>\n <mat-error *ngFor=\"let error of control.errors | keyvalue\">\n {{ error | mtnaWfGetControlError : item }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-select [formControl]=\"_quarterControl\" aria-label=\"Quarter Selection\" i18n-aria-label>\n <mat-option i18n>None</mat-option>\n <mat-option *ngFor=\"let quarter of _yearControl.value | mtnaWfGetQuarters : componentRangeLimits\" [value]=\"quarter\">{{\n $any(quarter) | mtnaWfDateQuarter : 'short'\n }}</mat-option>\n </mat-select>\n <mat-error *ngFor=\"let error of control.errors | keyvalue\">\n {{ error | mtnaWfGetControlError : item }}\n </mat-error>\n </mat-form-field>\n</div>\n", styles: ["mtna-wf-year-quarter-item.mtna-wf-control-item .mat-form-field{width:100%}mtna-wf-year-quarter-item.mtna-wf-control-item .mtna-wf-error-container{font-size:75%;line-height:1;min-height:1em;margin-top:-.75rem}mtna-wf-year-quarter-item.mtna-wf-control-item .control-item-content{padding:.35em .75em .625em}mtna-wf-year-quarter-item.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list){padding-left:.75em}mtna-wf-year-quarter-item.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list).mat-form-field{width:calc(100% - .75em)}mtna-wf-year-quarter-item.mtna-wf-year-quarter-item .year-quarter-container>.mat-form-field{max-width:75px}mtna-wf-year-quarter-item.mtna-wf-year-quarter-item .year-quarter-container>.mat-form-field:first-of-type{margin-right:8px}mtna-wf-year-quarter-item .mat-select{min-width:60px}\n"], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i1$1.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$5.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "keyvalue": i3.KeyValuePipe, "mtnaWfGetControlError": MtnaWfGetFormControlErrorPipe, "mtnaWfGetQuarters": MtnaWfGetAvailableQuartersPipe, "mtnaWfDateQuarter": MtnaWfDateQuarterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
7700
8162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterComponent, decorators: [{
7701
8163
  type: Component,
7702
8164
  args: [{
@@ -8433,10 +8895,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
8433
8895
  type: Input
8434
8896
  }] } });
8435
8897
 
8436
- function instanceOfStepAware(something) {
8437
- return (isType(something, 'step') && (something.step === null || something.step === undefined || instanceOfFormStep(something.step)));
8438
- }
8439
-
8440
8898
  class MtnaWfTemplateItemInjector extends MtnaComponentInjector {
8441
8899
  constructor(injector, cfr, vcr, injectionService) {
8442
8900
  super(injector, cfr, vcr, injectionService);
@@ -8503,10 +8961,54 @@ class MtnaWfTemplateItemInjector extends MtnaComponentInjector {
8503
8961
  if (this.wfTemplateItemComponent instanceof MtnaWfBaseTemplateItemWithListComponent) {
8504
8962
  this.wfTemplateItemComponent.inList = this.inList;
8505
8963
  }
8506
- if (instanceOfStepAware(this.wfTemplateItemComponent)) {
8964
+ // Cannot use the instanceOfStepAware type guard here because:
8965
+ // - At the time "const instance = componentRef.instance" runs angular has just created the component but the @Input step has not been set yet.
8966
+ // - The isType part of the instanceOfStepAware check relies on the component already having a step property, which is not the case at this point, so it always returns false.
8967
+ // - This is a timing issue in Angular's component lifecycle, where the component instance exists but its inputs have not been initialized yet.
8968
+ // As a workaround, we can check for the presence of the 'step' property directly on the component instance, which is a more reliable way to determine if it is StepAware at this point in the lifecycle.
8969
+ if ('step' in this.wfTemplateItemComponent) {
8507
8970
  this.wfTemplateItemComponent.step = this.step;
8508
8971
  }
8509
8972
  }
8973
+ configureInjectedComponent() {
8974
+ if (instanceOfDateItemTemplate(this.template) || instanceOfOffsetDateRangeTemplate(this.template)) {
8975
+ const templateWithDateFormat = this.template;
8976
+ const key = this.getInjectedComponentKey();
8977
+ if (key && this.injectionService) {
8978
+ const injectedComponent = this.injectionService.getInjectedComponent(key);
8979
+ if (injectedComponent) {
8980
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(injectedComponent.component);
8981
+ const compModule = componentFactory.ngModule;
8982
+ // TODO:
8983
+ const providers = [];
8984
+ const updatedMatDateFormats = {
8985
+ parse: {
8986
+ dateInput: templateWithDateFormat.format,
8987
+ },
8988
+ display: {
8989
+ dateInput: templateWithDateFormat.format,
8990
+ monthLabel: 'MMM',
8991
+ monthYearLabel: 'YYYY MMM',
8992
+ dateA11yLabel: 'LL',
8993
+ monthYearA11yLabel: 'MMMM YYYY', // Accessible month-year, e.g., "July 2025"
8994
+ },
8995
+ };
8996
+ providers.push({ provide: MAT_DATE_FORMATS, useValue: updatedMatDateFormats });
8997
+ const componentRef = this.viewContainerRef.createComponent(componentFactory, undefined, providers.length > 0 ? Injector.create({ providers }) : this.injector, undefined, compModule);
8998
+ this.configureComponent(componentRef);
8999
+ }
9000
+ else {
9001
+ console.error('No injection component found for key [' + key + ']');
9002
+ }
9003
+ }
9004
+ else {
9005
+ console.warn('No key provided for injection');
9006
+ }
9007
+ }
9008
+ else {
9009
+ super.configureInjectedComponent();
9010
+ }
9011
+ }
8510
9012
  getInjectedComponentKey() {
8511
9013
  if (this.template) {
8512
9014
  return this.template.itemId;
@@ -8549,6 +9051,7 @@ class MtnaWfTemplateItemComponent {
8549
9051
  this._displayLocale = 'en';
8550
9052
  this._inList = false;
8551
9053
  this._isCompact = false;
9054
+ this.isTemplateSection = false;
8552
9055
  }
8553
9056
  get displayLocale() {
8554
9057
  return this._displayLocale;
@@ -8590,10 +9093,13 @@ class MtnaWfTemplateItemComponent {
8590
9093
  if (isConditionalItem(template)) {
8591
9094
  this.condition = template.condition;
8592
9095
  }
9096
+ if (instanceOfTemplateSectionImpl(template)) {
9097
+ this.isTemplateSection = true;
9098
+ }
8593
9099
  }
8594
9100
  }
8595
9101
  MtnaWfTemplateItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfTemplateItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8596
- MtnaWfTemplateItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfTemplateItemComponent, selector: "mtna-wf-template-item", inputs: { displayLocale: "displayLocale", inList: "inList", isCompact: "isCompact", step: "step", template: "template", color: "color" }, ngImport: i0, template: "<mtna-annotations-indicator\n *ngIf=\"template.annotationEnabled\"\n [annotatableId]=\"template.annotatableId\"\n color=\"primary\"\n></mtna-annotations-indicator>\n\n<mtna-wf-template-item-header\n *ngIf=\"template.questionText.length > 0 || template.descriptiveText.length > 0\"\n [descriptiveText]=\"template.descriptiveText\"\n [displayLocale]=\"displayLocale\"\n [questionText]=\"template.questionText\"\n [required]=\"template.required\"\n></mtna-wf-template-item-header>\n\n<mtna-wf-template-item-injector\n [color]=\"color\"\n [displayLocale]=\"displayLocale\"\n [inList]=\"inList\"\n [isCompact]=\"isCompact\"\n [template]=\"template\"\n [step]=\"step\"\n></mtna-wf-template-item-injector>\n\n<ng-container *ngIf=\"condition\"> </ng-container>\n", styles: ["mtna-wf-template-item{display:block;position:relative}mtna-wf-template-item mtna-annotations-indicator{position:absolute;top:0;right:0;z-index:2}mtna-wf-template-item mtna-wf-template-item-header+.template-item-group-container{padding:.35em .75em .625em}mtna-wf-template-item mtna-wf-template-item-header+.template-item-group-container>mtna-wf-template-item{margin-top:0}mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-boolean-template-item,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-template-item-group,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-ordered-list-item-template,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-text-item-template,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-title-item-template,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-unordered-list-item-template{padding-right:24px}\n"], components: [{ type: i2.MtnaAnnotationsIndicatorComponent, selector: "mtna-annotations-indicator", inputs: ["color", "annotatableId", "annotatableItemName", "count"], outputs: ["status"] }, { type: MtnaWfTemplateItemHeaderComponent, selector: "mtna-wf-template-item-header", inputs: ["descriptiveText", "disabled", "displayLocale", "required", "questionText"] }, { type: MtnaWfTemplateItemInjector, selector: "mtna-wf-template-item-injector", inputs: ["displayLocale", "inList", "isCompact", "readonly", "step", "template", "color"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9102
+ MtnaWfTemplateItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfTemplateItemComponent, selector: "mtna-wf-template-item", inputs: { displayLocale: "displayLocale", inList: "inList", isCompact: "isCompact", step: "step", template: "template", color: "color" }, ngImport: i0, template: "<mtna-annotations-indicator\n *ngIf=\"template.annotationEnabled\"\n [annotatableId]=\"template.annotatableId\"\n color=\"primary\"\n></mtna-annotations-indicator>\n\n<mtna-wf-template-item-header\n *ngIf=\"\n !isTemplateSection &&\n ((template.questionText && template.questionText.length > 0) || (template.descriptiveText && template.descriptiveText.length > 0))\n \"\n [descriptiveText]=\"template.descriptiveText ?? []\"\n [displayLocale]=\"displayLocale\"\n [questionText]=\"template.questionText ?? []\"\n [required]=\"template.required\"\n></mtna-wf-template-item-header>\n\n<mtna-wf-template-item-injector\n [color]=\"color\"\n [displayLocale]=\"displayLocale\"\n [inList]=\"inList\"\n [isCompact]=\"isCompact\"\n [template]=\"template\"\n [step]=\"step\"\n></mtna-wf-template-item-injector>\n\n<ng-container *ngIf=\"condition\"> </ng-container>\n", styles: ["mtna-wf-template-item{display:block;position:relative}mtna-wf-template-item mtna-annotations-indicator{position:absolute;top:0;right:0;z-index:2}mtna-wf-template-item mtna-wf-template-item-header+.template-item-group-container{padding:.35em .75em .625em}mtna-wf-template-item mtna-wf-template-item-header+.template-item-group-container>mtna-wf-template-item{margin-top:0}mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-boolean-template-item,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-template-item-group,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-ordered-list-item-template,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-text-item-template,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-title-item-template,mtna-wf-template-item mtna-annotations-indicator+mtna-wf-template-item-header+mtna-wf-template-item+mtna-wf-unordered-list-item-template{padding-right:24px}\n"], components: [{ type: i2.MtnaAnnotationsIndicatorComponent, selector: "mtna-annotations-indicator", inputs: ["color", "annotatableId", "annotatableItemName", "count"], outputs: ["status"] }, { type: MtnaWfTemplateItemHeaderComponent, selector: "mtna-wf-template-item-header", inputs: ["descriptiveText", "disabled", "displayLocale", "required", "questionText"] }, { type: MtnaWfTemplateItemInjector, selector: "mtna-wf-template-item-injector", inputs: ["displayLocale", "inList", "isCompact", "readonly", "step", "template", "color"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8597
9103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfTemplateItemComponent, decorators: [{
8598
9104
  type: Component,
8599
9105
  args: [{
@@ -8770,31 +9276,6 @@ class MtnaWfDateItemTemplateComponent extends MtnaWfBaseTemplateItemComponent {
8770
9276
  }
8771
9277
  }
8772
9278
  }
8773
- ngAfterViewInit() {
8774
- this.configureDatePickerFormatter();
8775
- }
8776
- /**
8777
- * Manually change the parse and display formats of the date picker.
8778
- * @see https://github.com/angular/components/issues/8355#issuecomment-376783293
8779
- */
8780
- configureDatePickerFormatter() {
8781
- var _a;
8782
- if (this.picker) {
8783
- const datepickerInput = this.picker.datepickerInput;
8784
- // @ts-ignore: access the private date formats on the date picker
8785
- const d = JSON.parse(JSON.stringify(datepickerInput._dateFormats));
8786
- // Convert the Java SimpleDateFormat to the moment equivalents using moment-jdateformatparser
8787
- const momentFormatString = moment().toMomentFormatString((_a = this.template) === null || _a === void 0 ? void 0 : _a.format);
8788
- // Use the converted format for the date picker display
8789
- d.display.dateInput = momentFormatString;
8790
- // Use the converted format for the date picker parser (user input)
8791
- d.parse.dateInput = momentFormatString;
8792
- // @ts-ignore: set the updated date formats
8793
- datepickerInput._dateFormats = d;
8794
- // @ts-ignore: manually format the current value in the date picker
8795
- datepickerInput._formatValue(datepickerInput.value);
8796
- }
8797
- }
8798
9279
  }
8799
9280
  MtnaWfDateItemTemplateComponent.dateFormItemTemplateComponentInstances = 0;
8800
9281
  MtnaWfDateItemTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateItemTemplateComponent, deps: [{ token: LOCALE_ID }, { token: i1$1.MtnaLogger }], target: i0.ɵɵFactoryTarget.Component });
@@ -8865,7 +9346,7 @@ MtnaWfDateItemTemplateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.
8865
9346
  MatMomentDateModule,
8866
9347
  ReactiveFormsModule,
8867
9348
  GetI18nStringValueFromLocalePipeModule], exports: [MtnaWfDateItemTemplateComponent] });
8868
- MtnaWfDateItemTemplateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateItemTemplateModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_MAT_DATE_FORMAT }], imports: [[
9349
+ MtnaWfDateItemTemplateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateItemTemplateModule, imports: [[
8869
9350
  CommonModule,
8870
9351
  FormsModule,
8871
9352
  MatFormFieldModule,
@@ -8890,7 +9371,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
8890
9371
  ],
8891
9372
  declarations: [MtnaWfDateItemTemplateComponent],
8892
9373
  exports: [MtnaWfDateItemTemplateComponent],
8893
- providers: [{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_MAT_DATE_FORMAT }],
8894
9374
  }]
8895
9375
  }] });
8896
9376
 
@@ -8913,29 +9393,114 @@ const _BaseMtnaWfYearQuarterItemTemplate = mixinDestroyNotifier(class {
8913
9393
  class MtnaWfYearQuarterItemTemplateComponent extends _BaseMtnaWfYearQuarterItemTemplate {
8914
9394
  constructor(defaultYearRange) {
8915
9395
  super();
9396
+ this._readonly = false;
9397
+ this._containingControl = new FormControl();
8916
9398
  this._quarterControl = new FormControl();
8917
9399
  this._yearControl = new FormControl();
8918
9400
  this._yearSelection = new Array();
9401
+ this.destroyObs = new Subject();
8919
9402
  this.defaultYearRange = { numFutureYears: 25, numPastYears: 25 };
9403
+ /**
9404
+ * Sets the quarter value to `null` if the year & quarter is out of bounds of the range limits.
9405
+ * Otherwise, returns original value
9406
+ *
9407
+ * @param value `[number, number]` The selected [year, quarter] value
9408
+ * @returns `[number, number]` The original [year, quarter] value OR [year, null]
9409
+ */
9410
+ this.withinRangeLimits = ([year, quarter]) => {
9411
+ var _a, _b;
9412
+ const beyondUpperLimit =
9413
+ // year matches end year range limit
9414
+ year === ((_a = this.componentRangeLimits) === null || _a === void 0 ? void 0 : _a.end.year) &&
9415
+ // quarter limit was provided
9416
+ isPresent(this.componentRangeLimits.end.quarter) &&
9417
+ // selected quarter is beyond quarter limit
9418
+ quarter > this.componentRangeLimits.end.quarter;
9419
+ const beyondLowerLimit =
9420
+ // year matches start year range limit
9421
+ year === ((_b = this.componentRangeLimits) === null || _b === void 0 ? void 0 : _b.start.year) &&
9422
+ // quarter limit was provided
9423
+ isPresent(this.componentRangeLimits.start.quarter) &&
9424
+ // selected quarter is beyond quarter limit
9425
+ quarter < this.componentRangeLimits.start.quarter;
9426
+ if (beyondLowerLimit || beyondUpperLimit) {
9427
+ this._quarterControl.setValue(null, { emitEvent: false });
9428
+ return [year, null];
9429
+ }
9430
+ return [year, quarter];
9431
+ };
8920
9432
  this.defaultYearRange = defaultYearRange || this.defaultYearRange;
8921
9433
  }
8922
- // @Input()
8923
- // get readonly(): boolean {
8924
- // return this._readonly;
8925
- // }
8926
- // set readonly(value: boolean) {
8927
- // this._readonly = value;
8928
- // }
8929
- // private _readonly = false;
9434
+ get readonly() {
9435
+ return this._readonly;
9436
+ }
9437
+ set readonly(value) {
9438
+ this._readonly = value;
9439
+ }
8930
9440
  get yearQuarterRange() {
8931
9441
  return this._yearQuarterRange;
8932
9442
  }
8933
9443
  set yearQuarterRange(value) {
8934
9444
  this._yearQuarterRange = value;
9445
+ this.componentRangeLimits = value;
9446
+ }
9447
+ get isReadOnly() {
9448
+ return this._readonly;
9449
+ }
9450
+ ngAfterViewInit() {
9451
+ if (!this.readonly) {
9452
+ // Observe Year & Quarter value changes && set them on the item's control
9453
+ merge(this._yearControl.valueChanges, this._quarterControl.valueChanges)
9454
+ .pipe(takeUntil(this.destroyObs))
9455
+ .subscribe(() => {
9456
+ var _a, _b, _c, _d;
9457
+ if (!((_a = this._containingControl) === null || _a === void 0 ? void 0 : _a.dirty) && (this._yearControl.dirty || this._quarterControl.dirty)) {
9458
+ (_b = this._containingControl) === null || _b === void 0 ? void 0 : _b.markAsDirty();
9459
+ (_c = this._containingControl) === null || _c === void 0 ? void 0 : _c.markAsTouched();
9460
+ }
9461
+ if (isPresent(this._yearControl.value)) {
9462
+ const [year, quarter] = this.withinRangeLimits([this._yearControl.value, this._quarterControl.value]);
9463
+ (_d = this._containingControl) === null || _d === void 0 ? void 0 : _d.setValue({ year, quarter });
9464
+ }
9465
+ });
9466
+ }
9467
+ }
9468
+ ngOnDestroy() {
9469
+ this.destroyObs.next();
9470
+ this.destroyObs.complete();
9471
+ }
9472
+ ngOnInit() {
9473
+ var _a, _b, _c;
9474
+ // Set any initial value onto the Year & Quarter controls
9475
+ this._yearControl.setValue(((_a = this._containingControl) === null || _a === void 0 ? void 0 : _a.value) ? this._containingControl.value.year : null);
9476
+ this._quarterControl.setValue(((_b = this._containingControl) === null || _b === void 0 ? void 0 : _b.value) ? this._containingControl.value.quarter : null);
9477
+ // Create range limits if none exist
9478
+ if (!this.componentRangeLimits) {
9479
+ const thisYear = new Date().getFullYear();
9480
+ this.componentRangeLimits = {
9481
+ start: {
9482
+ year: thisYear - this.defaultYearRange.numPastYears,
9483
+ quarter: null,
9484
+ },
9485
+ end: {
9486
+ year: thisYear + this.defaultYearRange.numFutureYears,
9487
+ quarter: null,
9488
+ },
9489
+ };
9490
+ }
9491
+ // Populate the year selection
9492
+ for (let i = this.componentRangeLimits.start.year || 0; i <= (this.componentRangeLimits.end.year || 0); i++) {
9493
+ this._yearSelection.push(i);
9494
+ }
9495
+ if (this.readonly) {
9496
+ (_c = this._containingControl) === null || _c === void 0 ? void 0 : _c.disable();
9497
+ this._quarterControl.disable();
9498
+ this._yearControl.disable();
9499
+ }
8935
9500
  }
8936
9501
  }
8937
9502
  MtnaWfYearQuarterItemTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterItemTemplateComponent, deps: [{ token: MTNA_WF_DEFAULT_YEAR_RANGE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
8938
- MtnaWfYearQuarterItemTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterItemTemplateComponent, selector: "mtna-wf-year-quarter-item-template", inputs: { yearQuarterRange: "yearQuarterRange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"year-quarter-container\" fxLayout=\"row\" fxLayoutGap=\"8px\">\n <mat-form-field>\n <mat-select [formControl]=\"_yearControl\" aria-label=\"Year Selection\" i18n-aria-label>\n <mat-option *ngFor=\"let year of _yearSelection\" [value]=\"year\">{{ year }}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-select [formControl]=\"_quarterControl\" aria-label=\"Quarter Selection\" i18n-aria-label>\n <mat-option i18n>None</mat-option>\n <mat-option *ngFor=\"let quarter of _yearControl.value | mtnaWfGetQuarters : componentRangeLimits\" [value]=\"quarter\">{{\n $any(quarter) | mtnaWfDateQuarter : 'short'\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n", styles: ["mtna-wf-year-quarter-item-template.mtna-wf-template-control-item .mat-form-field{width:100%}mtna-wf-year-quarter-item-template.mtna-wf-template-control-item .template-control-item-content{padding:.35em .75em .625em}mtna-wf-year-quarter-item-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector){padding-left:.75em}mtna-wf-year-quarter-item-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector).mat-form-field{width:calc(100% - .75em)}mtna-wf-year-quarter-item-template .year-quarter-container>.mat-form-field{max-width:75px}mtna-wf-year-quarter-item-template .year-quarter-container>.mat-form-field:first-of-type{margin-right:8px}\n"], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "mtnaWfGetQuarters": MtnaWfGetAvailableQuartersPipe, "mtnaWfDateQuarter": MtnaWfDateQuarterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9503
+ MtnaWfYearQuarterItemTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterItemTemplateComponent, selector: "mtna-wf-year-quarter-item-template", inputs: { readonly: "readonly", yearQuarterRange: "yearQuarterRange" }, host: { properties: { "class.read-only": "this.isReadOnly" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"year-quarter-container\" fxLayout=\"row\" fxLayoutGap=\"8px\">\n <mat-form-field>\n <mat-select [formControl]=\"_yearControl\" aria-label=\"Year Selection\" i18n-aria-label>\n <mat-option *ngFor=\"let year of _yearSelection\" [value]=\"year\">{{ year }}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-select [formControl]=\"_quarterControl\" aria-label=\"Quarter Selection\" i18n-aria-label>\n <mat-option i18n>None</mat-option>\n <mat-option *ngFor=\"let quarter of _yearControl.value | mtnaWfGetQuarters : componentRangeLimits\" [value]=\"quarter\">{{\n $any(quarter) | mtnaWfDateQuarter : 'short'\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n", styles: ["mtna-wf-year-quarter-item-template.mtna-wf-template-control-item .mat-form-field{width:100%}mtna-wf-year-quarter-item-template.mtna-wf-template-control-item .template-control-item-content{padding:.35em .75em .625em}mtna-wf-year-quarter-item-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector){padding-left:.75em}mtna-wf-year-quarter-item-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector).mat-form-field{width:calc(100% - .75em)}mtna-wf-year-quarter-item-template .year-quarter-container>.mat-form-field{max-width:75px}mtna-wf-year-quarter-item-template .year-quarter-container>.mat-form-field:first-of-type{margin-right:8px}mtna-wf-year-quarter-item-template .mat-select{min-width:60px}\n"], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "mtnaWfGetQuarters": MtnaWfGetAvailableQuartersPipe, "mtnaWfDateQuarter": MtnaWfDateQuarterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8939
9504
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterItemTemplateComponent, decorators: [{
8940
9505
  type: Component,
8941
9506
  args: [{
@@ -8950,8 +9515,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
8950
9515
  }, {
8951
9516
  type: Inject,
8952
9517
  args: [MTNA_WF_DEFAULT_YEAR_RANGE]
8953
- }] }]; }, propDecorators: { yearQuarterRange: [{
9518
+ }] }]; }, propDecorators: { readonly: [{
8954
9519
  type: Input
9520
+ }], yearQuarterRange: [{
9521
+ type: Input
9522
+ }], isReadOnly: [{
9523
+ type: HostBinding,
9524
+ args: ['class.read-only']
8955
9525
  }] } });
8956
9526
 
8957
9527
  class MtnaWfYearQuarterItemTemplateModule {
@@ -8994,9 +9564,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
8994
9564
  }] });
8995
9565
 
8996
9566
  class MtnaWfYearQuarterRangeItemTemplateComponent extends MtnaWfBaseTemplateItemComponent {
9567
+ get template() {
9568
+ return super.template;
9569
+ }
9570
+ set template(template) {
9571
+ super.template = template;
9572
+ // Create fake items for the underlying date-item component
9573
+ this._startItem = Object.assign(Object.assign({}, template), { value: undefined });
9574
+ this._endItem = Object.assign(Object.assign({}, template), { value: undefined });
9575
+ }
8997
9576
  }
8998
9577
  MtnaWfYearQuarterRangeItemTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterRangeItemTemplateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8999
- MtnaWfYearQuarterRangeItemTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterRangeItemTemplateComponent, selector: "mtna-wf-year-quarter-range-template", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"template\" class=\"range-item-container\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\">\n <mtna-wf-year-quarter-item-template [yearQuarterRange]=\"template.rangeLimits\"></mtna-wf-year-quarter-item-template>\n <span fxFlex=\"14px\">to</span>\n <mtna-wf-year-quarter-item-template [yearQuarterRange]=\"template.rangeLimits\"></mtna-wf-year-quarter-item-template>\n</div>\n", styles: ["mtna-wf-year-quarter-range-template.mtna-wf-template-control-item .mat-form-field{width:100%}mtna-wf-year-quarter-range-template.mtna-wf-template-control-item .template-control-item-content{padding:.35em .75em .625em}mtna-wf-year-quarter-range-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector){padding-left:.75em}mtna-wf-year-quarter-range-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector).mat-form-field{width:calc(100% - .75em)}\n"], components: [{ type: MtnaWfYearQuarterItemTemplateComponent, selector: "mtna-wf-year-quarter-item-template", inputs: ["yearQuarterRange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9578
+ MtnaWfYearQuarterRangeItemTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterRangeItemTemplateComponent, selector: "mtna-wf-year-quarter-range-template", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"template\" class=\"range-item-container\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\">\n <mtna-wf-year-quarter-item-template [yearQuarterRange]=\"_startItem.rangeLimits\"></mtna-wf-year-quarter-item-template>\n <span fxFlex=\"14px\">to</span>\n <mtna-wf-year-quarter-item-template [yearQuarterRange]=\"_endItem.rangeLimits\"></mtna-wf-year-quarter-item-template>\n</div>\n", styles: ["mtna-wf-year-quarter-range-template.mtna-wf-template-control-item .mat-form-field{width:100%}mtna-wf-year-quarter-range-template.mtna-wf-template-control-item .template-control-item-content{padding:.35em .75em .625em}mtna-wf-year-quarter-range-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector){padding-left:.75em}mtna-wf-year-quarter-range-template.mtna-wf-template-control-item mtna-wf-template-item-header~.mtna-wf-template-control-item:not(.mat-list):not(mtna-wf-template-item-injector).mat-form-field{width:calc(100% - .75em)}\n"], components: [{ type: MtnaWfYearQuarterItemTemplateComponent, selector: "mtna-wf-year-quarter-item-template", inputs: ["readonly", "yearQuarterRange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9000
9579
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterRangeItemTemplateComponent, decorators: [{
9001
9580
  type: Component,
9002
9581
  args: [{
@@ -9029,7 +9608,7 @@ class MtnaWfDecimalAnswerItemTemplateComponent extends MtnaWfBaseTemplateOptionI
9029
9608
  }
9030
9609
  }
9031
9610
  MtnaWfDecimalAnswerItemTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDecimalAnswerItemTemplateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9032
- MtnaWfDecimalAnswerItemTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfDecimalAnswerItemTemplateComponent, selector: "mtna-wf-decimal-answer-item-template", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"template\">\n <mat-form-field>\n <input\n matInput\n [autocomplete]=\"(displayLocale | getI18nStringValueFromLocale : template.label) || template.name | mtnaWfGetAutoComplete\"\n [required]=\"template.required\"\n />\n </mat-form-field>\n\n <ng-template #fullList>\n <mat-list>\n <ng-container *ngTemplateOutlet=\"listItem\"></ng-container>\n </mat-list>\n </ng-template>\n\n <ng-template #listItem>\n <ng-template #listItem>\n <mat-list-item class=\"wrappable-list-item\">\n <!-- <mat-icon *ngIf=\"displayLocale | getI18nStringValueFromLocale : template.label as label\" matListIcon>{{\n label | mtnaWfGetListIcon\n }}</mat-icon> -->\n <ng-container *ngIf=\"displayLocale | getI18nStringValueFromLocale : template.questionText as questionText\">\n <ng-container *ngIf=\"questionText !== ''\">\n <ng-container *ngIf=\"displayLocale | getI18nStringValueFromLocale : template.label as tempLabel\">\n <h4 mat-line>{{ tempLabel !== '' ? tempLabel : template.name }}</h4>\n </ng-container>\n </ng-container>\n </ng-container>\n <p mat-line class=\"wrap-line\">{{ _noInformationText }}</p>\n </mat-list-item>\n </ng-template>\n </ng-template>\n</ng-container>\n", styles: ["mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item,mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item.mat-list-item-with-avatar{height:auto;padding:12px 0}mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item.mat-2-line,mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item.mat-2-line.mat-list-item-with-avatar{padding:18.5px 0}mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item .mat-line{white-space:normal;overflow:unset;text-overflow:unset}\n"], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$5.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i2$5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$3.MatLine, selector: "[mat-line], [matLine]" }], pipes: { "mtnaWfGetAutoComplete": MtnaWfGetAutoCompletePipe, "getI18nStringValueFromLocale": GetI18nStringValueFromLocalePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9611
+ MtnaWfDecimalAnswerItemTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfDecimalAnswerItemTemplateComponent, selector: "mtna-wf-decimal-answer-item-template", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"template\">\n <mat-form-field>\n <mat-label>{{ displayLocale | getI18nStringValueFromLocale : template.label }}</mat-label>\n <input\n matInput\n [autocomplete]=\"(displayLocale | getI18nStringValueFromLocale : template.label) || template.name | mtnaWfGetAutoComplete\"\n [required]=\"template.required\"\n />\n </mat-form-field>\n\n <ng-template #fullList>\n <mat-list>\n <ng-container *ngTemplateOutlet=\"listItem\"></ng-container>\n </mat-list>\n </ng-template>\n\n <ng-template #listItem>\n <ng-template #listItem>\n <mat-list-item class=\"wrappable-list-item\">\n <!-- <mat-icon *ngIf=\"displayLocale | getI18nStringValueFromLocale : template.label as label\" matListIcon>{{\n label | mtnaWfGetListIcon\n }}</mat-icon> -->\n <ng-container *ngIf=\"displayLocale | getI18nStringValueFromLocale : template.questionText as questionText\">\n <ng-container *ngIf=\"questionText !== ''\">\n <ng-container *ngIf=\"displayLocale | getI18nStringValueFromLocale : template.label as tempLabel\">\n <h4 mat-line>{{ tempLabel !== '' ? tempLabel : template.name }}</h4>\n </ng-container>\n </ng-container>\n </ng-container>\n <p mat-line class=\"wrap-line\">{{ _noInformationText }}</p>\n </mat-list-item>\n </ng-template>\n </ng-template>\n</ng-container>\n", styles: ["mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item,mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item.mat-list-item-with-avatar{height:auto;padding:12px 0}mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item.mat-2-line,mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item.mat-2-line.mat-list-item-with-avatar{padding:18.5px 0}mtna-wf-decimal-answer-item-template .mat-list-base .mat-list-item .mat-line{white-space:normal;overflow:unset;text-overflow:unset}\n"], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$5.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i2$5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$5.MatLabel, selector: "mat-label" }, { type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$3.MatLine, selector: "[mat-line], [matLine]" }], pipes: { "getI18nStringValueFromLocale": GetI18nStringValueFromLocalePipe, "mtnaWfGetAutoComplete": MtnaWfGetAutoCompletePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9033
9612
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDecimalAnswerItemTemplateComponent, decorators: [{
9034
9613
  type: Component,
9035
9614
  args: [{
@@ -9045,29 +9624,35 @@ class MtnaWfDecimalAnswerItemTemplateModule {
9045
9624
  }
9046
9625
  MtnaWfDecimalAnswerItemTemplateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDecimalAnswerItemTemplateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9047
9626
  MtnaWfDecimalAnswerItemTemplateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDecimalAnswerItemTemplateModule, declarations: [MtnaWfDecimalAnswerItemTemplateComponent], imports: [CommonModule,
9627
+ GetI18nStringValueFromLocalePipeModule,
9048
9628
  MatFormFieldModule,
9049
- MatListModule,
9050
9629
  MatInputModule,
9630
+ MatListModule,
9051
9631
  MtnaWfGetAutoCompletePipeModule,
9052
- GetI18nStringValueFromLocalePipeModule], exports: [MtnaWfDecimalAnswerItemTemplateComponent] });
9632
+ MtnaWfGetFormControlErrorPipeModule,
9633
+ ReactiveFormsModule], exports: [MtnaWfDecimalAnswerItemTemplateComponent] });
9053
9634
  MtnaWfDecimalAnswerItemTemplateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDecimalAnswerItemTemplateModule, imports: [[
9054
9635
  CommonModule,
9636
+ GetI18nStringValueFromLocalePipeModule,
9055
9637
  MatFormFieldModule,
9056
- MatListModule,
9057
9638
  MatInputModule,
9639
+ MatListModule,
9058
9640
  MtnaWfGetAutoCompletePipeModule,
9059
- GetI18nStringValueFromLocalePipeModule,
9641
+ MtnaWfGetFormControlErrorPipeModule,
9642
+ ReactiveFormsModule,
9060
9643
  ]] });
9061
9644
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDecimalAnswerItemTemplateModule, decorators: [{
9062
9645
  type: NgModule,
9063
9646
  args: [{
9064
9647
  imports: [
9065
9648
  CommonModule,
9649
+ GetI18nStringValueFromLocalePipeModule,
9066
9650
  MatFormFieldModule,
9067
- MatListModule,
9068
9651
  MatInputModule,
9652
+ MatListModule,
9069
9653
  MtnaWfGetAutoCompletePipeModule,
9070
- GetI18nStringValueFromLocalePipeModule,
9654
+ MtnaWfGetFormControlErrorPipeModule,
9655
+ ReactiveFormsModule,
9071
9656
  ],
9072
9657
  declarations: [MtnaWfDecimalAnswerItemTemplateComponent],
9073
9658
  exports: [MtnaWfDecimalAnswerItemTemplateComponent],
@@ -9800,24 +10385,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
9800
10385
  }], ctorParameters: function () { return [{ type: i1$a.Store }]; } });
9801
10386
 
9802
10387
  class TemplateFormEffects {
10388
+ // getTemplateInstance$ = createEffect(() =>
10389
+ // this.actions$.pipe(
10390
+ // ofType(TemplateFormActions.getTemplateInstance),
10391
+ // switchMap(({ template }) => {
10392
+ // return this.mtnaWfApiService.getTemplateInstance(template).pipe(
10393
+ // map((form) => TemplateFormApiActions.getTemplateInstanceSuccess({ form })),
10394
+ // catchError((error) => {
10395
+ // this.errorService.showError(error);
10396
+ // return of(TemplateFormApiActions.getTemplateInstanceFailure());
10397
+ // })
10398
+ // );
10399
+ // })
10400
+ // )
10401
+ // );
10402
+ //
10403
+ // getTemplateItemInstance$ = createEffect(() =>
10404
+ // this.actions$.pipe(
10405
+ // ofType(TemplateFormActions.getTemplateItemInstance),
10406
+ // switchMap(({ templateItem }) => {
10407
+ // return this.mtnaWfApiService.getTemplateItemInstance(templateItem).pipe(
10408
+ // map((formItem) => TemplateFormApiActions.getTemplateItemInstanceSuccess({ formItem })),
10409
+ // catchError((error) => {
10410
+ // this.errorService.showError(error);
10411
+ // return of(TemplateFormApiActions.getTemplateItemInstanceFailure());
10412
+ // })
10413
+ // );
10414
+ // })
10415
+ // )
10416
+ // );
9803
10417
  constructor(actions$, mtnaWfApiService, errorService, store, router) {
9804
10418
  this.actions$ = actions$;
9805
10419
  this.mtnaWfApiService = mtnaWfApiService;
9806
10420
  this.errorService = errorService;
9807
10421
  this.store = store;
9808
10422
  this.router = router;
9809
- this.getTemplateInstance$ = createEffect(() => this.actions$.pipe(ofType(getTemplateInstance), switchMap(({ template }) => {
9810
- return this.mtnaWfApiService.getTemplateInstance(template).pipe(map((form) => getTemplateInstanceSuccess({ form })), catchError((error) => {
9811
- this.errorService.showError(error);
9812
- return of(getTemplateInstanceFailure());
9813
- }));
9814
- })));
9815
- this.getTemplateItemInstance$ = createEffect(() => this.actions$.pipe(ofType(getTemplateItemInstance), switchMap(({ templateItem }) => {
9816
- return this.mtnaWfApiService.getTemplateItemInstance(templateItem).pipe(map((formItem) => getTemplateItemInstanceSuccess({ formItem })), catchError((error) => {
9817
- this.errorService.showError(error);
9818
- return of(getTemplateItemInstanceFailure());
9819
- }));
9820
- })));
9821
10423
  }
9822
10424
  }
9823
10425
  TemplateFormEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TemplateFormEffects, deps: [{ token: i1$b.Actions }, { token: MtnaWfApiService }, { token: i1$1.MtnaErrorService }, { token: i1$a.Store }, { token: i5$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -9833,6 +10435,35 @@ class TemplateDesignFacade extends DesignFacade {
9833
10435
  this.templateFormFacade = templateFormFacade;
9834
10436
  this.i18nFacade = i18nFacade;
9835
10437
  this.languageIds$ = new BehaviorSubject([]);
10438
+ /**
10439
+ * The property names in the design updates that should trigger a design update on transition to ensure that the references and design
10440
+ * are updated to reflect any changes to these properties.
10441
+ */
10442
+ this.transitionUpdatePropNames = [
10443
+ prop_item_name,
10444
+ prop_item_question_text,
10445
+ prop_item_descriptive_text,
10446
+ prop_option_enabled_items,
10447
+ prop_option_disabled_items,
10448
+ ];
10449
+ /**
10450
+ * The section names in the design updates that should trigger a design update on transition to ensure that the references and design
10451
+ * are updated to reflect any changes to properties.
10452
+ */
10453
+ this.transitionUpdateSectionNames = [i18n_templateItemBasicSettings, i18n_enabledAndDisabledItems];
10454
+ /**
10455
+ * Need to remove the following modelDesignProperties from the designMap when indexing the designs for the references
10456
+ * because they are used for the display and description of the template and template items, so they should not be
10457
+ * included as potential reference designs for the conditionals section or the option item sections.
10458
+ */
10459
+ this.referencePropertyNameExclusions = [prop_item_title, prop_item_acknowledgementTemplate, prop_option_template];
10460
+ /**
10461
+ * Need to remove the following itemIds from the modelMap when indexing the models for the references because they are used
10462
+ * for the title and should not be included as potential reference designs for the conditionals section. We don't need to include
10463
+ * the acknowledgement template here because the getModelMap function does not index the TemplateSection attached to the
10464
+ * acknowledgementTemplate property.
10465
+ */
10466
+ this.itemIdExclusionsForReferences = [];
9836
10467
  this.modifiedModelSubscription = this.modifiedModel$.pipe().subscribe((modifiedModel) => {
9837
10468
  // This is to ensure that a FormOptionSelector can not be passed as a modified model when trying to get the Form context.
9838
10469
  // This should eliminate that possibility.
@@ -9860,6 +10491,17 @@ class TemplateDesignFacade extends DesignFacade {
9860
10491
  }
9861
10492
  });
9862
10493
  }
10494
+ initialize(model) {
10495
+ // reset to the first context in the available, assumes the contexts have already been set.
10496
+ const contexts = this.contextAvailable$.value;
10497
+ this.setContextSelected(isPresent(contexts) && contexts.length > 0 ? contexts[0] : undefined);
10498
+ this.updateModelReferences(model);
10499
+ const design = this.toDesign(model); // Convert the model to a design again to ensure that the design reflects the indexed references.
10500
+ this.indexModelDesignProperties(design);
10501
+ this.modifiedModel$.next(model);
10502
+ this.design$.next(design);
10503
+ this.setFocusedDesignId(design.id, design.focusType);
10504
+ }
9863
10505
  close() {
9864
10506
  if (this.contextSubscription) {
9865
10507
  this.contextSubscription.unsubscribe();
@@ -9879,10 +10521,10 @@ class TemplateDesignFacade extends DesignFacade {
9879
10521
  }
9880
10522
  fromDesign(design) {
9881
10523
  if (isTemplateDesign(design)) {
9882
- return toTemplate(design, this.contextSelected$.value);
10524
+ return toTemplate(design, this.contextSelected$.value, { references: this.references$.value });
9883
10525
  }
9884
10526
  else if (isTemplateItemDesign(design)) {
9885
- return toTemplateItem(design, this.contextSelected$.value);
10527
+ return toTemplateItem(design, this.contextSelected$.value, { references: this.references$.value });
9886
10528
  }
9887
10529
  else if (design.type === 'OPTION') {
9888
10530
  return designToOptionSelector(design, this.contextSelected$.value);
@@ -9892,18 +10534,7 @@ class TemplateDesignFacade extends DesignFacade {
9892
10534
  }
9893
10535
  }
9894
10536
  toDesign(model) {
9895
- if (instanceOfTemplateImpl(model)) {
9896
- return templateToDesign(model, this.languageId, this.contextSelected$.value);
9897
- }
9898
- else if (isTemplateItem(model)) {
9899
- return itemToDesign(model, this.languageId, undefined, this.contextSelected$.value);
9900
- }
9901
- else if (instanceOfFormOptionSelector(model)) {
9902
- return optionSelectorToDesign(model, this.languageId, {}, this.references$.value, undefined, this.contextSelected$.value);
9903
- }
9904
- else {
9905
- throw new Error(`Cannot convert model to design. Model is not recognized. Supported types are instances of TEMPLATE, TEMPLATE_ITEM, and OPTION.`);
9906
- }
10537
+ return getModelToDesign(model, this.languageId, this.contextSelected$.value, this.references$.value);
9907
10538
  }
9908
10539
  getPotentialDesigns(design, property, index) {
9909
10540
  this.placementIndex$.next(index); // Used to indicate where a new item should be placed when adding a new repeatable value (modelDesignProperty)
@@ -9923,11 +10554,15 @@ class TemplateDesignFacade extends DesignFacade {
9923
10554
  createNewInstance(designBase, parent) {
9924
10555
  if (isTemplateDesign(designBase)) {
9925
10556
  const template = getNewTemplate(designBase);
9926
- return templateToDesign(template, this.languageId, this.contextSelected$.value);
10557
+ return templateToDesign(template, this.languageId, this.contextSelected$.value, {
10558
+ references: this.references$.value,
10559
+ });
9927
10560
  }
9928
10561
  else if (isTemplateItemDesign(designBase)) {
9929
10562
  const templateItem = getNewTemplateItem(designBase, this.languageId, this.languageIds$.value);
9930
- return itemToDesign(templateItem, this.languageId, parent, this.contextSelected$.value);
10563
+ return itemToDesign(templateItem, this.languageId, parent, this.contextSelected$.value, {
10564
+ references: this.references$.value,
10565
+ });
9931
10566
  }
9932
10567
  else if (designBase.type === 'OPTION') {
9933
10568
  const formOptionSelector = getNewFormOptionSelector(designBase);
@@ -9938,6 +10573,14 @@ class TemplateDesignFacade extends DesignFacade {
9938
10573
  }
9939
10574
  }
9940
10575
  setModifiedModel(designUpdate) {
10576
+ if (designUpdate) {
10577
+ const partialDesignUpdate = {
10578
+ designId: designUpdate.designId,
10579
+ section: designUpdate.section,
10580
+ property: designUpdate.property,
10581
+ };
10582
+ this.designUpdates$.next([...this.designUpdates$.value, partialDesignUpdate]);
10583
+ }
9941
10584
  let modifiedModel = designUpdate ? this.fromDesign(designUpdate.design) : undefined;
9942
10585
  if (isPresent(modifiedModel)) {
9943
10586
  // Merge the new modified model with the existing modified model.
@@ -9963,7 +10606,10 @@ class TemplateDesignFacade extends DesignFacade {
9963
10606
  getDesignDisplay(design) {
9964
10607
  if (isTemplateDesign(design)) {
9965
10608
  const props = getLiteralProperties(design, i18n_descriptive, [prop_item_title]);
9966
- return isPresent(props[prop_item_title]) && props[prop_item_title] !== '' ? props[prop_item_title] : i18n_template;
10609
+ // The prop_item_title is an InternationalizedString[], so we need to use the getI18nString function to retrieve the correct
10610
+ // string value based on the current languageId and fallback to an empty language if not present.
10611
+ const propTitleString = getI18nString(props[prop_item_title], this.languageId, true);
10612
+ return isPresent(props[prop_item_title]) && propTitleString && propTitleString !== '' ? propTitleString : i18n_template;
9967
10613
  }
9968
10614
  else if (isTemplateItemDesign(design)) {
9969
10615
  const props = getLiteralProperties(design, i18n_templateItemBasicSettings, [prop_item_name]);
@@ -9979,18 +10625,9 @@ class TemplateDesignFacade extends DesignFacade {
9979
10625
  }
9980
10626
  indexModelDesignProperties(design) {
9981
10627
  const references = {};
9982
- const designMap = getDesignMap(design, true);
10628
+ const designMap = getDesignMap(design, true, this.referencePropertyNameExclusions, this.itemIdExclusionsForReferences);
9983
10629
  for (const [_, value] of designMap.entries()) {
9984
- if (isTemplateDesign(value.design)) {
9985
- const properties = getLiteralProperties(value.design, i18n_descriptive, [prop_template_title, prop_template_descriptive_text]);
9986
- const referenceDesignValue = {
9987
- id: value.design.id,
9988
- display: getText(properties, prop_template_title, true, this.languageId),
9989
- description: getText(properties, prop_template_descriptive_text, true, this.languageId),
9990
- };
9991
- references[value.design.id] = referenceDesignValue;
9992
- }
9993
- else if (isTemplateItemDesign(value.design)) {
10630
+ if (isTemplateItemDesign(value.design)) {
9994
10631
  const properties = getLiteralProperties(value.design, i18n_templateItemBasicSettings, [
9995
10632
  prop_item_name,
9996
10633
  prop_item_question_text,
@@ -10006,6 +10643,36 @@ class TemplateDesignFacade extends DesignFacade {
10006
10643
  }
10007
10644
  this.references$.next(references);
10008
10645
  }
10646
+ updateModelReferences(model) {
10647
+ var _a, _b, _c;
10648
+ const references = {};
10649
+ const templateItems = [];
10650
+ if (instanceOfTemplateImpl(model)) {
10651
+ templateItems.push(...model.items);
10652
+ // Because this is a template
10653
+ }
10654
+ else if (isTemplateItem(model)) {
10655
+ templateItems.push(model);
10656
+ }
10657
+ const modelMap = getModelMap(templateItems, this.itemIdExclusionsForReferences);
10658
+ for (const [_, templateItem] of modelMap.entries()) {
10659
+ let description = '';
10660
+ if (isPresent(templateItem.questionText) && templateItem.questionText.length > 0) {
10661
+ description = (_a = getI18nString(templateItem.questionText, this.languageId, true)) !== null && _a !== void 0 ? _a : '';
10662
+ }
10663
+ else if (isPresent(templateItem.descriptiveText) && templateItem.descriptiveText.length > 0) {
10664
+ description = (_b = getI18nString(templateItem.descriptiveText, this.languageId, true)) !== null && _b !== void 0 ? _b : '';
10665
+ }
10666
+ const unavailableTemplateItemName = UnavailableTemplateItemNameMap[templateItem.itemId];
10667
+ const referenceDesignValue = {
10668
+ id: templateItem.instanceId,
10669
+ display: (_c = templateItem.name) !== null && _c !== void 0 ? _c : unavailableTemplateItemName,
10670
+ description,
10671
+ };
10672
+ references[templateItem.instanceId] = referenceDesignValue;
10673
+ }
10674
+ this.references$.next(references);
10675
+ }
10009
10676
  setDesignDisabled(disabled) {
10010
10677
  // check to see if the disabled state has changed before updating the designDisabled$ observable
10011
10678
  if (this.designDisabled$.value !== disabled) {
@@ -10038,6 +10705,17 @@ class TemplateDesignFacade extends DesignFacade {
10038
10705
  } // otherwise maintain the current focus. This means we do not change the focusedDesignId$ value.
10039
10706
  }
10040
10707
  }
10708
+ transitionDesign() {
10709
+ if (this.design$.value) {
10710
+ const affectsReferences = this.designUpdates$.value.some((designUpdate) => this.transitionUpdateSectionNames.includes(designUpdate.section) && this.transitionUpdatePropNames.includes(designUpdate.property));
10711
+ if (isPresent(this.modifiedModel$.value) && affectsReferences) {
10712
+ this.updateModelReferences(this.modifiedModel$.value);
10713
+ const updatedDesign = this.toDesign(this.modifiedModel$.value);
10714
+ this.design$.next(updatedDesign);
10715
+ }
10716
+ }
10717
+ super.transitionDesign(); // This will reset the design updates to an empty array.
10718
+ }
10041
10719
  }
10042
10720
  TemplateDesignFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TemplateDesignFacade, deps: [{ token: LOCALE_ID }, { token: TemplateFormFacade }, { token: i2$6.MtnaI18nFacade }], target: i0.ɵɵFactoryTarget.Injectable });
10043
10721
  TemplateDesignFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TemplateDesignFacade });
@@ -10052,22 +10730,37 @@ class MtnaWfTemplateDisplayViewerComponent {
10052
10730
  constructor(designFacade, templateFormFacade) {
10053
10731
  this.designFacade = designFacade;
10054
10732
  this.templateFormFacade = templateFormFacade;
10733
+ this.formSteps$ = new BehaviorSubject(undefined);
10734
+ this.designSteps$ = new BehaviorSubject([]);
10735
+ this.singleTemplateDesignSectionStep$ = new BehaviorSubject(undefined);
10055
10736
  this.contextSelected$ = this.designFacade.contextSelected$;
10056
10737
  this.focusedDesignId$ = this.designFacade.focusedDesignId$;
10057
- this.modifiedModel$ = this.designFacade.modifiedModel$;
10738
+ this.modifiedModel$ = this.designFacade.modifiedModel$.pipe(tap((modifiedModel) => {
10739
+ if (isPresent(modifiedModel)) {
10740
+ if (instanceOfTemplateImpl(modifiedModel)) {
10741
+ const generatedFormSteps = generateFormSteps(modifiedModel.items, true);
10742
+ const flattenedSteps = flattenSteps(generatedFormSteps);
10743
+ this.designSteps$.next(flattenedSteps);
10744
+ }
10745
+ else if (isTemplateItem(modifiedModel) && instanceOfTemplateSectionImpl(modifiedModel)) {
10746
+ const generatedFormSteps = generateFormSteps(modifiedModel.items, true);
10747
+ const flattenedSteps = flattenSteps(generatedFormSteps);
10748
+ this.singleTemplateDesignSectionStep$.next(flattenedSteps[0]);
10749
+ }
10750
+ }
10751
+ }));
10058
10752
  this.previewLanguage$ = this.designFacade.previewLanguage$;
10059
10753
  this.loading$ = this.templateFormFacade.loading$;
10060
10754
  this.templateForm$ = this.templateFormFacade.templateForm$;
10061
10755
  this.templateFormItem$ = this.templateFormFacade.templateFormItem$;
10062
10756
  this.typeLoaded$ = this.templateFormFacade.typeLoaded$;
10063
- this.formSteps$ = new BehaviorSubject(undefined);
10064
10757
  this.retryTrigger$ = new BehaviorSubject(undefined);
10065
10758
  this.context_template = template;
10066
10759
  this.context_form = form;
10067
10760
  }
10068
10761
  }
10069
10762
  MtnaWfTemplateDisplayViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfTemplateDisplayViewerComponent, deps: [{ token: i1$c.DesignFacade }, { token: TemplateFormFacade }], target: i0.ɵɵFactoryTarget.Component });
10070
- MtnaWfTemplateDisplayViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfTemplateDisplayViewerComponent, selector: "mtna-wf-template-display-viewer", ngImport: i0, template: "<ng-container *ngIf=\"modifiedModel$ | async as templateOrTemplateItem\">\n <section class=\"content-preview\">\n <ng-container *ngIf=\"contextSelected$ | async as context\" [ngSwitch]=\"context.id\">\n <ng-container *ngSwitchCase=\"context_template.id\">\n <ng-container *ngIf=\"templateOrTemplateItem | instanceOfTemplateImpl as template; else templateItemTemplate\">\n <mtna-wf-template\n [template]=\"template\"\n [displayLocale]=\"(previewLanguage$ | async) ?? 'en'\"\n [highlightId]=\"focusedDesignId$ | async\"\n ></mtna-wf-template>\n </ng-container>\n <ng-template #templateItemTemplate>\n <ng-container *ngIf=\"templateOrTemplateItem | instanceOfTemplateItem as templateItem\">\n <mtna-wf-template-item [template]=\"templateItem\" [displayLocale]=\"(previewLanguage$ | async) ?? 'en'\"></mtna-wf-template-item>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <!-- Placeholder for form context -->\n <div *ngSwitchCase=\"context_form.id\" class=\"form-preview\">\n <div *ngIf=\"loading$ | async; else formDisplay\">\n <mat-progress-spinner aria-label=\"Loading Form\" i18n-aria-label [mode]=\"'indeterminate'\"></mat-progress-spinner>\n </div>\n <ng-template #formDisplay></ng-template>\n <!-- <div *ngIf=\"formState$ | async as state\">-->\n <!-- &lt;!&ndash; <span>{{ state | json }}</span>&ndash;&gt;-->\n <!-- <mat-progress-spinner-->\n <!-- *ngIf=\"state.loading\"-->\n <!-- aria-label=\"Loading Form\"-->\n <!-- i18n-aria-label-->\n <!-- [mode]=\"'indeterminate'\"-->\n <!-- ></mat-progress-spinner>-->\n <!-- <div *ngIf=\"!state.loading && state.error\" class=\"form-preview-error mat-elevation-z4\" fxLayout=\"column\">-->\n <!-- <div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"error-message\">-->\n <!-- <mat-icon color=\"warn\">error</mat-icon><span>{{ state.error.message }}</span>-->\n <!-- </div>-->\n <!-- <div *ngIf=\"state.error.retry\" fxLayout=\"row\" fxLayoutAlign=\"end center\" class=\"retry-container\">-->\n <!-- <button mat-flat-button color=\"accent\" (click)=\"retryFormLoad()\">RETRY</button>-->\n <!-- </div>-->\n <!-- </div>-->\n <!-- <div *ngIf=\"!state.loading && state.form\">-->\n <!-- <mtna-form [mtnaForm]=\"state.form\" [readonly]=\"false\" [steps]=\"formSteps$ | async\"></mtna-form>-->\n <!-- </div>-->\n <!-- </div>-->\n <!-- When the context switches this can make the call to the form service and show a loader. Once it is returned you will pass it into the MtnaForm -->\n </div>\n\n <div *ngSwitchDefault></div>\n </ng-container>\n </section>\n</ng-container>\n", styles: ["mtna-wf-template-display-viewer{display:block;height:100%;overflow:auto}mtna-wf-template-display-viewer .content-preview{margin:80px}mtna-wf-template-display-viewer .form-preview{display:flex;justify-content:center}mtna-wf-template-display-viewer .form-preview .form-preview-error{border-style:solid;border-width:1px;border-radius:4px;padding:16px}mtna-wf-template-display-viewer .form-preview .form-preview-error .error-message{margin-bottom:8px}mtna-wf-template-display-viewer .form-preview .form-preview-error .error-message .mat-icon{margin-right:4px;margin-bottom:auto}\n"], components: [{ type: MtnaWfTemplateComponent, selector: "mtna-wf-template", inputs: ["displayLocale", "isCompact", "highlightId", "steps", "template"] }, { type: MtnaWfTemplateItemComponent, selector: "mtna-wf-template-item", inputs: ["displayLocale", "inList", "isCompact", "step", "template", "color"] }, { type: i5$1.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i3.AsyncPipe, "instanceOfTemplateImpl": MtnaWfInstanceOfTemplateImplPipe, "instanceOfTemplateItem": MtnaWfInstanceOfTemplateItemPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
10763
+ MtnaWfTemplateDisplayViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfTemplateDisplayViewerComponent, selector: "mtna-wf-template-display-viewer", ngImport: i0, template: "<ng-container *ngIf=\"modifiedModel$ | async as templateOrTemplateItem\">\n <section class=\"content-preview\">\n <ng-container *ngIf=\"contextSelected$ | async as context\" [ngSwitch]=\"context.id\">\n <ng-container *ngSwitchCase=\"context_template.id\">\n <ng-container *ngIf=\"templateOrTemplateItem | instanceOfTemplateImpl as template; else templateItemTemplate\">\n <mtna-wf-template\n [displayLocale]=\"(previewLanguage$ | async) ?? 'en'\"\n [highlightId]=\"focusedDesignId$ | async\"\n [steps]=\"designSteps$ | async\"\n [template]=\"template\"\n ></mtna-wf-template>\n </ng-container>\n <ng-template #templateItemTemplate>\n <ng-container *ngIf=\"templateOrTemplateItem | instanceOfTemplateItem as templateItem\">\n <mtna-wf-template-item\n [displayLocale]=\"(previewLanguage$ | async) ?? 'en'\"\n [step]=\"singleTemplateDesignSectionStep$ | async\"\n [template]=\"templateItem\"\n ></mtna-wf-template-item>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <!-- Placeholder for form context -->\n <div *ngSwitchCase=\"context_form.id\" class=\"form-preview\">\n <div *ngIf=\"loading$ | async; else formDisplay\">\n <mat-progress-spinner aria-label=\"Loading Form\" i18n-aria-label [mode]=\"'indeterminate'\"></mat-progress-spinner>\n </div>\n <ng-template #formDisplay></ng-template>\n <!-- <div *ngIf=\"formState$ | async as state\">-->\n <!-- &lt;!&ndash; <span>{{ state | json }}</span>&ndash;&gt;-->\n <!-- <mat-progress-spinner-->\n <!-- *ngIf=\"state.loading\"-->\n <!-- aria-label=\"Loading Form\"-->\n <!-- i18n-aria-label-->\n <!-- [mode]=\"'indeterminate'\"-->\n <!-- ></mat-progress-spinner>-->\n <!-- <div *ngIf=\"!state.loading && state.error\" class=\"form-preview-error mat-elevation-z4\" fxLayout=\"column\">-->\n <!-- <div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"error-message\">-->\n <!-- <mat-icon color=\"warn\">error</mat-icon><span>{{ state.error.message }}</span>-->\n <!-- </div>-->\n <!-- <div *ngIf=\"state.error.retry\" fxLayout=\"row\" fxLayoutAlign=\"end center\" class=\"retry-container\">-->\n <!-- <button mat-flat-button color=\"accent\" (click)=\"retryFormLoad()\">RETRY</button>-->\n <!-- </div>-->\n <!-- </div>-->\n <!-- <div *ngIf=\"!state.loading && state.form\">-->\n <!-- <mtna-form [mtnaForm]=\"state.form\" [readonly]=\"false\" [steps]=\"formSteps$ | async\"></mtna-form>-->\n <!-- </div>-->\n <!-- </div>-->\n <!-- When the context switches this can make the call to the form service and show a loader. Once it is returned you will pass it into the MtnaForm -->\n </div>\n\n <div *ngSwitchDefault></div>\n </ng-container>\n </section>\n</ng-container>\n", styles: ["mtna-wf-template-display-viewer{display:block;height:100%;overflow:auto}mtna-wf-template-display-viewer .content-preview{margin:80px}mtna-wf-template-display-viewer .form-preview{display:flex;justify-content:center}mtna-wf-template-display-viewer .form-preview .form-preview-error{border-style:solid;border-width:1px;border-radius:4px;padding:16px}mtna-wf-template-display-viewer .form-preview .form-preview-error .error-message{margin-bottom:8px}mtna-wf-template-display-viewer .form-preview .form-preview-error .error-message .mat-icon{margin-right:4px;margin-bottom:auto}\n"], components: [{ type: MtnaWfTemplateComponent, selector: "mtna-wf-template", inputs: ["displayLocale", "isCompact", "highlightId", "steps", "template"] }, { type: MtnaWfTemplateItemComponent, selector: "mtna-wf-template-item", inputs: ["displayLocale", "inList", "isCompact", "step", "template", "color"] }, { type: i5$1.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i3.AsyncPipe, "instanceOfTemplateImpl": MtnaWfInstanceOfTemplateImplPipe, "instanceOfTemplateItem": MtnaWfInstanceOfTemplateItemPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
10071
10764
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfTemplateDisplayViewerComponent, decorators: [{
10072
10765
  type: Component,
10073
10766
  args: [{
@@ -10477,5 +11170,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
10477
11170
  * Generated bundle index. Do not edit.
10478
11171
  */
10479
11172
 
10480
- export { BOOLEAN_POTENTIAL_DESIGN, BULLETED_LIST_POTENTIAL_DESIGN, BaseFormStep, BooleanItemTemplateMapper, BulletedListItemTemplateMapper, CHECKBOX_POTENTIAL_DESIGN, COMPLEX_STANDARD, CUSTOM_MAT_DATE_FORMAT, CheckboxItemTemplateMapper, ChildStepActivePipe, ChildStepActivePipeModule, CoerceFormStepGroupPipe, CoerceFormStepGroupPipeModule, CoerceFormStepPipe, CoerceFormStepPipeModule, DASHED_DATE_DISPLAY_VALUE, DATE_ENUM_VALUES, DATE_POTENTIAL_DESIGN, DECIMAL_ANSWER_POTENTIAL_DESIGN, DEFAULT_ERROR_MESSAGES, DOTTED_DATE_DISPLAY_VALUE, DROPDOWN_POTENTIAL_DESIGN, DateItemTemplateMapper, DropdownItemTemplateMapper, EURO_LONG_DATE_DISPLAY_VALUE, FILE_UPLOAD_POTENTIAL_DESIGN, FORM_OPTION_SELECTOR_POTENTIAL_DESIGN, FileUploadItemTemplateMapper, FormStep, FormStepGroup, GROUP_POTENTIAL_DESIGN, GROUP_POTENTIAL_DESIGN_LIST, GetActiveFormStepItemPipe, GetActiveFormStepItemPipeModule, GetI18nStringValueFromLocalePipe, GetI18nStringValueFromLocalePipeModule, GetI18nStringsValueFromLocalePipe, GetI18nStringsValueFromLocalePipeModule, GetProgressiveFormItemPipe, GetProgressiveFormItemPipeModule, GetStepAriaLabel, GetStepAriaLabelModule, I18N_PARAGRAPH_ANSWER_POTENTIAL_DESIGN, I18N_SHORT_ANSWER_POTENTIAL_DESIGN, I18nTextResponseItemTemplateMapper, ISO_8601_DATE_DISPLAY_VALUE, LONG_DATE_DISPLAY_VALUE, MTNA_WF_DEFAULT_YEAR_RANGE, MTNA_WF_EXPAND_COLLAPSE, MTNA_WF_FORM_ITEM_VALIDATION_RESULT_ERROR_NAME, MTNA_WF_ITEM_INJECTED_COMPONENTS, MTNA_WF_ITEM_WHITELIST, MTNA_WF_ITEM_WHITELIST_FACTORY, MTNA_WF_TEMPLATE_ITEM_INJECTED_COMPONENTS, MULTIPLE_CHOICE_POTENTIAL_DESIGN, MtnaFormModule, templateDesignCoreUtil as MtnaTemplateCoreDesign, templateDesignUtil as MtnaTemplateDesign, MtnaTemplateTransformationService, MtnaWfAcknowledgeDialogComponent, MtnaWfAcknowledgeDialogModule, MtnaWfApiService, MtnaWfBaseFormItemControl, MtnaWfBaseGroupItem, MtnaWfBaseParentValueItem, MtnaWfBaseSectionItem, MtnaWfBaseSingleSelectionParentValueItem, MtnaWfBaseTemplateItemComponent, MtnaWfBaseTemplateItemWithListComponent, MtnaWfBaseValueItem, MtnaWfBooleanComponent, MtnaWfBooleanItemTemplateComponent, MtnaWfBooleanItemTemplateModule, MtnaWfBooleanModule, MtnaWfCheckboxComponent, MtnaWfCheckboxItemTemplateComponent, MtnaWfCheckboxItemTemplateModule, MtnaWfCheckboxModule, MtnaWfCoerceDateItemPipe, MtnaWfCoerceDateItemPipeModule, MtnaWfCoerceFormControlPipe, MtnaWfCoerceFormControlPipeModule, MtnaWfCoerceFormGroupPipe, MtnaWfCoerceFormGroupPipeModule, MtnaWfDateComponent, MtnaWfDateItemTemplateComponent, MtnaWfDateItemTemplateModule, MtnaWfDateModule, MtnaWfDateQuarterPipe, MtnaWfDateQuarterPipeModule, MtnaWfDateRangeComponent, MtnaWfDateRangeModule, MtnaWfDecimalAnswerItemTemplateComponent, MtnaWfDecimalAnswerItemTemplateModule, MtnaWfDialogService, MtnaWfDropdownComponent, MtnaWfDropdownItemTemplateComponent, MtnaWfDropdownItemTemplateModule, MtnaWfDropdownModule, MtnaWfFileUploadComponent, MtnaWfFileUploadItemTemplateComponent, MtnaWfFileUploadItemTemplateModule, MtnaWfFileUploadModule, MtnaWfFilterHiddenItemsPipe, MtnaWfFilterHiddenItemsPipeModule, MtnaWfFormComponent, MtnaWfFormDisablerComponent, MtnaWfFormDisablerModule, MtnaWfFormGroupComponent, MtnaWfFormGroupModule, MtnaWfFormItemComponent, MtnaWfFormItemDialogComponent, MtnaWfFormItemDialogData, MtnaWfFormItemDialogModule, MtnaWfFormItemModule, MtnaWfFormSectionComponent, MtnaWfFormSectionModule, MtnaWfFormStepComponent, MtnaWfFormStepGroupComponent, MtnaWfFormStepGroupPipe, MtnaWfFormStepGroupPipeModule, MtnaWfFormStepperComponent, MtnaWfFormStepperModule, MtnaWfGetAutoCompletePipe, MtnaWfGetAutoCompletePipeModule, MtnaWfGetAvailableQuartersPipe, MtnaWfGetAvailableQuartersPipeModule, MtnaWfGetFormControlErrorPipe, MtnaWfGetFormControlErrorPipeModule, MtnaWfGetListIconPipe, MtnaWfGetListIconPipeModule, MtnaWfGetObjectTypePipe, MtnaWfGetObjectTypePipeModule, MtnaWfGetSelectedOptionNamePipe, MtnaWfGetSelectedOptionNamePipeModule, MtnaWfI18nInputComponent, MtnaWfI18nInputModule, MtnaWfI18nParagraphAnswerItemTemplateComponent, MtnaWfI18nParagraphAnswerItemTemplateModule, MtnaWfI18nShortAnswerItemTemplateComponent, MtnaWfI18nShortAnswerItemTemplateModule, MtnaWfInputComponent, MtnaWfInputModule, MtnaWfInstanceOfTemplateImplPipe, MtnaWfInstanceOfTemplateImplPipeModule, MtnaWfInstanceOfTemplateItemGroupImplPipe, MtnaWfInstanceOfTemplateItemGroupImplPipeModule, MtnaWfInstanceOfTemplateItemPipe, MtnaWfInstanceOfTemplateItemPipeModule, MtnaWfInstantValidationResultErrorStateMatcher, MtnaWfItemComponentProvider, MtnaWfItemHeaderComponent, MtnaWfItemHeaderModule, MtnaWfItemInjector, MtnaWfItemInjectorModule, MtnaWfItemsWithValuePipe, MtnaWfItemsWithValuePipeModule, MtnaWfManagerService, MtnaWfMultipleChoiceComponent, MtnaWfMultipleChoiceItemTemplateComponent, MtnaWfMultipleChoiceItemTemplateModule, MtnaWfMultipleChoiceModule, MtnaWfNgFormService, MtnaWfOffsetDateRangeItemTemplateComponent, MtnaWfOffsetDateRangeItemTemplateModule, MtnaWfOrderedListItemComponent, MtnaWfOrderedListItemModule, MtnaWfOrderedListItemTemplateComponent, MtnaWfOrderedListItemTemplateModule, MtnaWfParagraphAnswerItemTemplateComponent, MtnaWfParagraphAnswerItemTemplateModule, MtnaWfProgressiveFormComponent, MtnaWfProgressiveFormModule, MtnaWfRepeatableItemComponent, MtnaWfRepeatableItemContainerComponent, MtnaWfRepeatableItemContainerModule, MtnaWfRepeatableItemModule, MtnaWfRepeatableItemTemplateComponent, MtnaWfRepeatableItemTemplateContainerComponent, MtnaWfRepeatableItemTemplateContainerModule, MtnaWfRepeatableItemTemplateModule, MtnaWfResourceSearchComponent, MtnaWfResourceSearchModule, MtnaWfResourceSearchSelectionService, MtnaWfSanitizeHtmlPipe, MtnaWfSanitizeHtmlPipeModule, serializerUtil as MtnaWfSerializer, MtnaWfShortAnswerItemTemplateComponent, MtnaWfShortAnswerItemTemplateModule, MtnaWfStepCardComponent, MtnaWfStepCardModule, MtnaWfTableFormItemComponent, MtnaWfTableFormItemModule, MtnaWfTemplateComponent, MtnaWfTemplateDisplayViewerComponent, MtnaWfTemplateDisplayViewerModule, MtnaWfTemplateItemComponent, MtnaWfTemplateItemComponentProvider, MtnaWfTemplateItemGroupComponent, MtnaWfTemplateItemGroupModule, MtnaWfTemplateItemHeaderComponent, MtnaWfTemplateItemHeaderModule, MtnaWfTemplateItemInjector, MtnaWfTemplateItemInjectorModule, MtnaWfTemplateItemModule, MtnaWfTemplateModule, MtnaWfTemplateSectionComponent, MtnaWfTemplateSectionModule, MtnaWfTextItemComponent, MtnaWfTextItemModule, MtnaWfTextItemTemplateComponent, MtnaWfTextItemTemplateModule, MtnaWfTitleItemComponent, MtnaWfTitleItemModule, MtnaWfTitleItemTemplateComponent, MtnaWfTitleItemTemplateModule, MtnaWfUIService, MtnaWfUnorderedListItemComponent, MtnaWfUnorderedListItemModule, MtnaWfUnorderedListItemTemplateComponent, MtnaWfUnorderedListItemTemplateModule, MtnaWfWholeNumberAnswerItemTemplateComponent, MtnaWfWholeNumberAnswerItemTemplateModule, MtnaWfYearQuarterComponent, MtnaWfYearQuarterItemTemplateComponent, MtnaWfYearQuarterItemTemplateModule, MtnaWfYearQuarterModule, MtnaWfYearQuarterRangeComponent, MtnaWfYearQuarterRangeItemTemplateComponent, MtnaWfYearQuarterRangeItemTemplateModule, MtnaWfYearQuarterRangeModule, MultipleChoiceItemTemplateMapper, NUMBERED_LIST_POTENTIAL_DESIGN, NumberedListItemTemplateMapper, NumericResponseItemTemplateMapper, OFFSET_DATE_RANGE_POTENTIAL_DESIGN, OPTION_SELECTOR_POTENTIAL_DESIGN_LIST, OffsetDateRangeTemplateMapper, OptionGroupItemMapper, OptionItemMapper, OptionSelectorMapper, PARAGRAPH_ANSWER_POTENTIAL_DESIGN, REPEATABLE_POTENTIAL_DESIGN, RepeatableItemTemplateMapper, SECTION_POTENTIAL_DESIGN, SECTION_POTENTIAL_DESIGN_LIST, SHORT_ANSWER_POTENTIAL_DESIGN, SLASHED_DATE_DISPLAY_VALUE, TEMPLATE_FORM_STATE_KEY, TEMPLATE_POTENTIAL_DESIGN_LIST, TEXT_POTENTIAL_DESIGN, TITLE_POTENTIAL_DESIGN, TemplateDesignFacade, templateForm_actions as TemplateFormActions, templateFormApi_actions as TemplateFormApiActions, TemplateFormEffects, TemplateFormFacade, templateForm_selectors as TemplateFormSelectors, TemplateItemGroupMapper, TemplateItemMapper, TemplateMapper, TemplateSectionMapper, TextItemTemplateMapper, TextResponseItemTemplateMapper, TimeItemTemplateMapper, TitleItemTemplateMapper, WEB_FORM_CUSTOM_ERRORS, WHOLE_NUMBER_ANSWER_POTENTIAL_DESIGN, YEAR_QUARTER_RANGE_POTENTIAL_DESIGN, YearQuarterRangeItemTemplateMapper, deactivateStep, everyStepStatus, findFormControl, findFormItem, flattenConditionalItems, flattenSteps, form, generateFormSteps, generateFormStepsFromOutline, getConditionalProcessingResources, getItemClassSuffix, getItemMapperFromDesign, hasCondition, i18n_acknowledgement, i18n_acknowledgementDialogTitle, i18n_acknowledgementInstructions, i18n_additionalText, i18n_additionalTextInstructions, i18n_annotationEnabled, i18n_annotationEnabledInstructions, i18n_boolean, i18n_booleanConfiguration, i18n_booleanItem, i18n_bulletedListConfiguration, i18n_bulletedListItem, i18n_bulletedListItemInstructions, i18n_checkbox, i18n_checkboxConfiguration, i18n_checkboxItem, i18n_childItems, i18n_codeOption, i18n_codeOptionInstructions, i18n_core, i18n_date, i18n_dateConfiguration, i18n_dateItem, i18n_decimalAnswer, i18n_decimalAnswerItem, i18n_decimalValue, i18n_description, i18n_descriptionInstructions, i18n_descriptive, i18n_descriptiveText, i18n_descriptiveTextInstructionsItem, i18n_descriptiveTextInstructionsTemplate, i18n_disabledItems, i18n_disabledItemsInstructions, i18n_downloadAllowed, i18n_downloadAllowedInstructions, i18n_dropdown, i18n_dropdownConfiguration, i18n_dropdownItem, i18n_dropdownProperties, i18n_enabledAndDisabledItems, i18n_enabledItems, i18n_enabledItemsInstructions, i18n_exampleText, i18n_fileTypeId, i18n_fileTypeIdInstructions, i18n_fileUpload, i18n_fileUploadConfiguration, i18n_fileUploadItem, i18n_form, i18n_format, i18n_formatInstructions, i18n_formatTimeInstructions, i18n_fullWidth, i18n_fullWidthInstructions, i18n_group, i18n_groupItem, i18n_help, i18n_helpInstructions, i18n_internationalizedParagraphAnswer, i18n_internationalizedParagraphAnswerItem, i18n_internationalizedShortAnswer, i18n_internationalizedShortAnswerItem, i18n_item, i18n_items, i18n_itemsInstructions, i18n_label, i18n_labelInstructions, i18n_layout, i18n_layoutInstructions, i18n_listValue, i18n_maxCharCount, i18n_maxCharCountInstructions, i18n_maxOccurrances, i18n_maxOccurrancesInstructions, i18n_maxSelections, i18n_maxSelectionsInstructions, i18n_maxValue, i18n_maxValueInstructions, i18n_minCharCount, i18n_minCharCountInstructions, i18n_minOccurrances, i18n_minOccurrancesInstructions, i18n_minSelections, i18n_minSelectionsInstructions, i18n_minValue, i18n_minValueInstructions, i18n_multipleChoice, i18n_multipleChoiceConfiguration, i18n_multipleChoiceItem, i18n_name, i18n_nameInstructions, i18n_new, i18n_newItem, i18n_newListValue, i18n_newOption, i18n_newOptionTemplate, i18n_newTemplate, i18n_newTemplateItem, i18n_numberedListConfiguration, i18n_numberedListItem, i18n_numberedListItemInstructions, i18n_numericConfiguration, i18n_offsetDateRange, i18n_offsetDateRangeConfiguration, i18n_offsetDateRangeItem, i18n_option, i18n_optionInstructions, i18n_optionProperties, i18n_optionSubsetInstructions, i18n_optionSubsets, i18n_optionTemplate, i18n_optionTemplateInstructions, i18n_optionTemplateMap, i18n_optionTemplateMapInstructions, i18n_optionTemplates, i18n_options, i18n_optionsInstructions, i18n_orderedList, i18n_orderedListItem, i18n_paragraphAnswer, i18n_paragraphAnswerItem, i18n_positiveOnly, i18n_positiveOnlyInstructions, i18n_presetValue, i18n_presetValueInstructions, i18n_questionText, i18n_questionTextInstructions, i18n_rangeLimits, i18n_rangeLimitsInstructions, i18n_repeatable, i18n_repeatableItem, i18n_repeatableItemConfiguration, i18n_repeatableItemTemplateId, i18n_repeatableItemTemplateIdInstructions, i18n_required, i18n_requiredInstructions, i18n_section, i18n_sectionItem, i18n_selectAReference, i18n_selectAReferenceDialogTitle, i18n_settings, i18n_shortAnswer, i18n_shortAnswerItem, i18n_startingInstances, i18n_startingInstancesInstructions, i18n_template, i18n_templateItem, i18n_templateItemAnnotation, i18n_templateItemAnnotationInstructions, i18n_templateItemBasicSettings, i18n_templateItemHelp, i18n_templateItemHelpInstructions, i18n_templateItemInstructions, i18n_templateItemLabel, i18n_templateItemLabelInstructions, i18n_templateItemQuestionText, i18n_templateItemQuestionTextInstructions, i18n_templateItemRequired, i18n_templateItemRequiredInstructions, i18n_templateItems, i18n_templateItemsInstructions, i18n_templateItemsInstructionsGroup, i18n_text, i18n_textConfiguration, i18n_textInputConfiguration, i18n_textItem, i18n_textValue, i18n_textValueInstructions, i18n_time, i18n_timeInputConfiguration, i18n_timeItem, i18n_title, i18n_titleInstructions, i18n_titleInstructionsSection, i18n_titleItem, i18n_unorderedList, i18n_unorderedListItem, i18n_value, i18n_valueInstructions, i18n_values, i18n_valuesInstructions, i18n_verifyAcknowledgementDialogTitle, i18n_wholeNumberAnswer, i18n_wholeNumberAnswerItem, i18n_wholeNumberValue, i18n_yearQuarterRange, i18n_yearQuarterRangeConfiguration, i18n_yearQuarterRangeItem, initialTemplateFormState, instanceOfFormStep, instanceOfFormStepGroup, isFormControl, isFormGroup, isFormStepGroup, mapperItemToDesign, mapperRegistry, mapperToDesignRegistry, mergeBooleanItemTemplate, mergeExtendedTemplateOptionGroupItem, mergeFormOptionSelector, mergeFormOptionSelectors, mergeOptionTemplateMap, mergeTemplate, mergeTemplateItem, mergeTemplateItemBase, mergeTemplateItemGroup, mergeTemplateSection, optionGroupItemSectionDisplayNameMap, optionItemSectionDisplayNameMap, processConditionals, prop_item_acknowledgement, prop_item_additional_text, prop_item_annotation_enabled, prop_item_code_option, prop_item_description, prop_item_descriptive_text, prop_item_download_allowed, prop_item_exclude_print, prop_item_file_type_id, prop_item_format, prop_item_format_time, prop_item_full_width, prop_item_help, prop_item_item, prop_item_items, prop_item_label, prop_item_layout, prop_item_max_char, prop_item_max_occurrences, prop_item_max_selections, prop_item_max_value, prop_item_min_char, prop_item_min_occurrences, prop_item_min_selections, prop_item_min_value, prop_item_name, prop_item_option, prop_item_option_subsets, prop_item_option_template_map, prop_item_options, prop_item_positive_only, prop_item_preset_value, prop_item_question_text, prop_item_range_limits, prop_item_repeatable_item_template_id, prop_item_required, prop_item_starting_instances, prop_item_text, prop_item_title, prop_item_value, prop_item_values, prop_option_disabled_items, prop_option_enabled_items, prop_option_template, prop_template_descriptive_text, prop_template_items, prop_template_title, registerMapper, removeFromCondition, template, updateConditional, updateStepStatus, validationResultValidator, wfTemplateFormReducer };
11173
+ export { BOOLEAN_POTENTIAL_DESIGN, BULLETED_LIST_POTENTIAL_DESIGN, BaseFormStep, BooleanItemTemplateMapper, BulletedListItemTemplateMapper, CHECKBOX_POTENTIAL_DESIGN, COMPLEX_STANDARD, CUSTOM_MAT_DATE_FORMAT, CheckboxItemTemplateMapper, ChildStepActivePipe, ChildStepActivePipeModule, CoerceFormStepGroupPipe, CoerceFormStepGroupPipeModule, CoerceFormStepPipe, CoerceFormStepPipeModule, DASHED_DATE_DISPLAY_VALUE, DATE_DISPLAY_ENUM_VALUES, DATE_POTENTIAL_DESIGN, DECIMAL_ANSWER_POTENTIAL_DESIGN, DEFAULT_ERROR_MESSAGES, DOTTED_DATE_DISPLAY_VALUE, DROPDOWN_POTENTIAL_DESIGN, DateItemTemplateMapper, DropdownItemTemplateMapper, EURO_LONG_DATE_DISPLAY_VALUE, FILE_UPLOAD_POTENTIAL_DESIGN, FORM_OPTION_SELECTOR_POTENTIAL_DESIGN, FileUploadItemTemplateMapper, FormStep, FormStepGroup, GROUP_POTENTIAL_DESIGN, GROUP_POTENTIAL_DESIGN_LIST, GetActiveFormStepItemPipe, GetActiveFormStepItemPipeModule, GetI18nStringValueFromLocalePipe, GetI18nStringValueFromLocalePipeModule, GetI18nStringsValueFromLocalePipe, GetI18nStringsValueFromLocalePipeModule, GetProgressiveFormItemPipe, GetProgressiveFormItemPipeModule, GetStepAriaLabel, GetStepAriaLabelModule, I18N_PARAGRAPH_ANSWER_POTENTIAL_DESIGN, I18N_SHORT_ANSWER_POTENTIAL_DESIGN, I18nTextResponseItemTemplateMapper, ISO_8601_DATE_DISPLAY_VALUE, LAYOUT_COLUMN_DISPLAY_VALUE, LAYOUT_ENUM_VALUES, LAYOUT_ROW_DISPLAY_VALUE, LONG_DATE_DISPLAY_VALUE, MTNA_DEFAULT_USE_DISPLAY_VALUE, MTNA_WF_DEFAULT_YEAR_RANGE, MTNA_WF_EXPAND_COLLAPSE, MTNA_WF_FORM_ITEM_VALIDATION_RESULT_ERROR_NAME, MTNA_WF_ITEM_INJECTED_COMPONENTS, MTNA_WF_ITEM_WHITELIST, MTNA_WF_ITEM_WHITELIST_FACTORY, MTNA_WF_TEMPLATE_ITEM_INJECTED_COMPONENTS, MULTIPLE_CHOICE_POTENTIAL_DESIGN, MtnaFormModule, templateDesignCoreUtil as MtnaTemplateCoreDesign, templateDesignUtil as MtnaTemplateDesign, MtnaTemplateTransformationService, MtnaWfAcknowledgeDialogComponent, MtnaWfAcknowledgeDialogModule, MtnaWfApiService, MtnaWfBaseFormItemControl, MtnaWfBaseGroupItem, MtnaWfBaseParentValueItem, MtnaWfBaseSectionItem, MtnaWfBaseSingleSelectionParentValueItem, MtnaWfBaseTemplateItemComponent, MtnaWfBaseTemplateItemWithListComponent, MtnaWfBaseValueItem, MtnaWfBooleanComponent, MtnaWfBooleanItemTemplateComponent, MtnaWfBooleanItemTemplateModule, MtnaWfBooleanModule, MtnaWfCheckboxComponent, MtnaWfCheckboxItemTemplateComponent, MtnaWfCheckboxItemTemplateModule, MtnaWfCheckboxModule, MtnaWfCoerceDateItemPipe, MtnaWfCoerceDateItemPipeModule, MtnaWfCoerceFormControlPipe, MtnaWfCoerceFormControlPipeModule, MtnaWfCoerceFormGroupPipe, MtnaWfCoerceFormGroupPipeModule, MtnaWfDateComponent, MtnaWfDateItemTemplateComponent, MtnaWfDateItemTemplateModule, MtnaWfDateModule, MtnaWfDateQuarterPipe, MtnaWfDateQuarterPipeModule, MtnaWfDateRangeComponent, MtnaWfDateRangeModule, MtnaWfDecimalAnswerItemTemplateComponent, MtnaWfDecimalAnswerItemTemplateModule, MtnaWfDialogService, MtnaWfDropdownComponent, MtnaWfDropdownItemTemplateComponent, MtnaWfDropdownItemTemplateModule, MtnaWfDropdownModule, MtnaWfFileUploadComponent, MtnaWfFileUploadItemTemplateComponent, MtnaWfFileUploadItemTemplateModule, MtnaWfFileUploadModule, MtnaWfFilterHiddenItemsPipe, MtnaWfFilterHiddenItemsPipeModule, MtnaWfFormComponent, MtnaWfFormDisablerComponent, MtnaWfFormDisablerModule, MtnaWfFormGroupComponent, MtnaWfFormGroupModule, MtnaWfFormItemComponent, MtnaWfFormItemDialogComponent, MtnaWfFormItemDialogData, MtnaWfFormItemDialogModule, MtnaWfFormItemModule, MtnaWfFormSectionComponent, MtnaWfFormSectionModule, MtnaWfFormStepComponent, MtnaWfFormStepGroupComponent, MtnaWfFormStepGroupPipe, MtnaWfFormStepGroupPipeModule, MtnaWfFormStepperComponent, MtnaWfFormStepperModule, MtnaWfGetAutoCompletePipe, MtnaWfGetAutoCompletePipeModule, MtnaWfGetAvailableQuartersPipe, MtnaWfGetAvailableQuartersPipeModule, MtnaWfGetFormControlErrorPipe, MtnaWfGetFormControlErrorPipeModule, MtnaWfGetListIconPipe, MtnaWfGetListIconPipeModule, MtnaWfGetObjectTypePipe, MtnaWfGetObjectTypePipeModule, MtnaWfGetSelectedOptionNamePipe, MtnaWfGetSelectedOptionNamePipeModule, MtnaWfI18nInputComponent, MtnaWfI18nInputModule, MtnaWfI18nParagraphAnswerItemTemplateComponent, MtnaWfI18nParagraphAnswerItemTemplateModule, MtnaWfI18nShortAnswerItemTemplateComponent, MtnaWfI18nShortAnswerItemTemplateModule, MtnaWfInputComponent, MtnaWfInputModule, MtnaWfInstanceOfTemplateImplPipe, MtnaWfInstanceOfTemplateImplPipeModule, MtnaWfInstanceOfTemplateItemGroupImplPipe, MtnaWfInstanceOfTemplateItemGroupImplPipeModule, MtnaWfInstanceOfTemplateItemPipe, MtnaWfInstanceOfTemplateItemPipeModule, MtnaWfInstantValidationResultErrorStateMatcher, MtnaWfItemComponentProvider, MtnaWfItemHeaderComponent, MtnaWfItemHeaderModule, MtnaWfItemInjector, MtnaWfItemInjectorModule, MtnaWfItemsWithValuePipe, MtnaWfItemsWithValuePipeModule, MtnaWfManagerService, MtnaWfMultipleChoiceComponent, MtnaWfMultipleChoiceItemTemplateComponent, MtnaWfMultipleChoiceItemTemplateModule, MtnaWfMultipleChoiceModule, MtnaWfNgFormService, MtnaWfOffsetDateRangeItemTemplateComponent, MtnaWfOffsetDateRangeItemTemplateModule, MtnaWfOrderedListItemComponent, MtnaWfOrderedListItemModule, MtnaWfOrderedListItemTemplateComponent, MtnaWfOrderedListItemTemplateModule, MtnaWfParagraphAnswerItemTemplateComponent, MtnaWfParagraphAnswerItemTemplateModule, MtnaWfProgressiveFormComponent, MtnaWfProgressiveFormModule, MtnaWfRepeatableItemComponent, MtnaWfRepeatableItemContainerComponent, MtnaWfRepeatableItemContainerModule, MtnaWfRepeatableItemModule, MtnaWfRepeatableItemTemplateComponent, MtnaWfRepeatableItemTemplateContainerComponent, MtnaWfRepeatableItemTemplateContainerModule, MtnaWfRepeatableItemTemplateModule, MtnaWfResourceSearchComponent, MtnaWfResourceSearchModule, MtnaWfResourceSearchSelectionService, MtnaWfSanitizeHtmlPipe, MtnaWfSanitizeHtmlPipeModule, serializerUtil as MtnaWfSerializer, MtnaWfShortAnswerItemTemplateComponent, MtnaWfShortAnswerItemTemplateModule, MtnaWfStepCardComponent, MtnaWfStepCardModule, MtnaWfTableFormItemComponent, MtnaWfTableFormItemModule, MtnaWfTemplateComponent, MtnaWfTemplateDisplayViewerComponent, MtnaWfTemplateDisplayViewerModule, MtnaWfTemplateItemComponent, MtnaWfTemplateItemComponentProvider, MtnaWfTemplateItemGroupComponent, MtnaWfTemplateItemGroupModule, MtnaWfTemplateItemHeaderComponent, MtnaWfTemplateItemHeaderModule, MtnaWfTemplateItemInjector, MtnaWfTemplateItemInjectorModule, MtnaWfTemplateItemModule, MtnaWfTemplateModule, MtnaWfTemplateSectionComponent, MtnaWfTemplateSectionModule, MtnaWfTextItemComponent, MtnaWfTextItemModule, MtnaWfTextItemTemplateComponent, MtnaWfTextItemTemplateModule, MtnaWfTitleItemComponent, MtnaWfTitleItemModule, MtnaWfTitleItemTemplateComponent, MtnaWfTitleItemTemplateModule, MtnaWfUIService, MtnaWfUnorderedListItemComponent, MtnaWfUnorderedListItemModule, MtnaWfUnorderedListItemTemplateComponent, MtnaWfUnorderedListItemTemplateModule, MtnaWfWholeNumberAnswerItemTemplateComponent, MtnaWfWholeNumberAnswerItemTemplateModule, MtnaWfYearQuarterComponent, MtnaWfYearQuarterItemTemplateComponent, MtnaWfYearQuarterItemTemplateModule, MtnaWfYearQuarterModule, MtnaWfYearQuarterRangeComponent, MtnaWfYearQuarterRangeItemTemplateComponent, MtnaWfYearQuarterRangeItemTemplateModule, MtnaWfYearQuarterRangeModule, MultipleChoiceItemTemplateMapper, NUMBERED_LIST_POTENTIAL_DESIGN, NumberedListItemTemplateMapper, NumericResponseItemTemplateMapper, OFFSET_DATE_RANGE_POTENTIAL_DESIGN, OPTION_SELECTOR_POTENTIAL_DESIGN_LIST, OffsetDateRangeTemplateMapper, OptionGroupItemMapper, OptionItemMapper, OptionSelectorMapper, PARAGRAPH_ANSWER_POTENTIAL_DESIGN, QUARTER_FOUR_DISPLAY_VALUE, QUARTER_ONE_DISPLAY_VALUE, QUARTER_RANGE_ENUM_VALUES, QUARTER_THREE_DISPLAY_VALUE, QUARTER_TWO_DISPLAY_VALUE, REPEATABLE_POTENTIAL_DESIGN, RepeatableItemTemplateMapper, SECTION_POTENTIAL_DESIGN, SECTION_POTENTIAL_DESIGN_LIST, SHORT_ANSWER_POTENTIAL_DESIGN, SLASHED_DATE_DISPLAY_VALUE, TEMPLATE_FORM_STATE_KEY, TEMPLATE_POTENTIAL_DESIGN_LIST, TEXT_POTENTIAL_DESIGN, TITLE_POTENTIAL_DESIGN, TemplateDesignFacade, templateForm_actions as TemplateFormActions, templateFormApi_actions as TemplateFormApiActions, TemplateFormEffects, TemplateFormFacade, templateForm_selectors as TemplateFormSelectors, TemplateItemGroupMapper, TemplateItemMapper, TemplateMapper, TemplateSectionMapper, TextItemTemplateMapper, TextResponseItemTemplateMapper, TimeItemTemplateMapper, TitleItemTemplateMapper, UnavailableTemplateItemNameMap, WEB_FORM_CUSTOM_ERRORS, WHOLE_NUMBER_ANSWER_POTENTIAL_DESIGN, YEAR_QUARTER_RANGE_POTENTIAL_DESIGN, YearQuarterRangeItemTemplateMapper, deactivateStep, everyStepStatus, findFormControl, findFormItem, flattenConditionalItems, flattenSteps, form, generateFormSteps, generateFormStepsFromOutline, getConditionalProcessingResources, getEnumDesignProperty, getItemClassSuffix, getItemMapperFromDesign, getModelMap, getModelToDesign, getTemplateMapperFromDesign$1 as getTemplateMapperFromDesign, getTypeDisplay, hasCondition, i18n_acknowledgement, i18n_acknowledgementDialogTitle, i18n_acknowledgementInstructions, i18n_additionalText, i18n_additionalTextInstructions, i18n_annotationEnabled, i18n_annotationEnabledInstructions, i18n_boolean, i18n_booleanConfiguration, i18n_booleanItem, i18n_booleanItemDescription, i18n_bulletedListConfiguration, i18n_bulletedListItem, i18n_bulletedListItemDescription, i18n_bulletedListItemInstructions, i18n_checkbox, i18n_checkboxConfiguration, i18n_checkboxItem, i18n_checkboxItemDescription, i18n_childItems, i18n_codeOption, i18n_codeOptionInstructions, i18n_column, i18n_conditionAllRequired, i18n_conditionAllRequiredInstructions, i18n_conditionItemIds, i18n_conditionItemIdsInstructions, i18n_conditions, i18n_core, i18n_date, i18n_dateConfiguration, i18n_dateFormat, i18n_dateFormatInstructions, i18n_dateItem, i18n_dateItemDescription, i18n_decimalAnswer, i18n_decimalAnswerItem, i18n_decimalAnswerItemDescription, i18n_decimalValue, i18n_description, i18n_descriptionInstructions, i18n_descriptive, i18n_descriptiveText, i18n_descriptiveTextInstructionsItem, i18n_descriptiveTextInstructionsTemplate, i18n_disabledItems, i18n_disabledItemsInstructions, i18n_downloadAllowed, i18n_downloadAllowedInstructions, i18n_dropdown, i18n_dropdownConfiguration, i18n_dropdownItem, i18n_dropdownItemDescription, i18n_dropdownProperties, i18n_enabledAndDisabledItems, i18n_enabledItems, i18n_enabledItemsInstructions, i18n_endQuarter, i18n_endQuarterInstructions, i18n_endYear, i18n_endYearInstructions, i18n_exampleText, i18n_fileTypeId, i18n_fileTypeIdInstructions, i18n_fileUpload, i18n_fileUploadConfiguration, i18n_fileUploadItem, i18n_fileUploadItemDescription, i18n_form, i18n_format, i18n_formatInstructions, i18n_formatTimeInstructions, i18n_fullWidth, i18n_fullWidthInstructions, i18n_group, i18n_groupItem, i18n_groupItemDescription, i18n_help, i18n_helpInstructions, i18n_internationalizedParagraphAnswer, i18n_internationalizedParagraphAnswerItem, i18n_internationalizedParagraphAnswerItemDescription, i18n_internationalizedShortAnswer, i18n_internationalizedShortAnswerItem, i18n_internationalizedShortAnswerItemDescription, i18n_item, i18n_items, i18n_itemsInstructions, i18n_label, i18n_labelInstructions, i18n_layout, i18n_layoutInstructions, i18n_listValue, i18n_maxCharCount, i18n_maxCharCountInstructions, i18n_maxOccurrances, i18n_maxOccurrancesInstructions, i18n_maxSelections, i18n_maxSelectionsInstructions, i18n_maxValue, i18n_maxValueInstructions, i18n_minCharCount, i18n_minCharCountInstructions, i18n_minOccurrances, i18n_minOccurrancesInstructions, i18n_minSelections, i18n_minSelectionsInstructions, i18n_minValue, i18n_minValueInstructions, i18n_multipleChoice, i18n_multipleChoiceConfiguration, i18n_multipleChoiceItem, i18n_multipleChoiceItemDescription, i18n_name, i18n_nameInstructions, i18n_new, i18n_newItem, i18n_newListValue, i18n_newOption, i18n_newOptionDescription, i18n_newOptionTemplate, i18n_newTemplate, i18n_newTemplateItem, i18n_numberedListConfiguration, i18n_numberedListItem, i18n_numberedListItemDescription, i18n_numberedListItemInstructions, i18n_numericConfiguration, i18n_offsetDateRange, i18n_offsetDateRangeConfiguration, i18n_offsetDateRangeItem, i18n_offsetDateRangeItemDescription, i18n_option, i18n_optionInstructions, i18n_optionProperties, i18n_optionSubsetInstructions, i18n_optionSubsets, i18n_optionTemplate, i18n_optionTemplateInstructions, i18n_optionTemplateMap, i18n_optionTemplateMapInstructions, i18n_optionTemplates, i18n_options, i18n_optionsInstructions, i18n_orderedList, i18n_orderedListItem, i18n_paragraphAnswer, i18n_paragraphAnswerItem, i18n_paragraphAnswerItemDescription, i18n_positiveOnly, i18n_positiveOnlyInstructions, i18n_presetValue, i18n_presetValueInstructions, i18n_quarterFour, i18n_quarterOne, i18n_quarterThree, i18n_quarterTwo, i18n_questionText, i18n_questionTextInstructions, i18n_rangeLimits, i18n_rangeLimitsInstructions, i18n_repeatable, i18n_repeatableItem, i18n_repeatableItemConfiguration, i18n_repeatableItemDescription, i18n_repeatableItemTemplateId, i18n_repeatableItemTemplateIdInstructions, i18n_required, i18n_requiredInstructions, i18n_row, i18n_section, i18n_sectionDescription, i18n_sectionItem, i18n_sectionStepName, i18n_sectionStepNameInstructions, i18n_sectionTitleItem, i18n_selectAReference, i18n_selectAReferenceDialogTitle, i18n_settings, i18n_shortAnswer, i18n_shortAnswerItem, i18n_shortAnswerItemDescription, i18n_startQuarter, i18n_startQuarterInstructions, i18n_startYear, i18n_startYearInstructions, i18n_startingInstances, i18n_startingInstancesInstructions, i18n_template, i18n_templateItem, i18n_templateItemAnnotation, i18n_templateItemAnnotationInstructions, i18n_templateItemBasicSettings, i18n_templateItemHelp, i18n_templateItemHelpInstructions, i18n_templateItemInstructions, i18n_templateItemLabel, i18n_templateItemLabelInstructions, i18n_templateItemQuestionText, i18n_templateItemQuestionTextInstructions, i18n_templateItemRequired, i18n_templateItemRequiredInstructions, i18n_templateItems, i18n_templateItemsInstructions, i18n_templateItemsInstructionsGroup, i18n_text, i18n_textConfiguration, i18n_textInputConfiguration, i18n_textItem, i18n_textItemDescription, i18n_textValue, i18n_textValueInstructions, i18n_time, i18n_timeInputConfiguration, i18n_timeItem, i18n_title, i18n_titleInstructions, i18n_titleInstructionsSection, i18n_titleItem, i18n_titleItemDescription, i18n_unorderedList, i18n_unorderedListItem, i18n_value, i18n_valueInstructions, i18n_values, i18n_valuesInstructions, i18n_verifyAcknowledgementDialogTitle, i18n_wholeNumberAnswer, i18n_wholeNumberAnswerItem, i18n_wholeNumberAnswerItemDescription, i18n_wholeNumberValue, i18n_yearQuarterRange, i18n_yearQuarterRangeConfiguration, i18n_yearQuarterRangeItem, i18n_yearQuarterRangeItemDescription, initialTemplateFormState, instanceOfFormStep, instanceOfFormStepGroup, isEmptyString, isFormControl, isFormGroup, isFormStepGroup, isTemplateDesign, isTemplateItem, isTemplateItemDesign, itemToDesignBase, mapperItemToDesign, mapperRegistry, mapperTemplateToDesign, mapperToDesignRegistry, mergeBooleanItemTemplate, mergeExtendedTemplateOptionGroupItem, mergeFormOptionSelector, mergeFormOptionSelectors, mergeOptionTemplateMap, mergeTemplate, mergeTemplateItem, mergeTemplateItemBase, mergeTemplateItemGroup, mergeTemplateSection, numValueLimit, numericalValueCheck, optionGroupItemSectionDisplayNameMap, optionItemSectionDisplayNameMap, positiveNumberPattern, processConditionals, prop_item_acknowledgementTemplate, prop_item_additional_text, prop_item_annotation_enabled, prop_item_code_option, prop_item_condition_allRequired, prop_item_condition_itemIds, prop_item_description, prop_item_descriptive_text, prop_item_download_allowed, prop_item_endQuarter, prop_item_endYear, prop_item_exclude_print, prop_item_file_type_id, prop_item_format, prop_item_format_time, prop_item_full_width, prop_item_help, prop_item_item, prop_item_items, prop_item_label, prop_item_layout, prop_item_max_char, prop_item_max_occurrences, prop_item_max_selections, prop_item_max_value, prop_item_min_char, prop_item_min_occurrences, prop_item_min_selections, prop_item_min_value, prop_item_name, prop_item_option, prop_item_option_subsets, prop_item_option_template_map, prop_item_options, prop_item_positive_only, prop_item_preset_value, prop_item_question_text, prop_item_range_limits, prop_item_repeatable_item_template_id, prop_item_required, prop_item_startQuarter, prop_item_startYear, prop_item_starting_instances, prop_item_text, prop_item_title, prop_item_value, prop_item_values, prop_option_disabled_items, prop_option_enabled_items, prop_option_template, prop_template_descriptive_text, prop_template_items, prop_template_title, registerMapper, registerTemplateMapper, removeFromCondition, template, templateMapperRegistry, templateMapperToDesignRegistry, updateConditional, updateStepStatus, validationResultValidator, wfTemplateFormReducer, wholeNumberPattern };
10481
11174
  //# sourceMappingURL=mtna-web-form-angular.js.map