@finos/legend-lego 1.0.11 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { TabManagerState, TabState } from './TabManagerState.js';
17
+ export declare const TAB_MANAGER__TAB_TEST_ID = "tab-manager__tab";
17
18
  export declare const TabManager: ((props: {
18
19
  tabManagerState: TabManagerState;
19
20
  tabRenderer?: ((editorState: TabState) => React.ReactNode) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"TabManager.d.ts","sourceRoot":"","sources":["../../src/application/TabManager.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA+NtE,eAAO,MAAM,UAAU;qBAEF,eAAe;iCACH,QAAQ,KAAK,MAAM,SAAS;;;CA2B5D,CAAC"}
1
+ {"version":3,"file":"TabManager.d.ts","sourceRoot":"","sources":["../../src/application/TabManager.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMtE,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AA4N3D,eAAO,MAAM,UAAU;qBAEF,eAAe;iCACH,QAAQ,KAAK,MAAM,SAAS;;;CA2B5D,CAAC"}
@@ -18,6 +18,7 @@ import { ChevronDownIcon, clsx, ContextMenu, DragPreviewLayer, DropdownMenu, Men
18
18
  import { observer } from 'mobx-react-lite';
19
19
  import { useRef, useCallback } from 'react';
20
20
  import { useDrop, useDrag } from 'react-dnd';
21
+ export const TAB_MANAGER__TAB_TEST_ID = 'tab-manager__tab';
21
22
  const horizontalToVerticalScroll = (event) => {
22
23
  // if scrolling is more horizontal than vertical, there's nothing much to do, the OS should handle it just fine
23
24
  // else, intercept
@@ -92,7 +93,7 @@ const Tab = observer((props) => {
92
93
  }), [tabState, tabManagerState]);
93
94
  dragConnector(dropConnector(ref));
94
95
  useDragPreviewLayer(dragPreviewConnector);
95
- return (_jsx("div", { ref: ref, className: clsx('tab-manager__tab', {
96
+ return (_jsx("div", { ref: ref, "data-testid": TAB_MANAGER__TAB_TEST_ID, className: clsx('tab-manager__tab', {
96
97
  'tab-manager__tab--active': tabState === tabManagerState.currentTab,
97
98
  'tab-manager__tab--dragged': isBeingDragged,
98
99
  }), onMouseUp: closeTabOnMiddleClick(tabState), children: _jsx(PanelEntryDropZonePlaceholder, { showPlaceholder: false, className: "tab-manager__tab__dnd__placeholder", children: _jsxs(ContextMenu, { content: _jsx(TabContextMenu, { tabState: tabState, managerTabState: tabManagerState }), className: "tab-manager__tab__content", children: [_jsx("button", { className: "tab-manager__tab__label", tabIndex: -1, onClick: () => tabManagerState.openTab(tabState), title: tabState.description, children: tabRenderer?.(tabState) ?? tabState.label }), _jsx("button", { className: "tab-manager__tab__close-btn", onClick: () => tabManagerState.closeTab(tabState), tabIndex: -1, title: "Close", children: _jsx(TimesIcon, {}) })] }) }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"TabManager.js","sourceRoot":"","sources":["../../src/application/TabManager.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,eAAe,EACf,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,6BAA6B,EAC7B,SAAS,EACT,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAA0B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOrE,MAAM,0BAA0B,GAA4B,CAAC,KAAK,EAAE,EAAE;IACpE,+GAA+G;IAC/G,kBAAkB;IAClB,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MA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C,EACf,CAAC,eAAe,CAAC,cAAc,GAAG,eAAe,CAAC,oBAAoB,CAAC,GACvE,SAAS,CAAC;IACd,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACnD,CAuHA,CAAC"}
@@ -100,6 +100,7 @@ export const CodeEditor = (props) => {
100
100
  useEffect(() => () => {
101
101
  if (editor) {
102
102
  disposeCodeEditor(editor);
103
+ onDidChangeModelContentEventDisposer.current?.dispose();
103
104
  }
104
105
  }, [editor]);
105
106
  return (_jsx("div", { className: clsx('code-editor__container', {
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.js","sourceRoot":"","sources":["../../src/code-editor/CodeEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAoB,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAYlB,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EACJ,UAAU,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,GACnB,GAAG,KAAK,CAAC;IACV,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAEjC,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,EAAE;YACxC,iCAAiC,EAAE,CAAC,WAAW;SAChD,CAAC,YAEF,cAAK,SAAS,EAAC,mBAAmB,EAAC,GAAG,EAAE,YAAY,GAAI,GACpD,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditorTheme.d.ts","sourceRoot":"","sources":["../../src/code-editor/CodeEditorTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AA4B/D,oBAAY,iBAAiB;IAC3B,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IAInC,sBAAsB,OAAO;IAC7B,qBAAqB,YAAY;IACjC,yBAAyB,aAAa;IACtC,yBAAyB,aAAa;CACvC;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,oBAKhD,CAAC;AAEF,eAAO,MAAM,oBAAoB,sCAKhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,sCAK7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,sCAKpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sCAKlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,sCAKjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,sCAK9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,sCAKrC,CAAC"}
1
+ {"version":3,"file":"CodeEditorTheme.d.ts","sourceRoot":"","sources":["../../src/code-editor/CodeEditorTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AA4B/D,oBAAY,iBAAiB;IAC3B,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IAInC,sBAAsB,OAAO;IAC7B,qBAAqB,YAAY;IACjC,yBAAyB,aAAa;IACtC,yBAAyB,aAAa;CACvC;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,oBAYhD,CAAC;AAEF,eAAO,MAAM,oBAAoB,sCAKhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,sCAK7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,sCAKpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sCAKlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,sCAKjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,sCAK9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,sCAKrC,CAAC"}
@@ -60,7 +60,14 @@ export const DEFAULT_DARK_THEME = {
60
60
  base: 'vs-dark',
61
61
  inherit: true,
62
62
  colors: {},
63
- rules: BASE_PURE_LANGUAGE_COLOR_TOKENS,
63
+ rules: [
64
+ ...BASE_PURE_LANGUAGE_COLOR_TOKENS,
65
+ // NOTE: correct a problem with syntax highlighting of string in SQL
66
+ { token: 'string.sql', foreground: 'ce9178' },
67
+ { token: 'white.sql', foreground: 'd4d4d4' },
68
+ { token: 'identifier.sql', foreground: 'd4d4d4' },
69
+ { token: 'operator.sql', foreground: 'd4d4d4' },
70
+ ],
64
71
  };
65
72
  export const SOLARIZED_DARK_THEME = buildCodeEditorTheme(SOLARIZED_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);
66
73
  export const GITHUB_DARK_THEME = buildCodeEditorTheme(GITHUB_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditorTheme.js","sourceRoot":"","sources":["../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C,MAAM,kBAAkB,GAAG,oBAAoB,CACpD,uBAAuB,EACvB,iBAAiB,CAAC,qBAAqB,EACvC,EAAE,EACF,EAAE,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAC3D,8BAA8B,EAC9B,iBAAiB,CAAC,qBAAqB,EACvC,EAAE,EACF,EAAE,CACH,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-lego v1.0.11
1
+ /** @license @finos/legend-lego v1.0.13
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": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Legend shared advanced application components and building blocks",
5
5
  "keywords": [
6
6
  "legend",
@@ -51,12 +51,12 @@
51
51
  "@ag-grid-community/core": "29.3.5",
52
52
  "@ag-grid-community/react": "29.3.5",
53
53
  "@ag-grid-community/styles": "29.3.5",
54
- "@finos/legend-application": "15.0.15",
55
- "@finos/legend-art": "7.0.16",
56
- "@finos/legend-graph": "29.0.4",
57
- "@finos/legend-shared": "10.0.7",
54
+ "@finos/legend-application": "15.0.17",
55
+ "@finos/legend-art": "7.0.18",
56
+ "@finos/legend-graph": "30.0.0",
57
+ "@finos/legend-shared": "10.0.9",
58
58
  "@types/css-font-loading-module": "0.0.8",
59
- "@types/react": "18.2.6",
59
+ "@types/react": "18.2.7",
60
60
  "@types/react-dom": "18.2.4",
61
61
  "mobx": "6.9.0",
62
62
  "mobx-react-lite": "3.4.3",
@@ -66,10 +66,10 @@
66
66
  "react-dom": "18.2.0"
67
67
  },
68
68
  "devDependencies": {
69
- "@finos/legend-dev-utils": "2.0.62",
69
+ "@finos/legend-dev-utils": "2.0.64",
70
70
  "@jest/globals": "29.5.0",
71
71
  "cross-env": "7.0.3",
72
- "eslint": "8.40.0",
72
+ "eslint": "8.41.0",
73
73
  "jest": "29.5.0",
74
74
  "npm-run-all": "4.1.5",
75
75
  "rimraf": "5.0.1",
@@ -35,6 +35,8 @@ type TabDragSource = {
35
35
  tab: TabState;
36
36
  };
37
37
 
38
+ export const TAB_MANAGER__TAB_TEST_ID = 'tab-manager__tab';
39
+
38
40
  const horizontalToVerticalScroll: React.WheelEventHandler = (event) => {
39
41
  // if scrolling is more horizontal than vertical, there's nothing much to do, the OS should handle it just fine
40
42
  // else, intercept
@@ -164,6 +166,7 @@ const Tab = observer(
164
166
  return (
165
167
  <div
166
168
  ref={ref}
169
+ data-testid={TAB_MANAGER__TAB_TEST_ID}
167
170
  className={clsx('tab-manager__tab', {
168
171
  'tab-manager__tab--active': tabState === tabManagerState.currentTab,
169
172
  'tab-manager__tab--dragged': isBeingDragged,
@@ -146,6 +146,8 @@ export const CodeEditor: React.FC<{
146
146
  () => (): void => {
147
147
  if (editor) {
148
148
  disposeCodeEditor(editor);
149
+
150
+ onDidChangeModelContentEventDisposer.current?.dispose();
149
151
  }
150
152
  },
151
153
  [editor],
@@ -65,7 +65,14 @@ export const DEFAULT_DARK_THEME: monacoEditorAPI.IStandaloneThemeData = {
65
65
  base: 'vs-dark',
66
66
  inherit: true,
67
67
  colors: {},
68
- rules: BASE_PURE_LANGUAGE_COLOR_TOKENS,
68
+ rules: [
69
+ ...BASE_PURE_LANGUAGE_COLOR_TOKENS,
70
+ // NOTE: correct a problem with syntax highlighting of string in SQL
71
+ { token: 'string.sql', foreground: 'ce9178' },
72
+ { token: 'white.sql', foreground: 'd4d4d4' },
73
+ { token: 'identifier.sql', foreground: 'd4d4d4' },
74
+ { token: 'operator.sql', foreground: 'd4d4d4' },
75
+ ],
69
76
  };
70
77
 
71
78
  export const SOLARIZED_DARK_THEME = buildCodeEditorTheme(