@jooler/inputs 0.0.49 → 0.0.51

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 (89) hide show
  1. package/{esm2020 → esm2022}/inputs.mjs +4 -4
  2. package/esm2022/lib/add-asterisk.directive.mjs +42 -0
  3. package/esm2022/lib/choose-enum/choose-enum.component.mjs +190 -0
  4. package/esm2022/lib/choose-enum-renderer/choose-enum-renderer.component.mjs +31 -0
  5. package/esm2022/lib/choose-general-item/choose-general-item.component.mjs +149 -0
  6. package/esm2022/lib/choose-general-item/choose-general-item.service.mjs +45 -0
  7. package/esm2022/lib/choose-general-item-renderer/choose-general-item-renderer.component.mjs +37 -0
  8. package/esm2022/lib/choose-line-type/choose-line-type.component.mjs +53 -0
  9. package/esm2022/lib/choose-yes-or-no/choose-yes-or-no.component.mjs +69 -0
  10. package/esm2022/lib/choose-yes-or-no-renderer/choose-yes-or-no-renderer.component.mjs +33 -0
  11. package/esm2022/lib/custom-theme.mjs +104 -0
  12. package/{esm2020 → esm2022}/lib/dropdown-actions/dropdown-action-type.model.mjs +5 -5
  13. package/esm2022/lib/dropdown-actions/dropdown-actions.component.mjs +75 -0
  14. package/{esm2020 → esm2022}/lib/dropdown-actions/label-and-route.model.mjs +1 -1
  15. package/{esm2020 → esm2022}/lib/editable-savable-input/dynamicPipe.mjs +20 -20
  16. package/{esm2020 → esm2022}/lib/editable-savable-input/dynamicPipeMapping.mjs +4 -4
  17. package/esm2022/lib/editable-savable-input/editable-savable-input.component.mjs +128 -0
  18. package/esm2022/lib/formcontrol-validation-msg.directive.mjs +150 -0
  19. package/esm2022/lib/general-input-renderer/custom-decimal-point-two-digits.directive.mjs +63 -0
  20. package/esm2022/lib/general-input-renderer/general-input-renderer.component.mjs +50 -0
  21. package/{esm2020 → esm2022}/lib/inputs.module.mjs +122 -122
  22. package/esm2022/lib/models/enum-helper-functions.mjs +57 -0
  23. package/esm2022/lib/models/enum-helper.model.mjs +2 -0
  24. package/{esm2020 → esm2022}/lib/models/label-and-field.model.mjs +5 -3
  25. package/esm2022/lib/models/line-type-model-helper.mjs +51 -0
  26. package/{esm2020 → esm2022}/lib/models/line-type.model.mjs +5 -5
  27. package/esm2022/lib/models/yes-or-no.model.mjs +6 -0
  28. package/esm2022/lib/primary-colors.mjs +12 -0
  29. package/esm2022/lib/services/validation-message.service.mjs +111 -0
  30. package/esm2022/lib/show-table-errors/show-table-errors.component.mjs +25 -0
  31. package/{esm2020 → esm2022}/public-api.mjs +23 -23
  32. package/{fesm2020 → fesm2022}/inputs.mjs +1482 -1371
  33. package/fesm2022/inputs.mjs.map +1 -0
  34. package/index.d.ts +5 -5
  35. package/lib/add-asterisk.directive.d.ts +12 -12
  36. package/lib/choose-enum/choose-enum.component.d.ts +52 -51
  37. package/lib/choose-enum-renderer/choose-enum-renderer.component.d.ts +15 -15
  38. package/lib/choose-general-item/choose-general-item.component.d.ts +49 -49
  39. package/lib/choose-general-item/choose-general-item.service.d.ts +18 -18
  40. package/lib/choose-general-item-renderer/choose-general-item-renderer.component.d.ts +15 -15
  41. package/lib/choose-line-type/choose-line-type.component.d.ts +19 -19
  42. package/lib/choose-yes-or-no/choose-yes-or-no.component.d.ts +24 -24
  43. package/lib/choose-yes-or-no-renderer/choose-yes-or-no-renderer.component.d.ts +16 -16
  44. package/lib/custom-theme.d.ts +8 -7
  45. package/lib/dropdown-actions/dropdown-action-type.model.d.ts +4 -4
  46. package/lib/dropdown-actions/dropdown-actions.component.d.ts +22 -22
  47. package/lib/dropdown-actions/label-and-route.model.d.ts +4 -4
  48. package/lib/editable-savable-input/dynamicPipe.d.ts +7 -7
  49. package/lib/editable-savable-input/dynamicPipeMapping.d.ts +5 -5
  50. package/lib/editable-savable-input/editable-savable-input.component.d.ts +37 -37
  51. package/lib/formcontrol-validation-msg.directive.d.ts +25 -25
  52. package/lib/general-input-renderer/custom-decimal-point-two-digits.directive.d.ts +13 -13
  53. package/lib/general-input-renderer/general-input-renderer.component.d.ts +15 -15
  54. package/lib/inputs.module.d.ts +29 -29
  55. package/lib/models/enum-helper-functions.d.ts +5 -4
  56. package/lib/models/enum-helper.model.d.ts +6 -0
  57. package/lib/models/label-and-field.model.d.ts +4 -4
  58. package/lib/models/line-type-model-helper.d.ts +12 -12
  59. package/lib/models/line-type.model.d.ts +4 -4
  60. package/lib/models/yes-or-no.model.d.ts +5 -5
  61. package/lib/primary-colors.d.ts +11 -11
  62. package/lib/services/validation-message.service.d.ts +50 -50
  63. package/lib/show-table-errors/show-table-errors.component.d.ts +11 -11
  64. package/package.json +10 -16
  65. package/public-api.d.ts +20 -20
  66. package/esm2020/lib/add-asterisk.directive.mjs +0 -41
  67. package/esm2020/lib/choose-enum/choose-enum.component.mjs +0 -175
  68. package/esm2020/lib/choose-enum-renderer/choose-enum-renderer.component.mjs +0 -26
  69. package/esm2020/lib/choose-general-item/choose-general-item.component.mjs +0 -133
  70. package/esm2020/lib/choose-general-item/choose-general-item.service.mjs +0 -43
  71. package/esm2020/lib/choose-general-item-renderer/choose-general-item-renderer.component.mjs +0 -32
  72. package/esm2020/lib/choose-line-type/choose-line-type.component.mjs +0 -52
  73. package/esm2020/lib/choose-yes-or-no/choose-yes-or-no.component.mjs +0 -69
  74. package/esm2020/lib/choose-yes-or-no-renderer/choose-yes-or-no-renderer.component.mjs +0 -27
  75. package/esm2020/lib/custom-theme.mjs +0 -82
  76. package/esm2020/lib/dropdown-actions/dropdown-actions.component.mjs +0 -72
  77. package/esm2020/lib/editable-savable-input/editable-savable-input.component.mjs +0 -123
  78. package/esm2020/lib/formcontrol-validation-msg.directive.mjs +0 -144
  79. package/esm2020/lib/general-input-renderer/custom-decimal-point-two-digits.directive.mjs +0 -61
  80. package/esm2020/lib/general-input-renderer/general-input-renderer.component.mjs +0 -45
  81. package/esm2020/lib/models/enum-helper-functions.mjs +0 -53
  82. package/esm2020/lib/models/line-type-model-helper.mjs +0 -47
  83. package/esm2020/lib/models/yes-or-no.model.mjs +0 -3
  84. package/esm2020/lib/primary-colors.mjs +0 -12
  85. package/esm2020/lib/services/validation-message.service.mjs +0 -106
  86. package/esm2020/lib/show-table-errors/show-table-errors.component.mjs +0 -23
  87. package/fesm2015/inputs.mjs +0 -1448
  88. package/fesm2015/inputs.mjs.map +0 -1
  89. package/fesm2020/inputs.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, forwardRef, Component, Output, Input, Injectable, Inject, Pipe, Directive, HostListener, NgModule } from '@angular/core';
2
+ import { EventEmitter, forwardRef, Component, Input, Output, Injectable, Inject, Pipe, Directive, HostListener, NgModule } from '@angular/core';
3
3
  import * as i2$1 from '@angular/forms';
4
4
  import { NG_VALUE_ACCESSOR, NgModel, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i1 from '@angular/common';
@@ -17,1427 +17,1538 @@ import { AppMaterialModule } from '@jooler/app-material';
17
17
  import * as i1$2 from '@angular/router';
18
18
  import * as i3$1 from '@angular/material/menu';
19
19
 
20
- class CustomTheme {
21
- }
22
- CustomTheme.$joolerBlue = [
23
- '#e3ecfa',
24
- '#b9cff2',
25
- '#8aafea',
26
- '#5b8ee1',
27
- '#3876da',
28
- '#155ed4',
29
- '#1256cf',
30
- '#0f4cc9',
31
- '#0c42c3',
32
- '#0631b9',
33
- '#e3e8ff',
34
- '#b0bfff',
35
- '#7d95ff',
36
- '#6481ff',
37
- ];
38
- CustomTheme.$joolerTeal = [
39
- '#b8dfd8',
40
- '#89cabf',
41
- '#59b5a5',
42
- '#36a591',
43
- '#12957e',
44
- '#108d76',
45
- '#0d826b',
46
- '#0a7861',
47
- '#05674e',
48
- '#97ffe1',
49
- '#64ffd2',
50
- '#31ffc3',
51
- '#18ffbc',
52
- ];
53
- CustomTheme.$joolerRed = [
54
- '#f5e0e1',
55
- '#e5b3b3',
56
- '#d48081',
57
- '#c24d4e',
58
- '#b52628',
59
- '#a80002',
60
- '#a00002',
61
- '#970001',
62
- '#8d0001',
63
- '#7d0001',
64
- '#ffaaaa',
65
- '#ff7777',
66
- '#ff4444',
67
- '#ff2a2a',
68
- ];
69
- CustomTheme.$joolerPink = [
70
- '#fdeaf3',
71
- '#fbcbe1',
72
- '#f8a8ce',
73
- '#f585ba',
74
- '#f26aab',
75
- '#f0509c',
76
- '#ee4994',
77
- '#ec408a',
78
- '#e93780',
79
- '#e5276e',
80
- '#ffffff',
81
- '#ffeef4',
82
- '#ffbbd3',
83
- '#ffa1c2',
84
- ];
85
- CustomTheme.$joolerPurple = [
86
- '#fcf6fd',
87
- '#f7e8f9',
88
- '#f1d8f5',
89
- '#ebc8f1',
90
- '#e7bdee',
91
- '#e3b1eb',
92
- '#e0aae9',
93
- '#dca1e5',
94
- '#d898e2',
95
- '#d088dd',
96
- '#ffffff',
97
- '#ffffff',
98
- '#ffffff',
99
- '#fcecff',
100
- ];
20
+ class CustomTheme {
21
+ static $joolerBlue = [
22
+ '#e3ecfa',
23
+ '#b9cff2',
24
+ '#8aafea',
25
+ '#5b8ee1',
26
+ '#3876da',
27
+ '#155ed4',
28
+ '#1256cf',
29
+ '#0f4cc9',
30
+ '#0c42c3',
31
+ '#0631b9',
32
+ '#e3e8ff',
33
+ '#b0bfff',
34
+ '#7d95ff',
35
+ '#6481ff',
36
+ ];
37
+ static $joolerTeal = [
38
+ '#b8dfd8',
39
+ '#89cabf',
40
+ '#59b5a5',
41
+ '#36a591',
42
+ '#12957e',
43
+ '#108d76',
44
+ '#0d826b',
45
+ '#0a7861',
46
+ '#05674e',
47
+ '#97ffe1',
48
+ '#64ffd2',
49
+ '#31ffc3',
50
+ '#18ffbc',
51
+ ];
52
+ static $joolerRed = [
53
+ '#f5e0e1',
54
+ '#e5b3b3',
55
+ '#d48081',
56
+ '#c24d4e',
57
+ '#b52628',
58
+ '#a80002',
59
+ '#a00002',
60
+ '#970001',
61
+ '#8d0001',
62
+ '#7d0001',
63
+ '#ffaaaa',
64
+ '#ff7777',
65
+ '#ff4444',
66
+ '#ff2a2a',
67
+ ];
68
+ static $joolerPink = [
69
+ '#fdeaf3',
70
+ '#fbcbe1',
71
+ '#f8a8ce',
72
+ '#f585ba',
73
+ '#f26aab',
74
+ '#f0509c',
75
+ '#ee4994',
76
+ '#ec408a',
77
+ '#e93780',
78
+ '#e5276e',
79
+ '#ffffff',
80
+ '#ffeef4',
81
+ '#ffbbd3',
82
+ '#ffa1c2',
83
+ ];
84
+ static $joolerPurple = [
85
+ '#fcf6fd',
86
+ '#f7e8f9',
87
+ '#f1d8f5',
88
+ '#ebc8f1',
89
+ '#e7bdee',
90
+ '#e3b1eb',
91
+ '#e0aae9',
92
+ '#dca1e5',
93
+ '#d898e2',
94
+ '#d088dd',
95
+ '#ffffff',
96
+ '#ffffff',
97
+ '#ffffff',
98
+ '#fcecff',
99
+ ];
100
+ static $joolerCombo = [
101
+ '#b9cff2',
102
+ '#b8dfd8',
103
+ '#ffaaaa',
104
+ '#fbcbe1',
105
+ '#f1d8f5',
106
+ '#8aafea',
107
+ '#97ffe1',
108
+ '#ff7777',
109
+ '#f585ba',
110
+ '#e7bdee',
111
+ '#6481ff',
112
+ '#18ffbc',
113
+ '#ff4444',
114
+ '#ffa1c2',
115
+ '#e0aae9',
116
+ '#1256cf',
117
+ '#108d76',
118
+ '#df0000',
119
+ '#ec408a',
120
+ '#d088dd',
121
+ ];
122
+ }
101
123
 
102
- class EnumHelperBaseClass {
103
- static getValuesArrayFromEnum(enumOptions, isAllCaps) {
104
- let colors = CustomTheme.$joolerBlue;
105
- let stringValues = [];
106
- let enumObject;
107
- let enumObjects = [];
108
- for (let item in enumOptions) {
109
- if (isNaN(Number(item))) {
110
- let joinedString;
111
- stringValues.push(item);
112
- let splitStr = item.toLowerCase().split('_');
113
- if (!isAllCaps) {
114
- for (let i = 0; i < splitStr.length; i++) {
115
- splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
116
- }
117
- }
118
- else {
119
- for (let i = 0; i < splitStr.length; i++) {
120
- splitStr[i] = splitStr[i].toUpperCase();
121
- }
122
- }
123
- joinedString = splitStr.join(' ');
124
- stringValues.splice(stringValues.indexOf(item), 1, joinedString);
125
- }
126
- }
127
- let repeatedColors = [];
128
- let i = 0;
129
- for (let value of stringValues) {
130
- // in case the array of colors is smaller than the stringValues array, we repeat the the colors so that they are enough
131
- repeatedColors.push(colors[stringValues.indexOf(value) % colors.length]);
132
- enumObject = {
133
- value: Object.keys(enumOptions).map(Number)[i],
134
- label: value,
135
- color: repeatedColors[i],
136
- };
137
- enumObjects.push(enumObject);
138
- i++;
139
- }
140
- return enumObjects;
141
- }
142
- static getLabelAndColorFromEnumValue(enumOptions, enumValue) {
143
- let enumObjects = EnumHelperBaseClass.getValuesArrayFromEnum(enumOptions);
144
- let enumObject;
145
- for (let item of enumObjects) {
146
- if (enumValue == item.value) {
147
- enumObject = enumObjects[enumObjects.indexOf(item)];
148
- }
149
- }
150
- return enumObject;
151
- }
124
+ class EnumHelperBaseClass {
125
+ static getEnumOptionsFromEnumClass(enumClass, customColors, isAllCaps) {
126
+ let colors = CustomTheme.$joolerCombo;
127
+ if (customColors && customColors.length > 0) {
128
+ colors = customColors;
129
+ }
130
+ let stringValues = [];
131
+ let enumOption;
132
+ let enumOptions = [];
133
+ for (let item in enumClass) {
134
+ if (isNaN(Number(item))) {
135
+ let joinedString;
136
+ stringValues.push(item);
137
+ let splitStr = item.toLowerCase().split('_');
138
+ if (!isAllCaps) {
139
+ for (let i = 0; i < splitStr.length; i++) {
140
+ splitStr[i] =
141
+ splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
142
+ }
143
+ }
144
+ else {
145
+ for (let i = 0; i < splitStr.length; i++) {
146
+ splitStr[i] = splitStr[i].toUpperCase();
147
+ }
148
+ }
149
+ joinedString = splitStr.join(' ');
150
+ stringValues.splice(stringValues.indexOf(item), 1, joinedString);
151
+ }
152
+ }
153
+ let repeatedColors = [];
154
+ let i = 0;
155
+ for (let label of stringValues) {
156
+ // in case the array of colors is smaller than the stringValues array, we repeat the the colors so that they are enough
157
+ repeatedColors.push(colors[stringValues.indexOf(label) % colors.length]);
158
+ enumOption = {
159
+ value: Object.keys(enumClass).map(Number)[i],
160
+ label: label,
161
+ color: repeatedColors[i],
162
+ };
163
+ enumOptions.push(enumOption);
164
+ i++;
165
+ }
166
+ return enumOptions;
167
+ }
168
+ static getLabelAndColorFromEnumValue(enumClass, enumValue, customColors) {
169
+ let enumOptions = EnumHelperBaseClass.getEnumOptionsFromEnumClass(enumClass, customColors);
170
+ let enumOption;
171
+ for (let item of enumOptions) {
172
+ if (enumValue == item.value) {
173
+ enumOption = enumOptions[enumOptions.indexOf(item)];
174
+ }
175
+ }
176
+ return enumOption;
177
+ }
152
178
  }
153
179
 
154
- class ChooseEnumComponent {
155
- constructor() {
156
- this.change = new EventEmitter();
157
- this.close = new EventEmitter();
158
- this.label = 'label';
159
- this.appendTo = 'body';
160
- this.allowAllCapsValues = false;
161
- this.getValuesArrayFromEnum = EnumHelperBaseClass.getValuesArrayFromEnum;
162
- this.isChip = true;
163
- this.labelTextAlign = 'left';
164
- this.indexesToDisable = [];
165
- this.isDropdownDisabled = false;
166
- this.percentWidth = false;
167
- this.clearable = true;
168
- this.colors = [];
169
- this.propagateChange = (_) => { };
170
- this.propogateTouch = () => { };
171
- }
172
- ngOnChanges() {
173
- if (this.getValuesArrayFromEnum != null) {
174
- this.items = this.getValuesArrayFromEnum(this.enumChoices, this.allowAllCapsValues);
175
- }
176
- if (this.isItemDisabled == true) {
177
- if (this.indexesToDisable.length > 0) {
178
- for (let index of this.indexesToDisable) {
179
- this.items[index].disabled = true;
180
- }
181
- }
182
- }
183
- if (this.isItemHidden == true) {
184
- if (this.indexesToDisable.length > 0) {
185
- for (let index of this.indexesToDisable) {
186
- let itemIndex = this.items.findIndex(item => item.value == index);
187
- this.items.splice(itemIndex, 1);
188
- }
189
- }
190
- }
191
- }
192
- ngOnInit() {
193
- if (this.getValuesArrayFromEnum != null) {
194
- this.items = this.getValuesArrayFromEnum(this.enumChoices, this.allowAllCapsValues);
195
- }
196
- if (this.isItemDisabled == true) {
197
- if (this.indexesToDisable.length > 0) {
198
- for (let index of this.indexesToDisable) {
199
- this.items[index].disabled = true;
200
- }
201
- }
202
- }
203
- if (this.isItemHidden == true) {
204
- if (this.indexesToDisable.length > 0) {
205
- for (let index of this.indexesToDisable) {
206
- let itemIndex = this.items.findIndex(item => item.value == index);
207
- this.items.splice(itemIndex, 1);
208
- }
209
- }
210
- }
211
- }
212
- writeValue(type) {
213
- if (type != undefined) {
214
- this.selectedItem = type;
215
- }
216
- else if (type == null) {
217
- this.selectedItem = type;
218
- }
219
- }
220
- registerOnChange(fn) {
221
- this.propagateChange = fn;
222
- }
223
- registerOnTouched(fn) {
224
- this.propogateTouch = fn;
225
- }
226
- updateBlur() {
227
- this.propogateTouch();
228
- this.close.emit();
229
- }
230
- onSelectedItemChanged() {
231
- this.propagateChange(this.selectedItem);
232
- this.change.emit(this.selectedItem);
233
- }
234
- setDisabledState(isDisabled) {
235
- this.isDropdownDisabled = isDisabled;
236
- }
237
- clear() {
238
- this.selectedItem = null;
239
- }
240
- setStyles() {
241
- let style = {
242
- paddingTop: this.paddingTop + 'rem',
243
- };
244
- if (this.width) {
245
- style['width'] = this.width + 'rem';
246
- }
247
- return style;
248
- }
249
- setLabelStyle() {
250
- let style = {
251
- textAlign: this.labelTextAlign,
252
- fontWeight: this.labelTextFontWeight,
253
- fontSize: this.labelTextFontSize + 'rem',
254
- };
255
- return style;
256
- }
257
- }
258
- ChooseEnumComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
259
- ChooseEnumComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumComponent, selector: "choose-enum", inputs: { label: "label", appendTo: "appendTo", allowAllCapsValues: "allowAllCapsValues", isItemHidden: "isItemHidden", isItemDisabled: "isItemDisabled", enumChoices: "enumChoices", getValuesArrayFromEnum: "getValuesArrayFromEnum", isChip: "isChip", isMultiple: "isMultiple", placeholder: "placeholder", width: "width", paddingTop: "paddingTop", labelTextAlign: "labelTextAlign", labelTextFontWeight: "labelTextFontWeight", labelTextFontSize: "labelTextFontSize", selectedItem: "selectedItem", indexesToDisable: "indexesToDisable", isDropdownDisabled: "isDropdownDisabled", percentWidth: "percentWidth", clearable: "clearable" }, outputs: { change: "change", close: "close" }, providers: [
260
- {
261
- provide: NG_VALUE_ACCESSOR,
262
- useExisting: forwardRef(() => ChooseEnumComponent),
263
- multi: true,
264
- },
265
- ], usesOnChanges: true, ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [ngStyle]=\"setStyles()\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"value\" [items]=\"items\"\r\n [placeholder]=\"placeholder\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\"\r\n [multiple]=\"isMultiple\" [disabled]=\"isDropdownDisabled\" [clearable]=\"clearable\"\r\n [clearAllText]=\"'clear everything'\" (clear)=\"clear()\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <div *ngIf=\"isChip\">\r\n <ng-chip [enumClass]=\"enumChoices\" [enumValue]=\"item.value\"> </ng-chip>\r\n </div>\r\n <div [ngStyle]=\"setLabelStyle()\" *ngIf=\"!isChip\">{{ item.label }}</div>\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".select{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }] });
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumComponent, decorators: [{
267
- type: Component,
268
- args: [{ selector: 'choose-enum', providers: [
269
- {
270
- provide: NG_VALUE_ACCESSOR,
271
- useExisting: forwardRef(() => ChooseEnumComponent),
272
- multi: true,
273
- },
274
- ], template: "<div class=\"select\">\r\n <ng-select [ngStyle]=\"setStyles()\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"value\" [items]=\"items\"\r\n [placeholder]=\"placeholder\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\"\r\n [multiple]=\"isMultiple\" [disabled]=\"isDropdownDisabled\" [clearable]=\"clearable\"\r\n [clearAllText]=\"'clear everything'\" (clear)=\"clear()\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <div *ngIf=\"isChip\">\r\n <ng-chip [enumClass]=\"enumChoices\" [enumValue]=\"item.value\"> </ng-chip>\r\n </div>\r\n <div [ngStyle]=\"setLabelStyle()\" *ngIf=\"!isChip\">{{ item.label }}</div>\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".select{width:100%}\n"] }]
275
- }], ctorParameters: function () { return []; }, propDecorators: { change: [{
276
- type: Output
277
- }], close: [{
278
- type: Output
279
- }], label: [{
280
- type: Input
281
- }], appendTo: [{
282
- type: Input
283
- }], allowAllCapsValues: [{
284
- type: Input
285
- }], isItemHidden: [{
286
- type: Input
287
- }], isItemDisabled: [{
288
- type: Input
289
- }], enumChoices: [{
290
- type: Input
291
- }], getValuesArrayFromEnum: [{
292
- type: Input
293
- }], isChip: [{
294
- type: Input
295
- }], isMultiple: [{
296
- type: Input
297
- }], placeholder: [{
298
- type: Input
299
- }], width: [{
300
- type: Input
301
- }], paddingTop: [{
302
- type: Input
303
- }], labelTextAlign: [{
304
- type: Input
305
- }], labelTextFontWeight: [{
306
- type: Input
307
- }], labelTextFontSize: [{
308
- type: Input
309
- }], selectedItem: [{
310
- type: Input
311
- }], indexesToDisable: [{
312
- type: Input
313
- }], isDropdownDisabled: [{
314
- type: Input
315
- }], percentWidth: [{
316
- type: Input
317
- }], clearable: [{
318
- type: Input
180
+ class ChooseEnumComponent {
181
+ items;
182
+ appendTo = 'body';
183
+ allowAllCapsValues = false;
184
+ clearable = true;
185
+ customColors;
186
+ enumChoices;
187
+ virtualScroll = false;
188
+ getValuesArrayFromEnum = EnumHelperBaseClass.getEnumOptionsFromEnumClass;
189
+ indexesToDisable = [];
190
+ isChip = true;
191
+ isDropdownDisabled = false;
192
+ isItemHidden;
193
+ isItemDisabled;
194
+ isMultiple;
195
+ label = 'label';
196
+ labelTextAlign = 'left';
197
+ labelTextFontWeight;
198
+ labelTextFontSize;
199
+ paddingTop;
200
+ placeholder;
201
+ percentWidth = false;
202
+ selectedItem;
203
+ width;
204
+ change = new EventEmitter();
205
+ close = new EventEmitter();
206
+ constructor() { }
207
+ ngOnChanges() {
208
+ if (this.getValuesArrayFromEnum != null) {
209
+ this.items = this.getValuesArrayFromEnum(this.enumChoices, this.customColors, this.allowAllCapsValues);
210
+ }
211
+ if (this.isItemDisabled == true) {
212
+ if (this.indexesToDisable.length > 0) {
213
+ for (let index of this.indexesToDisable) {
214
+ this.items[index].disabled = true;
215
+ }
216
+ }
217
+ }
218
+ if (this.isItemHidden == true) {
219
+ if (this.indexesToDisable.length > 0) {
220
+ for (let index of this.indexesToDisable) {
221
+ let itemIndex = this.items.findIndex((item) => item.value == index);
222
+ this.items.splice(itemIndex, 1);
223
+ }
224
+ }
225
+ }
226
+ }
227
+ ngOnInit() {
228
+ if (this.getValuesArrayFromEnum != null) {
229
+ this.items = this.getValuesArrayFromEnum(this.enumChoices, this.customColors, this.allowAllCapsValues);
230
+ }
231
+ if (this.isItemDisabled == true) {
232
+ if (this.indexesToDisable.length > 0) {
233
+ for (let index of this.indexesToDisable) {
234
+ this.items[index].disabled = true;
235
+ }
236
+ }
237
+ }
238
+ if (this.isItemHidden == true) {
239
+ if (this.indexesToDisable.length > 0) {
240
+ for (let index of this.indexesToDisable) {
241
+ let itemIndex = this.items.findIndex((item) => item.value == index);
242
+ this.items.splice(itemIndex, 1);
243
+ }
244
+ }
245
+ }
246
+ }
247
+ writeValue(type) {
248
+ if (type != undefined) {
249
+ this.selectedItem = type;
250
+ }
251
+ else if (type == null) {
252
+ this.selectedItem = type;
253
+ }
254
+ }
255
+ registerOnChange(fn) {
256
+ this.propagateChange = fn;
257
+ }
258
+ registerOnTouched(fn) {
259
+ this.propogateTouch = fn;
260
+ }
261
+ propagateChange = (_) => { };
262
+ propogateTouch = () => { };
263
+ updateBlur() {
264
+ this.propogateTouch();
265
+ this.close.emit();
266
+ }
267
+ onSelectedItemChanged() {
268
+ this.propagateChange(this.selectedItem);
269
+ this.change.emit(this.selectedItem);
270
+ }
271
+ setDisabledState(isDisabled) {
272
+ this.isDropdownDisabled = isDisabled;
273
+ }
274
+ clear() {
275
+ this.selectedItem = null;
276
+ }
277
+ setStyles() {
278
+ let style = {
279
+ paddingTop: this.paddingTop + 'rem',
280
+ };
281
+ if (this.width) {
282
+ style['width'] = this.width + 'rem';
283
+ }
284
+ return style;
285
+ }
286
+ setLabelStyle() {
287
+ let style = {
288
+ textAlign: this.labelTextAlign,
289
+ fontWeight: this.labelTextFontWeight,
290
+ fontSize: this.labelTextFontSize + 'rem',
291
+ };
292
+ return style;
293
+ }
294
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
295
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseEnumComponent, selector: "choose-enum", inputs: { appendTo: "appendTo", allowAllCapsValues: "allowAllCapsValues", clearable: "clearable", customColors: "customColors", enumChoices: "enumChoices", virtualScroll: "virtualScroll", getValuesArrayFromEnum: "getValuesArrayFromEnum", indexesToDisable: "indexesToDisable", isChip: "isChip", isDropdownDisabled: "isDropdownDisabled", isItemHidden: "isItemHidden", isItemDisabled: "isItemDisabled", isMultiple: "isMultiple", label: "label", labelTextAlign: "labelTextAlign", labelTextFontWeight: "labelTextFontWeight", labelTextFontSize: "labelTextFontSize", paddingTop: "paddingTop", placeholder: "placeholder", percentWidth: "percentWidth", selectedItem: "selectedItem", width: "width" }, outputs: { change: "change", close: "close" }, providers: [
296
+ {
297
+ provide: NG_VALUE_ACCESSOR,
298
+ useExisting: forwardRef(() => ChooseEnumComponent),
299
+ multi: true,
300
+ },
301
+ ], usesOnChanges: true, ngImport: i0, template: "<div class=\"select\">\r\n <ng-select\r\n [ngStyle]=\"setStyles()\"\r\n (blur)=\"updateBlur()\"\r\n bindLabel=\"label\"\r\n bindValue=\"value\"\r\n [items]=\"items\"\r\n [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItem\"\r\n [multiple]=\"isMultiple\"\r\n [disabled]=\"isDropdownDisabled\"\r\n [clearable]=\"clearable\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [clearAllText]=\"'clear everything'\"\r\n (clear)=\"clear()\"\r\n [appendTo]=\"appendTo\"\r\n dropdownPosition=\"bottom\">\r\n <ng-template\r\n class=\"template\"\r\n ng-option-tmp\r\n ng-label-tmp\r\n let-item=\"item\"\r\n let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <div *ngIf=\"isChip\">\r\n <ng-chip [enumClass]=\"enumChoices\" [enumValue]=\"item.value\" [customColors]=\"customColors\">\r\n </ng-chip>\r\n </div>\r\n <div [ngStyle]=\"setLabelStyle()\" *ngIf=\"!isChip\">{{ item.label }}</div>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n", styles: [".select{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "customColors", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }] });
302
+ }
303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseEnumComponent, decorators: [{
304
+ type: Component,
305
+ args: [{ selector: 'choose-enum', providers: [
306
+ {
307
+ provide: NG_VALUE_ACCESSOR,
308
+ useExisting: forwardRef(() => ChooseEnumComponent),
309
+ multi: true,
310
+ },
311
+ ], template: "<div class=\"select\">\r\n <ng-select\r\n [ngStyle]=\"setStyles()\"\r\n (blur)=\"updateBlur()\"\r\n bindLabel=\"label\"\r\n bindValue=\"value\"\r\n [items]=\"items\"\r\n [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItem\"\r\n [multiple]=\"isMultiple\"\r\n [disabled]=\"isDropdownDisabled\"\r\n [clearable]=\"clearable\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [clearAllText]=\"'clear everything'\"\r\n (clear)=\"clear()\"\r\n [appendTo]=\"appendTo\"\r\n dropdownPosition=\"bottom\">\r\n <ng-template\r\n class=\"template\"\r\n ng-option-tmp\r\n ng-label-tmp\r\n let-item=\"item\"\r\n let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <div *ngIf=\"isChip\">\r\n <ng-chip [enumClass]=\"enumChoices\" [enumValue]=\"item.value\" [customColors]=\"customColors\">\r\n </ng-chip>\r\n </div>\r\n <div [ngStyle]=\"setLabelStyle()\" *ngIf=\"!isChip\">{{ item.label }}</div>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n", styles: [".select{width:100%}\n"] }]
312
+ }], ctorParameters: function () { return []; }, propDecorators: { appendTo: [{
313
+ type: Input
314
+ }], allowAllCapsValues: [{
315
+ type: Input
316
+ }], clearable: [{
317
+ type: Input
318
+ }], customColors: [{
319
+ type: Input
320
+ }], enumChoices: [{
321
+ type: Input
322
+ }], virtualScroll: [{
323
+ type: Input
324
+ }], getValuesArrayFromEnum: [{
325
+ type: Input
326
+ }], indexesToDisable: [{
327
+ type: Input
328
+ }], isChip: [{
329
+ type: Input
330
+ }], isDropdownDisabled: [{
331
+ type: Input
332
+ }], isItemHidden: [{
333
+ type: Input
334
+ }], isItemDisabled: [{
335
+ type: Input
336
+ }], isMultiple: [{
337
+ type: Input
338
+ }], label: [{
339
+ type: Input
340
+ }], labelTextAlign: [{
341
+ type: Input
342
+ }], labelTextFontWeight: [{
343
+ type: Input
344
+ }], labelTextFontSize: [{
345
+ type: Input
346
+ }], paddingTop: [{
347
+ type: Input
348
+ }], placeholder: [{
349
+ type: Input
350
+ }], percentWidth: [{
351
+ type: Input
352
+ }], selectedItem: [{
353
+ type: Input
354
+ }], width: [{
355
+ type: Input
356
+ }], change: [{
357
+ type: Output
358
+ }], close: [{
359
+ type: Output
319
360
  }] } });
320
361
 
321
- class ShowTableErrorsComponent {
322
- ngOnInit() {
323
- }
324
- onMouseEnter() {
325
- this.showDetails = true;
326
- }
327
- onMouseLeave() {
328
- this.showDetails = false;
329
- }
330
- }
331
- ShowTableErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShowTableErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
332
- ShowTableErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShowTableErrorsComponent, selector: "show-table-errors", inputs: { message: "message" }, ngImport: i0, template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
333
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShowTableErrorsComponent, decorators: [{
334
- type: Component,
335
- args: [{ selector: 'show-table-errors', template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"] }]
336
- }], propDecorators: { message: [{
337
- type: Input
362
+ class ShowTableErrorsComponent {
363
+ message;
364
+ showDetails;
365
+ ngOnInit() {
366
+ }
367
+ onMouseEnter() {
368
+ this.showDetails = true;
369
+ }
370
+ onMouseLeave() {
371
+ this.showDetails = false;
372
+ }
373
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShowTableErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
374
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ShowTableErrorsComponent, selector: "show-table-errors", inputs: { message: "message" }, ngImport: i0, template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
375
+ }
376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShowTableErrorsComponent, decorators: [{
377
+ type: Component,
378
+ args: [{ selector: 'show-table-errors', template: "<div (mouseenter)=\"onMouseEnter()\"(mouseleave)=\"onMouseLeave()\" class=\"icon\">\r\n <fa-icon class=\"icon\" icon=\"info-circle\" ></fa-icon>\r\n <span *ngIf=\"message\" class=\"message\"\r\n [ngClass]=\"{'no-details' : !showDetails , 'details': showDetails}\">{{message}}</span>\r\n</div>", styles: [".icon{color:#a80002;cursor:pointer;display:inline-block}.no-details{display:none}.details{display:block;z-index:100;background-color:#ffdbdb;color:#a80002;border-radius:.5rem;border:.1rem solid #A80002;border-left:.5rem solid #A80002;position:fixed;padding:1rem;bottom:45%}\n"] }]
379
+ }], propDecorators: { message: [{
380
+ type: Input
338
381
  }] } });
339
382
 
340
- class ChooseEnumRendererComponent {
341
- constructor() { }
342
- agInit(params) {
343
- this.params = params;
344
- this.enumValue = params.value;
345
- this.key = params.context.createKey(params.columnApi, params.column);
346
- }
347
- onCellDataChanged($event) {
348
- let value = $event;
349
- this.formControlValue = this.params.context.formGroup.get("entries").at(this.params.node.rowIndex);
350
- this.formControlValue?.get(this.key).setValue(value);
351
- }
352
- refresh(params) {
353
- return false;
354
- }
355
- }
356
- ChooseEnumRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
357
- ChooseEnumRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumRendererComponent, selector: "choose-enum-renderer", ngImport: i0, template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>", styles: [""], dependencies: [{ kind: "component", type: ChooseEnumComponent, selector: "choose-enum", inputs: ["label", "appendTo", "allowAllCapsValues", "isItemHidden", "isItemDisabled", "enumChoices", "getValuesArrayFromEnum", "isChip", "isMultiple", "placeholder", "width", "paddingTop", "labelTextAlign", "labelTextFontWeight", "labelTextFontSize", "selectedItem", "indexesToDisable", "isDropdownDisabled", "percentWidth", "clearable"], outputs: ["change", "close"] }] });
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumRendererComponent, decorators: [{
359
- type: Component,
360
- args: [{ selector: 'choose-enum-renderer', template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>" }]
383
+ class ChooseEnumRendererComponent {
384
+ params;
385
+ formControlValue;
386
+ key;
387
+ enumValue;
388
+ rowId;
389
+ constructor() { }
390
+ agInit(params) {
391
+ this.params = params;
392
+ this.enumValue = params.value;
393
+ this.key = params.context.createKey(params.columnApi, params.column);
394
+ }
395
+ onCellDataChanged($event) {
396
+ let value = $event;
397
+ this.formControlValue = this.params.context.formGroup.get("entries").at(this.params.node.rowIndex);
398
+ this.formControlValue?.get(this.key).setValue(value);
399
+ }
400
+ refresh(params) {
401
+ return false;
402
+ }
403
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseEnumRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
404
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseEnumRendererComponent, selector: "choose-enum-renderer", ngImport: i0, template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>", styles: [""], dependencies: [{ kind: "component", type: ChooseEnumComponent, selector: "choose-enum", inputs: ["appendTo", "allowAllCapsValues", "clearable", "customColors", "enumChoices", "virtualScroll", "getValuesArrayFromEnum", "indexesToDisable", "isChip", "isDropdownDisabled", "isItemHidden", "isItemDisabled", "isMultiple", "label", "labelTextAlign", "labelTextFontWeight", "labelTextFontSize", "paddingTop", "placeholder", "percentWidth", "selectedItem", "width"], outputs: ["change", "close"] }] });
405
+ }
406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseEnumRendererComponent, decorators: [{
407
+ type: Component,
408
+ args: [{ selector: 'choose-enum-renderer', template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>" }]
361
409
  }], ctorParameters: function () { return []; } });
362
410
 
363
- // import { environment } from '../../environments/environment';
364
- class ChooseGeneralItemService {
365
- // baseUrl: string = environment.apiURL;
366
- constructor(http, env) {
367
- this.http = http;
368
- this.env = env;
369
- } //we have an issue with this line of code...can we meet to resolve it!
370
- getHeaders() {
371
- const token = localStorage.getItem("token");
372
- const httpHeaders = new HttpHeaders({
373
- 'Content-Type': "application/json",
374
- 'Authorization': 'Token ' + token
375
- });
376
- return { headers: httpHeaders };
377
- }
378
- getAuthenticationHeadersWithQueryParams(params) {
379
- const token = localStorage.getItem("token");
380
- const httpHeaders = new HttpHeaders({
381
- 'Content-Type': "application/json",
382
- 'Authorization': 'Token ' + token
383
- });
384
- return { headers: httpHeaders, params: params };
385
- }
386
- getData(apiPath) {
387
- return this.http.get(`${this.env.apiURL}${apiPath}`, this.getHeaders());
388
- }
389
- }
390
- ChooseGeneralItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemService, deps: [{ token: i1$1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
391
- ChooseGeneralItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemService, providedIn: 'root' });
392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemService, decorators: [{
393
- type: Injectable,
394
- args: [{
395
- providedIn: 'root'
396
- }]
397
- }], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
398
- type: Inject,
399
- args: ['env']
411
+ // import { environment } from '../../environments/environment';
412
+ class ChooseGeneralItemService {
413
+ http;
414
+ env;
415
+ // baseUrl: string = environment.apiURL;
416
+ constructor(http, env) {
417
+ this.http = http;
418
+ this.env = env;
419
+ } //we have an issue with this line of code...can we meet to resolve it!
420
+ getHeaders() {
421
+ const token = localStorage.getItem("token");
422
+ const httpHeaders = new HttpHeaders({
423
+ 'Content-Type': "application/json",
424
+ 'Authorization': 'Token ' + token
425
+ });
426
+ return { headers: httpHeaders };
427
+ }
428
+ getAuthenticationHeadersWithQueryParams(params) {
429
+ const token = localStorage.getItem("token");
430
+ const httpHeaders = new HttpHeaders({
431
+ 'Content-Type': "application/json",
432
+ 'Authorization': 'Token ' + token
433
+ });
434
+ return { headers: httpHeaders, params: params };
435
+ }
436
+ getData(apiPath) {
437
+ return this.http.get(`${this.env.apiURL}${apiPath}`, this.getHeaders());
438
+ }
439
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemService, deps: [{ token: i1$1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
440
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemService, providedIn: 'root' });
441
+ }
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemService, decorators: [{
443
+ type: Injectable,
444
+ args: [{
445
+ providedIn: 'root'
446
+ }]
447
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
448
+ type: Inject,
449
+ args: ['env']
400
450
  }] }]; } });
401
451
 
402
- class ChooseGeneralItemComponent {
403
- constructor(_ChooseGeneralItemService) {
404
- this._ChooseGeneralItemService = _ChooseGeneralItemService;
405
- this.change = new EventEmitter();
406
- this.width = 20;
407
- this.isChip = false;
408
- this.chipColor = 'black';
409
- this.chipTextColor = 'white';
410
- this.chipWidth = 11;
411
- this.useFullObject = false;
412
- this.propagateChange = (_) => { };
413
- this.propogateTouch = () => { };
414
- }
415
- ngOnInit() {
416
- if (!this.items)
417
- this.getData();
418
- }
419
- writeValue(item) {
420
- if (item != undefined) {
421
- this.selectedItemId = item;
422
- }
423
- else if (item == null) {
424
- this.selectedItemId = item;
425
- }
426
- }
427
- registerOnChange(fn) {
428
- this.propagateChange = fn;
429
- }
430
- registerOnTouched(fn) {
431
- this.propogateTouch = fn;
432
- }
433
- updateBlur() {
434
- this.propogateTouch();
435
- }
436
- onSelectedItemChanged($event) {
437
- this.propagateChange(this.useFullObject ? $event : this.selectedItemId);
438
- this.change.emit(this.useFullObject ? $event : this.selectedItemId);
439
- }
440
- getData() {
441
- if (this.apiPath) {
442
- this._ChooseGeneralItemService.getData(this.apiPath).subscribe({
443
- next: (response) => {
444
- this.items = response;
445
- },
446
- error: (error) => console.error("error", error)
447
- });
448
- }
449
- }
450
- setWidth() {
451
- let style = {
452
- width: this.width + "rem"
453
- };
454
- return style;
455
- }
456
- setFontStyles() {
457
- let fontStyle = {
458
- fontWeight: this.fontWeight,
459
- fontSize: this.fontSize + "rem",
460
- };
461
- return fontStyle;
462
- }
463
- }
464
- ChooseGeneralItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemComponent, deps: [{ token: ChooseGeneralItemService }], target: i0.ɵɵFactoryTarget.Component });
465
- ChooseGeneralItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseGeneralItemComponent, selector: "choose-general-item", inputs: { items: "items", label: "label", appendTo: "appendTo", placeholder: "placeholder", apiPath: "apiPath", isMultiple: "isMultiple", hideSelectedItem: "hideSelectedItem", objects: "objects", showLabel: "showLabel", separator: "separator", width: "width", fontWeight: "fontWeight", fontSize: "fontSize", isChip: "isChip", isTypeDate: "isTypeDate", chipColor: "chipColor", chipTextColor: "chipTextColor", chipWidth: "chipWidth", selectedItemId: "selectedItemId", disabled: "disabled", useFullObject: "useFullObject" }, outputs: { change: "change" }, providers: [
466
- {
467
- provide: NG_VALUE_ACCESSOR,
468
- useExisting: forwardRef(() => ChooseGeneralItemComponent),
469
- multi: true,
470
- },
471
- ], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [hideSelected]=\"hideSelectedItem\" [closeOnSelect]=\"!isMultiple\" [ngStyle]=\"setWidth()\" class=\"component\"\r\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\" (blur)=\"updateBlur()\" [bindLabel]=\"label\"\r\n bindValue=\"id\" [compareWith]=\"\" [items]=\"items\" [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged($event)\" [(ngModel)]=\"selectedItemId\" [multiple]=\"isMultiple\">\r\n <ng-template *ngIf=\"!isChip\" class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [ngStyle]=\"setFontStyles()\" *ngFor=\"let object of objects let isLast = last\">\r\n <span *ngIf=\"showLabel && !isTypeDate\">\r\n {{object.label}}: {{item[object.field]}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"showLabel && isTypeDate\">\r\n {{object.label}}: {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && isTypeDate\">\r\n {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && !isTypeDate\">{{item[object.field]}}{{isLast ? \"\" : separator}}\r\n </span>\r\n </span>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"isMultiple\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-option-tmp let-clear=\"clear\" let-item=\"item\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"false\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemComponent, decorators: [{
473
- type: Component,
474
- args: [{ selector: 'choose-general-item', providers: [
475
- {
476
- provide: NG_VALUE_ACCESSOR,
477
- useExisting: forwardRef(() => ChooseGeneralItemComponent),
478
- multi: true,
479
- },
480
- ], template: "<div class=\"select\">\r\n <ng-select [hideSelected]=\"hideSelectedItem\" [closeOnSelect]=\"!isMultiple\" [ngStyle]=\"setWidth()\" class=\"component\"\r\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\" (blur)=\"updateBlur()\" [bindLabel]=\"label\"\r\n bindValue=\"id\" [compareWith]=\"\" [items]=\"items\" [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged($event)\" [(ngModel)]=\"selectedItemId\" [multiple]=\"isMultiple\">\r\n <ng-template *ngIf=\"!isChip\" class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [ngStyle]=\"setFontStyles()\" *ngFor=\"let object of objects let isLast = last\">\r\n <span *ngIf=\"showLabel && !isTypeDate\">\r\n {{object.label}}: {{item[object.field]}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"showLabel && isTypeDate\">\r\n {{object.label}}: {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && isTypeDate\">\r\n {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && !isTypeDate\">{{item[object.field]}}{{isLast ? \"\" : separator}}\r\n </span>\r\n </span>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"isMultiple\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-option-tmp let-clear=\"clear\" let-item=\"item\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"false\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n </ng-select>\r\n</div>" }]
481
- }], ctorParameters: function () { return [{ type: ChooseGeneralItemService }]; }, propDecorators: { change: [{
482
- type: Output
483
- }], items: [{
484
- type: Input
485
- }], label: [{
486
- type: Input
487
- }], appendTo: [{
488
- type: Input
489
- }], placeholder: [{
490
- type: Input
491
- }], apiPath: [{
492
- type: Input
493
- }], isMultiple: [{
494
- type: Input
495
- }], hideSelectedItem: [{
496
- type: Input
497
- }], objects: [{
498
- type: Input
499
- }], showLabel: [{
500
- type: Input
501
- }], separator: [{
502
- type: Input
503
- }], width: [{
504
- type: Input
505
- }], fontWeight: [{
506
- type: Input
507
- }], fontSize: [{
508
- type: Input
509
- }], isChip: [{
510
- type: Input
511
- }], isTypeDate: [{
512
- type: Input
513
- }], chipColor: [{
514
- type: Input
515
- }], chipTextColor: [{
516
- type: Input
517
- }], chipWidth: [{
518
- type: Input
519
- }], selectedItemId: [{
520
- type: Input
521
- }], disabled: [{
522
- type: Input
523
- }], useFullObject: [{
524
- type: Input
452
+ class ChooseGeneralItemComponent {
453
+ _ChooseGeneralItemService;
454
+ change = new EventEmitter();
455
+ items;
456
+ label;
457
+ appendTo;
458
+ placeholder;
459
+ apiPath;
460
+ isMultiple;
461
+ hideSelectedItem;
462
+ objects;
463
+ showLabel;
464
+ separator;
465
+ width = 20;
466
+ fontWeight;
467
+ fontSize;
468
+ isChip = false;
469
+ isTypeDate;
470
+ chipColor = 'black';
471
+ chipTextColor = 'white';
472
+ chipWidth = 11;
473
+ selectedItemId;
474
+ disabled;
475
+ useFullObject = false;
476
+ constructor(_ChooseGeneralItemService) {
477
+ this._ChooseGeneralItemService = _ChooseGeneralItemService;
478
+ }
479
+ ngOnInit() {
480
+ if (!this.items)
481
+ this.getData();
482
+ }
483
+ writeValue(item) {
484
+ if (item != undefined) {
485
+ this.selectedItemId = item;
486
+ }
487
+ else if (item == null) {
488
+ this.selectedItemId = item;
489
+ }
490
+ }
491
+ registerOnChange(fn) {
492
+ this.propagateChange = fn;
493
+ }
494
+ registerOnTouched(fn) {
495
+ this.propogateTouch = fn;
496
+ }
497
+ propagateChange = (_) => { };
498
+ propogateTouch = () => { };
499
+ updateBlur() {
500
+ this.propogateTouch();
501
+ }
502
+ onSelectedItemChanged($event) {
503
+ this.propagateChange(this.useFullObject ? $event : this.selectedItemId);
504
+ this.change.emit(this.useFullObject ? $event : this.selectedItemId);
505
+ }
506
+ getData() {
507
+ if (this.apiPath) {
508
+ this._ChooseGeneralItemService.getData(this.apiPath).subscribe({
509
+ next: (response) => {
510
+ this.items = response;
511
+ },
512
+ error: (error) => console.error("error", error)
513
+ });
514
+ }
515
+ }
516
+ setWidth() {
517
+ let style = {
518
+ width: this.width + "rem"
519
+ };
520
+ return style;
521
+ }
522
+ setFontStyles() {
523
+ let fontStyle = {
524
+ fontWeight: this.fontWeight,
525
+ fontSize: this.fontSize + "rem",
526
+ };
527
+ return fontStyle;
528
+ }
529
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemComponent, deps: [{ token: ChooseGeneralItemService }], target: i0.ɵɵFactoryTarget.Component });
530
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseGeneralItemComponent, selector: "choose-general-item", inputs: { items: "items", label: "label", appendTo: "appendTo", placeholder: "placeholder", apiPath: "apiPath", isMultiple: "isMultiple", hideSelectedItem: "hideSelectedItem", objects: "objects", showLabel: "showLabel", separator: "separator", width: "width", fontWeight: "fontWeight", fontSize: "fontSize", isChip: "isChip", isTypeDate: "isTypeDate", chipColor: "chipColor", chipTextColor: "chipTextColor", chipWidth: "chipWidth", selectedItemId: "selectedItemId", disabled: "disabled", useFullObject: "useFullObject" }, outputs: { change: "change" }, providers: [
531
+ {
532
+ provide: NG_VALUE_ACCESSOR,
533
+ useExisting: forwardRef(() => ChooseGeneralItemComponent),
534
+ multi: true,
535
+ },
536
+ ], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [hideSelected]=\"hideSelectedItem\" [closeOnSelect]=\"!isMultiple\" [ngStyle]=\"setWidth()\" class=\"component\"\r\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\" (blur)=\"updateBlur()\" [bindLabel]=\"label\"\r\n bindValue=\"id\" [compareWith]=\"\" [items]=\"items\" [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged($event)\" [(ngModel)]=\"selectedItemId\" [multiple]=\"isMultiple\">\r\n <ng-template *ngIf=\"!isChip\" class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [ngStyle]=\"setFontStyles()\" *ngFor=\"let object of objects let isLast = last\">\r\n <span *ngIf=\"showLabel && !isTypeDate\">\r\n {{object.label}}: {{item[object.field]}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"showLabel && isTypeDate\">\r\n {{object.label}}: {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && isTypeDate\">\r\n {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && !isTypeDate\">{{item[object.field]}}{{isLast ? \"\" : separator}}\r\n </span>\r\n </span>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"isMultiple\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-option-tmp let-clear=\"clear\" let-item=\"item\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"false\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "customColors", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
537
+ }
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemComponent, decorators: [{
539
+ type: Component,
540
+ args: [{ selector: 'choose-general-item', providers: [
541
+ {
542
+ provide: NG_VALUE_ACCESSOR,
543
+ useExisting: forwardRef(() => ChooseGeneralItemComponent),
544
+ multi: true,
545
+ },
546
+ ], template: "<div class=\"select\">\r\n <ng-select [hideSelected]=\"hideSelectedItem\" [closeOnSelect]=\"!isMultiple\" [ngStyle]=\"setWidth()\" class=\"component\"\r\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\" (blur)=\"updateBlur()\" [bindLabel]=\"label\"\r\n bindValue=\"id\" [compareWith]=\"\" [items]=\"items\" [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged($event)\" [(ngModel)]=\"selectedItemId\" [multiple]=\"isMultiple\">\r\n <ng-template *ngIf=\"!isChip\" class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [ngStyle]=\"setFontStyles()\" *ngFor=\"let object of objects let isLast = last\">\r\n <span *ngIf=\"showLabel && !isTypeDate\">\r\n {{object.label}}: {{item[object.field]}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"showLabel && isTypeDate\">\r\n {{object.label}}: {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && isTypeDate\">\r\n {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && !isTypeDate\">{{item[object.field]}}{{isLast ? \"\" : separator}}\r\n </span>\r\n </span>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"isMultiple\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-option-tmp let-clear=\"clear\" let-item=\"item\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"false\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n </ng-select>\r\n</div>" }]
547
+ }], ctorParameters: function () { return [{ type: ChooseGeneralItemService }]; }, propDecorators: { change: [{
548
+ type: Output
549
+ }], items: [{
550
+ type: Input
551
+ }], label: [{
552
+ type: Input
553
+ }], appendTo: [{
554
+ type: Input
555
+ }], placeholder: [{
556
+ type: Input
557
+ }], apiPath: [{
558
+ type: Input
559
+ }], isMultiple: [{
560
+ type: Input
561
+ }], hideSelectedItem: [{
562
+ type: Input
563
+ }], objects: [{
564
+ type: Input
565
+ }], showLabel: [{
566
+ type: Input
567
+ }], separator: [{
568
+ type: Input
569
+ }], width: [{
570
+ type: Input
571
+ }], fontWeight: [{
572
+ type: Input
573
+ }], fontSize: [{
574
+ type: Input
575
+ }], isChip: [{
576
+ type: Input
577
+ }], isTypeDate: [{
578
+ type: Input
579
+ }], chipColor: [{
580
+ type: Input
581
+ }], chipTextColor: [{
582
+ type: Input
583
+ }], chipWidth: [{
584
+ type: Input
585
+ }], selectedItemId: [{
586
+ type: Input
587
+ }], disabled: [{
588
+ type: Input
589
+ }], useFullObject: [{
590
+ type: Input
525
591
  }] } });
526
592
 
527
- class ChooseGeneralItemRendererComponent {
528
- constructor() { }
529
- agInit(params) {
530
- this.params = params;
531
- this.itemId = params.data.id;
532
- this.key = params.context.createKey(params.columnApi, params.column);
533
- this.rowId = params.node.id;
534
- }
535
- onCellDataChanged($event) {
536
- let value = $event;
537
- this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
538
- this.formControlValue.get(this.key).setValue(value);
539
- const params = {
540
- value: value,
541
- rowNode: this.params.node,
542
- };
543
- this.params.onCellValueChanged(params);
544
- }
545
- refresh(params) {
546
- return true;
547
- }
548
- }
549
- ChooseGeneralItemRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
550
- ChooseGeneralItemRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseGeneralItemRendererComponent, selector: "choose-general-item-renderer", ngImport: i0, template: "<choose-general-item [label]=\"params.label\" [appendTo]=\"'body'\" [placeholder]=\"params.placeholder\"\r\n [apiPath]=\"params.apiPath\" [isMultiple]=\"params.isMultiple\" [objects]=\"params.objects\"\r\n [showLabel]=\"params.showLabel\" [separator]=\"params.separator\" [width]=\"params.width\"\r\n [fontWeight]=\"params.fontWeight\" [fontSize]=\"params.fontSize\" [isChip]=\"params.isChip\"\r\n [isTypeDate]=\"params.isTypeDate\" [chipColor]=\"params.chipColor\" [chipTextColor]=\"params.chipTextColor\"\r\n [chipWidth]=\"params.chipWidth\" [selectedItemId]=\"itemId\" [disabled]=\"params.disabled\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-general-item>", styles: [""], dependencies: [{ kind: "component", type: ChooseGeneralItemComponent, selector: "choose-general-item", inputs: ["items", "label", "appendTo", "placeholder", "apiPath", "isMultiple", "hideSelectedItem", "objects", "showLabel", "separator", "width", "fontWeight", "fontSize", "isChip", "isTypeDate", "chipColor", "chipTextColor", "chipWidth", "selectedItemId", "disabled", "useFullObject"], outputs: ["change"] }] });
551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemRendererComponent, decorators: [{
552
- type: Component,
553
- args: [{ selector: 'choose-general-item-renderer', template: "<choose-general-item [label]=\"params.label\" [appendTo]=\"'body'\" [placeholder]=\"params.placeholder\"\r\n [apiPath]=\"params.apiPath\" [isMultiple]=\"params.isMultiple\" [objects]=\"params.objects\"\r\n [showLabel]=\"params.showLabel\" [separator]=\"params.separator\" [width]=\"params.width\"\r\n [fontWeight]=\"params.fontWeight\" [fontSize]=\"params.fontSize\" [isChip]=\"params.isChip\"\r\n [isTypeDate]=\"params.isTypeDate\" [chipColor]=\"params.chipColor\" [chipTextColor]=\"params.chipTextColor\"\r\n [chipWidth]=\"params.chipWidth\" [selectedItemId]=\"itemId\" [disabled]=\"params.disabled\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-general-item>" }]
593
+ class ChooseGeneralItemRendererComponent {
594
+ params;
595
+ formControlValue;
596
+ key;
597
+ itemId;
598
+ rowId;
599
+ constructor() { }
600
+ agInit(params) {
601
+ this.params = params;
602
+ this.itemId = params.data.id;
603
+ this.key = params.context.createKey(params.columnApi, params.column);
604
+ this.rowId = params.node.id;
605
+ }
606
+ onCellDataChanged($event) {
607
+ let value = $event;
608
+ this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
609
+ this.formControlValue.get(this.key).setValue(value);
610
+ const params = {
611
+ value: value,
612
+ rowNode: this.params.node,
613
+ };
614
+ this.params.onCellValueChanged(params);
615
+ }
616
+ refresh(params) {
617
+ return true;
618
+ }
619
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
620
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseGeneralItemRendererComponent, selector: "choose-general-item-renderer", ngImport: i0, template: "<choose-general-item [label]=\"params.label\" [appendTo]=\"'body'\" [placeholder]=\"params.placeholder\"\r\n [apiPath]=\"params.apiPath\" [isMultiple]=\"params.isMultiple\" [objects]=\"params.objects\"\r\n [showLabel]=\"params.showLabel\" [separator]=\"params.separator\" [width]=\"params.width\"\r\n [fontWeight]=\"params.fontWeight\" [fontSize]=\"params.fontSize\" [isChip]=\"params.isChip\"\r\n [isTypeDate]=\"params.isTypeDate\" [chipColor]=\"params.chipColor\" [chipTextColor]=\"params.chipTextColor\"\r\n [chipWidth]=\"params.chipWidth\" [selectedItemId]=\"itemId\" [disabled]=\"params.disabled\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-general-item>", styles: [""], dependencies: [{ kind: "component", type: ChooseGeneralItemComponent, selector: "choose-general-item", inputs: ["items", "label", "appendTo", "placeholder", "apiPath", "isMultiple", "hideSelectedItem", "objects", "showLabel", "separator", "width", "fontWeight", "fontSize", "isChip", "isTypeDate", "chipColor", "chipTextColor", "chipWidth", "selectedItemId", "disabled", "useFullObject"], outputs: ["change"] }] });
621
+ }
622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseGeneralItemRendererComponent, decorators: [{
623
+ type: Component,
624
+ args: [{ selector: 'choose-general-item-renderer', template: "<choose-general-item [label]=\"params.label\" [appendTo]=\"'body'\" [placeholder]=\"params.placeholder\"\r\n [apiPath]=\"params.apiPath\" [isMultiple]=\"params.isMultiple\" [objects]=\"params.objects\"\r\n [showLabel]=\"params.showLabel\" [separator]=\"params.separator\" [width]=\"params.width\"\r\n [fontWeight]=\"params.fontWeight\" [fontSize]=\"params.fontSize\" [isChip]=\"params.isChip\"\r\n [isTypeDate]=\"params.isTypeDate\" [chipColor]=\"params.chipColor\" [chipTextColor]=\"params.chipTextColor\"\r\n [chipWidth]=\"params.chipWidth\" [selectedItemId]=\"itemId\" [disabled]=\"params.disabled\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-general-item>" }]
554
625
  }], ctorParameters: function () { return []; } });
555
626
 
556
- var LineType;
557
- (function (LineType) {
558
- LineType[LineType["INCLUDE"] = 0] = "INCLUDE";
559
- LineType[LineType["DO_NOT_INCLUDE"] = 1] = "DO_NOT_INCLUDE";
627
+ var LineType;
628
+ (function (LineType) {
629
+ LineType[LineType["INCLUDE"] = 0] = "INCLUDE";
630
+ LineType[LineType["DO_NOT_INCLUDE"] = 1] = "DO_NOT_INCLUDE";
560
631
  })(LineType || (LineType = {}));
561
632
 
562
- class LineTypeModelHelper {
563
- static getItems() {
564
- let items = [];
565
- let values = Object.values(LineType);
566
- let types = values.filter(value => typeof value === 'number');
567
- for (let value of types) {
568
- this.setStringValueAndColor(value);
569
- items.push({ value: value, label: this.label, color: this.color, description: this.description });
570
- }
571
- return items;
572
- }
573
- static setStringValueAndColor(type) {
574
- switch (type) {
575
- case LineType.INCLUDE:
576
- return this.label = "Include", this.color = "gold";
577
- break;
578
- case LineType.DO_NOT_INCLUDE:
579
- return this.label = "Do Not Include", this.color = "platinum";
580
- break;
581
- default:
582
- return this.label = "Undefined", this.color = "Gray";
583
- }
584
- }
585
- getValue(label) {
586
- let value;
587
- switch (label) {
588
- case "Include":
589
- return value = 0;
590
- break;
591
- case "Do Not Include":
592
- return value = 1;
593
- break;
594
- default:
595
- return null;
596
- }
597
- }
598
- static getLabelAndColorForValue(value) {
599
- for (let item of this.getItems()) {
600
- if (item.value == value) {
601
- this.value = item;
602
- return this.value;
603
- }
604
- }
605
- }
633
+ class LineTypeModelHelper {
634
+ static label;
635
+ static color;
636
+ static description;
637
+ static value;
638
+ static getItems() {
639
+ let items = [];
640
+ let values = Object.values(LineType);
641
+ let types = values.filter(value => typeof value === 'number');
642
+ for (let value of types) {
643
+ this.setStringValueAndColor(value);
644
+ items.push({ value: value, label: this.label, color: this.color, description: this.description });
645
+ }
646
+ return items;
647
+ }
648
+ static setStringValueAndColor(type) {
649
+ switch (type) {
650
+ case LineType.INCLUDE:
651
+ return this.label = "Include", this.color = "gold";
652
+ break;
653
+ case LineType.DO_NOT_INCLUDE:
654
+ return this.label = "Do Not Include", this.color = "platinum";
655
+ break;
656
+ default:
657
+ return this.label = "Undefined", this.color = "Gray";
658
+ }
659
+ }
660
+ getValue(label) {
661
+ let value;
662
+ switch (label) {
663
+ case "Include":
664
+ return value = 0;
665
+ break;
666
+ case "Do Not Include":
667
+ return value = 1;
668
+ break;
669
+ default:
670
+ return null;
671
+ }
672
+ }
673
+ static getLabelAndColorForValue(value) {
674
+ for (let item of this.getItems()) {
675
+ if (item.value == value) {
676
+ this.value = item;
677
+ return this.value;
678
+ }
679
+ }
680
+ }
606
681
  }
607
682
 
608
- class ChooseLineTypeComponent {
609
- constructor() {
610
- this.items = LineTypeModelHelper;
611
- this.propagateChange = (_) => { };
612
- this.propogateTouch = () => { };
613
- }
614
- ngOnInit() {
615
- this.types = this.items.getItems();
616
- }
617
- writeValue(type) {
618
- if (type != undefined || type != null) {
619
- this.selectedItem = type;
620
- }
621
- }
622
- registerOnChange(fn) {
623
- this.propagateChange = fn;
624
- }
625
- registerOnTouched(fn) {
626
- this.propogateTouch = fn;
627
- }
628
- updateBlur() {
629
- this.propogateTouch();
630
- }
631
- onSelectedItemChanged() {
632
- this.propagateChange(this.selectedItem);
633
- }
634
- }
635
- ChooseLineTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseLineTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
636
- ChooseLineTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseLineTypeComponent, selector: "choose-line-type", providers: [
637
- {
638
- provide: NG_VALUE_ACCESSOR,
639
- useExisting: forwardRef(() => ChooseLineTypeComponent),
640
- multi: true,
641
- },
642
- ], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"], dependencies: [{ kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
643
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseLineTypeComponent, decorators: [{
644
- type: Component,
645
- args: [{ selector: 'choose-line-type', providers: [
646
- {
647
- provide: NG_VALUE_ACCESSOR,
648
- useExisting: forwardRef(() => ChooseLineTypeComponent),
649
- multi: true,
650
- },
651
- ], template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"] }]
683
+ class ChooseLineTypeComponent {
684
+ items = LineTypeModelHelper;
685
+ selectedItem;
686
+ types;
687
+ constructor() { }
688
+ ngOnInit() {
689
+ this.types = this.items.getItems();
690
+ }
691
+ writeValue(type) {
692
+ if (type != undefined || type != null) {
693
+ this.selectedItem = type;
694
+ }
695
+ }
696
+ registerOnChange(fn) {
697
+ this.propagateChange = fn;
698
+ }
699
+ registerOnTouched(fn) {
700
+ this.propogateTouch = fn;
701
+ }
702
+ propagateChange = (_) => { };
703
+ propogateTouch = () => { };
704
+ updateBlur() {
705
+ this.propogateTouch();
706
+ }
707
+ onSelectedItemChanged() {
708
+ this.propagateChange(this.selectedItem);
709
+ }
710
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseLineTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
711
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseLineTypeComponent, selector: "choose-line-type", providers: [
712
+ {
713
+ provide: NG_VALUE_ACCESSOR,
714
+ useExisting: forwardRef(() => ChooseLineTypeComponent),
715
+ multi: true,
716
+ },
717
+ ], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"], dependencies: [{ kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
718
+ }
719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseLineTypeComponent, decorators: [{
720
+ type: Component,
721
+ args: [{ selector: 'choose-line-type', providers: [
722
+ {
723
+ provide: NG_VALUE_ACCESSOR,
724
+ useExisting: forwardRef(() => ChooseLineTypeComponent),
725
+ multi: true,
726
+ },
727
+ ], template: "<div class=\"select\">\r\n <ng-select class=\"type\" appendTo=\"body\" (blur)=\"updateBlur()\" bindLabel=\"label\" bindValue=\"label\" [items]=\"types\"\r\n [placeholder]=\"'Choose A Component'\" (change)=\"onSelectedItemChanged()\" [(ngModel)]=\"selectedItem\">\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.label}}\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [".type{width:250px}\n"] }]
652
728
  }], ctorParameters: function () { return []; } });
653
729
 
654
- class ChooseYesOrNoComponent {
655
- constructor() {
656
- this.change = new EventEmitter();
657
- this.items = [{ value: true, label: "Yes", color: "green" }, { value: false, label: "No", color: "red" }];
658
- this.width = 200;
659
- this.placeholder = "Choose either Yes or No";
660
- this.propagateChange = (_) => { };
661
- this.propogateTouch = () => { };
662
- }
663
- ngOnInit() {
664
- }
665
- writeValue(item) {
666
- if (item != undefined || item != null) {
667
- this.selectedItemValue = item;
668
- }
669
- }
670
- registerOnChange(fn) {
671
- this.propagateChange = fn;
672
- }
673
- registerOnTouched(fn) {
674
- this.propogateTouch = fn;
675
- }
676
- updateBlur() {
677
- this.propogateTouch();
678
- }
679
- onSelectedItemChanged() {
680
- this.propagateChange(this.selectedItemValue);
681
- this.change.emit(this.selectedItemValue);
682
- }
683
- setWidth() {
684
- let style = {
685
- width: this.width + "px"
686
- };
687
- return style;
688
- }
689
- }
690
- ChooseYesOrNoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
691
- ChooseYesOrNoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseYesOrNoComponent, selector: "choose-yes-or-no", inputs: { width: "width", selectedItemValue: "selectedItemValue", placeholder: "placeholder" }, outputs: { change: "change" }, providers: [
692
- {
693
- provide: NG_VALUE_ACCESSOR,
694
- useExisting: forwardRef(() => ChooseYesOrNoComponent),
695
- multi: true
696
- }
697
- ], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [ngStyle]=\"setWidth()\" class=\"component\" appendTo=\"body\" (blur)=\"updateBlur()\" [placeholder]=\"placeholder\" bindLabel=\"label\"\r\n bindValue=\"value\" [items]=\"items\" [placeholder]=\"placeholder\" (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItemValue\" >\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [style.color]=\"item.color\">\r\n {{item.label}}\r\n </span>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoComponent, decorators: [{
699
- type: Component,
700
- args: [{ selector: 'choose-yes-or-no', providers: [
701
- {
702
- provide: NG_VALUE_ACCESSOR,
703
- useExisting: forwardRef(() => ChooseYesOrNoComponent),
704
- multi: true
705
- }
706
- ], template: "<div class=\"select\">\r\n <ng-select [ngStyle]=\"setWidth()\" class=\"component\" appendTo=\"body\" (blur)=\"updateBlur()\" [placeholder]=\"placeholder\" bindLabel=\"label\"\r\n bindValue=\"value\" [items]=\"items\" [placeholder]=\"placeholder\" (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItemValue\" >\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [style.color]=\"item.color\">\r\n {{item.label}}\r\n </span>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n" }]
707
- }], ctorParameters: function () { return []; }, propDecorators: { change: [{
708
- type: Output
709
- }], width: [{
710
- type: Input
711
- }], selectedItemValue: [{
712
- type: Input
713
- }], placeholder: [{
714
- type: Input
730
+ class ChooseYesOrNoComponent {
731
+ change = new EventEmitter();
732
+ items = [{ value: true, label: "Yes", color: "green" }, { value: false, label: "No", color: "red" }];
733
+ width = 200;
734
+ selectedItemValue;
735
+ placeholder = "Choose either Yes or No";
736
+ constructor() { }
737
+ ngOnInit() {
738
+ }
739
+ writeValue(item) {
740
+ if (item != undefined || item != null) {
741
+ this.selectedItemValue = item;
742
+ }
743
+ }
744
+ registerOnChange(fn) {
745
+ this.propagateChange = fn;
746
+ }
747
+ registerOnTouched(fn) {
748
+ this.propogateTouch = fn;
749
+ }
750
+ propagateChange = (_) => { };
751
+ propogateTouch = () => { };
752
+ updateBlur() {
753
+ this.propogateTouch();
754
+ }
755
+ onSelectedItemChanged() {
756
+ this.propagateChange(this.selectedItemValue);
757
+ this.change.emit(this.selectedItemValue);
758
+ }
759
+ setWidth() {
760
+ let style = {
761
+ width: this.width + "px"
762
+ };
763
+ return style;
764
+ }
765
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseYesOrNoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
766
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseYesOrNoComponent, selector: "choose-yes-or-no", inputs: { width: "width", selectedItemValue: "selectedItemValue", placeholder: "placeholder" }, outputs: { change: "change" }, providers: [
767
+ {
768
+ provide: NG_VALUE_ACCESSOR,
769
+ useExisting: forwardRef(() => ChooseYesOrNoComponent),
770
+ multi: true
771
+ }
772
+ ], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [ngStyle]=\"setWidth()\" class=\"component\" appendTo=\"body\" (blur)=\"updateBlur()\" [placeholder]=\"placeholder\" bindLabel=\"label\"\r\n bindValue=\"value\" [items]=\"items\" [placeholder]=\"placeholder\" (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItemValue\" >\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [style.color]=\"item.color\">\r\n {{item.label}}\r\n </span>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
773
+ }
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseYesOrNoComponent, decorators: [{
775
+ type: Component,
776
+ args: [{ selector: 'choose-yes-or-no', providers: [
777
+ {
778
+ provide: NG_VALUE_ACCESSOR,
779
+ useExisting: forwardRef(() => ChooseYesOrNoComponent),
780
+ multi: true
781
+ }
782
+ ], template: "<div class=\"select\">\r\n <ng-select [ngStyle]=\"setWidth()\" class=\"component\" appendTo=\"body\" (blur)=\"updateBlur()\" [placeholder]=\"placeholder\" bindLabel=\"label\"\r\n bindValue=\"value\" [items]=\"items\" [placeholder]=\"placeholder\" (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItemValue\" >\r\n <ng-template class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [style.color]=\"item.color\">\r\n {{item.label}}\r\n </span>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n" }]
783
+ }], ctorParameters: function () { return []; }, propDecorators: { change: [{
784
+ type: Output
785
+ }], width: [{
786
+ type: Input
787
+ }], selectedItemValue: [{
788
+ type: Input
789
+ }], placeholder: [{
790
+ type: Input
715
791
  }] } });
716
792
 
717
- class ChooseYesOrNoRendererComponent {
718
- constructor() { }
719
- agInit(params) {
720
- this.params = params;
721
- this.booleanValue = params.value;
722
- this.key = params.context.createKey(params.columnApi, params.column);
723
- this.rowId = params.node.id;
724
- }
725
- onCellDataChanged($event) {
726
- let value = $event;
727
- this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
728
- this.formControlValue.get(this.key).setValue(value);
729
- }
730
- refresh(params) {
731
- return false;
732
- }
733
- }
734
- ChooseYesOrNoRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
735
- ChooseYesOrNoRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseYesOrNoRendererComponent, selector: "choose-yes-or-no-renderer", ngImport: i0, template: "<choose-yes-or-no [selectedItemValue]=\"booleanValue\" [width]=\"params.width\" (change) =\"onCellDataChanged($event)\" [placeholder]=\"params.placeholder\" ></choose-yes-or-no>", styles: [""], dependencies: [{ kind: "component", type: ChooseYesOrNoComponent, selector: "choose-yes-or-no", inputs: ["width", "selectedItemValue", "placeholder"], outputs: ["change"] }] });
736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoRendererComponent, decorators: [{
737
- type: Component,
738
- args: [{ selector: 'choose-yes-or-no-renderer', template: "<choose-yes-or-no [selectedItemValue]=\"booleanValue\" [width]=\"params.width\" (change) =\"onCellDataChanged($event)\" [placeholder]=\"params.placeholder\" ></choose-yes-or-no>" }]
793
+ class ChooseYesOrNoRendererComponent {
794
+ params;
795
+ formControlValue;
796
+ key;
797
+ booleanValue;
798
+ columnName;
799
+ rowId;
800
+ constructor() { }
801
+ agInit(params) {
802
+ this.params = params;
803
+ this.booleanValue = params.value;
804
+ this.key = params.context.createKey(params.columnApi, params.column);
805
+ this.rowId = params.node.id;
806
+ }
807
+ onCellDataChanged($event) {
808
+ let value = $event;
809
+ this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
810
+ this.formControlValue.get(this.key).setValue(value);
811
+ }
812
+ refresh(params) {
813
+ return false;
814
+ }
815
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseYesOrNoRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
816
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChooseYesOrNoRendererComponent, selector: "choose-yes-or-no-renderer", ngImport: i0, template: "<choose-yes-or-no [selectedItemValue]=\"booleanValue\" [width]=\"params.width\" (change) =\"onCellDataChanged($event)\" [placeholder]=\"params.placeholder\" ></choose-yes-or-no>", styles: [""], dependencies: [{ kind: "component", type: ChooseYesOrNoComponent, selector: "choose-yes-or-no", inputs: ["width", "selectedItemValue", "placeholder"], outputs: ["change"] }] });
817
+ }
818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChooseYesOrNoRendererComponent, decorators: [{
819
+ type: Component,
820
+ args: [{ selector: 'choose-yes-or-no-renderer', template: "<choose-yes-or-no [selectedItemValue]=\"booleanValue\" [width]=\"params.width\" (change) =\"onCellDataChanged($event)\" [placeholder]=\"params.placeholder\" ></choose-yes-or-no>" }]
739
821
  }], ctorParameters: function () { return []; } });
740
822
 
741
- const PIPEMAPPINGS = [
742
- { value: '$', pipe: new CurrencyPipe('en-US') }
823
+ const PIPEMAPPINGS = [
824
+ { value: '$', pipe: new CurrencyPipe('en-US') }
743
825
  ];
744
826
 
745
- class DynamicPipe {
746
- transform(value, args) {
747
- for (let val of PIPEMAPPINGS) {
748
- if (val.value === args) {
749
- return val.pipe.transform(value);
750
- }
751
- }
752
- return '';
753
- }
754
- }
755
- DynamicPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DynamicPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
756
- DynamicPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DynamicPipe, name: "dynamicPipe" });
757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DynamicPipe, decorators: [{
758
- type: Pipe,
759
- args: [{ name: 'dynamicPipe' }]
827
+ class DynamicPipe {
828
+ transform(value, args) {
829
+ for (let val of PIPEMAPPINGS) {
830
+ if (val.value === args) {
831
+ return val.pipe.transform(value);
832
+ }
833
+ }
834
+ return '';
835
+ }
836
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
837
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DynamicPipe, name: "dynamicPipe" });
838
+ }
839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DynamicPipe, decorators: [{
840
+ type: Pipe,
841
+ args: [{ name: 'dynamicPipe' }]
760
842
  }] });
761
843
 
762
- class EditableSavableInputComponent {
763
- constructor() {
764
- this.saveWasClicked = new EventEmitter();
765
- this.showUnit = false;
766
- this.isEditable = true;
767
- this.showHeader = true;
768
- this.value = "";
769
- this.isAddClickedOn = false;
770
- this.isUpdated = false;
771
- this.showEdit = false;
772
- // the method set in registerOnChange to emit changes back to the form
773
- this.propagateChange = (_) => { };
774
- this.propogateTouch = () => { };
775
- }
776
- ngOnInit() {
777
- this.initialize();
778
- }
779
- initialize() {
780
- if (this.value == "") {
781
- this.isUpdated = false;
782
- }
783
- else {
784
- this.isUpdated = true;
785
- }
786
- }
787
- onClickAdd() {
788
- this.isAddClickedOn = true;
789
- }
790
- onClickCancel() {
791
- this.isAddClickedOn = false;
792
- }
793
- onClickSave(input) {
794
- this.isAddClickedOn = false;
795
- let value = input.value;
796
- if (value.trim().length == 0) {
797
- this.isUpdated = false;
798
- }
799
- else {
800
- this.isUpdated = true;
801
- }
802
- this.value = value;
803
- this.saveWasClicked.emit(value);
804
- this.propagateChange(this.value);
805
- }
806
- onClickEdit() {
807
- this.isAddClickedOn = true;
808
- }
809
- onMouseEnter() {
810
- this.showEdit = true;
811
- }
812
- onMouseLeave() {
813
- this.showEdit = false;
814
- }
815
- writeValue(value) {
816
- if (value) {
817
- this.value = value;
818
- this.isUpdated = true;
819
- }
820
- }
821
- // registers 'fn' that will be fired wheb changes are made
822
- // this is how we emit the changes back to the form
823
- registerOnChange(fn) {
824
- this.propagateChange = fn;
825
- }
826
- registerOnTouched(fn) {
827
- this.propogateTouch = fn;
828
- }
829
- onChange($event) {
830
- //this.propagateChange(this.value);
831
- }
832
- updateBlur() {
833
- this.propogateTouch();
834
- }
835
- }
836
- EditableSavableInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditableSavableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
837
- EditableSavableInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditableSavableInputComponent, selector: "editable-savable-input", inputs: { defaultvalue: "defaultvalue", inputType: "inputType", newLabel: "newLabel", headerLabel: "headerLabel", showUnit: "showUnit", unit: "unit", unitType: "unitType", isEditable: "isEditable", showHeader: "showHeader", value: "value" }, outputs: { saveWasClicked: "saveWasClicked" }, providers: [DynamicPipe,
838
- {
839
- provide: NG_VALUE_ACCESSOR,
840
- useExisting: forwardRef(() => EditableSavableInputComponent),
841
- multi: true
842
- }
843
- ], ngImport: i0, template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }] });
844
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditableSavableInputComponent, decorators: [{
845
- type: Component,
846
- args: [{ selector: 'editable-savable-input', providers: [DynamicPipe,
847
- {
848
- provide: NG_VALUE_ACCESSOR,
849
- useExisting: forwardRef(() => EditableSavableInputComponent),
850
- multi: true
851
- }
852
- ], template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"] }]
853
- }], ctorParameters: function () { return []; }, propDecorators: { saveWasClicked: [{
854
- type: Output
855
- }], defaultvalue: [{
856
- type: Input
857
- }], inputType: [{
858
- type: Input
859
- }], newLabel: [{
860
- type: Input
861
- }], headerLabel: [{
862
- type: Input
863
- }], showUnit: [{
864
- type: Input
865
- }], unit: [{
866
- type: Input
867
- }], unitType: [{
868
- type: Input
869
- }], isEditable: [{
870
- type: Input
871
- }], showHeader: [{
872
- type: Input
873
- }], value: [{
874
- type: Input
844
+ class EditableSavableInputComponent {
845
+ saveWasClicked = new EventEmitter();
846
+ defaultvalue;
847
+ inputType;
848
+ newLabel;
849
+ headerLabel;
850
+ showUnit = false;
851
+ unit;
852
+ unitType;
853
+ isEditable = true;
854
+ showHeader = true;
855
+ value = "";
856
+ isAddClickedOn = false;
857
+ isUpdated = false;
858
+ showEdit = false;
859
+ constructor() { }
860
+ ngOnInit() {
861
+ this.initialize();
862
+ }
863
+ initialize() {
864
+ if (this.value == "") {
865
+ this.isUpdated = false;
866
+ }
867
+ else {
868
+ this.isUpdated = true;
869
+ }
870
+ }
871
+ onClickAdd() {
872
+ this.isAddClickedOn = true;
873
+ }
874
+ onClickCancel() {
875
+ this.isAddClickedOn = false;
876
+ }
877
+ onClickSave(input) {
878
+ this.isAddClickedOn = false;
879
+ let value = input.value;
880
+ if (value.trim().length == 0) {
881
+ this.isUpdated = false;
882
+ }
883
+ else {
884
+ this.isUpdated = true;
885
+ }
886
+ this.value = value;
887
+ this.saveWasClicked.emit(value);
888
+ this.propagateChange(this.value);
889
+ }
890
+ onClickEdit() {
891
+ this.isAddClickedOn = true;
892
+ }
893
+ onMouseEnter() {
894
+ this.showEdit = true;
895
+ }
896
+ onMouseLeave() {
897
+ this.showEdit = false;
898
+ }
899
+ writeValue(value) {
900
+ if (value) {
901
+ this.value = value;
902
+ this.isUpdated = true;
903
+ }
904
+ }
905
+ // registers 'fn' that will be fired wheb changes are made
906
+ // this is how we emit the changes back to the form
907
+ registerOnChange(fn) {
908
+ this.propagateChange = fn;
909
+ }
910
+ registerOnTouched(fn) {
911
+ this.propogateTouch = fn;
912
+ }
913
+ // the method set in registerOnChange to emit changes back to the form
914
+ propagateChange = (_) => { };
915
+ propogateTouch = () => { };
916
+ onChange($event) {
917
+ //this.propagateChange(this.value);
918
+ }
919
+ updateBlur() {
920
+ this.propogateTouch();
921
+ }
922
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditableSavableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
923
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditableSavableInputComponent, selector: "editable-savable-input", inputs: { defaultvalue: "defaultvalue", inputType: "inputType", newLabel: "newLabel", headerLabel: "headerLabel", showUnit: "showUnit", unit: "unit", unitType: "unitType", isEditable: "isEditable", showHeader: "showHeader", value: "value" }, outputs: { saveWasClicked: "saveWasClicked" }, providers: [DynamicPipe,
924
+ {
925
+ provide: NG_VALUE_ACCESSOR,
926
+ useExisting: forwardRef(() => EditableSavableInputComponent),
927
+ multi: true
928
+ }
929
+ ], ngImport: i0, template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }] });
930
+ }
931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditableSavableInputComponent, decorators: [{
932
+ type: Component,
933
+ args: [{ selector: 'editable-savable-input', providers: [DynamicPipe,
934
+ {
935
+ provide: NG_VALUE_ACCESSOR,
936
+ useExisting: forwardRef(() => EditableSavableInputComponent),
937
+ multi: true
938
+ }
939
+ ], template: "<div *ngIf=\"showHeader\" class=\"header\">\r\n {{headerLabel}}\r\n</div>\r\n<div class=\"container\" [ngClass]=\"{'closed':!isAddClickedOn, 'open': isAddClickedOn}\">\r\n <div class=\"content\">\r\n <div class=\"default-content\" *ngIf=\"!isAddClickedOn && !isUpdated && isEditable\">\r\n <div class=\"add\" (click)=\"onClickAdd()\">\r\n {{defaultvalue}} </div>\r\n </div>\r\n <div class=\"edit-content\" *ngIf=\"isAddClickedOn\">\r\n <label class=\"input-label\" for=\"input\">{{newLabel}}</label>\r\n <div class=\"input \" [ngClass]=\"{'input-with-appended-unit': showUnit}\">\r\n <span *ngIf=\"showUnit\">{{unit}}</span>\r\n <input (change)=\"onChange($event)\" (blur)=\"updateBlur()\" [ngModel]=\"value\" [value]=\"value\" id=\"input\" #input\r\n class=\"form-control\" [ngClass]=\"{'input-box': showUnit}\" [type]=\"inputType\">\r\n </div>\r\n <div class=\"edit-actions\">\r\n <button type=\"button\" class=\"btn cancel\" (click)=\"onClickCancel()\" mat-raised-button>Cancel</button>\r\n <button type=\"button\" class=\"save\" (click)=\"onClickSave(input)\" mat-raised-button color=\"primary\">Save</button>\r\n </div>\r\n </div>\r\n <div class=\"updated-content closed\" *ngIf=\"!isAddClickedOn && isUpdated\" (mouseenter)=\"onMouseEnter()\"\r\n (mouseleave)=\"onMouseLeave()\">\r\n <div class=\"edit-icon-container\" *ngIf=\"showEdit && isEditable\" (click)=\"onClickEdit()\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n <div class=\"updated\">\r\n <span class=\"updated-label\">\r\n <label for=\"input\">{{newLabel}}</label>\r\n </span>\r\n <span *ngIf=\"!showUnit\">{{value}}</span>\r\n <span *ngIf=\"showUnit\" class=\"updated-value\">\r\n {{value | dynamicPipe: unitType}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".container{display:block;width:100%}.open{height:120px}.closed{height:40px}.edit-icon-container{position:absolute;right:0%;transform:translate(0);top:0;cursor:pointer}.edit-icon-container:hover{background-color:gray;color:#fff;padding:2px}label,.updated-label{color:gray;margin-right:5px}#input{display:inline}.cancel{grid-column:1;grid-row:2;height:80%;width:80px}.save{grid-column:2;grid-row:2;height:80%;width:80px}.default-content{position:absolute}.input{width:280px;grid-column:2;grid-row:1}.input-box{width:200px}.input-label{grid-column:1;grid-row:1}.updated{position:absolute}.add{color:#00f}.add:hover{text-decoration:underline;cursor:pointer}.content{position:relative}.btn:focus{outline:none!important}.edit-content{position:absolute;left:50%;transform:translate(-50%);display:grid;grid-template-columns:150px 200px;grid-template-rows:50px 50px}.updated-content{display:block}.header{color:gray;border-bottom:1px solid grey;height:30px;font-size:20px;margin-bottom:10px;margin-top:10px}.input-with-appended-unit input{padding-left:20px;text-align:left}.input-with-appended-unit span{position:relative;left:20px;color:gray}.edit-actions{grid-column:2;grid-row:2;display:grid;grid-template-columns:50% 50%}\n"] }]
940
+ }], ctorParameters: function () { return []; }, propDecorators: { saveWasClicked: [{
941
+ type: Output
942
+ }], defaultvalue: [{
943
+ type: Input
944
+ }], inputType: [{
945
+ type: Input
946
+ }], newLabel: [{
947
+ type: Input
948
+ }], headerLabel: [{
949
+ type: Input
950
+ }], showUnit: [{
951
+ type: Input
952
+ }], unit: [{
953
+ type: Input
954
+ }], unitType: [{
955
+ type: Input
956
+ }], isEditable: [{
957
+ type: Input
958
+ }], showHeader: [{
959
+ type: Input
960
+ }], value: [{
961
+ type: Input
875
962
  }] } });
876
963
 
877
- class CustomDecimalPointTwoDigitsDirective {
878
- constructor(control) {
879
- this.control = control;
880
- }
881
- ngOnInit() {
882
- if (this.control.value) {
883
- this.control.valueAccessor.writeValue(this.transformToCommasAndPoint(this.control.value));
884
- }
885
- this.valueSubscription = this.control.control.valueChanges.subscribe(value => {
886
- if (value.length > 0) {
887
- let removeCommas = this.control.value.replace(/,/g, '');
888
- this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
889
- }
890
- else {
891
- this.control.control.setValue(null, { emitEvent: false, emitModelToViewChange: false });
892
- }
893
- });
894
- }
895
- onEvent($event) {
896
- if (this.control.value) {
897
- const item = $event.target;
898
- item.value = this.transformToCommasAndPoint(this.control.value);
899
- let removeCommas = this.control.value.replace(/,/g, '');
900
- this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
901
- }
902
- }
903
- transformToCommasAndPoint(value) {
904
- if (value.indexOf(".") == -1) {
905
- value = value.toString().replace(/\D/g, "")
906
- .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
907
- return value;
908
- }
909
- else {
910
- let val = value.split(".");
911
- let valueBeforeDecimal = val[0];
912
- let valueAfterDecimal = val[1];
913
- valueBeforeDecimal = valueBeforeDecimal.toString().replace(/\D/g, "")
914
- .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
915
- let newValue = `${valueBeforeDecimal}.${valueAfterDecimal}`;
916
- return newValue;
917
- }
918
- }
919
- }
920
- CustomDecimalPointTwoDigitsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, deps: [{ token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
921
- CustomDecimalPointTwoDigitsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: CustomDecimalPointTwoDigitsDirective, selector: "[customDecimalPointTwoDigits]", host: { listeners: { "input": "onEvent($event)" } }, providers: [NgModel, DecimalPipe], ngImport: i0 });
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, decorators: [{
923
- type: Directive,
924
- args: [{
925
- selector: '[customDecimalPointTwoDigits]',
926
- providers: [NgModel, DecimalPipe],
927
- }]
928
- }], ctorParameters: function () { return [{ type: i2$1.NgControl }]; }, propDecorators: { onEvent: [{
929
- type: HostListener,
930
- args: ["input", ["$event"]]
964
+ class CustomDecimalPointTwoDigitsDirective {
965
+ control;
966
+ valueSubscription;
967
+ constructor(control) {
968
+ this.control = control;
969
+ }
970
+ ngOnInit() {
971
+ if (this.control.value) {
972
+ this.control.valueAccessor.writeValue(this.transformToCommasAndPoint(this.control.value));
973
+ }
974
+ this.valueSubscription = this.control.control.valueChanges.subscribe(value => {
975
+ if (value.length > 0) {
976
+ let removeCommas = this.control.value.replace(/,/g, '');
977
+ this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
978
+ }
979
+ else {
980
+ this.control.control.setValue(null, { emitEvent: false, emitModelToViewChange: false });
981
+ }
982
+ });
983
+ }
984
+ onEvent($event) {
985
+ if (this.control.value) {
986
+ const item = $event.target;
987
+ item.value = this.transformToCommasAndPoint(this.control.value);
988
+ let removeCommas = this.control.value.replace(/,/g, '');
989
+ this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
990
+ }
991
+ }
992
+ transformToCommasAndPoint(value) {
993
+ if (value.indexOf(".") == -1) {
994
+ value = value.toString().replace(/\D/g, "")
995
+ .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
996
+ return value;
997
+ }
998
+ else {
999
+ let val = value.split(".");
1000
+ let valueBeforeDecimal = val[0];
1001
+ let valueAfterDecimal = val[1];
1002
+ valueBeforeDecimal = valueBeforeDecimal.toString().replace(/\D/g, "")
1003
+ .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1004
+ let newValue = `${valueBeforeDecimal}.${valueAfterDecimal}`;
1005
+ return newValue;
1006
+ }
1007
+ }
1008
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, deps: [{ token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
1009
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CustomDecimalPointTwoDigitsDirective, selector: "[customDecimalPointTwoDigits]", host: { listeners: { "input": "onEvent($event)" } }, providers: [NgModel, DecimalPipe], ngImport: i0 });
1010
+ }
1011
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, decorators: [{
1012
+ type: Directive,
1013
+ args: [{
1014
+ selector: '[customDecimalPointTwoDigits]',
1015
+ providers: [NgModel, DecimalPipe],
1016
+ }]
1017
+ }], ctorParameters: function () { return [{ type: i2$1.NgControl }]; }, propDecorators: { onEvent: [{
1018
+ type: HostListener,
1019
+ args: ["input", ["$event"]]
931
1020
  }] } });
932
1021
 
933
- class ValidationMessageService {
934
- }
935
- ValidationMessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
936
- ValidationMessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationMessageService, providedIn: 'root' });
937
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationMessageService, decorators: [{
938
- type: Injectable,
939
- args: [{
940
- providedIn: 'root'
941
- }]
942
- }] });
943
- class MinLengthValidationError {
944
- constructor(requirement) {
945
- this.requirement = requirement;
946
- }
947
- buildMessage() {
948
- return "Must be a minimum length of " + this.requirement + " letters!";
949
- }
950
- }
951
- class InvalidIntegerNumberValidatorEerror {
952
- buildMessage() {
953
- return "Must only contain numbers, no decimals or words allowed";
954
- }
955
- }
956
- class PositiveIntegerNumberValidatorError {
957
- buildMessage() {
958
- return "Must be a positive integer";
959
- }
960
- }
961
- class MaxLengthValidationError {
962
- constructor(requirement) {
963
- this.requirement = requirement;
964
- }
965
- buildMessage() {
966
- return "Must be a maximum length of " + this.requirement + " letters!";
967
- }
968
- }
969
- class MaxValidationError {
970
- constructor(requirement) {
971
- this.requirement = requirement;
972
- }
973
- buildMessage() {
974
- return "The largest acceptable input is " + this.requirement;
975
- }
976
- }
977
- class MinValidationError {
978
- constructor(requirement) {
979
- this.requirement = requirement;
980
- }
981
- buildMessage() {
982
- return "The smallest acceptable input is " + this.requirement;
983
- }
984
- }
985
- class PatternValidatorError {
986
- constructor(requirement) {
987
- this.requirement = requirement;
988
- }
989
- buildMessage() {
990
- if (this.requirement == '^[a-zA-Z ]*$') {
991
- return "This field must only contain words ";
992
- }
993
- else if (this.requirement == '/[0-9]-[0-9]+$/') {
994
- return "This field must only contain numbers and a - " + "<br>" + "Example: 71-716971";
995
- }
996
- else if (this.requirement = 'forDate') {
997
- return "Date needs to be DD/MM/YYYY";
998
- }
999
- }
1000
- }
1001
- class RequiredValidatorError {
1002
- buildMessage() {
1003
- return "This Field Is Required";
1004
- }
1005
- }
1006
- class EmailValidatorError {
1007
- buildMessage() {
1008
- return "Make Sure It Is An Email Format" + "<br>" + "example@jooler.io";
1009
- }
1010
- }
1011
- class ValidationError {
1012
- static getRelevantError(validationType, validationValue) {
1013
- let validationMessage;
1014
- validationMessage = this.MessageDictionary(validationValue, validationType);
1015
- return validationMessage;
1016
- }
1017
- static MessageDictionary(value, validationType) {
1018
- let ValidationMessageForInput = {
1019
- 'minlength': new MinLengthValidationError(value).buildMessage(),
1020
- 'maxlength': new MaxLengthValidationError(value).buildMessage(),
1021
- 'max': new MaxValidationError(value).buildMessage(),
1022
- 'min': new MinValidationError(value).buildMessage(),
1023
- 'pattern': new PatternValidatorError(value).buildMessage(),
1024
- 'required': new RequiredValidatorError().buildMessage(),
1025
- 'email': new EmailValidatorError().buildMessage(),
1026
- 'invalidIntegerNumber': new InvalidIntegerNumberValidatorEerror().buildMessage(),
1027
- 'invalidPositiveInteger': new PositiveIntegerNumberValidatorError().buildMessage(),
1028
- };
1029
- return ValidationMessageForInput[validationType];
1030
- }
1031
- }
1032
- ValidationError.validationMessageForDate = {
1033
- 'required': new RequiredValidatorError().buildMessage(),
1034
- 'pattern': new PatternValidatorError('forDate').buildMessage(),
1035
- };
1022
+ class ValidationMessageService {
1023
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1024
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, providedIn: 'root' });
1025
+ }
1026
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidationMessageService, decorators: [{
1027
+ type: Injectable,
1028
+ args: [{
1029
+ providedIn: 'root'
1030
+ }]
1031
+ }] });
1032
+ class MinLengthValidationError {
1033
+ requirement;
1034
+ constructor(requirement) {
1035
+ this.requirement = requirement;
1036
+ }
1037
+ buildMessage() {
1038
+ return "Must be a minimum length of " + this.requirement + " letters!";
1039
+ }
1040
+ }
1041
+ class InvalidIntegerNumberValidatorEerror {
1042
+ buildMessage() {
1043
+ return "Must only contain numbers, no decimals or words allowed";
1044
+ }
1045
+ }
1046
+ class PositiveIntegerNumberValidatorError {
1047
+ buildMessage() {
1048
+ return "Must be a positive integer";
1049
+ }
1050
+ }
1051
+ class MaxLengthValidationError {
1052
+ requirement;
1053
+ constructor(requirement) {
1054
+ this.requirement = requirement;
1055
+ }
1056
+ buildMessage() {
1057
+ return "Must be a maximum length of " + this.requirement + " letters!";
1058
+ }
1059
+ }
1060
+ class MaxValidationError {
1061
+ requirement;
1062
+ constructor(requirement) {
1063
+ this.requirement = requirement;
1064
+ }
1065
+ buildMessage() {
1066
+ return "The largest acceptable input is " + this.requirement;
1067
+ }
1068
+ }
1069
+ class MinValidationError {
1070
+ requirement;
1071
+ constructor(requirement) {
1072
+ this.requirement = requirement;
1073
+ }
1074
+ buildMessage() {
1075
+ return "The smallest acceptable input is " + this.requirement;
1076
+ }
1077
+ }
1078
+ class PatternValidatorError {
1079
+ requirement;
1080
+ constructor(requirement) {
1081
+ this.requirement = requirement;
1082
+ }
1083
+ buildMessage() {
1084
+ if (this.requirement == '^[a-zA-Z ]*$') {
1085
+ return "This field must only contain words ";
1086
+ }
1087
+ else if (this.requirement == '/[0-9]-[0-9]+$/') {
1088
+ return "This field must only contain numbers and a - " + "<br>" + "Example: 71-716971";
1089
+ }
1090
+ else if (this.requirement = 'forDate') {
1091
+ return "Date needs to be DD/MM/YYYY";
1092
+ }
1093
+ }
1094
+ }
1095
+ class RequiredValidatorError {
1096
+ buildMessage() {
1097
+ return "This Field Is Required";
1098
+ }
1099
+ }
1100
+ class EmailValidatorError {
1101
+ buildMessage() {
1102
+ return "Make Sure It Is An Email Format" + "<br>" + "example@jooler.io";
1103
+ }
1104
+ }
1105
+ class ValidationError {
1106
+ static getRelevantError(validationType, validationValue) {
1107
+ let validationMessage;
1108
+ validationMessage = this.MessageDictionary(validationValue, validationType);
1109
+ return validationMessage;
1110
+ }
1111
+ static MessageDictionary(value, validationType) {
1112
+ let ValidationMessageForInput = {
1113
+ 'minlength': new MinLengthValidationError(value).buildMessage(),
1114
+ 'maxlength': new MaxLengthValidationError(value).buildMessage(),
1115
+ 'max': new MaxValidationError(value).buildMessage(),
1116
+ 'min': new MinValidationError(value).buildMessage(),
1117
+ 'pattern': new PatternValidatorError(value).buildMessage(),
1118
+ 'required': new RequiredValidatorError().buildMessage(),
1119
+ 'email': new EmailValidatorError().buildMessage(),
1120
+ 'invalidIntegerNumber': new InvalidIntegerNumberValidatorEerror().buildMessage(),
1121
+ 'invalidPositiveInteger': new PositiveIntegerNumberValidatorError().buildMessage(),
1122
+ };
1123
+ return ValidationMessageForInput[validationType];
1124
+ }
1125
+ static validationMessageForDate = {
1126
+ 'required': new RequiredValidatorError().buildMessage(),
1127
+ 'pattern': new PatternValidatorError('forDate').buildMessage(),
1128
+ };
1129
+ }
1036
1130
 
1037
- class FormControlValidationMsgDirectiveForInput {
1038
- constructor(elRef, control) {
1039
- this.elRef = elRef;
1040
- this.control = control;
1041
- this.showBoxError = true;
1042
- this.beforeBegin = false;
1043
- this.afterEnd = false;
1044
- this.validationError = ValidationError;
1045
- }
1046
- ngOnInit() {
1047
- this.statusChangeSubscription = this.control.statusChanges.subscribe((status) => {
1048
- if (status == 'INVALID') {
1049
- this.showError();
1050
- }
1051
- else {
1052
- this.removeError();
1053
- }
1054
- });
1055
- this.control.valueChanges.subscribe({
1056
- next: (response) => {
1057
- if (this.control.errors) {
1058
- this.showError();
1059
- }
1060
- }
1061
- });
1062
- }
1063
- ngOnDestroy() {
1064
- this.statusChangeSubscription.unsubscribe();
1065
- }
1066
- handleBlurEvent(event) {
1067
- if (this.control.errors) {
1068
- this.showError();
1069
- }
1070
- else {
1071
- this.removeError();
1072
- }
1073
- }
1074
- showError() {
1075
- this.removeError();
1076
- const valErrors = this.control.errors;
1077
- const keys = Object.keys(valErrors);
1078
- for (let i = 0; i < keys.length; i++) {
1079
- switch (keys[i]) {
1080
- case 'minlength': {
1081
- let message = this.validationError.getRelevantError(keys[i], valErrors.minlength.requiredLength);
1082
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1083
- break;
1084
- }
1085
- case 'required': {
1086
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1087
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1088
- this.control.control.setErrors({ 'required': true, 'message': message }, { emitEvent: false });
1089
- break;
1090
- }
1091
- case 'maxlength': {
1092
- let message = this.validationError.getRelevantError(keys[i], valErrors.maxlength.requiredLength);
1093
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1094
- this.control.control.setErrors({ 'maxlength': { 'requiredLength': valErrors.maxlength.requiredLength }, 'message': message }, { emitEvent: false });
1095
- break;
1096
- }
1097
- case 'max': {
1098
- let message = this.validationError.getRelevantError(keys[i], valErrors.max.max);
1099
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1100
- this.control.control.setErrors({ 'message': message, 'max': { 'max': valErrors.max.max } }, { emitEvent: false });
1101
- break;
1102
- }
1103
- case 'min': {
1104
- let message = this.validationError.getRelevantError(keys[i], valErrors.min.min);
1105
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1106
- break;
1107
- }
1108
- case 'pattern': {
1109
- let message = this.validationError.getRelevantError(keys[i], valErrors.pattern.requiredPattern);
1110
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1111
- break;
1112
- }
1113
- case 'email': {
1114
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1115
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1116
- break;
1117
- }
1118
- case 'invalidIntegerNumber': {
1119
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1120
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1121
- break;
1122
- }
1123
- case 'invalidPositiveInteger': {
1124
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1125
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1126
- this.control.control.setErrors({ 'invalidPositiveInteger': true, 'message': message }, { emitEvent: false });
1127
- break;
1128
- }
1129
- }
1130
- }
1131
- if (this.showBoxError) {
1132
- const errDiv = '<div style="color:#C34243; width=100%; background-color: #FFDBDB; padding: 1rem; border-radius: .5rem; border: .1rem solid #A80002 ;border-left: .75rem solid #A80002; margin-top:.5rem; font-size: 1.2rem; " id="' + this.errorDivId + '">' + '<h3 style= " font-size: 1.3rem; margin-bottom:.5rem; margin:0; color: #A80002; font-weight: 700; line-height: 1.6rem;">' + 'Please Complete all details' + '</h3>' + this.errorMessage + '</div>';
1133
- if (!this.beforeBegin && !this.afterEnd)
1134
- this.elRef.nativeElement.parentElement.parentElement.parentElement.parentElement.insertAdjacentHTML('afterend', errDiv);
1135
- else if (this.beforeBegin)
1136
- this.elRef.nativeElement.insertAdjacentHTML('beforebegin', errDiv);
1137
- else if (this.afterEnd)
1138
- this.elRef.nativeElement.insertAdjacentHTML('afterend', errDiv);
1139
- else
1140
- throw Error("Adjustment not specified ");
1141
- }
1142
- }
1143
- removeError() {
1144
- this.errorMessage = "";
1145
- const errorElement = document.getElementById(this.errorDivId);
1146
- if (errorElement) {
1147
- errorElement.remove();
1148
- }
1149
- }
1150
- }
1151
- FormControlValidationMsgDirectiveForInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormControlValidationMsgDirectiveForInput, deps: [{ token: i0.ElementRef }, { token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
1152
- FormControlValidationMsgDirectiveForInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: FormControlValidationMsgDirectiveForInput, selector: "[appFormControlValidationMsgForInputs]", inputs: { showBoxError: "showBoxError", errorDivId: "errorDivId", beforeBegin: "beforeBegin", afterEnd: "afterEnd" }, host: { listeners: { "blur": "handleBlurEvent($event)" } }, providers: [NgModel], ngImport: i0 });
1153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormControlValidationMsgDirectiveForInput, decorators: [{
1154
- type: Directive,
1155
- args: [{
1156
- selector: '[appFormControlValidationMsgForInputs]',
1157
- providers: [NgModel],
1158
- }]
1159
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.NgControl }]; }, propDecorators: { showBoxError: [{
1160
- type: Input,
1161
- args: ['showBoxError']
1162
- }], errorDivId: [{
1163
- type: Input,
1164
- args: ['errorDivId']
1165
- }], beforeBegin: [{
1166
- type: Input,
1167
- args: ['beforeBegin']
1168
- }], afterEnd: [{
1169
- type: Input,
1170
- args: ['afterEnd']
1171
- }], handleBlurEvent: [{
1172
- type: HostListener,
1173
- args: ['blur', ["$event"]]
1131
+ class FormControlValidationMsgDirectiveForInput {
1132
+ elRef;
1133
+ control;
1134
+ errorMessage;
1135
+ errorNgSelectMessage;
1136
+ showBoxError = true;
1137
+ errorDivId;
1138
+ beforeBegin = false;
1139
+ afterEnd = false;
1140
+ validationError = ValidationError;
1141
+ statusChangeSubscription;
1142
+ constructor(elRef, control) {
1143
+ this.elRef = elRef;
1144
+ this.control = control;
1145
+ }
1146
+ ngOnInit() {
1147
+ this.statusChangeSubscription = this.control.statusChanges.subscribe((status) => {
1148
+ if (status == 'INVALID') {
1149
+ this.showError();
1150
+ }
1151
+ else {
1152
+ this.removeError();
1153
+ }
1154
+ });
1155
+ this.control.valueChanges.subscribe({
1156
+ next: (response) => {
1157
+ if (this.control.errors) {
1158
+ this.showError();
1159
+ }
1160
+ }
1161
+ });
1162
+ }
1163
+ ngOnDestroy() {
1164
+ this.statusChangeSubscription.unsubscribe();
1165
+ }
1166
+ handleBlurEvent(event) {
1167
+ if (this.control.errors) {
1168
+ this.showError();
1169
+ }
1170
+ else {
1171
+ this.removeError();
1172
+ }
1173
+ }
1174
+ showError() {
1175
+ this.removeError();
1176
+ const valErrors = this.control.errors;
1177
+ const keys = Object.keys(valErrors);
1178
+ for (let i = 0; i < keys.length; i++) {
1179
+ switch (keys[i]) {
1180
+ case 'minlength': {
1181
+ let message = this.validationError.getRelevantError(keys[i], valErrors.minlength.requiredLength);
1182
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1183
+ break;
1184
+ }
1185
+ case 'required': {
1186
+ let message = this.validationError.getRelevantError(keys[i], valErrors);
1187
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1188
+ this.control.control.setErrors({ 'required': true, 'message': message }, { emitEvent: false });
1189
+ break;
1190
+ }
1191
+ case 'maxlength': {
1192
+ let message = this.validationError.getRelevantError(keys[i], valErrors.maxlength.requiredLength);
1193
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1194
+ this.control.control.setErrors({ 'maxlength': { 'requiredLength': valErrors.maxlength.requiredLength }, 'message': message }, { emitEvent: false });
1195
+ break;
1196
+ }
1197
+ case 'max': {
1198
+ let message = this.validationError.getRelevantError(keys[i], valErrors.max.max);
1199
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1200
+ this.control.control.setErrors({ 'message': message, 'max': { 'max': valErrors.max.max } }, { emitEvent: false });
1201
+ break;
1202
+ }
1203
+ case 'min': {
1204
+ let message = this.validationError.getRelevantError(keys[i], valErrors.min.min);
1205
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1206
+ break;
1207
+ }
1208
+ case 'pattern': {
1209
+ let message = this.validationError.getRelevantError(keys[i], valErrors.pattern.requiredPattern);
1210
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1211
+ break;
1212
+ }
1213
+ case 'email': {
1214
+ let message = this.validationError.getRelevantError(keys[i], valErrors);
1215
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1216
+ break;
1217
+ }
1218
+ case 'invalidIntegerNumber': {
1219
+ let message = this.validationError.getRelevantError(keys[i], valErrors);
1220
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1221
+ break;
1222
+ }
1223
+ case 'invalidPositiveInteger': {
1224
+ let message = this.validationError.getRelevantError(keys[i], valErrors);
1225
+ this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1226
+ this.control.control.setErrors({ 'invalidPositiveInteger': true, 'message': message }, { emitEvent: false });
1227
+ break;
1228
+ }
1229
+ }
1230
+ }
1231
+ if (this.showBoxError) {
1232
+ const errDiv = '<div style="color:#C34243; width=100%; background-color: #FFDBDB; padding: 1rem; border-radius: .5rem; border: .1rem solid #A80002 ;border-left: .75rem solid #A80002; margin-top:.5rem; font-size: 1.2rem; " id="' + this.errorDivId + '">' + '<h3 style= " font-size: 1.3rem; margin-bottom:.5rem; margin:0; color: #A80002; font-weight: 700; line-height: 1.6rem;">' + 'Please Complete all details' + '</h3>' + this.errorMessage + '</div>';
1233
+ if (!this.beforeBegin && !this.afterEnd)
1234
+ this.elRef.nativeElement.parentElement.parentElement.parentElement.parentElement.insertAdjacentHTML('afterend', errDiv);
1235
+ else if (this.beforeBegin)
1236
+ this.elRef.nativeElement.insertAdjacentHTML('beforebegin', errDiv);
1237
+ else if (this.afterEnd)
1238
+ this.elRef.nativeElement.insertAdjacentHTML('afterend', errDiv);
1239
+ else
1240
+ throw Error("Adjustment not specified ");
1241
+ }
1242
+ }
1243
+ removeError() {
1244
+ this.errorMessage = "";
1245
+ const errorElement = document.getElementById(this.errorDivId);
1246
+ if (errorElement) {
1247
+ errorElement.remove();
1248
+ }
1249
+ }
1250
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormControlValidationMsgDirectiveForInput, deps: [{ token: i0.ElementRef }, { token: i2$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
1251
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FormControlValidationMsgDirectiveForInput, selector: "[appFormControlValidationMsgForInputs]", inputs: { showBoxError: "showBoxError", errorDivId: "errorDivId", beforeBegin: "beforeBegin", afterEnd: "afterEnd" }, host: { listeners: { "blur": "handleBlurEvent($event)" } }, providers: [NgModel], ngImport: i0 });
1252
+ }
1253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormControlValidationMsgDirectiveForInput, decorators: [{
1254
+ type: Directive,
1255
+ args: [{
1256
+ selector: '[appFormControlValidationMsgForInputs]',
1257
+ providers: [NgModel],
1258
+ }]
1259
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.NgControl }]; }, propDecorators: { showBoxError: [{
1260
+ type: Input,
1261
+ args: ['showBoxError']
1262
+ }], errorDivId: [{
1263
+ type: Input,
1264
+ args: ['errorDivId']
1265
+ }], beforeBegin: [{
1266
+ type: Input,
1267
+ args: ['beforeBegin']
1268
+ }], afterEnd: [{
1269
+ type: Input,
1270
+ args: ['afterEnd']
1271
+ }], handleBlurEvent: [{
1272
+ type: HostListener,
1273
+ args: ['blur', ["$event"]]
1174
1274
  }] } });
1175
1275
 
1176
- class GeneralInputRendererComponent {
1177
- constructor() { }
1178
- agInit(params) {
1179
- this.params = params;
1180
- this.formGroup = this.params.context.formGroup.get('entries').at(params.node.rowIndex);
1181
- this.key = params.context.createKey(params.columnApi, params.column);
1182
- if (params.isTypeNumber) {
1183
- if (params.value) {
1184
- this.value = new DecimalPipe("en-US").transform(+params.value, "1.0-0");
1185
- }
1186
- }
1187
- else {
1188
- this.value = params.value;
1189
- }
1190
- }
1191
- onCellDataChanged($event) {
1192
- let value = $event.target.value;
1193
- let newAndOldValue = {
1194
- newValue: value,
1195
- oldValue: this.params?.value
1196
- };
1197
- if (this.params.allowUpdateRowData) {
1198
- this.params.onChange(newAndOldValue);
1199
- }
1200
- }
1201
- refresh(params) {
1202
- this.formGroup = this.params.context.formGroup.get('entries').at(params.node.rowIndex);
1203
- return true;
1204
- }
1205
- }
1206
- GeneralInputRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GeneralInputRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1207
- GeneralInputRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GeneralInputRendererComponent, selector: "general-input-renderer-test", ngImport: i0, template: "<div *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\r\n <div *ngIf=\"params.isTypeText\">\r\n <input [placeholder]=\"params.fieldLabel\"appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'text'\" \r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key) && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeNumber\">\r\n <input customDecimalPointTwoDigits appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'number'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeIntegerNumber\">\r\n <input appFormControlValidationMsgForInputs [showBoxError]=\"false\"type=\"number\"\r\n [errorDivId]=\"'integer'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeTextArea\">\r\n <textarea class=\"text-area\" (change)=\"onCellDataChanged($event)\"\r\n [placeholder]=\"params.fieldLabel\" class=\"main-height\"\r\n [formControlName]=\"key\"></textarea>\r\n </div>\r\n</div>", styles: ["textarea{padding-left:.5rem;border-radius:.3rem;height:3.5rem;font-size:1.2rem;border:solid #BEBEBE .1rem}textarea:focus{outline:none}textarea::placeholder{color:#676767}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: CustomDecimalPointTwoDigitsDirective, selector: "[customDecimalPointTwoDigits]" }, { kind: "component", type: ShowTableErrorsComponent, selector: "show-table-errors", inputs: ["message"] }, { kind: "directive", type: FormControlValidationMsgDirectiveForInput, selector: "[appFormControlValidationMsgForInputs]", inputs: ["showBoxError", "errorDivId", "beforeBegin", "afterEnd"] }] });
1208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GeneralInputRendererComponent, decorators: [{
1209
- type: Component,
1210
- args: [{ selector: 'general-input-renderer-test', template: "<div *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\r\n <div *ngIf=\"params.isTypeText\">\r\n <input [placeholder]=\"params.fieldLabel\"appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'text'\" \r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key) && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeNumber\">\r\n <input customDecimalPointTwoDigits appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'number'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeIntegerNumber\">\r\n <input appFormControlValidationMsgForInputs [showBoxError]=\"false\"type=\"number\"\r\n [errorDivId]=\"'integer'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeTextArea\">\r\n <textarea class=\"text-area\" (change)=\"onCellDataChanged($event)\"\r\n [placeholder]=\"params.fieldLabel\" class=\"main-height\"\r\n [formControlName]=\"key\"></textarea>\r\n </div>\r\n</div>", styles: ["textarea{padding-left:.5rem;border-radius:.3rem;height:3.5rem;font-size:1.2rem;border:solid #BEBEBE .1rem}textarea:focus{outline:none}textarea::placeholder{color:#676767}\n"] }]
1276
+ class GeneralInputRendererComponent {
1277
+ params;
1278
+ key;
1279
+ value;
1280
+ formGroup;
1281
+ formControlName;
1282
+ constructor() { }
1283
+ agInit(params) {
1284
+ this.params = params;
1285
+ this.formGroup = this.params.context.formGroup.get('entries').at(params.node.rowIndex);
1286
+ this.key = params.context.createKey(params.columnApi, params.column);
1287
+ if (params.isTypeNumber) {
1288
+ if (params.value) {
1289
+ this.value = new DecimalPipe("en-US").transform(+params.value, "1.0-0");
1290
+ }
1291
+ }
1292
+ else {
1293
+ this.value = params.value;
1294
+ }
1295
+ }
1296
+ onCellDataChanged($event) {
1297
+ let value = $event.target.value;
1298
+ let newAndOldValue = {
1299
+ newValue: value,
1300
+ oldValue: this.params?.value
1301
+ };
1302
+ if (this.params.allowUpdateRowData) {
1303
+ this.params.onChange(newAndOldValue);
1304
+ }
1305
+ }
1306
+ refresh(params) {
1307
+ this.formGroup = this.params.context.formGroup.get('entries').at(params.node.rowIndex);
1308
+ return true;
1309
+ }
1310
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GeneralInputRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1311
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GeneralInputRendererComponent, selector: "general-input-renderer-test", ngImport: i0, template: "<div *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\r\n <div *ngIf=\"params.isTypeText\">\r\n <input [placeholder]=\"params.fieldLabel\"appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'text'\" \r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key) && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeNumber\">\r\n <input customDecimalPointTwoDigits appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'number'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeIntegerNumber\">\r\n <input appFormControlValidationMsgForInputs [showBoxError]=\"false\"type=\"number\"\r\n [errorDivId]=\"'integer'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeTextArea\">\r\n <textarea class=\"text-area\" (change)=\"onCellDataChanged($event)\"\r\n [placeholder]=\"params.fieldLabel\" class=\"main-height\"\r\n [formControlName]=\"key\"></textarea>\r\n </div>\r\n</div>", styles: ["textarea{padding-left:.5rem;border-radius:.3rem;height:3.5rem;font-size:1.2rem;border:solid #BEBEBE .1rem}textarea:focus{outline:none}textarea::placeholder{color:#676767}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: CustomDecimalPointTwoDigitsDirective, selector: "[customDecimalPointTwoDigits]" }, { kind: "component", type: ShowTableErrorsComponent, selector: "show-table-errors", inputs: ["message"] }, { kind: "directive", type: FormControlValidationMsgDirectiveForInput, selector: "[appFormControlValidationMsgForInputs]", inputs: ["showBoxError", "errorDivId", "beforeBegin", "afterEnd"] }] });
1312
+ }
1313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GeneralInputRendererComponent, decorators: [{
1314
+ type: Component,
1315
+ args: [{ selector: 'general-input-renderer-test', template: "<div *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\r\n <div *ngIf=\"params.isTypeText\">\r\n <input [placeholder]=\"params.fieldLabel\"appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'text'\" \r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key) && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeNumber\">\r\n <input customDecimalPointTwoDigits appFormControlValidationMsgForInputs [showBoxError]=\"false\"\r\n [errorDivId]=\"'number'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeIntegerNumber\">\r\n <input appFormControlValidationMsgForInputs [showBoxError]=\"false\"type=\"number\"\r\n [errorDivId]=\"'integer'\" [placeholder]=\"params.fieldLabel\"\r\n (change)=\"onCellDataChanged($event)\" [formControlName]=\"key\" />\r\n <span *ngIf=\"params.showSymbol\"\r\n style=\"margin-left:-20px ;\">{{params.symbol}}</span>\r\n <show-table-errors\r\n *ngIf=\"formGroup.get(this.key).errors && formGroup.get(this.key).touched\"\r\n [message]=\"formGroup.get(this.key).errors.message\"></show-table-errors>\r\n </div>\r\n <div *ngIf=\"params.isTypeTextArea\">\r\n <textarea class=\"text-area\" (change)=\"onCellDataChanged($event)\"\r\n [placeholder]=\"params.fieldLabel\" class=\"main-height\"\r\n [formControlName]=\"key\"></textarea>\r\n </div>\r\n</div>", styles: ["textarea{padding-left:.5rem;border-radius:.3rem;height:3.5rem;font-size:1.2rem;border:solid #BEBEBE .1rem}textarea:focus{outline:none}textarea::placeholder{color:#676767}\n"] }]
1211
1316
  }], ctorParameters: function () { return []; } });
1212
1317
 
1213
- class LabelAndField {
1318
+ class LabelAndField {
1319
+ label;
1320
+ field;
1214
1321
  }
1215
1322
 
1216
- var DropdownActionType;
1217
- (function (DropdownActionType) {
1218
- DropdownActionType[DropdownActionType["ADD"] = 0] = "ADD";
1219
- DropdownActionType[DropdownActionType["MENU"] = 1] = "MENU";
1323
+ var DropdownActionType;
1324
+ (function (DropdownActionType) {
1325
+ DropdownActionType[DropdownActionType["ADD"] = 0] = "ADD";
1326
+ DropdownActionType[DropdownActionType["MENU"] = 1] = "MENU";
1220
1327
  })(DropdownActionType || (DropdownActionType = {}));
1221
1328
 
1222
- class DropdownActionsComponent {
1223
- constructor(_Router) {
1224
- this._Router = _Router;
1225
- this.dropdownActionTypes = DropdownActionType;
1226
- this.canRoute = true;
1227
- this.labelsAndRoutes = [];
1228
- this.dropdownActionType = this.dropdownActionTypes.ADD;
1229
- this.addClicked = new EventEmitter();
1230
- }
1231
- ngOnInit() {
1232
- this.validateActions();
1233
- }
1234
- validateActions() {
1235
- if (this.dropdownActionType == this.dropdownActionTypes.ADD) {
1236
- if (this.canRoute) {
1237
- if (this.route == "" || this.route == undefined || this.route == null) {
1238
- throw Error("Route needs to be provided.");
1239
- }
1240
- }
1241
- else {
1242
- if (this.route) {
1243
- throw Error("Route shouldn't be provided since canRoute is false");
1244
- }
1245
- }
1246
- }
1247
- else if (this.dropdownActionType == this.dropdownActionTypes.MENU) {
1248
- if (!this.labelsAndRoutes.length) {
1249
- throw Error("A list of labels & Routes need to be provided for the actions menu.");
1250
- }
1251
- }
1252
- else {
1253
- throw Error("Dropdown Action Type is not recognized.");
1254
- }
1255
- }
1256
- onClickAdd($event) {
1257
- $event.preventDefault();
1258
- if (this.canRoute && this.route) {
1259
- this._Router.navigate([this.route]);
1260
- }
1261
- this.addClicked.emit();
1262
- }
1263
- onClickLabel(route, $event) {
1264
- $event.preventDefault();
1265
- this._Router.navigate([route]);
1266
- }
1267
- }
1268
- DropdownActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DropdownActionsComponent, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component });
1269
- DropdownActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DropdownActionsComponent, selector: "dropdown-actions", inputs: { canRoute: "canRoute", disabled: "disabled", labelsAndRoutes: "labelsAndRoutes", route: "route", dropdownActionType: "dropdownActionType" }, outputs: { addClicked: "addClicked" }, ngImport: i0, template: "<div [ngSwitch]=\"dropdownActionType\">\r\n <a *ngSwitchCase=\"dropdownActionTypes.ADD\" [href]=\"route\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n (click)=\"onClickAdd($event)\">\r\n <fa-icon icon=\"plus\"></fa-icon>\r\n </a>\r\n <fa-icon *ngSwitchCase=\"dropdownActionTypes.MENU\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n class=\"menu\" [matMenuTriggerFor]=\"menu\"\r\n icon=\"ellipsis-vertical\"></fa-icon>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let labelAndRoute of labelsAndRoutes\" mat-menu-item>\r\n <a [href]=\"labelAndRoute.route\"\r\n (click)=\"onClickLabel(labelAndRoute.route, $event)\">{{labelAndRoute.label}}</a>\r\n </button>\r\n </mat-menu>\r\n</div>", styles: [".action-enabled{cursor:pointer;color:#155ed4}.action-enabled:hover{color:#3178eb}.disabled{color:#676767;cursor:initial;pointer-events:none}.menu{font-size:1.8rem;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
1270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DropdownActionsComponent, decorators: [{
1271
- type: Component,
1272
- args: [{ selector: 'dropdown-actions', template: "<div [ngSwitch]=\"dropdownActionType\">\r\n <a *ngSwitchCase=\"dropdownActionTypes.ADD\" [href]=\"route\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n (click)=\"onClickAdd($event)\">\r\n <fa-icon icon=\"plus\"></fa-icon>\r\n </a>\r\n <fa-icon *ngSwitchCase=\"dropdownActionTypes.MENU\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n class=\"menu\" [matMenuTriggerFor]=\"menu\"\r\n icon=\"ellipsis-vertical\"></fa-icon>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let labelAndRoute of labelsAndRoutes\" mat-menu-item>\r\n <a [href]=\"labelAndRoute.route\"\r\n (click)=\"onClickLabel(labelAndRoute.route, $event)\">{{labelAndRoute.label}}</a>\r\n </button>\r\n </mat-menu>\r\n</div>", styles: [".action-enabled{cursor:pointer;color:#155ed4}.action-enabled:hover{color:#3178eb}.disabled{color:#676767;cursor:initial;pointer-events:none}.menu{font-size:1.8rem;display:flex;align-items:center}\n"] }]
1273
- }], ctorParameters: function () { return [{ type: i1$2.Router }]; }, propDecorators: { canRoute: [{
1274
- type: Input
1275
- }], disabled: [{
1276
- type: Input
1277
- }], labelsAndRoutes: [{
1278
- type: Input
1279
- }], route: [{
1280
- type: Input
1281
- }], dropdownActionType: [{
1282
- type: Input
1283
- }], addClicked: [{
1284
- type: Output
1329
+ class DropdownActionsComponent {
1330
+ _Router;
1331
+ dropdownActionTypes = DropdownActionType;
1332
+ canRoute = true;
1333
+ disabled;
1334
+ labelsAndRoutes = [];
1335
+ route;
1336
+ dropdownActionType = this.dropdownActionTypes.ADD;
1337
+ addClicked = new EventEmitter();
1338
+ constructor(_Router) {
1339
+ this._Router = _Router;
1340
+ }
1341
+ ngOnInit() {
1342
+ this.validateActions();
1343
+ }
1344
+ validateActions() {
1345
+ if (this.dropdownActionType == this.dropdownActionTypes.ADD) {
1346
+ if (this.canRoute) {
1347
+ if (this.route == "" || this.route == undefined || this.route == null) {
1348
+ throw Error("Route needs to be provided.");
1349
+ }
1350
+ }
1351
+ else {
1352
+ if (this.route) {
1353
+ throw Error("Route shouldn't be provided since canRoute is false");
1354
+ }
1355
+ }
1356
+ }
1357
+ else if (this.dropdownActionType == this.dropdownActionTypes.MENU) {
1358
+ if (!this.labelsAndRoutes.length) {
1359
+ throw Error("A list of labels & Routes need to be provided for the actions menu.");
1360
+ }
1361
+ }
1362
+ else {
1363
+ throw Error("Dropdown Action Type is not recognized.");
1364
+ }
1365
+ }
1366
+ onClickAdd($event) {
1367
+ $event.preventDefault();
1368
+ if (this.canRoute && this.route) {
1369
+ this._Router.navigate([this.route]);
1370
+ }
1371
+ this.addClicked.emit();
1372
+ }
1373
+ onClickLabel(route, $event) {
1374
+ $event.preventDefault();
1375
+ this._Router.navigate([route]);
1376
+ }
1377
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownActionsComponent, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component });
1378
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownActionsComponent, selector: "dropdown-actions", inputs: { canRoute: "canRoute", disabled: "disabled", labelsAndRoutes: "labelsAndRoutes", route: "route", dropdownActionType: "dropdownActionType" }, outputs: { addClicked: "addClicked" }, ngImport: i0, template: "<div [ngSwitch]=\"dropdownActionType\">\r\n <a *ngSwitchCase=\"dropdownActionTypes.ADD\" [href]=\"route\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n (click)=\"onClickAdd($event)\">\r\n <fa-icon icon=\"plus\"></fa-icon>\r\n </a>\r\n <fa-icon *ngSwitchCase=\"dropdownActionTypes.MENU\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n class=\"menu\" [matMenuTriggerFor]=\"menu\"\r\n icon=\"ellipsis-vertical\"></fa-icon>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let labelAndRoute of labelsAndRoutes\" mat-menu-item>\r\n <a [href]=\"labelAndRoute.route\"\r\n (click)=\"onClickLabel(labelAndRoute.route, $event)\">{{labelAndRoute.label}}</a>\r\n </button>\r\n </mat-menu>\r\n</div>", styles: [".action-enabled{cursor:pointer;color:#155ed4}.action-enabled:hover{color:#3178eb}.disabled{color:#676767;cursor:initial;pointer-events:none}.menu{font-size:1.8rem;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i2$2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
1379
+ }
1380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownActionsComponent, decorators: [{
1381
+ type: Component,
1382
+ args: [{ selector: 'dropdown-actions', template: "<div [ngSwitch]=\"dropdownActionType\">\r\n <a *ngSwitchCase=\"dropdownActionTypes.ADD\" [href]=\"route\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n (click)=\"onClickAdd($event)\">\r\n <fa-icon icon=\"plus\"></fa-icon>\r\n </a>\r\n <fa-icon *ngSwitchCase=\"dropdownActionTypes.MENU\"\r\n [ngClass]=\"{'action-enabled':!disabled, 'disabled': disabled}\"\r\n class=\"menu\" [matMenuTriggerFor]=\"menu\"\r\n icon=\"ellipsis-vertical\"></fa-icon>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let labelAndRoute of labelsAndRoutes\" mat-menu-item>\r\n <a [href]=\"labelAndRoute.route\"\r\n (click)=\"onClickLabel(labelAndRoute.route, $event)\">{{labelAndRoute.label}}</a>\r\n </button>\r\n </mat-menu>\r\n</div>", styles: [".action-enabled{cursor:pointer;color:#155ed4}.action-enabled:hover{color:#3178eb}.disabled{color:#676767;cursor:initial;pointer-events:none}.menu{font-size:1.8rem;display:flex;align-items:center}\n"] }]
1383
+ }], ctorParameters: function () { return [{ type: i1$2.Router }]; }, propDecorators: { canRoute: [{
1384
+ type: Input
1385
+ }], disabled: [{
1386
+ type: Input
1387
+ }], labelsAndRoutes: [{
1388
+ type: Input
1389
+ }], route: [{
1390
+ type: Input
1391
+ }], dropdownActionType: [{
1392
+ type: Input
1393
+ }], addClicked: [{
1394
+ type: Output
1285
1395
  }] } });
1286
1396
 
1287
- class PrimaryColors {
1288
- }
1289
- PrimaryColors.$primaryBlueColor = '#155ED4';
1290
- PrimaryColors.$primaryPinkColor = '#F0509C';
1291
- PrimaryColors.$primaryTealColor = '#12957E';
1292
- PrimaryColors.$primaryCarbonColor = '#32353B';
1293
- PrimaryColors.$primaryPurpleColor = '#E3B1EB';
1294
- PrimaryColors.$primaryRedColor = '#A80002';
1295
- PrimaryColors.$primaryLightRedColor = '#FFDBDB';
1296
- PrimaryColors.$primaryLightGrayBlueColor = '#f7f8f9';
1297
- PrimaryColors.$primaryLightGrayColor = '#f0f0f0';
1397
+ class PrimaryColors {
1398
+ static $primaryBlueColor = '#155ED4';
1399
+ static $primaryPinkColor = '#F0509C';
1400
+ static $primaryTealColor = '#12957E';
1401
+ static $primaryCarbonColor = '#32353B';
1402
+ static $primaryPurpleColor = '#E3B1EB';
1403
+ static $primaryRedColor = '#A80002';
1404
+ static $primaryLightRedColor = '#FFDBDB';
1405
+ static $primaryLightGrayBlueColor = '#f7f8f9';
1406
+ static $primaryLightGrayColor = '#f0f0f0';
1407
+ }
1298
1408
 
1299
- class AddAsteriskDirective {
1300
- constructor(elem) {
1301
- this.elem = elem;
1302
- this.show = true;
1303
- }
1304
- ngOnInit() {
1305
- this.toggleAsterisk();
1306
- }
1307
- ngOnChanges(changes) {
1308
- this.toggleAsterisk();
1309
- }
1310
- toggleAsterisk() {
1311
- const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
1312
- if (this.show) {
1313
- if (!existingAsterisk) {
1314
- const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
1315
- this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
1316
- }
1317
- }
1318
- else {
1319
- if (existingAsterisk) {
1320
- existingAsterisk.remove();
1321
- }
1322
- }
1323
- }
1324
- }
1325
- AddAsteriskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1326
- AddAsteriskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
1327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, decorators: [{
1328
- type: Directive,
1329
- args: [{
1330
- selector: '[addAsterisk]'
1331
- }]
1332
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
1333
- type: Input,
1334
- args: ['show']
1409
+ class AddAsteriskDirective {
1410
+ elem;
1411
+ show = true;
1412
+ constructor(elem) {
1413
+ this.elem = elem;
1414
+ }
1415
+ ngOnInit() {
1416
+ this.toggleAsterisk();
1417
+ }
1418
+ ngOnChanges(changes) {
1419
+ this.toggleAsterisk();
1420
+ }
1421
+ toggleAsterisk() {
1422
+ const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
1423
+ if (this.show) {
1424
+ if (!existingAsterisk) {
1425
+ const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
1426
+ this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
1427
+ }
1428
+ }
1429
+ else {
1430
+ if (existingAsterisk) {
1431
+ existingAsterisk.remove();
1432
+ }
1433
+ }
1434
+ }
1435
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1436
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
1437
+ }
1438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AddAsteriskDirective, decorators: [{
1439
+ type: Directive,
1440
+ args: [{
1441
+ selector: '[addAsterisk]'
1442
+ }]
1443
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
1444
+ type: Input,
1445
+ args: ['show']
1335
1446
  }] } });
1336
1447
 
1337
- class InputsModule {
1338
- static forRoot(environment) {
1339
- return {
1340
- ngModule: InputsModule,
1341
- providers: [
1342
- ChooseGeneralItemService,
1343
- {
1344
- provide: 'env',
1345
- useValue: environment
1346
- }
1347
- ]
1348
- };
1349
- }
1350
- }
1351
- InputsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1352
- InputsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, declarations: [ChooseEnumComponent,
1353
- ChooseEnumRendererComponent,
1354
- ChooseGeneralItemComponent,
1355
- GeneralInputRendererComponent,
1356
- ChooseLineTypeComponent,
1357
- ChooseYesOrNoComponent,
1358
- ChooseYesOrNoRendererComponent,
1359
- EditableSavableInputComponent,
1360
- DynamicPipe,
1361
- ChooseGeneralItemRendererComponent,
1362
- CustomDecimalPointTwoDigitsDirective,
1363
- ShowTableErrorsComponent,
1364
- FormControlValidationMsgDirectiveForInput,
1365
- DropdownActionsComponent,
1366
- AddAsteriskDirective], imports: [CommonModule,
1367
- NgSelectModule,
1368
- FormsModule,
1369
- ReactiveFormsModule,
1370
- AppMaterialModule,
1371
- SharedGeneralComponentsModule,
1372
- FontAwesomeModule], exports: [ChooseEnumComponent,
1373
- ChooseEnumRendererComponent,
1374
- ChooseGeneralItemComponent,
1375
- GeneralInputRendererComponent,
1376
- ChooseLineTypeComponent,
1377
- ChooseYesOrNoComponent,
1378
- ChooseYesOrNoRendererComponent,
1379
- EditableSavableInputComponent,
1380
- DropdownActionsComponent,
1381
- DynamicPipe,
1382
- AddAsteriskDirective] });
1383
- InputsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, imports: [CommonModule,
1384
- NgSelectModule,
1385
- FormsModule,
1386
- ReactiveFormsModule,
1387
- AppMaterialModule,
1388
- SharedGeneralComponentsModule,
1389
- FontAwesomeModule] });
1390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, decorators: [{
1391
- type: NgModule,
1392
- args: [{
1393
- declarations: [
1394
- ChooseEnumComponent,
1395
- ChooseEnumRendererComponent,
1396
- ChooseGeneralItemComponent,
1397
- GeneralInputRendererComponent,
1398
- ChooseLineTypeComponent,
1399
- ChooseYesOrNoComponent,
1400
- ChooseYesOrNoRendererComponent,
1401
- EditableSavableInputComponent,
1402
- DynamicPipe,
1403
- ChooseGeneralItemRendererComponent,
1404
- CustomDecimalPointTwoDigitsDirective,
1405
- ShowTableErrorsComponent,
1406
- FormControlValidationMsgDirectiveForInput,
1407
- DropdownActionsComponent,
1408
- AddAsteriskDirective
1409
- ],
1410
- imports: [
1411
- CommonModule,
1412
- NgSelectModule,
1413
- FormsModule,
1414
- ReactiveFormsModule,
1415
- AppMaterialModule,
1416
- SharedGeneralComponentsModule,
1417
- FontAwesomeModule,
1418
- ],
1419
- exports: [
1420
- ChooseEnumComponent,
1421
- ChooseEnumRendererComponent,
1422
- ChooseGeneralItemComponent,
1423
- GeneralInputRendererComponent,
1424
- ChooseLineTypeComponent,
1425
- ChooseYesOrNoComponent,
1426
- ChooseYesOrNoRendererComponent,
1427
- EditableSavableInputComponent,
1428
- DropdownActionsComponent,
1429
- DynamicPipe,
1430
- AddAsteriskDirective
1431
- ]
1432
- }]
1448
+ class InputsModule {
1449
+ static forRoot(environment) {
1450
+ return {
1451
+ ngModule: InputsModule,
1452
+ providers: [
1453
+ ChooseGeneralItemService,
1454
+ {
1455
+ provide: 'env',
1456
+ useValue: environment
1457
+ }
1458
+ ]
1459
+ };
1460
+ }
1461
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1462
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, declarations: [ChooseEnumComponent,
1463
+ ChooseEnumRendererComponent,
1464
+ ChooseGeneralItemComponent,
1465
+ GeneralInputRendererComponent,
1466
+ ChooseLineTypeComponent,
1467
+ ChooseYesOrNoComponent,
1468
+ ChooseYesOrNoRendererComponent,
1469
+ EditableSavableInputComponent,
1470
+ DynamicPipe,
1471
+ ChooseGeneralItemRendererComponent,
1472
+ CustomDecimalPointTwoDigitsDirective,
1473
+ ShowTableErrorsComponent,
1474
+ FormControlValidationMsgDirectiveForInput,
1475
+ DropdownActionsComponent,
1476
+ AddAsteriskDirective], imports: [CommonModule,
1477
+ NgSelectModule,
1478
+ FormsModule,
1479
+ ReactiveFormsModule,
1480
+ AppMaterialModule,
1481
+ SharedGeneralComponentsModule,
1482
+ FontAwesomeModule], exports: [ChooseEnumComponent,
1483
+ ChooseEnumRendererComponent,
1484
+ ChooseGeneralItemComponent,
1485
+ GeneralInputRendererComponent,
1486
+ ChooseLineTypeComponent,
1487
+ ChooseYesOrNoComponent,
1488
+ ChooseYesOrNoRendererComponent,
1489
+ EditableSavableInputComponent,
1490
+ DropdownActionsComponent,
1491
+ DynamicPipe,
1492
+ AddAsteriskDirective] });
1493
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, imports: [CommonModule,
1494
+ NgSelectModule,
1495
+ FormsModule,
1496
+ ReactiveFormsModule,
1497
+ AppMaterialModule,
1498
+ SharedGeneralComponentsModule,
1499
+ FontAwesomeModule] });
1500
+ }
1501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, decorators: [{
1502
+ type: NgModule,
1503
+ args: [{
1504
+ declarations: [
1505
+ ChooseEnumComponent,
1506
+ ChooseEnumRendererComponent,
1507
+ ChooseGeneralItemComponent,
1508
+ GeneralInputRendererComponent,
1509
+ ChooseLineTypeComponent,
1510
+ ChooseYesOrNoComponent,
1511
+ ChooseYesOrNoRendererComponent,
1512
+ EditableSavableInputComponent,
1513
+ DynamicPipe,
1514
+ ChooseGeneralItemRendererComponent,
1515
+ CustomDecimalPointTwoDigitsDirective,
1516
+ ShowTableErrorsComponent,
1517
+ FormControlValidationMsgDirectiveForInput,
1518
+ DropdownActionsComponent,
1519
+ AddAsteriskDirective
1520
+ ],
1521
+ imports: [
1522
+ CommonModule,
1523
+ NgSelectModule,
1524
+ FormsModule,
1525
+ ReactiveFormsModule,
1526
+ AppMaterialModule,
1527
+ SharedGeneralComponentsModule,
1528
+ FontAwesomeModule,
1529
+ ],
1530
+ exports: [
1531
+ ChooseEnumComponent,
1532
+ ChooseEnumRendererComponent,
1533
+ ChooseGeneralItemComponent,
1534
+ GeneralInputRendererComponent,
1535
+ ChooseLineTypeComponent,
1536
+ ChooseYesOrNoComponent,
1537
+ ChooseYesOrNoRendererComponent,
1538
+ EditableSavableInputComponent,
1539
+ DropdownActionsComponent,
1540
+ DynamicPipe,
1541
+ AddAsteriskDirective
1542
+ ]
1543
+ }]
1433
1544
  }] });
1434
1545
 
1435
- /*
1436
- * Public API Surface of inputs
1546
+ /*
1547
+ * Public API Surface of inputs
1437
1548
  */
1438
1549
 
1439
- /**
1440
- * Generated bundle index. Do not edit.
1550
+ /**
1551
+ * Generated bundle index. Do not edit.
1441
1552
  */
1442
1553
 
1443
1554
  export { AddAsteriskDirective, ChooseEnumComponent, ChooseEnumRendererComponent, ChooseGeneralItemComponent, ChooseGeneralItemRendererComponent, ChooseGeneralItemService, ChooseLineTypeComponent, ChooseYesOrNoComponent, ChooseYesOrNoRendererComponent, DropdownActionType, DropdownActionsComponent, DynamicPipe, EditableSavableInputComponent, FormControlValidationMsgDirectiveForInput, GeneralInputRendererComponent, InputsModule, LabelAndField, PrimaryColors, ShowTableErrorsComponent };