ods-component-lib 1.18.99 → 1.18.101

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.
Files changed (27) hide show
  1. package/dist/components/antd/fileUpload/OdsFileUpload.d.ts +1 -2
  2. package/dist/components/antd/form/OdsBasicForm.d.ts +18 -0
  3. package/dist/components/antd/icon/OdsIcon.d.ts +10 -0
  4. package/dist/components/antd/modal/OdsAdvanceModal.d.ts +7 -0
  5. package/dist/components/antd/select/OdsCustomMultiSelect.d.ts +7 -0
  6. package/dist/components/antd/select/OdsMultiSelect.d.ts +9 -0
  7. package/dist/components/custom/OdsLogin.d.ts +8 -0
  8. package/dist/components/devextreme/DxDataPopupForm.d.ts +3 -0
  9. package/dist/components/devextreme/DynamicIcon.d.ts +5 -0
  10. package/dist/components/devextreme/OdsDataGridNew.d.ts +56 -0
  11. package/dist/components/devextreme/OdsProfDataGrid.d.ts +3 -0
  12. package/dist/components/devextreme/OdsRemoteDataGrid/OdsRemoteDataGrid.Functions.d.ts +2 -2
  13. package/dist/components/devextreme/treeview/DxTreeView.d.ts +3 -0
  14. package/dist/index.js +57 -40
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.modern.js +57 -40
  17. package/dist/index.modern.js.map +1 -1
  18. package/dist/stories/OdsAdvanceModal/OdsAdvanceModal.stories.d.ts +42 -0
  19. package/dist/stories/OdsAdvanceModal/Samples/BasicOdsAdvanceModal.sample.d.ts +8 -0
  20. package/dist/stories/OdsCustomMultiSelect/OdsCustomMultiSelect.stories.d.ts +9 -0
  21. package/dist/stories/OdsCustomMultiSelect/Samples/Basic.Sample.d.ts +1 -0
  22. package/dist/stories/OdsCustomMultiSelect/Samples/ModeMultiple.Sample.d.ts +1 -0
  23. package/dist/stories/OdsFileUpload/OdsFileUpload.stories.d.ts +2 -13
  24. package/dist/stories/OdsModal/Samples/OdsModal.Sample.d.ts +1 -0
  25. package/dist/stories/OdsTimePicker/Samples/TimeRangePicker.d.ts +2 -0
  26. package/dist/utils/DynamicIcon.d.ts +5 -0
  27. package/package.json +1 -1
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
2
  declare type FileUploadProps = {
3
3
  image: any | null;
4
- setFile?: (file: any) => void;
5
4
  title: string;
6
5
  sendDataToParent: (obj: any) => void;
7
6
  allowDocumentUpload?: boolean;
8
7
  multipleDoc?: boolean;
9
8
  removeFile?: (file: any) => void;
10
9
  };
11
- declare const OdsFileUpload: (props: FileUploadProps) => React.JSX.Element;
10
+ declare function OdsFileUpload(props: FileUploadProps): React.JSX.Element;
12
11
  export default OdsFileUpload;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { FormProps, ButtonProps } from 'antd';
3
+ export interface IFormItemRuleProps {
4
+ required?: boolean;
5
+ message?: string;
6
+ }
7
+ export interface IFormItemProps {
8
+ label?: string;
9
+ name?: string;
10
+ formItemType: string;
11
+ rules?: IFormItemRuleProps[];
12
+ }
13
+ export interface IFormProps extends FormProps {
14
+ formItems: IFormItemProps[];
15
+ formButtons: ButtonProps[];
16
+ }
17
+ declare function OdsBasicForm(props: IFormProps): React.JSX.Element;
18
+ export default OdsBasicForm;
@@ -0,0 +1,10 @@
1
+ import { IconBaseProps } from "@ant-design/icons/lib/components/Icon";
2
+ import React from "react";
3
+ export interface IconProps extends IconBaseProps {
4
+ type: string;
5
+ twoToneColor?: string;
6
+ iconComponent?: string;
7
+ iconSVCName?: string;
8
+ }
9
+ declare function OdsIcon(props: IconProps): React.JSX.Element;
10
+ export default OdsIcon;
@@ -0,0 +1,7 @@
1
+ import { ModalProps } from "antd";
2
+ import React from "react";
3
+ export interface ICustomModalProps extends ModalProps {
4
+ content: React.ReactNode;
5
+ }
6
+ declare const OdsAdvanceModal: React.FC<ICustomModalProps>;
7
+ export default OdsAdvanceModal;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { SelectProps } from "antd";
3
+ export interface ISelectProps extends SelectProps {
4
+ buttonLabel: string;
5
+ }
6
+ declare function OdsCustomMultiSelect(props: ISelectProps): React.JSX.Element;
7
+ export default OdsCustomMultiSelect;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { SelectProps } from "antd";
3
+ import { IOdsSelectOption } from "./OdsSelect.styled";
4
+ export interface OdsMultiSelectProps extends SelectProps {
5
+ selectAllText?: string | undefined;
6
+ dataSource: IOdsSelectOption[];
7
+ }
8
+ declare const OdsMultiSelect: (props: OdsMultiSelectProps) => React.JSX.Element;
9
+ export default OdsMultiSelect;
@@ -0,0 +1,8 @@
1
+ import { FormProps } from "antd";
2
+ import React from "react";
3
+ export interface IFormProps extends FormProps {
4
+ items: any[];
5
+ loading: boolean;
6
+ }
7
+ declare function OdsLogin(props: IFormProps): React.JSX.Element;
8
+ export default OdsLogin;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<(props: any) => React.JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const DynamicIcon: ({ iconName }: {
3
+ iconName: any;
4
+ }) => React.JSX.Element;
5
+ export default DynamicIcon;
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+ import { IDataGridOptions, IEditingProps, ISelectionProps, IButtonProps } from 'devextreme-react/data-grid';
3
+ import { ButtonType } from "antd/es/button/buttonHelpers";
4
+ interface IButtonGroup extends IButtonProps {
5
+ type?: ButtonType;
6
+ label?: string;
7
+ onclick?: React.MouseEventHandler<HTMLElement>;
8
+ actionPermission?: boolean;
9
+ }
10
+ interface IEditingoptions extends IEditingProps {
11
+ formItems?: any[];
12
+ title?: string;
13
+ }
14
+ interface ISelectOptions extends ISelectionProps {
15
+ selectEnable: boolean;
16
+ }
17
+ interface IOdsDataGridProps extends IDataGridOptions {
18
+ actionButtonGroup?: IButtonGroup[];
19
+ toolbarButtonGroup?: IButtonGroup[];
20
+ exportFileName?: string;
21
+ summaryTotalColumnName?: string;
22
+ storeState?: boolean;
23
+ summaryTotalDataCount?: number;
24
+ summaryTotalDataDisplayLabel?: string;
25
+ summaryTotalPagesize?: number;
26
+ editHintLabel?: string;
27
+ editButtonClick?: any;
28
+ deleteButtonClick?: any;
29
+ pageTitle?: string;
30
+ pageSize?: number;
31
+ pagingEnable?: boolean;
32
+ searchEnable?: boolean;
33
+ filterEnable?: boolean;
34
+ headerFilterEnable?: boolean;
35
+ columnChooserPositionDisabled?: boolean;
36
+ editEnable?: boolean;
37
+ popupTitle?: string;
38
+ scroll?: any;
39
+ exportEnable?: boolean;
40
+ customPopup?: boolean;
41
+ onExportingCustom?: any;
42
+ filterEnabledShow?: boolean;
43
+ scrolUseNative?: boolean;
44
+ formItems?: any[];
45
+ hintForDeleteButton?: string;
46
+ hintForEditButton?: string;
47
+ exportFormats?: string[];
48
+ actionPermission?: boolean;
49
+ columns: any[];
50
+ actionColumnEnable?: boolean;
51
+ edit?: IEditingoptions;
52
+ selectOptions?: ISelectOptions;
53
+ actionColumnCaption?: string;
54
+ }
55
+ declare function OdsDataGridNew(props: IOdsDataGridProps): React.JSX.Element;
56
+ export default OdsDataGridNew;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare function OdsProfDataGrid(props: any): React.JSX.Element;
3
+ export default OdsProfDataGrid;
@@ -6,6 +6,6 @@ export declare const addNewFieldForFastUpdate: (data: any[]) => any[];
6
6
  export declare const getRequestHeaders: (props: any) => Headers;
7
7
  export declare const concatFilteredLabel: (result: string, totalloaded: number, filteredRowCount: number, filterApplied: boolean, props: any) => string;
8
8
  export declare const showSummaryItems: (props: IOdsDataGridProps) => boolean;
9
- export declare const getSummaryItems: (props: IOdsDataGridProps, columns: any[], grid: any) => ReactElement[];
10
- export declare const getSummaryItem: (col: any, visibleIndex: number, summaryType: SummaryTypes, label?: string) => ReactElement;
9
+ export declare const getSummaryItems: (props: IOdsDataGridProps, columns: any[], grid: any, isMultiLevelColumn?: boolean) => ReactElement[];
10
+ export declare const getSummaryItem: (col: any, visibleIndex: number, summaryType: SummaryTypes, isMultiLevelColumn: boolean, label?: string) => ReactElement;
11
11
  export declare const getMultiLevelColumns: (col: any) => any;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const DxTreeView: (props: any) => React.JSX.Element;
3
+ export default DxTreeView;
package/dist/index.js CHANGED
@@ -33477,21 +33477,32 @@ var showSummaryItems = function showSummaryItems(props) {
33477
33477
  var _props$customSummary, _props$customSummary2, _props$customSummary3, _props$customSummary4, _props$customSummary5;
33478
33478
  return ((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.showAvgInSummary) || ((_props$customSummary2 = props.customSummary) === null || _props$customSummary2 === void 0 ? void 0 : _props$customSummary2.showCountInSummary) || ((_props$customSummary3 = props.customSummary) === null || _props$customSummary3 === void 0 ? void 0 : _props$customSummary3.showMaxInSummary) || ((_props$customSummary4 = props.customSummary) === null || _props$customSummary4 === void 0 ? void 0 : _props$customSummary4.showMinInSummary) || ((_props$customSummary5 = props.customSummary) === null || _props$customSummary5 === void 0 ? void 0 : _props$customSummary5.showSumInSummary);
33479
33479
  };
33480
- var getSummaryItems = function getSummaryItems(props, columns, grid) {
33480
+ var getSummaryItems = function getSummaryItems(props, columns, grid, isMultiLevelColumn) {
33481
+ if (isMultiLevelColumn === void 0) {
33482
+ isMultiLevelColumn = false;
33483
+ }
33481
33484
  var totalItems = [];
33482
33485
  columns.map(function (col, _index) {
33483
- var _props$customSummary6, _props$customSummary7, _props$customSummary8, _props$customSummary9, _props$customSummary10, _props$customSummary11, _props$customSummary12, _props$customSummary13, _props$customSummary14, _props$customSummary15;
33484
- var colOption = grid.columnOption(col.dataField);
33485
- ((_props$customSummary6 = props.customSummary) === null || _props$customSummary6 === void 0 ? void 0 : _props$customSummary6.showAvgInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "avg", (_props$customSummary7 = props.customSummary) === null || _props$customSummary7 === void 0 ? void 0 : _props$customSummary7.summaryAvgLabel));
33486
- ((_props$customSummary8 = props.customSummary) === null || _props$customSummary8 === void 0 ? void 0 : _props$customSummary8.showCountInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "count", (_props$customSummary9 = props.customSummary) === null || _props$customSummary9 === void 0 ? void 0 : _props$customSummary9.summaryCountLabel));
33487
- ((_props$customSummary10 = props.customSummary) === null || _props$customSummary10 === void 0 ? void 0 : _props$customSummary10.showMaxInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "max", (_props$customSummary11 = props.customSummary) === null || _props$customSummary11 === void 0 ? void 0 : _props$customSummary11.summaryMaxLabel));
33488
- ((_props$customSummary12 = props.customSummary) === null || _props$customSummary12 === void 0 ? void 0 : _props$customSummary12.showMinInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "min", (_props$customSummary13 = props.customSummary) === null || _props$customSummary13 === void 0 ? void 0 : _props$customSummary13.summaryMinLabel));
33489
- ((_props$customSummary14 = props.customSummary) === null || _props$customSummary14 === void 0 ? void 0 : _props$customSummary14.showSumInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "sum", (_props$customSummary15 = props.customSummary) === null || _props$customSummary15 === void 0 ? void 0 : _props$customSummary15.summarySumLabel));
33486
+ if (col.multiLevelColumns && col.multiLevelColumns.length > 0) {
33487
+ totalItems = [].concat(totalItems, getSummaryItems(props, col.multiLevelColumns, grid, true));
33488
+ } else {
33489
+ var _props$customSummary6, _props$customSummary7, _props$customSummary8, _props$customSummary9, _props$customSummary10, _props$customSummary11, _props$customSummary12, _props$customSummary13, _props$customSummary14, _props$customSummary15;
33490
+ var colOption = grid.columnOption(col.dataField);
33491
+ if (!colOption) {
33492
+ return col;
33493
+ }
33494
+ ((_props$customSummary6 = props.customSummary) === null || _props$customSummary6 === void 0 ? void 0 : _props$customSummary6.showAvgInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "avg", isMultiLevelColumn, (_props$customSummary7 = props.customSummary) === null || _props$customSummary7 === void 0 ? void 0 : _props$customSummary7.summaryAvgLabel));
33495
+ ((_props$customSummary8 = props.customSummary) === null || _props$customSummary8 === void 0 ? void 0 : _props$customSummary8.showCountInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "count", isMultiLevelColumn, (_props$customSummary9 = props.customSummary) === null || _props$customSummary9 === void 0 ? void 0 : _props$customSummary9.summaryCountLabel));
33496
+ ((_props$customSummary10 = props.customSummary) === null || _props$customSummary10 === void 0 ? void 0 : _props$customSummary10.showMaxInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "max", isMultiLevelColumn, (_props$customSummary11 = props.customSummary) === null || _props$customSummary11 === void 0 ? void 0 : _props$customSummary11.summaryMaxLabel));
33497
+ ((_props$customSummary12 = props.customSummary) === null || _props$customSummary12 === void 0 ? void 0 : _props$customSummary12.showMinInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "min", isMultiLevelColumn, (_props$customSummary13 = props.customSummary) === null || _props$customSummary13 === void 0 ? void 0 : _props$customSummary13.summaryMinLabel));
33498
+ ((_props$customSummary14 = props.customSummary) === null || _props$customSummary14 === void 0 ? void 0 : _props$customSummary14.showSumInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "sum", isMultiLevelColumn, (_props$customSummary15 = props.customSummary) === null || _props$customSummary15 === void 0 ? void 0 : _props$customSummary15.summarySumLabel));
33499
+ }
33500
+ return col;
33490
33501
  });
33491
33502
  return totalItems;
33492
33503
  };
33493
- var getSummaryItem = function getSummaryItem(col, visibleIndex, summaryType, label) {
33494
- if (visibleIndex == 0) {
33504
+ var getSummaryItem = function getSummaryItem(col, visibleIndex, summaryType, isMultiLevelColumn, label) {
33505
+ if (!isMultiLevelColumn && visibleIndex == 0) {
33495
33506
  return React__default.createElement(DataGrid.TotalItem, {
33496
33507
  column: col.dataField,
33497
33508
  summaryType: "custom",
@@ -33560,39 +33571,42 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
33560
33571
  var filterApplied = React.useRef(false);
33561
33572
  var pkName = keyExpr && keyExpr.toString();
33562
33573
  var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
33563
- var _useState = React.useState(props.columns),
33564
- gridColumns = _useState[0],
33565
- setGridColumns = _useState[1];
33566
- var _useState2 = React.useState(false),
33567
- loading = _useState2[0],
33568
- setLoading = _useState2[1];
33569
- var _useState3 = React.useState([]),
33570
- data = _useState3[0],
33571
- setData = _useState3[1];
33572
- var _useState4 = React.useState(0),
33573
- filteredRowCount = _useState4[0],
33574
- setFilteredRowCount = _useState4[1];
33575
- var _useState5 = React.useState(false),
33576
- isFastUpdateModalOpen = _useState5[0],
33577
- setIsFastUpdateModalOpen = _useState5[1];
33578
- var _useState6 = React.useState([]),
33579
- selectedCells = _useState6[0],
33580
- setSelectedCells = _useState6[1];
33574
+ var _useState = React.useState(false),
33575
+ render = _useState[0],
33576
+ rerender = _useState[1];
33577
+ var _useState2 = React.useState(props.columns),
33578
+ gridColumns = _useState2[0],
33579
+ setGridColumns = _useState2[1];
33580
+ var _useState3 = React.useState(false),
33581
+ loading = _useState3[0],
33582
+ setLoading = _useState3[1];
33583
+ var _useState4 = React.useState([]),
33584
+ data = _useState4[0],
33585
+ setData = _useState4[1];
33586
+ var _useState5 = React.useState(0),
33587
+ filteredRowCount = _useState5[0],
33588
+ setFilteredRowCount = _useState5[1];
33589
+ var _useState6 = React.useState(false),
33590
+ isFastUpdateModalOpen = _useState6[0],
33591
+ setIsFastUpdateModalOpen = _useState6[1];
33581
33592
  var _useState7 = React.useState([]),
33582
- hoveredCells = _useState7[0],
33583
- setHoveredCells = _useState7[1];
33593
+ selectedCells = _useState7[0],
33594
+ setSelectedCells = _useState7[1];
33584
33595
  var _useState8 = React.useState([]),
33585
- ctrlSelectedCells = _useState8[0],
33586
- setCtrlSelectedCells = _useState8[1];
33587
- var _useState9 = React.useState(false),
33588
- ctrlSelection = _useState9[0],
33589
- setCtrlSelection = _useState9[1];
33596
+ hoveredCells = _useState8[0],
33597
+ setHoveredCells = _useState8[1];
33598
+ var _useState9 = React.useState([]),
33599
+ ctrlSelectedCells = _useState9[0],
33600
+ setCtrlSelectedCells = _useState9[1];
33590
33601
  var _useState10 = React.useState(false),
33591
- contentReady = _useState10[0],
33592
- setContentReady = _useState10[1];
33593
- var _useState11 = React.useState(0),
33594
- scrollPosition = _useState11[0],
33595
- setScrollPosition = _useState11[1];
33602
+ ctrlSelection = _useState10[0],
33603
+ setCtrlSelection = _useState10[1];
33604
+ var _useState11 = React.useState(false),
33605
+ contentReady = _useState11[0],
33606
+ setContentReady = _useState11[1];
33607
+ var _useState12 = React.useState(0),
33608
+ scrollPosition = _useState12[0],
33609
+ setScrollPosition = _useState12[1];
33596
33610
  React.useEffect(function () {
33597
33611
  constants.totalPageCount = 1;
33598
33612
  constants.loadedPageCount = 1;
@@ -33629,6 +33643,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
33629
33643
  setGridColumns(newColumns);
33630
33644
  }
33631
33645
  }, [props.columns]);
33646
+ React.useEffect(function () {
33647
+ rerender(!render);
33648
+ }, [gridColumns]);
33632
33649
  React.useEffect(function () {
33633
33650
  if (Array.isArray(props.dataSource)) {
33634
33651
  setData(props.dataSource);