ods-component-lib 1.18.196 → 1.18.198

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 (31) hide show
  1. package/dist/App.d.ts +3 -0
  2. package/dist/components/antd/modal/OdsAdvanceModal.d.ts +7 -0
  3. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/ContentHandlers.d.ts +14 -0
  4. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/EditorPreparedHandlers.d.ts +7 -0
  5. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OnExportingHandlers.d.ts +19 -0
  6. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OptionHandlers.d.ts +7 -0
  7. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/SummaryHandlers.d.ts +21 -0
  8. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/ActionCellRender.d.ts +15 -0
  9. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/EditingPartial.d.ts +9 -0
  10. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/PageTitle.d.ts +8 -0
  11. package/dist/components/devextreme/OdsInlineEditDataGrid/utils.d.ts +19 -0
  12. package/dist/components/devextreme/OdsTimeline/OdsTimeline.Constants.d.ts +4 -0
  13. package/dist/components/devextreme/OdsTimeline/OdsTimeline.Functions.d.ts +6 -0
  14. package/dist/components/devextreme/OdsTimeline/OdsTimeline.Types.d.ts +77 -0
  15. package/dist/components/devextreme/OdsTimeline/OdsTimeline.d.ts +5 -0
  16. package/dist/components/devextreme/OdsTimeline/OdsTimelineDateFilter.d.ts +3 -0
  17. package/dist/components/devextreme/OdsTimeline/OdsTimelineSelectionColumn.d.ts +2 -0
  18. package/dist/index.js +16 -5
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.modern.js +17 -6
  21. package/dist/index.modern.js.map +1 -1
  22. package/dist/index.umd.js +2 -0
  23. package/dist/index.umd.js.map +1 -0
  24. package/dist/stories/OdsAdvanceModal/OdsAdvanceModal.stories.d.ts +42 -0
  25. package/dist/stories/OdsAdvanceModal/Samples/BasicOdsAdvanceModal.sample.d.ts +8 -0
  26. package/dist/stories/OdsModal/Samples/OdsModal.Sample.d.ts +1 -0
  27. package/dist/stories/OdsTimePicker/Samples/TimeRangePicker.d.ts +2 -0
  28. package/dist/stories/OdsTimeline/OdsTimeline.Constants.d.ts +3 -0
  29. package/dist/stories/OdsTimeline/OdsTimeline.Functions.d.ts +6 -0
  30. package/dist/stories/OdsTimeline/OdsTimeline.MockData.d.ts +39 -0
  31. package/package.json +1 -1
package/dist/App.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const App: React.FC;
3
+ export default App;
@@ -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,14 @@
1
+ import { ContentReadyEvent } from "devextreme/ui/data_grid";
2
+ import { IColumnConfig } from "../types";
3
+ /**
4
+ * Custom hook to handle content ready events for the data grid.
5
+ * @param {React.MutableRefObject<any>} lastPageIndexRef - Reference to the last page index.
6
+ * @param {boolean} contentReady - Boolean indicating if the content is ready.
7
+ * @param {Function} setRowCount - Function to set the row count state
8
+ * @param {Function} setContentReady - Function to set the content ready state.
9
+ * @param {Function} setCurrentPage - Function to set the current page state.
10
+ * @param {Function} setCurrentPageSize - Function to set the current page size state.
11
+ * @param {Function} [callback] - Optional callback function.
12
+ * @returns {(e: ContentReadyEvent<any, any>) => void} handleContentReady - Handler for content ready event.
13
+ */
14
+ export declare const useContentHandlers: (lastPageIndexRef: React.MutableRefObject<any>, contentReady: boolean, columns: IColumnConfig[], setRowCount: Function, setContentReady: Function, setCurrentPage: Function, setCurrentPageSize: Function, setHeaderFilterData: Function, callback?: Function) => (e: ContentReadyEvent<any, any>) => void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Custom hook that returns a callback function to handle the "editorPrepared" event of a DevExtreme component.
3
+ * This callback function is responsible for customizing the editor's behavior based on specific conditions.
4
+ *
5
+ * @returns {Function} The callback function to handle the "editorPrepared" event.
6
+ */
7
+ export declare const useEditorPreparedHandlers: () => (e: any) => void;
@@ -0,0 +1,19 @@
1
+ interface IOnExportingProps {
2
+ gridComponent: any;
3
+ baseFileName?: string;
4
+ selectedText?: string;
5
+ getSummary: () => string;
6
+ selectedRowsOnly: boolean;
7
+ }
8
+ /**
9
+ * Handles the exporting of data from the grid component.
10
+ *
11
+ * @param {IOnExportingProps} params - The parameters for exporting the data.
12
+ * @param {React.RefObject<Grid>} params.gridComponent - The reference to the grid component.
13
+ * @param {string} params.baseFileName - The base file name for the exported file.
14
+ * @param {string} params.selectedText - The text to be displayed for selected rows.
15
+ * @param {Function} params.getSummary - The function to get the summary of the exported data.
16
+ * @param {boolean} params.selectedRowsOnly - Indicates whether to export only selected rows.
17
+ */
18
+ export declare const onExporting: ({ gridComponent, baseFileName, selectedText, getSummary, selectedRowsOnly, }: IOnExportingProps) => void;
19
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Custom hook to handle option change events for the data grid.
3
+ * @param {Object} dataGridRef - The dataGridRef property passed to the hook.
4
+ * @param {Function} setFilterApplied - Function to set the filter applied state.
5
+ * @returns {Function} - Handler function for option changed event.
6
+ */
7
+ export declare const useOptionHandlers: (dataGridRef: any, setFilterApplied: any) => (e: any) => void;
@@ -0,0 +1,21 @@
1
+ import type { ISummaryRowOptions } from "../types";
2
+ interface IUseSummaryHandlersProps {
3
+ customSummary?: ISummaryRowOptions;
4
+ totalRecordCount: number;
5
+ currentPageSize: number;
6
+ currentPage: number;
7
+ filterApplied: boolean;
8
+ rowCount: number;
9
+ filteredRowCount: number;
10
+ isServerSide?: boolean;
11
+ }
12
+ /**
13
+ * Custom hook that provides summary handlers for a data grid.
14
+ *
15
+ * @param {IUseSummaryHandlersProps} props - The props object containing necessary parameters.
16
+ * @returns {Object} - An object containing the renderTotal function.
17
+ */
18
+ export declare const useSummaryHandlers: ({ customSummary, totalRecordCount, currentPageSize, currentPage, filterApplied, rowCount, filteredRowCount, }: IUseSummaryHandlersProps) => {
19
+ renderTotal: () => string | null;
20
+ };
21
+ export {};
@@ -0,0 +1,15 @@
1
+ import { FC } from "react";
2
+ import { IVirtualDataGridProps } from "../types";
3
+ interface ActionCellRenderProps {
4
+ cellData: any;
5
+ actionButtons: IVirtualDataGridProps["actionButtonGroup"];
6
+ edit?: IVirtualDataGridProps["edit"];
7
+ actionButtonGroup?: IVirtualDataGridProps["actionButtonGroup"];
8
+ }
9
+ /**
10
+ * Renders the action buttons for a cell in the OdsInlineEditDataGrid component.
11
+ * @param {ActionCellRenderProps} props - The props for the ActionCellRender component.
12
+ * @returns {ReactNode} - The rendered action buttons.
13
+ */
14
+ declare const ActionCellRender: FC<ActionCellRenderProps>;
15
+ export default ActionCellRender;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { IEditingOptions } from "../types";
3
+ /**
4
+ * Component that handles editing functionalities within the data grid.
5
+ * @param {IEditingOptions} props - The properties passed to the component.
6
+ * @returns {JSX.Element} - The JSX element representing the editing handlers.
7
+ */
8
+ declare const EditingPartial: React.FC<IEditingOptions>;
9
+ export default EditingPartial;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { IToolbarButton } from "../types";
3
+ interface PageTitleAndToolbarProps {
4
+ pageTitle?: string;
5
+ toolbarButtonGroup?: IToolbarButton[];
6
+ }
7
+ declare const MemoizedPageTitleAndToolbar: React.NamedExoticComponent<PageTitleAndToolbarProps>;
8
+ export default MemoizedPageTitleAndToolbar;
@@ -0,0 +1,19 @@
1
+ interface IConcatFilteredLabelProps {
2
+ result: string;
3
+ totalLoaded: number;
4
+ filteredRowCount: number;
5
+ filterApplied: boolean;
6
+ summaryFilteredDataLabel: string;
7
+ }
8
+ /**
9
+ * Concatenates the filtered label with the result string.
10
+ *
11
+ * @param {IConcatFilteredLabelProps} props - The object containing the necessary properties.
12
+ * @returns {string} - The concatenated result string.
13
+ */
14
+ export declare const concatFilteredLabel: ({ result, totalLoaded, filteredRowCount, filterApplied, summaryFilteredDataLabel, }: IConcatFilteredLabelProps) => string;
15
+ export {};
16
+ /**
17
+ * This file contains utility functions related to the OdsInlineEditDataGrid component.
18
+ * These utility functions are used for handling filtering and data manipulation.
19
+ */
@@ -0,0 +1,4 @@
1
+ export declare const Constants: {
2
+ timelineDefaultStartDate: Date;
3
+ timelineDefaultEndDate: Date;
4
+ };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare const checkboxCellComponent: (props: any) => React.JSX.Element;
3
+ export declare const statusCellComponent: (props: any) => React.JSX.Element;
4
+ export declare const minimalHeaderCellComponent: (data: any, __el: any) => React.JSX.Element;
5
+ export declare const mapCustomTask: (item: any) => any;
6
+ export declare const setSelectedKeys: (datasource: any[], key?: string, selectedKeys?: number[] | string[]) => any[];
@@ -0,0 +1,77 @@
1
+ /// <reference types="react" />
2
+ import { IColumnProps, IGanttOptions, IItemProps } from "devextreme-react/gantt";
3
+ export interface IMenuLinkItem {
4
+ text: string;
5
+ url: string;
6
+ queryParamNames?: string[];
7
+ }
8
+ export interface ICustomSelectionChange {
9
+ data: any;
10
+ isSelected: boolean;
11
+ }
12
+ export interface IDateRangeChange {
13
+ startDate: Date;
14
+ endDate: Date;
15
+ }
16
+ export interface IStatusColumnChange {
17
+ data: any;
18
+ status: boolean;
19
+ dataField: string;
20
+ }
21
+ export interface ICheckboxColumnChange {
22
+ data: any;
23
+ isChecked: boolean;
24
+ dataField: string;
25
+ }
26
+ export interface IOdsTimelineProps extends React.PropsWithChildren<IGanttOptions> {
27
+ /**
28
+ * Set columns for listview.
29
+ */
30
+ customColumns?: IOdsTimelineColumnProps[];
31
+ /**
32
+ * Set task list. It is used for list view and timeline view.
33
+ */
34
+ customTasks: any[];
35
+ /**
36
+ * Set data field name from task list. This is used for selection.
37
+ */
38
+ customTaskKey?: string;
39
+ /**
40
+ * Set key values to be selected. "multiSelectionEnabled" must be true.
41
+ */
42
+ customSelectedKeys?: string[] | number[];
43
+ /**
44
+ * Set true if you want multi selection in list view.
45
+ */
46
+ multiSelectionEnabled?: boolean;
47
+ /**
48
+ * This is a selection event that fired when selection is changed.
49
+ */
50
+ onCustomSelectionChanged(e: ICustomSelectionChange): void;
51
+ /**
52
+ * This is a date range event that fired when date range is changed.
53
+ */
54
+ onDateRangeChange(e: IDateRangeChange): void;
55
+ }
56
+ export interface IOdsTimelineColumnProps extends IColumnProps {
57
+ isMinimized?: boolean;
58
+ isStatusColumn?: boolean;
59
+ isCheckboxColumn?: boolean;
60
+ }
61
+ export interface IOdsTimelineStatusColumnProps extends IOdsTimelineColumnProps {
62
+ onStatusColumnChange(e: IStatusColumnChange): void;
63
+ }
64
+ export interface IOdsTimelineCheckboxColumnProps extends IOdsTimelineColumnProps {
65
+ onCheckboxColumnChange(e: ICheckboxColumnChange): void;
66
+ }
67
+ export interface IOdsTimelineDateFilter extends IItemProps {
68
+ defaultStartDate?: Date;
69
+ defaultEndDate?: Date;
70
+ backText?: string;
71
+ nextText?: string;
72
+ onFilterRangeChange(e: IDateRangeChange): void;
73
+ }
74
+ export declare const enum DateDirection {
75
+ prevMonth = "previousMonth",
76
+ nextMonth = "nextMonth"
77
+ }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "./OdsTimeline.css";
3
+ import { IOdsTimelineProps } from "./OdsTimeline.Types";
4
+ declare const OdsTimeline: (props: IOdsTimelineProps) => React.JSX.Element;
5
+ export default OdsTimeline;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { IOdsTimelineDateFilter } from "./OdsTimeline.Types";
3
+ export declare const OdsTimelineDateFilter: (props: IOdsTimelineDateFilter | Readonly<IOdsTimelineDateFilter>) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ICustomSelectionChange, IOdsTimelineColumnProps } from "./OdsTimeline.Types";
2
+ export declare const OdsTimelineSelectionColumn: (selectionEvent: (e: ICustomSelectionChange) => void) => IOdsTimelineColumnProps;
package/dist/index.js CHANGED
@@ -1655,7 +1655,7 @@ var useStyles = antdStyle.createStyles(function (_ref, props) {
1655
1655
  filterBodyWrapper: cx(grid, css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n transition: grid-template-rows 0.3s;\n grid-template-rows: ", ";\n "])), props.open ? "1fr" : "0fr")),
1656
1656
  filterBody: cx(css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n width: 100%;\n "])))),
1657
1657
  filterActionButtonsWrapper: cx(flex, css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n width: 100%;\n justify-content: flex-end;\n gap: ", "px;\n "])), token.sizeSM)),
1658
- filterTagsWrapper: cx(flex, css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n align-items: center;\n justify-content: center;\n width: 85%;\n max-width: 85%;\n min-width: 85%;\n "])))),
1658
+ filterTagsWrapper: cx(flex, css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n align-items: center;\n justify-content: center;\n width: 85%;\n max-width: 85%;\n min-width: 85%;\n transition: opacity 0.3s;\n opacity: ", ";\n "])), props.open ? 0 : 1)),
1659
1659
  toggleButton: cx(flex),
1660
1660
  clearButton: cx(flex)
1661
1661
  };
@@ -1674,7 +1674,7 @@ var useFilterTagsStyles = antdStyle.createStyles(function (_ref3) {
1674
1674
  var css = _ref3.css,
1675
1675
  token = _ref3.token;
1676
1676
  return {
1677
- menu: css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n width: 100%;\n border: 0;\n gap: ", "px;\n position: relative;\n\n &::after,\n &::before {\n display: none;\n }\n\n &.ant-menu-light.ant-menu-horizontal {\n & > .ant-menu-item {\n cursor: default;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n top: unset;\n }\n\n & > .ant-menu-submenu {\n &:hover {\n &::after {\n display: none;\n }\n }\n }\n }\n\n &.ant-menu-light.ant-menu-horizontal > .ant-menu-item::after,\n &.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover::after {\n display: none;\n }\n\n &.ant-menu-light.ant-menu-horizontal\n > .ant-menu-submenu\n &.ant-menu-light.ant-menu-horizontal\n > .ant-menu-item::after {\n display: none;\n }\n "])), token.sizeXS)
1677
+ menu: css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n width: 100%;\n border: 0;\n gap: ", "px;\n position: relative;\n\n &::after,\n &::before {\n display: none;\n }\n\n &.ant-menu-light.ant-menu-horizontal {\n & > .ant-menu-item {\n cursor: default;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n top: unset;\n }\n\n & > .ant-menu-submenu {\n &:hover {\n &::after {\n display: none;\n }\n }\n }\n }\n\n &.ant-menu-light.ant-menu-horizontal > .ant-menu-submenu-selected::after {\n display: none;\n }\n\n &.ant-menu-light.ant-menu-horizontal > .ant-menu-item::after,\n &.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover::after {\n display: none;\n }\n\n &.ant-menu-light.ant-menu-horizontal\n > .ant-menu-submenu\n &.ant-menu-light.ant-menu-horizontal\n > .ant-menu-item::after {\n display: none;\n }\n "])), token.sizeXS)
1678
1678
  };
1679
1679
  });
1680
1680
 
@@ -1707,8 +1707,15 @@ var OdsFilterTagView = function OdsFilterTagView(_ref) {
1707
1707
  theme: {
1708
1708
  components: {
1709
1709
  Menu: {
1710
+ horizontalLineHeight: "22px",
1711
+ activeBarHeight: 0,
1710
1712
  itemPaddingInline: 0,
1711
- horizontalLineHeight: "22px"
1713
+ itemHeight: 30,
1714
+ itemMarginBlock: 0,
1715
+ itemActiveBg: "transparent",
1716
+ itemHoverBg: "transparent",
1717
+ itemSelectedBg: "transparent",
1718
+ subMenuItemBg: "transparent"
1712
1719
  },
1713
1720
  Tag: {
1714
1721
  marginXS: 0
@@ -1716,7 +1723,6 @@ var OdsFilterTagView = function OdsFilterTagView(_ref) {
1716
1723
  }
1717
1724
  }
1718
1725
  }, React__default.createElement(antd.Menu, {
1719
- expandIcon: React__default.createElement("div", null, React__default.createElement(outline.ChevronDownIcon, null)),
1720
1726
  defaultSelectedKeys: ["1"],
1721
1727
  mode: "horizontal",
1722
1728
  className: styles.menu
@@ -1753,10 +1759,15 @@ var OdsFilter = function OdsFilter(props) {
1753
1759
  var handleHideShowAdvancedFilter = function handleHideShowAdvancedFilter() {
1754
1760
  if (!showFilter) {
1755
1761
  setShowFilter(true);
1762
+ setTimeout(function () {
1763
+ setShowAdvanceFilter(!showAdvanceFilter);
1764
+ }, 200);
1765
+ } else {
1766
+ setShowAdvanceFilter(!showAdvanceFilter);
1756
1767
  }
1757
- setShowAdvanceFilter(!showAdvanceFilter);
1758
1768
  };
1759
1769
  var handleHideShowFilter = function handleHideShowFilter() {
1770
+ setShowAdvanceFilter(false);
1760
1771
  setShowFilter(!showFilter);
1761
1772
  };
1762
1773
  var onClearSearch = function onClearSearch() {