@genesislcap/grid-pro 15.16.0 → 15.17.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 +1896 -1338
- package/dist/dts/datasource/index.d.ts +3 -0
- package/dist/dts/datasource/index.d.ts.map +1 -1
- package/dist/dts/datasource/row-match.classes.d.ts +47 -0
- package/dist/dts/datasource/row-match.classes.d.ts.map +1 -0
- package/dist/dts/datasource/row-match.tracker.d.ts +67 -0
- package/dist/dts/datasource/row-match.tracker.d.ts.map +1 -0
- package/dist/dts/datasource/row-match.types.d.ts +86 -0
- package/dist/dts/datasource/row-match.types.d.ts.map +1 -0
- package/dist/dts/grid-pro.styles.d.ts +14 -0
- package/dist/dts/grid-pro.styles.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/react.d.ts +13 -13
- package/dist/dts/row-alert/index.d.ts +3 -0
- package/dist/dts/row-alert/index.d.ts.map +1 -0
- package/dist/dts/row-alert/row-alert.d.ts +132 -0
- package/dist/dts/row-alert/row-alert.d.ts.map +1 -0
- package/dist/dts/row-alert/row-alert.types.d.ts +62 -0
- package/dist/dts/row-alert/row-alert.types.d.ts.map +1 -0
- package/dist/dts/state-persistence/kv-state.d.ts +3 -0
- package/dist/dts/state-persistence/kv-state.d.ts.map +1 -1
- package/dist/dts/state-persistence/local-state.d.ts +3 -0
- package/dist/dts/state-persistence/local-state.d.ts.map +1 -1
- package/dist/dts/state-persistence/state-persistence.d.ts +16 -0
- package/dist/dts/state-persistence/state-persistence.d.ts.map +1 -1
- package/dist/esm/datasource/index.js +3 -0
- package/dist/esm/datasource/row-match.classes.js +53 -0
- package/dist/esm/datasource/row-match.tracker.js +117 -0
- package/dist/esm/datasource/row-match.types.js +98 -0
- package/dist/esm/grid-pro.styles.js +48 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/row-alert/index.js +2 -0
- package/dist/esm/row-alert/row-alert.js +197 -0
- package/dist/esm/row-alert/row-alert.types.js +63 -0
- package/dist/esm/state-persistence/kv-state.js +21 -0
- package/dist/esm/state-persistence/local-state.js +19 -0
- package/dist/grid-pro.api.json +11119 -8496
- package/dist/grid-pro.d.ts +441 -0
- package/dist/react.cjs +9 -9
- package/dist/react.mjs +7 -7
- package/package.json +14 -14
package/dist/grid-pro.d.ts
CHANGED
|
@@ -679,6 +679,67 @@ export declare const convertToKebabCase: (value: string) => string;
|
|
|
679
679
|
*/
|
|
680
680
|
export declare function copyAttributesToGridOptions(gridOptions: any, component: Record<string, any>): any;
|
|
681
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Builds the class rules that flash rows matching `criteria`, together with the context menu
|
|
684
|
+
* that lets a user recolor, retime, or narrow that flash to a single cell.
|
|
685
|
+
*
|
|
686
|
+
* The rules are created once and never replaced, because a grid backed by a Genesis datasource
|
|
687
|
+
* keeps the options it was created with — handing it new rules later would change nothing. Each
|
|
688
|
+
* rule instead asks, as it runs, whether its scope is the one currently selected, so switching
|
|
689
|
+
* target only needs the rows redrawn.
|
|
690
|
+
*
|
|
691
|
+
* ```ts
|
|
692
|
+
* const alert = createRowAlert(criteria, { persistPreferencesKey: 'orders.row-alert' });
|
|
693
|
+
* gridOptions = {
|
|
694
|
+
* rowClassRules: alert.rowClassRules,
|
|
695
|
+
* defaultColDef: alert.defaultColDef,
|
|
696
|
+
* getContextMenuItems: alert.getContextMenuItems,
|
|
697
|
+
* };
|
|
698
|
+
* ```
|
|
699
|
+
*
|
|
700
|
+
* Alerts sharing a `persistPreferencesKey` share their preferences, so a page of grids that each
|
|
701
|
+
* watch for something different still answers to one setting.
|
|
702
|
+
*
|
|
703
|
+
* Pairs with {@link DatasourceRowMatchTracker}: give both the same criteria and a tab can say
|
|
704
|
+
* there is work to do while the grid shows which rows it meant.
|
|
705
|
+
*
|
|
706
|
+
* @public
|
|
707
|
+
*/
|
|
708
|
+
export declare function createRowAlert(criteria: RowMatchCriteria, options?: RowAlertOptions): RowAlert;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Cell class rules that flag only the `flashField` cell of a matching row, for spreading into
|
|
712
|
+
* `gridOptions.defaultColDef.cellClassRules`.
|
|
713
|
+
*
|
|
714
|
+
* They belong on `defaultColDef` rather than a single column because AG Grid has no grid-level
|
|
715
|
+
* `cellClassRules`, and the rule itself checks which column it is running against.
|
|
716
|
+
*
|
|
717
|
+
* @public
|
|
718
|
+
*/
|
|
719
|
+
export declare function createRowMatchCellClassRules(criteria: RowMatchCriteria): Record<string, (params: {
|
|
720
|
+
data?: unknown;
|
|
721
|
+
colDef: {
|
|
722
|
+
field?: string;
|
|
723
|
+
};
|
|
724
|
+
}) => boolean>;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Row class rules that flag rows meeting {@link RowMatchCriteria}, for spreading into
|
|
728
|
+
* `gridOptions.rowClassRules`.
|
|
729
|
+
*
|
|
730
|
+
* Pairs with {@link DatasourceRowMatchTracker}: the tracker decides whether a tab should flash,
|
|
731
|
+
* these decide which rows made it flash. Both take the same criteria, so the two cannot disagree.
|
|
732
|
+
*
|
|
733
|
+
* ```ts
|
|
734
|
+
* gridOptions = { rowClassRules: createRowMatchClassRules(criteria) };
|
|
735
|
+
* ```
|
|
736
|
+
*
|
|
737
|
+
* @public
|
|
738
|
+
*/
|
|
739
|
+
export declare function createRowMatchClassRules(criteria: RowMatchCriteria): Record<string, (params: {
|
|
740
|
+
data?: unknown;
|
|
741
|
+
}) => boolean>;
|
|
742
|
+
|
|
682
743
|
/**
|
|
683
744
|
* The delimiter for the criteria string.
|
|
684
745
|
* @public
|
|
@@ -771,6 +832,65 @@ export declare const datasourceEventNames: {
|
|
|
771
832
|
readonly applyServerSideTransaction: "apply-server-side-transaction";
|
|
772
833
|
};
|
|
773
834
|
|
|
835
|
+
/**
|
|
836
|
+
* Tracks which datasource rows satisfy {@link RowMatchCriteria} as stream updates arrive,
|
|
837
|
+
* and reports whether any currently do.
|
|
838
|
+
*
|
|
839
|
+
* Rows are tracked incrementally from `add` / `update` / `remove` deltas rather than by
|
|
840
|
+
* rescanning the grid, so cost is proportional to the update rather than to the row count.
|
|
841
|
+
*
|
|
842
|
+
* The typical consumer flags a tab while a background grid still holds rows needing
|
|
843
|
+
* attention:
|
|
844
|
+
*
|
|
845
|
+
* ```ts
|
|
846
|
+
* const tracker = new DatasourceRowMatchTracker(
|
|
847
|
+
* { rowIdField: 'ORDER_ID', stateField: 'ORDER_STATE', stateValue: 'PENDING' },
|
|
848
|
+
* (active) => { tab.alert = active; },
|
|
849
|
+
* );
|
|
850
|
+
* const stop = tracker.observe(datasourceElement);
|
|
851
|
+
* ```
|
|
852
|
+
*
|
|
853
|
+
* Frameworks that surface the datasource events as props can feed the tracker directly with
|
|
854
|
+
* {@link DatasourceRowMatchTracker.handleDataChanged} and
|
|
855
|
+
* {@link DatasourceRowMatchTracker.handleDataCleared} instead of calling `observe`.
|
|
856
|
+
*
|
|
857
|
+
* Passing the same criteria to `createRowMatchClassRules` flashes the matching rows themselves, so
|
|
858
|
+
* a tab that says there is work to do leads to a grid that shows which rows it meant.
|
|
859
|
+
*
|
|
860
|
+
* Criteria are fixed for the tracker's life. To watch for something else, build a new tracker and
|
|
861
|
+
* reload the datasource, so rows already delivered are replayed against the new rules.
|
|
862
|
+
*
|
|
863
|
+
* @public
|
|
864
|
+
*/
|
|
865
|
+
export declare class DatasourceRowMatchTracker {
|
|
866
|
+
private readonly criteria;
|
|
867
|
+
private readonly onActiveChanged;
|
|
868
|
+
private readonly matchedRowIds;
|
|
869
|
+
private lastReportedActive;
|
|
870
|
+
constructor(criteria: RowMatchCriteria, onActiveChanged: RowMatchActiveChanged);
|
|
871
|
+
/** True while at least one tracked row matches. */
|
|
872
|
+
get active(): boolean;
|
|
873
|
+
/** How many tracked rows currently match. */
|
|
874
|
+
get matchCount(): number;
|
|
875
|
+
/**
|
|
876
|
+
* Forgets every tracked row. Call when the grid's filter or search criteria change, so a
|
|
877
|
+
* stale alert does not survive into a result set that no longer contains those rows.
|
|
878
|
+
*/
|
|
879
|
+
reset(): void;
|
|
880
|
+
/** Applies a `datasource-data-changed` detail. */
|
|
881
|
+
handleDataChanged(detail: DataChangedEventDetail | undefined): void;
|
|
882
|
+
/** Applies a `datasource-data-cleared` event. */
|
|
883
|
+
handleDataCleared(): void;
|
|
884
|
+
/**
|
|
885
|
+
* Subscribes to the datasource events on `target`.
|
|
886
|
+
*
|
|
887
|
+
* @returns a function that removes the listeners.
|
|
888
|
+
*/
|
|
889
|
+
observe(target: EventTarget): () => void;
|
|
890
|
+
private syncRow;
|
|
891
|
+
private report;
|
|
892
|
+
}
|
|
893
|
+
|
|
774
894
|
/**
|
|
775
895
|
* Available datasource types
|
|
776
896
|
* @remarks - This type is used to define what kind of datasource will be used in components like entity manager.
|
|
@@ -858,6 +978,36 @@ export declare const defaultGridProConfig: {
|
|
|
858
978
|
shadowOptions: any;
|
|
859
979
|
};
|
|
860
980
|
|
|
981
|
+
/**
|
|
982
|
+
* Colors offered by default. Each resolves a design token so the menu follows the host
|
|
983
|
+
* application's theme, falling back to a fixed color for design systems that lack the token.
|
|
984
|
+
*
|
|
985
|
+
* @public
|
|
986
|
+
*/
|
|
987
|
+
export declare const defaultRowAlertColorPresets: readonly RowAlertPreset<string>[];
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Where preferences start before a user changes anything.
|
|
991
|
+
*
|
|
992
|
+
* @public
|
|
993
|
+
*/
|
|
994
|
+
export declare const defaultRowAlertPreferences: RowAlertPreferences;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Flash rates offered by default.
|
|
998
|
+
*
|
|
999
|
+
* @public
|
|
1000
|
+
*/
|
|
1001
|
+
export declare const defaultRowAlertRatePresets: readonly RowAlertPreset<number>[];
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Flash targets offered by default. Cell scope only has an effect when the criteria name a
|
|
1005
|
+
* `flashField`.
|
|
1006
|
+
*
|
|
1007
|
+
* @public
|
|
1008
|
+
*/
|
|
1009
|
+
export declare const defaultRowAlertScopePresets: readonly RowAlertPreset<RowAlertScope>[];
|
|
1010
|
+
|
|
861
1011
|
/** Class name used to hide elements with display:none */
|
|
862
1012
|
export declare const DISPLAY_NONE_CLASS = "dnone";
|
|
863
1013
|
|
|
@@ -5827,6 +5977,8 @@ export declare class KVStorageStatePersistence implements StatePersistence {
|
|
|
5827
5977
|
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
5828
5978
|
[key: string]: any;
|
|
5829
5979
|
}): Promise<void>;
|
|
5980
|
+
getRowAlertPreferences(persistRowAlertKey: string): Promise<Partial<RowAlertPreferences>>;
|
|
5981
|
+
saveRowAlertPreferences(persistRowAlertKey: string, preferences: RowAlertPreferences): Promise<void>;
|
|
5830
5982
|
}
|
|
5831
5983
|
|
|
5832
5984
|
/**
|
|
@@ -5911,6 +6063,8 @@ export declare class LocalStorageStatePersistence implements StatePersistence {
|
|
|
5911
6063
|
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
5912
6064
|
[key: string]: any;
|
|
5913
6065
|
}): Promise<void>;
|
|
6066
|
+
getRowAlertPreferences(persistRowAlertKey: string): Promise<Partial<RowAlertPreferences>>;
|
|
6067
|
+
saveRowAlertPreferences(persistRowAlertKey: string, preferences: RowAlertPreferences): Promise<void>;
|
|
5914
6068
|
}
|
|
5915
6069
|
|
|
5916
6070
|
/**
|
|
@@ -5919,6 +6073,13 @@ export declare class LocalStorageStatePersistence implements StatePersistence {
|
|
|
5919
6073
|
*/
|
|
5920
6074
|
export declare const logger: Logger;
|
|
5921
6075
|
|
|
6076
|
+
/**
|
|
6077
|
+
* True when the row satisfies any resolved AND-group.
|
|
6078
|
+
*
|
|
6079
|
+
* @public
|
|
6080
|
+
*/
|
|
6081
|
+
export declare function matchesRowCriteria(criteria: RowMatchCriteria, row: Record<string, unknown> | null | undefined): boolean;
|
|
6082
|
+
|
|
5922
6083
|
/**
|
|
5923
6084
|
* Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
|
|
5924
6085
|
* @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
|
|
@@ -6454,6 +6615,14 @@ export declare interface MultiselectEditorParams extends ICellEditorParams {
|
|
|
6454
6615
|
datasourceOptions: DatasourceOptions[];
|
|
6455
6616
|
}
|
|
6456
6617
|
|
|
6618
|
+
/**
|
|
6619
|
+
* Discards anything unusable from stored preferences, so a hand-edited or outdated entry falls
|
|
6620
|
+
* back to the default rather than leaving alerts invisible.
|
|
6621
|
+
*
|
|
6622
|
+
* @internal
|
|
6623
|
+
*/
|
|
6624
|
+
export declare function normalizeRowAlertPreferences(value: Partial<RowAlertPreferences> | null | undefined): RowAlertPreferences;
|
|
6625
|
+
|
|
6457
6626
|
/**
|
|
6458
6627
|
* The AG Number Editor element.
|
|
6459
6628
|
* @public
|
|
@@ -6563,6 +6732,159 @@ export declare type ReloadStatusBarParams = {
|
|
|
6563
6732
|
*/
|
|
6564
6733
|
export declare function resolveVisibleColumnFields(displayedColumns: DisplayedColumnLike[] | null | undefined, colDefs: readonly unknown[] | null | undefined): string[];
|
|
6565
6734
|
|
|
6735
|
+
/**
|
|
6736
|
+
* Class the grid puts on just the `flashField` cell of a matching row, for grids that flash a
|
|
6737
|
+
* single column rather than the whole row.
|
|
6738
|
+
*
|
|
6739
|
+
* @public
|
|
6740
|
+
*/
|
|
6741
|
+
export declare const ROW_MATCH_ALERT_CELL_CLASS = "grid-pro-row-alert-cell";
|
|
6742
|
+
|
|
6743
|
+
/**
|
|
6744
|
+
* Class the grid puts on rows satisfying the criteria. The grid's own styles flash it in step
|
|
6745
|
+
* with any alerting tab, so a tab that draws you to a grid also shows you which rows caused it.
|
|
6746
|
+
*
|
|
6747
|
+
* @public
|
|
6748
|
+
*/
|
|
6749
|
+
export declare const ROW_MATCH_ALERT_CLASS = "grid-pro-row-alert";
|
|
6750
|
+
|
|
6751
|
+
/**
|
|
6752
|
+
* Everything a grid needs to flash the rows meeting some criteria, and to let the user retune
|
|
6753
|
+
* that flash.
|
|
6754
|
+
*
|
|
6755
|
+
* @public
|
|
6756
|
+
*/
|
|
6757
|
+
export declare interface RowAlert {
|
|
6758
|
+
/** Assign to `gridOptions.rowClassRules`. */
|
|
6759
|
+
readonly rowClassRules: Record<string, (params: {
|
|
6760
|
+
data?: unknown;
|
|
6761
|
+
}) => boolean>;
|
|
6762
|
+
/**
|
|
6763
|
+
* Assign to `gridOptions.defaultColDef`, which is where cell class rules have to live — AG Grid
|
|
6764
|
+
* has no grid-level equivalent. Needed even under row scope, since the user can switch.
|
|
6765
|
+
*/
|
|
6766
|
+
readonly defaultColDef: {
|
|
6767
|
+
cellClassRules: Record<string, (params: {
|
|
6768
|
+
data?: unknown;
|
|
6769
|
+
colDef: {
|
|
6770
|
+
field?: string;
|
|
6771
|
+
};
|
|
6772
|
+
}) => boolean>;
|
|
6773
|
+
};
|
|
6774
|
+
/** The preferences in force right now. */
|
|
6775
|
+
readonly preferences: RowAlertPreferences;
|
|
6776
|
+
/**
|
|
6777
|
+
* Drop-in for `gridOptions.getContextMenuItems`: the grid's own items, then the presets.
|
|
6778
|
+
* Applications that already build a menu can call {@link RowAlert.createMenuItem} instead.
|
|
6779
|
+
*/
|
|
6780
|
+
getContextMenuItems(params: RowAlertMenuParams): any[];
|
|
6781
|
+
/** The presets submenu on its own, for composing into an existing context menu. */
|
|
6782
|
+
createMenuItem(api?: RowAlertGridApi): RowAlertMenuItem;
|
|
6783
|
+
/** Applies and persists a change. */
|
|
6784
|
+
setPreferences(patch: Partial<RowAlertPreferences>): void;
|
|
6785
|
+
/** Returns every preference to its default. */
|
|
6786
|
+
reset(): void;
|
|
6787
|
+
/** Called after any change, for frameworks that need to re-render. Returns an unsubscribe. */
|
|
6788
|
+
subscribe(listener: (preferences: RowAlertPreferences) => void): () => void;
|
|
6789
|
+
}
|
|
6790
|
+
|
|
6791
|
+
/**
|
|
6792
|
+
* The part of AG Grid's api this needs, to bring rows already on screen in line with a change.
|
|
6793
|
+
*
|
|
6794
|
+
* @public
|
|
6795
|
+
*/
|
|
6796
|
+
export declare interface RowAlertGridApi {
|
|
6797
|
+
redrawRows?: () => void;
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6800
|
+
/**
|
|
6801
|
+
* An entry in the presets menu, in the shape AG Grid's `MenuItemDef` expects.
|
|
6802
|
+
*
|
|
6803
|
+
* @public
|
|
6804
|
+
*/
|
|
6805
|
+
export declare interface RowAlertMenuItem {
|
|
6806
|
+
name: string;
|
|
6807
|
+
checked?: boolean;
|
|
6808
|
+
action?: () => void;
|
|
6809
|
+
subMenu?: RowAlertMenuItem[];
|
|
6810
|
+
}
|
|
6811
|
+
|
|
6812
|
+
/**
|
|
6813
|
+
* The parts of AG Grid's context menu params this needs. Described structurally, like the class
|
|
6814
|
+
* rules, because grid-pro serves two AG Grid generations whose own types are not interchangeable.
|
|
6815
|
+
*
|
|
6816
|
+
* @public
|
|
6817
|
+
*/
|
|
6818
|
+
export declare interface RowAlertMenuParams {
|
|
6819
|
+
defaultItems?: any[];
|
|
6820
|
+
api?: RowAlertGridApi;
|
|
6821
|
+
}
|
|
6822
|
+
|
|
6823
|
+
/**
|
|
6824
|
+
* Options for {@link createRowAlert}.
|
|
6825
|
+
*
|
|
6826
|
+
* @public
|
|
6827
|
+
*/
|
|
6828
|
+
export declare interface RowAlertOptions {
|
|
6829
|
+
/**
|
|
6830
|
+
* Remembers the user's choices under this key, through the injected
|
|
6831
|
+
* {@link (StatePersistence:interface)} — the same mechanism as column state, so an application
|
|
6832
|
+
* that has
|
|
6833
|
+
* moved persistence server-side gets these preferences per user too. Omit to keep changes for
|
|
6834
|
+
* the lifetime of the page.
|
|
6835
|
+
*/
|
|
6836
|
+
persistPreferencesKey?: string;
|
|
6837
|
+
/** Element the CSS variables are set on. Defaults to the document, which every grid inherits. */
|
|
6838
|
+
target?: HTMLElement;
|
|
6839
|
+
/**
|
|
6840
|
+
* Further CSS custom properties to hold the chosen color, for surfaces outside the grid that
|
|
6841
|
+
* should flash in the same shade — `--tab-alert-color`, say, in an application whose tab
|
|
6842
|
+
* headers alert alongside their rows.
|
|
6843
|
+
*/
|
|
6844
|
+
mirrorColorTo?: readonly string[];
|
|
6845
|
+
/** Overrides the colors offered in the menu. */
|
|
6846
|
+
colorPresets?: readonly RowAlertPreset<string>[];
|
|
6847
|
+
/** Overrides the flash rates offered in the menu. */
|
|
6848
|
+
ratePresets?: readonly RowAlertPreset<number>[];
|
|
6849
|
+
/** Heading the presets sit under in the context menu. Defaults to `Alert flash`. */
|
|
6850
|
+
menuLabel?: string;
|
|
6851
|
+
/** Starting preferences, before anything stored is loaded. */
|
|
6852
|
+
preferences?: Partial<RowAlertPreferences>;
|
|
6853
|
+
/** Supplied only by tests; otherwise resolved from the container. */
|
|
6854
|
+
statePersistence?: StatePersistence;
|
|
6855
|
+
}
|
|
6856
|
+
|
|
6857
|
+
/**
|
|
6858
|
+
* The parts of a row alert a user can change from the grid's context menu.
|
|
6859
|
+
*
|
|
6860
|
+
* @public
|
|
6861
|
+
*/
|
|
6862
|
+
export declare interface RowAlertPreferences {
|
|
6863
|
+
/** Any CSS color, including a `var()` reference to a design token. */
|
|
6864
|
+
color: string;
|
|
6865
|
+
/** How long one flash cycle takes. Shared by every alerting surface on the page. */
|
|
6866
|
+
durationMs: number;
|
|
6867
|
+
scope: RowAlertScope;
|
|
6868
|
+
}
|
|
6869
|
+
|
|
6870
|
+
/**
|
|
6871
|
+
* A labelled choice offered in the context menu.
|
|
6872
|
+
*
|
|
6873
|
+
* @public
|
|
6874
|
+
*/
|
|
6875
|
+
export declare interface RowAlertPreset<TValue> {
|
|
6876
|
+
id: string;
|
|
6877
|
+
label: string;
|
|
6878
|
+
value: TValue;
|
|
6879
|
+
}
|
|
6880
|
+
|
|
6881
|
+
/**
|
|
6882
|
+
* Whether an alerting row flashes in full, or only the column its criteria name.
|
|
6883
|
+
*
|
|
6884
|
+
* @public
|
|
6885
|
+
*/
|
|
6886
|
+
export declare type RowAlertScope = 'row' | 'cell';
|
|
6887
|
+
|
|
6566
6888
|
/**
|
|
6567
6889
|
* Row Count Status Bar Component for Server-Side Infinite Scroll
|
|
6568
6890
|
* Displays current row count information for server-side grids.
|
|
@@ -6579,6 +6901,110 @@ export declare class RowCountStatusBarComponent implements IStatusPanelComp {
|
|
|
6579
6901
|
destroy(): void;
|
|
6580
6902
|
}
|
|
6581
6903
|
|
|
6904
|
+
/**
|
|
6905
|
+
* Match of a single field to an expected value.
|
|
6906
|
+
*
|
|
6907
|
+
* @public
|
|
6908
|
+
*/
|
|
6909
|
+
export declare interface RowFieldMatch {
|
|
6910
|
+
field: string;
|
|
6911
|
+
/**
|
|
6912
|
+
* Value to compare against. Use `null` with `==` / `!=` to mean empty
|
|
6913
|
+
* (`null`, `undefined` or `''`) or not-empty respectively.
|
|
6914
|
+
*/
|
|
6915
|
+
value: string | number | boolean | null;
|
|
6916
|
+
/** Comparison to apply. Defaults to `==`. */
|
|
6917
|
+
op?: RowFieldMatchOp;
|
|
6918
|
+
}
|
|
6919
|
+
|
|
6920
|
+
/**
|
|
6921
|
+
* Comparison used when matching a field. Defaults to `==`.
|
|
6922
|
+
*
|
|
6923
|
+
* Relational operators (`>`, `>=`, `<`, `<=`) compare numerically — both sides are coerced with
|
|
6924
|
+
* `Number(...)`, and the condition fails if either is not a finite number.
|
|
6925
|
+
*
|
|
6926
|
+
* @public
|
|
6927
|
+
*/
|
|
6928
|
+
export declare type RowFieldMatchOp = '==' | '!=' | '>' | '>=' | '<' | '<=';
|
|
6929
|
+
|
|
6930
|
+
/**
|
|
6931
|
+
* Notified whenever the tracker flips between "some rows match" and "none match".
|
|
6932
|
+
*
|
|
6933
|
+
* @public
|
|
6934
|
+
*/
|
|
6935
|
+
export declare type RowMatchActiveChanged = (active: boolean) => void;
|
|
6936
|
+
|
|
6937
|
+
/**
|
|
6938
|
+
* Flash for rows carrying the classes that `createRowMatchClassRules` and
|
|
6939
|
+
* `createRowMatchCellClassRules` apply.
|
|
6940
|
+
*
|
|
6941
|
+
* These live in the grid's own stylesheet because AG Grid renders inside this shadow root, out of
|
|
6942
|
+
* reach of an app's CSS. The phase comes from the document-level clock, which inherits through the
|
|
6943
|
+
* shadow boundary, so a flashing row keeps step with the flashing tab that sent you looking for it.
|
|
6944
|
+
*
|
|
6945
|
+
* Any grid composition that does not include {@link foundationGridProStyles} needs to include this
|
|
6946
|
+
* as well, otherwise its rows silently never flash.
|
|
6947
|
+
*
|
|
6948
|
+
* @public
|
|
6949
|
+
*/
|
|
6950
|
+
export declare const rowMatchAlertStyles: ElementStyles;
|
|
6951
|
+
|
|
6952
|
+
/**
|
|
6953
|
+
* Declarative rules for deciding whether a datasource row is "of interest" — most commonly
|
|
6954
|
+
* whether it still needs attention, so a tab can be flagged while such rows exist.
|
|
6955
|
+
*
|
|
6956
|
+
* Simple form: `stateField` / `stateValue`, optionally narrowed with `and` (all AND'd).
|
|
6957
|
+
* Flexible form: `anyOf`, an OR of AND-groups, which takes precedence when set.
|
|
6958
|
+
*
|
|
6959
|
+
* @public
|
|
6960
|
+
*/
|
|
6961
|
+
export declare interface RowMatchCriteria {
|
|
6962
|
+
/** Field holding a stable row identity, used to track rows across stream updates. */
|
|
6963
|
+
rowIdField: string;
|
|
6964
|
+
/**
|
|
6965
|
+
* Primary field match. Required unless `anyOf` is set.
|
|
6966
|
+
* Use `null` to match empty values (`null`, `undefined` or `''`).
|
|
6967
|
+
*/
|
|
6968
|
+
stateField?: string;
|
|
6969
|
+
stateValue?: string | number | boolean | null;
|
|
6970
|
+
/** Comparison for `stateField` / `stateValue`. Defaults to `==`. */
|
|
6971
|
+
stateOp?: RowFieldMatchOp;
|
|
6972
|
+
/** Additional AND conditions on top of `stateField` / `stateValue`. Ignored when `anyOf` is set. */
|
|
6973
|
+
and?: RowFieldMatch[];
|
|
6974
|
+
/**
|
|
6975
|
+
* OR of AND-groups. A row matches when every entry of any one group matches.
|
|
6976
|
+
* When set, this is used instead of `stateField` / `stateValue` / `and`
|
|
6977
|
+
* (those shorthand fields are ignored).
|
|
6978
|
+
*
|
|
6979
|
+
* @example
|
|
6980
|
+
* ```ts
|
|
6981
|
+
* // (PENDING and unassigned) OR (LIVE)
|
|
6982
|
+
* anyOf: [
|
|
6983
|
+
* [
|
|
6984
|
+
* { field: 'ORDER_STATE', value: 'PENDING' },
|
|
6985
|
+
* { field: 'ASSIGNED_TO', value: null },
|
|
6986
|
+
* ],
|
|
6987
|
+
* [{ field: 'ORDER_STATE', value: 'LIVE' }],
|
|
6988
|
+
* ]
|
|
6989
|
+
* ```
|
|
6990
|
+
*
|
|
6991
|
+
* @example
|
|
6992
|
+
* ```ts
|
|
6993
|
+
* // Quantity above 100, or a flagged exception
|
|
6994
|
+
* anyOf: [
|
|
6995
|
+
* [{ field: 'QUANTITY', op: '>', value: 100 }],
|
|
6996
|
+
* [{ field: 'IS_EXCEPTION', value: true }],
|
|
6997
|
+
* ]
|
|
6998
|
+
* ```
|
|
6999
|
+
*/
|
|
7000
|
+
anyOf?: RowFieldMatch[][];
|
|
7001
|
+
/**
|
|
7002
|
+
* Column to flash instead of the whole row, for grids where a full-width flash is too much.
|
|
7003
|
+
* Only consulted by the cell class rules; leave unset to flash the entire row.
|
|
7004
|
+
*/
|
|
7005
|
+
flashField?: string;
|
|
7006
|
+
}
|
|
7007
|
+
|
|
6582
7008
|
/**
|
|
6583
7009
|
* Sanitizes persisted column state by removing unsupported keys.
|
|
6584
7010
|
* @remarks Some AG Grid versions include legacy properties (e.g. `sortType`) that should not
|
|
@@ -6756,6 +7182,21 @@ export declare interface StatePersistence {
|
|
|
6756
7182
|
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
6757
7183
|
[key: string]: any;
|
|
6758
7184
|
}): Promise<void>;
|
|
7185
|
+
/**
|
|
7186
|
+
* Returns the row alert preferences for the given key, or `undefined` when none are stored.
|
|
7187
|
+
*
|
|
7188
|
+
* Optional so implementations written before row alerts existed continue to satisfy this
|
|
7189
|
+
* interface; row alerts fall back to their defaults when it is absent.
|
|
7190
|
+
* @public
|
|
7191
|
+
*/
|
|
7192
|
+
getRowAlertPreferences?(persistRowAlertKey: string): Promise<Partial<RowAlertPreferences>>;
|
|
7193
|
+
/**
|
|
7194
|
+
* Saves the row alert preferences for the given key.
|
|
7195
|
+
*
|
|
7196
|
+
* Optional — see {@link (StatePersistence:interface).getRowAlertPreferences}.
|
|
7197
|
+
* @public
|
|
7198
|
+
*/
|
|
7199
|
+
saveRowAlertPreferences?(persistRowAlertKey: string, preferences: RowAlertPreferences): Promise<void>;
|
|
6759
7200
|
}
|
|
6760
7201
|
|
|
6761
7202
|
/**
|
package/dist/react.cjs
CHANGED
|
@@ -91,11 +91,6 @@ const GridPro = React.forwardRef(function GridPro(props, ref) {
|
|
|
91
91
|
return React.createElement(customElements.getName(GridProWC) ?? '%%prefix%%-grid-pro', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
-
const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
95
|
-
const { children, ...rest } = props;
|
|
96
|
-
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
94
|
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
100
95
|
const { children, ...rest } = props;
|
|
101
96
|
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
@@ -121,9 +116,9 @@ const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
121
116
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
122
117
|
});
|
|
123
118
|
|
|
124
|
-
const
|
|
119
|
+
const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
125
120
|
const { children, ...rest } = props;
|
|
126
|
-
return React.createElement(customElements.getName(
|
|
121
|
+
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
127
122
|
});
|
|
128
123
|
|
|
129
124
|
const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
@@ -166,6 +161,11 @@ const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, ref) {
|
|
|
166
161
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
167
162
|
});
|
|
168
163
|
|
|
164
|
+
const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
165
|
+
const { children, ...rest } = props;
|
|
166
|
+
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
167
|
+
});
|
|
168
|
+
|
|
169
169
|
const GridProClientSideDatasource = React.forwardRef(function GridProClientSideDatasource(props, ref) {
|
|
170
170
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
171
171
|
const _innerRef = React.useRef(null);
|
|
@@ -485,13 +485,12 @@ const MulticolumnDropdown = React.forwardRef(function MulticolumnDropdown(props,
|
|
|
485
485
|
module.exports = {
|
|
486
486
|
GridProBeta,
|
|
487
487
|
GridPro,
|
|
488
|
-
GridProCell,
|
|
489
488
|
DateEditor,
|
|
490
489
|
MultiselectEditor,
|
|
491
490
|
NumberEditor,
|
|
492
491
|
SelectEditor,
|
|
493
492
|
StringEditor,
|
|
494
|
-
|
|
493
|
+
GridProCell,
|
|
495
494
|
ActionRenderer,
|
|
496
495
|
ActionsMenuRenderer,
|
|
497
496
|
BooleanRenderer,
|
|
@@ -500,6 +499,7 @@ module.exports = {
|
|
|
500
499
|
StatusPillRenderer,
|
|
501
500
|
AgTextFieldRenderer,
|
|
502
501
|
AgTextRenderer,
|
|
502
|
+
GridProColumn,
|
|
503
503
|
GridProClientSideDatasource,
|
|
504
504
|
GridProServerSideDatasource,
|
|
505
505
|
GridProGenesisDatasource,
|
package/dist/react.mjs
CHANGED
|
@@ -89,11 +89,6 @@ export const GridPro = React.forwardRef(function GridPro(props, ref) {
|
|
|
89
89
|
return React.createElement(customElements.getName(GridProWC) ?? '%%prefix%%-grid-pro', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
export const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
93
|
-
const { children, ...rest } = props;
|
|
94
|
-
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
92
|
export const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
98
93
|
const { children, ...rest } = props;
|
|
99
94
|
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
@@ -119,9 +114,9 @@ export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
119
114
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
120
115
|
});
|
|
121
116
|
|
|
122
|
-
export const
|
|
117
|
+
export const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
123
118
|
const { children, ...rest } = props;
|
|
124
|
-
return React.createElement(customElements.getName(
|
|
119
|
+
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
125
120
|
});
|
|
126
121
|
|
|
127
122
|
export const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
@@ -164,6 +159,11 @@ export const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, re
|
|
|
164
159
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
165
160
|
});
|
|
166
161
|
|
|
162
|
+
export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
163
|
+
const { children, ...rest } = props;
|
|
164
|
+
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
167
|
export const GridProClientSideDatasource = React.forwardRef(function GridProClientSideDatasource(props, ref) {
|
|
168
168
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
169
169
|
const _innerRef = React.useRef(null);
|
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.
|
|
4
|
+
"version": "15.17.0",
|
|
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.
|
|
44
|
-
"@genesislcap/genx": "15.
|
|
45
|
-
"@genesislcap/rollup-builder": "15.
|
|
46
|
-
"@genesislcap/ts-builder": "15.
|
|
47
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
48
|
-
"@genesislcap/vite-builder": "15.
|
|
49
|
-
"@genesislcap/webpack-builder": "15.
|
|
43
|
+
"@genesislcap/foundation-testing": "15.17.0",
|
|
44
|
+
"@genesislcap/genx": "15.17.0",
|
|
45
|
+
"@genesislcap/rollup-builder": "15.17.0",
|
|
46
|
+
"@genesislcap/ts-builder": "15.17.0",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "15.17.0",
|
|
48
|
+
"@genesislcap/vite-builder": "15.17.0",
|
|
49
|
+
"@genesislcap/webpack-builder": "15.17.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@genesislcap/foundation-comms": "15.
|
|
53
|
-
"@genesislcap/foundation-criteria": "15.
|
|
54
|
-
"@genesislcap/foundation-logger": "15.
|
|
55
|
-
"@genesislcap/foundation-ui": "15.
|
|
56
|
-
"@genesislcap/foundation-utils": "15.
|
|
52
|
+
"@genesislcap/foundation-comms": "15.17.0",
|
|
53
|
+
"@genesislcap/foundation-criteria": "15.17.0",
|
|
54
|
+
"@genesislcap/foundation-logger": "15.17.0",
|
|
55
|
+
"@genesislcap/foundation-ui": "15.17.0",
|
|
56
|
+
"@genesislcap/foundation-utils": "15.17.0",
|
|
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": "2e040c4861f6acfde7afef48b60555548fac8708"
|
|
95
95
|
}
|