logisheets 1.13.0 → 1.14.0
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.
- package/dist/src/api/workbook.d.ts +21 -1
- package/dist/src/api/workbook.js +24 -0
- package/dist/src/bindings/axis_scale_update.d.ts +30 -0
- package/dist/src/bindings/axis_scale_update.js +41 -0
- package/dist/src/bindings/block_actor.d.ts +4 -0
- package/dist/src/bindings/block_actor.js +2 -0
- package/dist/src/bindings/block_info.d.ts +6 -0
- package/dist/src/bindings/block_modify_info.d.ts +8 -0
- package/dist/src/bindings/block_modify_info.js +2 -0
- package/dist/src/bindings/block_op.d.ts +1 -0
- package/dist/src/bindings/block_op.js +2 -0
- package/dist/src/bindings/block_permissions.d.ts +31 -0
- package/dist/src/bindings/block_permissions.js +39 -0
- package/dist/src/bindings/chart_axis_scale_info.d.ts +8 -0
- package/dist/src/bindings/chart_axis_scale_info.js +2 -0
- package/dist/src/bindings/chart_block_source.d.ts +18 -0
- package/dist/src/bindings/chart_block_source.js +28 -0
- package/dist/src/bindings/chart_block_source_info.d.ts +5 -0
- package/dist/src/bindings/chart_block_source_info.js +2 -0
- package/dist/src/bindings/chart_data_labels_info.d.ts +9 -0
- package/dist/src/bindings/chart_data_labels_info.js +2 -0
- package/dist/src/bindings/chart_info.d.ts +13 -0
- package/dist/src/bindings/chart_of_pie_split_info.d.ts +5 -0
- package/dist/src/bindings/chart_of_pie_split_info.js +2 -0
- package/dist/src/bindings/chart_series_info.d.ts +6 -0
- package/dist/src/bindings/create_block.d.ts +9 -0
- package/dist/src/bindings/create_block.js +11 -1
- package/dist/src/bindings/create_chart.d.ts +5 -0
- package/dist/src/bindings/create_chart.js +6 -1
- package/dist/src/bindings/create_chart_series.d.ts +12 -0
- package/dist/src/bindings/create_chart_series.js +16 -1
- package/dist/src/bindings/edit_payload.d.ts +8 -0
- package/dist/src/bindings/get_block_modify_info_params.d.ts +4 -0
- package/dist/src/bindings/get_block_modify_info_params.js +2 -0
- package/dist/src/bindings/index.d.ts +15 -0
- package/dist/src/bindings/index.js +15 -0
- package/dist/src/bindings/may_modify_block_params.d.ts +8 -0
- package/dist/src/bindings/may_modify_block_params.js +2 -0
- package/dist/src/bindings/of_pie_split_update.d.ts +18 -0
- package/dist/src/bindings/of_pie_split_update.js +24 -0
- package/dist/src/bindings/rpc_workbook_methods.d.ts +5 -0
- package/dist/src/bindings/set_block_description.d.ts +18 -0
- package/dist/src/bindings/set_block_description.js +30 -0
- package/dist/src/bindings/set_block_permissions.d.ts +24 -0
- package/dist/src/bindings/set_block_permissions.js +35 -0
- package/dist/src/bindings/update_chart.d.ts +68 -0
- package/dist/src/bindings/update_chart.js +81 -1
- package/dist/wasm/logisheets_wasm_server.d.ts +8 -8
- package/dist/wasm/logisheets_wasm_server.js +24 -24
- package/dist/wasm/logisheets_wasm_server_bg.wasm +0 -0
- package/dist/wasm/package.json +1 -1
- package/package.json +1 -1
- package/wasm/logisheets_wasm_server.d.ts +8 -8
- package/wasm/logisheets_wasm_server.js +24 -24
- package/wasm/logisheets_wasm_server_bg.wasm +0 -0
- 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, 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,26 @@ 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
|
+
* A block's governance metadata on its own — owner, default policy,
|
|
189
|
+
* per-operation overrides, description. `getBlockInfo` carries the same
|
|
190
|
+
* fields but drags every cell along with them, which is the wrong shape
|
|
191
|
+
* for a check that runs once per payload.
|
|
192
|
+
*/
|
|
193
|
+
getBlockModifyInfo(params: GetBlockModifyInfoParams): Result<BlockModifyInfo>;
|
|
174
194
|
/**
|
|
175
195
|
* Sort a block's records by the named field and commit the reorder as a
|
|
176
196
|
* single (undoable) transaction. The engine computes the type-aware order;
|
package/dist/src/api/workbook.js
CHANGED
|
@@ -424,6 +424,30 @@ 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
|
+
* A block's governance metadata on its own — owner, default policy,
|
|
444
|
+
* per-operation overrides, description. `getBlockInfo` carries the same
|
|
445
|
+
* fields but drags every cell along with them, which is the wrong shape
|
|
446
|
+
* for a check that runs once per payload.
|
|
447
|
+
*/
|
|
448
|
+
getBlockModifyInfo(params) {
|
|
449
|
+
return rpc('getBlockModifyInfo', params, this._id);
|
|
450
|
+
}
|
|
427
451
|
/**
|
|
428
452
|
* Sort a block's records by the named field and commit the reorder as a
|
|
429
453
|
* 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;
|
|
@@ -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 @@
|
|
|
1
|
+
export type BlockOp = 'insertDeleteLines' | 'removeBlock' | 'modifySchema' | 'cellInput' | 'sortByField' | 'modifyDescription';
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
10
|
+
export declare class BlockPermissionsBuilder {
|
|
11
|
+
private _insertDeleteLines?;
|
|
12
|
+
private _removeBlock?;
|
|
13
|
+
private _modifySchema?;
|
|
14
|
+
private _cellInput?;
|
|
15
|
+
private _sortByField?;
|
|
16
|
+
private _modifyDescription?;
|
|
17
|
+
insertDeleteLines(value: ModifyPolicy): this;
|
|
18
|
+
removeBlock(value: ModifyPolicy): this;
|
|
19
|
+
modifySchema(value: ModifyPolicy): this;
|
|
20
|
+
cellInput(value: ModifyPolicy): this;
|
|
21
|
+
sortByField(value: ModifyPolicy): this;
|
|
22
|
+
modifyDescription(value: ModifyPolicy): this;
|
|
23
|
+
build(): {
|
|
24
|
+
insertDeleteLines: ModifyPolicy | undefined;
|
|
25
|
+
removeBlock: ModifyPolicy | undefined;
|
|
26
|
+
modifySchema: ModifyPolicy | undefined;
|
|
27
|
+
cellInput: ModifyPolicy | undefined;
|
|
28
|
+
sortByField: ModifyPolicy | undefined;
|
|
29
|
+
modifyDescription: ModifyPolicy | undefined;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
insertDeleteLines(value) {
|
|
12
|
+
this._insertDeleteLines = value;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
removeBlock(value) {
|
|
16
|
+
this._removeBlock = value;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
modifySchema(value) {
|
|
20
|
+
this._modifySchema = value;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
cellInput(value) {
|
|
24
|
+
this._cellInput = value;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
sortByField(value) {
|
|
28
|
+
this._sortByField = value;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
modifyDescription(value) {
|
|
32
|
+
this._modifyDescription = value;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
build() {
|
|
36
|
+
return { insertDeleteLines: this._insertDeleteLines, removeBlock: this._removeBlock, modifySchema: this._modifySchema, cellInput: this._cellInput, sortByField: this._sortByField, modifyDescription: this._modifyDescription };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.BlockPermissionsBuilder = BlockPermissionsBuilder;
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -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;
|
|
@@ -51,6 +51,8 @@ import { ReproduceCells } from './reproduce_cells';
|
|
|
51
51
|
import { ResizeBlock } from './resize_block';
|
|
52
52
|
import { ResolveComment } from './resolve_comment';
|
|
53
53
|
import { RestoreCheckpoint } from './restore_checkpoint';
|
|
54
|
+
import { SetBlockDescription } from './set_block_description';
|
|
55
|
+
import { SetBlockPermissions } from './set_block_permissions';
|
|
54
56
|
import { SetCellImage } from './set_cell_image';
|
|
55
57
|
import { SetColWidth } from './set_col_width';
|
|
56
58
|
import { SetRowHeight } from './set_row_height';
|
|
@@ -139,6 +141,12 @@ export type EditPayload = {
|
|
|
139
141
|
} | {
|
|
140
142
|
type: 'blockLineNameFieldUpdate';
|
|
141
143
|
value: BlockLineNameFieldUpdate;
|
|
144
|
+
} | {
|
|
145
|
+
type: 'setBlockDescription';
|
|
146
|
+
value: SetBlockDescription;
|
|
147
|
+
} | {
|
|
148
|
+
type: 'setBlockPermissions';
|
|
149
|
+
value: SetBlockPermissions;
|
|
142
150
|
} | {
|
|
143
151
|
type: 'cellFormatBrush';
|
|
144
152
|
value: CellFormatBrush;
|