@linzjs/step-ag-grid 7.16.6 → 7.17.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/src/components/Grid.d.ts +1 -0
- package/dist/src/utils/testUtil.d.ts +1 -0
- package/dist/step-ag-grid.esm.js +13 -2
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +2 -0
- package/src/stories/grid/GridPopoutBearing.stories.tsx +1 -0
- package/src/utils/testUtil.ts +5 -0
|
@@ -23,6 +23,7 @@ export interface GridProps {
|
|
|
23
23
|
rowSelection?: "single" | "multiple";
|
|
24
24
|
autoSelectFirstRow?: boolean;
|
|
25
25
|
onColumnMoved?: GridOptions["onColumnMoved"];
|
|
26
|
+
alwaysShowVerticalScroll?: boolean;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Wrapper for AgGrid to add commonly used functionality.
|
|
@@ -7,6 +7,7 @@ export declare const findCell: (rowId: number | string, colId: string, within?:
|
|
|
7
7
|
export declare const findCellContains: (rowId: number | string, colId: string, text: string | RegExp, within?: HTMLElement) => Promise<HTMLElement>;
|
|
8
8
|
export declare const selectCell: (rowId: string | number, colId: string, within?: HTMLElement) => Promise<void>;
|
|
9
9
|
export declare const editCell: (rowId: number | string, colId: string, within?: HTMLElement) => Promise<void>;
|
|
10
|
+
export declare const isCellReadOnly: (rowId: number | string, colId: string, within?: HTMLElement) => Promise<boolean>;
|
|
10
11
|
export declare const queryMenuOption: (menuOptionText: string | RegExp) => Promise<HTMLElement | null>;
|
|
11
12
|
export declare const findMenuOption: (menuOptionText: string | RegExp) => Promise<HTMLElement>;
|
|
12
13
|
export declare const validateMenuOptions: (rowId: number | string, colId: string, expectedMenuOptions: Array<string>) => Promise<boolean>;
|
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -2941,7 +2941,7 @@ var Grid = function (params) {
|
|
|
2941
2941
|
}, [columnDefs === null || columnDefs === void 0 ? void 0 : columnDefs.length, sizeColumnsToFit]);
|
|
2942
2942
|
return (jsxs("div", __assign({ "data-testid": params["data-testid"], className: clsx("Grid-container", "ag-theme-alpine", staleGrid && "Grid-sortIsStale", gridReady && params.rowData && "Grid-ready") }, { children: [params.quickFilter && (jsx("div", __assign({ className: "Grid-quickFilter" }, { children: jsx("input", { "aria-label": "Search", className: "lui-margin-top-xxs lui-margin-bottom-xxs Grid-quickFilterBox", type: "text", placeholder: (_a = params.quickFilterPlaceholder) !== null && _a !== void 0 ? _a : "Search...", value: internalQuickFilter, onChange: function (event) {
|
|
2943
2943
|
setInternalQuickFilter(event.target.value);
|
|
2944
|
-
} }) }))), jsx(AgGridReact, { animateRows: params.animateRows, rowClassRules: params.rowClassRules, defaultColDef: params.defaultColDef, getRowId: function (params) { return "".concat(params.data.id); }, suppressRowClickSelection: true, rowSelection: (_b = params.rowSelection) !== null && _b !== void 0 ? _b : "multiple", suppressBrowserResizeObserver: true, colResizeDefault: "shift", onFirstDataRendered: sizeColumnsToFit, onGridSizeChanged: sizeColumnsToFit, suppressClickEdit: true, onCellKeyPress: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, onCellEditingStopped: onCellEditingStopped, domLayout: params.domLayout, columnDefs: columnDefs, rowData: params.rowData, noRowsOverlayComponent: noRowsOverlayComponent, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: (_c = params.postSortRows) !== null && _c !== void 0 ? _c : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved })] })));
|
|
2944
|
+
} }) }))), jsx(AgGridReact, { animateRows: params.animateRows, rowClassRules: params.rowClassRules, defaultColDef: params.defaultColDef, getRowId: function (params) { return "".concat(params.data.id); }, suppressRowClickSelection: true, rowSelection: (_b = params.rowSelection) !== null && _b !== void 0 ? _b : "multiple", suppressBrowserResizeObserver: true, colResizeDefault: "shift", onFirstDataRendered: sizeColumnsToFit, onGridSizeChanged: sizeColumnsToFit, suppressClickEdit: true, onCellKeyPress: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, onCellEditingStopped: onCellEditingStopped, domLayout: params.domLayout, columnDefs: columnDefs, rowData: params.rowData, noRowsOverlayComponent: noRowsOverlayComponent, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: (_c = params.postSortRows) !== null && _c !== void 0 ? _c : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved, alwaysShowVerticalScroll: params.alwaysShowVerticalScroll })] })));
|
|
2945
2945
|
};
|
|
2946
2946
|
|
|
2947
2947
|
var GridCellMultiSelectClassRules = {
|
|
@@ -24632,6 +24632,17 @@ var editCell = function (rowId, colId, within) { return __awaiter(void 0, void 0
|
|
|
24632
24632
|
}
|
|
24633
24633
|
});
|
|
24634
24634
|
}); };
|
|
24635
|
+
var isCellReadOnly = function (rowId, colId, within) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24636
|
+
var cell;
|
|
24637
|
+
return __generator(this, function (_a) {
|
|
24638
|
+
switch (_a.label) {
|
|
24639
|
+
case 0: return [4 /*yield*/, findCell(rowId, colId, within)];
|
|
24640
|
+
case 1:
|
|
24641
|
+
cell = _a.sent();
|
|
24642
|
+
return [2 /*return*/, cell.className.includes("GridCell-readonly")];
|
|
24643
|
+
}
|
|
24644
|
+
});
|
|
24645
|
+
}); };
|
|
24635
24646
|
var findOpenMenu = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
24636
24647
|
return [2 /*return*/, findQuick({ classes: ".szh-menu--state-open" })];
|
|
24637
24648
|
}); }); };
|
|
@@ -24878,5 +24889,5 @@ var clickActionButton = function (text, container) { return __awaiter(void 0, vo
|
|
|
24878
24889
|
});
|
|
24879
24890
|
}); };
|
|
24880
24891
|
|
|
24881
|
-
export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, convertDDToDMS, countRows, deselectRow, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findParentWithClass, findRow, fnOrVar, getMultiSelectOptions, hasParentClass, isFloat, isNotEmpty, openAndClickMenuOption, queryMenuOption, queryRow, selectCell, selectRow, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$2 as wait };
|
|
24892
|
+
export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, convertDDToDMS, countRows, deselectRow, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findParentWithClass, findRow, fnOrVar, getMultiSelectOptions, hasParentClass, isCellReadOnly, isFloat, isNotEmpty, openAndClickMenuOption, queryMenuOption, queryRow, selectCell, selectRow, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$2 as wait };
|
|
24882
24893
|
//# sourceMappingURL=step-ag-grid.esm.js.map
|