@difizen/libro-sql-cell 1.0.2 → 1.0.3

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,9 +1,9 @@
1
1
  import { CodeEditorManager } from '@difizen/libro-code-editor';
2
2
  import type { IOutput } from '@difizen/libro-common';
3
- import type { CellViewOptions, LibroCell, KernelMessage } from '@difizen/libro-jupyter';
4
- import { CellService, EditorStatus, LibroEditableExecutableCellView, LibroViewTracker, LibroOutputArea } from '@difizen/libro-jupyter';
5
3
  import type { ViewSize } from '@difizen/libro-common/app';
6
- import { Deferred, ViewManager } from '@difizen/libro-common/app';
4
+ import { Deferred, ViewManager, ConfigurationService } from '@difizen/libro-common/app';
5
+ import { CellService, EditorStatus, LibroEditableExecutableCellView, LibroViewTracker, LibroOutputArea } from '@difizen/libro-jupyter';
6
+ import type { CellViewOptions, LibroCell, KernelMessage } from '@difizen/libro-jupyter';
7
7
  import React from 'react';
8
8
  import './index.less';
9
9
  import { LibroSqlCellModel } from './libro-sql-cell-model.js';
@@ -27,7 +27,7 @@ export declare class LibroSqlCellView extends LibroEditableExecutableCellView {
27
27
  calcEditorAreaHeight(): number;
28
28
  protected outputAreaDeferred: Deferred<LibroOutputArea>;
29
29
  get outputAreaReady(): Promise<LibroOutputArea>;
30
- constructor(options: CellViewOptions, cellService: CellService, viewManager: ViewManager, libroViewTracker: LibroViewTracker, codeEditorManager: CodeEditorManager);
30
+ constructor(options: CellViewOptions, cellService: CellService, configurationService: ConfigurationService, viewManager: ViewManager, libroViewTracker: LibroViewTracker, codeEditorManager: CodeEditorManager);
31
31
  onViewMount: () => Promise<void>;
32
32
  setEditorHost(ref: any): void;
33
33
  onViewResize: (size: ViewSize) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"libro-sql-cell-view.d.ts","sourceRoot":"","sources":["../src/libro-sql-cell-view.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;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;AAEF,qBAEa,gBAAiB,SAAQ,+BAA+B;IAC1D,IAAI,uEAAgB;IACrB,KAAK,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,OAAO,EAAE,OAAO,EAAE,CAAC;IAGnB,SAAS,EAAE,cAAc,EAAE,CAAM;IAGxB,YAAY,EAAE,YAAY,CAA0B;IAG7D,gBAAgB,SAAK;IAGZ,kBAAkB,SAAK;IAEb,SAAS,EAAE,SAAS,CAAC;IAExC,SAAS,CAAC,uBAAuB,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAwB;IAEzE,IAAI,WAAW,kBAEd;IAEQ,YAAY,uDAMnB;IAGO,gBAAgB;IAIzB,oBAAoB;IAuBpB,SAAS,CAAC,kBAAkB,4BAAmC;IAC/D,IAAI,eAAe,6BAElB;gBAGqB,OAAO,EAAE,eAAe,EACvB,WAAW,EAAE,WAAW,EACf,oBAAoB,EAAE,oBAAoB,EACnD,WAAW,EAAE,WAAW,EACnB,gBAAgB,EAAE,gBAAgB,EACjC,iBAAiB,EAAE,iBAAiB;IAkDxD,WAAW,sBAElB;IAEF,aAAa,CAAC,GAAG,EAAE,GAAG;IAKb,YAAY,SAAU,QAAQ,KAAG,IAAI,CAK5C;IAEF,cAAc,CAAC,KAAK,EAAE,MAAM;IAInB,MAAM,IAAI,SAAS;IASnB,KAAK,WAAY,OAAO,UAU/B;IAEO,cAAc,aAGrB;IAEa,GAAG;IAqElB,KAAK,YACM,cAAc,kBAAkB,CAAC,SAAS,CAAC,oBAClC,cAAc,aAAa,KAAK,GAAG,6CAUrD;IAEF,mBAAmB,aACP,cAAc,aAAa,eACxB,MAAM,KAAK,IAAI,UA6B5B;IAEF,iBAAiB,gDAef;CACH"}
@@ -32,9 +32,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
32
  import { EditFilled, DatabaseOutlined } from '@ant-design/icons';
33
33
  import { CodeEditorManager } from '@difizen/libro-code-editor';
34
34
  import { isOutput } from '@difizen/libro-common';
35
- import { CellService, EditorStatus, LibroContextKey, LibroEditableExecutableCellView, LibroViewTracker, VirtualizedManagerHelper, KernelError, LibroJupyterModel, LibroOutputArea } from '@difizen/libro-jupyter';
36
- import { Deferred, getOrigin, inject, prop, transient, useInject, view, ViewInstance, ViewManager, ViewOption, ViewRender } from '@difizen/libro-common/app';
35
+ import { Deferred, getOrigin, inject, prop, transient, useInject, view, ViewInstance, ViewManager, ViewOption, ViewRender, ConfigurationService } from '@difizen/libro-common/app';
37
36
  import { l10n } from '@difizen/libro-common/l10n';
37
+ import { CellService, EditorStatus, LibroContextKey, LibroEditableExecutableCellView, LibroViewTracker, VirtualizedManagerHelper, KernelError, LibroJupyterModel, LibroOutputArea } from '@difizen/libro-jupyter';
38
38
  import { Select } from 'antd';
39
39
  import { Input } from 'antd';
40
40
  import React from 'react';
@@ -239,11 +239,11 @@ export var LibroSqlCell = /*#__PURE__*/React.forwardRef(function SqlEditorViewCo
239
239
  export var LibroSqlCellView = (_dec = transient(), _dec2 = view('libro-sql-cell-view'), _dec3 = prop(), _dec4 = prop(), _dec5 = prop(), _dec6 = prop(), _dec7 = inject(SqlScript), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_LibroEditableExecuta) {
240
240
  _inherits(LibroSqlCellView, _LibroEditableExecuta);
241
241
  var _super = _createSuper(LibroSqlCellView);
242
- function LibroSqlCellView(options, cellService, viewManager, libroViewTracker, codeEditorManager) {
242
+ function LibroSqlCellView(options, cellService, configurationService, viewManager, libroViewTracker, codeEditorManager) {
243
243
  var _options$cell;
244
244
  var _this;
245
245
  _classCallCheck(this, LibroSqlCellView);
246
- _this = _super.call(this, options, cellService);
246
+ _this = _super.call(this, options, cellService, configurationService);
247
247
  _this.view = LibroSqlCell;
248
248
  _this.libroViewTracker = void 0;
249
249
  _this.outputs = void 0;
@@ -431,9 +431,10 @@ export var LibroSqlCellView = (_dec = transient(), _dec2 = view('libro-sql-cell-
431
431
  });
432
432
  return _this;
433
433
  }
434
- LibroSqlCellView = inject(CodeEditorManager)(LibroSqlCellView, undefined, 4) || LibroSqlCellView;
435
- LibroSqlCellView = inject(LibroViewTracker)(LibroSqlCellView, undefined, 3) || LibroSqlCellView;
436
- LibroSqlCellView = inject(ViewManager)(LibroSqlCellView, undefined, 2) || LibroSqlCellView;
434
+ LibroSqlCellView = inject(CodeEditorManager)(LibroSqlCellView, undefined, 5) || LibroSqlCellView;
435
+ LibroSqlCellView = inject(LibroViewTracker)(LibroSqlCellView, undefined, 4) || LibroSqlCellView;
436
+ LibroSqlCellView = inject(ViewManager)(LibroSqlCellView, undefined, 3) || LibroSqlCellView;
437
+ LibroSqlCellView = inject(ConfigurationService)(LibroSqlCellView, undefined, 2) || LibroSqlCellView;
437
438
  LibroSqlCellView = inject(CellService)(LibroSqlCellView, undefined, 1) || LibroSqlCellView;
438
439
  LibroSqlCellView = inject(ViewOption)(LibroSqlCellView, undefined, 0) || LibroSqlCellView;
439
440
  _createClass(LibroSqlCellView, [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-sql-cell",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro",
@@ -32,10 +32,10 @@
32
32
  "src"
33
33
  ],
34
34
  "dependencies": {
35
- "@difizen/libro-code-editor": "^1.0.2",
36
- "@difizen/libro-jupyter": "^1.0.2",
37
- "@difizen/libro-rendermime": "^1.0.2",
38
- "@difizen/libro-common": "^1.0.2",
35
+ "@difizen/libro-code-editor": "^1.0.3",
36
+ "@difizen/libro-jupyter": "^1.0.3",
37
+ "@difizen/libro-rendermime": "^1.0.3",
38
+ "@difizen/libro-common": "^1.0.3",
39
39
  "@ant-design/icons": "^5.1.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -2,24 +2,6 @@ import { EditFilled, DatabaseOutlined } from '@ant-design/icons';
2
2
  import { CodeEditorManager } from '@difizen/libro-code-editor';
3
3
  import type { ICodeCell, IOutput } from '@difizen/libro-common';
4
4
  import { isOutput } from '@difizen/libro-common';
5
- import type {
6
- CellViewOptions,
7
- ExecutionMeta,
8
- IOutputAreaOption,
9
- LibroCell,
10
- KernelMessage,
11
- } from '@difizen/libro-jupyter';
12
- import {
13
- CellService,
14
- EditorStatus,
15
- LibroContextKey,
16
- LibroEditableExecutableCellView,
17
- LibroViewTracker,
18
- VirtualizedManagerHelper,
19
- KernelError,
20
- LibroJupyterModel,
21
- LibroOutputArea,
22
- } from '@difizen/libro-jupyter';
23
5
  import type { ViewSize } from '@difizen/libro-common/app';
24
6
  import {
25
7
  Deferred,
@@ -33,8 +15,27 @@ import {
33
15
  ViewManager,
34
16
  ViewOption,
35
17
  ViewRender,
18
+ ConfigurationService,
36
19
  } from '@difizen/libro-common/app';
37
20
  import { l10n } from '@difizen/libro-common/l10n';
21
+ import {
22
+ CellService,
23
+ EditorStatus,
24
+ LibroContextKey,
25
+ LibroEditableExecutableCellView,
26
+ LibroViewTracker,
27
+ VirtualizedManagerHelper,
28
+ KernelError,
29
+ LibroJupyterModel,
30
+ LibroOutputArea,
31
+ } from '@difizen/libro-jupyter';
32
+ import type {
33
+ CellViewOptions,
34
+ ExecutionMeta,
35
+ IOutputAreaOption,
36
+ LibroCell,
37
+ KernelMessage,
38
+ } from '@difizen/libro-jupyter';
38
39
  import type { InputRef } from 'antd';
39
40
  import { Select } from 'antd';
40
41
  import { Input } from 'antd';
@@ -327,11 +328,12 @@ export class LibroSqlCellView extends LibroEditableExecutableCellView {
327
328
  constructor(
328
329
  @inject(ViewOption) options: CellViewOptions,
329
330
  @inject(CellService) cellService: CellService,
331
+ @inject(ConfigurationService) configurationService: ConfigurationService,
330
332
  @inject(ViewManager) viewManager: ViewManager,
331
333
  @inject(LibroViewTracker) libroViewTracker: LibroViewTracker,
332
334
  @inject(CodeEditorManager) codeEditorManager: CodeEditorManager,
333
335
  ) {
334
- super(options, cellService);
336
+ super(options, cellService, configurationService);
335
337
  this.codeEditorManager = codeEditorManager;
336
338
 
337
339
  this.outputs = options.cell?.outputs as IOutput[];