@huntsman-cancer-institute/dictionary-editor 17.14.6 → 17.15.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.
@@ -3,7 +3,7 @@ import { TemplateRef, ViewChild, HostBinding, Component, HostListener, Input, Di
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
6
- import { UntypedFormBuilder, UntypedFormGroup, UntypedFormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
+ import { FormBuilder, FormGroup, FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
7
  import * as i1$2 from '@ng-bootstrap/ng-bootstrap';
8
8
  import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
9
9
  import * as i4$1 from '@huntsman-cancer-institute/misc';
@@ -270,7 +270,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
270
270
  * headerName: "Name",
271
271
  * editable: false,
272
272
  * width: 600,
273
- * cellRendererFramework: TextAlignLeftMiddleRenderer,
273
+ * cellRenderer: TextAlignLeftMiddleRenderer,
274
274
  * setErrors: (value: any,
275
275
  * data: any,
276
276
  * node: any,
@@ -306,7 +306,7 @@ class CellRendererValidation {
306
306
  }
307
307
  agInit(params) {
308
308
  this.params = params;
309
- this.formBuilder = new UntypedFormBuilder();
309
+ this.formBuilder = new FormBuilder();
310
310
  if (this.params
311
311
  && this.params.node
312
312
  && this.params.node.gridApi
@@ -323,7 +323,6 @@ class CellRendererValidation {
323
323
  }
324
324
  }
325
325
  this.getErrorMessage();
326
- this.agInit2(params);
327
326
  }
328
327
  refresh(params) {
329
328
  return false;
@@ -364,7 +363,7 @@ class CellRendererValidation {
364
363
  || (this.params.node.gridApi.formGroup
365
364
  && this.params.node.gridApi.formGroup.controls
366
365
  && this.params.node.gridApi.formGroup.controls.length != allNodes.length)) {
367
- this.params.node.gridApi.formGroup = new UntypedFormGroup({});
366
+ this.params.node.gridApi.formGroup = new FormGroup({});
368
367
  }
369
368
  if (this.params.node.gridApi.columnController
370
369
  && this.params.node.gridApi.columnController.columnDefs) {
@@ -393,9 +392,9 @@ class CellRendererValidation {
393
392
  && column.colDef.field
394
393
  && (column.colDef.validators || column.colDef.setErrors)) {
395
394
  node[column.colDef.field + "_errorMessage"] = '';
396
- let formControl = new UntypedFormControl(column.colDef.field + '_formControl', []);
395
+ let formControl = new FormControl(column.colDef.field + '_formControl', []);
397
396
  if (!node.formGroup) {
398
- node.formGroup = new UntypedFormGroup({});
397
+ node.formGroup = new FormGroup({});
399
398
  }
400
399
  node.formGroup.addControl(column.colDef.field + '_formControl', formControl);
401
400
  if (!Array.isArray(column.colDef.validators)) {
@@ -407,7 +406,7 @@ class CellRendererValidation {
407
406
  }
408
407
  if (!this.params.node.gridApi.formGroup.contains('RowGroup_' + node.rowIndex)) {
409
408
  if (!node.formGroup) {
410
- node.formGroup = new UntypedFormGroup({});
409
+ node.formGroup = new FormGroup({});
411
410
  }
412
411
  this.params.node.gridApi.formGroup.addControl('RowGroup_' + node.rowIndex, node.formGroup);
413
412
  }
@@ -540,11 +539,11 @@ class CellRendererValidation {
540
539
  && this.params.colDef.field
541
540
  && (this.params.colDef.validators || this.params.colDef.setErrors)) {
542
541
  this.params.node[this.params.colDef.field + "_errorMessage"] = '';
543
- let formControl = new UntypedFormControl(this.params.colDef.field + '_formControl', []);
542
+ let formControl = new FormControl(this.params.colDef.field + '_formControl', []);
544
543
  if (!this.params.node.formGroup) {
545
- this.params.node.formGroup = new UntypedFormGroup({});
544
+ this.params.node.formGroup = new FormGroup({});
546
545
  if (!this.params.node.gridApi.formGroup) {
547
- this.params.node.gridApi.formGroup = new UntypedFormGroup({});
546
+ this.params.node.gridApi.formGroup = new FormGroup({});
548
547
  }
549
548
  else {
550
549
  // check for any removed nodes & remove their validators if needed.
@@ -594,83 +593,15 @@ class CellRendererValidation {
594
593
  }
595
594
 
596
595
  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
- }
596
+ agInit(params) {
597
+ super.agInit(params);
598
+ if (params) {
599
+ this.value = params.value ? String(params.value) : "";
600
+ params.options.forEach(option => {
601
+ if (String(option.id) === String(this.value)) {
602
+ this.display = option.display;
662
603
  }
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;
604
+ });
674
605
  }
675
606
  }
676
607
  refresh() {
@@ -678,209 +609,102 @@ class SelectRenderer extends CellRendererValidation {
678
609
  }
679
610
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectRenderer, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
680
611
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectRenderer, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
681
- <!--<div [matTooltip]="this.errorMessage"
682
- [matTooltipShowDelay]="300"
683
- [matTooltipHideDelay]="300"
684
- class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">-->
685
- <div class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">
686
- <div class="t full-width full-height fix-table">
687
- <div class="tr">
688
- <div class="td cell-text-container ellipsis">
689
- {{display}}
690
- </div>
691
- </div>
692
- </div>
693
- </div>
694
- `, 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(#ff000040,#ff000040,#ff000040);border:solid red 2px}\n"] }); }
612
+ <!--<div [matTooltip]="this.errorMessage"
613
+ [matTooltipShowDelay]="300"
614
+ [matTooltipHideDelay]="300"
615
+ class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">-->
616
+ <div class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">
617
+ <div class="t full-width full-height fix-table">
618
+ <div class="tr">
619
+ <div class="td cell-text-container ellipsis">
620
+ {{display}}
621
+ </div>
622
+ </div>
623
+ </div>
624
+ </div>
625
+ `, 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(#ff000040,#ff000040,#ff000040);border:solid red 2px}\n"] }); }
695
626
  }
696
627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectRenderer, decorators: [{
697
628
  type: Component,
698
629
  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(#ff000040,#ff000040,#ff000040);border:solid red 2px}\n"] }]
630
+ <!--<div [matTooltip]="this.errorMessage"
631
+ [matTooltipShowDelay]="300"
632
+ [matTooltipHideDelay]="300"
633
+ class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">-->
634
+ <div class="full-width full-height {{this.errorMessage && this.errorMessage !== '' ? 'error' : ''}}">
635
+ <div class="t full-width full-height fix-table">
636
+ <div class="tr">
637
+ <div class="td cell-text-container ellipsis">
638
+ {{display}}
639
+ </div>
640
+ </div>
641
+ </div>
642
+ </div>
643
+ `, 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(#ff000040,#ff000040,#ff000040);border:solid red 2px}\n"] }]
713
644
  }] });
714
645
 
715
- //import {MatDialog, MatDialogConfig, MatDialogRef} from "@angular/material/dialog";
716
- //import {SpinnerDialogComponent} from "../popup/spinner-dialog.component";
717
646
  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
- }
647
+ // variables used for the optional per-row-filtering
648
+ constructor() { }
734
649
  agInit(params) {
735
650
  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
- }
651
+ this.options = params.options;
652
+ this.valueField = params.valueField;
653
+ this.displayField = params.displayField;
770
654
  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")];
655
+ this.value = this.params.value ? String(this.params.value) : "";
780
656
  }
781
657
  }
782
658
  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
659
  }
802
660
  getValue() {
803
- return this.value ? this.value : "";
661
+ return this.params.value ? String(this.params.value) : "";
804
662
  }
805
663
  isPopup() {
806
664
  return false;
807
665
  }
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
666
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
845
667
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectEditor, selector: "ng-component", ngImport: i0, template: `
846
668
  <div class="full-width full-height flex-column-container">
847
669
  <div class="full-height flex-stretch flex-row">
848
- <select class="full-width full-height" [(value)]="value" (change)="onChange($event)">
670
+ <select class="full-width full-height" [(ngModel)]="params.value" (change)="onChange($event)">
849
671
  <option hidden>
850
672
  Select An Option
673
+ </option>
674
+ <!-- Blank Option -->
675
+ <option value="">
676
+
851
677
  </option>
852
678
  <option
853
679
  *ngFor="let option of options"
854
- value="{{option.hasOwnProperty(optionsValueField) ? option[optionsValueField] : (option.value) ? option.value : option }}">
855
- {{option.hasOwnProperty(optionsDisplayField) ? option[optionsDisplayField] : (option.display) ? option.display : option }}
680
+ value="{{option.hasOwnProperty(valueField) ? option[valueField] : (option.value) ? option.value : option }}">
681
+ {{option.hasOwnProperty(displayField) ? option[displayField] : (option.display) ? option.display : option }}
856
682
  </option>
857
683
  </select>
858
684
  </div>
859
- <div *ngIf="showFillButton" class="full-height flex-row button-container">
860
- <button riRippleEffectDict class="full-height" (click)="onFillButtonClicked()">Fill</button>
861
- </div>
862
685
  </div>
863
- `, 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"] }] }); }
686
+ `, 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: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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"] }] }); }
864
687
  }
865
688
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectEditor, decorators: [{
866
689
  type: Component,
867
690
  args: [{ template: `
868
691
  <div class="full-width full-height flex-column-container">
869
692
  <div class="full-height flex-stretch flex-row">
870
- <select class="full-width full-height" [(value)]="value" (change)="onChange($event)">
693
+ <select class="full-width full-height" [(ngModel)]="params.value" (change)="onChange($event)">
871
694
  <option hidden>
872
695
  Select An Option
696
+ </option>
697
+ <!-- Blank Option -->
698
+ <option value="">
699
+
873
700
  </option>
874
701
  <option
875
702
  *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 }}
703
+ value="{{option.hasOwnProperty(valueField) ? option[valueField] : (option.value) ? option.value : option }}">
704
+ {{option.hasOwnProperty(displayField) ? option[displayField] : (option.display) ? option.display : option }}
878
705
  </option>
879
706
  </select>
880
707
  </div>
881
- <div *ngIf="showFillButton" class="full-height flex-row button-container">
882
- <button riRippleEffectDict class="full-height" (click)="onFillButtonClicked()">Fill</button>
883
- </div>
884
708
  </div>
885
709
  `, 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
710
  }], ctorParameters: () => [] });
@@ -1491,14 +1315,48 @@ class DictionaryEditorDetailComponent {
1491
1315
  let options = this.secondaryDictionaryEntries.find((a) => {
1492
1316
  return a.dictionaryName === field.filterDictionaryClass;
1493
1317
  });
1318
+ let sortedOptions;
1319
+ if (options && options.entries) {
1320
+ sortedOptions = options.entries.sort((optionA, optionB) => {
1321
+ if (optionA && !optionB) {
1322
+ return 1;
1323
+ }
1324
+ if (optionB && !optionA) {
1325
+ return -1;
1326
+ }
1327
+ if (!optionA && !optionB) {
1328
+ return 0;
1329
+ }
1330
+ if (optionA.display.toLowerCase() > optionB.display.toLowerCase()) {
1331
+ return 1;
1332
+ }
1333
+ else if ((optionB.display.toLowerCase() > optionA.display.toLowerCase())) {
1334
+ return -1;
1335
+ }
1336
+ else {
1337
+ return 0;
1338
+ }
1339
+ });
1340
+ }
1494
1341
  col = {
1495
1342
  field: field.name,
1496
1343
  headerName: field.displayName,
1497
1344
  editable: this.isEditable.bind(this),
1498
- cellRendererFramework: SelectRenderer,
1499
- cellEditorFramework: SelectEditor,
1500
- selectOptionsDisplayField: "display",
1501
- selectOptionsValueField: "id",
1345
+ cellRenderer: SelectRenderer,
1346
+ cellEditor: SelectEditor,
1347
+ cellEditorParams: {
1348
+ displayField: 'display',
1349
+ valueField: 'id',
1350
+ options: sortedOptions,
1351
+ displayOrder: field.displayOrder,
1352
+ dictionaryDisplay: field.dictionaryDisplay,
1353
+ dictionaryTooltip: field.dictionaryTooltip
1354
+ },
1355
+ cellRendererParams: {
1356
+ displayField: 'display',
1357
+ valueField: 'id',
1358
+ options: sortedOptions,
1359
+ },
1502
1360
  sortable: true,
1503
1361
  resizable: true,
1504
1362
  filter: true,
@@ -1596,8 +1454,8 @@ class DictionaryEditorDetailComponent {
1596
1454
  col = {
1597
1455
  field: field.name,
1598
1456
  headerName: field.displayName,
1599
- cellRendererFramework: DateRenderer,
1600
- cellEditorFramework: AgGridDateCellEditorComponent,
1457
+ cellRenderer: DateRenderer,
1458
+ cellEditor: AgGridDateCellEditorComponent,
1601
1459
  editable: this.isEditable.bind(this),
1602
1460
  sortable: true,
1603
1461
  resizable: true,
@@ -1946,7 +1804,6 @@ class DictionaryEditorDetailComponent {
1946
1804
  (gridReady)="this.onMetaGridReady($event)"
1947
1805
  [gridOptions]="this.metaGridOptions"
1948
1806
  [rowSelection]="'single'"
1949
- [frameworkComponents]="frameworkComponents"
1950
1807
  [rowData]="dictionary?.fields">
1951
1808
  </ag-grid-angular>
1952
1809
  </div>
@@ -2032,7 +1889,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2032
1889
  (gridReady)="this.onMetaGridReady($event)"
2033
1890
  [gridOptions]="this.metaGridOptions"
2034
1891
  [rowSelection]="'single'"
2035
- [frameworkComponents]="frameworkComponents"
2036
1892
  [rowData]="dictionary?.fields">
2037
1893
  </ag-grid-angular>
2038
1894
  </div>