@azrico/reactgrid 1.2.0 → 1.2.2

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,23 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {};
7
- exports.default = void 0;
8
- var _DataGrid = _interopRequireWildcard(require("./DataGrid"));
9
- Object.keys(_DataGrid).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
12
- if (key in exports && exports[key] === _DataGrid[key]) return;
13
- Object.defineProperty(exports, key, {
14
- enumerable: true,
15
- get: function () {
16
- return _DataGrid[key];
17
- }
18
- });
19
- });
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
- var _default = _DataGrid.default;
23
- exports.default = _default;
1
+ export * from './DataGrid';
2
+ import AzGrid from './DataGrid';
3
+ export default AzGrid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -29,7 +29,7 @@
29
29
  "typescript": "^4.8.4"
30
30
  },
31
31
  "dependencies": {
32
- "@azrico/controls": "1.3.6",
32
+ "@azrico/controls": "1.3.33",
33
33
  "@azrico/object": "^1.3.1",
34
34
  "@emotion/react": "^11.9.3",
35
35
  "@emotion/styled": "^11.9.3",
package/src/index.tsx CHANGED
@@ -1,9 +1,9 @@
1
1
  export * from './views/DataGrid';
2
2
 
3
3
  import AzGrid from './views/DataGrid';
4
- import ExampleGrid from './example';
5
- import React from 'react';
6
- import ReactDOM from 'react-dom/client';
4
+ // import ExampleGrid from './example';
5
+ // import React from 'react';
6
+ // import ReactDOM from 'react-dom/client';
7
7
 
8
8
  /* -------------------------------------------------------------------------- */
9
9
 
@@ -79,7 +79,7 @@ export type AzGridProps = {
79
79
  rightColumns?: string[];
80
80
  customColumns?: customColumnData[];
81
81
 
82
- contextMenuItems?: ConvertableToMenuItem[];
82
+ contextMenuItems?: ConvertableToMenuItem | ConvertableToMenuItem[];
83
83
 
84
84
  highlightedRow?: any;
85
85
  RowDetail?: RowDetailsFunc;
@@ -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 '';
@@ -1,30 +0,0 @@
1
- .azgrid-container {
2
- height: 100%;
3
- width: 100%;
4
- }
5
- .azgrid-borderbox {
6
- box-sizing: border-box;
7
- }
8
- .azgrid-filler {
9
- height: 100%;
10
- width: 100%;
11
- }
12
- .azgrid-nooverflow {
13
- overflow: hidden;
14
- }
15
- .azgrid-testborder {
16
- border: 3px solid red;
17
- }
18
- .azgrid-pad50px {
19
- padding: 50px;
20
- }
21
- .azgrid-nopad {
22
- padding: 0;
23
- }
24
- .azgrid-nomargin {
25
- margin: 0;
26
- }
27
- .azgrid-delayedresize {
28
- transition-property: 'width,height';
29
- transition-delay: 200ms;
30
- }
@@ -1,20 +0,0 @@
1
- /* .InovuaReactDataGrid {
2
- --grid-bg: '#fff';
3
- }
4
- .InovuaReactDataGrid {
5
- background: var(--grid-bg) !important;
6
- }
7
- .InovuaReactDataGrid__header {
8
- background: var(--grid-bg) !important;
9
- }
10
- .InovuaReactDataGrid__row {
11
- background: var(--grid-bg) !important;
12
- }
13
- .InovuaReactDataGrid__cell {
14
- background: var(--grid-bg) !important;
15
- } */
16
- .InovuaReactDataGrid__cell .InovuaReactDataGrid__cell__content {
17
- height: 100%;
18
- display: flex;
19
- align-items: center;
20
- }