logisheets 1.13.0 → 1.14.1

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.
Files changed (62) hide show
  1. package/dist/src/api/workbook.d.ts +35 -1
  2. package/dist/src/api/workbook.js +40 -0
  3. package/dist/src/bindings/axis_scale_update.d.ts +30 -0
  4. package/dist/src/bindings/axis_scale_update.js +41 -0
  5. package/dist/src/bindings/block_actor.d.ts +4 -0
  6. package/dist/src/bindings/block_actor.js +2 -0
  7. package/dist/src/bindings/block_info.d.ts +6 -0
  8. package/dist/src/bindings/block_modify_info.d.ts +8 -0
  9. package/dist/src/bindings/block_modify_info.js +2 -0
  10. package/dist/src/bindings/block_op.d.ts +1 -0
  11. package/dist/src/bindings/block_op.js +2 -0
  12. package/dist/src/bindings/block_permissions.d.ts +35 -0
  13. package/dist/src/bindings/block_permissions.js +44 -0
  14. package/dist/src/bindings/chart_axis_scale_info.d.ts +8 -0
  15. package/dist/src/bindings/chart_axis_scale_info.js +2 -0
  16. package/dist/src/bindings/chart_block_source.d.ts +18 -0
  17. package/dist/src/bindings/chart_block_source.js +28 -0
  18. package/dist/src/bindings/chart_block_source_info.d.ts +5 -0
  19. package/dist/src/bindings/chart_block_source_info.js +2 -0
  20. package/dist/src/bindings/chart_data_labels_info.d.ts +9 -0
  21. package/dist/src/bindings/chart_data_labels_info.js +2 -0
  22. package/dist/src/bindings/chart_info.d.ts +13 -0
  23. package/dist/src/bindings/chart_of_pie_split_info.d.ts +5 -0
  24. package/dist/src/bindings/chart_of_pie_split_info.js +2 -0
  25. package/dist/src/bindings/chart_series_info.d.ts +6 -0
  26. package/dist/src/bindings/check_field_validation_params.d.ts +6 -0
  27. package/dist/src/bindings/check_field_validation_params.js +2 -0
  28. package/dist/src/bindings/create_block.d.ts +9 -0
  29. package/dist/src/bindings/create_block.js +11 -1
  30. package/dist/src/bindings/create_chart.d.ts +5 -0
  31. package/dist/src/bindings/create_chart.js +6 -1
  32. package/dist/src/bindings/create_chart_series.d.ts +12 -0
  33. package/dist/src/bindings/create_chart_series.js +16 -1
  34. package/dist/src/bindings/edit_payload.d.ts +8 -0
  35. package/dist/src/bindings/field_validation_verdict.d.ts +5 -0
  36. package/dist/src/bindings/field_validation_verdict.js +2 -0
  37. package/dist/src/bindings/get_block_modify_info_params.d.ts +4 -0
  38. package/dist/src/bindings/get_block_modify_info_params.js +2 -0
  39. package/dist/src/bindings/index.d.ts +17 -0
  40. package/dist/src/bindings/index.js +17 -0
  41. package/dist/src/bindings/may_modify_block_params.d.ts +8 -0
  42. package/dist/src/bindings/may_modify_block_params.js +2 -0
  43. package/dist/src/bindings/of_pie_split_update.d.ts +18 -0
  44. package/dist/src/bindings/of_pie_split_update.js +24 -0
  45. package/dist/src/bindings/rpc_workbook_methods.d.ts +8 -0
  46. package/dist/src/bindings/set_block_description.d.ts +18 -0
  47. package/dist/src/bindings/set_block_description.js +30 -0
  48. package/dist/src/bindings/set_block_permissions.d.ts +24 -0
  49. package/dist/src/bindings/set_block_permissions.js +35 -0
  50. package/dist/src/bindings/update_chart.d.ts +68 -0
  51. package/dist/src/bindings/update_chart.js +81 -1
  52. package/dist/wasm/logisheets_wasm_server.d.ts +6 -6
  53. package/dist/wasm/logisheets_wasm_server.js +34 -34
  54. package/dist/wasm/logisheets_wasm_server_bg.wasm +0 -0
  55. package/dist/wasm/logisheets_wasm_server_bg.wasm.d.ts +1 -1
  56. package/dist/wasm/package.json +1 -1
  57. package/package.json +1 -1
  58. package/wasm/logisheets_wasm_server.d.ts +6 -6
  59. package/wasm/logisheets_wasm_server.js +34 -34
  60. package/wasm/logisheets_wasm_server_bg.wasm +0 -0
  61. package/wasm/logisheets_wasm_server_bg.wasm.d.ts +1 -1
  62. package/wasm/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { ActionEffect, BlockField, BlockInfo, BlockSortOrder, GetBlockSortOrderParams, FormulaDisplayInfo, ShadowCellInfo, SheetCellId, SheetInfo, SaveFileResult, AppData, CellInfo, CellCoordinateWithSheet, Transaction, GetBlockValuesParams, GetCellIdParams, GetShadowCellIdParams, GetShadowCellIdsParams, GetAvailableBlockIdParams, TempStatusDiff, BlockDataRow, CommentMention } from '../bindings';
1
+ import { ActionEffect, BlockField, BlockInfo, BlockSortOrder, GetBlockSortOrderParams, MayModifyBlockParams, CheckFieldValidationParams, FieldValidationVerdict, GetBlockModifyInfoParams, BlockModifyInfo, FormulaDisplayInfo, ShadowCellInfo, SheetCellId, SheetInfo, SaveFileResult, AppData, CellInfo, CellCoordinateWithSheet, Transaction, GetBlockValuesParams, GetCellIdParams, GetShadowCellIdParams, GetShadowCellIdsParams, GetAvailableBlockIdParams, TempStatusDiff, BlockDataRow, CommentMention } from '../bindings';
2
2
  import { ColId, RowId } from '../types';
3
3
  import { Worksheet } from './worksheet';
4
4
  import { CustomFunc } from './calculator';
@@ -171,6 +171,40 @@ export declare class Workbook {
171
171
  * a sort order. Fails for random-schema blocks (no fields).
172
172
  */
173
173
  getBlockSortOrder(params: GetBlockSortOrderParams): Result<BlockSortOrder>;
174
+ /**
175
+ * Whether `actor` may perform `op` on this block.
176
+ *
177
+ * The engine cannot enforce a block's write policy on its own — a payload
178
+ * carries no trace of who prompted it — so a host that offers an
179
+ * operation should ask this first and refuse it itself. The decision lives
180
+ * in the core so this app, node, the desktop build and the craft runtime
181
+ * cannot drift apart on what a policy means.
182
+ *
183
+ * The block's `description`, `owner`, `modifyPolicy` and `permissions`
184
+ * come back on `getBlockInfo` if you need to explain the refusal.
185
+ */
186
+ mayModifyBlock(params: MayModifyBlockParams): Result<boolean>;
187
+ /**
188
+ * Whether writing `proposed` into this cell would break its field's
189
+ * validation rule.
190
+ *
191
+ * The companion to {@link mayModifyBlock} for `overrideValidation`: that
192
+ * answers whether this actor may write a violating value, this answers
193
+ * whether the value in hand is a violating one. A host gating a write
194
+ * needs both, and needs them BEFORE the write — the marker on the cell
195
+ * only ever judges a value the cell already holds.
196
+ *
197
+ * Reads nothing into the workbook: the rule is evaluated against the
198
+ * proposed value and the cell is left exactly as it was.
199
+ */
200
+ checkFieldValidation(params: CheckFieldValidationParams): Result<FieldValidationVerdict>;
201
+ /**
202
+ * A block's governance metadata on its own — owner, default policy,
203
+ * per-operation overrides, description. `getBlockInfo` carries the same
204
+ * fields but drags every cell along with them, which is the wrong shape
205
+ * for a check that runs once per payload.
206
+ */
207
+ getBlockModifyInfo(params: GetBlockModifyInfoParams): Result<BlockModifyInfo>;
174
208
  /**
175
209
  * Sort a block's records by the named field and commit the reorder as a
176
210
  * single (undoable) transaction. The engine computes the type-aware order;
@@ -424,6 +424,46 @@ class Workbook {
424
424
  getBlockSortOrder(params) {
425
425
  return rpc('getBlockSortOrder', params, this._id);
426
426
  }
427
+ /**
428
+ * Whether `actor` may perform `op` on this block.
429
+ *
430
+ * The engine cannot enforce a block's write policy on its own — a payload
431
+ * carries no trace of who prompted it — so a host that offers an
432
+ * operation should ask this first and refuse it itself. The decision lives
433
+ * in the core so this app, node, the desktop build and the craft runtime
434
+ * cannot drift apart on what a policy means.
435
+ *
436
+ * The block's `description`, `owner`, `modifyPolicy` and `permissions`
437
+ * come back on `getBlockInfo` if you need to explain the refusal.
438
+ */
439
+ mayModifyBlock(params) {
440
+ return rpc('mayModifyBlock', params, this._id);
441
+ }
442
+ /**
443
+ * Whether writing `proposed` into this cell would break its field's
444
+ * validation rule.
445
+ *
446
+ * The companion to {@link mayModifyBlock} for `overrideValidation`: that
447
+ * answers whether this actor may write a violating value, this answers
448
+ * whether the value in hand is a violating one. A host gating a write
449
+ * needs both, and needs them BEFORE the write — the marker on the cell
450
+ * only ever judges a value the cell already holds.
451
+ *
452
+ * Reads nothing into the workbook: the rule is evaluated against the
453
+ * proposed value and the cell is left exactly as it was.
454
+ */
455
+ checkFieldValidation(params) {
456
+ return rpc('checkFieldValidation', params, this._id);
457
+ }
458
+ /**
459
+ * A block's governance metadata on its own — owner, default policy,
460
+ * per-operation overrides, description. `getBlockInfo` carries the same
461
+ * fields but drags every cell along with them, which is the wrong shape
462
+ * for a check that runs once per payload.
463
+ */
464
+ getBlockModifyInfo(params) {
465
+ return rpc('getBlockModifyInfo', params, this._id);
466
+ }
427
467
  /**
428
468
  * Sort a block's records by the named field and commit the reorder as a
429
469
  * single (undoable) transaction. The engine computes the type-aware order;
@@ -0,0 +1,30 @@
1
+ export interface AxisScaleUpdate {
2
+ min?: number;
3
+ max?: number;
4
+ logBase?: number;
5
+ reversed: boolean;
6
+ majorUnit?: number;
7
+ minorUnit?: number;
8
+ }
9
+ export declare class AxisScaleUpdateBuilder {
10
+ private _min?;
11
+ private _max?;
12
+ private _logBase?;
13
+ private _reversed;
14
+ private _majorUnit?;
15
+ private _minorUnit?;
16
+ min(value: number): this;
17
+ max(value: number): this;
18
+ logBase(value: number): this;
19
+ reversed(value: boolean): this;
20
+ majorUnit(value: number): this;
21
+ minorUnit(value: number): this;
22
+ build(): {
23
+ min: number | undefined;
24
+ max: number | undefined;
25
+ logBase: number | undefined;
26
+ reversed: boolean;
27
+ majorUnit: number | undefined;
28
+ minorUnit: number | undefined;
29
+ };
30
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AxisScaleUpdateBuilder = void 0;
4
+ class AxisScaleUpdateBuilder {
5
+ _min;
6
+ _max;
7
+ _logBase;
8
+ _reversed;
9
+ _majorUnit;
10
+ _minorUnit;
11
+ min(value) {
12
+ this._min = value;
13
+ return this;
14
+ }
15
+ max(value) {
16
+ this._max = value;
17
+ return this;
18
+ }
19
+ logBase(value) {
20
+ this._logBase = value;
21
+ return this;
22
+ }
23
+ reversed(value) {
24
+ this._reversed = value;
25
+ return this;
26
+ }
27
+ majorUnit(value) {
28
+ this._majorUnit = value;
29
+ return this;
30
+ }
31
+ minorUnit(value) {
32
+ this._minorUnit = value;
33
+ return this;
34
+ }
35
+ build() {
36
+ if (this._reversed === undefined)
37
+ throw new Error('missing reversed');
38
+ return { min: this._min, max: this._max, logBase: this._logBase, reversed: this._reversed, majorUnit: this._majorUnit, minorUnit: this._minorUnit };
39
+ }
40
+ }
41
+ exports.AxisScaleUpdateBuilder = AxisScaleUpdateBuilder;
@@ -0,0 +1,4 @@
1
+ export type BlockActor = 'user' | {
2
+ type: 'craft';
3
+ value: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,8 @@
1
1
  import { BlockCellInfo } from './block_cell_info';
2
+ import { BlockPermissions } from './block_permissions';
2
3
  import { BlockSchema } from './block_schema';
3
4
  import { FieldRenderEntry } from './field_render_entry';
5
+ import { ModifyPolicy } from './modify_policy';
4
6
  export interface BlockInfo {
5
7
  sheetIdx: number;
6
8
  sheetId: number;
@@ -12,4 +14,8 @@ export interface BlockInfo {
12
14
  schema?: BlockSchema;
13
15
  fieldRenders: readonly FieldRenderEntry[];
14
16
  cells: readonly BlockCellInfo[];
17
+ description: string;
18
+ owner: string;
19
+ modifyPolicy: ModifyPolicy;
20
+ permissions: BlockPermissions;
15
21
  }
@@ -0,0 +1,8 @@
1
+ import { BlockPermissions } from './block_permissions';
2
+ import { ModifyPolicy } from './modify_policy';
3
+ export interface BlockModifyInfo {
4
+ owner: string;
5
+ modifyPolicy: ModifyPolicy;
6
+ permissions: BlockPermissions;
7
+ description: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type BlockOp = 'insertDeleteLines' | 'removeBlock' | 'modifySchema' | 'cellInput' | 'sortByField' | 'modifyDescription' | 'overrideValidation';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import { ModifyPolicy } from './modify_policy';
2
+ export interface BlockPermissions {
3
+ insertDeleteLines?: ModifyPolicy;
4
+ removeBlock?: ModifyPolicy;
5
+ modifySchema?: ModifyPolicy;
6
+ cellInput?: ModifyPolicy;
7
+ sortByField?: ModifyPolicy;
8
+ modifyDescription?: ModifyPolicy;
9
+ overrideValidation?: ModifyPolicy;
10
+ }
11
+ export declare class BlockPermissionsBuilder {
12
+ private _insertDeleteLines?;
13
+ private _removeBlock?;
14
+ private _modifySchema?;
15
+ private _cellInput?;
16
+ private _sortByField?;
17
+ private _modifyDescription?;
18
+ private _overrideValidation?;
19
+ insertDeleteLines(value: ModifyPolicy): this;
20
+ removeBlock(value: ModifyPolicy): this;
21
+ modifySchema(value: ModifyPolicy): this;
22
+ cellInput(value: ModifyPolicy): this;
23
+ sortByField(value: ModifyPolicy): this;
24
+ modifyDescription(value: ModifyPolicy): this;
25
+ overrideValidation(value: ModifyPolicy): this;
26
+ build(): {
27
+ insertDeleteLines: ModifyPolicy | undefined;
28
+ removeBlock: ModifyPolicy | undefined;
29
+ modifySchema: ModifyPolicy | undefined;
30
+ cellInput: ModifyPolicy | undefined;
31
+ sortByField: ModifyPolicy | undefined;
32
+ modifyDescription: ModifyPolicy | undefined;
33
+ overrideValidation: ModifyPolicy | undefined;
34
+ };
35
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlockPermissionsBuilder = void 0;
4
+ class BlockPermissionsBuilder {
5
+ _insertDeleteLines;
6
+ _removeBlock;
7
+ _modifySchema;
8
+ _cellInput;
9
+ _sortByField;
10
+ _modifyDescription;
11
+ _overrideValidation;
12
+ insertDeleteLines(value) {
13
+ this._insertDeleteLines = value;
14
+ return this;
15
+ }
16
+ removeBlock(value) {
17
+ this._removeBlock = value;
18
+ return this;
19
+ }
20
+ modifySchema(value) {
21
+ this._modifySchema = value;
22
+ return this;
23
+ }
24
+ cellInput(value) {
25
+ this._cellInput = value;
26
+ return this;
27
+ }
28
+ sortByField(value) {
29
+ this._sortByField = value;
30
+ return this;
31
+ }
32
+ modifyDescription(value) {
33
+ this._modifyDescription = value;
34
+ return this;
35
+ }
36
+ overrideValidation(value) {
37
+ this._overrideValidation = value;
38
+ return this;
39
+ }
40
+ build() {
41
+ return { insertDeleteLines: this._insertDeleteLines, removeBlock: this._removeBlock, modifySchema: this._modifySchema, cellInput: this._cellInput, sortByField: this._sortByField, modifyDescription: this._modifyDescription, overrideValidation: this._overrideValidation };
42
+ }
43
+ }
44
+ exports.BlockPermissionsBuilder = BlockPermissionsBuilder;
@@ -0,0 +1,8 @@
1
+ export interface ChartAxisScaleInfo {
2
+ min?: number;
3
+ max?: number;
4
+ logBase?: number;
5
+ reversed: boolean;
6
+ majorUnit?: number;
7
+ minorUnit?: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ export interface ChartBlockSource {
2
+ blockId: number;
3
+ categoryField?: string;
4
+ valueFields: readonly string[];
5
+ }
6
+ export declare class ChartBlockSourceBuilder {
7
+ private _blockId;
8
+ private _categoryField?;
9
+ private _valueFields;
10
+ blockId(value: number): this;
11
+ categoryField(value: string): this;
12
+ valueFields(value: readonly string[]): this;
13
+ build(): {
14
+ blockId: number;
15
+ categoryField: string | undefined;
16
+ valueFields: readonly string[];
17
+ };
18
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChartBlockSourceBuilder = void 0;
4
+ class ChartBlockSourceBuilder {
5
+ _blockId;
6
+ _categoryField;
7
+ _valueFields;
8
+ blockId(value) {
9
+ this._blockId = value;
10
+ return this;
11
+ }
12
+ categoryField(value) {
13
+ this._categoryField = value;
14
+ return this;
15
+ }
16
+ valueFields(value) {
17
+ this._valueFields = value;
18
+ return this;
19
+ }
20
+ build() {
21
+ if (this._blockId === undefined)
22
+ throw new Error('missing blockId');
23
+ if (this._valueFields === undefined)
24
+ throw new Error('missing valueFields');
25
+ return { blockId: this._blockId, categoryField: this._categoryField, valueFields: this._valueFields };
26
+ }
27
+ }
28
+ exports.ChartBlockSourceBuilder = ChartBlockSourceBuilder;
@@ -0,0 +1,5 @@
1
+ export interface ChartBlockSourceInfo {
2
+ blockId: number;
3
+ categoryField?: string;
4
+ valueFields: readonly string[];
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export interface ChartDataLabelsInfo {
2
+ showValue: boolean;
3
+ showCategory: boolean;
4
+ showSeries: boolean;
5
+ showPercent: boolean;
6
+ showLegendKey: boolean;
7
+ position?: string;
8
+ numFmt?: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,7 @@
1
+ import { ChartAxisScaleInfo } from './chart_axis_scale_info';
2
+ import { ChartBlockSourceInfo } from './chart_block_source_info';
3
+ import { ChartDataLabelsInfo } from './chart_data_labels_info';
4
+ import { ChartOfPieSplitInfo } from './chart_of_pie_split_info';
1
5
  import { ChartSeriesInfo } from './chart_series_info';
2
6
  export interface ChartInfo {
3
7
  chartId: string;
@@ -9,12 +13,21 @@ export interface ChartInfo {
9
13
  toCol: number;
10
14
  toColOff: number;
11
15
  toRowOff: number;
16
+ extCx?: number;
17
+ extCy?: number;
12
18
  chartType: string;
13
19
  stacked: boolean;
14
20
  title?: string;
15
21
  legendPos?: string;
16
22
  categories: readonly string[];
23
+ catRef?: string;
17
24
  series: readonly ChartSeriesInfo[];
18
25
  catAxisTitle?: string;
19
26
  valAxisTitle?: string;
27
+ dataLabels: ChartDataLabelsInfo;
28
+ ofPieSplit: ChartOfPieSplitInfo;
29
+ valAxisScale: ChartAxisScaleInfo;
30
+ catAxisScale: ChartAxisScaleInfo;
31
+ valAxisNumFmt?: string;
32
+ blockSource?: ChartBlockSourceInfo;
20
33
  }
@@ -0,0 +1,5 @@
1
+ export interface ChartOfPieSplitInfo {
2
+ by?: string;
3
+ pos?: number;
4
+ secondSize?: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,4 +2,10 @@ export interface ChartSeriesInfo {
2
2
  name?: string;
3
3
  values: readonly number[];
4
4
  color?: string;
5
+ formattedValues: readonly string[];
6
+ sizes: readonly number[];
7
+ sizeRef?: string;
8
+ seriesType?: string;
9
+ valRef?: string;
10
+ numFmt?: string;
5
11
  }
@@ -0,0 +1,6 @@
1
+ export interface CheckFieldValidationParams {
2
+ sheetIdx: number;
3
+ row: number;
4
+ col: number;
5
+ proposed: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ import { BlockPermissions } from './block_permissions';
1
2
  import { ModifyPolicy } from './modify_policy';
2
3
  export interface CreateBlock {
3
4
  sheetIdx: number;
@@ -8,6 +9,8 @@ export interface CreateBlock {
8
9
  colCnt: number;
9
10
  owner?: string;
10
11
  modifyPolicy?: ModifyPolicy;
12
+ permissions?: BlockPermissions;
13
+ description?: string;
11
14
  }
12
15
  export declare class CreateBlockBuilder {
13
16
  private _sheetIdx;
@@ -18,6 +21,8 @@ export declare class CreateBlockBuilder {
18
21
  private _colCnt;
19
22
  private _owner?;
20
23
  private _modifyPolicy?;
24
+ private _permissions?;
25
+ private _description?;
21
26
  sheetIdx(value: number): this;
22
27
  id(value: number): this;
23
28
  masterRow(value: number): this;
@@ -26,6 +31,8 @@ export declare class CreateBlockBuilder {
26
31
  colCnt(value: number): this;
27
32
  owner(value: string): this;
28
33
  modifyPolicy(value: ModifyPolicy): this;
34
+ permissions(value: BlockPermissions): this;
35
+ description(value: string): this;
29
36
  build(): {
30
37
  sheetIdx: number;
31
38
  id: number;
@@ -35,5 +42,7 @@ export declare class CreateBlockBuilder {
35
42
  colCnt: number;
36
43
  owner: string | undefined;
37
44
  modifyPolicy: ModifyPolicy | undefined;
45
+ permissions: BlockPermissions | undefined;
46
+ description: string | undefined;
38
47
  };
39
48
  }
@@ -10,6 +10,8 @@ class CreateBlockBuilder {
10
10
  _colCnt;
11
11
  _owner;
12
12
  _modifyPolicy;
13
+ _permissions;
14
+ _description;
13
15
  sheetIdx(value) {
14
16
  this._sheetIdx = value;
15
17
  return this;
@@ -42,6 +44,14 @@ class CreateBlockBuilder {
42
44
  this._modifyPolicy = value;
43
45
  return this;
44
46
  }
47
+ permissions(value) {
48
+ this._permissions = value;
49
+ return this;
50
+ }
51
+ description(value) {
52
+ this._description = value;
53
+ return this;
54
+ }
45
55
  build() {
46
56
  if (this._sheetIdx === undefined)
47
57
  throw new Error('missing sheetIdx');
@@ -55,7 +65,7 @@ class CreateBlockBuilder {
55
65
  throw new Error('missing rowCnt');
56
66
  if (this._colCnt === undefined)
57
67
  throw new Error('missing colCnt');
58
- return { sheetIdx: this._sheetIdx, id: this._id, masterRow: this._masterRow, masterCol: this._masterCol, rowCnt: this._rowCnt, colCnt: this._colCnt, owner: this._owner, modifyPolicy: this._modifyPolicy };
68
+ return { sheetIdx: this._sheetIdx, id: this._id, masterRow: this._masterRow, masterCol: this._masterCol, rowCnt: this._rowCnt, colCnt: this._colCnt, owner: this._owner, modifyPolicy: this._modifyPolicy, permissions: this._permissions, description: this._description };
59
69
  }
60
70
  }
61
71
  exports.CreateBlockBuilder = CreateBlockBuilder;
@@ -1,3 +1,4 @@
1
+ import { ChartBlockSource } from './chart_block_source';
1
2
  import { CreateChartSeries } from './create_chart_series';
2
3
  export interface CreateChart {
3
4
  sheetIdx: number;
@@ -14,6 +15,7 @@ export interface CreateChart {
14
15
  title?: string;
15
16
  categoriesRef?: string;
16
17
  series: readonly CreateChartSeries[];
18
+ blockSource?: ChartBlockSource;
17
19
  }
18
20
  export declare class CreateChartBuilder {
19
21
  private _sheetIdx;
@@ -30,6 +32,7 @@ export declare class CreateChartBuilder {
30
32
  private _title?;
31
33
  private _categoriesRef?;
32
34
  private _series;
35
+ private _blockSource?;
33
36
  sheetIdx(value: number): this;
34
37
  chartId(value: string): this;
35
38
  chartType(value: string): this;
@@ -44,6 +47,7 @@ export declare class CreateChartBuilder {
44
47
  title(value: string): this;
45
48
  categoriesRef(value: string): this;
46
49
  series(value: readonly CreateChartSeries[]): this;
50
+ blockSource(value: ChartBlockSource): this;
47
51
  build(): {
48
52
  sheetIdx: number;
49
53
  chartId: string;
@@ -59,5 +63,6 @@ export declare class CreateChartBuilder {
59
63
  title: string | undefined;
60
64
  categoriesRef: string | undefined;
61
65
  series: readonly CreateChartSeries[];
66
+ blockSource: ChartBlockSource | undefined;
62
67
  };
63
68
  }
@@ -16,6 +16,7 @@ class CreateChartBuilder {
16
16
  _title;
17
17
  _categoriesRef;
18
18
  _series;
19
+ _blockSource;
19
20
  sheetIdx(value) {
20
21
  this._sheetIdx = value;
21
22
  return this;
@@ -72,6 +73,10 @@ class CreateChartBuilder {
72
73
  this._series = value;
73
74
  return this;
74
75
  }
76
+ blockSource(value) {
77
+ this._blockSource = value;
78
+ return this;
79
+ }
75
80
  build() {
76
81
  if (this._sheetIdx === undefined)
77
82
  throw new Error('missing sheetIdx');
@@ -97,7 +102,7 @@ class CreateChartBuilder {
97
102
  throw new Error('missing toRowOff');
98
103
  if (this._series === undefined)
99
104
  throw new Error('missing series');
100
- return { sheetIdx: this._sheetIdx, chartId: this._chartId, chartType: this._chartType, fromRow: this._fromRow, fromCol: this._fromCol, fromColOff: this._fromColOff, fromRowOff: this._fromRowOff, toRow: this._toRow, toCol: this._toCol, toColOff: this._toColOff, toRowOff: this._toRowOff, title: this._title, categoriesRef: this._categoriesRef, series: this._series };
105
+ return { sheetIdx: this._sheetIdx, chartId: this._chartId, chartType: this._chartType, fromRow: this._fromRow, fromCol: this._fromCol, fromColOff: this._fromColOff, fromRowOff: this._fromRowOff, toRow: this._toRow, toCol: this._toCol, toColOff: this._toColOff, toRowOff: this._toRowOff, title: this._title, categoriesRef: this._categoriesRef, series: this._series, blockSource: this._blockSource };
101
106
  }
102
107
  }
103
108
  exports.CreateChartBuilder = CreateChartBuilder;
@@ -1,14 +1,26 @@
1
1
  export interface CreateChartSeries {
2
2
  name?: string;
3
3
  valueRef: string;
4
+ color?: string;
5
+ sizeRef?: string;
6
+ seriesType?: string;
4
7
  }
5
8
  export declare class CreateChartSeriesBuilder {
6
9
  private _name?;
7
10
  private _valueRef;
11
+ private _color?;
12
+ private _sizeRef?;
13
+ private _seriesType?;
8
14
  name(value: string): this;
9
15
  valueRef(value: string): this;
16
+ color(value: string): this;
17
+ sizeRef(value: string): this;
18
+ seriesType(value: string): this;
10
19
  build(): {
11
20
  name: string | undefined;
12
21
  valueRef: string;
22
+ color: string | undefined;
23
+ sizeRef: string | undefined;
24
+ seriesType: string | undefined;
13
25
  };
14
26
  }
@@ -4,6 +4,9 @@ exports.CreateChartSeriesBuilder = void 0;
4
4
  class CreateChartSeriesBuilder {
5
5
  _name;
6
6
  _valueRef;
7
+ _color;
8
+ _sizeRef;
9
+ _seriesType;
7
10
  name(value) {
8
11
  this._name = value;
9
12
  return this;
@@ -12,10 +15,22 @@ class CreateChartSeriesBuilder {
12
15
  this._valueRef = value;
13
16
  return this;
14
17
  }
18
+ color(value) {
19
+ this._color = value;
20
+ return this;
21
+ }
22
+ sizeRef(value) {
23
+ this._sizeRef = value;
24
+ return this;
25
+ }
26
+ seriesType(value) {
27
+ this._seriesType = value;
28
+ return this;
29
+ }
15
30
  build() {
16
31
  if (this._valueRef === undefined)
17
32
  throw new Error('missing valueRef');
18
- return { name: this._name, valueRef: this._valueRef };
33
+ return { name: this._name, valueRef: this._valueRef, color: this._color, sizeRef: this._sizeRef, seriesType: this._seriesType };
19
34
  }
20
35
  }
21
36
  exports.CreateChartSeriesBuilder = CreateChartSeriesBuilder;