@azrico/reactgrid 1.2.0 → 1.2.1

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.
@@ -65,4 +65,16 @@ export type AzGridProps = {
65
65
  className?: string;
66
66
  };
67
67
  export declare function AzGrid(props: AzGridProps): JSX.Element;
68
+ /**
69
+ * Gets name of a column from its column object
70
+ * @param obj
71
+ * @returns
72
+ */
73
+ export declare function get_col_name(obj: any): string;
74
+ /**
75
+ * Gets header of a column
76
+ * @param obj
77
+ * @returns
78
+ */
79
+ export declare function get_col_header(obj: any): string;
68
80
  export default AzGrid;
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.AzGrid = AzGrid;
7
7
  exports.default = void 0;
8
+ exports.get_col_header = get_col_header;
9
+ exports.get_col_name = get_col_name;
8
10
  require("@inovua/reactdatagrid-enterprise/index.css");
9
11
  require("@inovua/reactdatagrid-enterprise/theme/default-dark.css");
10
12
  require("@inovua/reactdatagrid-enterprise/theme/amber-dark.css");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -594,7 +594,7 @@ function to_datasource(arr: any[], idProperty: string, valueAsID = true) {
594
594
  * @param obj
595
595
  * @returns
596
596
  */
597
- function get_col_name(obj: any): string {
597
+ export function get_col_name(obj: any): string {
598
598
  if (!obj) return '';
599
599
  if (typeof obj == 'string') return obj;
600
600
  if (typeof obj != 'object') return '';
@@ -605,7 +605,7 @@ function get_col_name(obj: any): string {
605
605
  * @param obj
606
606
  * @returns
607
607
  */
608
- function get_col_header(obj: any): string {
608
+ export function get_col_header(obj: any): string {
609
609
  if (!obj) return '';
610
610
  if (typeof obj == 'string') return obj;
611
611
  if (typeof obj != 'object') return '';