@linzjs/step-ag-grid 7.16.2 → 7.16.4
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/step-ag-grid.esm.js
CHANGED
|
@@ -2827,8 +2827,11 @@ var Grid = function (params) {
|
|
|
2827
2827
|
}, [synchroniseExternallySelectedItemsToGrid]);
|
|
2828
2828
|
var columnDefs = useMemo(function () {
|
|
2829
2829
|
var adjustColDefs = params.columnDefs.map(function (colDef) {
|
|
2830
|
-
|
|
2831
|
-
|
|
2830
|
+
var _a, _b;
|
|
2831
|
+
return __assign(__assign({}, colDef), { editable: params.readOnly ? false : (_b = (_a = params.defaultColDef) === null || _a === void 0 ? void 0 : _a.editable) !== null && _b !== void 0 ? _b : colDef.editable, cellClassRules: __assign(__assign({}, colDef.cellClassRules), { "GridCell-readonly": function (ccp) {
|
|
2832
|
+
var _a, _b;
|
|
2833
|
+
return (params.readOnly != null || !params.readOnly) &&
|
|
2834
|
+
!fnOrVar((_b = (_a = params.defaultColDef) === null || _a === void 0 ? void 0 : _a.editable) !== null && _b !== void 0 ? _b : colDef.editable, ccp);
|
|
2832
2835
|
} }) });
|
|
2833
2836
|
});
|
|
2834
2837
|
return params.selectable
|
|
@@ -2858,7 +2861,13 @@ var Grid = function (params) {
|
|
|
2858
2861
|
onCellClicked: clickSelectorCheckboxWhenContainingCellClicked
|
|
2859
2862
|
}
|
|
2860
2863
|
], adjustColDefs, true) : adjustColDefs;
|
|
2861
|
-
}, [
|
|
2864
|
+
}, [
|
|
2865
|
+
clickSelectorCheckboxWhenContainingCellClicked,
|
|
2866
|
+
params.columnDefs,
|
|
2867
|
+
params.selectable,
|
|
2868
|
+
params.readOnly,
|
|
2869
|
+
params.defaultColDef,
|
|
2870
|
+
]);
|
|
2862
2871
|
var onGridReady = useCallback(function (event) {
|
|
2863
2872
|
setGridApi(event.api);
|
|
2864
2873
|
synchroniseExternallySelectedItemsToGrid();
|
|
@@ -24779,40 +24788,61 @@ var typeInput = function (value, filter) { return __awaiter(void 0, void 0, void
|
|
|
24779
24788
|
}); };
|
|
24780
24789
|
var typeOnlyInput = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24781
24790
|
return __generator(this, function (_a) {
|
|
24782
|
-
|
|
24783
|
-
|
|
24791
|
+
switch (_a.label) {
|
|
24792
|
+
case 0: return [4 /*yield*/, typeInput(value, { child: { tagName: "input[type='text']" } })];
|
|
24793
|
+
case 1:
|
|
24794
|
+
_a.sent();
|
|
24795
|
+
return [2 /*return*/];
|
|
24796
|
+
}
|
|
24784
24797
|
});
|
|
24785
24798
|
}); };
|
|
24786
24799
|
var typeInputByLabel = function (value, labelText) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24787
24800
|
var labels;
|
|
24788
24801
|
return __generator(this, function (_a) {
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
|
-
|
|
24792
|
-
|
|
24793
|
-
|
|
24794
|
-
|
|
24802
|
+
switch (_a.label) {
|
|
24803
|
+
case 0:
|
|
24804
|
+
labels = getAllQuick({ child: { tagName: "label" } }).filter(function (l) { return l.textContent == labelText; });
|
|
24805
|
+
if (labels.length == 0) {
|
|
24806
|
+
throw Error("Label not found for text: ".concat(labelText));
|
|
24807
|
+
}
|
|
24808
|
+
if (labels.length > 1) {
|
|
24809
|
+
throw Error("Multiple labels found for text: ".concat(labelText));
|
|
24810
|
+
}
|
|
24811
|
+
return [4 /*yield*/, typeInput(value, { child: { tagName: "input[id='".concat(labels[0].getAttribute("for"), "']") } })];
|
|
24812
|
+
case 1:
|
|
24813
|
+
_a.sent();
|
|
24814
|
+
return [2 /*return*/];
|
|
24795
24815
|
}
|
|
24796
|
-
typeInput(value, { child: { tagName: "input[id='".concat(labels[0].getAttribute("for"), "']") } });
|
|
24797
|
-
return [2 /*return*/];
|
|
24798
24816
|
});
|
|
24799
24817
|
}); };
|
|
24800
24818
|
var typeInputByPlaceholder = function (value, placeholder) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24801
24819
|
return __generator(this, function (_a) {
|
|
24802
|
-
|
|
24803
|
-
|
|
24820
|
+
switch (_a.label) {
|
|
24821
|
+
case 0: return [4 /*yield*/, typeInput(value, { child: { tagName: "input[placeholder='".concat(placeholder, "']") } })];
|
|
24822
|
+
case 1:
|
|
24823
|
+
_a.sent();
|
|
24824
|
+
return [2 /*return*/];
|
|
24825
|
+
}
|
|
24804
24826
|
});
|
|
24805
24827
|
}); };
|
|
24806
24828
|
var typeOtherInput = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24807
24829
|
return __generator(this, function (_a) {
|
|
24808
|
-
|
|
24809
|
-
|
|
24830
|
+
switch (_a.label) {
|
|
24831
|
+
case 0: return [4 /*yield*/, typeInput(value, { classes: ".subComponent", child: { tagName: "input[type='text']" } })];
|
|
24832
|
+
case 1:
|
|
24833
|
+
_a.sent();
|
|
24834
|
+
return [2 /*return*/];
|
|
24835
|
+
}
|
|
24810
24836
|
});
|
|
24811
24837
|
}); };
|
|
24812
24838
|
var typeOtherTextArea = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
24813
24839
|
return __generator(this, function (_a) {
|
|
24814
|
-
|
|
24815
|
-
|
|
24840
|
+
switch (_a.label) {
|
|
24841
|
+
case 0: return [4 /*yield*/, typeInput(value, { classes: ".subComponent", child: { tagName: "textarea" } })];
|
|
24842
|
+
case 1:
|
|
24843
|
+
_a.sent();
|
|
24844
|
+
return [2 /*return*/];
|
|
24845
|
+
}
|
|
24816
24846
|
});
|
|
24817
24847
|
}); };
|
|
24818
24848
|
var closeMenu = function () {
|