@difizen/libro-sql-cell 0.3.24 → 0.3.26

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.
@@ -8,7 +8,7 @@ export interface SqlDecodedFormatter extends DefaultDecodedFormatter {
8
8
  export declare class FormatterSqlMagicContribution implements FormatterContribution<SqlDecodedFormatter> {
9
9
  formatter: string;
10
10
  formatterOptions?: object;
11
- canHandle: (libroFormatter: string) => 100 | 1;
11
+ canHandle: (libroFormatter: string) => 1 | 100;
12
12
  encode: (source: SqlDecodedFormatter) => {
13
13
  source: string;
14
14
  metadata: {
@@ -3,6 +3,7 @@ import type { IOutput } from '@difizen/libro-common';
3
3
  import type { CellViewOptions, LibroCell, KernelMessage } from '@difizen/libro-jupyter';
4
4
  import { CellService, EditorStatus, LibroEditableExecutableCellView, LibroViewTracker, LibroOutputArea } from '@difizen/libro-jupyter';
5
5
  import type { ViewSize } from '@difizen/mana-app';
6
+ import { ConfigurationService } from '@difizen/mana-app';
6
7
  import { Deferred, ViewManager } from '@difizen/mana-app';
7
8
  import React from 'react';
8
9
  import './index.less';
@@ -27,7 +28,7 @@ export declare class LibroSqlCellView extends LibroEditableExecutableCellView {
27
28
  calcEditorAreaHeight(): number;
28
29
  protected outputAreaDeferred: Deferred<LibroOutputArea>;
29
30
  get outputAreaReady(): Promise<LibroOutputArea>;
30
- constructor(options: CellViewOptions, cellService: CellService, viewManager: ViewManager, libroViewTracker: LibroViewTracker, codeEditorManager: CodeEditorManager);
31
+ constructor(options: CellViewOptions, cellService: CellService, configurationService: ConfigurationService, viewManager: ViewManager, libroViewTracker: LibroViewTracker, codeEditorManager: CodeEditorManager);
31
32
  onViewMount: () => Promise<void>;
32
33
  setEditorHost(ref: any): void;
33
34
  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,EAA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@difizen/libro-code-editor';
34
34
  import { isOutput } from '@difizen/libro-common';
35
35
  import { CellService, EditorStatus, LibroContextKey, LibroEditableExecutableCellView, LibroViewTracker, VirtualizedManagerHelper, KernelError, LibroJupyterModel, LibroOutputArea } from '@difizen/libro-jupyter';
36
+ import { ConfigurationService } from '@difizen/mana-app';
36
37
  import { Deferred, getOrigin, inject, prop, transient, useInject, view, ViewInstance, ViewManager, ViewOption, ViewRender } from '@difizen/mana-app';
37
38
  import { l10n } from '@difizen/mana-l10n';
38
39
  import { Select } from 'antd';
@@ -239,11 +240,11 @@ export var LibroSqlCell = /*#__PURE__*/React.forwardRef(function SqlEditorViewCo
239
240
  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
241
  _inherits(LibroSqlCellView, _LibroEditableExecuta);
241
242
  var _super = _createSuper(LibroSqlCellView);
242
- function LibroSqlCellView(options, cellService, viewManager, libroViewTracker, codeEditorManager) {
243
+ function LibroSqlCellView(options, cellService, configurationService, viewManager, libroViewTracker, codeEditorManager) {
243
244
  var _options$cell;
244
245
  var _this;
245
246
  _classCallCheck(this, LibroSqlCellView);
246
- _this = _super.call(this, options, cellService);
247
+ _this = _super.call(this, options, cellService, configurationService);
247
248
  _this.view = LibroSqlCell;
248
249
  _this.libroViewTracker = void 0;
249
250
  _this.outputs = void 0;
@@ -431,9 +432,10 @@ export var LibroSqlCellView = (_dec = transient(), _dec2 = view('libro-sql-cell-
431
432
  });
432
433
  return _this;
433
434
  }
434
- LibroSqlCellView = inject(CodeEditorManager)(LibroSqlCellView, undefined, 4) || LibroSqlCellView;
435
- LibroSqlCellView = inject(LibroViewTracker)(LibroSqlCellView, undefined, 3) || LibroSqlCellView;
436
- LibroSqlCellView = inject(ViewManager)(LibroSqlCellView, undefined, 2) || LibroSqlCellView;
435
+ LibroSqlCellView = inject(CodeEditorManager)(LibroSqlCellView, undefined, 5) || LibroSqlCellView;
436
+ LibroSqlCellView = inject(LibroViewTracker)(LibroSqlCellView, undefined, 4) || LibroSqlCellView;
437
+ LibroSqlCellView = inject(ViewManager)(LibroSqlCellView, undefined, 3) || LibroSqlCellView;
438
+ LibroSqlCellView = inject(ConfigurationService)(LibroSqlCellView, undefined, 2) || LibroSqlCellView;
437
439
  LibroSqlCellView = inject(CellService)(LibroSqlCellView, undefined, 1) || LibroSqlCellView;
438
440
  LibroSqlCellView = inject(ViewOption)(LibroSqlCellView, undefined, 0) || LibroSqlCellView;
439
441
  _createClass(LibroSqlCellView, [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-sql-cell",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
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": "^0.3.24",
36
- "@difizen/libro-jupyter": "^0.3.24",
37
- "@difizen/libro-rendermime": "^0.3.24",
38
- "@difizen/libro-common": "^0.3.24",
35
+ "@difizen/libro-code-editor": "^0.3.26",
36
+ "@difizen/libro-jupyter": "^0.3.26",
37
+ "@difizen/libro-rendermime": "^0.3.26",
38
+ "@difizen/libro-common": "^0.3.26",
39
39
  "@ant-design/icons": "^5.1.0",
40
40
  "@difizen/mana-app": "latest",
41
41
  "@difizen/mana-l10n": "latest"
@@ -21,6 +21,7 @@ import {
21
21
  LibroOutputArea,
22
22
  } from '@difizen/libro-jupyter';
23
23
  import type { ViewSize } from '@difizen/mana-app';
24
+ import { ConfigurationService } from '@difizen/mana-app';
24
25
  import {
25
26
  Deferred,
26
27
  getOrigin,
@@ -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[];