@genesislcap/grid-pro 14.101.4-alpha-0f9aa4a.0 → 14.102.0
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/dist/custom-elements.json +309 -1
- package/dist/dts/cell-editors/index.d.ts +1 -0
- package/dist/dts/cell-editors/index.d.ts.map +1 -1
- package/dist/dts/cell-editors/number.editor.d.ts +59 -0
- package/dist/dts/cell-editors/number.editor.d.ts.map +1 -0
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/grid-components.d.ts +10 -1
- package/dist/dts/grid-components.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +6 -0
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +5 -10
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/grid-pro.types.d.ts +2 -1
- package/dist/dts/grid-pro.types.d.ts.map +1 -1
- package/dist/esm/cell-editors/index.js +1 -0
- package/dist/esm/cell-editors/number.editor.js +86 -0
- package/dist/esm/datasource/server-side.datasource.js +3 -0
- package/dist/esm/grid-components.js +3 -2
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +10 -10
- package/dist/esm/grid-pro.js +4 -7
- package/dist/esm/grid-pro.types.js +1 -0
- package/dist/grid-pro.api.json +887 -2
- package/dist/grid-pro.d.ts +84 -12
- package/docs/api/grid-pro.agnumbereditorstyles.md +13 -0
- package/docs/api/grid-pro.foundationgridcomponents.md +10 -1
- package/docs/api/grid-pro.foundationnumbereditor.md +24 -0
- package/docs/api/grid-pro.getnumbereditortemplate.md +13 -0
- package/docs/api/grid-pro.gridprorenderertypes.md +1 -0
- package/docs/api/grid-pro.md +5 -0
- package/docs/api/grid-pro.numbereditor.afterguiattached.md +15 -0
- package/docs/api/grid-pro.numbereditor.changehandler.md +22 -0
- package/docs/api/grid-pro.numbereditor.destroy.md +15 -0
- package/docs/api/grid-pro.numbereditor.focus.md +15 -0
- package/docs/api/grid-pro.numbereditor.getgui.md +15 -0
- package/docs/api/grid-pro.numbereditor.getvalue.md +15 -0
- package/docs/api/grid-pro.numbereditor.init.md +22 -0
- package/docs/api/grid-pro.numbereditor.input.md +11 -0
- package/docs/api/grid-pro.numbereditor.ispopup.md +15 -0
- package/docs/api/grid-pro.numbereditor.md +39 -0
- package/docs/api/grid-pro.numbereditor.params.md +11 -0
- package/docs/api/grid-pro.numbereditor.refresh.md +22 -0
- package/docs/api/grid-pro.numbereditor.value.md +11 -0
- package/docs/api/grid-pro.numbereditorparams.disabled.md +11 -0
- package/docs/api/grid-pro.numbereditorparams.formatoptions.md +11 -0
- package/docs/api/grid-pro.numbereditorparams.md +24 -0
- package/docs/api/grid-pro.numbereditorparams.placeholder.md +11 -0
- package/docs/api/grid-pro.numbereditorparams.withformatting.md +11 -0
- package/docs/api-report.md +69 -1
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { foundationSelectEditor } from './cell-editors';
|
|
1
|
+
import { foundationSelectEditor, foundationNumberEditor } from './cell-editors';
|
|
2
2
|
import { foundationGridProActionRenderer, foundationGridProActionsMenuRenderer, foundationAgBooleanRenderer, foundationAgSelectRenderer, foundationAgTextRenderer, foundationAgTextFieldRenderer, } from './cell-renderers';
|
|
3
3
|
import { foundationGridPro } from './grid-pro';
|
|
4
4
|
/**
|
|
@@ -14,7 +14,8 @@ export const foundationGridComponents = {
|
|
|
14
14
|
foundationAgTextFieldRenderer,
|
|
15
15
|
foundationAgSelectRenderer,
|
|
16
16
|
foundationGridPro,
|
|
17
|
-
|
|
17
|
+
foundationSelectEditor,
|
|
18
|
+
foundationNumberEditor,
|
|
18
19
|
register(container, ...rest) {
|
|
19
20
|
if (!container) {
|
|
20
21
|
// preserve backward compatibility with code that loops through
|
|
@@ -216,16 +216,16 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
216
216
|
* @internal
|
|
217
217
|
*/
|
|
218
218
|
setRowData(rowData) {
|
|
219
|
-
var _a
|
|
219
|
+
var _a;
|
|
220
220
|
const preSetColumnDefs = (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.getColumnDefs();
|
|
221
221
|
if (!preSetColumnDefs || preSetColumnDefs.length === 0) {
|
|
222
222
|
const agColumnDefs = this.getAgColumnDefs(this.datasource.fieldMetadata);
|
|
223
223
|
if (agColumnDefs) {
|
|
224
|
-
|
|
224
|
+
this.agGrid.gridApi.setColumnDefs(agColumnDefs);
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
const data = this.rowDataMapper ? this.rowDataMapper(rowData) : rowData;
|
|
228
|
-
|
|
228
|
+
this.agGrid.gridApi.setRowData(data);
|
|
229
229
|
this.requiresFullRowDataAndColDefs = false;
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
@@ -235,7 +235,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
235
235
|
* @internal
|
|
236
236
|
*/
|
|
237
237
|
reloadResourceData() {
|
|
238
|
-
var _a;
|
|
238
|
+
var _a, _b;
|
|
239
239
|
return __awaiter(this, void 0, void 0, function* () {
|
|
240
240
|
if (this.dataSub) {
|
|
241
241
|
this.dataSub.unsubscribe();
|
|
@@ -243,7 +243,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
243
243
|
}
|
|
244
244
|
this.dataLogoff();
|
|
245
245
|
this.clearRowData(withoutColumnDefs);
|
|
246
|
-
(_a = this.agGrid
|
|
246
|
+
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.showLoadingOverlay();
|
|
247
247
|
this.loadResourceData(withoutFullInit);
|
|
248
248
|
});
|
|
249
249
|
}
|
|
@@ -375,11 +375,10 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
375
375
|
this.applyAllAgTransactions();
|
|
376
376
|
}
|
|
377
377
|
applyAllAgTransactions() {
|
|
378
|
-
var _a;
|
|
379
378
|
if (!this.agTransaction.add.length &&
|
|
380
379
|
!this.agTransaction.update.length &&
|
|
381
380
|
!this.agTransaction.remove.length) {
|
|
382
|
-
|
|
381
|
+
this.agGrid.gridApi.showNoRowsOverlay();
|
|
383
382
|
return;
|
|
384
383
|
}
|
|
385
384
|
if (this.agTransaction.add.length > 0) {
|
|
@@ -394,9 +393,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
394
393
|
}
|
|
395
394
|
applyMappedAgTransaction(agTransaction, operation, isAsync) {
|
|
396
395
|
const applyTransaction = isAsync ? 'applyTransactionAsync' : 'applyTransaction';
|
|
397
|
-
|
|
398
|
-
this.agGrid.gridApi[applyTransaction](this.mapTransaction(agTransaction, [operation]));
|
|
399
|
-
}
|
|
396
|
+
this.agGrid.gridApi[applyTransaction](this.mapTransaction(agTransaction, [operation]));
|
|
400
397
|
}
|
|
401
398
|
/**
|
|
402
399
|
* Maps the transaction data to the row data mapper function, if it exists.
|
|
@@ -455,6 +452,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
455
452
|
const colDefBase = {};
|
|
456
453
|
colDefBase.filterParams = getFilterParamsByFieldType(field.type);
|
|
457
454
|
switch (field.type) {
|
|
455
|
+
case FieldTypeEnum.NUMBER:
|
|
456
|
+
colDefBase.cellEditor = GridProRendererTypes.numberEditor;
|
|
457
|
+
break;
|
|
458
458
|
case FieldTypeEnum.BOOLEAN:
|
|
459
459
|
if (this.agGrid.autoCellRendererByType) {
|
|
460
460
|
colDefBase.cellRenderer = GridProRendererTypes.boolean;
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -8,7 +8,7 @@ import { attr, DOM, observable } from '@microsoft/fast-element';
|
|
|
8
8
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
9
9
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
10
10
|
import { GridProCell } from './cell';
|
|
11
|
-
import { SelectEditor } from './cell-editors';
|
|
11
|
+
import { SelectEditor, NumberEditor } from './cell-editors';
|
|
12
12
|
import { ActionRenderer, ActionsMenuRenderer, BooleanRenderer } from './cell-renderers';
|
|
13
13
|
import { GridProColumn } from './column';
|
|
14
14
|
import { GridProClientSideDatasource, GridProServerSideDatasource } from './datasource';
|
|
@@ -135,8 +135,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
135
135
|
if (!this.shouldRunDisconnect)
|
|
136
136
|
return;
|
|
137
137
|
(_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
138
|
-
this.gridApi = null;
|
|
139
|
-
this.columnApi = null;
|
|
140
138
|
}
|
|
141
139
|
combineAllGridComponents(gridOptionsComponents) {
|
|
142
140
|
const defaultFoundationAgComponents = {
|
|
@@ -144,6 +142,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
144
142
|
[GridProRendererTypes.actionsMenu]: ActionsMenuRenderer,
|
|
145
143
|
[GridProRendererTypes.boolean]: BooleanRenderer,
|
|
146
144
|
[GridProRendererTypes.selectEditor]: SelectEditor,
|
|
145
|
+
[GridProRendererTypes.numberEditor]: NumberEditor,
|
|
147
146
|
};
|
|
148
147
|
return Object.assign(Object.assign(Object.assign({}, defaultFoundationAgComponents), gridOptionsComponents), this.gridComponents);
|
|
149
148
|
}
|
|
@@ -295,17 +294,15 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
295
294
|
});
|
|
296
295
|
}
|
|
297
296
|
enableFlashingRows() {
|
|
298
|
-
var _a;
|
|
299
297
|
if (this.enableRowFlashing || this.enabledRowFlashing) {
|
|
300
298
|
if (!this.asyncAdd) {
|
|
301
299
|
logger.warn('Row Flashing (enableRowFlashing) only works when Grid has async Add Transactions (asyncAdd) enabled');
|
|
302
300
|
return;
|
|
303
301
|
}
|
|
304
|
-
|
|
302
|
+
this.gridApi.addEventListener(Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED, (e) => {
|
|
305
303
|
e.results.forEach((result) => {
|
|
306
|
-
var _a;
|
|
307
304
|
if (result.add.length) {
|
|
308
|
-
|
|
305
|
+
this.gridApi.flashCells({
|
|
309
306
|
rowNodes: result.add,
|
|
310
307
|
});
|
|
311
308
|
}
|
|
@@ -128,6 +128,7 @@ export var GridProRendererTypes;
|
|
|
128
128
|
GridProRendererTypes["text"] = "text";
|
|
129
129
|
GridProRendererTypes["select"] = "select";
|
|
130
130
|
GridProRendererTypes["selectEditor"] = "selectEditor";
|
|
131
|
+
GridProRendererTypes["numberEditor"] = "numberEditor";
|
|
131
132
|
})(GridProRendererTypes || (GridProRendererTypes = {}));
|
|
132
133
|
/**
|
|
133
134
|
* Event fired when grid is ready
|