@skyux/ag-grid 7.11.0 → 7.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/documentation.json +402 -402
- package/esm2020/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.mjs +32 -21
- package/fesm2015/skyux-ag-grid.mjs +32 -20
- package/fesm2015/skyux-ag-grid.mjs.map +1 -1
- package/fesm2020/skyux-ag-grid.mjs +31 -20
- package/fesm2020/skyux-ag-grid.mjs.map +1 -1
- package/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.d.ts +3 -4
- package/package.json +12 -12
|
@@ -874,7 +874,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
874
874
|
args: [{ selector: 'sky-cell-renderer-lookup', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources: summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n", styles: [":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
|
|
875
875
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
876
876
|
|
|
877
|
-
var _SkyAgGridCellRendererRowSelectorComponent_instances, _SkyAgGridCellRendererRowSelectorComponent_params, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener;
|
|
877
|
+
var _SkyAgGridCellRendererRowSelectorComponent_instances, _SkyAgGridCellRendererRowSelectorComponent_params, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, _SkyAgGridCellRendererRowSelectorComponent_setParameters, _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener;
|
|
878
878
|
/**
|
|
879
879
|
* @internal
|
|
880
880
|
*/
|
|
@@ -890,39 +890,50 @@ class SkyAgGridCellRendererRowSelectorComponent {
|
|
|
890
890
|
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
891
891
|
*/
|
|
892
892
|
agInit(params) {
|
|
893
|
-
|
|
894
|
-
this.
|
|
895
|
-
this.rowNode = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").node;
|
|
896
|
-
this.rowNumber = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").rowIndex + 1;
|
|
897
|
-
if (this.dataField) {
|
|
898
|
-
this.checked = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").value;
|
|
899
|
-
this.rowNode.setSelected(!!this.checked);
|
|
900
|
-
}
|
|
901
|
-
else {
|
|
902
|
-
this.checked = this.rowNode.isSelected();
|
|
903
|
-
}
|
|
904
|
-
this.rowNode.addEventListener(RowNode.EVENT_ROW_SELECTED, (event) => {
|
|
893
|
+
__classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_instances, "m", _SkyAgGridCellRendererRowSelectorComponent_setParameters).call(this, params);
|
|
894
|
+
this.rowNode?.addEventListener(RowNode.EVENT_ROW_SELECTED, (event) => {
|
|
905
895
|
__classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_instances, "m", _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener).call(this, event);
|
|
906
896
|
});
|
|
907
897
|
}
|
|
908
898
|
/**
|
|
909
|
-
* Used by agGrid to update cell value after a user triggers a refresh.
|
|
910
|
-
*
|
|
911
|
-
* checkbox cell, rerendering it will guarantee the change applies without knowing the consumer's implementation.
|
|
899
|
+
* Used by agGrid to update cell value after a user triggers a refresh.
|
|
900
|
+
* Returning true tells agGrid that the refresh was successful.
|
|
912
901
|
*/
|
|
913
|
-
refresh() {
|
|
914
|
-
|
|
902
|
+
refresh(params) {
|
|
903
|
+
__classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_instances, "m", _SkyAgGridCellRendererRowSelectorComponent_setParameters).call(this, params);
|
|
904
|
+
return true;
|
|
915
905
|
}
|
|
916
906
|
updateRow() {
|
|
917
907
|
if (this.rowNode) {
|
|
918
|
-
this.rowNode.
|
|
908
|
+
const rowSelected = this.rowNode.isSelected();
|
|
909
|
+
const rowChecked = !!this.checked;
|
|
910
|
+
if (rowSelected !== rowChecked) {
|
|
911
|
+
this.rowNode.setSelected(rowChecked);
|
|
912
|
+
}
|
|
919
913
|
if (this.dataField) {
|
|
920
914
|
this.rowNode.data[this.dataField] = this.checked;
|
|
921
915
|
}
|
|
916
|
+
__classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, "f").markForCheck();
|
|
922
917
|
}
|
|
923
918
|
}
|
|
924
919
|
}
|
|
925
|
-
_SkyAgGridCellRendererRowSelectorComponent_params = new WeakMap(), _SkyAgGridCellRendererRowSelectorComponent_changeDetector = new WeakMap(), _SkyAgGridCellRendererRowSelectorComponent_instances = new WeakSet(),
|
|
920
|
+
_SkyAgGridCellRendererRowSelectorComponent_params = new WeakMap(), _SkyAgGridCellRendererRowSelectorComponent_changeDetector = new WeakMap(), _SkyAgGridCellRendererRowSelectorComponent_instances = new WeakSet(), _SkyAgGridCellRendererRowSelectorComponent_setParameters = function _SkyAgGridCellRendererRowSelectorComponent_setParameters(params) {
|
|
921
|
+
__classPrivateFieldSet(this, _SkyAgGridCellRendererRowSelectorComponent_params, params, "f");
|
|
922
|
+
this.dataField = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").colDef?.field;
|
|
923
|
+
this.rowNode = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").node;
|
|
924
|
+
this.rowNumber = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").rowIndex + 1;
|
|
925
|
+
const rowSelected = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").node.isSelected();
|
|
926
|
+
if (this.dataField) {
|
|
927
|
+
this.checked = !!__classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").value;
|
|
928
|
+
if (rowSelected !== this.checked) {
|
|
929
|
+
this.rowNode.setSelected(this.checked);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
else {
|
|
933
|
+
this.checked = rowSelected;
|
|
934
|
+
}
|
|
935
|
+
__classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, "f").markForCheck();
|
|
936
|
+
}, _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener = function _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener(event) {
|
|
926
937
|
this.checked = event.node.isSelected();
|
|
927
938
|
if (this.rowNode && this.dataField) {
|
|
928
939
|
this.rowNode.data[this.dataField] = this.checked;
|