@jooler/inputs 0.0.50 → 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 (88) 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/{esm2020 → esm2022}/lib/models/enum-helper-functions.mjs +56 -56
  23. package/{esm2020 → esm2022}/lib/models/enum-helper.model.mjs +1 -1
  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 +1481 -1397
  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 -8
  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 -5
  56. package/lib/models/enum-helper.model.d.ts +6 -6
  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 -176
  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 -104
  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/line-type-model-helper.mjs +0 -47
  82. package/esm2020/lib/models/yes-or-no.model.mjs +0 -3
  83. package/esm2020/lib/primary-colors.mjs +0 -12
  84. package/esm2020/lib/services/validation-message.service.mjs +0 -106
  85. package/esm2020/lib/show-table-errors/show-table-errors.component.mjs +0 -23
  86. package/fesm2015/inputs.mjs +0 -1475
  87. package/fesm2015/inputs.mjs.map +0 -1
  88. package/fesm2020/inputs.mjs.map +0 -1
@@ -17,1454 +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
- ];
101
- CustomTheme.$joolerCombo = [
102
- '#b9cff2',
103
- '#b8dfd8',
104
- '#ffaaaa',
105
- '#fbcbe1',
106
- '#f1d8f5',
107
- '#8aafea',
108
- '#97ffe1',
109
- '#ff7777',
110
- '#f585ba',
111
- '#e7bdee',
112
- '#6481ff',
113
- '#18ffbc',
114
- '#ff4444',
115
- '#ffa1c2',
116
- '#e0aae9',
117
- '#1256cf',
118
- '#108d76',
119
- '#df0000',
120
- '#ec408a',
121
- '#d088dd',
122
- ];
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
+ }
123
123
 
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
- }
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
+ }
178
178
  }
179
179
 
180
- class ChooseEnumComponent {
181
- constructor() {
182
- this.appendTo = 'body';
183
- this.allowAllCapsValues = false;
184
- this.clearable = true;
185
- this.getValuesArrayFromEnum = EnumHelperBaseClass.getEnumOptionsFromEnumClass;
186
- this.indexesToDisable = [];
187
- this.isChip = true;
188
- this.isDropdownDisabled = false;
189
- this.label = 'label';
190
- this.labelTextAlign = 'left';
191
- this.percentWidth = false;
192
- this.change = new EventEmitter();
193
- this.close = new EventEmitter();
194
- this.propagateChange = (_) => { };
195
- this.propogateTouch = () => { };
196
- }
197
- ngOnChanges() {
198
- if (this.getValuesArrayFromEnum != null) {
199
- this.items = this.getValuesArrayFromEnum(this.enumChoices, this.customColors, this.allowAllCapsValues);
200
- }
201
- if (this.isItemDisabled == true) {
202
- if (this.indexesToDisable.length > 0) {
203
- for (let index of this.indexesToDisable) {
204
- this.items[index].disabled = true;
205
- }
206
- }
207
- }
208
- if (this.isItemHidden == true) {
209
- if (this.indexesToDisable.length > 0) {
210
- for (let index of this.indexesToDisable) {
211
- let itemIndex = this.items.findIndex((item) => item.value == index);
212
- this.items.splice(itemIndex, 1);
213
- }
214
- }
215
- }
216
- }
217
- ngOnInit() {
218
- if (this.getValuesArrayFromEnum != null) {
219
- this.items = this.getValuesArrayFromEnum(this.enumChoices, this.customColors, this.allowAllCapsValues);
220
- }
221
- if (this.isItemDisabled == true) {
222
- if (this.indexesToDisable.length > 0) {
223
- for (let index of this.indexesToDisable) {
224
- this.items[index].disabled = true;
225
- }
226
- }
227
- }
228
- if (this.isItemHidden == true) {
229
- if (this.indexesToDisable.length > 0) {
230
- for (let index of this.indexesToDisable) {
231
- let itemIndex = this.items.findIndex((item) => item.value == index);
232
- this.items.splice(itemIndex, 1);
233
- }
234
- }
235
- }
236
- }
237
- writeValue(type) {
238
- if (type != undefined) {
239
- this.selectedItem = type;
240
- }
241
- else if (type == null) {
242
- this.selectedItem = type;
243
- }
244
- }
245
- registerOnChange(fn) {
246
- this.propagateChange = fn;
247
- }
248
- registerOnTouched(fn) {
249
- this.propogateTouch = fn;
250
- }
251
- updateBlur() {
252
- this.propogateTouch();
253
- this.close.emit();
254
- }
255
- onSelectedItemChanged() {
256
- this.propagateChange(this.selectedItem);
257
- this.change.emit(this.selectedItem);
258
- }
259
- setDisabledState(isDisabled) {
260
- this.isDropdownDisabled = isDisabled;
261
- }
262
- clear() {
263
- this.selectedItem = null;
264
- }
265
- setStyles() {
266
- let style = {
267
- paddingTop: this.paddingTop + 'rem',
268
- };
269
- if (this.width) {
270
- style['width'] = this.width + 'rem';
271
- }
272
- return style;
273
- }
274
- setLabelStyle() {
275
- let style = {
276
- textAlign: this.labelTextAlign,
277
- fontWeight: this.labelTextFontWeight,
278
- fontSize: this.labelTextFontSize + 'rem',
279
- };
280
- return style;
281
- }
282
- }
283
- ChooseEnumComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
284
- ChooseEnumComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumComponent, selector: "choose-enum", inputs: { appendTo: "appendTo", allowAllCapsValues: "allowAllCapsValues", clearable: "clearable", customColors: "customColors", enumChoices: "enumChoices", 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: [
285
- {
286
- provide: NG_VALUE_ACCESSOR,
287
- useExisting: forwardRef(() => ChooseEnumComponent),
288
- multi: true,
289
- },
290
- ], 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 [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"], 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"] }] });
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumComponent, decorators: [{
292
- type: Component,
293
- args: [{ selector: 'choose-enum', providers: [
294
- {
295
- provide: NG_VALUE_ACCESSOR,
296
- useExisting: forwardRef(() => ChooseEnumComponent),
297
- multi: true,
298
- },
299
- ], 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 [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"] }]
300
- }], ctorParameters: function () { return []; }, propDecorators: { appendTo: [{
301
- type: Input
302
- }], allowAllCapsValues: [{
303
- type: Input
304
- }], clearable: [{
305
- type: Input
306
- }], customColors: [{
307
- type: Input
308
- }], enumChoices: [{
309
- type: Input
310
- }], getValuesArrayFromEnum: [{
311
- type: Input
312
- }], indexesToDisable: [{
313
- type: Input
314
- }], isChip: [{
315
- type: Input
316
- }], isDropdownDisabled: [{
317
- type: Input
318
- }], isItemHidden: [{
319
- type: Input
320
- }], isItemDisabled: [{
321
- type: Input
322
- }], isMultiple: [{
323
- type: Input
324
- }], label: [{
325
- type: Input
326
- }], labelTextAlign: [{
327
- type: Input
328
- }], labelTextFontWeight: [{
329
- type: Input
330
- }], labelTextFontSize: [{
331
- type: Input
332
- }], paddingTop: [{
333
- type: Input
334
- }], placeholder: [{
335
- type: Input
336
- }], percentWidth: [{
337
- type: Input
338
- }], selectedItem: [{
339
- type: Input
340
- }], width: [{
341
- type: Input
342
- }], change: [{
343
- type: Output
344
- }], close: [{
345
- type: Output
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
346
360
  }] } });
347
361
 
348
- class ShowTableErrorsComponent {
349
- ngOnInit() {
350
- }
351
- onMouseEnter() {
352
- this.showDetails = true;
353
- }
354
- onMouseLeave() {
355
- this.showDetails = false;
356
- }
357
- }
358
- ShowTableErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShowTableErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
359
- 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"] }] });
360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShowTableErrorsComponent, decorators: [{
361
- type: Component,
362
- 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"] }]
363
- }], propDecorators: { message: [{
364
- 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
365
381
  }] } });
366
382
 
367
- class ChooseEnumRendererComponent {
368
- constructor() { }
369
- agInit(params) {
370
- this.params = params;
371
- this.enumValue = params.value;
372
- this.key = params.context.createKey(params.columnApi, params.column);
373
- }
374
- onCellDataChanged($event) {
375
- let value = $event;
376
- this.formControlValue = this.params.context.formGroup.get("entries").at(this.params.node.rowIndex);
377
- this.formControlValue?.get(this.key).setValue(value);
378
- }
379
- refresh(params) {
380
- return false;
381
- }
382
- }
383
- ChooseEnumRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
384
- 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: ["appendTo", "allowAllCapsValues", "clearable", "customColors", "enumChoices", "getValuesArrayFromEnum", "indexesToDisable", "isChip", "isDropdownDisabled", "isItemHidden", "isItemDisabled", "isMultiple", "label", "labelTextAlign", "labelTextFontWeight", "labelTextFontSize", "paddingTop", "placeholder", "percentWidth", "selectedItem", "width"], outputs: ["change", "close"] }] });
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumRendererComponent, decorators: [{
386
- type: Component,
387
- 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>" }]
388
409
  }], ctorParameters: function () { return []; } });
389
410
 
390
- // import { environment } from '../../environments/environment';
391
- class ChooseGeneralItemService {
392
- // baseUrl: string = environment.apiURL;
393
- constructor(http, env) {
394
- this.http = http;
395
- this.env = env;
396
- } //we have an issue with this line of code...can we meet to resolve it!
397
- getHeaders() {
398
- const token = localStorage.getItem("token");
399
- const httpHeaders = new HttpHeaders({
400
- 'Content-Type': "application/json",
401
- 'Authorization': 'Token ' + token
402
- });
403
- return { headers: httpHeaders };
404
- }
405
- getAuthenticationHeadersWithQueryParams(params) {
406
- const token = localStorage.getItem("token");
407
- const httpHeaders = new HttpHeaders({
408
- 'Content-Type': "application/json",
409
- 'Authorization': 'Token ' + token
410
- });
411
- return { headers: httpHeaders, params: params };
412
- }
413
- getData(apiPath) {
414
- return this.http.get(`${this.env.apiURL}${apiPath}`, this.getHeaders());
415
- }
416
- }
417
- 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 });
418
- ChooseGeneralItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemService, providedIn: 'root' });
419
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemService, decorators: [{
420
- type: Injectable,
421
- args: [{
422
- providedIn: 'root'
423
- }]
424
- }], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
425
- type: Inject,
426
- 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']
427
450
  }] }]; } });
428
451
 
429
- class ChooseGeneralItemComponent {
430
- constructor(_ChooseGeneralItemService) {
431
- this._ChooseGeneralItemService = _ChooseGeneralItemService;
432
- this.change = new EventEmitter();
433
- this.width = 20;
434
- this.isChip = false;
435
- this.chipColor = 'black';
436
- this.chipTextColor = 'white';
437
- this.chipWidth = 11;
438
- this.useFullObject = false;
439
- this.propagateChange = (_) => { };
440
- this.propogateTouch = () => { };
441
- }
442
- ngOnInit() {
443
- if (!this.items)
444
- this.getData();
445
- }
446
- writeValue(item) {
447
- if (item != undefined) {
448
- this.selectedItemId = item;
449
- }
450
- else if (item == null) {
451
- this.selectedItemId = item;
452
- }
453
- }
454
- registerOnChange(fn) {
455
- this.propagateChange = fn;
456
- }
457
- registerOnTouched(fn) {
458
- this.propogateTouch = fn;
459
- }
460
- updateBlur() {
461
- this.propogateTouch();
462
- }
463
- onSelectedItemChanged($event) {
464
- this.propagateChange(this.useFullObject ? $event : this.selectedItemId);
465
- this.change.emit(this.useFullObject ? $event : this.selectedItemId);
466
- }
467
- getData() {
468
- if (this.apiPath) {
469
- this._ChooseGeneralItemService.getData(this.apiPath).subscribe({
470
- next: (response) => {
471
- this.items = response;
472
- },
473
- error: (error) => console.error("error", error)
474
- });
475
- }
476
- }
477
- setWidth() {
478
- let style = {
479
- width: this.width + "rem"
480
- };
481
- return style;
482
- }
483
- setFontStyles() {
484
- let fontStyle = {
485
- fontWeight: this.fontWeight,
486
- fontSize: this.fontSize + "rem",
487
- };
488
- return fontStyle;
489
- }
490
- }
491
- ChooseGeneralItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemComponent, deps: [{ token: ChooseGeneralItemService }], target: i0.ɵɵFactoryTarget.Component });
492
- 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: [
493
- {
494
- provide: NG_VALUE_ACCESSOR,
495
- useExisting: forwardRef(() => ChooseGeneralItemComponent),
496
- multi: true,
497
- },
498
- ], 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", "customColors", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemComponent, decorators: [{
500
- type: Component,
501
- args: [{ selector: 'choose-general-item', providers: [
502
- {
503
- provide: NG_VALUE_ACCESSOR,
504
- useExisting: forwardRef(() => ChooseGeneralItemComponent),
505
- multi: true,
506
- },
507
- ], 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>" }]
508
- }], ctorParameters: function () { return [{ type: ChooseGeneralItemService }]; }, propDecorators: { change: [{
509
- type: Output
510
- }], items: [{
511
- type: Input
512
- }], label: [{
513
- type: Input
514
- }], appendTo: [{
515
- type: Input
516
- }], placeholder: [{
517
- type: Input
518
- }], apiPath: [{
519
- type: Input
520
- }], isMultiple: [{
521
- type: Input
522
- }], hideSelectedItem: [{
523
- type: Input
524
- }], objects: [{
525
- type: Input
526
- }], showLabel: [{
527
- type: Input
528
- }], separator: [{
529
- type: Input
530
- }], width: [{
531
- type: Input
532
- }], fontWeight: [{
533
- type: Input
534
- }], fontSize: [{
535
- type: Input
536
- }], isChip: [{
537
- type: Input
538
- }], isTypeDate: [{
539
- type: Input
540
- }], chipColor: [{
541
- type: Input
542
- }], chipTextColor: [{
543
- type: Input
544
- }], chipWidth: [{
545
- type: Input
546
- }], selectedItemId: [{
547
- type: Input
548
- }], disabled: [{
549
- type: Input
550
- }], useFullObject: [{
551
- 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
552
591
  }] } });
553
592
 
554
- class ChooseGeneralItemRendererComponent {
555
- constructor() { }
556
- agInit(params) {
557
- this.params = params;
558
- this.itemId = params.data.id;
559
- this.key = params.context.createKey(params.columnApi, params.column);
560
- this.rowId = params.node.id;
561
- }
562
- onCellDataChanged($event) {
563
- let value = $event;
564
- this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
565
- this.formControlValue.get(this.key).setValue(value);
566
- const params = {
567
- value: value,
568
- rowNode: this.params.node,
569
- };
570
- this.params.onCellValueChanged(params);
571
- }
572
- refresh(params) {
573
- return true;
574
- }
575
- }
576
- ChooseGeneralItemRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
577
- 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"] }] });
578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemRendererComponent, decorators: [{
579
- type: Component,
580
- 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>" }]
581
625
  }], ctorParameters: function () { return []; } });
582
626
 
583
- var LineType;
584
- (function (LineType) {
585
- LineType[LineType["INCLUDE"] = 0] = "INCLUDE";
586
- 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";
587
631
  })(LineType || (LineType = {}));
588
632
 
589
- class LineTypeModelHelper {
590
- static getItems() {
591
- let items = [];
592
- let values = Object.values(LineType);
593
- let types = values.filter(value => typeof value === 'number');
594
- for (let value of types) {
595
- this.setStringValueAndColor(value);
596
- items.push({ value: value, label: this.label, color: this.color, description: this.description });
597
- }
598
- return items;
599
- }
600
- static setStringValueAndColor(type) {
601
- switch (type) {
602
- case LineType.INCLUDE:
603
- return this.label = "Include", this.color = "gold";
604
- break;
605
- case LineType.DO_NOT_INCLUDE:
606
- return this.label = "Do Not Include", this.color = "platinum";
607
- break;
608
- default:
609
- return this.label = "Undefined", this.color = "Gray";
610
- }
611
- }
612
- getValue(label) {
613
- let value;
614
- switch (label) {
615
- case "Include":
616
- return value = 0;
617
- break;
618
- case "Do Not Include":
619
- return value = 1;
620
- break;
621
- default:
622
- return null;
623
- }
624
- }
625
- static getLabelAndColorForValue(value) {
626
- for (let item of this.getItems()) {
627
- if (item.value == value) {
628
- this.value = item;
629
- return this.value;
630
- }
631
- }
632
- }
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
+ }
633
681
  }
634
682
 
635
- class ChooseLineTypeComponent {
636
- constructor() {
637
- this.items = LineTypeModelHelper;
638
- this.propagateChange = (_) => { };
639
- this.propogateTouch = () => { };
640
- }
641
- ngOnInit() {
642
- this.types = this.items.getItems();
643
- }
644
- writeValue(type) {
645
- if (type != undefined || type != null) {
646
- this.selectedItem = type;
647
- }
648
- }
649
- registerOnChange(fn) {
650
- this.propagateChange = fn;
651
- }
652
- registerOnTouched(fn) {
653
- this.propogateTouch = fn;
654
- }
655
- updateBlur() {
656
- this.propogateTouch();
657
- }
658
- onSelectedItemChanged() {
659
- this.propagateChange(this.selectedItem);
660
- }
661
- }
662
- ChooseLineTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseLineTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
663
- ChooseLineTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseLineTypeComponent, selector: "choose-line-type", providers: [
664
- {
665
- provide: NG_VALUE_ACCESSOR,
666
- useExisting: forwardRef(() => ChooseLineTypeComponent),
667
- multi: true,
668
- },
669
- ], 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"] }] });
670
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseLineTypeComponent, decorators: [{
671
- type: Component,
672
- args: [{ selector: 'choose-line-type', providers: [
673
- {
674
- provide: NG_VALUE_ACCESSOR,
675
- useExisting: forwardRef(() => ChooseLineTypeComponent),
676
- multi: true,
677
- },
678
- ], 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"] }]
679
728
  }], ctorParameters: function () { return []; } });
680
729
 
681
- class ChooseYesOrNoComponent {
682
- constructor() {
683
- this.change = new EventEmitter();
684
- this.items = [{ value: true, label: "Yes", color: "green" }, { value: false, label: "No", color: "red" }];
685
- this.width = 200;
686
- this.placeholder = "Choose either Yes or No";
687
- this.propagateChange = (_) => { };
688
- this.propogateTouch = () => { };
689
- }
690
- ngOnInit() {
691
- }
692
- writeValue(item) {
693
- if (item != undefined || item != null) {
694
- this.selectedItemValue = item;
695
- }
696
- }
697
- registerOnChange(fn) {
698
- this.propagateChange = fn;
699
- }
700
- registerOnTouched(fn) {
701
- this.propogateTouch = fn;
702
- }
703
- updateBlur() {
704
- this.propogateTouch();
705
- }
706
- onSelectedItemChanged() {
707
- this.propagateChange(this.selectedItemValue);
708
- this.change.emit(this.selectedItemValue);
709
- }
710
- setWidth() {
711
- let style = {
712
- width: this.width + "px"
713
- };
714
- return style;
715
- }
716
- }
717
- ChooseYesOrNoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
718
- 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: [
719
- {
720
- provide: NG_VALUE_ACCESSOR,
721
- useExisting: forwardRef(() => ChooseYesOrNoComponent),
722
- multi: true
723
- }
724
- ], 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"] }] });
725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoComponent, decorators: [{
726
- type: Component,
727
- args: [{ selector: 'choose-yes-or-no', providers: [
728
- {
729
- provide: NG_VALUE_ACCESSOR,
730
- useExisting: forwardRef(() => ChooseYesOrNoComponent),
731
- multi: true
732
- }
733
- ], 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" }]
734
- }], ctorParameters: function () { return []; }, propDecorators: { change: [{
735
- type: Output
736
- }], width: [{
737
- type: Input
738
- }], selectedItemValue: [{
739
- type: Input
740
- }], placeholder: [{
741
- 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
742
791
  }] } });
743
792
 
744
- class ChooseYesOrNoRendererComponent {
745
- constructor() { }
746
- agInit(params) {
747
- this.params = params;
748
- this.booleanValue = params.value;
749
- this.key = params.context.createKey(params.columnApi, params.column);
750
- this.rowId = params.node.id;
751
- }
752
- onCellDataChanged($event) {
753
- let value = $event;
754
- this.formControlValue = this.params.context.formGroup.get("entries").at(this.rowId);
755
- this.formControlValue.get(this.key).setValue(value);
756
- }
757
- refresh(params) {
758
- return false;
759
- }
760
- }
761
- ChooseYesOrNoRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
762
- 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"] }] });
763
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseYesOrNoRendererComponent, decorators: [{
764
- type: Component,
765
- 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>" }]
766
821
  }], ctorParameters: function () { return []; } });
767
822
 
768
- const PIPEMAPPINGS = [
769
- { value: '$', pipe: new CurrencyPipe('en-US') }
823
+ const PIPEMAPPINGS = [
824
+ { value: '$', pipe: new CurrencyPipe('en-US') }
770
825
  ];
771
826
 
772
- class DynamicPipe {
773
- transform(value, args) {
774
- for (let val of PIPEMAPPINGS) {
775
- if (val.value === args) {
776
- return val.pipe.transform(value);
777
- }
778
- }
779
- return '';
780
- }
781
- }
782
- DynamicPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DynamicPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
783
- DynamicPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DynamicPipe, name: "dynamicPipe" });
784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DynamicPipe, decorators: [{
785
- type: Pipe,
786
- 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' }]
787
842
  }] });
788
843
 
789
- class EditableSavableInputComponent {
790
- constructor() {
791
- this.saveWasClicked = new EventEmitter();
792
- this.showUnit = false;
793
- this.isEditable = true;
794
- this.showHeader = true;
795
- this.value = "";
796
- this.isAddClickedOn = false;
797
- this.isUpdated = false;
798
- this.showEdit = false;
799
- // the method set in registerOnChange to emit changes back to the form
800
- this.propagateChange = (_) => { };
801
- this.propogateTouch = () => { };
802
- }
803
- ngOnInit() {
804
- this.initialize();
805
- }
806
- initialize() {
807
- if (this.value == "") {
808
- this.isUpdated = false;
809
- }
810
- else {
811
- this.isUpdated = true;
812
- }
813
- }
814
- onClickAdd() {
815
- this.isAddClickedOn = true;
816
- }
817
- onClickCancel() {
818
- this.isAddClickedOn = false;
819
- }
820
- onClickSave(input) {
821
- this.isAddClickedOn = false;
822
- let value = input.value;
823
- if (value.trim().length == 0) {
824
- this.isUpdated = false;
825
- }
826
- else {
827
- this.isUpdated = true;
828
- }
829
- this.value = value;
830
- this.saveWasClicked.emit(value);
831
- this.propagateChange(this.value);
832
- }
833
- onClickEdit() {
834
- this.isAddClickedOn = true;
835
- }
836
- onMouseEnter() {
837
- this.showEdit = true;
838
- }
839
- onMouseLeave() {
840
- this.showEdit = false;
841
- }
842
- writeValue(value) {
843
- if (value) {
844
- this.value = value;
845
- this.isUpdated = true;
846
- }
847
- }
848
- // registers 'fn' that will be fired wheb changes are made
849
- // this is how we emit the changes back to the form
850
- registerOnChange(fn) {
851
- this.propagateChange = fn;
852
- }
853
- registerOnTouched(fn) {
854
- this.propogateTouch = fn;
855
- }
856
- onChange($event) {
857
- //this.propagateChange(this.value);
858
- }
859
- updateBlur() {
860
- this.propogateTouch();
861
- }
862
- }
863
- EditableSavableInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditableSavableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
864
- 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,
865
- {
866
- provide: NG_VALUE_ACCESSOR,
867
- useExisting: forwardRef(() => EditableSavableInputComponent),
868
- multi: true
869
- }
870
- ], 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" }] });
871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditableSavableInputComponent, decorators: [{
872
- type: Component,
873
- args: [{ selector: 'editable-savable-input', providers: [DynamicPipe,
874
- {
875
- provide: NG_VALUE_ACCESSOR,
876
- useExisting: forwardRef(() => EditableSavableInputComponent),
877
- multi: true
878
- }
879
- ], 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"] }]
880
- }], ctorParameters: function () { return []; }, propDecorators: { saveWasClicked: [{
881
- type: Output
882
- }], defaultvalue: [{
883
- type: Input
884
- }], inputType: [{
885
- type: Input
886
- }], newLabel: [{
887
- type: Input
888
- }], headerLabel: [{
889
- type: Input
890
- }], showUnit: [{
891
- type: Input
892
- }], unit: [{
893
- type: Input
894
- }], unitType: [{
895
- type: Input
896
- }], isEditable: [{
897
- type: Input
898
- }], showHeader: [{
899
- type: Input
900
- }], value: [{
901
- 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
902
962
  }] } });
903
963
 
904
- class CustomDecimalPointTwoDigitsDirective {
905
- constructor(control) {
906
- this.control = control;
907
- }
908
- ngOnInit() {
909
- if (this.control.value) {
910
- this.control.valueAccessor.writeValue(this.transformToCommasAndPoint(this.control.value));
911
- }
912
- this.valueSubscription = this.control.control.valueChanges.subscribe(value => {
913
- if (value.length > 0) {
914
- let removeCommas = this.control.value.replace(/,/g, '');
915
- this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
916
- }
917
- else {
918
- this.control.control.setValue(null, { emitEvent: false, emitModelToViewChange: false });
919
- }
920
- });
921
- }
922
- onEvent($event) {
923
- if (this.control.value) {
924
- const item = $event.target;
925
- item.value = this.transformToCommasAndPoint(this.control.value);
926
- let removeCommas = this.control.value.replace(/,/g, '');
927
- this.control.control.setValue(removeCommas, { emitEvent: false, emitModelToViewChange: false });
928
- }
929
- }
930
- transformToCommasAndPoint(value) {
931
- if (value.indexOf(".") == -1) {
932
- value = value.toString().replace(/\D/g, "")
933
- .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
934
- return value;
935
- }
936
- else {
937
- let val = value.split(".");
938
- let valueBeforeDecimal = val[0];
939
- let valueAfterDecimal = val[1];
940
- valueBeforeDecimal = valueBeforeDecimal.toString().replace(/\D/g, "")
941
- .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
942
- let newValue = `${valueBeforeDecimal}.${valueAfterDecimal}`;
943
- return newValue;
944
- }
945
- }
946
- }
947
- 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 });
948
- 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 });
949
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomDecimalPointTwoDigitsDirective, decorators: [{
950
- type: Directive,
951
- args: [{
952
- selector: '[customDecimalPointTwoDigits]',
953
- providers: [NgModel, DecimalPipe],
954
- }]
955
- }], ctorParameters: function () { return [{ type: i2$1.NgControl }]; }, propDecorators: { onEvent: [{
956
- type: HostListener,
957
- 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"]]
958
1020
  }] } });
959
1021
 
960
- class ValidationMessageService {
961
- }
962
- ValidationMessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
963
- ValidationMessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationMessageService, providedIn: 'root' });
964
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationMessageService, decorators: [{
965
- type: Injectable,
966
- args: [{
967
- providedIn: 'root'
968
- }]
969
- }] });
970
- class MinLengthValidationError {
971
- constructor(requirement) {
972
- this.requirement = requirement;
973
- }
974
- buildMessage() {
975
- return "Must be a minimum length of " + this.requirement + " letters!";
976
- }
977
- }
978
- class InvalidIntegerNumberValidatorEerror {
979
- buildMessage() {
980
- return "Must only contain numbers, no decimals or words allowed";
981
- }
982
- }
983
- class PositiveIntegerNumberValidatorError {
984
- buildMessage() {
985
- return "Must be a positive integer";
986
- }
987
- }
988
- class MaxLengthValidationError {
989
- constructor(requirement) {
990
- this.requirement = requirement;
991
- }
992
- buildMessage() {
993
- return "Must be a maximum length of " + this.requirement + " letters!";
994
- }
995
- }
996
- class MaxValidationError {
997
- constructor(requirement) {
998
- this.requirement = requirement;
999
- }
1000
- buildMessage() {
1001
- return "The largest acceptable input is " + this.requirement;
1002
- }
1003
- }
1004
- class MinValidationError {
1005
- constructor(requirement) {
1006
- this.requirement = requirement;
1007
- }
1008
- buildMessage() {
1009
- return "The smallest acceptable input is " + this.requirement;
1010
- }
1011
- }
1012
- class PatternValidatorError {
1013
- constructor(requirement) {
1014
- this.requirement = requirement;
1015
- }
1016
- buildMessage() {
1017
- if (this.requirement == '^[a-zA-Z ]*$') {
1018
- return "This field must only contain words ";
1019
- }
1020
- else if (this.requirement == '/[0-9]-[0-9]+$/') {
1021
- return "This field must only contain numbers and a - " + "<br>" + "Example: 71-716971";
1022
- }
1023
- else if (this.requirement = 'forDate') {
1024
- return "Date needs to be DD/MM/YYYY";
1025
- }
1026
- }
1027
- }
1028
- class RequiredValidatorError {
1029
- buildMessage() {
1030
- return "This Field Is Required";
1031
- }
1032
- }
1033
- class EmailValidatorError {
1034
- buildMessage() {
1035
- return "Make Sure It Is An Email Format" + "<br>" + "example@jooler.io";
1036
- }
1037
- }
1038
- class ValidationError {
1039
- static getRelevantError(validationType, validationValue) {
1040
- let validationMessage;
1041
- validationMessage = this.MessageDictionary(validationValue, validationType);
1042
- return validationMessage;
1043
- }
1044
- static MessageDictionary(value, validationType) {
1045
- let ValidationMessageForInput = {
1046
- 'minlength': new MinLengthValidationError(value).buildMessage(),
1047
- 'maxlength': new MaxLengthValidationError(value).buildMessage(),
1048
- 'max': new MaxValidationError(value).buildMessage(),
1049
- 'min': new MinValidationError(value).buildMessage(),
1050
- 'pattern': new PatternValidatorError(value).buildMessage(),
1051
- 'required': new RequiredValidatorError().buildMessage(),
1052
- 'email': new EmailValidatorError().buildMessage(),
1053
- 'invalidIntegerNumber': new InvalidIntegerNumberValidatorEerror().buildMessage(),
1054
- 'invalidPositiveInteger': new PositiveIntegerNumberValidatorError().buildMessage(),
1055
- };
1056
- return ValidationMessageForInput[validationType];
1057
- }
1058
- }
1059
- ValidationError.validationMessageForDate = {
1060
- 'required': new RequiredValidatorError().buildMessage(),
1061
- 'pattern': new PatternValidatorError('forDate').buildMessage(),
1062
- };
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
+ }
1063
1130
 
1064
- class FormControlValidationMsgDirectiveForInput {
1065
- constructor(elRef, control) {
1066
- this.elRef = elRef;
1067
- this.control = control;
1068
- this.showBoxError = true;
1069
- this.beforeBegin = false;
1070
- this.afterEnd = false;
1071
- this.validationError = ValidationError;
1072
- }
1073
- ngOnInit() {
1074
- this.statusChangeSubscription = this.control.statusChanges.subscribe((status) => {
1075
- if (status == 'INVALID') {
1076
- this.showError();
1077
- }
1078
- else {
1079
- this.removeError();
1080
- }
1081
- });
1082
- this.control.valueChanges.subscribe({
1083
- next: (response) => {
1084
- if (this.control.errors) {
1085
- this.showError();
1086
- }
1087
- }
1088
- });
1089
- }
1090
- ngOnDestroy() {
1091
- this.statusChangeSubscription.unsubscribe();
1092
- }
1093
- handleBlurEvent(event) {
1094
- if (this.control.errors) {
1095
- this.showError();
1096
- }
1097
- else {
1098
- this.removeError();
1099
- }
1100
- }
1101
- showError() {
1102
- this.removeError();
1103
- const valErrors = this.control.errors;
1104
- const keys = Object.keys(valErrors);
1105
- for (let i = 0; i < keys.length; i++) {
1106
- switch (keys[i]) {
1107
- case 'minlength': {
1108
- let message = this.validationError.getRelevantError(keys[i], valErrors.minlength.requiredLength);
1109
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1110
- break;
1111
- }
1112
- case 'required': {
1113
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1114
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1115
- this.control.control.setErrors({ 'required': true, 'message': message }, { emitEvent: false });
1116
- break;
1117
- }
1118
- case 'maxlength': {
1119
- let message = this.validationError.getRelevantError(keys[i], valErrors.maxlength.requiredLength);
1120
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1121
- this.control.control.setErrors({ 'maxlength': { 'requiredLength': valErrors.maxlength.requiredLength }, 'message': message }, { emitEvent: false });
1122
- break;
1123
- }
1124
- case 'max': {
1125
- let message = this.validationError.getRelevantError(keys[i], valErrors.max.max);
1126
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1127
- this.control.control.setErrors({ 'message': message, 'max': { 'max': valErrors.max.max } }, { emitEvent: false });
1128
- break;
1129
- }
1130
- case 'min': {
1131
- let message = this.validationError.getRelevantError(keys[i], valErrors.min.min);
1132
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1133
- break;
1134
- }
1135
- case 'pattern': {
1136
- let message = this.validationError.getRelevantError(keys[i], valErrors.pattern.requiredPattern);
1137
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1138
- break;
1139
- }
1140
- case 'email': {
1141
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1142
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1143
- break;
1144
- }
1145
- case 'invalidIntegerNumber': {
1146
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1147
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1148
- break;
1149
- }
1150
- case 'invalidPositiveInteger': {
1151
- let message = this.validationError.getRelevantError(keys[i], valErrors);
1152
- this.errorMessage += ` ${this.errorMessage ? "<br>" : ""}${"\u25CF " + message}`;
1153
- this.control.control.setErrors({ 'invalidPositiveInteger': true, 'message': message }, { emitEvent: false });
1154
- break;
1155
- }
1156
- }
1157
- }
1158
- if (this.showBoxError) {
1159
- 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>';
1160
- if (!this.beforeBegin && !this.afterEnd)
1161
- this.elRef.nativeElement.parentElement.parentElement.parentElement.parentElement.insertAdjacentHTML('afterend', errDiv);
1162
- else if (this.beforeBegin)
1163
- this.elRef.nativeElement.insertAdjacentHTML('beforebegin', errDiv);
1164
- else if (this.afterEnd)
1165
- this.elRef.nativeElement.insertAdjacentHTML('afterend', errDiv);
1166
- else
1167
- throw Error("Adjustment not specified ");
1168
- }
1169
- }
1170
- removeError() {
1171
- this.errorMessage = "";
1172
- const errorElement = document.getElementById(this.errorDivId);
1173
- if (errorElement) {
1174
- errorElement.remove();
1175
- }
1176
- }
1177
- }
1178
- 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 });
1179
- 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 });
1180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormControlValidationMsgDirectiveForInput, decorators: [{
1181
- type: Directive,
1182
- args: [{
1183
- selector: '[appFormControlValidationMsgForInputs]',
1184
- providers: [NgModel],
1185
- }]
1186
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.NgControl }]; }, propDecorators: { showBoxError: [{
1187
- type: Input,
1188
- args: ['showBoxError']
1189
- }], errorDivId: [{
1190
- type: Input,
1191
- args: ['errorDivId']
1192
- }], beforeBegin: [{
1193
- type: Input,
1194
- args: ['beforeBegin']
1195
- }], afterEnd: [{
1196
- type: Input,
1197
- args: ['afterEnd']
1198
- }], handleBlurEvent: [{
1199
- type: HostListener,
1200
- 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"]]
1201
1274
  }] } });
1202
1275
 
1203
- class GeneralInputRendererComponent {
1204
- constructor() { }
1205
- agInit(params) {
1206
- this.params = params;
1207
- this.formGroup = this.params.context.formGroup.get('entries').at(params.node.rowIndex);
1208
- this.key = params.context.createKey(params.columnApi, params.column);
1209
- if (params.isTypeNumber) {
1210
- if (params.value) {
1211
- this.value = new DecimalPipe("en-US").transform(+params.value, "1.0-0");
1212
- }
1213
- }
1214
- else {
1215
- this.value = params.value;
1216
- }
1217
- }
1218
- onCellDataChanged($event) {
1219
- let value = $event.target.value;
1220
- let newAndOldValue = {
1221
- newValue: value,
1222
- oldValue: this.params?.value
1223
- };
1224
- if (this.params.allowUpdateRowData) {
1225
- this.params.onChange(newAndOldValue);
1226
- }
1227
- }
1228
- refresh(params) {
1229
- this.formGroup = this.params.context.formGroup.get('entries').at(params.node.rowIndex);
1230
- return true;
1231
- }
1232
- }
1233
- GeneralInputRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GeneralInputRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1234
- 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"] }] });
1235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GeneralInputRendererComponent, decorators: [{
1236
- type: Component,
1237
- 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"] }]
1238
1316
  }], ctorParameters: function () { return []; } });
1239
1317
 
1240
- class LabelAndField {
1318
+ class LabelAndField {
1319
+ label;
1320
+ field;
1241
1321
  }
1242
1322
 
1243
- var DropdownActionType;
1244
- (function (DropdownActionType) {
1245
- DropdownActionType[DropdownActionType["ADD"] = 0] = "ADD";
1246
- DropdownActionType[DropdownActionType["MENU"] = 1] = "MENU";
1323
+ var DropdownActionType;
1324
+ (function (DropdownActionType) {
1325
+ DropdownActionType[DropdownActionType["ADD"] = 0] = "ADD";
1326
+ DropdownActionType[DropdownActionType["MENU"] = 1] = "MENU";
1247
1327
  })(DropdownActionType || (DropdownActionType = {}));
1248
1328
 
1249
- class DropdownActionsComponent {
1250
- constructor(_Router) {
1251
- this._Router = _Router;
1252
- this.dropdownActionTypes = DropdownActionType;
1253
- this.canRoute = true;
1254
- this.labelsAndRoutes = [];
1255
- this.dropdownActionType = this.dropdownActionTypes.ADD;
1256
- this.addClicked = new EventEmitter();
1257
- }
1258
- ngOnInit() {
1259
- this.validateActions();
1260
- }
1261
- validateActions() {
1262
- if (this.dropdownActionType == this.dropdownActionTypes.ADD) {
1263
- if (this.canRoute) {
1264
- if (this.route == "" || this.route == undefined || this.route == null) {
1265
- throw Error("Route needs to be provided.");
1266
- }
1267
- }
1268
- else {
1269
- if (this.route) {
1270
- throw Error("Route shouldn't be provided since canRoute is false");
1271
- }
1272
- }
1273
- }
1274
- else if (this.dropdownActionType == this.dropdownActionTypes.MENU) {
1275
- if (!this.labelsAndRoutes.length) {
1276
- throw Error("A list of labels & Routes need to be provided for the actions menu.");
1277
- }
1278
- }
1279
- else {
1280
- throw Error("Dropdown Action Type is not recognized.");
1281
- }
1282
- }
1283
- onClickAdd($event) {
1284
- $event.preventDefault();
1285
- if (this.canRoute && this.route) {
1286
- this._Router.navigate([this.route]);
1287
- }
1288
- this.addClicked.emit();
1289
- }
1290
- onClickLabel(route, $event) {
1291
- $event.preventDefault();
1292
- this._Router.navigate([route]);
1293
- }
1294
- }
1295
- 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 });
1296
- 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"] }] });
1297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DropdownActionsComponent, decorators: [{
1298
- type: Component,
1299
- 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"] }]
1300
- }], ctorParameters: function () { return [{ type: i1$2.Router }]; }, propDecorators: { canRoute: [{
1301
- type: Input
1302
- }], disabled: [{
1303
- type: Input
1304
- }], labelsAndRoutes: [{
1305
- type: Input
1306
- }], route: [{
1307
- type: Input
1308
- }], dropdownActionType: [{
1309
- type: Input
1310
- }], addClicked: [{
1311
- 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
1312
1395
  }] } });
1313
1396
 
1314
- class PrimaryColors {
1315
- }
1316
- PrimaryColors.$primaryBlueColor = '#155ED4';
1317
- PrimaryColors.$primaryPinkColor = '#F0509C';
1318
- PrimaryColors.$primaryTealColor = '#12957E';
1319
- PrimaryColors.$primaryCarbonColor = '#32353B';
1320
- PrimaryColors.$primaryPurpleColor = '#E3B1EB';
1321
- PrimaryColors.$primaryRedColor = '#A80002';
1322
- PrimaryColors.$primaryLightRedColor = '#FFDBDB';
1323
- PrimaryColors.$primaryLightGrayBlueColor = '#f7f8f9';
1324
- 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
+ }
1325
1408
 
1326
- class AddAsteriskDirective {
1327
- constructor(elem) {
1328
- this.elem = elem;
1329
- this.show = true;
1330
- }
1331
- ngOnInit() {
1332
- this.toggleAsterisk();
1333
- }
1334
- ngOnChanges(changes) {
1335
- this.toggleAsterisk();
1336
- }
1337
- toggleAsterisk() {
1338
- const existingAsterisk = this.elem.nativeElement.querySelector('.custom-asterisk');
1339
- if (this.show) {
1340
- if (!existingAsterisk) {
1341
- const customAsterisk = `<span class="custom-asterisk" style="color:${PrimaryColors.$primaryRedColor};"> *</span> `;
1342
- this.elem.nativeElement.insertAdjacentHTML('beforeend', customAsterisk);
1343
- }
1344
- }
1345
- else {
1346
- if (existingAsterisk) {
1347
- existingAsterisk.remove();
1348
- }
1349
- }
1350
- }
1351
- }
1352
- AddAsteriskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1353
- AddAsteriskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AddAsteriskDirective, selector: "[addAsterisk]", inputs: { show: "show" }, usesOnChanges: true, ngImport: i0 });
1354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AddAsteriskDirective, decorators: [{
1355
- type: Directive,
1356
- args: [{
1357
- selector: '[addAsterisk]'
1358
- }]
1359
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { show: [{
1360
- type: Input,
1361
- 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']
1362
1446
  }] } });
1363
1447
 
1364
- class InputsModule {
1365
- static forRoot(environment) {
1366
- return {
1367
- ngModule: InputsModule,
1368
- providers: [
1369
- ChooseGeneralItemService,
1370
- {
1371
- provide: 'env',
1372
- useValue: environment
1373
- }
1374
- ]
1375
- };
1376
- }
1377
- }
1378
- InputsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1379
- InputsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, declarations: [ChooseEnumComponent,
1380
- ChooseEnumRendererComponent,
1381
- ChooseGeneralItemComponent,
1382
- GeneralInputRendererComponent,
1383
- ChooseLineTypeComponent,
1384
- ChooseYesOrNoComponent,
1385
- ChooseYesOrNoRendererComponent,
1386
- EditableSavableInputComponent,
1387
- DynamicPipe,
1388
- ChooseGeneralItemRendererComponent,
1389
- CustomDecimalPointTwoDigitsDirective,
1390
- ShowTableErrorsComponent,
1391
- FormControlValidationMsgDirectiveForInput,
1392
- DropdownActionsComponent,
1393
- AddAsteriskDirective], imports: [CommonModule,
1394
- NgSelectModule,
1395
- FormsModule,
1396
- ReactiveFormsModule,
1397
- AppMaterialModule,
1398
- SharedGeneralComponentsModule,
1399
- FontAwesomeModule], exports: [ChooseEnumComponent,
1400
- ChooseEnumRendererComponent,
1401
- ChooseGeneralItemComponent,
1402
- GeneralInputRendererComponent,
1403
- ChooseLineTypeComponent,
1404
- ChooseYesOrNoComponent,
1405
- ChooseYesOrNoRendererComponent,
1406
- EditableSavableInputComponent,
1407
- DropdownActionsComponent,
1408
- DynamicPipe,
1409
- AddAsteriskDirective] });
1410
- InputsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, imports: [CommonModule,
1411
- NgSelectModule,
1412
- FormsModule,
1413
- ReactiveFormsModule,
1414
- AppMaterialModule,
1415
- SharedGeneralComponentsModule,
1416
- FontAwesomeModule] });
1417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputsModule, decorators: [{
1418
- type: NgModule,
1419
- args: [{
1420
- declarations: [
1421
- ChooseEnumComponent,
1422
- ChooseEnumRendererComponent,
1423
- ChooseGeneralItemComponent,
1424
- GeneralInputRendererComponent,
1425
- ChooseLineTypeComponent,
1426
- ChooseYesOrNoComponent,
1427
- ChooseYesOrNoRendererComponent,
1428
- EditableSavableInputComponent,
1429
- DynamicPipe,
1430
- ChooseGeneralItemRendererComponent,
1431
- CustomDecimalPointTwoDigitsDirective,
1432
- ShowTableErrorsComponent,
1433
- FormControlValidationMsgDirectiveForInput,
1434
- DropdownActionsComponent,
1435
- AddAsteriskDirective
1436
- ],
1437
- imports: [
1438
- CommonModule,
1439
- NgSelectModule,
1440
- FormsModule,
1441
- ReactiveFormsModule,
1442
- AppMaterialModule,
1443
- SharedGeneralComponentsModule,
1444
- FontAwesomeModule,
1445
- ],
1446
- exports: [
1447
- ChooseEnumComponent,
1448
- ChooseEnumRendererComponent,
1449
- ChooseGeneralItemComponent,
1450
- GeneralInputRendererComponent,
1451
- ChooseLineTypeComponent,
1452
- ChooseYesOrNoComponent,
1453
- ChooseYesOrNoRendererComponent,
1454
- EditableSavableInputComponent,
1455
- DropdownActionsComponent,
1456
- DynamicPipe,
1457
- AddAsteriskDirective
1458
- ]
1459
- }]
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
+ }]
1460
1544
  }] });
1461
1545
 
1462
- /*
1463
- * Public API Surface of inputs
1546
+ /*
1547
+ * Public API Surface of inputs
1464
1548
  */
1465
1549
 
1466
- /**
1467
- * Generated bundle index. Do not edit.
1550
+ /**
1551
+ * Generated bundle index. Do not edit.
1468
1552
  */
1469
1553
 
1470
1554
  export { AddAsteriskDirective, ChooseEnumComponent, ChooseEnumRendererComponent, ChooseGeneralItemComponent, ChooseGeneralItemRendererComponent, ChooseGeneralItemService, ChooseLineTypeComponent, ChooseYesOrNoComponent, ChooseYesOrNoRendererComponent, DropdownActionType, DropdownActionsComponent, DynamicPipe, EditableSavableInputComponent, FormControlValidationMsgDirectiveForInput, GeneralInputRendererComponent, InputsModule, LabelAndField, PrimaryColors, ShowTableErrorsComponent };