@finos/legend-lego 2.0.114 → 2.0.116

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.
@@ -13,11 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { type CellClickedEvent, type CellMouseOverEvent, type CellRange, type CellSelectionChangedEvent, type ColDef, type ColumnState, type DefaultMenuItem, type FirstDataRenderedEvent, type GetContextMenuItemsParams, type GridApi, type GridOptions, type IAggFuncParams, type ICellRendererParams, type IRowNode, type MenuItemDef, type Module, type RowClickedEvent, type RowSelectedEvent, type RowSelectionOptions } from 'ag-grid-community';
16
+ import { type CellClickedEvent, type CellMouseOverEvent, type CellRange, type CellSelectionChangedEvent, type ColDef, type ColumnState, type DefaultMenuItem, type FirstDataRenderedEvent, type GetContextMenuItemsParams, type GridApi, type GridOptions, type IAggFuncParams, type ICellRendererParams, type IRowNode, type MenuItemDef, type RowClickedEvent, type RowSelectedEvent, type RowSelectionOptions } from 'ag-grid-community';
17
17
  import { type AgGridReactProps, type CustomHeaderProps } from 'ag-grid-react';
18
- export declare const communityModules: Module[];
19
- export declare const enterpriseModules: Module[];
20
- export declare const allModules: Module[];
21
18
  export declare function DataGrid<TData = unknown>(props: AgGridReactProps<TData>): React.ReactNode;
22
19
  export type { CellClickedEvent as DataGridCellClickedEvent, CellMouseOverEvent as DataGridCellMouseOverEvent, CellRange as DataGridCellRange, CellSelectionChangedEvent as DataGridCellSelectionChangedEvent, ColDef as DataGridColumnDefinition, ColumnState as DataGridColumnState, CustomHeaderProps as DataGridCustomHeaderProps, DefaultMenuItem as DataGridDefaultMenuItem, FirstDataRenderedEvent as DataGridFirstDataRenderedEvent, GetContextMenuItemsParams as DataGridGetContextMenuItemsParams, GridApi as DataGridApi, GridOptions as DataGridOptions, IAggFuncParams as DataGridIAggFuncParams, ICellRendererParams as DataGridCellRendererParams, IRowNode as DataGridIRowNode, MenuItemDef as DataGridMenuItemDef, RowClickedEvent as DataGridRowClickedEvent, RowSelectedEvent as DataGridRowSelectedEvent, RowSelectionOptions as DataGridRowSelectionOptions, };
23
20
  //# sourceMappingURL=DataGrid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAyB,CAAC;AAC/D,eAAO,MAAM,iBAAiB,EAAE,MAAM,EAA0B,CAAC;AACjE,eAAO,MAAM,UAAU,EAAE,MAAM,EAA+C,CAAC;AAI/E,wBAAgB,QAAQ,CAAC,KAAK,GAAG,OAAO,EACtC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAC7B,KAAK,CAAC,SAAS,CAcjB;AAED,YAAY,EACV,gBAAgB,IAAI,wBAAwB,EAC5C,kBAAkB,IAAI,0BAA0B,EAChD,SAAS,IAAI,iBAAiB,EAC9B,yBAAyB,IAAI,iCAAiC,EAC9D,MAAM,IAAI,wBAAwB,EAClC,WAAW,IAAI,mBAAmB,EAClC,iBAAiB,IAAI,yBAAyB,EAC9C,eAAe,IAAI,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yB,EAC9C,eAAe,IAAI,uBAAuB,EAC1C,sBAAsB,IAAI,8BAA8B,EACxD,yBAAyB,IAAI,iCAAiC,EAC9D,OAAO,IAAI,WAAW,EACtB,WAAW,IAAI,eAAe,EAC9B,cAAc,IAAI,sBAAsB,EACxC,mBAAmB,IAAI,0BAA0B,EACjD,QAAQ,IAAI,gBAAgB,EAC5B,WAAW,IAAI,mBAAmB,EAClC,eAAe,IAAI,uBAAuB,EAC1C,gBAAgB,IAAI,wBAAwB,EAC5C,mBAAmB,IAAI,2BAA2B,GACnD,CAAC"}
@@ -17,17 +17,31 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { AllCommunityModule, } from 'ag-grid-community';
18
18
  import { LicenseManager, AllEnterpriseModule } from 'ag-grid-enterprise';
19
19
  import { AgGridReact, } from 'ag-grid-react';
20
- export const communityModules = [AllCommunityModule];
21
- export const enterpriseModules = [AllEnterpriseModule];
22
- export const allModules = communityModules.concat(enterpriseModules);
20
+ // NOTE: This is a workaround to prevent ag-grid license key check from flooding the console screen
21
+ // with its stack trace in Chrome.
22
+ // We MUST NEVER completely surpress this warning in production, else it's a violation of the ag-grid license!
23
+ // See https://www.ag-grid.com/react-data-grid/licensing/
24
+ const __INTERNAL__original_console_error = console.error; // eslint-disable-line no-console
23
25
  export function DataGrid(props) {
24
26
  if (AG_GRID_LICENSE) {
25
27
  LicenseManager.setLicenseKey(AG_GRID_LICENSE);
26
28
  }
29
+ // eslint-disable-next-line no-process-env
30
+ if (process.env.NODE_ENV !== 'production') {
31
+ // eslint-disable-next-line no-console
32
+ console.error = (message, ...agrs) => {
33
+ console.debug(`%c ${message}`, 'color: silver'); // eslint-disable-line no-console
34
+ };
35
+ }
27
36
  return (_jsx(AgGridReact, { theme: "legacy", ...props,
28
37
  // NOTE: for test, we don't want to handle the error messages outputed by ag-grid so
29
38
  // we disable enterprise features for now
30
- // eslint-disable-next-line no-process-env
31
- modules: process.env.NODE_ENV === 'test' ? communityModules : allModules }));
39
+ modules: [AllCommunityModule, AllEnterpriseModule], onGridReady: () => {
40
+ // eslint-disable-next-line no-process-env
41
+ if (process.env.NODE_ENV !== 'production') {
42
+ // restore original error logging
43
+ console.error = __INTERNAL__original_console_error; // eslint-disable-line no-console
44
+ }
45
+ } }));
32
46
  }
33
47
  //# sourceMappingURL=DataGrid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAoBL,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,WAAW,GAGZ,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,gBAAgB,GAAa,CAAC,kBAAkB,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAAa,CAAC,mBAAmB,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,UAAU,GAAa,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAI/E,MAAM,UAAU,QAAQ,CACtB,KAA8B;IAE9B,IAAI,eAAe,EAAE,CAAC;QACpB,cAAc,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,CACL,KAAC,WAAW,IACV,KAAK,EAAC,QAAQ,KACV,KAAK;QACT,oFAAoF;QACpF,yCAAyC;QACzC,0CAA0C;QAC1C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,GACxE,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAmBL,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,WAAW,GAGZ,MAAM,eAAe,CAAC;AAIvB,mGAAmG;AACnG,kCAAkC;AAClC,8GAA8G;AAC9G,yDAAyD;AACzD,MAAM,kCAAkC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;AAE3F,MAAM,UAAU,QAAQ,CACtB,KAA8B;IAE9B,IAAI,eAAe,EAAE,CAAC;QACpB,cAAc,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC;IAED,0CAA0C;IAC1C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,sCAAsC;QACtC,OAAO,CAAC,KAAK,GAAG,CAAC,OAAiB,EAAE,GAAG,IAAe,EAAE,EAAE;YACxD,OAAO,CAAC,KAAK,CAAC,MAAM,OAAO,EAAE,EAAE,eAAe,CAAC,CAAC,CAAC,iCAAiC;QACpF,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,WAAW,IACV,KAAK,EAAC,QAAQ,KACV,KAAK;QACT,oFAAoF;QACpF,yCAAyC;QACzC,OAAO,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EAClD,WAAW,EAAE,GAAG,EAAE;YAChB,0CAA0C;YAC1C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;gBAC1C,iCAAiC;gBACjC,OAAO,CAAC,KAAK,GAAG,kCAAkC,CAAC,CAAC,iCAAiC;YACvF,CAAC;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-lego v2.0.114
1
+ /** @license @finos/legend-lego v2.0.116
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-lego",
3
- "version": "2.0.114",
3
+ "version": "2.0.116",
4
4
  "description": "Legend code editor support",
5
5
  "keywords": [
6
6
  "legend",
@@ -46,10 +46,10 @@
46
46
  "test:watch": "jest --watch"
47
47
  },
48
48
  "dependencies": {
49
- "@finos/legend-application": "16.0.62",
50
- "@finos/legend-art": "7.1.116",
51
- "@finos/legend-code-editor": "2.0.107",
52
- "@finos/legend-graph": "32.1.65",
49
+ "@finos/legend-application": "16.0.63",
50
+ "@finos/legend-art": "7.1.117",
51
+ "@finos/legend-code-editor": "2.0.109",
52
+ "@finos/legend-graph": "32.1.67",
53
53
  "@finos/legend-shared": "11.0.19",
54
54
  "@types/css-font-loading-module": "0.0.14",
55
55
  "@types/react": "19.0.10",
@@ -30,7 +30,6 @@ import {
30
30
  type ICellRendererParams,
31
31
  type IRowNode,
32
32
  type MenuItemDef,
33
- type Module,
34
33
  type RowClickedEvent,
35
34
  type RowSelectedEvent,
36
35
  type RowSelectionOptions,
@@ -43,26 +42,43 @@ import {
43
42
  type CustomHeaderProps,
44
43
  } from 'ag-grid-react';
45
44
 
46
- export const communityModules: Module[] = [AllCommunityModule];
47
- export const enterpriseModules: Module[] = [AllEnterpriseModule];
48
- export const allModules: Module[] = communityModules.concat(enterpriseModules);
49
-
50
45
  declare const AG_GRID_LICENSE: string;
51
46
 
47
+ // NOTE: This is a workaround to prevent ag-grid license key check from flooding the console screen
48
+ // with its stack trace in Chrome.
49
+ // We MUST NEVER completely surpress this warning in production, else it's a violation of the ag-grid license!
50
+ // See https://www.ag-grid.com/react-data-grid/licensing/
51
+ const __INTERNAL__original_console_error = console.error; // eslint-disable-line no-console
52
+
52
53
  export function DataGrid<TData = unknown>(
53
54
  props: AgGridReactProps<TData>,
54
55
  ): React.ReactNode {
55
56
  if (AG_GRID_LICENSE) {
56
57
  LicenseManager.setLicenseKey(AG_GRID_LICENSE);
57
58
  }
59
+
60
+ // eslint-disable-next-line no-process-env
61
+ if (process.env.NODE_ENV !== 'production') {
62
+ // eslint-disable-next-line no-console
63
+ console.error = (message?: unknown, ...agrs: unknown[]) => {
64
+ console.debug(`%c ${message}`, 'color: silver'); // eslint-disable-line no-console
65
+ };
66
+ }
67
+
58
68
  return (
59
69
  <AgGridReact
60
70
  theme="legacy"
61
71
  {...props}
62
72
  // NOTE: for test, we don't want to handle the error messages outputed by ag-grid so
63
73
  // we disable enterprise features for now
64
- // eslint-disable-next-line no-process-env
65
- modules={process.env.NODE_ENV === 'test' ? communityModules : allModules}
74
+ modules={[AllCommunityModule, AllEnterpriseModule]}
75
+ onGridReady={() => {
76
+ // eslint-disable-next-line no-process-env
77
+ if (process.env.NODE_ENV !== 'production') {
78
+ // restore original error logging
79
+ console.error = __INTERNAL__original_console_error; // eslint-disable-line no-console
80
+ }
81
+ }}
66
82
  />
67
83
  );
68
84
  }