ods-component-lib 1.19.8 → 1.19.11

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 (38) hide show
  1. package/README.md +39 -39
  2. package/dist/App.d.ts +3 -0
  3. package/dist/components/antd/modal/OdsAdvanceModal.d.ts +7 -0
  4. package/dist/components/devextreme/DataGrid/OdsDataGrid/index.d.ts +3 -2
  5. package/dist/components/devextreme/DataGrid/styles/styles.d.ts +2 -0
  6. package/dist/components/devextreme/DataGrid/styles/theme/sizes/default.d.ts +14 -0
  7. package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.Types.d.ts +0 -1
  8. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/ContentHandlers.d.ts +14 -0
  9. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/EditorPreparedHandlers.d.ts +7 -0
  10. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OnExportingHandlers.d.ts +19 -0
  11. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OptionHandlers.d.ts +7 -0
  12. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/SummaryHandlers.d.ts +21 -0
  13. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/ActionCellRender.d.ts +15 -0
  14. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/EditingPartial.d.ts +9 -0
  15. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/PageTitle.d.ts +8 -0
  16. package/dist/components/devextreme/OdsInlineEditDataGrid/utils.d.ts +19 -0
  17. package/dist/components/devextreme/OdsTimeline/OdsTimeline.Constants.d.ts +4 -0
  18. package/dist/components/devextreme/OdsTimeline/OdsTimeline.Functions.d.ts +6 -0
  19. package/dist/components/devextreme/OdsTimeline/OdsTimeline.Types.d.ts +77 -0
  20. package/dist/components/devextreme/OdsTimeline/OdsTimeline.d.ts +5 -0
  21. package/dist/components/devextreme/OdsTimeline/OdsTimelineDateFilter.d.ts +3 -0
  22. package/dist/components/devextreme/OdsTimeline/OdsTimelineSelectionColumn.d.ts +2 -0
  23. package/dist/components/devextreme/OdsTimelineTable/OdsTimelineTableSearchBox.d.ts +3 -0
  24. package/dist/index.css +267 -267
  25. package/dist/index.js +43 -8
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.modern.js +43 -8
  28. package/dist/index.modern.js.map +1 -1
  29. package/dist/index.umd.js +2 -0
  30. package/dist/index.umd.js.map +1 -0
  31. package/dist/stories/OdsAdvanceModal/OdsAdvanceModal.stories.d.ts +42 -0
  32. package/dist/stories/OdsAdvanceModal/Samples/BasicOdsAdvanceModal.sample.d.ts +8 -0
  33. package/dist/stories/OdsModal/Samples/OdsModal.Sample.d.ts +1 -0
  34. package/dist/stories/OdsTimePicker/Samples/TimeRangePicker.d.ts +2 -0
  35. package/dist/stories/OdsTimeline/OdsTimeline.Constants.d.ts +3 -0
  36. package/dist/stories/OdsTimeline/OdsTimeline.Functions.d.ts +6 -0
  37. package/dist/stories/OdsTimeline/OdsTimeline.MockData.d.ts +39 -0
  38. package/package.json +101 -101
package/README.md CHANGED
@@ -1,39 +1,39 @@
1
- # odeon-component-library
2
-
3
- > Odeon desgin system component library
4
-
5
- [![NPM](https://img.shields.io/npm/v/odeon-component-library.svg)](https://www.npmjs.com/package/odeon-component-library) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install
11
- or
12
- if you want to install without running the postinstall script
13
- npm install --ignore-scripts
14
- ```
15
-
16
- ## Install Odeon Component Library in a project
17
-
18
- ```bash
19
- npm install --save odeon-component-library
20
- ```
21
-
22
- ## Usage
23
-
24
- ```tsx
25
- import React, { Component } from "react";
26
-
27
- import MyComponent from "odeon-component-library";
28
- import "odeon-component-library/dist/index.css";
29
-
30
- class Example extends Component {
31
- render() {
32
- return <MyComponent />;
33
- }
34
- }
35
- ```
36
-
37
- ## License
38
-
39
- MIT © [OdeonTechnology](https://github.com/OdeonTechnology)
1
+ # odeon-component-library
2
+
3
+ > Odeon desgin system component library
4
+
5
+ [![NPM](https://img.shields.io/npm/v/odeon-component-library.svg)](https://www.npmjs.com/package/odeon-component-library) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install
11
+ or
12
+ if you want to install without running the postinstall script
13
+ npm install --ignore-scripts
14
+ ```
15
+
16
+ ## Install Odeon Component Library in a project
17
+
18
+ ```bash
19
+ npm install --save odeon-component-library
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ```tsx
25
+ import React, { Component } from "react";
26
+
27
+ import MyComponent from "odeon-component-library";
28
+ import "odeon-component-library/dist/index.css";
29
+
30
+ class Example extends Component {
31
+ render() {
32
+ return <MyComponent />;
33
+ }
34
+ }
35
+ ```
36
+
37
+ ## License
38
+
39
+ MIT © [OdeonTechnology](https://github.com/OdeonTechnology)
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;
@@ -12,6 +12,7 @@ export interface IOdsDataGridOptions extends IDataGridOptions {
12
12
  compact?: boolean;
13
13
  hasSummaryButton?: boolean;
14
14
  disableBodyClasses?: boolean;
15
+ dataGridBorderRadius?: number | string;
15
16
  }
16
17
  /**
17
18
  * Default appearance settings for the OdsDataGrid component.
@@ -60,8 +61,8 @@ export declare const defaultAppearanceSettings: Partial<IOdsDataGridOptions>;
60
61
  * };
61
62
  * ```
62
63
  */
63
- export declare const OdsDataGrid: ({ dataGridRef, compact, hasSummaryButton, disableBodyClasses, ...props }: IOdsDataGridOptions) => JSX.Element;
64
- export declare const OdsDataGridMemoized: React.MemoExoticComponent<({ dataGridRef, compact, hasSummaryButton, disableBodyClasses, ...props }: IOdsDataGridOptions) => JSX.Element>;
64
+ export declare const OdsDataGrid: ({ dataGridRef, compact, hasSummaryButton, disableBodyClasses, dataGridBorderRadius, height, ...props }: IOdsDataGridOptions) => JSX.Element;
65
+ export declare const OdsDataGridMemoized: React.MemoExoticComponent<({ dataGridRef, compact, hasSummaryButton, disableBodyClasses, dataGridBorderRadius, height, ...props }: IOdsDataGridOptions) => JSX.Element>;
65
66
  export * from "devextreme-react/data-grid";
66
67
  export { OdsDataGridTypes };
67
68
  export { useBodyClasses as useOdsBodyClasses, useStyles as useOdsDataGridStyles };
@@ -1,6 +1,8 @@
1
1
  export declare const useStyles: (props?: {
2
2
  compact?: boolean;
3
3
  hasSummaryButton?: boolean;
4
+ dataGridBorderRadius?: number | string;
5
+ height?: string | number | (() => number | string);
4
6
  }) => import("antd-style").ReturnStyles<{
5
7
  gridWrapper: string;
6
8
  grid: string;
@@ -104,4 +104,18 @@ export declare const defaultSizes: {
104
104
  dxToolbarMenuContentTextPaddingRight: number;
105
105
  dxToolbarMenuItemBorderRadius: number;
106
106
  };
107
+ dxPager: {
108
+ dxPagerPaddingBlock: number;
109
+ dxPagerPaddingInline: number;
110
+ dxPagerPageIndexesGap: number;
111
+ dxPagerNavigationButtonWidth: number;
112
+ dxPagerNavigationButtonHeight: number;
113
+ dxPagerNavigationButtonFontSize: number;
114
+ dxPagerNavigationButtonBeforeWidth: number;
115
+ dxPagerNavigationButtonBeforeHeight: number;
116
+ dxPagerPageButtonWidth: number;
117
+ dxPagerPageButtonHeight: number;
118
+ dxPagerPageButtonBorderRadius: number;
119
+ dxPagerPageButtonFontSize: number;
120
+ };
107
121
  };
@@ -60,7 +60,6 @@ export interface IOdsDataGridProps extends IDataGridOptions, IMultiCellEditableD
60
60
  DetailGridComponent?: React.FC<any>;
61
61
  scrollingProps?: IScrollingProps;
62
62
  onRowPrepared?: (e: RowPreparedEvent<any, any>) => void;
63
- summaryComponent?: React.JSX.Element;
64
63
  }
65
64
  export interface ISummaryRowOptions {
66
65
  summaryLoadedDataLabel?: string;
@@ -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;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { IOdsTimelineTableSearchBox } from "./OdsTimelineTable.Types";
3
+ export declare const OdsTimelineTableSearchBox: (props: IOdsTimelineTableSearchBox | Readonly<IOdsTimelineTableSearchBox>) => React.JSX.Element;