sccoreui 6.4.37 → 6.4.38

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/App.js CHANGED
@@ -5,7 +5,6 @@ require("./App.scss");
5
5
  // import FroalaTextEditor from "./components/froala-editor/FroalaEditor";
6
6
  // import Home from "./pages/home";
7
7
  const App = () => {
8
- // const [selectedCountries, setSelectedCountries] = useState(null);
9
8
  return (0, jsx_runtime_1.jsx)("div", { className: "m-6" });
10
9
  };
11
10
  exports.default = App;
package/dist/App.scss CHANGED
@@ -3187,3 +3187,7 @@ button[aria-expanded="true"] {
3187
3187
  // }
3188
3188
  // }
3189
3189
  // }
3190
+
3191
+ .max-height{
3192
+ height: 340px;
3193
+ }
@@ -15,7 +15,7 @@ const group_checkbox_1 = tslib_1.__importDefault(require("./group-checkbox"));
15
15
  const utilComponents_1 = require("./utilComponents");
16
16
  function ParentForGrid(props) {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- const { gridProps = {}, gridViewTemplate, selectColumns = () => { } } = props;
18
+ const { gridProps = {}, gridViewTemplate, selectColumns = () => { }, enableCheckboxForGroupHeader = false } = props;
19
19
  const [gridData, setGridData] = (0, react_1.useState)({
20
20
  rowData: (props === null || props === void 0 ? void 0 : props.rowData) || [],
21
21
  columnData: (0, helper_1.sortColumns)(props === null || props === void 0 ? void 0 : props.columnData),
@@ -175,23 +175,24 @@ function ParentForGrid(props) {
175
175
  else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
176
176
  const dataSource = {
177
177
  getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
178
- var _w, _x, _y;
178
+ var _w, _x;
179
179
  const startRow = params.request.startRow;
180
180
  const endRow = params.request.endRow;
181
181
  // Scroll should not exit MAX_RECORDS_TO_LOAD
182
- if (endRow > maxLength && maxLength > 0) {
183
- (_w = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current.api) === null || _w === void 0 ? void 0 : _w.hideOverlay();
184
- // supply rows for requested block to grid
185
- params.success({
186
- rowData: gridData.rowData,
187
- rowCount: maxLength,
188
- });
189
- return;
190
- }
182
+ // if (endRow > maxLength && maxLength > 0) {
183
+ // gridRef?.current!.api?.hideOverlay();
184
+ // // supply rows for requested block to grid
185
+ // params.success({
186
+ // rowData: gridData.rowData,
187
+ // rowCount: maxLength,
188
+ // });
189
+ // return;
190
+ // }
191
+ console.log(maxLength);
191
192
  // get data for request from our fake server
192
193
  const response = yield getData(startRow, endRow, currentFeatures, params);
193
194
  // simulating real server call with a 500ms delay
194
- if (((_x = response.rowData) === null || _x === void 0 ? void 0 : _x.length) > 0) {
195
+ if (((_w = response.rowData) === null || _w === void 0 ? void 0 : _w.length) > 0) {
195
196
  setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
196
197
  gridRef.current.api.hideOverlay();
197
198
  // supply rows for requested block to grid
@@ -201,7 +202,7 @@ function ParentForGrid(props) {
201
202
  else {
202
203
  // params.fail();
203
204
  const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
204
- if (!((_y = params === null || params === void 0 ? void 0 : params.parentNode) === null || _y === void 0 ? void 0 : _y.id))
205
+ if (!((_x = params === null || params === void 0 ? void 0 : params.parentNode) === null || _x === void 0 ? void 0 : _x.id))
205
206
  gridRef.current && gridRef.current.api.showNoRowsOverlay();
206
207
  params && params.success({ rowData: gridRows });
207
208
  return;
@@ -228,7 +229,7 @@ function ParentForGrid(props) {
228
229
  }, []);
229
230
  // Render group child conditionally with/without checkbox
230
231
  const manageColumnGrouping = () => {
231
- var _a;
232
+ var _a, _b, _c;
232
233
  // Custom component for specific group header/parent
233
234
  const GroupHeaderRenderer = (params) => {
234
235
  var _a, _b, _c, _d, _e, _f;
@@ -283,7 +284,7 @@ function ParentForGrid(props) {
283
284
  props === null || props === void 0 ? void 0 : props.groupField, // Group field
284
285
  GridHeaderComponent, // Header component
285
286
  headerCheckBoxRenderer, //
286
- props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount, parseInt(props === null || props === void 0 ? void 0 : props.rowGroupColumnWidth), // for grouped column width
287
+ enableCheckboxForGroupHeader, ((_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.displayGroupCount) || false, parseInt(props === null || props === void 0 ? void 0 : props.rowGroupColumnWidth), // for grouped column width
287
288
  cellRendererConditionally, GroupHeaderRenderer // Custom component for group header
288
289
  );
289
290
  }
@@ -293,7 +294,7 @@ function ParentForGrid(props) {
293
294
  props === null || props === void 0 ? void 0 : props.groupField, // Group field
294
295
  GridHeaderComponent, // Header component
295
296
  headerCheckBoxRenderer, //
296
- props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount, parseInt(props === null || props === void 0 ? void 0 : props.rowGroupColumnWidth), // for grouped column width
297
+ enableCheckboxForGroupHeader, ((_c = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _c === void 0 ? void 0 : _c.displayGroupCount) || false, parseInt(props === null || props === void 0 ? void 0 : props.rowGroupColumnWidth), // for grouped column width
297
298
  GroupHeaderRenderer // Custom component for group header
298
299
  );
299
300
  }
@@ -323,21 +324,19 @@ function ParentForGrid(props) {
323
324
  ? { height: (_e = props === null || props === void 0 ? void 0 : props.style) === null || _e === void 0 ? void 0 : _e.height }
324
325
  : null));
325
326
  // Dont show hide overlay component when any row pinned
326
- (0, react_1.useEffect)(() => {
327
- var _a;
328
- if (!(props === null || props === void 0 ? void 0 : props.pinnedTopRowData))
329
- return;
330
- const api = (_a = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _a === void 0 ? void 0 : _a.api;
331
- // Check for pinned rows and regular row data
332
- const hasPinnedRows = (api === null || api === void 0 ? void 0 : api.getPinnedTopRowCount()) > 0 || (api === null || api === void 0 ? void 0 : api.getPinnedBottomRowCount()) > 0;
333
- const hasRowData = (api === null || api === void 0 ? void 0 : api.getDisplayedRowCount()) > 0;
334
- if (hasPinnedRows || hasRowData) {
335
- api === null || api === void 0 ? void 0 : api.hideOverlay(); // Hide the noRowsOverlayComponent if pinned rows or row data exists
336
- }
337
- else {
338
- api === null || api === void 0 ? void 0 : api.showNoRowsOverlay(); // Show the noRowsOverlayComponent only if no rows or pinned rows are present
339
- }
340
- }, [gridData.rowData, props === null || props === void 0 ? void 0 : props.pinnedTopRowData]);
327
+ // useEffect(() => {
328
+ // if (!props?.pinnedTopRowData) return;
329
+ // const api = gridRef?.current?.api;
330
+ // // Check for pinned rows and regular row data
331
+ // const hasPinnedRows =
332
+ // api?.getPinnedTopRowCount() > 0 || api?.getPinnedBottomRowCount() > 0;
333
+ // const hasRowData = api?.getDisplayedRowCount() > 0;
334
+ // if (hasPinnedRows || hasRowData) {
335
+ // api?.hideOverlay(); // Hide the noRowsOverlayComponent if pinned rows or row data exists
336
+ // } else {
337
+ // api?.showNoRowsOverlay(); // Show the noRowsOverlayComponent only if no rows or pinned rows are present
338
+ // }
339
+ // }, [gridData.rowData, props?.pinnedTopRowData]);
341
340
  const popupParent = (0, react_1.useMemo)(() => {
342
341
  return document.getElementById("wrapper");
343
342
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.4.37",
3
+ "version": "6.4.38",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",