@skyux/ag-grid 5.9.7 → 5.11.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.
- package/bundles/skyux-ag-grid.umd.js +314 -76
- package/documentation.json +526 -335
- package/esm2015/index.js +2 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.js +36 -3
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js +14 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js +42 -7
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.js +14 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.js +60 -13
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.js +4 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.js +35 -9
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.js +33 -3
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.js +4 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js +32 -3
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js +4 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-editor-initial-action.js +13 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-initial-action.js.map +1 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-utils.js +31 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-utils.js.map +1 -0
- package/fesm2015/skyux-ag-grid.js +296 -58
- package/fesm2015/skyux-ag-grid.js.map +1 -1
- package/index.d.ts +2 -0
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.d.ts +4 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.d.ts +8 -3
- package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.d.ts +7 -4
- package/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.d.ts +2 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.d.ts +4 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.d.ts +4 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.d.ts +1 -1
- package/lib/modules/ag-grid/types/cell-editor-initial-action.d.ts +11 -0
- package/lib/modules/ag-grid/types/cell-editor-utils.d.ts +9 -0
- package/package.json +12 -12
|
@@ -9,18 +9,19 @@ import { SkyDataManagerModule } from '@skyux/data-manager';
|
|
|
9
9
|
import * as i1$2 from '@skyux/layout';
|
|
10
10
|
import { SkyInlineDeleteModule } from '@skyux/layout';
|
|
11
11
|
import { AgGridAngular, AgGridModule } from 'ag-grid-angular';
|
|
12
|
-
import { Subject } from 'rxjs';
|
|
13
|
-
import { takeUntil, filter } from 'rxjs/operators';
|
|
12
|
+
import { Subject, fromEvent } from 'rxjs';
|
|
13
|
+
import { takeUntil, filter, first } from 'rxjs/operators';
|
|
14
|
+
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
|
|
15
|
+
import * as i1$4 from '@angular/forms';
|
|
16
|
+
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
17
|
+
import { KeyCode, PopupComponent, Events, RowNode } from 'ag-grid-community';
|
|
14
18
|
import * as i1$3 from '@skyux/lookup';
|
|
15
19
|
import { SkyAutocompleteModule, SkyLookupModule } from '@skyux/lookup';
|
|
16
|
-
import * as i1$4 from '@angular/forms';
|
|
17
|
-
import { FormsModule, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
18
20
|
import * as i3$1 from '@skyux/i18n';
|
|
19
21
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
20
22
|
import * as i2 from '@skyux/autonumeric';
|
|
21
23
|
import { SkyAutonumericModule } from '@skyux/autonumeric';
|
|
22
24
|
import * as i1$5 from '@skyux/theme';
|
|
23
|
-
import { PopupComponent, Events, RowNode } from 'ag-grid-community';
|
|
24
25
|
import * as i2$1 from '@skyux/datetime';
|
|
25
26
|
import { SkyDatepickerModule } from '@skyux/datetime';
|
|
26
27
|
import * as i1$6 from '@skyux/forms';
|
|
@@ -668,29 +669,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
668
669
|
args: [AgGridAngular]
|
|
669
670
|
}] } });
|
|
670
671
|
|
|
672
|
+
/** The intiial action that a cell editor should take when initialized. */
|
|
673
|
+
var SkyAgGridCellEditorInitialAction;
|
|
674
|
+
(function (SkyAgGridCellEditorInitialAction) {
|
|
675
|
+
/** The cell should be cleared. */
|
|
676
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Delete"] = 0] = "Delete";
|
|
677
|
+
/** The cell value should be highlighted. */
|
|
678
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Highlighted"] = 1] = "Highlighted";
|
|
679
|
+
/** The cell value should be replaced with the initializing value. */
|
|
680
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Replace"] = 2] = "Replace";
|
|
681
|
+
/** The cell should not be modified and the cursor is placed at the end of the value. */
|
|
682
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Untouched"] = 3] = "Untouched";
|
|
683
|
+
})(SkyAgGridCellEditorInitialAction || (SkyAgGridCellEditorInitialAction = {}));
|
|
684
|
+
|
|
685
|
+
class SkyAgGridCellEditorUtils {
|
|
686
|
+
/**
|
|
687
|
+
* Gets the intiial action that a cell editor should take when initialized.
|
|
688
|
+
* @param params The editor's initializing parameters.
|
|
689
|
+
*/
|
|
690
|
+
static getEditorInitialAction(params) {
|
|
691
|
+
if (params.cellStartedEdit) {
|
|
692
|
+
if (params.keyPress === KeyCode.BACKSPACE ||
|
|
693
|
+
params.keyPress === KeyCode.DELETE) {
|
|
694
|
+
return SkyAgGridCellEditorInitialAction.Delete;
|
|
695
|
+
}
|
|
696
|
+
else if (params.charPress) {
|
|
697
|
+
return SkyAgGridCellEditorInitialAction.Replace;
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
if (params.keyPress !== KeyCode.F2) {
|
|
701
|
+
return SkyAgGridCellEditorInitialAction.Highlighted;
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
return SkyAgGridCellEditorInitialAction.Untouched;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
return SkyAgGridCellEditorInitialAction.Untouched;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
var _SkyAgGridCellEditorAutocompleteComponent_triggerType;
|
|
671
715
|
/**
|
|
672
716
|
* @internal
|
|
673
717
|
*/
|
|
674
718
|
class SkyAgGridCellEditorAutocompleteComponent {
|
|
675
719
|
constructor() {
|
|
720
|
+
this.editorForm = new FormGroup({
|
|
721
|
+
selection: new FormControl(),
|
|
722
|
+
});
|
|
676
723
|
this.skyComponentProperties = {};
|
|
724
|
+
_SkyAgGridCellEditorAutocompleteComponent_triggerType.set(this, void 0);
|
|
677
725
|
}
|
|
678
726
|
agInit(params) {
|
|
679
727
|
this.params = params;
|
|
680
|
-
this
|
|
728
|
+
__classPrivateFieldSet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
|
|
729
|
+
const control = this.editorForm.get('selection');
|
|
730
|
+
switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f")) {
|
|
731
|
+
case SkyAgGridCellEditorInitialAction.Delete:
|
|
732
|
+
control.setValue(undefined);
|
|
733
|
+
break;
|
|
734
|
+
case SkyAgGridCellEditorInitialAction.Replace:
|
|
735
|
+
case SkyAgGridCellEditorInitialAction.Highlighted:
|
|
736
|
+
case SkyAgGridCellEditorInitialAction.Untouched:
|
|
737
|
+
default:
|
|
738
|
+
control.setValue(params.value);
|
|
739
|
+
break;
|
|
740
|
+
}
|
|
681
741
|
this.columnHeader = this.params.colDef && this.params.colDef.headerName;
|
|
682
742
|
this.rowNumber = this.params.rowIndex + 1;
|
|
683
743
|
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
684
744
|
}
|
|
685
745
|
afterGuiAttached() {
|
|
686
746
|
this.input.nativeElement.focus();
|
|
747
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
|
|
748
|
+
this.input.nativeElement.select();
|
|
749
|
+
this.input.nativeElement.setRangeText(this.params.charPress);
|
|
750
|
+
// Ensure the cursor is at the end of the text.
|
|
751
|
+
this.input.nativeElement.setSelectionRange(this.params.charPress.length, this.params.charPress.length);
|
|
752
|
+
this.input.nativeElement.dispatchEvent(new Event('input'));
|
|
753
|
+
}
|
|
754
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
755
|
+
this.input.nativeElement.select();
|
|
756
|
+
}
|
|
687
757
|
}
|
|
688
758
|
getValue() {
|
|
689
|
-
|
|
759
|
+
const val = this.editorForm.get('selection').value;
|
|
760
|
+
return val !== undefined && val !== null ? val : undefined;
|
|
690
761
|
}
|
|
691
762
|
}
|
|
763
|
+
_SkyAgGridCellEditorAutocompleteComponent_triggerType = new WeakMap();
|
|
692
764
|
SkyAgGridCellEditorAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
693
|
-
SkyAgGridCellEditorAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorAutocompleteComponent, selector: "sky-ag-grid-cell-editor-autocomplete", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorAutocomplete"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-ag-grid-cell-editor-autocomplete\">\n <sky-autocomplete\n [data]=\"skyComponentProperties.data\"\n [debounceTime]=\"skyComponentProperties.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties.descriptorProperty\"\n [propertiesToSearch]=\"skyComponentProperties.propertiesToSearch\"\n [search]=\"skyComponentProperties.search\"\n [searchFilters]=\"skyComponentProperties.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties.searchTextMinimumCharacters\n \"\n (selectionChange)=\"\n skyComponentProperties.selectionChange &&\n skyComponentProperties.selectionChange($event)\n \"\n >\n <input\n skyAutocomplete\n #skyCellEditorAutocomplete\n type=\"text\"\n [
|
|
765
|
+
SkyAgGridCellEditorAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorAutocompleteComponent, selector: "sky-ag-grid-cell-editor-autocomplete", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorAutocomplete"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-ag-grid-cell-editor-autocomplete\" [formGroup]=\"editorForm\">\n <sky-autocomplete\n [data]=\"skyComponentProperties.data\"\n [debounceTime]=\"skyComponentProperties.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties.descriptorProperty\"\n [propertiesToSearch]=\"skyComponentProperties.propertiesToSearch\"\n [search]=\"skyComponentProperties.search\"\n [searchFilters]=\"skyComponentProperties.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties.searchTextMinimumCharacters\n \"\n (selectionChange)=\"\n skyComponentProperties.selectionChange &&\n skyComponentProperties.selectionChange($event)\n \"\n >\n <input\n formControlName=\"selection\"\n skyAutocomplete\n #skyCellEditorAutocomplete\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_autocomplete_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n />\n </sky-autocomplete>\n</div>\n", styles: ["sky-autocomplete input{border:none;box-shadow:none}\n"], components: [{ type: i1$3.λ2, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }], directives: [{ type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$3.λ1, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
694
766
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteComponent, decorators: [{
|
|
695
767
|
type: Component,
|
|
696
768
|
args: [{
|
|
@@ -775,23 +847,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
775
847
|
class SkyAgGridCellEditorAutocompleteModule {
|
|
776
848
|
}
|
|
777
849
|
SkyAgGridCellEditorAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
778
|
-
SkyAgGridCellEditorAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, declarations: [SkyAgGridCellEditorAutocompleteComponent], imports: [
|
|
779
|
-
|
|
850
|
+
SkyAgGridCellEditorAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, declarations: [SkyAgGridCellEditorAutocompleteComponent], imports: [ReactiveFormsModule,
|
|
851
|
+
SkyAgGridResourcesModule,
|
|
852
|
+
SkyAutocompleteModule], exports: [SkyAgGridCellEditorAutocompleteComponent] });
|
|
853
|
+
SkyAgGridCellEditorAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, imports: [[
|
|
854
|
+
ReactiveFormsModule,
|
|
855
|
+
SkyAgGridResourcesModule,
|
|
856
|
+
SkyAutocompleteModule,
|
|
857
|
+
]] });
|
|
780
858
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, decorators: [{
|
|
781
859
|
type: NgModule,
|
|
782
860
|
args: [{
|
|
783
|
-
imports: [
|
|
861
|
+
imports: [
|
|
862
|
+
ReactiveFormsModule,
|
|
863
|
+
SkyAgGridResourcesModule,
|
|
864
|
+
SkyAutocompleteModule,
|
|
865
|
+
],
|
|
784
866
|
declarations: [SkyAgGridCellEditorAutocompleteComponent],
|
|
785
867
|
exports: [SkyAgGridCellEditorAutocompleteComponent],
|
|
786
868
|
}]
|
|
787
869
|
}] });
|
|
788
870
|
|
|
871
|
+
var _SkyAgGridCellEditorCurrencyComponent_triggerType;
|
|
789
872
|
/**
|
|
790
873
|
* @internal
|
|
791
874
|
*/
|
|
792
875
|
class SkyAgGridCellEditorCurrencyComponent {
|
|
793
|
-
constructor() {
|
|
876
|
+
constructor(changeDetector) {
|
|
877
|
+
this.changeDetector = changeDetector;
|
|
794
878
|
this.skyComponentProperties = {};
|
|
879
|
+
this.editorForm = new FormGroup({
|
|
880
|
+
currency: new FormControl(),
|
|
881
|
+
});
|
|
882
|
+
_SkyAgGridCellEditorCurrencyComponent_triggerType.set(this, void 0);
|
|
795
883
|
}
|
|
796
884
|
/**
|
|
797
885
|
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
@@ -799,7 +887,6 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
799
887
|
*/
|
|
800
888
|
agInit(params) {
|
|
801
889
|
this.params = params;
|
|
802
|
-
this.value = this.params.value;
|
|
803
890
|
this.columnHeader = this.params.colDef.headerName;
|
|
804
891
|
this.rowNumber = this.params.rowIndex + 1;
|
|
805
892
|
this.columnWidth = this.params.column.getActualWidth();
|
|
@@ -815,12 +902,37 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
815
902
|
*/
|
|
816
903
|
afterGuiAttached() {
|
|
817
904
|
this.input.nativeElement.focus();
|
|
905
|
+
// This setup is in `afterGuiAttached` due to the lifecycle of autonumeric which will highlight the initial value if it is in place when it renders.
|
|
906
|
+
// Since we don't want that, we set the initial value after autonumeric initializes.
|
|
907
|
+
__classPrivateFieldSet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(this.params), "f");
|
|
908
|
+
const control = this.editorForm.get('currency');
|
|
909
|
+
switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, "f")) {
|
|
910
|
+
case SkyAgGridCellEditorInitialAction.Delete:
|
|
911
|
+
control.setValue(undefined);
|
|
912
|
+
break;
|
|
913
|
+
case SkyAgGridCellEditorInitialAction.Replace:
|
|
914
|
+
control.setValue(parseFloat(this.params.charPress) || undefined);
|
|
915
|
+
break;
|
|
916
|
+
case SkyAgGridCellEditorInitialAction.Highlighted:
|
|
917
|
+
case SkyAgGridCellEditorInitialAction.Untouched:
|
|
918
|
+
default:
|
|
919
|
+
control.setValue(parseFloat(this.params.value));
|
|
920
|
+
break;
|
|
921
|
+
}
|
|
922
|
+
this.changeDetector.markForCheck();
|
|
923
|
+
// Without the `setTimeout` there is inconsistent behavior with the highlighting when no initial value is present.
|
|
924
|
+
setTimeout(() => {
|
|
925
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
926
|
+
this.input.nativeElement.select();
|
|
927
|
+
}
|
|
928
|
+
}, 100);
|
|
818
929
|
}
|
|
819
930
|
/**
|
|
820
931
|
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
821
932
|
*/
|
|
822
933
|
getValue() {
|
|
823
|
-
|
|
934
|
+
const val = this.editorForm.get('currency').value;
|
|
935
|
+
return val !== undefined && val !== null ? val : undefined;
|
|
824
936
|
}
|
|
825
937
|
/**
|
|
826
938
|
* The autoNumeric library's event handler suppresses the escape key event. This additional handler re-enables AG Grid's default functionality.
|
|
@@ -830,8 +942,9 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
830
942
|
this.params.api.setFocusedCell(this.params.rowIndex, this.params.column);
|
|
831
943
|
}
|
|
832
944
|
}
|
|
833
|
-
|
|
834
|
-
SkyAgGridCellEditorCurrencyComponent.ɵ
|
|
945
|
+
_SkyAgGridCellEditorCurrencyComponent_triggerType = new WeakMap();
|
|
946
|
+
SkyAgGridCellEditorCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
947
|
+
SkyAgGridCellEditorCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"currency\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [skyAutonumeric]=\"skyComponentProperties\"\n [skyAutonumericFormChangesUnformatted]=\"params?.charPress\"\n (keyup.escape)=\"onPressEscape()\"\n #skyCellEditorCurrency\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric", "skyAutonumericFormChangesUnformatted"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
835
948
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, decorators: [{
|
|
836
949
|
type: Component,
|
|
837
950
|
args: [{
|
|
@@ -840,7 +953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
840
953
|
styleUrls: ['./cell-editor-currency.component.scss'],
|
|
841
954
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
842
955
|
}]
|
|
843
|
-
}], propDecorators: { input: [{
|
|
956
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
|
844
957
|
type: ViewChild,
|
|
845
958
|
args: ['skyCellEditorCurrency', { read: ElementRef }]
|
|
846
959
|
}] } });
|
|
@@ -848,40 +961,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
848
961
|
class SkyAgGridCellEditorCurrencyModule {
|
|
849
962
|
}
|
|
850
963
|
SkyAgGridCellEditorCurrencyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
851
|
-
SkyAgGridCellEditorCurrencyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, declarations: [SkyAgGridCellEditorCurrencyComponent], imports: [SkyAgGridResourcesModule,
|
|
852
|
-
|
|
964
|
+
SkyAgGridCellEditorCurrencyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, declarations: [SkyAgGridCellEditorCurrencyComponent], imports: [SkyAgGridResourcesModule,
|
|
965
|
+
ReactiveFormsModule,
|
|
966
|
+
SkyAutonumericModule], exports: [SkyAgGridCellEditorCurrencyComponent] });
|
|
967
|
+
SkyAgGridCellEditorCurrencyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, imports: [[
|
|
968
|
+
SkyAgGridResourcesModule,
|
|
969
|
+
ReactiveFormsModule,
|
|
970
|
+
SkyAutonumericModule,
|
|
971
|
+
]] });
|
|
853
972
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, decorators: [{
|
|
854
973
|
type: NgModule,
|
|
855
974
|
args: [{
|
|
856
|
-
imports: [
|
|
975
|
+
imports: [
|
|
976
|
+
SkyAgGridResourcesModule,
|
|
977
|
+
ReactiveFormsModule,
|
|
978
|
+
SkyAutonumericModule,
|
|
979
|
+
],
|
|
857
980
|
declarations: [SkyAgGridCellEditorCurrencyComponent],
|
|
858
981
|
exports: [SkyAgGridCellEditorCurrencyComponent],
|
|
859
982
|
}]
|
|
860
983
|
}] });
|
|
861
984
|
|
|
985
|
+
var _SkyAgGridCellEditorDatepickerComponent_triggerType;
|
|
862
986
|
/**
|
|
863
987
|
* @internal
|
|
864
988
|
*/
|
|
865
989
|
class SkyAgGridCellEditorDatepickerComponent extends PopupComponent {
|
|
866
|
-
constructor(themeSvc) {
|
|
990
|
+
constructor(changeDetector, themeSvc) {
|
|
867
991
|
super();
|
|
992
|
+
this.changeDetector = changeDetector;
|
|
868
993
|
this.themeSvc = themeSvc;
|
|
994
|
+
this.editorForm = new FormGroup({
|
|
995
|
+
date: new FormControl(),
|
|
996
|
+
});
|
|
869
997
|
this.skyComponentProperties = {};
|
|
998
|
+
_SkyAgGridCellEditorDatepickerComponent_triggerType.set(this, void 0);
|
|
870
999
|
}
|
|
871
1000
|
/**
|
|
872
1001
|
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
873
1002
|
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
874
1003
|
*/
|
|
875
1004
|
agInit(params) {
|
|
876
|
-
var _a;
|
|
1005
|
+
var _a, _b;
|
|
877
1006
|
this.params = params;
|
|
878
|
-
this
|
|
1007
|
+
__classPrivateFieldSet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
|
|
1008
|
+
const control = this.editorForm.get('date');
|
|
1009
|
+
switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f")) {
|
|
1010
|
+
case SkyAgGridCellEditorInitialAction.Delete:
|
|
1011
|
+
control.setValue(undefined);
|
|
1012
|
+
break;
|
|
1013
|
+
case SkyAgGridCellEditorInitialAction.Replace:
|
|
1014
|
+
control.setValue(params.charPress);
|
|
1015
|
+
break;
|
|
1016
|
+
case SkyAgGridCellEditorInitialAction.Highlighted:
|
|
1017
|
+
case SkyAgGridCellEditorInitialAction.Untouched:
|
|
1018
|
+
default:
|
|
1019
|
+
control.setValue(params.value);
|
|
1020
|
+
break;
|
|
1021
|
+
}
|
|
1022
|
+
if ((_a = this.params.skyComponentProperties) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
1023
|
+
control.disable();
|
|
1024
|
+
}
|
|
1025
|
+
this.changeDetector.markForCheck();
|
|
879
1026
|
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
880
1027
|
this.columnWidth = this.params.column.getActualWidth();
|
|
881
1028
|
this.columnWidthWithoutBorders = this.columnWidth - 2;
|
|
882
1029
|
this.rowHeightWithoutBorders =
|
|
883
1030
|
this.params.node && this.params.node.rowHeight - 3;
|
|
884
|
-
(
|
|
1031
|
+
(_b = this.themeSvc) === null || _b === void 0 ? void 0 : _b.settingsChange.subscribe((themeSettings) => {
|
|
885
1032
|
if (themeSettings.currentSettings.theme.name === 'modern') {
|
|
886
1033
|
this.columnWidthWithoutBorders = this.columnWidth;
|
|
887
1034
|
this.rowHeightWithoutBorders =
|
|
@@ -898,21 +1045,38 @@ class SkyAgGridCellEditorDatepickerComponent extends PopupComponent {
|
|
|
898
1045
|
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
899
1046
|
*/
|
|
900
1047
|
afterGuiAttached() {
|
|
901
|
-
this.
|
|
1048
|
+
const datepickerInputEl = this.datepickerInput
|
|
1049
|
+
.nativeElement;
|
|
1050
|
+
datepickerInputEl.focus();
|
|
1051
|
+
// Programatically set the value of in the input; however, do not do this via the form control so that the value is not formatted when editing starts.
|
|
1052
|
+
// Watch for the first blur and fire a 'change' event as programatic changes won't queue a change event, but we need to do this so that formatting happens if the user tabs to the calendar button.
|
|
1053
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
|
|
1054
|
+
fromEvent(datepickerInputEl, 'blur')
|
|
1055
|
+
.pipe(first())
|
|
1056
|
+
.subscribe(() => {
|
|
1057
|
+
datepickerInputEl.dispatchEvent(new Event('change'));
|
|
1058
|
+
});
|
|
1059
|
+
datepickerInputEl.select();
|
|
1060
|
+
datepickerInputEl.setRangeText(this.params.charPress);
|
|
1061
|
+
// Ensure the cursor is at the end of the text.
|
|
1062
|
+
datepickerInputEl.setSelectionRange(this.params.charPress.length, this.params.charPress.length);
|
|
1063
|
+
}
|
|
1064
|
+
// this.changeDetector.markForCheck();
|
|
1065
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
1066
|
+
datepickerInputEl.select();
|
|
1067
|
+
}
|
|
902
1068
|
}
|
|
903
1069
|
/**
|
|
904
1070
|
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
905
1071
|
*/
|
|
906
1072
|
getValue() {
|
|
907
1073
|
this.datepickerInput.nativeElement.blur();
|
|
908
|
-
return this.
|
|
909
|
-
}
|
|
910
|
-
focusOnDatepickerInput() {
|
|
911
|
-
this.datepickerInput.nativeElement.focus();
|
|
1074
|
+
return this.editorForm.get('date').value;
|
|
912
1075
|
}
|
|
913
1076
|
}
|
|
914
|
-
|
|
915
|
-
SkyAgGridCellEditorDatepickerComponent.ɵ
|
|
1077
|
+
_SkyAgGridCellEditorDatepickerComponent_triggerType = new WeakMap();
|
|
1078
|
+
SkyAgGridCellEditorDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$5.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1079
|
+
SkyAgGridCellEditorDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorDatepickerComponent, selector: "sky-ag-grid-cell-editor-datepicker", viewQueries: [{ propertyName: "datepickerInput", first: true, predicate: ["skyCellEditorDatepickerInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"sky-ag-grid-cell-editor-datepicker\"\n [formGroup]=\"editorForm\"\n [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n formControlName=\"date\"\n skyDatepickerInput\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n", styles: [".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}\n"], components: [{ type: i2$1.λ2, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange"] }], directives: [{ type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.λ3, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
916
1080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, decorators: [{
|
|
917
1081
|
type: Component,
|
|
918
1082
|
args: [{
|
|
@@ -922,7 +1086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
922
1086
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
923
1087
|
encapsulation: ViewEncapsulation.None,
|
|
924
1088
|
}]
|
|
925
|
-
}], ctorParameters: function () { return [{ type: i1$5.SkyThemeService, decorators: [{
|
|
1089
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$5.SkyThemeService, decorators: [{
|
|
926
1090
|
type: Optional
|
|
927
1091
|
}] }]; }, propDecorators: { datepickerInput: [{
|
|
928
1092
|
type: ViewChild,
|
|
@@ -932,12 +1096,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
932
1096
|
class SkyAgGridCellEditorDatepickerModule {
|
|
933
1097
|
}
|
|
934
1098
|
SkyAgGridCellEditorDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
935
|
-
SkyAgGridCellEditorDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, declarations: [SkyAgGridCellEditorDatepickerComponent], imports: [SkyDatepickerModule,
|
|
936
|
-
SkyAgGridCellEditorDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, imports: [[SkyDatepickerModule,
|
|
1099
|
+
SkyAgGridCellEditorDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, declarations: [SkyAgGridCellEditorDatepickerComponent], imports: [SkyDatepickerModule, ReactiveFormsModule], exports: [SkyAgGridCellEditorDatepickerComponent] });
|
|
1100
|
+
SkyAgGridCellEditorDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, imports: [[SkyDatepickerModule, ReactiveFormsModule]] });
|
|
937
1101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, decorators: [{
|
|
938
1102
|
type: NgModule,
|
|
939
1103
|
args: [{
|
|
940
|
-
imports: [SkyDatepickerModule,
|
|
1104
|
+
imports: [SkyDatepickerModule, ReactiveFormsModule],
|
|
941
1105
|
declarations: [SkyAgGridCellEditorDatepickerComponent],
|
|
942
1106
|
exports: [SkyAgGridCellEditorDatepickerComponent],
|
|
943
1107
|
}]
|
|
@@ -972,6 +1136,7 @@ function applySkyLookupPropertiesDefaults(skyLookupProperties) {
|
|
|
972
1136
|
};
|
|
973
1137
|
}
|
|
974
1138
|
|
|
1139
|
+
var _SkyAgGridCellEditorLookupComponent_triggerType;
|
|
975
1140
|
/**
|
|
976
1141
|
* @internal
|
|
977
1142
|
*/
|
|
@@ -980,21 +1145,33 @@ class SkyAgGridCellEditorLookupComponent {
|
|
|
980
1145
|
this.changeDetector = changeDetector;
|
|
981
1146
|
this.elementRef = elementRef;
|
|
982
1147
|
this.isAlive = false;
|
|
983
|
-
this.
|
|
984
|
-
|
|
1148
|
+
this.editorForm = new FormGroup({
|
|
1149
|
+
selection: new FormControl({
|
|
985
1150
|
value: [],
|
|
986
1151
|
disabled: false,
|
|
987
1152
|
}),
|
|
988
1153
|
});
|
|
989
1154
|
this.useAsyncSearch = false;
|
|
1155
|
+
_SkyAgGridCellEditorLookupComponent_triggerType.set(this, void 0);
|
|
990
1156
|
}
|
|
991
1157
|
agInit(params) {
|
|
992
1158
|
this.params = params;
|
|
993
1159
|
if (!Array.isArray(this.params.value)) {
|
|
994
1160
|
throw new Error(`Lookup value must be an array`);
|
|
995
1161
|
}
|
|
996
|
-
|
|
997
|
-
control
|
|
1162
|
+
__classPrivateFieldSet(this, _SkyAgGridCellEditorLookupComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
|
|
1163
|
+
const control = this.editorForm.get('selection');
|
|
1164
|
+
switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_triggerType, "f")) {
|
|
1165
|
+
case SkyAgGridCellEditorInitialAction.Delete:
|
|
1166
|
+
control.setValue([]);
|
|
1167
|
+
break;
|
|
1168
|
+
case SkyAgGridCellEditorInitialAction.Replace:
|
|
1169
|
+
case SkyAgGridCellEditorInitialAction.Highlighted:
|
|
1170
|
+
case SkyAgGridCellEditorInitialAction.Untouched:
|
|
1171
|
+
default:
|
|
1172
|
+
control.setValue(params.value);
|
|
1173
|
+
break;
|
|
1174
|
+
}
|
|
998
1175
|
if (this.params.skyComponentProperties.disabled) {
|
|
999
1176
|
control.disable();
|
|
1000
1177
|
}
|
|
@@ -1019,23 +1196,33 @@ class SkyAgGridCellEditorLookupComponent {
|
|
|
1019
1196
|
return this.elementRef.nativeElement;
|
|
1020
1197
|
}
|
|
1021
1198
|
getValue() {
|
|
1022
|
-
return this.
|
|
1199
|
+
return this.editorForm.get('selection').value;
|
|
1023
1200
|
}
|
|
1024
1201
|
isPopup() {
|
|
1025
1202
|
return true;
|
|
1026
1203
|
}
|
|
1027
|
-
/*istanbul ignore next*/
|
|
1028
1204
|
afterGuiAttached() {
|
|
1029
|
-
|
|
1030
|
-
|
|
1205
|
+
const lookupInput = this.elementRef.nativeElement.querySelector('.sky-lookup-input');
|
|
1206
|
+
lookupInput.focus();
|
|
1207
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
|
|
1208
|
+
lookupInput.select();
|
|
1209
|
+
lookupInput.setRangeText(this.params.charPress);
|
|
1210
|
+
// Ensure the cursor is at the end of the text.
|
|
1211
|
+
lookupInput.setSelectionRange(lookupInput.value.length, lookupInput.value.length);
|
|
1212
|
+
lookupInput.dispatchEvent(new Event('input'));
|
|
1213
|
+
}
|
|
1214
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
1215
|
+
lookupInput.select();
|
|
1216
|
+
}
|
|
1031
1217
|
}
|
|
1032
1218
|
updateComponentProperties(params) {
|
|
1033
1219
|
const skyLookupProperties = params.skyComponentProperties;
|
|
1034
1220
|
return applySkyLookupPropertiesDefaults(skyLookupProperties);
|
|
1035
1221
|
}
|
|
1036
1222
|
}
|
|
1223
|
+
_SkyAgGridCellEditorLookupComponent_triggerType = new WeakMap();
|
|
1037
1224
|
SkyAgGridCellEditorLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1038
|
-
SkyAgGridCellEditorLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", host: { properties: { "style.width.px": "this.width" } }, ngImport: i0, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"
|
|
1225
|
+
SkyAgGridCellEditorLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", host: { properties: { "style.width.px": "this.width" } }, ngImport: i0, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"selection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties.searchAsync($event)\"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"selection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n", styles: [":host{display:block}\n"], components: [{ type: i1$6.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { type: i1$3.λ4, selector: "sky-lookup", inputs: ["ariaLabel", "ariaLabelledBy", "autocompleteAttribute", "data", "disabled", "enableShowMore", "placeholderText", "idProperty", "showAddButton", "showMoreConfig", "selectMode", "wrapperClass"], outputs: ["addClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1039
1226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, decorators: [{
|
|
1040
1227
|
type: Component,
|
|
1041
1228
|
args: [{
|
|
@@ -1079,10 +1266,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1079
1266
|
}]
|
|
1080
1267
|
}] });
|
|
1081
1268
|
|
|
1269
|
+
var _SkyAgGridCellEditorNumberComponent_triggerType;
|
|
1082
1270
|
/**
|
|
1083
1271
|
* @internal
|
|
1084
1272
|
*/
|
|
1085
1273
|
class SkyAgGridCellEditorNumberComponent {
|
|
1274
|
+
constructor() {
|
|
1275
|
+
this.editorForm = new FormGroup({
|
|
1276
|
+
number: new FormControl(),
|
|
1277
|
+
});
|
|
1278
|
+
_SkyAgGridCellEditorNumberComponent_triggerType.set(this, void 0);
|
|
1279
|
+
}
|
|
1086
1280
|
/**
|
|
1087
1281
|
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1088
1282
|
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
@@ -1090,7 +1284,21 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1090
1284
|
agInit(params) {
|
|
1091
1285
|
var _a, _b;
|
|
1092
1286
|
this.params = params;
|
|
1093
|
-
this
|
|
1287
|
+
__classPrivateFieldSet(this, _SkyAgGridCellEditorNumberComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
|
|
1288
|
+
const control = this.editorForm.get('number');
|
|
1289
|
+
switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_triggerType, "f")) {
|
|
1290
|
+
case SkyAgGridCellEditorInitialAction.Delete:
|
|
1291
|
+
control.setValue(undefined);
|
|
1292
|
+
break;
|
|
1293
|
+
case SkyAgGridCellEditorInitialAction.Replace:
|
|
1294
|
+
control.setValue(parseFloat(this.params.charPress) || undefined);
|
|
1295
|
+
break;
|
|
1296
|
+
case SkyAgGridCellEditorInitialAction.Highlighted:
|
|
1297
|
+
case SkyAgGridCellEditorInitialAction.Untouched:
|
|
1298
|
+
default:
|
|
1299
|
+
control.setValue(params.value);
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1094
1302
|
this.max = (_a = params.skyComponentProperties) === null || _a === void 0 ? void 0 : _a.max;
|
|
1095
1303
|
this.min = (_b = params.skyComponentProperties) === null || _b === void 0 ? void 0 : _b.min;
|
|
1096
1304
|
this.columnHeader = this.params.colDef.headerName;
|
|
@@ -1104,16 +1312,21 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1104
1312
|
*/
|
|
1105
1313
|
afterGuiAttached() {
|
|
1106
1314
|
this.input.nativeElement.focus();
|
|
1315
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
1316
|
+
this.input.nativeElement.select();
|
|
1317
|
+
}
|
|
1107
1318
|
}
|
|
1108
1319
|
/**
|
|
1109
1320
|
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1110
1321
|
*/
|
|
1111
1322
|
getValue() {
|
|
1112
|
-
|
|
1323
|
+
const val = this.editorForm.get('number').value;
|
|
1324
|
+
return val !== undefined && val !== null ? val : undefined;
|
|
1113
1325
|
}
|
|
1114
1326
|
}
|
|
1327
|
+
_SkyAgGridCellEditorNumberComponent_triggerType = new WeakMap();
|
|
1115
1328
|
SkyAgGridCellEditorNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1116
|
-
SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\n
|
|
1329
|
+
SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max\"\n [min]=\"min\"\n #skyCellEditorNumber\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"], directives: [{ type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i1$4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i1$4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1117
1330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, decorators: [{
|
|
1118
1331
|
type: Component,
|
|
1119
1332
|
args: [{
|
|
@@ -1130,21 +1343,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1130
1343
|
class SkyAgGridCellEditorNumberModule {
|
|
1131
1344
|
}
|
|
1132
1345
|
SkyAgGridCellEditorNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1133
|
-
SkyAgGridCellEditorNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [SkyAgGridResourcesModule,
|
|
1134
|
-
SkyAgGridCellEditorNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, imports: [[SkyAgGridResourcesModule,
|
|
1346
|
+
SkyAgGridCellEditorNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [SkyAgGridResourcesModule, ReactiveFormsModule], exports: [SkyAgGridCellEditorNumberComponent] });
|
|
1347
|
+
SkyAgGridCellEditorNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, imports: [[SkyAgGridResourcesModule, ReactiveFormsModule]] });
|
|
1135
1348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, decorators: [{
|
|
1136
1349
|
type: NgModule,
|
|
1137
1350
|
args: [{
|
|
1138
|
-
imports: [SkyAgGridResourcesModule,
|
|
1351
|
+
imports: [SkyAgGridResourcesModule, ReactiveFormsModule],
|
|
1139
1352
|
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
1140
1353
|
exports: [SkyAgGridCellEditorNumberComponent],
|
|
1141
1354
|
}]
|
|
1142
1355
|
}] });
|
|
1143
1356
|
|
|
1357
|
+
var _SkyAgGridCellEditorTextComponent_triggerType;
|
|
1144
1358
|
/**
|
|
1145
1359
|
* @internal
|
|
1146
1360
|
*/
|
|
1147
1361
|
class SkyAgGridCellEditorTextComponent {
|
|
1362
|
+
constructor() {
|
|
1363
|
+
this.editorForm = new FormGroup({
|
|
1364
|
+
text: new FormControl(),
|
|
1365
|
+
});
|
|
1366
|
+
_SkyAgGridCellEditorTextComponent_triggerType.set(this, void 0);
|
|
1367
|
+
}
|
|
1148
1368
|
/**
|
|
1149
1369
|
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1150
1370
|
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
@@ -1152,7 +1372,21 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1152
1372
|
agInit(params) {
|
|
1153
1373
|
var _a;
|
|
1154
1374
|
this.params = params;
|
|
1155
|
-
this
|
|
1375
|
+
__classPrivateFieldSet(this, _SkyAgGridCellEditorTextComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
|
|
1376
|
+
const control = this.editorForm.get('text');
|
|
1377
|
+
switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_triggerType, "f")) {
|
|
1378
|
+
case SkyAgGridCellEditorInitialAction.Delete:
|
|
1379
|
+
control.setValue(undefined);
|
|
1380
|
+
break;
|
|
1381
|
+
case SkyAgGridCellEditorInitialAction.Replace:
|
|
1382
|
+
control.setValue(params.charPress);
|
|
1383
|
+
break;
|
|
1384
|
+
case SkyAgGridCellEditorInitialAction.Highlighted:
|
|
1385
|
+
case SkyAgGridCellEditorInitialAction.Untouched:
|
|
1386
|
+
default:
|
|
1387
|
+
control.setValue(params.value);
|
|
1388
|
+
break;
|
|
1389
|
+
}
|
|
1156
1390
|
this.maxlength = (_a = params.skyComponentProperties) === null || _a === void 0 ? void 0 : _a.maxlength;
|
|
1157
1391
|
this.columnHeader = this.params.colDef.headerName;
|
|
1158
1392
|
this.rowNumber = this.params.rowIndex + 1;
|
|
@@ -1165,16 +1399,20 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1165
1399
|
*/
|
|
1166
1400
|
afterGuiAttached() {
|
|
1167
1401
|
this.input.nativeElement.focus();
|
|
1402
|
+
if (__classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
1403
|
+
this.input.nativeElement.select();
|
|
1404
|
+
}
|
|
1168
1405
|
}
|
|
1169
1406
|
/**
|
|
1170
1407
|
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1171
1408
|
*/
|
|
1172
1409
|
getValue() {
|
|
1173
|
-
return this.value;
|
|
1410
|
+
return this.editorForm.get('text').value || undefined;
|
|
1174
1411
|
}
|
|
1175
1412
|
}
|
|
1413
|
+
_SkyAgGridCellEditorTextComponent_triggerType = new WeakMap();
|
|
1176
1414
|
SkyAgGridCellEditorTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1177
|
-
SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\n
|
|
1415
|
+
SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength\"\n #skyCellEditorText\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1178
1416
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextComponent, decorators: [{
|
|
1179
1417
|
type: Component,
|
|
1180
1418
|
args: [{
|
|
@@ -1191,12 +1429,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1191
1429
|
class SkyAgGridCellEditorTextModule {
|
|
1192
1430
|
}
|
|
1193
1431
|
SkyAgGridCellEditorTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1194
|
-
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [SkyAgGridResourcesModule,
|
|
1195
|
-
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[SkyAgGridResourcesModule,
|
|
1432
|
+
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [SkyAgGridResourcesModule, ReactiveFormsModule], exports: [SkyAgGridCellEditorTextComponent] });
|
|
1433
|
+
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[SkyAgGridResourcesModule, ReactiveFormsModule]] });
|
|
1196
1434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, decorators: [{
|
|
1197
1435
|
type: NgModule,
|
|
1198
1436
|
args: [{
|
|
1199
|
-
imports: [SkyAgGridResourcesModule,
|
|
1437
|
+
imports: [SkyAgGridResourcesModule, ReactiveFormsModule],
|
|
1200
1438
|
declarations: [SkyAgGridCellEditorTextComponent],
|
|
1201
1439
|
exports: [SkyAgGridCellEditorTextComponent],
|
|
1202
1440
|
}]
|
|
@@ -1909,7 +2147,7 @@ class SkyAgGridService {
|
|
|
1909
2147
|
getDefaultGridOptions(args) {
|
|
1910
2148
|
var _a, _b, _c, _d, _e, _f;
|
|
1911
2149
|
// cellClassRules can be functions or string expressions
|
|
1912
|
-
const cellClassRuleTrueExpression =
|
|
2150
|
+
const cellClassRuleTrueExpression = () => true;
|
|
1913
2151
|
function getEditableFn(isUneditable) {
|
|
1914
2152
|
return function (params) {
|
|
1915
2153
|
let isEditable = params.colDef.editable;
|
|
@@ -2147,5 +2385,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2147
2385
|
* Generated bundle index. Do not edit.
|
|
2148
2386
|
*/
|
|
2149
2387
|
|
|
2150
|
-
export { SkyAgGridModule, SkyAgGridService, SkyCellClass, SkyCellType, SkyHeaderClass, SkyAgGridCellEditorAutocompleteComponent as λ1, SkyAgGridCellRendererValidatorTooltipComponent as λ10, SkyAgGridCellValidatorTooltipComponent as λ11, SkyAgGridWrapperComponent as λ12, SkyAgGridRowDeleteDirective as λ13, SkyAgGridDataManagerAdapterDirective as λ14, SkyAgGridCellEditorLookupComponent as λ15, SkyAgGridCellRendererLookupComponent as λ16, SkyAgGridCellEditorTextComponent as λ2, SkyAgGridCellEditorCurrencyComponent as λ3, SkyAgGridCellEditorNumberComponent as λ4, SkyAgGridCellEditorDatepickerComponent as λ5, SkyAgGridRowDeleteComponent as λ6, SkyAgGridCellRendererRowSelectorComponent as λ7, SkyAgGridCellRendererCurrencyValidatorComponent as λ8, SkyAgGridCellRendererCurrencyComponent as λ9 };
|
|
2388
|
+
export { SkyAgGridCellEditorInitialAction, SkyAgGridCellEditorUtils, SkyAgGridModule, SkyAgGridService, SkyCellClass, SkyCellType, SkyHeaderClass, SkyAgGridCellEditorAutocompleteComponent as λ1, SkyAgGridCellRendererValidatorTooltipComponent as λ10, SkyAgGridCellValidatorTooltipComponent as λ11, SkyAgGridWrapperComponent as λ12, SkyAgGridRowDeleteDirective as λ13, SkyAgGridDataManagerAdapterDirective as λ14, SkyAgGridCellEditorLookupComponent as λ15, SkyAgGridCellRendererLookupComponent as λ16, SkyAgGridCellEditorTextComponent as λ2, SkyAgGridCellEditorCurrencyComponent as λ3, SkyAgGridCellEditorNumberComponent as λ4, SkyAgGridCellEditorDatepickerComponent as λ5, SkyAgGridRowDeleteComponent as λ6, SkyAgGridCellRendererRowSelectorComponent as λ7, SkyAgGridCellRendererCurrencyValidatorComponent as λ8, SkyAgGridCellRendererCurrencyComponent as λ9 };
|
|
2151
2389
|
//# sourceMappingURL=skyux-ag-grid.js.map
|