@genesislcap/grid-pro 15.13.0 → 15.13.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/dist/custom-elements.json +1058 -1049
- package/dist/dts/grid-pro-beta.d.ts +7 -0
- package/dist/dts/grid-pro-beta.d.ts.map +1 -1
- package/dist/dts/react.d.ts +45 -45
- package/dist/esm/grid-pro-beta.js +37 -4
- package/dist/grid-pro.d.ts +7 -0
- package/dist/react.cjs +30 -30
- package/dist/react.mjs +25 -25
- package/package.json +14 -14
|
@@ -480,6 +480,8 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
480
480
|
private applyingDatasourceGridOptions;
|
|
481
481
|
protected initialised: boolean;
|
|
482
482
|
private rehydrationAttempted;
|
|
483
|
+
/** A schemaUpdated that arrived before `gridApi` existed; replayed in onGridReady. */
|
|
484
|
+
private pendingSchemaUpdate?;
|
|
483
485
|
private rootEventsListeners;
|
|
484
486
|
private datasourceEventHandlers;
|
|
485
487
|
private gridEventsQueue;
|
|
@@ -557,6 +559,11 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
557
559
|
* @internal
|
|
558
560
|
*/
|
|
559
561
|
private handleSchemaUpdated;
|
|
562
|
+
/**
|
|
563
|
+
* Builds and applies column defs from a schema payload.
|
|
564
|
+
* @internal
|
|
565
|
+
*/
|
|
566
|
+
private processSchemaUpdate;
|
|
560
567
|
/**
|
|
561
568
|
* Handles data clearing from datasource
|
|
562
569
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro-beta.d.ts","sourceRoot":"","sources":["../../src/grid-pro-beta.ts"],"names":[],"mappings":"AAOA,OAAO,EAAyB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EAGX,OAAO,EACP,WAAW,EACX,UAAU,EAEX,MAA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
92
|
+
export declare const DateEditor: React.ForwardRefExoticComponent<
|
|
93
|
+
React.PropsWithChildren<
|
|
94
|
+
Omit<PublicOf<DateEditorWC>, 'children' | 'style'> &
|
|
95
|
+
HTMLWCProps & {
|
|
96
|
+
}
|
|
97
|
+
> & React.RefAttributes<DateEditorWC>
|
|
98
|
+
>;
|
|
99
|
+
export type DateEditorRef = DateEditorWC;
|
|
100
|
+
|
|
101
|
+
export declare const MultiselectEditor: React.ForwardRefExoticComponent<
|
|
102
|
+
React.PropsWithChildren<
|
|
103
|
+
Omit<PublicOf<MultiselectEditorWC>, 'children' | 'style'> &
|
|
104
|
+
HTMLWCProps & {
|
|
105
|
+
}
|
|
106
|
+
> & React.RefAttributes<MultiselectEditorWC>
|
|
107
|
+
>;
|
|
108
|
+
export type MultiselectEditorRef = MultiselectEditorWC;
|
|
109
|
+
|
|
110
|
+
export declare const NumberEditor: React.ForwardRefExoticComponent<
|
|
111
|
+
React.PropsWithChildren<
|
|
112
|
+
Omit<PublicOf<NumberEditorWC>, 'children' | 'style'> &
|
|
113
|
+
HTMLWCProps & {
|
|
114
|
+
}
|
|
115
|
+
> & React.RefAttributes<NumberEditorWC>
|
|
116
|
+
>;
|
|
117
|
+
export type NumberEditorRef = NumberEditorWC;
|
|
118
|
+
|
|
119
|
+
export declare const SelectEditor: React.ForwardRefExoticComponent<
|
|
120
|
+
React.PropsWithChildren<
|
|
121
|
+
Omit<PublicOf<SelectEditorWC>, 'children' | 'style'> &
|
|
122
|
+
HTMLWCProps & {
|
|
123
|
+
}
|
|
124
|
+
> & React.RefAttributes<SelectEditorWC>
|
|
125
|
+
>;
|
|
126
|
+
export type SelectEditorRef = SelectEditorWC;
|
|
127
|
+
|
|
128
|
+
export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
129
|
+
React.PropsWithChildren<
|
|
130
|
+
Omit<PublicOf<StringEditorWC>, 'children' | 'style'> &
|
|
131
|
+
HTMLWCProps & {
|
|
132
|
+
}
|
|
133
|
+
> & React.RefAttributes<StringEditorWC>
|
|
134
|
+
>;
|
|
135
|
+
export type StringEditorRef = StringEditorWC;
|
|
136
|
+
|
|
92
137
|
export declare const ActionRenderer: React.ForwardRefExoticComponent<
|
|
93
138
|
React.PropsWithChildren<
|
|
94
139
|
Omit<PublicOf<ActionRendererWC>, 'children' | 'style'> &
|
|
@@ -161,51 +206,6 @@ export declare const AgTextRenderer: React.ForwardRefExoticComponent<
|
|
|
161
206
|
>;
|
|
162
207
|
export type AgTextRendererRef = AgTextRendererWC;
|
|
163
208
|
|
|
164
|
-
export declare const DateEditor: React.ForwardRefExoticComponent<
|
|
165
|
-
React.PropsWithChildren<
|
|
166
|
-
Omit<PublicOf<DateEditorWC>, 'children' | 'style'> &
|
|
167
|
-
HTMLWCProps & {
|
|
168
|
-
}
|
|
169
|
-
> & React.RefAttributes<DateEditorWC>
|
|
170
|
-
>;
|
|
171
|
-
export type DateEditorRef = DateEditorWC;
|
|
172
|
-
|
|
173
|
-
export declare const MultiselectEditor: React.ForwardRefExoticComponent<
|
|
174
|
-
React.PropsWithChildren<
|
|
175
|
-
Omit<PublicOf<MultiselectEditorWC>, 'children' | 'style'> &
|
|
176
|
-
HTMLWCProps & {
|
|
177
|
-
}
|
|
178
|
-
> & React.RefAttributes<MultiselectEditorWC>
|
|
179
|
-
>;
|
|
180
|
-
export type MultiselectEditorRef = MultiselectEditorWC;
|
|
181
|
-
|
|
182
|
-
export declare const NumberEditor: React.ForwardRefExoticComponent<
|
|
183
|
-
React.PropsWithChildren<
|
|
184
|
-
Omit<PublicOf<NumberEditorWC>, 'children' | 'style'> &
|
|
185
|
-
HTMLWCProps & {
|
|
186
|
-
}
|
|
187
|
-
> & React.RefAttributes<NumberEditorWC>
|
|
188
|
-
>;
|
|
189
|
-
export type NumberEditorRef = NumberEditorWC;
|
|
190
|
-
|
|
191
|
-
export declare const SelectEditor: React.ForwardRefExoticComponent<
|
|
192
|
-
React.PropsWithChildren<
|
|
193
|
-
Omit<PublicOf<SelectEditorWC>, 'children' | 'style'> &
|
|
194
|
-
HTMLWCProps & {
|
|
195
|
-
}
|
|
196
|
-
> & React.RefAttributes<SelectEditorWC>
|
|
197
|
-
>;
|
|
198
|
-
export type SelectEditorRef = SelectEditorWC;
|
|
199
|
-
|
|
200
|
-
export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
201
|
-
React.PropsWithChildren<
|
|
202
|
-
Omit<PublicOf<StringEditorWC>, 'children' | 'style'> &
|
|
203
|
-
HTMLWCProps & {
|
|
204
|
-
}
|
|
205
|
-
> & React.RefAttributes<StringEditorWC>
|
|
206
|
-
>;
|
|
207
|
-
export type StringEditorRef = StringEditorWC;
|
|
208
|
-
|
|
209
209
|
export declare const GridProColumn: React.ForwardRefExoticComponent<
|
|
210
210
|
React.PropsWithChildren<
|
|
211
211
|
Omit<PublicOf<GridProColumnWC>, 'children' | 'style'> &
|
|
@@ -83,7 +83,11 @@ function findDeclaredAccessor(target, key) {
|
|
|
83
83
|
*/
|
|
84
84
|
export class GridProBeta extends LifecycleMixin(FoundationElement) {
|
|
85
85
|
rowDataChanged(_, rowData) {
|
|
86
|
-
|
|
86
|
+
// `initialised` flips true right after createGrid(), but `gridApi` is only assigned in the
|
|
87
|
+
// async onGridReady callback — so a binding push in that window would crash on an undefined
|
|
88
|
+
// api. Skipping is lossless: onGridReady applies `this.rowData` itself once the api exists,
|
|
89
|
+
// and FAST has already stored the new value on the instance before calling this handler.
|
|
90
|
+
if (this.initialised && this.gridApi) {
|
|
87
91
|
this.gridApi.setGridOption('rowData', rowData);
|
|
88
92
|
}
|
|
89
93
|
}
|
|
@@ -446,10 +450,23 @@ export class GridProBeta extends LifecycleMixin(FoundationElement) {
|
|
|
446
450
|
*/
|
|
447
451
|
handleSchemaUpdated(event) {
|
|
448
452
|
return __awaiter(this, void 0, void 0, function* () {
|
|
449
|
-
|
|
453
|
+
// Can fire before `gridApi` is ready (mid-reinit). Unlike rowData — which onGridReady
|
|
454
|
+
// re-applies from `this.rowData` — the schema has no other home on the instance, so
|
|
455
|
+
// returning here used to drop it silently and leave the grid with no columns. Stash it
|
|
456
|
+
// and replay in onGridReady.
|
|
450
457
|
if (!this.gridApi) {
|
|
458
|
+
this.pendingSchemaUpdate = event.detail;
|
|
451
459
|
return;
|
|
452
460
|
}
|
|
461
|
+
yield this.processSchemaUpdate(event.detail);
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Builds and applies column defs from a schema payload.
|
|
466
|
+
* @internal
|
|
467
|
+
*/
|
|
468
|
+
processSchemaUpdate(_a) {
|
|
469
|
+
return __awaiter(this, arguments, void 0, function* ({ schema }) {
|
|
453
470
|
// Only auto-generate columns from the datasource schema when the consumer has NOT already
|
|
454
471
|
// supplied their own column defs (e.g. via `gridOptions`/`deferredGridOptions.columnDefs` or
|
|
455
472
|
// `grid-pro-column` templates). Overwriting here would discard user-provided definitions —
|
|
@@ -927,7 +944,7 @@ export class GridProBeta extends LifecycleMixin(FoundationElement) {
|
|
|
927
944
|
this.agAttributes[attrName] = attribute.value;
|
|
928
945
|
});
|
|
929
946
|
const { columnDefs, components, defaultColDef, getRowId, onGridReady, onFilterChanged, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "getRowId", "onGridReady", "onFilterChanged", "onFirstDataRendered"]);
|
|
930
|
-
const derivedOptions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.gridOptionsConfig), { defaultColDef: Object.assign({ enableCellChangeFlash: this.enableCellFlashing, filter: true, resizable: true, sortable: true }, defaultColDef), components: this.combineAllGridComponents(components), headerHeight: this.headerHeight, rowHeight: this.rowHeight, animateRows: false, suppressDragLeaveHidesColumns: true }), this.eventsAndCallbacks), { onGridReady: (event) => {
|
|
947
|
+
const derivedOptions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.gridOptionsConfig), { defaultColDef: Object.assign({ enableCellChangeFlash: this.enableCellFlashing, filter: true, resizable: true, sortable: true }, defaultColDef), components: this.combineAllGridComponents(components), headerHeight: this.headerHeight, rowHeight: this.rowHeight, animateRows: false, suppressDragLeaveHidesColumns: true }), this.eventsAndCallbacks), { onGridReady: (event) => __awaiter(this, void 0, void 0, function* () {
|
|
931
948
|
var _a, _b, _c;
|
|
932
949
|
this.gridApi = event.api;
|
|
933
950
|
if (this.gridEventsQueue.length) {
|
|
@@ -935,6 +952,22 @@ export class GridProBeta extends LifecycleMixin(FoundationElement) {
|
|
|
935
952
|
this.addGridEventListener(type);
|
|
936
953
|
});
|
|
937
954
|
}
|
|
955
|
+
// Awaited so the columns land before rowData/columnState below — otherwise they
|
|
956
|
+
// would race against an empty column model. Caught because ag-grid neither awaits
|
|
957
|
+
// nor handles this callback's promise: a rejection (mergeAllColumnDefsAndStates
|
|
958
|
+
// hydrates column state) would surface as an unhandled rejection AND skip the rest
|
|
959
|
+
// of init — rowData, the consumer's onGridReady, the grid-ready emit. A grid with
|
|
960
|
+
// no columns beats one that never finishes starting.
|
|
961
|
+
if (this.pendingSchemaUpdate) {
|
|
962
|
+
const pendingSchemaUpdate = this.pendingSchemaUpdate;
|
|
963
|
+
this.pendingSchemaUpdate = undefined;
|
|
964
|
+
try {
|
|
965
|
+
yield this.processSchemaUpdate(pendingSchemaUpdate);
|
|
966
|
+
}
|
|
967
|
+
catch (error) {
|
|
968
|
+
logger.error('Grid Pro: failed to apply the pending schema update on grid ready:', error);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
938
971
|
if (this.rowData) {
|
|
939
972
|
this.gridApi.setGridOption('rowData', this.rowData);
|
|
940
973
|
}
|
|
@@ -965,7 +998,7 @@ export class GridProBeta extends LifecycleMixin(FoundationElement) {
|
|
|
965
998
|
this.restoreColumnState();
|
|
966
999
|
this.restoreCachedFilterConfig();
|
|
967
1000
|
this.debouncedColumnAutosize();
|
|
968
|
-
}, onFirstDataRendered: (event) => {
|
|
1001
|
+
}), onFirstDataRendered: (event) => {
|
|
969
1002
|
// Safety net: by now the grid columns are populated, so (re)seed the datasource's visible
|
|
970
1003
|
// columns in case the initial grid-ready seed ran before columns were available.
|
|
971
1004
|
this.notifyDatasourceVisibleColumns();
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -3109,6 +3109,8 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
3109
3109
|
private applyingDatasourceGridOptions;
|
|
3110
3110
|
protected initialised: boolean;
|
|
3111
3111
|
private rehydrationAttempted;
|
|
3112
|
+
/** A schemaUpdated that arrived before `gridApi` existed; replayed in onGridReady. */
|
|
3113
|
+
private pendingSchemaUpdate?;
|
|
3112
3114
|
private rootEventsListeners;
|
|
3113
3115
|
private datasourceEventHandlers;
|
|
3114
3116
|
private gridEventsQueue;
|
|
@@ -3186,6 +3188,11 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
3186
3188
|
* @internal
|
|
3187
3189
|
*/
|
|
3188
3190
|
private handleSchemaUpdated;
|
|
3191
|
+
/**
|
|
3192
|
+
* Builds and applies column defs from a schema payload.
|
|
3193
|
+
* @internal
|
|
3194
|
+
*/
|
|
3195
|
+
private processSchemaUpdate;
|
|
3189
3196
|
/**
|
|
3190
3197
|
* Handles data clearing from datasource
|
|
3191
3198
|
* @internal
|
package/dist/react.cjs
CHANGED
|
@@ -96,6 +96,31 @@ const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
|
96
96
|
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
+
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
100
|
+
const { children, ...rest } = props;
|
|
101
|
+
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const MultiselectEditor = React.forwardRef(function MultiselectEditor(props, ref) {
|
|
105
|
+
const { children, ...rest } = props;
|
|
106
|
+
return React.createElement(customElements.getName(MultiselectEditorWC) ?? '%%prefix%%-multiselect-editor', { ...rest, ref }, children);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const NumberEditor = React.forwardRef(function NumberEditor(props, ref) {
|
|
110
|
+
const { children, ...rest } = props;
|
|
111
|
+
return React.createElement(customElements.getName(NumberEditorWC) ?? '%%prefix%%-number-editor', { ...rest, ref }, children);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const SelectEditor = React.forwardRef(function SelectEditor(props, ref) {
|
|
115
|
+
const { children, ...rest } = props;
|
|
116
|
+
return React.createElement(customElements.getName(SelectEditorWC) ?? '%%prefix%%-select-editor', { ...rest, ref }, children);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
120
|
+
const { children, ...rest } = props;
|
|
121
|
+
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
122
|
+
});
|
|
123
|
+
|
|
99
124
|
const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
100
125
|
const { children, ...rest } = props;
|
|
101
126
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -136,31 +161,6 @@ const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, ref) {
|
|
|
136
161
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
137
162
|
});
|
|
138
163
|
|
|
139
|
-
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
140
|
-
const { children, ...rest } = props;
|
|
141
|
-
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
const MultiselectEditor = React.forwardRef(function MultiselectEditor(props, ref) {
|
|
145
|
-
const { children, ...rest } = props;
|
|
146
|
-
return React.createElement(customElements.getName(MultiselectEditorWC) ?? '%%prefix%%-multiselect-editor', { ...rest, ref }, children);
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
const NumberEditor = React.forwardRef(function NumberEditor(props, ref) {
|
|
150
|
-
const { children, ...rest } = props;
|
|
151
|
-
return React.createElement(customElements.getName(NumberEditorWC) ?? '%%prefix%%-number-editor', { ...rest, ref }, children);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
const SelectEditor = React.forwardRef(function SelectEditor(props, ref) {
|
|
155
|
-
const { children, ...rest } = props;
|
|
156
|
-
return React.createElement(customElements.getName(SelectEditorWC) ?? '%%prefix%%-select-editor', { ...rest, ref }, children);
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
160
|
-
const { children, ...rest } = props;
|
|
161
|
-
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
162
|
-
});
|
|
163
|
-
|
|
164
164
|
const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
165
165
|
const { children, ...rest } = props;
|
|
166
166
|
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
@@ -486,6 +486,11 @@ module.exports = {
|
|
|
486
486
|
GridProBeta,
|
|
487
487
|
GridPro,
|
|
488
488
|
GridProCell,
|
|
489
|
+
DateEditor,
|
|
490
|
+
MultiselectEditor,
|
|
491
|
+
NumberEditor,
|
|
492
|
+
SelectEditor,
|
|
493
|
+
StringEditor,
|
|
489
494
|
ActionRenderer,
|
|
490
495
|
ActionsMenuRenderer,
|
|
491
496
|
BooleanRenderer,
|
|
@@ -494,11 +499,6 @@ module.exports = {
|
|
|
494
499
|
StatusPillRenderer,
|
|
495
500
|
AgTextFieldRenderer,
|
|
496
501
|
AgTextRenderer,
|
|
497
|
-
DateEditor,
|
|
498
|
-
MultiselectEditor,
|
|
499
|
-
NumberEditor,
|
|
500
|
-
SelectEditor,
|
|
501
|
-
StringEditor,
|
|
502
502
|
GridProColumn,
|
|
503
503
|
GridProClientSideDatasource,
|
|
504
504
|
GridProServerSideDatasource,
|
package/dist/react.mjs
CHANGED
|
@@ -94,6 +94,31 @@ export const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
|
94
94
|
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
+
export const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
98
|
+
const { children, ...rest } = props;
|
|
99
|
+
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export const MultiselectEditor = React.forwardRef(function MultiselectEditor(props, ref) {
|
|
103
|
+
const { children, ...rest } = props;
|
|
104
|
+
return React.createElement(customElements.getName(MultiselectEditorWC) ?? '%%prefix%%-multiselect-editor', { ...rest, ref }, children);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export const NumberEditor = React.forwardRef(function NumberEditor(props, ref) {
|
|
108
|
+
const { children, ...rest } = props;
|
|
109
|
+
return React.createElement(customElements.getName(NumberEditorWC) ?? '%%prefix%%-number-editor', { ...rest, ref }, children);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export const SelectEditor = React.forwardRef(function SelectEditor(props, ref) {
|
|
113
|
+
const { children, ...rest } = props;
|
|
114
|
+
return React.createElement(customElements.getName(SelectEditorWC) ?? '%%prefix%%-select-editor', { ...rest, ref }, children);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
118
|
+
const { children, ...rest } = props;
|
|
119
|
+
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
120
|
+
});
|
|
121
|
+
|
|
97
122
|
export const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
98
123
|
const { children, ...rest } = props;
|
|
99
124
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -134,31 +159,6 @@ export const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, re
|
|
|
134
159
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
135
160
|
});
|
|
136
161
|
|
|
137
|
-
export const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
138
|
-
const { children, ...rest } = props;
|
|
139
|
-
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
export const MultiselectEditor = React.forwardRef(function MultiselectEditor(props, ref) {
|
|
143
|
-
const { children, ...rest } = props;
|
|
144
|
-
return React.createElement(customElements.getName(MultiselectEditorWC) ?? '%%prefix%%-multiselect-editor', { ...rest, ref }, children);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
export const NumberEditor = React.forwardRef(function NumberEditor(props, ref) {
|
|
148
|
-
const { children, ...rest } = props;
|
|
149
|
-
return React.createElement(customElements.getName(NumberEditorWC) ?? '%%prefix%%-number-editor', { ...rest, ref }, children);
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
export const SelectEditor = React.forwardRef(function SelectEditor(props, ref) {
|
|
153
|
-
const { children, ...rest } = props;
|
|
154
|
-
return React.createElement(customElements.getName(SelectEditorWC) ?? '%%prefix%%-select-editor', { ...rest, ref }, children);
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
158
|
-
const { children, ...rest } = props;
|
|
159
|
-
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
160
|
-
});
|
|
161
|
-
|
|
162
162
|
export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
163
163
|
const { children, ...rest } = props;
|
|
164
164
|
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/grid-pro",
|
|
3
3
|
"description": "Genesis Foundation AG Grid",
|
|
4
|
-
"version": "15.13.
|
|
4
|
+
"version": "15.13.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@genesislcap/foundation-testing": "15.13.
|
|
44
|
-
"@genesislcap/genx": "15.13.
|
|
45
|
-
"@genesislcap/rollup-builder": "15.13.
|
|
46
|
-
"@genesislcap/ts-builder": "15.13.
|
|
47
|
-
"@genesislcap/uvu-playwright-builder": "15.13.
|
|
48
|
-
"@genesislcap/vite-builder": "15.13.
|
|
49
|
-
"@genesislcap/webpack-builder": "15.13.
|
|
43
|
+
"@genesislcap/foundation-testing": "15.13.1",
|
|
44
|
+
"@genesislcap/genx": "15.13.1",
|
|
45
|
+
"@genesislcap/rollup-builder": "15.13.1",
|
|
46
|
+
"@genesislcap/ts-builder": "15.13.1",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "15.13.1",
|
|
48
|
+
"@genesislcap/vite-builder": "15.13.1",
|
|
49
|
+
"@genesislcap/webpack-builder": "15.13.1"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@genesislcap/foundation-comms": "15.13.
|
|
53
|
-
"@genesislcap/foundation-criteria": "15.13.
|
|
54
|
-
"@genesislcap/foundation-logger": "15.13.
|
|
55
|
-
"@genesislcap/foundation-ui": "15.13.
|
|
56
|
-
"@genesislcap/foundation-utils": "15.13.
|
|
52
|
+
"@genesislcap/foundation-comms": "15.13.1",
|
|
53
|
+
"@genesislcap/foundation-criteria": "15.13.1",
|
|
54
|
+
"@genesislcap/foundation-logger": "15.13.1",
|
|
55
|
+
"@genesislcap/foundation-ui": "15.13.1",
|
|
56
|
+
"@genesislcap/foundation-utils": "15.13.1",
|
|
57
57
|
"@microsoft/fast-colors": "5.3.1",
|
|
58
58
|
"@microsoft/fast-components": "2.30.6",
|
|
59
59
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"require": "./dist/react.cjs"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "4ac0cfb22051b17da81586baf5166c9b605fae10"
|
|
95
95
|
}
|