ods-component-lib 1.18.54 → 1.18.56

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.
@@ -1,6 +1,6 @@
1
1
  import { ModalProps } from "antd";
2
2
  import React from "react";
3
- interface ICustomModalProps extends ModalProps {
3
+ export interface ICustomModalProps extends ModalProps {
4
4
  content: React.ReactNode;
5
5
  }
6
6
  declare const OdsAdvanceModal: React.FC<ICustomModalProps>;
package/dist/index.js CHANGED
@@ -16296,7 +16296,10 @@ var iconComponents = {
16296
16296
  copy: outline.CopyIcon,
16297
16297
  discount: outline.DiscountIcon,
16298
16298
  kebabMenu: outline.KebabMenuIcon,
16299
- refresh: outline.RefreshIcon
16299
+ refresh: outline.RefreshIcon,
16300
+ unmap: outline.LinkBreakIcon,
16301
+ save: outline.FloppyDiskIcon,
16302
+ cancel: outline.Loop1Icon
16300
16303
  };
16301
16304
  var DynamicIcon = function DynamicIcon(_ref) {
16302
16305
  var iconName = _ref.iconName;
@@ -16326,6 +16329,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16326
16329
  var columns = React.useRef(props.columns);
16327
16330
  var gridRef = React.useRef(null);
16328
16331
  var filterApplied = React.useRef(false);
16332
+ var _useState3 = React.useState(false),
16333
+ loading = _useState3[0],
16334
+ setLoading = _useState3[1];
16329
16335
  var onCancelEditEvent = new CustomEvent('cancelEdit', {
16330
16336
  bubbles: true,
16331
16337
  detail: {
@@ -16426,6 +16432,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16426
16432
  };
16427
16433
  var _temp = _finallyRethrows(function () {
16428
16434
  return _catch(function () {
16435
+ setLoading(true);
16429
16436
  return Promise.resolve(fetch(apiUrl, requestOptions)).then(function (response) {
16430
16437
  return Promise.resolve(response.json()).then(function (newData) {
16431
16438
  if (loadedPageCount == 1) {
@@ -16439,10 +16446,12 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16439
16446
  }
16440
16447
  totalPageCount = newData.PageCount;
16441
16448
  totalRecordCount = newData.RowCount;
16449
+ setLoading(false);
16442
16450
  });
16443
16451
  });
16444
16452
  }, function (error) {
16445
16453
  console.error('Error fetching data:', error);
16454
+ setLoading(false);
16446
16455
  });
16447
16456
  }, function (_wasThrown, _result) {
16448
16457
  if (_wasThrown) throw _result;
@@ -16706,6 +16715,19 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16706
16715
  text: 'Passive',
16707
16716
  value: false
16708
16717
  }]
16718
+ }), col.useDynamicHeaderFilter && React__default.createElement(DataGrid.HeaderFilter, {
16719
+ allowSearch: true,
16720
+ dataSource: [{
16721
+ text: '(Blanks)',
16722
+ value: null
16723
+ }].concat(data.filter(function (item) {
16724
+ return item[col.dataField] !== null && item[col.dataField] !== undefined && item[col.dataField] !== '';
16725
+ }).map(function (item) {
16726
+ return {
16727
+ text: item[col.dataField].toString(),
16728
+ value: item[col.dataField]
16729
+ };
16730
+ }))
16709
16731
  }), col.multiLevelColumns && col.multiLevelColumns.map(function (multiLevelColItem) {
16710
16732
  return React__default.createElement(DataGrid.Column, {
16711
16733
  dataField: multiLevelColItem.dataField,
@@ -16732,9 +16754,17 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16732
16754
  onClick: buttonItem.onClick
16733
16755
  });
16734
16756
  }), props.edit && actionButtons.map(function (buttonItem, index) {
16735
- return React__default.createElement(DataGrid.Button, Object.assign({
16736
- key: "action-button-" + index
16737
- }, buttonItem));
16757
+ return React__default.createElement(DataGrid.Button, {
16758
+ key: "action-button-" + index,
16759
+ name: buttonItem.name,
16760
+ hint: buttonItem.hint,
16761
+ visible: buttonItem.visible,
16762
+ disabled: buttonItem.actionPermission == undefined ? false : !buttonItem.actionPermission,
16763
+ icon: server_browser.renderToString(React__default.createElement(DynamicIcon, {
16764
+ iconName: buttonItem.icon
16765
+ })),
16766
+ onClick: buttonItem.onClick
16767
+ });
16738
16768
  })), kebabMenuButtons.length > 0 && React__default.createElement(DataGrid.Column, {
16739
16769
  dataField: "Actionss",
16740
16770
  fixed: true,
@@ -16780,7 +16810,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16780
16810
  scrollByContent: true,
16781
16811
  scrollByThumb: true,
16782
16812
  mode: "infinite"
16783
- }), React__default.createElement(DataGrid.LoadPanel, {
16813
+ }), loading && React__default.createElement(DataGrid.LoadPanel, {
16784
16814
  enabled: true,
16785
16815
  shadingColor: "rgba(0,0,0,0.4)"
16786
16816
  }), React__default.createElement(DataGrid.SearchPanel, {