@huntsman-cancer-institute/dictionary-editor 15.0.3 → 16.0.1

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 (23) hide show
  1. package/{esm2020 → esm2022}/components/detail.component.mjs +6 -6
  2. package/{esm2020 → esm2022}/components/home.component.mjs +6 -6
  3. package/{esm2020 → esm2022}/components/new-row.component.mjs +6 -6
  4. package/{esm2020 → esm2022}/dictionary-editor.component.mjs +6 -6
  5. package/{esm2020 → esm2022}/dictionary-editor.module.mjs +24 -24
  6. package/{esm2020 → esm2022}/grid-editors/ag-grid-date-cell-editor.component.mjs +6 -6
  7. package/{esm2020 → esm2022}/grid-editors/ag-grid-editor.module.mjs +20 -20
  8. package/esm2022/grid-editors/datepicker.component.mjs +111 -0
  9. package/{esm2020 → esm2022}/grid-editors/select.editor.mjs +6 -6
  10. package/{esm2020 → esm2022}/grid-renderers/ag-grid-renderer.module.mjs +11 -11
  11. package/{esm2020 → esm2022}/grid-renderers/date.renderer.mjs +6 -6
  12. package/{esm2020 → esm2022}/grid-renderers/select.renderer.mjs +7 -7
  13. package/{fesm2020 → fesm2022}/huntsman-cancer-institute-dictionary-editor.mjs +117 -117
  14. package/{fesm2020 → fesm2022}/huntsman-cancer-institute-dictionary-editor.mjs.map +1 -1
  15. package/grid-editors/datepicker.component.d.ts +1 -1
  16. package/package.json +15 -21
  17. package/esm2020/grid-editors/datepicker.component.mjs +0 -111
  18. package/fesm2015/huntsman-cancer-institute-dictionary-editor.mjs +0 -2150
  19. package/fesm2015/huntsman-cancer-institute-dictionary-editor.mjs.map +0 -1
  20. /package/{esm2020 → esm2022}/dictionary-editor.routes.mjs +0 -0
  21. /package/{esm2020 → esm2022}/grid-renderers/cell-renderer-validation.mjs +0 -0
  22. /package/{esm2020 → esm2022}/huntsman-cancer-institute-dictionary-editor.mjs +0 -0
  23. /package/{esm2020 → esm2022}/index.mjs +0 -0
@@ -1,2150 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { TemplateRef, Component, HostBinding, ViewChild, forwardRef, Input, isDevMode, Inject, NgModule } from '@angular/core';
3
- import * as i1$1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
6
- import { UntypedFormBuilder, UntypedFormGroup, UntypedFormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
- import * as i1$2 from '@ng-bootstrap/ng-bootstrap';
8
- import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
9
- import * as i4$1 from '@huntsman-cancer-institute/misc';
10
- import { MiscModule } from '@huntsman-cancer-institute/misc';
11
- import * as i4 from '@huntsman-cancer-institute/navigation';
12
- import { SearchListControllerComponent, UlNavComponent, LiNavComponent, SearchListComponent, SidebarComponent, NavigationModule } from '@huntsman-cancer-institute/navigation';
13
- import * as i3 from '@angular/router';
14
- import { RouterModule } from '@angular/router';
15
- import { HciSortDto } from '@huntsman-cancer-institute/hci-ng-grid-dto';
16
- import { BehaviorSubject, Subject } from 'rxjs';
17
- import * as i1 from '@huntsman-cancer-institute/dictionary-service';
18
- import { DICTIONARY_ENDPOINT } from '@huntsman-cancer-institute/dictionary-service';
19
- import { finalize, map } from 'rxjs/operators';
20
- import * as i2$1 from 'ag-grid-angular';
21
- import { AgGridModule } from 'ag-grid-angular';
22
- import { isNullOrUndefined } from 'util';
23
- import * as moment from 'moment';
24
- import { MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
25
- import * as i3$1 from '@angular/material/datepicker';
26
- import { MatDatepickerModule } from '@angular/material/datepicker';
27
- import { MomentDateModule } from '@angular/material-moment-adapter';
28
-
29
- /**
30
- * The root component for the dictionary editor. This defines a sidebar which will contain the list of dictionaries.
31
- * The sub route here will display a detail component when a dictionary is selected.
32
- *
33
- * @since 1.0.0
34
- */
35
- class DictionaryEditorComponent {
36
- constructor(dictionaryService, renderer) {
37
- this.dictionaryService = dictionaryService;
38
- this.renderer = renderer;
39
- this.classList = "outlet-row";
40
- this.filterReadOnlyDictionaries = true;
41
- this.sortDictionariesUp = true;
42
- this.loadingSubject = new BehaviorSubject(false);
43
- }
44
- /**
45
- * Upon creation, set up the sidebar and listen for the list of dictionaries from the service.
46
- */
47
- ngOnInit() {
48
- this.dictionariesReference = [];
49
- this.loadingSubject.next(true);
50
- this.setDictionarySideBarConfiguration();
51
- // Makes Call To Get The Dictionaries
52
- this.dictionaryService.getDictionaries().subscribe(theData => {
53
- this.dictionariesReference = theData.filter(this.checkInternalOnly);
54
- this.dictionariesReference.sort((dictionaryA, dictionaryB) => (dictionaryA.displayName < dictionaryB.displayName ? -1 : 1));
55
- this.dictionariesReferenceCopy = this.dictionariesReference;
56
- this.dictionariesReference = this.dictionariesReference.filter(this.checkReadOnly);
57
- this.setDictionarySideBarConfiguration();
58
- this.loadingSubject.next(false);
59
- });
60
- }
61
- /*************************************************
62
- * Helper Method To Configure Dictionary Side Bar
63
- *************************************************/
64
- setDictionarySideBarConfiguration() {
65
- let resultMessage = this.dictionariesReference.length == 0
66
- ? ""
67
- : this.dictionariesReference.length + " Results";
68
- this.sidebar.setConfig({
69
- sidebarSize: 240,
70
- showCollapse: false,
71
- children: [
72
- {
73
- type: SearchListControllerComponent,
74
- id: "SLCC",
75
- showTitle: false,
76
- filterByAllowedFields: ["displayName"],
77
- sortByAllowedFields: ["displayName"],
78
- loadingSubjects: [this.loadingSubject]
79
- },
80
- {
81
- type: UlNavComponent,
82
- ulClass: "hci-dic-ul-class",
83
- id: "filterAndSortContainer",
84
- children: [
85
- {
86
- type: LiNavComponent,
87
- id: "filterReadOnly",
88
- title: "Show All",
89
- spanClass: "hci-dic-span-1",
90
- liClass: "hci-dic-li-l",
91
- iClass: "hci-dic-i",
92
- ulClass: "hci-dic-ul",
93
- expandable: true,
94
- iRight: false,
95
- showValueFlag: true,
96
- showValue: resultMessage,
97
- showValueClass: "hci-dic-show-value",
98
- liClick: () => {
99
- this.filter();
100
- let SLC = this.sidebar.getChild("dictionaries-component");
101
- SLC.setData(this.dictionariesReference);
102
- }
103
- },
104
- {
105
- type: LiNavComponent,
106
- id: "sort",
107
- title: "",
108
- spanClass: "hci-dic-span-2",
109
- liClass: "hci-dic-li-r",
110
- iClass: "fa-solid fa-arrow-down-a-z hci-dic-i",
111
- ulClass: "hci-dic-ul",
112
- expandable: true,
113
- iRight: true,
114
- liClick: (click) => {
115
- let SLCC = this.sidebar.getChild("SLCC");
116
- SLCC.setSort(click, "displayName");
117
- this.sortDictionariesUp = !this.sortDictionariesUp;
118
- let sort = this.sidebar.getChild("filterAndSortContainer").getChild("sort");
119
- if (this.sortDictionariesUp) {
120
- sort.config.iClass = "fas fa-solid fa-arrow-down-a-z";
121
- }
122
- else {
123
- sort.config.iClass = "fa-solid fa-arrow-up-a-z";
124
- }
125
- sort.updateConfig(sort.config);
126
- }
127
- }
128
- ]
129
- },
130
- {
131
- type: SearchListComponent,
132
- id: "dictionaries-component",
133
- title: "Dictionaries",
134
- itemTemplate: this.dictionaryTemplate,
135
- sorts: [new HciSortDto("displayName", true)],
136
- data: this.dictionariesReference,
137
- loadingSubjects: [this.loadingSubject]
138
- }
139
- ]
140
- });
141
- }
142
- filter() {
143
- this.filterReadOnlyDictionaries = !this.filterReadOnlyDictionaries;
144
- let FRO = this.sidebar.getChild("filterAndSortContainer").getChild("filterReadOnly");
145
- if (this.filterReadOnlyDictionaries) {
146
- this.dictionariesReference = this.dictionariesReference.filter(this.checkReadOnly);
147
- FRO.config.spanClass = "hci-dic-span-1";
148
- FRO.config.showValue = (FRO.config.showValueFlag) ? this.dictionariesReference.length + " Result(s)" : "";
149
- FRO.updateConfig(FRO.config);
150
- }
151
- else {
152
- this.dictionariesReference = this.dictionariesReferenceCopy;
153
- FRO.config.spanClass = "hci-dic-span-3";
154
- FRO.config.showValue = (FRO.config.showValueFlag) ? this.dictionariesReference.length + " Result(s)" : "";
155
- FRO.updateConfig(FRO.config);
156
- }
157
- }
158
- /*******************************************************
159
- * Helper Method To Determine If Dictionary Is Read Only
160
- *******************************************************/
161
- checkReadOnly(dictionary) {
162
- return !dictionary.readOnly;
163
- }
164
- /***********************************************************
165
- * Helper Method To Determine If Dictionary Is Internal Only
166
- ***********************************************************/
167
- checkInternalOnly(dictionary) {
168
- return !dictionary.internalOnly;
169
- }
170
- }
171
- DictionaryEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorComponent, deps: [{ token: i1.DictionaryService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
172
- DictionaryEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DictionaryEditorComponent, selector: "hci-dictionary-editor", host: { properties: { "class": "this.classList" } }, viewQueries: [{ propertyName: "sidebar", first: true, predicate: SidebarComponent, descendants: true, static: true }, { propertyName: "dictionaryTemplate", first: true, predicate: ["dictionaryTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
173
- <hci-sidebar #sidebar></hci-sidebar>
174
-
175
- <router-outlet></router-outlet>
176
-
177
- <ng-template #dictionaryTemplate let-row="row">
178
- <div class="search-item" [routerLink]="['detail', row.className]" [routerLinkActive]="['active']">
179
- <div class="ml-3" [ngStyle]="{'color':row.readOnly === false ? '#005480' : '#8a9499'}">
180
- {{row.displayName}}
181
- </div>
182
- </div>
183
- </ng-template>
184
- `, isInline: true, styles: [".active .ml-3{color:#fff!important}:host::ng-deep .format-bottom-padding{padding-bottom:10px}:host::ng-deep .active{height:30px}:host::ng-deep .search-item{height:30px;overflow:hidden;white-space:nowrap}:host::ng-deep #filterReadOnly{float:left}:host::ng-deep #filterAndSortContainer{background-color:var(--greywarm-meddark)!important;height:42px}:host::ng-deep .results-count{height:0!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i4.SidebarComponent, selector: "hci-sidebar", inputs: ["hidden", "output", "sidebarClasses", "showCollapse", "draggable", "sidebarSplitterWidth", "collapsedSize", "minWidth", "maxWidth", "sidebarSize", "sidebarFontSize", "sidebarExpanded"], outputs: ["sidebarSizeChange"] }] });
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorComponent, decorators: [{
186
- type: Component,
187
- args: [{ selector: "hci-dictionary-editor", template: `
188
- <hci-sidebar #sidebar></hci-sidebar>
189
-
190
- <router-outlet></router-outlet>
191
-
192
- <ng-template #dictionaryTemplate let-row="row">
193
- <div class="search-item" [routerLink]="['detail', row.className]" [routerLinkActive]="['active']">
194
- <div class="ml-3" [ngStyle]="{'color':row.readOnly === false ? '#005480' : '#8a9499'}">
195
- {{row.displayName}}
196
- </div>
197
- </div>
198
- </ng-template>
199
- `, styles: [".active .ml-3{color:#fff!important}:host::ng-deep .format-bottom-padding{padding-bottom:10px}:host::ng-deep .active{height:30px}:host::ng-deep .search-item{height:30px;overflow:hidden;white-space:nowrap}:host::ng-deep #filterReadOnly{float:left}:host::ng-deep #filterAndSortContainer{background-color:var(--greywarm-meddark)!important;height:42px}:host::ng-deep .results-count{height:0!important}\n"] }]
200
- }], ctorParameters: function () { return [{ type: i1.DictionaryService }, { type: i0.Renderer2 }]; }, propDecorators: { classList: [{
201
- type: HostBinding,
202
- args: ["class"]
203
- }], sidebar: [{
204
- type: ViewChild,
205
- args: [SidebarComponent, { static: true }]
206
- }], dictionaryTemplate: [{
207
- type: ViewChild,
208
- args: ["dictionaryTemplate", { read: TemplateRef, static: true }]
209
- }] } });
210
-
211
- /**
212
- * Splash screen for the editor when no dictionary is selected.
213
- *
214
- * TODO: Use this page to put more of a guide on how to use the editor?
215
- *
216
- * @since 1.0.0
217
- */
218
- class DictionaryEditorHomeComponent {
219
- constructor() {
220
- this.classList = "outlet-column y-auto";
221
- }
222
- }
223
- DictionaryEditorHomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorHomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
224
- DictionaryEditorHomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DictionaryEditorHomeComponent, selector: "core-dictionary-editor-home", host: { properties: { "class": "this.classList" } }, ngImport: i0, template: `
225
- <div class="d-flex m-3 flex-column flex-grow">
226
- <h4>Dictionary Editor</h4>
227
-
228
- <div class="d-flex">
229
- Select a dictionary from the sidebar to view its properties and data.
230
- </div>
231
- </div>
232
- `, isInline: true });
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorHomeComponent, decorators: [{
234
- type: Component,
235
- args: [{
236
- selector: "core-dictionary-editor-home",
237
- template: `
238
- <div class="d-flex m-3 flex-column flex-grow">
239
- <h4>Dictionary Editor</h4>
240
-
241
- <div class="d-flex">
242
- Select a dictionary from the sidebar to view its properties and data.
243
- </div>
244
- </div>
245
- `
246
- }]
247
- }], propDecorators: { classList: [{
248
- type: HostBinding,
249
- args: ["class"]
250
- }] } });
251
-
252
- /**
253
- * This class' purpose is to place FormControls on cells in the grid, and to link them by rows, and rows to the grid as a whole.
254
- * It allows you to add validators for a cells' value and link an error type to an error message to display in a tooltip, or
255
- * you can provide a function to test some information about the row and provide an error message.
256
- *
257
- * The class works off of a number of properties added to the columnDefs in the ag-grid.
258
- *
259
- * We are looking for the following properties:
260
- * 1. errorMessageHeader : a string to display at the top of the list of any errors found for the cell
261
- * 2. validators : an array of angular validators to describe the cell value
262
- * 3. errorNameErrorMessageMap : an array of objects with "errorName"s and "errorMessage"s that are used to create a displayed list for the user
263
- * 4. setErrors: a function with the signature:
264
- * (value: any, data: any, node: any, colDef: any, rowIndex: any, gridApi: any) => string
265
- * which is called to generate a custom error message, if needed. An empty or null string
266
- * is treated as not being an error.
267
- *
268
- * Example column definition:
269
- * {
270
- * headerName: "Name",
271
- * editable: false,
272
- * width: 600,
273
- * cellRendererFramework: TextAlignLeftMiddleRenderer,
274
- * setErrors: (value: any,
275
- * data: any,
276
- * node: any,
277
- * colDef: any,
278
- * rowIndex: any,
279
- * gridApi: any) => {
280
- * return (value && value === 'TEST') ? 'Invalid name' : '';
281
- * },
282
- * validators: [ Validators.minLength(10) ],
283
- * errorMessageHeader: 'TestingTestingTesting',
284
- * errorNameErrorMessageMap: [
285
- * { errorName: 'minlength', errorMessage: 'Name is too short' }
286
- * ],
287
- * field: "name"
288
- * }
289
- *
290
- * To use with a new renderer, extend this class, do not override agInit, or call super.agInit(params) first.
291
- * (You can use agInit2 instead, called right after agInit).
292
- *
293
- * To display a tooltip with the error messages, include an element with a matTooltip pointing to this.errorMessage, like:
294
- * <div [matTooltip]="this.errorMessage" [matTooltipShowDelay]="300" [matTooltipHideDelay]="300" ...
295
- * For cell highlighting, you can add a CSS class something like :
296
- * .error {
297
- * background: linear-gradient(rgba(255,0,0,0.25), rgba(255,0,0,0.25), rgba(255,0,0,0.25));
298
- * border: solid red 2px;
299
- * }
300
- * and a conditional class on an element in the template, like :
301
- * class="{{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}"
302
- */
303
- class CellRendererValidation {
304
- constructor() {
305
- this.errorMessage = "";
306
- }
307
- agInit(params) {
308
- this.params = params;
309
- this.formBuilder = new UntypedFormBuilder();
310
- if (this.params
311
- && this.params.node
312
- && this.params.node.gridApi
313
- && this.params.node.gridApi.formGroup === undefined) {
314
- let foundDelayValidationProperty = false;
315
- for (let columnDef of params.node.gridApi.columnController.columnDefs) {
316
- if (columnDef.delayValidation && columnDef.delayValidation === true) {
317
- foundDelayValidationProperty = true;
318
- }
319
- }
320
- if (!foundDelayValidationProperty) {
321
- this.determineIfAllRowsNeedValidationInAdvance();
322
- this.createAllFormControls();
323
- }
324
- }
325
- this.getErrorMessage();
326
- this.agInit2(params);
327
- }
328
- refresh(params) {
329
- return false;
330
- }
331
- // This function iterates over every cell in the grid and prepares all their needed formGroups and formControls.
332
- //
333
- // This was done this way (in the cell renderer) for three reasons :
334
- // 1. We need to wait until the column and row data have been provided to the grid
335
- // 2. We don't want the programmer to have to implement it themselves every time they create a grid
336
- // 3. The grid does not create all the cell renderers in advance, just those that fit on the screen
337
- // (plus a few nearby) meaning we can't just use the cell renderer's constructor, since we don't
338
- // know if the information we start with is valid on every screen, and because we have some calls
339
- // that send back the entire grid's worth of data.
340
- //
341
- // There may be a better way to do this, in which case this should probably be replaced!
342
- createAllFormControls() {
343
- if (this.params
344
- && this.params.column
345
- && this.params.column.colDef
346
- && this.params.data
347
- && this.params.node
348
- && this.params.node.gridApi
349
- && this.params.node.gridApi.getModel()) {
350
- if (this.params.node.gridApi.gridOptionsWrapper
351
- && this.params.node.gridApi.gridOptionsWrapper.gridOptions
352
- && !this.params.node.gridApi.gridOptionsWrapper.gridOptions._eventsChangedByCellRendererValidation) {
353
- this.changeGridOptionsEvents();
354
- this.params.node.gridApi.gridOptionsWrapper.gridOptions._eventsChangedByCellRendererValidation = true;
355
- }
356
- let allNodes = [];
357
- if (this.params.node.gridApi.mode_needToValidateOnlyRenderedCells) {
358
- allNodes = this.params.node.gridApi.getRenderedNodes();
359
- }
360
- else {
361
- allNodes = this.params.node.gridApi.getModel().rowsToDisplay;
362
- }
363
- if (!this.params.node.gridApi.formGroup
364
- || (this.params.node.gridApi.formGroup
365
- && this.params.node.gridApi.formGroup.controls
366
- && this.params.node.gridApi.formGroup.controls.length != allNodes.length)) {
367
- this.params.node.gridApi.formGroup = new UntypedFormGroup({});
368
- }
369
- if (this.params.node.gridApi.columnController
370
- && this.params.node.gridApi.columnController.columnDefs) {
371
- for (let columnDef of this.params.node.gridApi.columnController.columnDefs) {
372
- if (columnDef.outerForm && columnDef.formName) {
373
- if (!columnDef.outerForm.get(columnDef.formName)) {
374
- columnDef.outerForm.addControl(columnDef.formName, this.params.node.gridApi.formGroup);
375
- }
376
- else {
377
- columnDef.outerForm.setControl(columnDef.formName, this.params.node.gridApi.formGroup);
378
- }
379
- }
380
- }
381
- }
382
- let columns;
383
- if (this.params && this.params.columnApi && this.params.columnApi.columnController) {
384
- columns = this.params.columnApi.columnController.gridColumns.filter((column) => {
385
- return column.colDef
386
- && column.colDef.field
387
- && (column.colDef.validators || column.colDef.setErrors);
388
- });
389
- }
390
- for (let node of allNodes) {
391
- for (let column of columns) {
392
- if (column.colDef
393
- && column.colDef.field
394
- && (column.colDef.validators || column.colDef.setErrors)) {
395
- node[column.colDef.field + "_errorMessage"] = '';
396
- let formControl = new UntypedFormControl(column.colDef.field + '_formControl', []);
397
- if (!node.formGroup) {
398
- node.formGroup = new UntypedFormGroup({});
399
- }
400
- node.formGroup.addControl(column.colDef.field + '_formControl', formControl);
401
- if (!Array.isArray(column.colDef.validators)) {
402
- column.colDef.validators = [column.colDef.validators];
403
- }
404
- formControl.setValidators(column.colDef.validators);
405
- this.updateErrorMessage(formControl, node, column.colDef);
406
- }
407
- }
408
- if (!this.params.node.gridApi.formGroup.contains('RowGroup_' + node.rowIndex)) {
409
- if (!node.formGroup) {
410
- node.formGroup = new UntypedFormGroup({});
411
- }
412
- this.params.node.gridApi.formGroup.addControl('RowGroup_' + node.rowIndex, node.formGroup);
413
- }
414
- }
415
- }
416
- }
417
- changeGridOptionsEvents() {
418
- if (!this.params
419
- || !this.params.node
420
- || !this.params.node.gridApi
421
- || !this.params.node.gridApi.gridOptionsWrapper
422
- || !this.params.node.gridApi.gridOptionsWrapper.gridOptions) {
423
- return;
424
- }
425
- if (this.params.node.gridApi.gridOptionsWrapper.gridOptions.onRowDataChanged) {
426
- this.params.node.gridApi.gridOptionsWrapper.gridOptions.onRowDataChanged2 = this.params.node.gridApi.gridOptionsWrapper.gridOptions.onRowDataChanged;
427
- }
428
- this.params.node.gridApi.gridOptionsWrapper.gridOptions.onRowDataChanged = ((event) => {
429
- this.createAllFormControls();
430
- this.fetchErrorMessagesForCurrentlyRenderedCells();
431
- if (this.params.node.gridApi.gridOptionsWrapper.gridOptions.onRowDataChanged2) {
432
- this.params.node.gridApi.gridOptionsWrapper.gridOptions.onRowDataChanged2(event);
433
- }
434
- });
435
- if (this.params.node.gridApi.gridOptionsWrapper.gridOptions.onGridColumnsChanged) {
436
- this.params.node.gridApi.gridOptionsWrapper.gridOptions.onGridColumnsChanged2 = this.params.node.gridApi.gridOptionsWrapper.gridOptions.onGridColumnsChanged;
437
- }
438
- this.params.node.gridApi.gridOptionsWrapper.gridOptions.onGridColumnsChanged = ((event) => {
439
- this.determineIfAllRowsNeedValidationInAdvance();
440
- this.createAllFormControls();
441
- this.fetchErrorMessagesForCurrentlyRenderedCells();
442
- if (this.params.node.gridApi.gridOptionsWrapper.gridOptions.onGridColumnsChanged2) {
443
- this.params.node.gridApi.gridOptionsWrapper.gridOptions.onGridColumnsChanged2(event);
444
- }
445
- });
446
- }
447
- getErrorMessage() {
448
- if (this.params
449
- && this.params.node
450
- && this.params.node.formGroup
451
- && this.params.column
452
- && this.params.column.colDef
453
- && this.params.column.colDef.field) {
454
- let formControl = this.params.node.formGroup.get(this.params.column.colDef.field + '_formControl');
455
- this.updateErrorMessage(formControl, this.params.node, this.params.column.colDef);
456
- this.errorMessage = this.params.node[this.params.column.colDef.field + "_errorMessage"];
457
- }
458
- }
459
- refreshFormControlValue(formControl, data, fieldName) {
460
- if (formControl && data && fieldName && data[fieldName] !== undefined) {
461
- formControl.setValue(data[fieldName]);
462
- formControl.updateValueAndValidity();
463
- }
464
- }
465
- updateErrorMessage(formControl, node, columnDefinition) {
466
- if (!formControl || !node || !columnDefinition) {
467
- return '';
468
- }
469
- let customErrorMessage = '';
470
- if (columnDefinition.setErrors) {
471
- customErrorMessage = columnDefinition.setErrors(node.data[columnDefinition.field], node.data, node, columnDefinition, node.rowIndex, node.gridApi);
472
- }
473
- let errorMessageName = columnDefinition.field + "_errorMessage";
474
- this.refreshFormControlValue(formControl, node.data, columnDefinition.field);
475
- node[errorMessageName] = '';
476
- if (formControl.invalid || (customErrorMessage && customErrorMessage !== '')) {
477
- if (columnDefinition.errorMessageHeader) {
478
- node[errorMessageName] += '' + columnDefinition.errorMessageHeader + '\n';
479
- }
480
- else {
481
- node[errorMessageName] +=
482
- 'Invalid value "' + node.data[columnDefinition.field] + '" for field (' + columnDefinition.field + ')\n';
483
- }
484
- }
485
- if (columnDefinition.errorNameErrorMessageMap) {
486
- if (!Array.isArray(columnDefinition.errorNameErrorMessageMap)) {
487
- columnDefinition.errorNameErrorMessageMap = [columnDefinition.errorNameErrorMessageMap];
488
- }
489
- for (let errorNameErrorMessagePair of columnDefinition.errorNameErrorMessageMap) {
490
- if (!!errorNameErrorMessagePair.errorName && !!errorNameErrorMessagePair.errorMessage) {
491
- if (formControl.hasError(errorNameErrorMessagePair.errorName)) {
492
- node[errorMessageName] += errorNameErrorMessagePair.errorMessage + '\n';
493
- }
494
- }
495
- }
496
- }
497
- node[errorMessageName] += customErrorMessage;
498
- return node[errorMessageName];
499
- }
500
- determineIfAllRowsNeedValidationInAdvance() {
501
- if (this.params
502
- && this.params.node
503
- && this.params.node.gridApi
504
- && this.params.columnApi
505
- && this.params.columnApi.columnController
506
- && this.params.columnApi.columnController.gridColumns) {
507
- let columns = this.params.columnApi.columnController.gridColumns.filter((column) => {
508
- return column.colDef
509
- && column.colDef.field
510
- && (column.colDef.validators || column.colDef.setErrors)
511
- && column.colDef.editable === true
512
- && !(column.colDef.validateOnlyRenderedCells
513
- && column.colDef.validateOnlyRenderedCells === true);
514
- });
515
- this.params.node.gridApi.mode_needToValidateOnlyRenderedCells = Array.isArray(columns) && columns.length === 0;
516
- }
517
- }
518
- fetchErrorMessagesForCurrentlyRenderedCells() {
519
- if (this.params
520
- && this.params.node
521
- && this.params.node.gridApi) {
522
- let getCellRendererParams = { rowNodes: this.params.node.gridApi.getRenderedNodes() };
523
- for (let cellRenderer of this.params.node.gridApi.getCellRendererInstances(getCellRendererParams)) {
524
- if (cellRenderer._agAwareComponent && cellRenderer._agAwareComponent.getErrorMessage) {
525
- cellRenderer._agAwareComponent.getErrorMessage();
526
- }
527
- }
528
- }
529
- }
530
- updateValidation() {
531
- console.log("Successfully reached!");
532
- // add this form control
533
- let columns = this.params.columnApi.columnController.gridColumns.filter((column) => {
534
- return column.colDef
535
- && column.colDef.field
536
- && (column.colDef.validators || column.colDef.setErrors)
537
- && column.colDef.field === this.params.field;
538
- });
539
- if (this.params.colDef
540
- && this.params.colDef.field
541
- && (this.params.colDef.validators || this.params.colDef.setErrors)) {
542
- this.params.node[this.params.colDef.field + "_errorMessage"] = '';
543
- let formControl = new UntypedFormControl(this.params.colDef.field + '_formControl', []);
544
- if (!this.params.node.formGroup) {
545
- this.params.node.formGroup = new UntypedFormGroup({});
546
- if (!this.params.node.gridApi.formGroup) {
547
- this.params.node.gridApi.formGroup = new UntypedFormGroup({});
548
- }
549
- else {
550
- // check for any removed nodes & remove their validators if needed.
551
- for (let controlName of Object.keys(this.params.node.gridApi.formGroup.controls)) {
552
- if (('' + controlName).toLowerCase().substr(0, 9) === 'rowgroup_') {
553
- let found = false;
554
- for (let node of this.params.node.gridApi.getModel().rowsToDisplay) {
555
- if (('' + node.rowIndex) === ('' + controlName).substr(9)) {
556
- found = true;
557
- break;
558
- }
559
- }
560
- if (!found) {
561
- this.params.node.gridApi.formGroup.removeControl(controlName);
562
- }
563
- }
564
- }
565
- }
566
- this.params.node.gridApi.formGroup.addControl('RowGroup_' + this.params.node.rowIndex, this.params.node.formGroup);
567
- }
568
- if (!this.params.node.formGroup.controls[this.params.colDef.field + '_formControl']) {
569
- this.params.node.formGroup.addControl(this.params.colDef.field + '_formControl', formControl);
570
- if (Array.isArray(this.params.colDef.validators)) {
571
- this.params.node.formGroup.controls[this.params.colDef.field + '_formControl'].setValidators(this.params.colDef.validators);
572
- }
573
- if (this.params.node.gridApi.columnController
574
- && this.params.node.gridApi.columnController.columnDefs) {
575
- for (let columnDef of this.params.node.gridApi.columnController.columnDefs) {
576
- if (columnDef.outerForm && columnDef.formName) {
577
- if (!columnDef.outerForm.get(columnDef.formName)) {
578
- columnDef.outerForm.addControl(columnDef.formName, this.params.node.gridApi.formGroup);
579
- }
580
- else {
581
- columnDef.outerForm.setControl(columnDef.formName, this.params.node.gridApi.formGroup);
582
- }
583
- }
584
- }
585
- }
586
- }
587
- this.updateErrorMessage(formControl, this.params.node, this.params.colDef);
588
- }
589
- // add column control groups if needed
590
- // add row control groups if needed
591
- // setup grid control group if needed
592
- // Might need to trigger cell validation to run with the new validation.
593
- }
594
- }
595
-
596
- class SelectRenderer extends CellRendererValidation {
597
- agInit2(params) {
598
- this.options = [];
599
- this.value = "";
600
- this.optionsValueField = "";
601
- this.optionsDisplayField = "";
602
- this.defaultDisplayField = "";
603
- this.defaultDisplayValue = "";
604
- if (this.params) {
605
- if (this.params.value) {
606
- this.value = this.params.value;
607
- }
608
- else {
609
- this.value = "";
610
- }
611
- }
612
- if (this.params && this.params.column && this.params.column.colDef) {
613
- if (this.params.column.colDef.rendererOptions) {
614
- this.options = this.params.column.colDef.rendererOptions;
615
- }
616
- else {
617
- this.options = this.params.column.colDef.selectOptions;
618
- }
619
- this.optionsValueField = this.params.column.colDef.selectOptionsValueField;
620
- this.optionsDisplayField = this.params.column.colDef.selectOptionsDisplayField;
621
- this.defaultDisplayField = this.params.column.colDef.defaultDisplayField;
622
- this.defaultDisplayValue = this.params.column.colDef.defaultDisplayValue;
623
- }
624
- if (this.defaultDisplayField) {
625
- for (let option of this.options) {
626
- if (option[this.defaultDisplayField] === this.defaultDisplayValue) {
627
- this.defaultOption = option;
628
- break;
629
- }
630
- }
631
- }
632
- if (this.value && this.value != ""
633
- && this.options && this.options.length > 0
634
- && this.optionsValueField && this.optionsValueField != ""
635
- && this.optionsDisplayField && this.optionsDisplayField != "") {
636
- let foundOption = false;
637
- for (let option of this.options) {
638
- if (option[this.optionsValueField] && option[this.optionsValueField] === this.value) {
639
- if (option[this.optionsDisplayField]) {
640
- this.display = option[this.optionsDisplayField];
641
- foundOption = true;
642
- }
643
- else {
644
- this.display = this.value;
645
- }
646
- break;
647
- }
648
- }
649
- // if we didn't find the item in the dictionary, check if the items are strings in different cases
650
- if (!foundOption) {
651
- for (let option of this.options) {
652
- if (option[this.optionsValueField] && ("" + option[this.optionsValueField]).toLowerCase() === ("" + this.value).toLowerCase()) {
653
- if (option[this.optionsDisplayField]) {
654
- this.display = option[this.optionsDisplayField];
655
- foundOption = true;
656
- }
657
- else {
658
- this.display = this.value;
659
- }
660
- break;
661
- }
662
- }
663
- }
664
- // if we still didn't find the item, at least display the id.
665
- if (!foundOption) {
666
- this.display = this.value;
667
- }
668
- }
669
- else if (this.defaultOption && this.value != "") {
670
- this.display = this.defaultOption[this.optionsDisplayField];
671
- }
672
- else {
673
- this.display = this.value;
674
- }
675
- }
676
- refresh() {
677
- return false;
678
- }
679
- }
680
- SelectRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectRenderer, deps: null, target: i0.ɵɵFactoryTarget.Component });
681
- SelectRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SelectRenderer, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
682
- <!--<div [matTooltip]="this.errorMessage"
683
- [matTooltipShowDelay]="300"
684
- [matTooltipHideDelay]="300"
685
- class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">-->
686
- <div class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">
687
- <div class="t full-width full-height fix-table">
688
- <div class="tr">
689
- <div class="td cell-text-container ellipsis">
690
- {{display}}
691
- </div>
692
- </div>
693
- </div>
694
- </div>
695
- `, isInline: true, styles: [".t{display:table}.tr{display:table-row}.td{display:table-cell}.cell-text-container{vertical-align:middle;padding-left:.3rem}.full-width{width:100%}.full-height{height:100%}.fix-table{table-layout:fixed}.ellipsis{overflow:hidden;text-overflow:ellipsis}.error{background:linear-gradient(rgba(255,0,0,.25),rgba(255,0,0,.25),rgba(255,0,0,.25));border:solid red 2px}\n"] });
696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectRenderer, decorators: [{
697
- type: Component,
698
- args: [{ template: `
699
- <!--<div [matTooltip]="this.errorMessage"
700
- [matTooltipShowDelay]="300"
701
- [matTooltipHideDelay]="300"
702
- class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">-->
703
- <div class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">
704
- <div class="t full-width full-height fix-table">
705
- <div class="tr">
706
- <div class="td cell-text-container ellipsis">
707
- {{display}}
708
- </div>
709
- </div>
710
- </div>
711
- </div>
712
- `, styles: [".t{display:table}.tr{display:table-row}.td{display:table-cell}.cell-text-container{vertical-align:middle;padding-left:.3rem}.full-width{width:100%}.full-height{height:100%}.fix-table{table-layout:fixed}.ellipsis{overflow:hidden;text-overflow:ellipsis}.error{background:linear-gradient(rgba(255,0,0,.25),rgba(255,0,0,.25),rgba(255,0,0,.25));border:solid red 2px}\n"] }]
713
- }] });
714
-
715
- //import {MatDialog, MatDialogConfig, MatDialogRef} from "@angular/material/dialog";
716
- //import {SpinnerDialogComponent} from "../popup/spinner-dialog.component";
717
- class SelectEditor {
718
- get options() {
719
- if (this.using_selectOptionsPerRowFilterFunction) {
720
- return this._filteredOptions;
721
- }
722
- else {
723
- return this._options;
724
- }
725
- }
726
- set options(value) {
727
- this._options = value;
728
- }
729
- // private spinnerDialogRefs: MatDialogRef<SpinnerDialogComponent>[] = [];
730
- constructor() {
731
- this.using_selectOptionsPerRowFilterFunction = false;
732
- this._spinnerDialogIsOpen = false;
733
- }
734
- agInit(params) {
735
- this.params = params;
736
- this.options = [];
737
- this.optionsValueField = "";
738
- this.optionsDisplayField = "";
739
- if (this.params && this.params.column && this.params.column.colDef) {
740
- this.gridValueField = this.params.column.colDef.field;
741
- this.options = this.params.column.colDef.selectOptions;
742
- this.optionsValueField = this.params.column.colDef.selectOptionsValueField;
743
- this.optionsDisplayField = this.params.column.colDef.selectOptionsDisplayField;
744
- if (this.params.column.colDef.selectOptionsPerRowFilterFunction) {
745
- let backup = this.selectOptionsPerRowFilterFunction;
746
- try {
747
- this.selectOptionsPerRowFilterFunction = this.params.column.colDef.selectOptionsPerRowFilterFunction;
748
- this.using_selectOptionsPerRowFilterFunction = !!this.selectOptionsPerRowFilterFunction;
749
- }
750
- catch (e) {
751
- console.error("selectOptionsPerRowFilterFunction option has wrong signature for column : " + this.params.column.colDef.headerName + "\n"
752
- + " Requires signature (context:any, rowData: any, option: any) => boolean");
753
- this.selectOptionsPerRowFilterFunction = backup;
754
- this.using_selectOptionsPerRowFilterFunction = !!backup;
755
- }
756
- }
757
- this.context = this.params.column.colDef.context;
758
- this.fillGroupAttribute = this.params.column.colDef.fillGroupAttribute;
759
- this.fillAll = this.params.column.colDef.fillAll && ("" + this.params.column.colDef.fillAll).toLowerCase() !== "false";
760
- this.showFillButton = this.params.column.colDef.showFillButton && ("" + this.params.column.colDef.showFillButton).toLowerCase() !== "false";
761
- if (this._options
762
- && this.params.node
763
- && this.params.node.data
764
- && this.using_selectOptionsPerRowFilterFunction) {
765
- this._filteredOptions = this._options.filter((option) => {
766
- return this.selectOptionsPerRowFilterFunction(this.context, this.params.node.data, option);
767
- });
768
- }
769
- }
770
- if (this.params) {
771
- this.value = this.params.value ? "" + this.params.value : "";
772
- }
773
- if (this.showFillButton && !this.fillAll && (!this.fillGroupAttribute || this.fillGroupAttribute === "")) {
774
- throw new Error("Invalid state, cannot use fill button without specifying the fillGroupAttribute or fillAll.");
775
- }
776
- }
777
- ngOnDestroy() {
778
- if (this.params && this.params.node && this.params.node[(this.gridValueField + "_originalValue")]) {
779
- this.value = this.params.node[(this.gridValueField + "_originalValue")];
780
- }
781
- }
782
- onChange(event) {
783
- if (event && event.currentTarget) {
784
- if (this.params && this.params.node && !this.params.node[(this.gridValueField + "_originalValue")]) {
785
- this.params.node[(this.gridValueField + "_originalValue")] = this.value;
786
- }
787
- // This looks unnecessary, since this.value is linked to the value of the select component, but
788
- // because this also ends editing, it also queues the destruction of this component and the call to getValue.
789
- // The problem was that this.value isn't updated with the new value before this event fires,
790
- // so we need to update it manually here.
791
- this.value = event.currentTarget.value;
792
- this.params.node.setDataValue(this.gridValueField, this.value);
793
- }
794
- if (this.params) {
795
- // If the fill button, which is part of the editor, is activated, don't stop editing
796
- // immediately after making a selection.
797
- if (!this.showFillButton) {
798
- this.params.stopEditing();
799
- }
800
- }
801
- }
802
- getValue() {
803
- return this.value ? this.value : "";
804
- }
805
- isPopup() {
806
- return false;
807
- }
808
- onFillButtonClicked() {
809
- if (!this.fillAll && (!this.fillGroupAttribute || this.fillGroupAttribute === "")) {
810
- throw new Error('No column attribute "fillGroupAttribute" or "fillAll" specified. This is required to use the Fill functionality.');
811
- }
812
- if (this.params && this.params.column && this.params.column.gridApi && this.params.node && (this.fillAll || (this.fillGroupAttribute && this.fillGroupAttribute !== ""))) {
813
- let thisRowNode = this.params.node;
814
- //this.startSpinnerDialog();
815
- this.params.column.gridApi.forEachNodeAfterFilter((rowNode) => {
816
- if (rowNode && rowNode.data && thisRowNode && thisRowNode.data && (this.fillAll || rowNode.data[this.fillGroupAttribute] === thisRowNode.data[this.fillGroupAttribute])) {
817
- let spoofedEvent = {
818
- api: this.params.column.gridApi,
819
- colDef: this.params.column.colDef,
820
- column: this.params.column,
821
- columnApi: this.params.column.columnApi,
822
- context: undefined,
823
- data: rowNode.data,
824
- event: null,
825
- newValue: this.value,
826
- node: rowNode,
827
- oldValue: rowNode.data[this.gridValueField],
828
- rowIndex: rowNode.rowIndex,
829
- rowPinned: undefined,
830
- type: "cellValueChanged",
831
- value: this.value
832
- };
833
- rowNode.data[this.gridValueField] = this.value;
834
- rowNode.setDataValue(this.gridValueField, this.value);
835
- this.params.column.gridApi.dispatchEvent(spoofedEvent);
836
- }
837
- });
838
- this.params.column.gridApi.refreshCells();
839
- setTimeout(() => {
840
- //this.stopSpinnerDialogs();
841
- });
842
- }
843
- }
844
- }
845
- SelectEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
846
- SelectEditor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SelectEditor, selector: "ng-component", ngImport: i0, template: `
847
- <div class="full-width full-height flex-column-container">
848
- <div class="full-height flex-stretch flex-row">
849
- <select class="full-width full-height" [(value)]="value" (change)="onChange($event)">
850
- <option hidden>
851
- Select An Option
852
- </option>
853
- <option
854
- *ngFor="let option of options"
855
- value="{{option.hasOwnProperty(optionsValueField) ? option[optionsValueField] : (option.value) ? option.value : option }}">
856
- {{option.hasOwnProperty(optionsDisplayField) ? option[optionsDisplayField] : (option.display) ? option.display : option }}
857
- </option>
858
- </select>
859
- </div>
860
- <div *ngIf="showFillButton" class="full-height flex-row button-container">
861
- <button class="full-height" (click)="onFillButtonClicked()">Fill</button>
862
- </div>
863
- </div>
864
- `, isInline: true, styles: [".full-width{width:100%}.full-height{height:100%}.flex-column-container{display:flex;flex-direction:row}.flex-row{display:flex}.flex-stretch{display:flex;flex:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectEditor, decorators: [{
866
- type: Component,
867
- args: [{ template: `
868
- <div class="full-width full-height flex-column-container">
869
- <div class="full-height flex-stretch flex-row">
870
- <select class="full-width full-height" [(value)]="value" (change)="onChange($event)">
871
- <option hidden>
872
- Select An Option
873
- </option>
874
- <option
875
- *ngFor="let option of options"
876
- value="{{option.hasOwnProperty(optionsValueField) ? option[optionsValueField] : (option.value) ? option.value : option }}">
877
- {{option.hasOwnProperty(optionsDisplayField) ? option[optionsDisplayField] : (option.display) ? option.display : option }}
878
- </option>
879
- </select>
880
- </div>
881
- <div *ngIf="showFillButton" class="full-height flex-row button-container">
882
- <button class="full-height" (click)="onFillButtonClicked()">Fill</button>
883
- </div>
884
- </div>
885
- `, styles: [".full-width{width:100%}.full-height{height:100%}.flex-column-container{display:flex;flex-direction:row}.flex-row{display:flex}.flex-stretch{display:flex;flex:1}\n"] }]
886
- }], ctorParameters: function () { return []; } });
887
-
888
- class NewRowComponent {
889
- get colDefs() {
890
- return this._colDefs;
891
- }
892
- set colDefs(value) {
893
- this._colDefs = value;
894
- this.newRow[0]["editOrNew"] = "new"; //needed for editable function
895
- for (let colDef of this.colDefs) {
896
- this.newRow[0][colDef.field] = "";
897
- }
898
- }
899
- constructor(activeModalSearch) {
900
- this.activeModalSearch = activeModalSearch;
901
- this.newRowSubject = new Subject();
902
- this.newRow = [{}];
903
- this.gridOptions = {
904
- context: {
905
- componentParent: this
906
- }
907
- };
908
- }
909
- save() {
910
- // get contents of row
911
- //making sure the grid has stopped editing when user clicks save
912
- // waiting a tick to make sure that async event has finished
913
- this.gridApi.stopEditing();
914
- setTimeout(() => {
915
- let newData = [];
916
- this.gridApi.forEachNode((node) => {
917
- newData.push(node.data);
918
- });
919
- // validate the contents of row
920
- let isValid = true;
921
- for (let colDef of this.colDefs) {
922
- if (colDef.dictionaryDisplay == true && !newData[0][colDef.field]) {
923
- let displayDictField = null;
924
- if (this.gridOptions.context && this.gridOptions.context.componentParent
925
- && this.gridOptions.context.componentParent.dictionary) {
926
- let dictFields = this.gridOptions.context.componentParent.dictionary.fields;
927
- displayDictField = dictFields.find(field => (field.dictionaryDisplay === true));
928
- }
929
- //don't require displayField if it is readonly when making a new entry
930
- if (displayDictField && displayDictField.protectionType === "Read Only") {
931
- isValid = true;
932
- }
933
- else {
934
- isValid = false;
935
- }
936
- }
937
- }
938
- if (isValid) {
939
- // send contents of row to other ag-grid
940
- this.newRowSubject.next(newData);
941
- this.activeModalSearch.dismiss("Cancel");
942
- }
943
- else {
944
- // signal they need to fill out the row
945
- alert("The display value is required, please enter a value and then save again.");
946
- }
947
- });
948
- }
949
- onSamplesGridReady(event) {
950
- event.api.setColumnDefs(this.colDefs);
951
- event.api.sizeColumnsToFit();
952
- this.gridApi = event.api;
953
- }
954
- }
955
- NewRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NewRowComponent, deps: [{ token: i1$2.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
956
- NewRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NewRowComponent, selector: "new-row", ngImport: i0, template: `
957
- <div class="d-flex flex-column" style="height:11em; width:58vw;">
958
- <div class="d-flex flex-row">
959
- <div class="flex-grow-1"></div>
960
- <button type="button" class="close" aria-label="Close"
961
- style="margin-right: 10px; width: 20px;"
962
- (click)="activeModalSearch.dismiss('Cancel')">
963
- <span aria-hidden="true">&times;</span>
964
- </button>
965
- </div>
966
-
967
- <div class="flex-grow-1" style="padding-right: 8px; padding-left: 8px;">
968
- <ag-grid-angular class="ag-theme-balham full-height full-width"
969
- [rowData]="newRow"
970
- [singleClickEdit]="true"
971
- [gridOptions]="gridOptions"
972
- (gridReady)="this.onSamplesGridReady($event)">
973
- </ag-grid-angular>
974
- </div>
975
-
976
- <div class="d-flex flex-row" style="padding: 0.5em;">
977
- <div class="flex-grow-1"></div>
978
- <button class="btn btn-red ml-3"
979
- style="color: white;"
980
- (click)="activeModalSearch.dismiss('Cancel')">
981
- Cancel
982
- </button>
983
- <button class="btn btn-primary ml-3"
984
- style="color: white;"
985
- (click)="save()">
986
- Save
987
- </button>
988
- </div>
989
- </div>
990
- `, isInline: true, styles: [".full-height{height:100%}.full-width{width:100%}:host ::ng-deep .ag-ltr .ag-cell{border-right-color:gray}\n"], dependencies: [{ kind: "component", type: i2$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "suppressMenuHide", "enableBrowserTooltips", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "maintainColumnOrder", "suppressFieldDotNotation", "deltaColumnMode", "applyColumnDefOrder", "immutableColumns", "suppressSetColumnStateEvents", "suppressColumnStateEvents", "colWidth", "minColWidth", "maxColWidth", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "components", "frameworkComponents", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "undoRedoCellEditing", "undoRedoCellEditingLimit", "stopEditingWhenGridLosesFocus", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "defaultExportParams", "quickFilterText", "cacheQuickFilter", "excludeChildrenWhenTreeDataFiltering", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "loadingCellRenderer", "loadingCellRendererFramework", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererFramework", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentFramework", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDelay", "cellFadeDelay", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "fullWidthCellRendererParams", "embedFullWidthRows", "deprecatedEmbedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererFramework", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "groupRowInnerRenderer", "groupRowInnerRendererFramework", "groupMultiAutoColumn", "groupUseEntireRow", "groupSuppressAutoColumn", "rememberGroupStateWhenNewData", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "immutableData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "deltaRowDataMode", "batchUpdateWaitMillis", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideStoreType", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortingAlwaysResets", "serverSideFilteringAlwaysResets", "suppressEnterpriseResetOnNewColumns", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellSelection", "suppressCellFocus", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "deltaSort", "treeDataDisplayType", "angularCompileRows", "angularCompileFilters", "functionsPassive", "enableGroupEdit", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "suppressKeyboardEvent", "localeTextFunc", "getLocaleText", "getDocument", "paginationNumberFormatter", "groupRowAggNodes", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "defaultGroupOrderComparator", "processSecondaryColDef", "processSecondaryColGroupDef", "getDataPath", "defaultGroupSortComparator", "getChildCount", "getServerSideStoreParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowNodeId", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSort", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthCell", "isFullWidthRow", "gridOptions", "modules"], outputs: ["toolPanelVisibleChanged", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "filterOpened", "filterChanged", "filterModified", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "cellKeyPress", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }] });
991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NewRowComponent, decorators: [{
992
- type: Component,
993
- args: [{ selector: "new-row", template: `
994
- <div class="d-flex flex-column" style="height:11em; width:58vw;">
995
- <div class="d-flex flex-row">
996
- <div class="flex-grow-1"></div>
997
- <button type="button" class="close" aria-label="Close"
998
- style="margin-right: 10px; width: 20px;"
999
- (click)="activeModalSearch.dismiss('Cancel')">
1000
- <span aria-hidden="true">&times;</span>
1001
- </button>
1002
- </div>
1003
-
1004
- <div class="flex-grow-1" style="padding-right: 8px; padding-left: 8px;">
1005
- <ag-grid-angular class="ag-theme-balham full-height full-width"
1006
- [rowData]="newRow"
1007
- [singleClickEdit]="true"
1008
- [gridOptions]="gridOptions"
1009
- (gridReady)="this.onSamplesGridReady($event)">
1010
- </ag-grid-angular>
1011
- </div>
1012
-
1013
- <div class="d-flex flex-row" style="padding: 0.5em;">
1014
- <div class="flex-grow-1"></div>
1015
- <button class="btn btn-red ml-3"
1016
- style="color: white;"
1017
- (click)="activeModalSearch.dismiss('Cancel')">
1018
- Cancel
1019
- </button>
1020
- <button class="btn btn-primary ml-3"
1021
- style="color: white;"
1022
- (click)="save()">
1023
- Save
1024
- </button>
1025
- </div>
1026
- </div>
1027
- `, styles: [".full-height{height:100%}.full-width{width:100%}:host ::ng-deep .ag-ltr .ag-cell{border-right-color:gray}\n"] }]
1028
- }], ctorParameters: function () { return [{ type: i1$2.NgbActiveModal }]; } });
1029
-
1030
- class DateRenderer extends CellRendererValidation {
1031
- constructor(datePipe) {
1032
- super();
1033
- this.datePipe = datePipe;
1034
- }
1035
- agInit2(params) {
1036
- this.value = undefined;
1037
- if (this.params) {
1038
- if (this.params.value) {
1039
- this.value = this.params.value;
1040
- }
1041
- else {
1042
- this.value = undefined;
1043
- }
1044
- }
1045
- this.display = this.getDateString(this.value);
1046
- }
1047
- getDateString(date) {
1048
- if (date instanceof Date) {
1049
- if (!isNaN(date.getTime())) {
1050
- return this.datePipe.transform(date, "yyyy-MM-dd");
1051
- }
1052
- else {
1053
- return "";
1054
- }
1055
- }
1056
- else if (moment.isMoment(date)) {
1057
- if (date.isValid()) {
1058
- return date.format("YYYY-MM-DD");
1059
- }
1060
- else {
1061
- return "";
1062
- }
1063
- }
1064
- else if (typeof date == "number") {
1065
- if (date > 0) {
1066
- let temp = new Date(date);
1067
- return this.datePipe.transform(temp, "yyyy-MM-dd");
1068
- }
1069
- else {
1070
- return "";
1071
- }
1072
- }
1073
- else if (typeof date == "string") {
1074
- return date;
1075
- }
1076
- else {
1077
- return "";
1078
- }
1079
- }
1080
- refresh() {
1081
- return false;
1082
- }
1083
- }
1084
- DateRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRenderer, deps: [{ token: i1$1.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
1085
- DateRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateRenderer, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1086
- <div class="t full-width full-height fix-table">
1087
- <div class="tr">
1088
- <div class="td cell-text-container ellipsis">
1089
- {{display}}
1090
- </div>
1091
- </div>
1092
- </div>
1093
- `, isInline: true, styles: [".t{display:table}.tr{display:table-row}.td{display:table-cell}.cell-text-container{vertical-align:middle;padding-left:.3rem}.full-width{width:100%}.full-height{height:100%}.fix-table{table-layout:fixed}.ellipsis{overflow:hidden;text-overflow:ellipsis}\n"] });
1094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRenderer, decorators: [{
1095
- type: Component,
1096
- args: [{ template: `
1097
- <div class="t full-width full-height fix-table">
1098
- <div class="tr">
1099
- <div class="td cell-text-container ellipsis">
1100
- {{display}}
1101
- </div>
1102
- </div>
1103
- </div>
1104
- `, styles: [".t{display:table}.tr{display:table-row}.td{display:table-cell}.cell-text-container{vertical-align:middle;padding-left:.3rem}.full-width{width:100%}.full-height{height:100%}.fix-table{table-layout:fixed}.ellipsis{overflow:hidden;text-overflow:ellipsis}\n"] }]
1105
- }], ctorParameters: function () { return [{ type: i1$1.DatePipe }]; } });
1106
-
1107
- class DatepickerComponent {
1108
- constructor() {
1109
- this.invalid = false;
1110
- }
1111
- ngOnInit() {
1112
- }
1113
- // onChange(newValue) {
1114
- // this.value = newValue;
1115
- // this.valueChange.emit(newValue);
1116
- // }
1117
- clear() {
1118
- this.value = undefined;
1119
- // this.valueChange.emit();
1120
- }
1121
- // Clear input field if entered data is invalid (Mat library sets value to null if invalid but doesn't clear input)
1122
- onBlur(newValue) {
1123
- if (!this.value) {
1124
- this.value = undefined;
1125
- // this.valueChange.emit();
1126
- }
1127
- }
1128
- writeValue(value) {
1129
- if (value !== undefined) {
1130
- this.value = value;
1131
- }
1132
- }
1133
- registerOnChange(fn) {
1134
- this.onChange = () => {
1135
- fn(this.value);
1136
- };
1137
- }
1138
- registerOnTouched(fn) { }
1139
- }
1140
- DatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1141
- DatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DatepickerComponent, selector: "hci-dict-datepicker", inputs: { placeholder: "placeholder", invalid: "invalid" }, providers: [
1142
- { provide: MAT_DATE_LOCALE, useValue: "en-GB" },
1143
- {
1144
- provide: MAT_DATE_FORMATS,
1145
- useValue: {
1146
- parse: {
1147
- dateInput: ["YYYY-MM-DD"],
1148
- },
1149
- display: {
1150
- dateInput: "YYYY-MM-DD",
1151
- monthYearLabel: "MMM YYYY",
1152
- dateA11yLabel: "YYYY-MM-DD",
1153
- monthYearA11yLabel: "MMMM YYYY",
1154
- },
1155
- },
1156
- },
1157
- {
1158
- provide: NG_VALUE_ACCESSOR,
1159
- useExisting: forwardRef(() => DatepickerComponent),
1160
- multi: true
1161
- }
1162
- ], ngImport: i0, template: `
1163
- <div class="d-flex" style="width: 100%;">
1164
- <input matInput [matDatepicker]="picker" class="form-control" [placeholder]="placeholder" [(ngModel)]="value" (ngModelChange)="onChange($event)"
1165
- (blur)="onBlur($event)" data-date-format="YYYY-MM-DD"
1166
- [ngStyle]="{'background-color':invalid ? 'red' : '#fff'}" >
1167
- <span class="input-group-text" id="clearIcon" (click)="clear()"><i class="fas fa-times"></i></span>
1168
- <button class="btn btn-outline-secondary" type="button" (click)="picker.open()" style="height:32px; width:32px;"><i class="fas fa-calendar-alt"></i></button>
1169
- <mat-datepicker panelClass="ag-custom-component-popup" #picker ></mat-datepicker>
1170
- </div>
1171
- `, isInline: true, styles: ["#clearIcon{cursor:pointer}#clearIcon:Hover{background-color:#495057;color:#e9ecef}\n"], dependencies: [{ kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }] });
1172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DatepickerComponent, decorators: [{
1173
- type: Component,
1174
- args: [{ selector: "hci-dict-datepicker", template: `
1175
- <div class="d-flex" style="width: 100%;">
1176
- <input matInput [matDatepicker]="picker" class="form-control" [placeholder]="placeholder" [(ngModel)]="value" (ngModelChange)="onChange($event)"
1177
- (blur)="onBlur($event)" data-date-format="YYYY-MM-DD"
1178
- [ngStyle]="{'background-color':invalid ? 'red' : '#fff'}" >
1179
- <span class="input-group-text" id="clearIcon" (click)="clear()"><i class="fas fa-times"></i></span>
1180
- <button class="btn btn-outline-secondary" type="button" (click)="picker.open()" style="height:32px; width:32px;"><i class="fas fa-calendar-alt"></i></button>
1181
- <mat-datepicker panelClass="ag-custom-component-popup" #picker ></mat-datepicker>
1182
- </div>
1183
- `, providers: [
1184
- { provide: MAT_DATE_LOCALE, useValue: "en-GB" },
1185
- {
1186
- provide: MAT_DATE_FORMATS,
1187
- useValue: {
1188
- parse: {
1189
- dateInput: ["YYYY-MM-DD"],
1190
- },
1191
- display: {
1192
- dateInput: "YYYY-MM-DD",
1193
- monthYearLabel: "MMM YYYY",
1194
- dateA11yLabel: "YYYY-MM-DD",
1195
- monthYearA11yLabel: "MMMM YYYY",
1196
- },
1197
- },
1198
- },
1199
- {
1200
- provide: NG_VALUE_ACCESSOR,
1201
- useExisting: forwardRef(() => DatepickerComponent),
1202
- multi: true
1203
- }
1204
- ], styles: ["#clearIcon{cursor:pointer}#clearIcon:Hover{background-color:#495057;color:#e9ecef}\n"] }]
1205
- }], propDecorators: { placeholder: [{
1206
- type: Input
1207
- }], invalid: [{
1208
- type: Input
1209
- }] } });
1210
-
1211
- class AgGridDateCellEditorComponent {
1212
- agInit(params) {
1213
- console.log("agInit Date Picker");
1214
- console.log(params);
1215
- this.params = params;
1216
- this.value = this.params.value;
1217
- }
1218
- getValue() {
1219
- return this.value;
1220
- }
1221
- isPopup() {
1222
- return true;
1223
- }
1224
- ;
1225
- }
1226
- AgGridDateCellEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridDateCellEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1227
- AgGridDateCellEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AgGridDateCellEditorComponent, selector: "ag-grid-date-cell-editor", ngImport: i0, template: `
1228
- <hci-dict-datepicker [(ngModel)]="value" placeholder="Select Date"></hci-dict-datepicker>
1229
-
1230
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DatepickerComponent, selector: "hci-dict-datepicker", inputs: ["placeholder", "invalid"] }] });
1231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridDateCellEditorComponent, decorators: [{
1232
- type: Component,
1233
- args: [{
1234
- selector: "ag-grid-date-cell-editor",
1235
- template: `
1236
- <hci-dict-datepicker [(ngModel)]="value" placeholder="Select Date"></hci-dict-datepicker>
1237
-
1238
- `
1239
- }]
1240
- }] });
1241
-
1242
- /**
1243
- * When a dictionary is selected this component is shown. There is a top grid which for its data shows all the columns
1244
- * for the dictionary. Currently, keep this for reference only and have non-editable.
1245
- * The bottom grid will show those columns as actual columns and its data are all the dictionary values. Rows can be
1246
- * added. For deleting, need to make sure the id is not used anywhere. For editing, need to make sure the code or anything
1247
- * else isn't being referenced.
1248
- *
1249
- * @since 1.0.0
1250
- */
1251
- class DictionaryEditorDetailComponent {
1252
- constructor(route, modalService, dictionaryService, dictionaryEndpoint) {
1253
- this.route = route;
1254
- this.modalService = modalService;
1255
- this.dictionaryService = dictionaryService;
1256
- this.dictionaryEndpoint = dictionaryEndpoint;
1257
- this.classList = "outlet-column y-auto";
1258
- this.dictionaryEntries = [];
1259
- this.selectedRows = [];
1260
- this.loadingSubjects = [];
1261
- this.metaGridOptions = {
1262
- rowStyle: {
1263
- "font-family": "Prompt, sans-serif"
1264
- },
1265
- enableCellTextSelection: true,
1266
- ensureDomOrder: true
1267
- };
1268
- this.gridOptions = {
1269
- context: {
1270
- componentParent: this
1271
- },
1272
- onGridReady: DictionaryEditorDetailComponent.onSamplesGridReady,
1273
- onGridSizeChanged: DictionaryEditorDetailComponent.onGridSizeChanged,
1274
- suppressHorizontalScroll: false,
1275
- selectionMode: "multiple",
1276
- stopEditingWhenGridLosesFocus: true,
1277
- enableSorting: true,
1278
- enableFilter: true
1279
- };
1280
- }
1281
- /**
1282
- * Based on the route class name, make the call to fetch the dictionary data. Since this component is route based,
1283
- * when the dictionary class in the route changes, this component is reloaded.
1284
- */
1285
- ngOnInit() {
1286
- this.boundNewRowPostCall = this.newRowPost.bind(this);
1287
- this.loadingSubjects.push(new BehaviorSubject(false));
1288
- this.loadingSubjects.push(new BehaviorSubject(false));
1289
- this.route.params.subscribe(params => {
1290
- let className = params["className"];
1291
- this.getDictionary(className);
1292
- });
1293
- }
1294
- openModal(modal) {
1295
- this.modalService.open(modal, { windowClass: "modal-xl" }).result.then((result) => {
1296
- }, (reason) => {
1297
- });
1298
- }
1299
- ngAfterViewInit() {
1300
- this.gridOptions.api.sizeColumnsToFit();
1301
- }
1302
- columnDefMeta() {
1303
- return [
1304
- { field: "name", headerName: "Name", width: 175, sortable: true, resizable: true, editable: false },
1305
- { field: "description", headerName: "Description", width: 250, sortable: true, resizable: true, editable: false },
1306
- { field: "id", headerName: "Id", width: 60, sortable: true, resizable: true, editable: false },
1307
- { field: "type", headerName: "Type", sortable: true, resizable: true, editable: false },
1308
- { field: "protectionType", headerName: "ProtectionType", sortable: true, resizable: true, editable: false },
1309
- { field: "filterDictionaryClass", headerName: "FilterDictionaryClass", width: 180, sortable: true, resizable: true, editable: false },
1310
- { field: "notNull", headerName: "NotNull", sortable: true, resizable: true, editable: false },
1311
- { field: "integer", headerName: "Integer", width: 75, sortable: true, resizable: true, editable: false },
1312
- { field: "min", headerName: "Min", width: 60, sortable: true, resizable: true, editable: false },
1313
- { field: "max", headerName: "Max", width: 60, sortable: true, resizable: true, editable: false },
1314
- { field: "fraction", headerName: "Fraction", sortable: true, resizable: true, editable: false },
1315
- { field: "dictionaryTooltip", headerName: "DictionaryTooltip", width: 200, sortable: true, resizable: true, editable: false },
1316
- { field: "dictionaryDisplay", headerName: "DictionaryDisplay", width: 175, sortable: true, resizable: true, editable: false },
1317
- { field: "filterable", headerName: "Filterable", sortable: true, resizable: true, editable: false },
1318
- { field: "displayName", headerName: "DisplayName", width: 175, sortable: true, resizable: true, editable: false },
1319
- { field: "displayOrder", headerName: "DisplayOrder", width: 60, sortable: true, resizable: true, editable: false },
1320
- { field: "cellStyle", headerName: "CellStyle", sortable: true, resizable: true, editable: false },
1321
- ]; // the widths for the last 2 could be wrong.
1322
- }
1323
- onMetaGridReady(params) {
1324
- var _a;
1325
- this.gridApiMeta = params.api;
1326
- this.gridApiMeta.setColumnDefs(this.columnDefMeta());
1327
- this.gridApiMeta.setRowData((_a = this.dictionary) === null || _a === void 0 ? void 0 : _a.fields);
1328
- // this.gridApiMeta.sizeColumnsToFit();
1329
- }
1330
- openAreYouSureModal(modal) {
1331
- this.modalService.open(modal).result.then((result) => {
1332
- if (result === "Delete") {
1333
- this.deleteDictionaryEntries();
1334
- }
1335
- }, (reason) => {
1336
- });
1337
- }
1338
- /**
1339
- * Fetch the dictionary metadata and dictionary entries based upon the dictionary class name.
1340
- *
1341
- * @param {string} className
1342
- */
1343
- getDictionary(className) {
1344
- // When Selecting A New Dictionary, Navigate To First Page
1345
- if (this.gridOptions && this.gridOptions.api) {
1346
- this.gridOptions.api.paginationGoToFirstPage();
1347
- }
1348
- this.className = className;
1349
- this.dataColumns = undefined;
1350
- this.loadingSubjects[0].next(true);
1351
- this.dictionaryService.getDictionary(className)
1352
- .pipe(finalize(() => {
1353
- this.loadingSubjects[0].next(false);
1354
- })).subscribe((dictionary) => {
1355
- this.setUpDictionaryGrid(dictionary);
1356
- this.loadingSubjects[0].next(false);
1357
- });
1358
- this.getDictionaryEntries();
1359
- }
1360
- getDictionaryEntries() {
1361
- this.loadingSubjects[1].next(true);
1362
- this.dictionaryService.getDictionaryEntries(this.className)
1363
- .pipe(finalize(() => {
1364
- this.loadingSubjects[1].next(false);
1365
- })).subscribe((dictionaryEntries) => {
1366
- this.dictionaryEntries = dictionaryEntries;
1367
- this.gridOptions.api.setRowData(dictionaryEntries);
1368
- this.gridOptions.api.sizeColumnsToFit();
1369
- this.loadingSubjects[1].next(false);
1370
- });
1371
- }
1372
- /**
1373
- * Set the dictionary metadata. This is used to build the columns for the dictionary entries. The names, validation,
1374
- * and filter classes build the column definition.
1375
- *
1376
- * @param dictionary
1377
- */
1378
- setUpDictionaryGrid(dictionary) {
1379
- if (isDevMode()) {
1380
- console.debug("DictionaryEditorDetailComponent.setDictionary");
1381
- console.debug(dictionary);
1382
- }
1383
- this.dictionary = dictionary;
1384
- this.secondaryDictionaryEntries = [];
1385
- let dictionaryClassNames = [];
1386
- for (let field of dictionary.fields) {
1387
- if (field.filterDictionaryClass) {
1388
- dictionaryClassNames.push(field.filterDictionaryClass);
1389
- }
1390
- }
1391
- this.getSecondaryDictionaries(dictionaryClassNames);
1392
- }
1393
- getSecondaryDictionaries(dictionaryNames) {
1394
- if (dictionaryNames.length == 0) {
1395
- this.finishColumnSetup();
1396
- }
1397
- else {
1398
- let dictionaryName = dictionaryNames.pop();
1399
- this.dictionaryService.getDictionaryDropdownEntries(dictionaryName).subscribe((response) => {
1400
- this.secondaryDictionaryEntries.push({ dictionaryName: dictionaryName, entries: response });
1401
- this.getSecondaryDictionaries(dictionaryNames);
1402
- });
1403
- }
1404
- }
1405
- finishColumnSetup() {
1406
- this.displayName = this.dictionary.displayName;
1407
- // This establishes the readOnly functionality
1408
- let cols = [];
1409
- // Process Columns And Create Column Definition
1410
- for (let field of this.dictionary.fields) {
1411
- if (field.id && (isNullOrUndefined(field.code) || field.code == false)) {
1412
- continue;
1413
- }
1414
- let col;
1415
- if (field.filterDictionaryClass) {
1416
- // this is a dropdown of another dictionary
1417
- let options = this.secondaryDictionaryEntries.find((a) => {
1418
- return a.dictionaryName === field.filterDictionaryClass;
1419
- });
1420
- col = {
1421
- field: field.name,
1422
- headerName: field.displayName,
1423
- editable: this.isEditable.bind(this),
1424
- cellRendererFramework: SelectRenderer,
1425
- cellEditorFramework: SelectEditor,
1426
- selectOptionsDisplayField: "display",
1427
- selectOptionsValueField: "id",
1428
- sortable: true,
1429
- resizable: true,
1430
- filter: true,
1431
- filterValueGetter: this.comboFilterValueGetter,
1432
- selectOptions: [],
1433
- comparator: (valueA, valueB, nodeA, nodeB, isInverted) => {
1434
- return 0;
1435
- }
1436
- };
1437
- if (options && options.entries) {
1438
- col.selectOptions = options.entries.sort((optionA, optionB) => {
1439
- if (optionA && !optionB) {
1440
- return 1;
1441
- }
1442
- if (optionB && !optionA) {
1443
- return -1;
1444
- }
1445
- if (!optionA && !optionB) {
1446
- return 0;
1447
- }
1448
- if (optionA.display.toLowerCase() > optionB.display.toLowerCase()) {
1449
- return 1;
1450
- }
1451
- else if ((optionB.display.toLowerCase() > optionA.display.toLowerCase())) {
1452
- return -1;
1453
- }
1454
- else {
1455
- return 0;
1456
- }
1457
- });
1458
- col.comparator = (valueA, valueB, nodeA, nodeB, isInverted) => {
1459
- if (!options.entries) {
1460
- return 0;
1461
- }
1462
- if (valueA && !valueB) {
1463
- return 1;
1464
- }
1465
- if (valueB && !valueA) {
1466
- return -1;
1467
- }
1468
- if (!valueA && !valueB) {
1469
- return 0;
1470
- }
1471
- let optionA = options.entries.find((entry) => ("" + entry.id === "" + valueA));
1472
- let optionB = options.entries.find((entry) => ("" + entry.id === "" + valueB));
1473
- if (optionA && !optionB) {
1474
- return 1;
1475
- }
1476
- if (optionB && !optionA) {
1477
- return -1;
1478
- }
1479
- if (!optionA && !optionB) {
1480
- return 0;
1481
- }
1482
- if (optionA.display.toLowerCase() > optionB.display.toLowerCase()) {
1483
- return 1;
1484
- }
1485
- else if ((optionB.display.toLowerCase() > optionA.display.toLowerCase())) {
1486
- return -1;
1487
- }
1488
- else {
1489
- return 0;
1490
- }
1491
- };
1492
- }
1493
- col.cellStyle = params => {
1494
- let column = {};
1495
- for (let field of params.context.componentParent.dictionary.fields) {
1496
- if (params.colDef.field == field.name) {
1497
- column = field;
1498
- }
1499
- }
1500
- if (params.data.editOrNew && params.data.editOrNew == "new") {
1501
- if (params.context.readOnly || column.readOnly ||
1502
- column.protectionType == "Read Only") {
1503
- return { color: "#8a9499" };
1504
- }
1505
- }
1506
- else {
1507
- if (params.context.readOnly || column.readOnly ||
1508
- column.protectionType == "Read Only" || column.createOnly ||
1509
- column.protectionType == "Create Only" || column.code) {
1510
- return { color: "#8a9499" };
1511
- }
1512
- }
1513
- };
1514
- col.displayOrder = field.displayOrder;
1515
- col.dictionaryDisplay = field.dictionaryDisplay;
1516
- col.dictionaryTooltip = field.dictionaryTooltip;
1517
- // Set default filter as compare by text/number
1518
- // col.filterRenderer = CompareFilterRenderer;
1519
- }
1520
- else if (field.type && field.type == "Date") {
1521
- //date value
1522
- col = {
1523
- field: field.name,
1524
- headerName: field.displayName,
1525
- cellRendererFramework: DateRenderer,
1526
- cellEditorFramework: AgGridDateCellEditorComponent,
1527
- editable: this.isEditable.bind(this),
1528
- sortable: true,
1529
- resizable: true,
1530
- filter: true,
1531
- dictionaryDisplay: field.dictionaryDisplay
1532
- };
1533
- col.comparator = (valueA, valueB, nodeA, nodeB, isInverted) => {
1534
- let num = this.dateComparator(valueA, valueB);
1535
- return isInverted ? -1 * num : num; //don't have to do anything with inverted?
1536
- };
1537
- col.cellStyle = params => {
1538
- var column = {};
1539
- for (let field of params.context.componentParent.dictionary.fields) {
1540
- if (params.colDef.field == field.name) {
1541
- column = field;
1542
- }
1543
- }
1544
- if (params.data.editOrNew && params.data.editOrNew == "new") {
1545
- if (params.context.readOnly || column.readOnly ||
1546
- column.protectionType == "Read Only") {
1547
- return { color: "#8a9499" };
1548
- }
1549
- }
1550
- else {
1551
- if (params.context.readOnly || column.readOnly ||
1552
- column.protectionType == "Read Only" || column.createOnly ||
1553
- column.protectionType == "Create Only" || column.code) {
1554
- return { color: "#8a9499" };
1555
- }
1556
- }
1557
- };
1558
- col.displayOrder = field.displayOrder;
1559
- }
1560
- else {
1561
- // this is a string value
1562
- col = {
1563
- field: field.name,
1564
- headerName: field.displayName,
1565
- editable: this.isEditable.bind(this),
1566
- sortable: true,
1567
- resizable: true,
1568
- filter: true,
1569
- dictionaryDisplay: field.dictionaryDisplay
1570
- };
1571
- col.comparator = (valueA, valueB, nodeA, nodeB, isInverted) => {
1572
- if (valueA && !valueB) {
1573
- return 1;
1574
- }
1575
- if (valueB && !valueA) {
1576
- return -1;
1577
- }
1578
- if (!valueA && !valueB) {
1579
- return 0;
1580
- }
1581
- if (valueA.toLowerCase() > valueB.toLowerCase()) {
1582
- return 1;
1583
- }
1584
- else if ((valueB.toLowerCase() > valueA.toLowerCase())) {
1585
- return -1;
1586
- }
1587
- else {
1588
- return 0;
1589
- }
1590
- };
1591
- col.cellStyle = params => {
1592
- var column = {};
1593
- for (let field of params.context.componentParent.dictionary.fields) {
1594
- if (params.colDef.field == field.name) {
1595
- column = field;
1596
- }
1597
- }
1598
- if (params.data.editOrNew && params.data.editOrNew == "new") {
1599
- if (params.context.readOnly || column.readOnly ||
1600
- column.protectionType == "Read Only") {
1601
- return { color: "#8a9499" };
1602
- }
1603
- }
1604
- else {
1605
- if (params.context.readOnly || column.readOnly ||
1606
- column.protectionType == "Read Only" || column.createOnly ||
1607
- column.protectionType == "Create Only" || column.code) {
1608
- return { color: "#8a9499" };
1609
- }
1610
- }
1611
- };
1612
- col.displayOrder = field.displayOrder;
1613
- // Set default filter as compare by text/number
1614
- // col.filterRenderer = CompareFilterRenderer;
1615
- }
1616
- cols.push(col);
1617
- }
1618
- // Now we need to sort the columns
1619
- if (!this.dictionary.fields[0].hasOwnProperty("displayOrder")) {
1620
- // default case, no displayOrder
1621
- cols = cols.sort((a, b) => {
1622
- if (!a.headerName && b.headerName) {
1623
- return 1;
1624
- }
1625
- else if (!b.headerName && a.headerName) {
1626
- return -1;
1627
- }
1628
- else if (a.dictionaryDisplay === true && b.dictionaryDisplay === false) {
1629
- return -1;
1630
- }
1631
- else if (b.dictionaryDisplay === true && a.dictionaryDisplay === false) {
1632
- return 1;
1633
- }
1634
- else if (a.dictionaryTooltip === true && b.dictionaryTooltip === false) {
1635
- return -1;
1636
- }
1637
- else if (b.dictionaryTooltip === true && a.dictionaryTooltip === false) {
1638
- return 1;
1639
- }
1640
- else {
1641
- return 0;
1642
- }
1643
- });
1644
- }
1645
- else {
1646
- // DisplayOrder case
1647
- // I think this works? Check later
1648
- cols = cols.sort((a, b) => {
1649
- if (!a.headerName && b.headerName) {
1650
- return 1;
1651
- }
1652
- else if (!b.headerName && a.headerName) {
1653
- return -1;
1654
- }
1655
- else {
1656
- return a.displayOrder - b.displayOrder;
1657
- }
1658
- });
1659
- }
1660
- // After Columns Have Been Sorted
1661
- // Dictionary Grid Will Sort The Grid Ascending Order By First Column
1662
- if (cols && cols.length != 0) {
1663
- cols[0].sort = "asc";
1664
- }
1665
- this.dataColumns = cols;
1666
- if (Array.isArray(this.dataColumns) && this.gridOptions && this.gridOptions.api) {
1667
- this.gridOptions.api.setColumnDefs(this.dataColumns);
1668
- this.gridOptions.api.sizeColumnsToFit();
1669
- }
1670
- }
1671
- isEditable(params) {
1672
- let isEditable;
1673
- let column = {};
1674
- for (let field of this.dictionary.fields) {
1675
- if (params.colDef.field == field.name) {
1676
- column = field;
1677
- }
1678
- }
1679
- if (params.data.editOrNew && params.data.editOrNew == "new") {
1680
- // console.log("new editable?");
1681
- isEditable = !(this.dictionary.readOnly || column.readOnly ||
1682
- column.protectionType == "Read Only");
1683
- }
1684
- else {
1685
- // console.log("edit editable?");
1686
- isEditable = !(this.dictionary.readOnly || column.readOnly ||
1687
- column.protectionType == "Read Only" || column.createOnly ||
1688
- column.protectionType == "Create Only" || column.code);
1689
- }
1690
- return isEditable;
1691
- }
1692
- deleteDictionaryEntries() {
1693
- let deleteRows = this.gridOptions.api.getSelectedRows();
1694
- for (let deleteId of this.selectedRows) {
1695
- for (let entry of this.dictionaryEntries) {
1696
- if (entry[this.idColumn] === deleteId) {
1697
- deleteRows.push(entry);
1698
- break;
1699
- }
1700
- }
1701
- }
1702
- this.dictionaryService.deleteDictionaryEntries(this.className, deleteRows).subscribe((response) => {
1703
- this.getDictionaryEntries();
1704
- });
1705
- }
1706
- updateDictionary(event) {
1707
- // Important to note this will not update cells to the demo but will when imported to CORE or other applications.
1708
- this.dictionaryService.updateDictionaryEntries(this.className, [event.data]).subscribe((data) => {
1709
- this.getDictionaryEntries();
1710
- });
1711
- }
1712
- setSelectedEntries() {
1713
- this.selectedRows = this.gridOptions.api.getSelectedRows();
1714
- }
1715
- newRowPost(data) {
1716
- return this.dictionaryService.addDictionaryEntries(this.className, [data])
1717
- .pipe(map((data) => {
1718
- if (data && data.length === 1) {
1719
- return data[0];
1720
- }
1721
- else {
1722
- return data;
1723
- }
1724
- }));
1725
- }
1726
- static onSamplesGridReady(event) {
1727
- event.api.sizeColumnsToFit();
1728
- }
1729
- static onGridSizeChanged(event) {
1730
- if (event && event.api) {
1731
- event.api.sizeColumnsToFit();
1732
- }
1733
- }
1734
- get disableAddRow() {
1735
- if (!this.dictionary) {
1736
- return true;
1737
- }
1738
- return this.dictionary.readOnly && this.dictionary.readOnly === true;
1739
- }
1740
- get disableDelete() {
1741
- if (!this.dictionary) {
1742
- return true;
1743
- }
1744
- if (this.dictionary.readOnly && this.dictionary.readOnly === true) {
1745
- return true;
1746
- }
1747
- if (this.gridOptions && this.gridOptions.api && this.gridOptions.api.getSelectedRows()) {
1748
- return this.gridOptions.api.getSelectedRows().length === 0;
1749
- }
1750
- else {
1751
- return true;
1752
- }
1753
- }
1754
- comboFilterValueGetter(params) {
1755
- let value = params.data[params.colDef.field];
1756
- if (value) {
1757
- let option = params.colDef.selectOptions.find((entry) => (entry[params.colDef.selectOptionsValueField] === value));
1758
- return option ? option[params.colDef.selectOptionsDisplayField] : "";
1759
- }
1760
- return "";
1761
- }
1762
- onClickAddRow() {
1763
- const modalRef = this.modalService.open(NewRowComponent, {
1764
- size: "lg",
1765
- keyboard: false,
1766
- backdrop: "static",
1767
- centered: true,
1768
- });
1769
- modalRef.componentInstance.colDefs = this.dataColumns;
1770
- modalRef.componentInstance.dictionary = this.dictionary;
1771
- if (!this.newRowSubscription) {
1772
- // tell other ag-grid to add row to it
1773
- this.newRowSubscription = modalRef.componentInstance.newRowSubject.subscribe((theNewRow) => {
1774
- this.dictionaryEntries = theNewRow.concat(this.dictionaryEntries);
1775
- this.gridOptions.api.setRowData(this.dictionaryEntries);
1776
- this.newRowSubscription = null;
1777
- // Important to note this will not add rows to the demo but will when imported to CORE or other applications.
1778
- this.newRowPost(theNewRow[0]).subscribe(() => {
1779
- this.getDictionaryEntries();
1780
- });
1781
- });
1782
- }
1783
- }
1784
- /**
1785
- * Comparater To Compare 2 Dates
1786
- * @param date1 Date 1
1787
- * @param date2 Date 2
1788
- */
1789
- dateComparator(date1, date2) {
1790
- let date1Number = monthToComparableNumber(date1);
1791
- let date2Number = monthToComparableNumber(date2);
1792
- if (date1Number === null && date2Number === null) {
1793
- return 0;
1794
- }
1795
- if (date1Number === null) {
1796
- return -1;
1797
- }
1798
- if (date2Number === null) {
1799
- return 1;
1800
- }
1801
- return date1Number - date2Number;
1802
- }
1803
- }
1804
- DictionaryEditorDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorDetailComponent, deps: [{ token: i3.ActivatedRoute }, { token: i1$2.NgbModal }, { token: i1.DictionaryService }, { token: DICTIONARY_ENDPOINT }], target: i0.ɵɵFactoryTarget.Component });
1805
- DictionaryEditorDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DictionaryEditorDetailComponent, selector: "hci-dictionary-editor-detail", host: { properties: { "class": "this.classList" } }, ngImport: i0, template: `
1806
- <div class="d-flex flex-column hci-dictionary-detail-body"
1807
- >
1808
- <hci-busy [busySubjects]="loadingSubjects"></hci-busy>
1809
-
1810
- <!-- Dictionary Title And Metadata -->
1811
- <div class="dictionary-info-section">
1812
- <span class="dictionary-title">
1813
- {{displayName}}
1814
- </span>
1815
- <button class="btn btn-primary metadata-button"
1816
- (click)="openModal(metaDataModal)">
1817
- View Meta Data
1818
- </button>
1819
- </div>
1820
-
1821
- <!-- Dictionary Edit Buttons -->
1822
- <div>
1823
- <button [class]="disableDelete? 'deactivated-color': 'active-color'"
1824
- [disabled]="disableDelete"
1825
- (click)="openAreYouSureModal(areYouSureModal)">
1826
- <i class="fas fa-minus"></i>
1827
- </button>
1828
- <button style="color: var(--bluewarm-dark); float: right; font-size: 15px;"
1829
- [disabled]="disableAddRow"
1830
- (click)="onClickAddRow()">
1831
- <i class="fas fa-plus"></i>
1832
- </button>
1833
- </div>
1834
-
1835
- <!-- Dictionary Display Grid -->
1836
- <div class="d-flex flex-column flex-grow-1">
1837
- <ag-grid-angular id="dictionary-grid-display"
1838
- #dataGrid
1839
- class="ag-theme-balham full-height full-width hci-dictoinary-display-grid"
1840
- [rowData]="dictionaryEntries"
1841
- [rowSelection]="'multiple'"
1842
- [singleClickEdit]="'true'"
1843
- [pagination]="'true'"
1844
- [paginationAutoPageSize]="'true'"
1845
- [gridOptions]="gridOptions"
1846
- (cellValueChanged)="updateDictionary($event)"
1847
- >
1848
- </ag-grid-angular>
1849
- </div>
1850
-
1851
- <!-- Dictionary Metadata Popup -->
1852
- <ng-template #metaDataModal let-close="close">
1853
- <div style="width:1000px">
1854
- <div class="modal-header">
1855
- Meta Data for {{className}}
1856
- </div>
1857
- <div class="d-flex flex-column modal-body"
1858
- style="border: 1px solid #ced4da; width: 100%;">
1859
- <ag-grid-angular #metaGrid
1860
- class="ag-theme-balham full-width"
1861
- style="height: 250px;"
1862
- (gridReady)="this.onMetaGridReady($event)"
1863
- [gridOptions]="this.metaGridOptions"
1864
- [rowSelection]="'single'"
1865
- [frameworkComponents]="frameworkComponents"
1866
- [rowData]="dictionary?.fields">
1867
- </ag-grid-angular>
1868
- </div>
1869
- <div class="modal-footer">
1870
- <button class="btn btn-primary" (click)="close('Close')">Close</button>
1871
- </div>
1872
- </div>
1873
- </ng-template>
1874
-
1875
- <!-- Dictionary Delete Comfirmation Popup -->
1876
- <ng-template #areYouSureModal let-close="close">
1877
- <div class="modal-header">
1878
- Confirmation
1879
- </div>
1880
- <div class="modal-body d-flex">
1881
- Are you sure?
1882
- </div>
1883
- <div class="modal-footer">
1884
- <button class="btn btn-primary" (click)="close('Cancel')">Cancel</button>
1885
- <button class="btn btn-primary btn-red" (click)="close('Delete')">Delete</button>
1886
- </div>
1887
- </ng-template>
1888
- </div>
1889
- `, isInline: true, styles: [".full-height{height:100%}.full-width{width:100%}.ag-theme-balham{font-family:Prompt;font-weight:500}.active-color{float:right;font-size:15px;color:var(--bluewarm-dark)}.deactivated-color{float:right;font-size:15px;color:var(--greywarm-medlight)}.dictionary-info-section{padding-top:10px}.dictionary-title{float:left;font-size:16px;padding-left:10px;padding-right:10px;padding-top:5px}.metadata-button{color:var(--white-lightest);float:left;font-size:15px}:host::ng-deep .ag-header-cell{background-color:var(--bluewarmvividfade-lightest);border:lightgray solid thin}:host::ng-deep .ag-cell{border-right:lightgray solid thin;border-left:lightgray solid thin}:host::ng-deep .ag-row{border-bottom:0;border-top:0}:host::ng-deep .ag-row-even{background-color:var(--white-medium)}.hci-dictionary-detail-body{height:100%;width:100%;background:linear-gradient(0deg,var(--white-lightest) 30%,var(--bluewarmvividfade-lighter) 100%)!important}.hci-dictoinary-display-grid{padding-right:5px;padding-left:5px;box-shadow:#00000059 0 5px 15px}:host::ng-deep .ag-row-hover{color:#666!important;background-color:var(--bluewarmvividfade-lighter)!important}:host::ng-deep .ag-row-selected .ag-cell{color:var(--white-lightest)!important}:host::ng-deep .ag-row-selected{color:var(--white-darker)!important;background-color:var(--bluewarmvivid-lighter)!important}\n"], dependencies: [{ kind: "component", type: i4$1.BusyComponent, selector: "hci-busy", inputs: ["busy", "busySubjects", "getBusySubjects", "parentSelector", "rootClass", "icon", "iconSize", "showIcon", "mxAuto", "myAuto", "text", "template", "config"] }, { kind: "component", type: i2$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "suppressMenuHide", "enableBrowserTooltips", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "maintainColumnOrder", "suppressFieldDotNotation", "deltaColumnMode", "applyColumnDefOrder", "immutableColumns", "suppressSetColumnStateEvents", "suppressColumnStateEvents", "colWidth", "minColWidth", "maxColWidth", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "components", "frameworkComponents", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "undoRedoCellEditing", "undoRedoCellEditingLimit", "stopEditingWhenGridLosesFocus", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "defaultExportParams", "quickFilterText", "cacheQuickFilter", "excludeChildrenWhenTreeDataFiltering", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "loadingCellRenderer", "loadingCellRendererFramework", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererFramework", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentFramework", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDelay", "cellFadeDelay", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "fullWidthCellRendererParams", "embedFullWidthRows", "deprecatedEmbedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererFramework", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "groupRowInnerRenderer", "groupRowInnerRendererFramework", "groupMultiAutoColumn", "groupUseEntireRow", "groupSuppressAutoColumn", "rememberGroupStateWhenNewData", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "immutableData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "deltaRowDataMode", "batchUpdateWaitMillis", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideStoreType", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortingAlwaysResets", "serverSideFilteringAlwaysResets", "suppressEnterpriseResetOnNewColumns", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellSelection", "suppressCellFocus", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "deltaSort", "treeDataDisplayType", "angularCompileRows", "angularCompileFilters", "functionsPassive", "enableGroupEdit", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "suppressKeyboardEvent", "localeTextFunc", "getLocaleText", "getDocument", "paginationNumberFormatter", "groupRowAggNodes", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "defaultGroupOrderComparator", "processSecondaryColDef", "processSecondaryColGroupDef", "getDataPath", "defaultGroupSortComparator", "getChildCount", "getServerSideStoreParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowNodeId", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSort", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthCell", "isFullWidthRow", "gridOptions", "modules"], outputs: ["toolPanelVisibleChanged", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "filterOpened", "filterChanged", "filterModified", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "cellKeyPress", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }] });
1890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorDetailComponent, decorators: [{
1891
- type: Component,
1892
- args: [{ selector: "hci-dictionary-editor-detail", template: `
1893
- <div class="d-flex flex-column hci-dictionary-detail-body"
1894
- >
1895
- <hci-busy [busySubjects]="loadingSubjects"></hci-busy>
1896
-
1897
- <!-- Dictionary Title And Metadata -->
1898
- <div class="dictionary-info-section">
1899
- <span class="dictionary-title">
1900
- {{displayName}}
1901
- </span>
1902
- <button class="btn btn-primary metadata-button"
1903
- (click)="openModal(metaDataModal)">
1904
- View Meta Data
1905
- </button>
1906
- </div>
1907
-
1908
- <!-- Dictionary Edit Buttons -->
1909
- <div>
1910
- <button [class]="disableDelete? 'deactivated-color': 'active-color'"
1911
- [disabled]="disableDelete"
1912
- (click)="openAreYouSureModal(areYouSureModal)">
1913
- <i class="fas fa-minus"></i>
1914
- </button>
1915
- <button style="color: var(--bluewarm-dark); float: right; font-size: 15px;"
1916
- [disabled]="disableAddRow"
1917
- (click)="onClickAddRow()">
1918
- <i class="fas fa-plus"></i>
1919
- </button>
1920
- </div>
1921
-
1922
- <!-- Dictionary Display Grid -->
1923
- <div class="d-flex flex-column flex-grow-1">
1924
- <ag-grid-angular id="dictionary-grid-display"
1925
- #dataGrid
1926
- class="ag-theme-balham full-height full-width hci-dictoinary-display-grid"
1927
- [rowData]="dictionaryEntries"
1928
- [rowSelection]="'multiple'"
1929
- [singleClickEdit]="'true'"
1930
- [pagination]="'true'"
1931
- [paginationAutoPageSize]="'true'"
1932
- [gridOptions]="gridOptions"
1933
- (cellValueChanged)="updateDictionary($event)"
1934
- >
1935
- </ag-grid-angular>
1936
- </div>
1937
-
1938
- <!-- Dictionary Metadata Popup -->
1939
- <ng-template #metaDataModal let-close="close">
1940
- <div style="width:1000px">
1941
- <div class="modal-header">
1942
- Meta Data for {{className}}
1943
- </div>
1944
- <div class="d-flex flex-column modal-body"
1945
- style="border: 1px solid #ced4da; width: 100%;">
1946
- <ag-grid-angular #metaGrid
1947
- class="ag-theme-balham full-width"
1948
- style="height: 250px;"
1949
- (gridReady)="this.onMetaGridReady($event)"
1950
- [gridOptions]="this.metaGridOptions"
1951
- [rowSelection]="'single'"
1952
- [frameworkComponents]="frameworkComponents"
1953
- [rowData]="dictionary?.fields">
1954
- </ag-grid-angular>
1955
- </div>
1956
- <div class="modal-footer">
1957
- <button class="btn btn-primary" (click)="close('Close')">Close</button>
1958
- </div>
1959
- </div>
1960
- </ng-template>
1961
-
1962
- <!-- Dictionary Delete Comfirmation Popup -->
1963
- <ng-template #areYouSureModal let-close="close">
1964
- <div class="modal-header">
1965
- Confirmation
1966
- </div>
1967
- <div class="modal-body d-flex">
1968
- Are you sure?
1969
- </div>
1970
- <div class="modal-footer">
1971
- <button class="btn btn-primary" (click)="close('Cancel')">Cancel</button>
1972
- <button class="btn btn-primary btn-red" (click)="close('Delete')">Delete</button>
1973
- </div>
1974
- </ng-template>
1975
- </div>
1976
- `, styles: [".full-height{height:100%}.full-width{width:100%}.ag-theme-balham{font-family:Prompt;font-weight:500}.active-color{float:right;font-size:15px;color:var(--bluewarm-dark)}.deactivated-color{float:right;font-size:15px;color:var(--greywarm-medlight)}.dictionary-info-section{padding-top:10px}.dictionary-title{float:left;font-size:16px;padding-left:10px;padding-right:10px;padding-top:5px}.metadata-button{color:var(--white-lightest);float:left;font-size:15px}:host::ng-deep .ag-header-cell{background-color:var(--bluewarmvividfade-lightest);border:lightgray solid thin}:host::ng-deep .ag-cell{border-right:lightgray solid thin;border-left:lightgray solid thin}:host::ng-deep .ag-row{border-bottom:0;border-top:0}:host::ng-deep .ag-row-even{background-color:var(--white-medium)}.hci-dictionary-detail-body{height:100%;width:100%;background:linear-gradient(0deg,var(--white-lightest) 30%,var(--bluewarmvividfade-lighter) 100%)!important}.hci-dictoinary-display-grid{padding-right:5px;padding-left:5px;box-shadow:#00000059 0 5px 15px}:host::ng-deep .ag-row-hover{color:#666!important;background-color:var(--bluewarmvividfade-lighter)!important}:host::ng-deep .ag-row-selected .ag-cell{color:var(--white-lightest)!important}:host::ng-deep .ag-row-selected{color:var(--white-darker)!important;background-color:var(--bluewarmvivid-lighter)!important}\n"] }]
1977
- }], ctorParameters: function () {
1978
- return [{ type: i3.ActivatedRoute }, { type: i1$2.NgbModal }, { type: i1.DictionaryService }, { type: undefined, decorators: [{
1979
- type: Inject,
1980
- args: [DICTIONARY_ENDPOINT]
1981
- }] }];
1982
- }, propDecorators: { classList: [{
1983
- type: HostBinding,
1984
- args: ["class"]
1985
- }] } });
1986
- /**
1987
- * Extracts Date And Turn To A Numerical Value For Comparing Purposes
1988
- * @param date The date to comparable number
1989
- */
1990
- function monthToComparableNumber(date) {
1991
- if (date === undefined || date === null || date.length !== 10) {
1992
- return null;
1993
- }
1994
- let yearNumber = date.substring(0, 4);
1995
- let monthNumber = date.substring(5, 7);
1996
- let dayNumber = date.substring(8, 10);
1997
- return yearNumber * 10000 + monthNumber * 100 + dayNumber;
1998
- }
1999
-
2000
- const ROUTES = [
2001
- { path: "", component: DictionaryEditorComponent,
2002
- children: [
2003
- { path: "", redirectTo: "home", pathMatch: "full" },
2004
- { path: "home", component: DictionaryEditorHomeComponent },
2005
- { path: "detail/:className", component: DictionaryEditorDetailComponent }
2006
- ]
2007
- }
2008
- ];
2009
- const DICTIONARY_EDITOR_ROUTES = RouterModule.forChild(ROUTES);
2010
-
2011
- class AgGridRendererModule {
2012
- }
2013
- AgGridRendererModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridRendererModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2014
- AgGridRendererModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AgGridRendererModule, declarations: [SelectRenderer,
2015
- DateRenderer], imports: [CommonModule,
2016
- FormsModule,
2017
- ReactiveFormsModule], exports: [SelectRenderer,
2018
- DateRenderer] });
2019
- AgGridRendererModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridRendererModule, imports: [CommonModule,
2020
- FormsModule,
2021
- ReactiveFormsModule] });
2022
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridRendererModule, decorators: [{
2023
- type: NgModule,
2024
- args: [{
2025
- imports: [
2026
- CommonModule,
2027
- FormsModule,
2028
- ReactiveFormsModule,
2029
- ],
2030
- declarations: [
2031
- SelectRenderer,
2032
- DateRenderer
2033
- ],
2034
- exports: [
2035
- SelectRenderer,
2036
- DateRenderer
2037
- ]
2038
- }]
2039
- }] });
2040
-
2041
- class AgGridEditorModule {
2042
- }
2043
- AgGridEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2044
- AgGridEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AgGridEditorModule, declarations: [SelectEditor,
2045
- AgGridDateCellEditorComponent,
2046
- DatepickerComponent], imports: [AgGridModule,
2047
- CommonModule,
2048
- FormsModule,
2049
- ReactiveFormsModule,
2050
- MatDatepickerModule,
2051
- MomentDateModule,
2052
- AgGridRendererModule], exports: [SelectEditor,
2053
- AgGridDateCellEditorComponent] });
2054
- AgGridEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridEditorModule, imports: [AgGridModule,
2055
- CommonModule,
2056
- FormsModule,
2057
- ReactiveFormsModule,
2058
- MatDatepickerModule,
2059
- MomentDateModule,
2060
- AgGridRendererModule] });
2061
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AgGridEditorModule, decorators: [{
2062
- type: NgModule,
2063
- args: [{
2064
- imports: [
2065
- AgGridModule,
2066
- CommonModule,
2067
- FormsModule,
2068
- ReactiveFormsModule,
2069
- MatDatepickerModule,
2070
- MomentDateModule,
2071
- AgGridRendererModule
2072
- ],
2073
- declarations: [
2074
- SelectEditor,
2075
- AgGridDateCellEditorComponent,
2076
- DatepickerComponent
2077
- ],
2078
- exports: [
2079
- SelectEditor,
2080
- AgGridDateCellEditorComponent
2081
- ]
2082
- }]
2083
- }] });
2084
-
2085
- /*
2086
- * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary
2087
- */
2088
- /**
2089
- * The module defining the dictionary editor.
2090
- *
2091
- * @since 1.0.0
2092
- */
2093
- class DictionaryEditorModule {
2094
- }
2095
- DictionaryEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2096
- DictionaryEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorModule, declarations: [DictionaryEditorComponent,
2097
- DictionaryEditorHomeComponent,
2098
- DictionaryEditorDetailComponent,
2099
- NewRowComponent], imports: [CommonModule,
2100
- FormsModule, i3.RouterModule, NgbModule,
2101
- NavigationModule,
2102
- MiscModule,
2103
- AgGridEditorModule,
2104
- AgGridRendererModule,
2105
- AgGridModule], exports: [DictionaryEditorComponent,
2106
- DictionaryEditorHomeComponent,
2107
- DictionaryEditorDetailComponent] });
2108
- DictionaryEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorModule, imports: [CommonModule,
2109
- FormsModule,
2110
- DICTIONARY_EDITOR_ROUTES,
2111
- NgbModule,
2112
- NavigationModule,
2113
- MiscModule,
2114
- AgGridEditorModule,
2115
- AgGridRendererModule,
2116
- AgGridModule] });
2117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DictionaryEditorModule, decorators: [{
2118
- type: NgModule,
2119
- args: [{
2120
- imports: [
2121
- CommonModule,
2122
- FormsModule,
2123
- DICTIONARY_EDITOR_ROUTES,
2124
- NgbModule,
2125
- NavigationModule,
2126
- MiscModule,
2127
- AgGridEditorModule,
2128
- AgGridRendererModule,
2129
- AgGridModule,
2130
- ],
2131
- declarations: [
2132
- DictionaryEditorComponent,
2133
- DictionaryEditorHomeComponent,
2134
- DictionaryEditorDetailComponent,
2135
- NewRowComponent
2136
- ],
2137
- exports: [
2138
- DictionaryEditorComponent,
2139
- DictionaryEditorHomeComponent,
2140
- DictionaryEditorDetailComponent
2141
- ]
2142
- }]
2143
- }] });
2144
-
2145
- /**
2146
- * Generated bundle index. Do not edit.
2147
- */
2148
-
2149
- export { DictionaryEditorComponent, DictionaryEditorDetailComponent, DictionaryEditorHomeComponent, DictionaryEditorModule };
2150
- //# sourceMappingURL=huntsman-cancer-institute-dictionary-editor.mjs.map