@mog-sdk/node 0.1.11 → 0.1.13
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/index.cjs +1210 -1251
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +485 -88
- package/dist/index.d.ts +485 -88
- package/dist/index.js +1206 -1232
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -67,10 +67,45 @@ function activeCellToStoreCellData(data, row, col) {
|
|
|
67
67
|
}
|
|
68
68
|
async function getData(ctx, sheetId, row, col) {
|
|
69
69
|
const cellId = await ctx.computeBridge.getCellIdAt(sheetId, row, col);
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
if (cellId) {
|
|
71
|
+
const data = await ctx.computeBridge.getActiveCell(sheetId, cellId);
|
|
72
|
+
if (data) return activeCellToStoreCellData(data, row, col);
|
|
73
|
+
}
|
|
74
|
+
const cellData = await ctx.computeBridge.getCellData(sheetId, row, col);
|
|
75
|
+
if (cellData != null) {
|
|
76
|
+
const obj = cellData;
|
|
77
|
+
const rawValue = obj.value ?? obj.raw;
|
|
78
|
+
if (rawValue != null) {
|
|
79
|
+
const value = parseMirrorValue(rawValue);
|
|
80
|
+
if (value !== null && value !== void 0) {
|
|
81
|
+
return {
|
|
82
|
+
id: obj.cell_id ?? obj.cellId ?? "",
|
|
83
|
+
row,
|
|
84
|
+
col,
|
|
85
|
+
raw: value
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return void 0;
|
|
91
|
+
}
|
|
92
|
+
function parseMirrorValue(json) {
|
|
93
|
+
if (typeof json !== "object" || json === null) return null;
|
|
94
|
+
const obj = json;
|
|
95
|
+
switch (obj.type) {
|
|
96
|
+
case "number":
|
|
97
|
+
return obj.value;
|
|
98
|
+
case "text":
|
|
99
|
+
return obj.value;
|
|
100
|
+
case "boolean":
|
|
101
|
+
return obj.value;
|
|
102
|
+
case "error":
|
|
103
|
+
return obj.value;
|
|
104
|
+
case "null":
|
|
105
|
+
return null;
|
|
106
|
+
default:
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
74
109
|
}
|
|
75
110
|
function getEffectiveValue(data) {
|
|
76
111
|
if (data.formula !== void 0) {
|
|
@@ -272,36 +307,6 @@ var init_errors = __esm({
|
|
|
272
307
|
}
|
|
273
308
|
});
|
|
274
309
|
|
|
275
|
-
// ../../contracts/src/document/protection.ts
|
|
276
|
-
var DEFAULT_PROTECTION_OPTIONS, DEFAULT_WORKBOOK_PROTECTION_OPTIONS;
|
|
277
|
-
var init_protection = __esm({
|
|
278
|
-
"../../contracts/src/document/protection.ts"() {
|
|
279
|
-
"use strict";
|
|
280
|
-
init_esm_shims();
|
|
281
|
-
DEFAULT_PROTECTION_OPTIONS = {
|
|
282
|
-
// Selection defaults to true (users can always select cells)
|
|
283
|
-
selectLockedCells: true,
|
|
284
|
-
selectUnlockedCells: true,
|
|
285
|
-
// All other operations blocked by default
|
|
286
|
-
insertRows: false,
|
|
287
|
-
insertColumns: false,
|
|
288
|
-
deleteRows: false,
|
|
289
|
-
deleteColumns: false,
|
|
290
|
-
formatCells: false,
|
|
291
|
-
formatColumns: false,
|
|
292
|
-
formatRows: false,
|
|
293
|
-
sort: false,
|
|
294
|
-
useAutoFilter: false,
|
|
295
|
-
usePivotTableReports: false,
|
|
296
|
-
editObjects: false,
|
|
297
|
-
editScenarios: false
|
|
298
|
-
};
|
|
299
|
-
DEFAULT_WORKBOOK_PROTECTION_OPTIONS = {
|
|
300
|
-
structure: true
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
|
|
305
310
|
// ../../infra/transport/src/command-metadata.gen.ts
|
|
306
311
|
var BYTES_TUPLE_COMMANDS, RECALC_COMMANDS;
|
|
307
312
|
var init_command_metadata_gen = __esm({
|
|
@@ -2210,101 +2215,6 @@ var init_mutation_result_handler = __esm({
|
|
|
2210
2215
|
}
|
|
2211
2216
|
});
|
|
2212
2217
|
|
|
2213
|
-
// ../../contracts/src/core/commands.ts
|
|
2214
|
-
var init_commands = __esm({
|
|
2215
|
-
"../../contracts/src/core/commands.ts"() {
|
|
2216
|
-
"use strict";
|
|
2217
|
-
init_esm_shims();
|
|
2218
|
-
}
|
|
2219
|
-
});
|
|
2220
|
-
|
|
2221
|
-
// ../../contracts/src/core/core.ts
|
|
2222
|
-
var init_core2 = __esm({
|
|
2223
|
-
"../../contracts/src/core/core.ts"() {
|
|
2224
|
-
"use strict";
|
|
2225
|
-
init_esm_shims();
|
|
2226
|
-
}
|
|
2227
|
-
});
|
|
2228
|
-
|
|
2229
|
-
// ../../contracts/src/core/disposable.ts
|
|
2230
|
-
var init_disposable = __esm({
|
|
2231
|
-
"../../contracts/src/core/disposable.ts"() {
|
|
2232
|
-
"use strict";
|
|
2233
|
-
init_esm_shims();
|
|
2234
|
-
}
|
|
2235
|
-
});
|
|
2236
|
-
|
|
2237
|
-
// ../../contracts/src/core/event-base.ts
|
|
2238
|
-
var init_event_base = __esm({
|
|
2239
|
-
"../../contracts/src/core/event-base.ts"() {
|
|
2240
|
-
"use strict";
|
|
2241
|
-
init_esm_shims();
|
|
2242
|
-
}
|
|
2243
|
-
});
|
|
2244
|
-
|
|
2245
|
-
// ../../contracts/src/core/execution.ts
|
|
2246
|
-
var init_execution = __esm({
|
|
2247
|
-
"../../contracts/src/core/execution.ts"() {
|
|
2248
|
-
"use strict";
|
|
2249
|
-
init_esm_shims();
|
|
2250
|
-
}
|
|
2251
|
-
});
|
|
2252
|
-
|
|
2253
|
-
// ../../contracts/src/core/result.ts
|
|
2254
|
-
var init_result = __esm({
|
|
2255
|
-
"../../contracts/src/core/result.ts"() {
|
|
2256
|
-
"use strict";
|
|
2257
|
-
init_esm_shims();
|
|
2258
|
-
}
|
|
2259
|
-
});
|
|
2260
|
-
|
|
2261
|
-
// ../../contracts/src/core/schema.ts
|
|
2262
|
-
var init_schema = __esm({
|
|
2263
|
-
"../../contracts/src/core/schema.ts"() {
|
|
2264
|
-
"use strict";
|
|
2265
|
-
init_esm_shims();
|
|
2266
|
-
}
|
|
2267
|
-
});
|
|
2268
|
-
|
|
2269
|
-
// ../../contracts/src/core/formatted-text.ts
|
|
2270
|
-
function asFormattedText(s) {
|
|
2271
|
-
return s;
|
|
2272
|
-
}
|
|
2273
|
-
function displayStringOrNull(text) {
|
|
2274
|
-
return text;
|
|
2275
|
-
}
|
|
2276
|
-
var init_formatted_text = __esm({
|
|
2277
|
-
"../../contracts/src/core/formatted-text.ts"() {
|
|
2278
|
-
"use strict";
|
|
2279
|
-
init_esm_shims();
|
|
2280
|
-
}
|
|
2281
|
-
});
|
|
2282
|
-
|
|
2283
|
-
// ../../contracts/src/core/testing.ts
|
|
2284
|
-
var init_testing = __esm({
|
|
2285
|
-
"../../contracts/src/core/testing.ts"() {
|
|
2286
|
-
"use strict";
|
|
2287
|
-
init_esm_shims();
|
|
2288
|
-
}
|
|
2289
|
-
});
|
|
2290
|
-
|
|
2291
|
-
// ../../contracts/src/core/index.ts
|
|
2292
|
-
var init_core3 = __esm({
|
|
2293
|
-
"../../contracts/src/core/index.ts"() {
|
|
2294
|
-
"use strict";
|
|
2295
|
-
init_esm_shims();
|
|
2296
|
-
init_commands();
|
|
2297
|
-
init_core2();
|
|
2298
|
-
init_disposable();
|
|
2299
|
-
init_event_base();
|
|
2300
|
-
init_execution();
|
|
2301
|
-
init_result();
|
|
2302
|
-
init_schema();
|
|
2303
|
-
init_formatted_text();
|
|
2304
|
-
init_testing();
|
|
2305
|
-
}
|
|
2306
|
-
});
|
|
2307
|
-
|
|
2308
2218
|
// ../../kernel/src/bridges/wire/constants.gen.ts
|
|
2309
2219
|
var HEADER_SIZE, CELL_STRIDE, MERGE_STRIDE, DIM_STRIDE, NO_STRING, MUTATION_HEADER_SIZE, PATCH_STRIDE, OFF_NUMBER_VALUE, OFF_DISPLAY_OFF, OFF_ERROR_OFF, OFF_FLAGS, OFF_FORMAT_IDX, OFF_DISPLAY_LEN, OFF_ERROR_LEN, OFF_BG_COLOR_OVERRIDE, OFF_FONT_COLOR_OVERRIDE, DATA_BAR_ENTRY_STRIDE, ICON_ENTRY_STRIDE, MUT_HAS_PROJECTION_CHANGES, MUT_HAS_ERRORS, MUT_HAS_PALETTE, ICON_SET_NAMES;
|
|
2310
2220
|
var init_constants_gen = __esm({
|
|
@@ -2362,12 +2272,12 @@ var init_constants_gen = __esm({
|
|
|
2362
2272
|
});
|
|
2363
2273
|
|
|
2364
2274
|
// ../../kernel/src/bridges/wire/binary-mutation-reader.ts
|
|
2275
|
+
import { asFormattedText } from "@mog-sdk/spreadsheet-contracts/core";
|
|
2365
2276
|
var sharedDecoder, BinaryMutationReader;
|
|
2366
2277
|
var init_binary_mutation_reader = __esm({
|
|
2367
2278
|
"../../kernel/src/bridges/wire/binary-mutation-reader.ts"() {
|
|
2368
2279
|
"use strict";
|
|
2369
2280
|
init_esm_shims();
|
|
2370
|
-
init_core3();
|
|
2371
2281
|
init_constants_gen();
|
|
2372
2282
|
sharedDecoder = new TextDecoder("utf-8");
|
|
2373
2283
|
BinaryMutationReader = class {
|
|
@@ -2661,6 +2571,7 @@ var init_binary_mutation_reader = __esm({
|
|
|
2661
2571
|
});
|
|
2662
2572
|
|
|
2663
2573
|
// ../../kernel/src/bridges/wire/binary-viewport-buffer.ts
|
|
2574
|
+
import { asFormattedText as asFormattedText2, displayStringOrNull } from "@mog-sdk/spreadsheet-contracts/core";
|
|
2664
2575
|
function rgbaU32ToHex(value) {
|
|
2665
2576
|
const r = value >>> 24 & 255;
|
|
2666
2577
|
const g = value >>> 16 & 255;
|
|
@@ -2672,7 +2583,6 @@ var init_binary_viewport_buffer = __esm({
|
|
|
2672
2583
|
"../../kernel/src/bridges/wire/binary-viewport-buffer.ts"() {
|
|
2673
2584
|
"use strict";
|
|
2674
2585
|
init_esm_shims();
|
|
2675
|
-
init_core3();
|
|
2676
2586
|
init_constants_gen();
|
|
2677
2587
|
init_constants_gen();
|
|
2678
2588
|
sharedEncoder = new TextEncoder();
|
|
@@ -3769,7 +3679,7 @@ var init_binary_viewport_buffer = __esm({
|
|
|
3769
3679
|
*/
|
|
3770
3680
|
get displayText() {
|
|
3771
3681
|
const decoded = this._buffer.getOrDecodeString(this._displayOff, this._displayLen);
|
|
3772
|
-
return decoded !== null ?
|
|
3682
|
+
return decoded !== null ? asFormattedText2(decoded) : null;
|
|
3773
3683
|
}
|
|
3774
3684
|
/**
|
|
3775
3685
|
* Get the error text for the current cell.
|
|
@@ -3828,6 +3738,7 @@ var init_binary_viewport_buffer = __esm({
|
|
|
3828
3738
|
});
|
|
3829
3739
|
|
|
3830
3740
|
// ../../kernel/src/bridges/wire/viewport-coordinator.ts
|
|
3741
|
+
import { displayStringOrNull as displayStringOrNull2 } from "@mog-sdk/spreadsheet-contracts/core";
|
|
3831
3742
|
function cellKey(row, col) {
|
|
3832
3743
|
return `${row},${col}`;
|
|
3833
3744
|
}
|
|
@@ -3837,7 +3748,6 @@ var init_viewport_coordinator = __esm({
|
|
|
3837
3748
|
"use strict";
|
|
3838
3749
|
init_esm_shims();
|
|
3839
3750
|
init_binary_viewport_buffer();
|
|
3840
|
-
init_core3();
|
|
3841
3751
|
ViewportCoordinator = class {
|
|
3842
3752
|
constructor(viewportId) {
|
|
3843
3753
|
/** Monotonically increasing version, incremented on every write. */
|
|
@@ -3958,7 +3868,7 @@ var init_viewport_coordinator = __esm({
|
|
|
3958
3868
|
flags: reader.patchFlags(i),
|
|
3959
3869
|
numberValue: reader.patchNumberValue(i),
|
|
3960
3870
|
formatIdx: reader.patchFormatIdx(i),
|
|
3961
|
-
displayString:
|
|
3871
|
+
displayString: displayStringOrNull2(reader.patchDisplayText(i)),
|
|
3962
3872
|
errorString: reader.patchErrorText(i),
|
|
3963
3873
|
bgColorOverride: reader.patchBgColorOverride(i),
|
|
3964
3874
|
fontColorOverride: reader.patchFontColorOverride(i),
|
|
@@ -3975,7 +3885,7 @@ var init_viewport_coordinator = __esm({
|
|
|
3975
3885
|
flags: reader.spillPatchFlags(i),
|
|
3976
3886
|
numberValue: reader.spillPatchNumberValue(i),
|
|
3977
3887
|
formatIdx: reader.spillPatchFormatIdx(i),
|
|
3978
|
-
displayString:
|
|
3888
|
+
displayString: displayStringOrNull2(reader.spillPatchDisplayText(i)),
|
|
3979
3889
|
errorString: reader.spillPatchErrorText(i),
|
|
3980
3890
|
bgColorOverride: reader.spillPatchBgColorOverride(i),
|
|
3981
3891
|
fontColorOverride: reader.spillPatchFontColorOverride(i),
|
|
@@ -5135,10 +5045,11 @@ var init_compute_core = __esm({
|
|
|
5135
5045
|
* Requires at least CONTEXT_SET phase (the engine may or may not have been started yet).
|
|
5136
5046
|
* After fullRecalc completes, the bridge transitions to STARTED phase.
|
|
5137
5047
|
*/
|
|
5138
|
-
async fullRecalc() {
|
|
5048
|
+
async fullRecalc(options) {
|
|
5139
5049
|
this.ensurePhase("CONTEXT_SET", "fullRecalc");
|
|
5140
5050
|
const result = await this.transport.call("compute_full_recalc", {
|
|
5141
|
-
docId: this.docId
|
|
5051
|
+
docId: this.docId,
|
|
5052
|
+
options: options ?? {}
|
|
5142
5053
|
});
|
|
5143
5054
|
this._phase = "STARTED";
|
|
5144
5055
|
this.mutationHandler?.applyAndNotify({ recalc: result });
|
|
@@ -6774,6 +6685,9 @@ var init_compute_bridge_gen = __esm({
|
|
|
6774
6685
|
pivotUnregisterDef(sheetId, pivotName) {
|
|
6775
6686
|
return this.core.mutatePlain(this.core.transport.call("compute_pivot_unregister_def", { docId: this.core.docId, sheetId, pivotName }));
|
|
6776
6687
|
}
|
|
6688
|
+
pivotMaterialize(sheetId, pivotId, expansionState) {
|
|
6689
|
+
return this.core.query(this.core.transport.call("compute_pivot_materialize", { docId: this.core.docId, sheetId, pivotId, expansionState }));
|
|
6690
|
+
}
|
|
6777
6691
|
registerViewport(viewportId, sheetId, startRow, startCol, endRow, endCol) {
|
|
6778
6692
|
return this.core.mutatePlain(this.core.transport.call("compute_register_viewport", { docId: this.core.docId, viewportId, sheetId, startRow, startCol, endRow, endCol }));
|
|
6779
6693
|
}
|
|
@@ -6836,6 +6750,7 @@ __export(compute_bridge_exports, {
|
|
|
6836
6750
|
wireTableToTableConfig: () => wireTableToTableConfig,
|
|
6837
6751
|
wireToIdentityFormula: () => wireToIdentityFormula
|
|
6838
6752
|
});
|
|
6753
|
+
import { DEFAULT_PROTECTION_OPTIONS } from "@mog-sdk/spreadsheet-contracts/protection";
|
|
6839
6754
|
function emptyMutationResult() {
|
|
6840
6755
|
return {
|
|
6841
6756
|
recalc: {
|
|
@@ -6906,7 +6821,6 @@ var init_compute_bridge = __esm({
|
|
|
6906
6821
|
"use strict";
|
|
6907
6822
|
init_esm_shims();
|
|
6908
6823
|
init_formula_string();
|
|
6909
|
-
init_protection();
|
|
6910
6824
|
init_src();
|
|
6911
6825
|
init_compute_wire_converters();
|
|
6912
6826
|
init_compute_core();
|
|
@@ -7030,8 +6944,8 @@ var init_compute_bridge = __esm({
|
|
|
7030
6944
|
// ===========================================================================
|
|
7031
6945
|
// Error Recovery delegates
|
|
7032
6946
|
// ===========================================================================
|
|
7033
|
-
fullRecalc() {
|
|
7034
|
-
return this.core.fullRecalc();
|
|
6947
|
+
fullRecalc(options) {
|
|
6948
|
+
return this.core.fullRecalc(options);
|
|
7035
6949
|
}
|
|
7036
6950
|
exportToXlsxBytes() {
|
|
7037
6951
|
return this.core.exportToXlsxBytes();
|
|
@@ -7332,65 +7246,8 @@ var init_compute_bridge = __esm({
|
|
|
7332
7246
|
}
|
|
7333
7247
|
});
|
|
7334
7248
|
|
|
7335
|
-
// ../../contracts/src/rendering/grid-renderer.ts
|
|
7336
|
-
var init_grid_renderer = __esm({
|
|
7337
|
-
"../../contracts/src/rendering/grid-renderer.ts"() {
|
|
7338
|
-
"use strict";
|
|
7339
|
-
init_esm_shims();
|
|
7340
|
-
}
|
|
7341
|
-
});
|
|
7342
|
-
|
|
7343
|
-
// ../../contracts/src/rendering/constants.ts
|
|
7344
|
-
var DEFAULT_COL_WIDTH_WINDOWS, DEFAULT_COL_WIDTH_MACOS, _isMac, DEFAULT_COL_WIDTH;
|
|
7345
|
-
var init_constants = __esm({
|
|
7346
|
-
"../../contracts/src/rendering/constants.ts"() {
|
|
7347
|
-
"use strict";
|
|
7348
|
-
init_esm_shims();
|
|
7349
|
-
DEFAULT_COL_WIDTH_WINDOWS = 64;
|
|
7350
|
-
DEFAULT_COL_WIDTH_MACOS = 72;
|
|
7351
|
-
_isMac = typeof navigator !== "undefined" && /Mac/.test(navigator.platform ?? "");
|
|
7352
|
-
DEFAULT_COL_WIDTH = _isMac ? DEFAULT_COL_WIDTH_MACOS : DEFAULT_COL_WIDTH_WINDOWS;
|
|
7353
|
-
}
|
|
7354
|
-
});
|
|
7355
|
-
|
|
7356
|
-
// ../../contracts/src/rendering/data-sources.ts
|
|
7357
|
-
var DEFAULT_CHROME_THEME;
|
|
7358
|
-
var init_data_sources = __esm({
|
|
7359
|
-
"../../contracts/src/rendering/data-sources.ts"() {
|
|
7360
|
-
"use strict";
|
|
7361
|
-
init_esm_shims();
|
|
7362
|
-
DEFAULT_CHROME_THEME = {
|
|
7363
|
-
canvasBackground: "#ffffff",
|
|
7364
|
-
gridlineColor: "#e0e0e0",
|
|
7365
|
-
headerBackground: "#f8f9fa",
|
|
7366
|
-
headerText: "#333333",
|
|
7367
|
-
headerBorder: "#dadce0",
|
|
7368
|
-
headerHighlightBackground: "#e8eaed",
|
|
7369
|
-
headerHighlightText: "#1a73e8",
|
|
7370
|
-
selectionFill: "rgba(66, 133, 244, 0.1)",
|
|
7371
|
-
selectionBorder: "#4285f4",
|
|
7372
|
-
activeCellBorder: "#1a73e8",
|
|
7373
|
-
fillHandleColor: "#4285f4",
|
|
7374
|
-
dragSourceColor: "rgba(66, 133, 244, 0.15)",
|
|
7375
|
-
dragTargetColor: "#4285f4",
|
|
7376
|
-
scrollbarTrack: "#f1f1f1",
|
|
7377
|
-
scrollbarThumb: "#c1c1c1"
|
|
7378
|
-
};
|
|
7379
|
-
}
|
|
7380
|
-
});
|
|
7381
|
-
|
|
7382
|
-
// ../../contracts/src/rendering/index.ts
|
|
7383
|
-
var init_rendering = __esm({
|
|
7384
|
-
"../../contracts/src/rendering/index.ts"() {
|
|
7385
|
-
"use strict";
|
|
7386
|
-
init_esm_shims();
|
|
7387
|
-
init_grid_renderer();
|
|
7388
|
-
init_constants();
|
|
7389
|
-
init_data_sources();
|
|
7390
|
-
}
|
|
7391
|
-
});
|
|
7392
|
-
|
|
7393
7249
|
// ../../kernel/src/domain/sheets/sheet-meta-defaults.ts
|
|
7250
|
+
import { DEFAULT_COL_WIDTH as _PLATFORM_COL_WIDTH } from "@mog-sdk/spreadsheet-contracts/rendering";
|
|
7394
7251
|
function getSheetMetaDefault(field) {
|
|
7395
7252
|
const def = SHEET_META_SCHEMA[field];
|
|
7396
7253
|
return def.default;
|
|
@@ -7400,9 +7257,8 @@ var init_sheet_meta_defaults = __esm({
|
|
|
7400
7257
|
"../../kernel/src/domain/sheets/sheet-meta-defaults.ts"() {
|
|
7401
7258
|
"use strict";
|
|
7402
7259
|
init_esm_shims();
|
|
7403
|
-
init_rendering();
|
|
7404
7260
|
SHEET_META_DEFAULT_ROW_HEIGHT = 20;
|
|
7405
|
-
SHEET_META_DEFAULT_COL_WIDTH =
|
|
7261
|
+
SHEET_META_DEFAULT_COL_WIDTH = _PLATFORM_COL_WIDTH;
|
|
7406
7262
|
SHEET_META_DEFAULT_GRIDLINE_COLOR = "#e2e2e2";
|
|
7407
7263
|
SHEET_META_SCHEMA = {
|
|
7408
7264
|
// ===========================================================================
|
|
@@ -7931,6 +7787,7 @@ var init_sheet_meta = __esm({
|
|
|
7931
7787
|
});
|
|
7932
7788
|
|
|
7933
7789
|
// ../../spreadsheet-utils/src/range.ts
|
|
7790
|
+
import { MAX_COLS, MAX_ROWS } from "@mog-sdk/spreadsheet-contracts/core";
|
|
7934
7791
|
function normalizeRange(range2) {
|
|
7935
7792
|
return {
|
|
7936
7793
|
startRow: Math.min(range2.startRow, range2.endRow),
|
|
@@ -7946,7 +7803,6 @@ var init_range = __esm({
|
|
|
7946
7803
|
"../../spreadsheet-utils/src/range.ts"() {
|
|
7947
7804
|
"use strict";
|
|
7948
7805
|
init_esm_shims();
|
|
7949
|
-
init_core3();
|
|
7950
7806
|
}
|
|
7951
7807
|
});
|
|
7952
7808
|
|
|
@@ -7974,6 +7830,15 @@ function letterToCol(letters) {
|
|
|
7974
7830
|
function toA12(row, col) {
|
|
7975
7831
|
return `${colToLetter3(col)}${row + 1}`;
|
|
7976
7832
|
}
|
|
7833
|
+
function quoteSheetName(name) {
|
|
7834
|
+
if (/[^A-Za-z0-9_]/.test(name) || /^\d/.test(name)) {
|
|
7835
|
+
return `'${name.replace(/'/g, "''")}'`;
|
|
7836
|
+
}
|
|
7837
|
+
return name;
|
|
7838
|
+
}
|
|
7839
|
+
function toSheetA1(row, col, sheetName) {
|
|
7840
|
+
return `${quoteSheetName(sheetName)}!${colToLetter3(col)}${row + 1}`;
|
|
7841
|
+
}
|
|
7977
7842
|
function parseCellAddress(ref) {
|
|
7978
7843
|
const match = ref.match(CELL_ADDRESS_REGEX);
|
|
7979
7844
|
if (!match) return null;
|
|
@@ -9403,7 +9268,7 @@ var init_data_extractor = __esm({
|
|
|
9403
9268
|
});
|
|
9404
9269
|
|
|
9405
9270
|
// ../../charts/src/core/index.ts
|
|
9406
|
-
var
|
|
9271
|
+
var init_core2 = __esm({
|
|
9407
9272
|
"../../charts/src/core/index.ts"() {
|
|
9408
9273
|
"use strict";
|
|
9409
9274
|
init_esm_shims();
|
|
@@ -13387,7 +13252,7 @@ var init_src2 = __esm({
|
|
|
13387
13252
|
"../../charts/src/index.ts"() {
|
|
13388
13253
|
"use strict";
|
|
13389
13254
|
init_esm_shims();
|
|
13390
|
-
|
|
13255
|
+
init_core2();
|
|
13391
13256
|
init_primitives();
|
|
13392
13257
|
init_compiler();
|
|
13393
13258
|
}
|
|
@@ -13400,6 +13265,15 @@ __export(chart_bridge_exports, {
|
|
|
13400
13265
|
createChartBridge: () => createChartBridge,
|
|
13401
13266
|
initChartWasm: () => initChartWasm
|
|
13402
13267
|
});
|
|
13268
|
+
function normalizeAxisForRendering(axis) {
|
|
13269
|
+
const normAxis = (a) => a ? { ...a, type: a.type ?? a.axisType, show: a.show ?? a.visible } : a;
|
|
13270
|
+
return {
|
|
13271
|
+
...axis,
|
|
13272
|
+
xAxis: normAxis(axis.categoryAxis ?? axis.xAxis),
|
|
13273
|
+
yAxis: normAxis(axis.valueAxis ?? axis.yAxis),
|
|
13274
|
+
secondaryYAxis: normAxis(axis.secondaryValueAxis ?? axis.secondaryYAxis)
|
|
13275
|
+
};
|
|
13276
|
+
}
|
|
13403
13277
|
function toChartConfig(chart) {
|
|
13404
13278
|
return {
|
|
13405
13279
|
type: chart.chartType ?? "bar",
|
|
@@ -13414,12 +13288,13 @@ function toChartConfig(chart) {
|
|
|
13414
13288
|
title: chart.title,
|
|
13415
13289
|
subtitle: chart.subtitle,
|
|
13416
13290
|
legend: chart.legend,
|
|
13417
|
-
axis: chart.axis,
|
|
13291
|
+
axis: chart.axis ? normalizeAxisForRendering(chart.axis) : chart.axis,
|
|
13418
13292
|
colors: chart.colors,
|
|
13419
13293
|
series: chart.series,
|
|
13420
13294
|
dataLabels: chart.dataLabels,
|
|
13421
13295
|
pieSlice: chart.pieSlice,
|
|
13422
|
-
trendline: chart.trendline,
|
|
13296
|
+
trendline: Array.isArray(chart.trendline) ? chart.trendline[0] : chart.trendline,
|
|
13297
|
+
trendlines: chart.trendline,
|
|
13423
13298
|
showLines: chart.showLines,
|
|
13424
13299
|
smoothLines: chart.smoothLines,
|
|
13425
13300
|
radarFilled: chart.radarFilled,
|
|
@@ -13435,7 +13310,7 @@ function toChartConfig(chart) {
|
|
|
13435
13310
|
splitType: chart.splitType,
|
|
13436
13311
|
splitValue: chart.splitValue,
|
|
13437
13312
|
subType: chart.subType,
|
|
13438
|
-
extra: chart.
|
|
13313
|
+
extra: chart.ooxml
|
|
13439
13314
|
};
|
|
13440
13315
|
}
|
|
13441
13316
|
function initChartWasm(exports) {
|
|
@@ -13833,7 +13708,7 @@ var init_chart_bridge = __esm({
|
|
|
13833
13708
|
type: "nominal"
|
|
13834
13709
|
};
|
|
13835
13710
|
}
|
|
13836
|
-
const chartTitle = chart.
|
|
13711
|
+
const chartTitle = chart.ooxml && typeof chart.ooxml === "object" ? chart.ooxml.chartTitle : void 0;
|
|
13837
13712
|
let titleSpec;
|
|
13838
13713
|
if (chart.title) {
|
|
13839
13714
|
titleSpec = {
|
|
@@ -13875,7 +13750,7 @@ var init_chart_bridge = __esm({
|
|
|
13875
13750
|
if (chart.colors && chart.colors.length > 0) {
|
|
13876
13751
|
specConfig.range = { category: chart.colors };
|
|
13877
13752
|
}
|
|
13878
|
-
const chartArea = chart.
|
|
13753
|
+
const chartArea = chart.ooxml && typeof chart.ooxml === "object" ? chart.ooxml.chartArea : void 0;
|
|
13879
13754
|
if (chartArea?.fill && typeof chartArea.fill === "object") {
|
|
13880
13755
|
specConfig.background = chartArea.fill.color;
|
|
13881
13756
|
}
|
|
@@ -15900,10 +15775,11 @@ var init_cell_properties = __esm({
|
|
|
15900
15775
|
});
|
|
15901
15776
|
|
|
15902
15777
|
// ../../kernel/src/api/internal/value-conversions.ts
|
|
15903
|
-
function
|
|
15778
|
+
function normalizeCellValue(cv) {
|
|
15779
|
+
if (cv !== null && isCellError(cv)) return errorDisplayString(cv.value);
|
|
15904
15780
|
return cv;
|
|
15905
15781
|
}
|
|
15906
|
-
function
|
|
15782
|
+
function cellValueToString(cv) {
|
|
15907
15783
|
if (cv === null || cv === void 0) return "";
|
|
15908
15784
|
if (typeof cv === "string") return cv;
|
|
15909
15785
|
if (typeof cv === "number") return String(cv);
|
|
@@ -16067,15 +15943,14 @@ function buildBaseFields(data) {
|
|
|
16067
15943
|
name: data.name,
|
|
16068
15944
|
visible: data.visible,
|
|
16069
15945
|
groupId: data.groupId,
|
|
16070
|
-
altText: data.altText,
|
|
15946
|
+
altText: "altText" in data ? data.altText : void 0,
|
|
16071
15947
|
createdAt: data.createdAt,
|
|
16072
15948
|
updatedAt: data.updatedAt
|
|
16073
15949
|
};
|
|
16074
15950
|
}
|
|
16075
|
-
function toShapeObject(
|
|
16076
|
-
const d = data;
|
|
15951
|
+
function toShapeObject(d) {
|
|
16077
15952
|
return {
|
|
16078
|
-
...buildBaseFields(
|
|
15953
|
+
...buildBaseFields(d),
|
|
16079
15954
|
type: "shape",
|
|
16080
15955
|
shapeType: d.shapeType ?? "rect",
|
|
16081
15956
|
fill: d.fill,
|
|
@@ -16085,10 +15960,9 @@ function toShapeObject(data) {
|
|
|
16085
15960
|
adjustments: d.adjustments
|
|
16086
15961
|
};
|
|
16087
15962
|
}
|
|
16088
|
-
function toPictureObject(
|
|
16089
|
-
const d = data;
|
|
15963
|
+
function toPictureObject(d) {
|
|
16090
15964
|
return {
|
|
16091
|
-
...buildBaseFields(
|
|
15965
|
+
...buildBaseFields(d),
|
|
16092
15966
|
type: "picture",
|
|
16093
15967
|
src: d.src ?? "",
|
|
16094
15968
|
originalWidth: d.originalWidth ?? 0,
|
|
@@ -16097,10 +15971,9 @@ function toPictureObject(data) {
|
|
|
16097
15971
|
adjustments: d.adjustments
|
|
16098
15972
|
};
|
|
16099
15973
|
}
|
|
16100
|
-
function toTextBoxObject(
|
|
16101
|
-
const d = data;
|
|
15974
|
+
function toTextBoxObject(d) {
|
|
16102
15975
|
return {
|
|
16103
|
-
...buildBaseFields(
|
|
15976
|
+
...buildBaseFields(d),
|
|
16104
15977
|
type: "textbox",
|
|
16105
15978
|
content: d.content ?? "",
|
|
16106
15979
|
defaultFormat: d.defaultFormat,
|
|
@@ -16111,10 +15984,9 @@ function toTextBoxObject(data) {
|
|
|
16111
15984
|
wordArt: d.wordArt
|
|
16112
15985
|
};
|
|
16113
15986
|
}
|
|
16114
|
-
function toConnectorObject(
|
|
16115
|
-
const d = data;
|
|
15987
|
+
function toConnectorObject(d) {
|
|
16116
15988
|
return {
|
|
16117
|
-
...buildBaseFields(
|
|
15989
|
+
...buildBaseFields(d),
|
|
16118
15990
|
type: "connector",
|
|
16119
15991
|
shapeType: d.shapeType ?? "connector",
|
|
16120
15992
|
startConnection: d.startConnection,
|
|
@@ -16123,8 +15995,7 @@ function toConnectorObject(data) {
|
|
|
16123
15995
|
outline: d.outline
|
|
16124
15996
|
};
|
|
16125
15997
|
}
|
|
16126
|
-
function toChartObject(
|
|
16127
|
-
const d = data;
|
|
15998
|
+
function toChartObject(d) {
|
|
16128
15999
|
const chartConfig = {
|
|
16129
16000
|
subType: d.subType,
|
|
16130
16001
|
seriesOrientation: d.seriesOrientation,
|
|
@@ -16153,41 +16024,38 @@ function toChartObject(data) {
|
|
|
16153
16024
|
tableCategoryColumn: d.tableCategoryColumn,
|
|
16154
16025
|
useTableColumnNamesAsLabels: d.useTableColumnNamesAsLabels,
|
|
16155
16026
|
tableColumnNames: d.tableColumnNames,
|
|
16156
|
-
definition: d.definition,
|
|
16157
16027
|
ooxml: d.ooxml
|
|
16158
16028
|
};
|
|
16159
16029
|
return {
|
|
16160
|
-
...buildBaseFields(
|
|
16030
|
+
...buildBaseFields(d),
|
|
16161
16031
|
type: "chart",
|
|
16162
16032
|
chartType: d.chartType ?? "column",
|
|
16163
|
-
anchorMode:
|
|
16164
|
-
widthCells: d.widthCells ??
|
|
16165
|
-
heightCells: d.heightCells ??
|
|
16033
|
+
anchorMode: d.anchor.anchorMode === "twoCell" ? "twoCell" : "oneCell",
|
|
16034
|
+
widthCells: d.widthCells ?? d.width ?? 8,
|
|
16035
|
+
heightCells: d.heightCells ?? d.height ?? 15,
|
|
16166
16036
|
chartConfig,
|
|
16167
16037
|
dataRangeIdentity: d.dataRangeIdentity,
|
|
16168
16038
|
seriesRangeIdentity: d.seriesRangeIdentity,
|
|
16169
16039
|
categoryRangeIdentity: d.categoryRangeIdentity
|
|
16170
16040
|
};
|
|
16171
16041
|
}
|
|
16172
|
-
function toEquationObject(
|
|
16173
|
-
const
|
|
16042
|
+
function toEquationObject(d) {
|
|
16043
|
+
const equation = typeof d.equation === "string" ? { id: d.id, omml: d.equation } : d.equation;
|
|
16174
16044
|
return {
|
|
16175
|
-
...buildBaseFields(
|
|
16045
|
+
...buildBaseFields(d),
|
|
16176
16046
|
type: "equation",
|
|
16177
|
-
equation
|
|
16047
|
+
equation
|
|
16178
16048
|
};
|
|
16179
16049
|
}
|
|
16180
|
-
function toSmartArtObject(
|
|
16181
|
-
const d = data;
|
|
16050
|
+
function toSmartArtObject(d) {
|
|
16182
16051
|
return {
|
|
16183
|
-
...buildBaseFields(
|
|
16052
|
+
...buildBaseFields(d),
|
|
16184
16053
|
type: "smartart",
|
|
16185
16054
|
diagram: d.definition ?? {}
|
|
16186
16055
|
};
|
|
16187
16056
|
}
|
|
16188
|
-
function toDrawingObject(
|
|
16189
|
-
const common = buildBaseFields(
|
|
16190
|
-
const d = data;
|
|
16057
|
+
function toDrawingObject(d) {
|
|
16058
|
+
const common = buildBaseFields(d);
|
|
16191
16059
|
const strokes = /* @__PURE__ */ new Map();
|
|
16192
16060
|
if (d.strokes) {
|
|
16193
16061
|
for (const [id, stroke] of Object.entries(d.strokes)) {
|
|
@@ -16212,10 +16080,9 @@ function toDrawingObject(data) {
|
|
|
16212
16080
|
backgroundColor: d.backgroundColor
|
|
16213
16081
|
};
|
|
16214
16082
|
}
|
|
16215
|
-
function toOleObjectObject(
|
|
16216
|
-
const d = data;
|
|
16083
|
+
function toOleObjectObject(d) {
|
|
16217
16084
|
return {
|
|
16218
|
-
...buildBaseFields(
|
|
16085
|
+
...buildBaseFields(d),
|
|
16219
16086
|
type: "oleObject",
|
|
16220
16087
|
progId: d.progId ?? "",
|
|
16221
16088
|
dvAspect: d.dvAspect ?? "content",
|
|
@@ -16226,8 +16093,7 @@ function toOleObjectObject(data) {
|
|
|
16226
16093
|
};
|
|
16227
16094
|
}
|
|
16228
16095
|
function toFloatingObject(data) {
|
|
16229
|
-
|
|
16230
|
-
switch (objectType) {
|
|
16096
|
+
switch (data.type) {
|
|
16231
16097
|
case "shape":
|
|
16232
16098
|
return toShapeObject(data);
|
|
16233
16099
|
case "picture":
|
|
@@ -16247,10 +16113,43 @@ function toFloatingObject(data) {
|
|
|
16247
16113
|
case "drawing":
|
|
16248
16114
|
return toDrawingObject(data);
|
|
16249
16115
|
case "slicer":
|
|
16250
|
-
|
|
16251
|
-
|
|
16116
|
+
case "camera":
|
|
16117
|
+
case "formControl":
|
|
16118
|
+
default: {
|
|
16119
|
+
const fallback = Object.assign({}, data, { type: "shape" });
|
|
16120
|
+
return toShapeObject(fallback);
|
|
16121
|
+
}
|
|
16252
16122
|
}
|
|
16253
16123
|
}
|
|
16124
|
+
function createMinimalFloatingObject(type, id, sheetId, extras) {
|
|
16125
|
+
const wire = {
|
|
16126
|
+
id,
|
|
16127
|
+
sheetId,
|
|
16128
|
+
type,
|
|
16129
|
+
anchor: {
|
|
16130
|
+
anchorRow: 0,
|
|
16131
|
+
anchorCol: 0,
|
|
16132
|
+
anchorRowOffset: 0,
|
|
16133
|
+
anchorColOffset: 0,
|
|
16134
|
+
anchorMode: "absolute"
|
|
16135
|
+
},
|
|
16136
|
+
width: 100,
|
|
16137
|
+
height: 100,
|
|
16138
|
+
zIndex: 0,
|
|
16139
|
+
rotation: 0,
|
|
16140
|
+
flipH: false,
|
|
16141
|
+
flipV: false,
|
|
16142
|
+
locked: false,
|
|
16143
|
+
visible: true,
|
|
16144
|
+
printable: true,
|
|
16145
|
+
opacity: 1,
|
|
16146
|
+
name: "",
|
|
16147
|
+
createdAt: 0,
|
|
16148
|
+
updatedAt: 0,
|
|
16149
|
+
...extras
|
|
16150
|
+
};
|
|
16151
|
+
return toFloatingObject(wire);
|
|
16152
|
+
}
|
|
16254
16153
|
var init_floating_object_mapper = __esm({
|
|
16255
16154
|
"../../kernel/src/bridges/compute/floating-object-mapper.ts"() {
|
|
16256
16155
|
"use strict";
|
|
@@ -16463,7 +16362,7 @@ function toDisposable(fn) {
|
|
|
16463
16362
|
return disposable;
|
|
16464
16363
|
}
|
|
16465
16364
|
var DisposableBase, DisposableStore, DisposableNone;
|
|
16466
|
-
var
|
|
16365
|
+
var init_disposable = __esm({
|
|
16467
16366
|
"../../spreadsheet-utils/src/disposable.ts"() {
|
|
16468
16367
|
"use strict";
|
|
16469
16368
|
init_esm_shims();
|
|
@@ -16527,7 +16426,7 @@ function ok(value) {
|
|
|
16527
16426
|
function err(error) {
|
|
16528
16427
|
return { ok: false, error };
|
|
16529
16428
|
}
|
|
16530
|
-
var
|
|
16429
|
+
var init_result = __esm({
|
|
16531
16430
|
"../../spreadsheet-utils/src/result.ts"() {
|
|
16532
16431
|
"use strict";
|
|
16533
16432
|
init_esm_shims();
|
|
@@ -16540,7 +16439,7 @@ var init_subscribable = __esm({
|
|
|
16540
16439
|
"../../kernel/src/services/primitives/subscribable.ts"() {
|
|
16541
16440
|
"use strict";
|
|
16542
16441
|
init_esm_shims();
|
|
16543
|
-
|
|
16442
|
+
init_disposable();
|
|
16544
16443
|
Subscribable = class extends DisposableBase {
|
|
16545
16444
|
constructor() {
|
|
16546
16445
|
super(...arguments);
|
|
@@ -16600,7 +16499,7 @@ var init_event_emitter = __esm({
|
|
|
16600
16499
|
"../../kernel/src/services/primitives/event-emitter.ts"() {
|
|
16601
16500
|
"use strict";
|
|
16602
16501
|
init_esm_shims();
|
|
16603
|
-
|
|
16502
|
+
init_disposable();
|
|
16604
16503
|
TypedEventEmitter = class extends DisposableBase {
|
|
16605
16504
|
constructor() {
|
|
16606
16505
|
super(...arguments);
|
|
@@ -16665,8 +16564,8 @@ var init_primitives3 = __esm({
|
|
|
16665
16564
|
"../../kernel/src/services/primitives/index.ts"() {
|
|
16666
16565
|
"use strict";
|
|
16667
16566
|
init_esm_shims();
|
|
16668
|
-
|
|
16669
|
-
|
|
16567
|
+
init_disposable();
|
|
16568
|
+
init_result();
|
|
16670
16569
|
init_subscribable();
|
|
16671
16570
|
init_event_emitter();
|
|
16672
16571
|
}
|
|
@@ -24716,34 +24615,8 @@ var init_equation_bridge = __esm({
|
|
|
24716
24615
|
}
|
|
24717
24616
|
});
|
|
24718
24617
|
|
|
24719
|
-
// ../../contracts/src/bridges/ink-recognition-bridge.ts
|
|
24720
|
-
var DEFAULT_RECOGNITION_THRESHOLDS;
|
|
24721
|
-
var init_ink_recognition_bridge = __esm({
|
|
24722
|
-
"../../contracts/src/bridges/ink-recognition-bridge.ts"() {
|
|
24723
|
-
"use strict";
|
|
24724
|
-
init_esm_shims();
|
|
24725
|
-
DEFAULT_RECOGNITION_THRESHOLDS = {
|
|
24726
|
-
line: 0.7,
|
|
24727
|
-
rectangle: 0.65,
|
|
24728
|
-
ellipse: 0.7,
|
|
24729
|
-
triangle: 0.6,
|
|
24730
|
-
arrow: 0.6,
|
|
24731
|
-
star: 0.65,
|
|
24732
|
-
text: 0.5
|
|
24733
|
-
};
|
|
24734
|
-
}
|
|
24735
|
-
});
|
|
24736
|
-
|
|
24737
|
-
// ../../contracts/src/bridges/index.ts
|
|
24738
|
-
var init_bridges = __esm({
|
|
24739
|
-
"../../contracts/src/bridges/index.ts"() {
|
|
24740
|
-
"use strict";
|
|
24741
|
-
init_esm_shims();
|
|
24742
|
-
init_ink_recognition_bridge();
|
|
24743
|
-
}
|
|
24744
|
-
});
|
|
24745
|
-
|
|
24746
24618
|
// ../../kernel/src/domain/drawing/ink-recognition-bridge.ts
|
|
24619
|
+
import { DEFAULT_RECOGNITION_THRESHOLDS } from "@mog-sdk/spreadsheet-contracts/bridges";
|
|
24747
24620
|
function createInkRecognitionBridge(initialThresholds) {
|
|
24748
24621
|
let thresholds = {
|
|
24749
24622
|
...DEFAULT_RECOGNITION_THRESHOLDS,
|
|
@@ -25159,11 +25032,10 @@ async function recognizeWithBrowserAPI(strokes) {
|
|
|
25159
25032
|
}
|
|
25160
25033
|
return null;
|
|
25161
25034
|
}
|
|
25162
|
-
var
|
|
25035
|
+
var init_ink_recognition_bridge = __esm({
|
|
25163
25036
|
"../../kernel/src/domain/drawing/ink-recognition-bridge.ts"() {
|
|
25164
25037
|
"use strict";
|
|
25165
25038
|
init_esm_shims();
|
|
25166
|
-
init_bridges();
|
|
25167
25039
|
}
|
|
25168
25040
|
});
|
|
25169
25041
|
|
|
@@ -25401,7 +25273,7 @@ var init_pivot_bridge = __esm({
|
|
|
25401
25273
|
expandedColumns: {}
|
|
25402
25274
|
};
|
|
25403
25275
|
try {
|
|
25404
|
-
const result = await this.ctx.computeBridge.
|
|
25276
|
+
const result = await this.ctx.computeBridge.pivotMaterialize(
|
|
25405
25277
|
sheetId,
|
|
25406
25278
|
pivotId,
|
|
25407
25279
|
expansionState ?? null
|
|
@@ -25605,7 +25477,7 @@ var init_pivot_bridge = __esm({
|
|
|
25605
25477
|
const rowData = [];
|
|
25606
25478
|
for (let col = range2.startCol; col <= range2.endCol; col++) {
|
|
25607
25479
|
const cell = cellMap.get(`${row},${col}`);
|
|
25608
|
-
rowData.push(cell ?
|
|
25480
|
+
rowData.push(cell ? normalizeCellValue(cell.value) ?? null : null);
|
|
25609
25481
|
}
|
|
25610
25482
|
data.push(rowData);
|
|
25611
25483
|
}
|
|
@@ -30176,7 +30048,7 @@ var init_arrows = __esm({
|
|
|
30176
30048
|
|
|
30177
30049
|
// ../../canvas/drawing/shapes/src/presets/constants.ts
|
|
30178
30050
|
var KAPPA;
|
|
30179
|
-
var
|
|
30051
|
+
var init_constants = __esm({
|
|
30180
30052
|
"../../canvas/drawing/shapes/src/presets/constants.ts"() {
|
|
30181
30053
|
"use strict";
|
|
30182
30054
|
init_esm_shims();
|
|
@@ -30200,7 +30072,7 @@ var init_primitives4 = __esm({
|
|
|
30200
30072
|
"use strict";
|
|
30201
30073
|
init_esm_shims();
|
|
30202
30074
|
init_src3();
|
|
30203
|
-
|
|
30075
|
+
init_constants();
|
|
30204
30076
|
}
|
|
30205
30077
|
});
|
|
30206
30078
|
|
|
@@ -30210,7 +30082,7 @@ var init_basic = __esm({
|
|
|
30210
30082
|
"use strict";
|
|
30211
30083
|
init_esm_shims();
|
|
30212
30084
|
init_src3();
|
|
30213
|
-
|
|
30085
|
+
init_constants();
|
|
30214
30086
|
init_primitives4();
|
|
30215
30087
|
init_registry3();
|
|
30216
30088
|
init_primitives4();
|
|
@@ -70283,438 +70155,21 @@ var init_rules = __esm({
|
|
|
70283
70155
|
}
|
|
70284
70156
|
});
|
|
70285
70157
|
|
|
70286
|
-
// ../../contracts/src/smartart/layouts.ts
|
|
70287
|
-
var init_layouts2 = __esm({
|
|
70288
|
-
"../../contracts/src/smartart/layouts.ts"() {
|
|
70289
|
-
"use strict";
|
|
70290
|
-
init_esm_shims();
|
|
70291
|
-
}
|
|
70292
|
-
});
|
|
70293
|
-
|
|
70294
|
-
// ../../contracts/src/smartart/ooxml-algorithm-types.ts
|
|
70295
|
-
var ParameterId, VALID_PARAMS_BY_ALGORITHM;
|
|
70296
|
-
var init_ooxml_algorithm_types = __esm({
|
|
70297
|
-
"../../contracts/src/smartart/ooxml-algorithm-types.ts"() {
|
|
70298
|
-
"use strict";
|
|
70299
|
-
init_esm_shims();
|
|
70300
|
-
ParameterId = {
|
|
70301
|
-
// ── Alignment Parameters ──────────────────────────────────────────────────
|
|
70302
|
-
/** Horizontal alignment of children within the layout area. */
|
|
70303
|
-
horzAlign: "horzAlign",
|
|
70304
|
-
/** Vertical alignment of children within the layout area. */
|
|
70305
|
-
vertAlign: "vertAlign",
|
|
70306
|
-
/** Horizontal alignment for individual nodes (hierarchy algorithms). */
|
|
70307
|
-
nodeHorzAlign: "nodeHorzAlign",
|
|
70308
|
-
/** Vertical alignment for individual nodes (hierarchy algorithms). */
|
|
70309
|
-
nodeVertAlign: "nodeVertAlign",
|
|
70310
|
-
/** Hierarchy alignment (16 possible values for tree orientation). */
|
|
70311
|
-
hierAlign: "hierAlign",
|
|
70312
|
-
/** Text alignment (whether text should be aligned with shape). */
|
|
70313
|
-
alignTx: "alignTx",
|
|
70314
|
-
// ── Direction Parameters ──────────────────────────────────────────────────
|
|
70315
|
-
/** Child direction (horizontal or vertical arrangement of children). */
|
|
70316
|
-
chDir: "chDir",
|
|
70317
|
-
/** Child alignment (how children align on the cross-axis). */
|
|
70318
|
-
chAlign: "chAlign",
|
|
70319
|
-
/** Secondary child alignment (for complex hierarchy layouts). */
|
|
70320
|
-
secChAlign: "secChAlign",
|
|
70321
|
-
/** Linear direction (which edge children flow from). */
|
|
70322
|
-
linDir: "linDir",
|
|
70323
|
-
/** Secondary linear direction (for complex hierarchy layouts). */
|
|
70324
|
-
secLinDir: "secLinDir",
|
|
70325
|
-
/** Text direction (horizontal or vertical text blocks). */
|
|
70326
|
-
txDir: "txDir",
|
|
70327
|
-
/** Text block direction (horizontal or vertical text flow). */
|
|
70328
|
-
txBlDir: "txBlDir",
|
|
70329
|
-
/** Growth direction (which corner the snake starts from). */
|
|
70330
|
-
grDir: "grDir",
|
|
70331
|
-
/** Flow direction (whether snake flows by row or column). */
|
|
70332
|
-
flowDir: "flowDir",
|
|
70333
|
-
/** Continue direction (same direction or reversed for each row). */
|
|
70334
|
-
contDir: "contDir",
|
|
70335
|
-
// ── Connector Parameters ──────────────────────────────────────────────────
|
|
70336
|
-
/** Connector routing style (straight, bend, curve, long curve). */
|
|
70337
|
-
connRout: "connRout",
|
|
70338
|
-
/** Beginning/start arrowhead style for connectors. */
|
|
70339
|
-
begSty: "begSty",
|
|
70340
|
-
/** Ending arrowhead style for connectors. */
|
|
70341
|
-
endSty: "endSty",
|
|
70342
|
-
/** Connector dimension (1D, 2D, or custom). */
|
|
70343
|
-
dim: "dim",
|
|
70344
|
-
/** Source node name for connector routing. */
|
|
70345
|
-
srcNode: "srcNode",
|
|
70346
|
-
/** Destination node name for connector routing. */
|
|
70347
|
-
dstNode: "dstNode",
|
|
70348
|
-
/** Beginning connection points (which points on the source shape). */
|
|
70349
|
-
begPts: "begPts",
|
|
70350
|
-
/** Ending connection points (which points on the destination shape). */
|
|
70351
|
-
endPts: "endPts",
|
|
70352
|
-
/** Bend point position for right-angle connectors. */
|
|
70353
|
-
bendPt: "bendPt",
|
|
70354
|
-
// ── Cycle/Circular Parameters ─────────────────────────────────────────────
|
|
70355
|
-
/** Start angle in degrees for cycle algorithm. */
|
|
70356
|
-
stAng: "stAng",
|
|
70357
|
-
/** Span angle in degrees for cycle algorithm. */
|
|
70358
|
-
spanAng: "spanAng",
|
|
70359
|
-
/** Rotation path (none or along the circular path). */
|
|
70360
|
-
rotPath: "rotPath",
|
|
70361
|
-
/** Center shape mapping (whether first node goes to center). */
|
|
70362
|
-
ctrShpMap: "ctrShpMap",
|
|
70363
|
-
// ── Snake Parameters ──────────────────────────────────────────────────────
|
|
70364
|
-
/** Breakpoint logic for snake wrapping (end of canvas, balanced, fixed). */
|
|
70365
|
-
bkpt: "bkpt",
|
|
70366
|
-
/** Breakpoint fixed value (number of items per row when bkpt=fixed). */
|
|
70367
|
-
bkPtFixedVal: "bkPtFixedVal",
|
|
70368
|
-
/** Offset mode for staggered rows in snake layout. */
|
|
70369
|
-
off: "off",
|
|
70370
|
-
// ── Linear/Sequence Parameters ────────────────────────────────────────────
|
|
70371
|
-
/** Starting element index (which node type starts the alternating sequence). */
|
|
70372
|
-
stElem: "stElem",
|
|
70373
|
-
/** Starting bullet level for text algorithm. */
|
|
70374
|
-
stBulletLvl: "stBulletLvl",
|
|
70375
|
-
// ── Pyramid Parameters ────────────────────────────────────────────────────
|
|
70376
|
-
/** Pyramid accent position (before or after the level). */
|
|
70377
|
-
pyraAcctPos: "pyraAcctPos",
|
|
70378
|
-
/** Pyramid accent text margin (step or stack behavior). */
|
|
70379
|
-
pyraAcctTxMar: "pyraAcctTxMar",
|
|
70380
|
-
/** Pyramid level node name. */
|
|
70381
|
-
pyraLvlNode: "pyraLvlNode",
|
|
70382
|
-
/** Pyramid accent background node name. */
|
|
70383
|
-
pyraAcctBkgdNode: "pyraAcctBkgdNode",
|
|
70384
|
-
/** Pyramid accent text node name. */
|
|
70385
|
-
pyraAcctTxNode: "pyraAcctTxNode",
|
|
70386
|
-
// ── Text Parameters ───────────────────────────────────────────────────────
|
|
70387
|
-
/** Parent text LTR alignment. */
|
|
70388
|
-
parTxLTRAlign: "parTxLTRAlign",
|
|
70389
|
-
/** Parent text RTL alignment. */
|
|
70390
|
-
parTxRTLAlign: "parTxRTLAlign",
|
|
70391
|
-
/** Shape text LTR alignment for children. */
|
|
70392
|
-
shpTxLTRAlignCh: "shpTxLTRAlignCh",
|
|
70393
|
-
/** Shape text RTL alignment for children. */
|
|
70394
|
-
shpTxRTLAlignCh: "shpTxRTLAlignCh",
|
|
70395
|
-
/** Text anchor horizontal position. */
|
|
70396
|
-
txAnchorHorz: "txAnchorHorz",
|
|
70397
|
-
/** Text anchor vertical position. */
|
|
70398
|
-
txAnchorVert: "txAnchorVert",
|
|
70399
|
-
/** Text anchor horizontal position for children. */
|
|
70400
|
-
txAnchorHorzCh: "txAnchorHorzCh",
|
|
70401
|
-
/** Text anchor vertical position for children. */
|
|
70402
|
-
txAnchorVertCh: "txAnchorVertCh",
|
|
70403
|
-
/** Auto text rotation mode (none, upright, gravity-based). */
|
|
70404
|
-
autoTxRot: "autoTxRot",
|
|
70405
|
-
// ── Spacing & Sizing Parameters ───────────────────────────────────────────
|
|
70406
|
-
/** Aspect ratio value. */
|
|
70407
|
-
ar: "ar",
|
|
70408
|
-
/** Line spacing for parent text (percentage). */
|
|
70409
|
-
lnSpPar: "lnSpPar",
|
|
70410
|
-
/** Line spacing after parent paragraph (percentage). */
|
|
70411
|
-
lnSpAfParP: "lnSpAfParP",
|
|
70412
|
-
/** Line spacing for child text (percentage). */
|
|
70413
|
-
lnSpCh: "lnSpCh",
|
|
70414
|
-
/** Line spacing after child paragraph (percentage). */
|
|
70415
|
-
lnSpAfChP: "lnSpAfChP",
|
|
70416
|
-
// ── Hierarchy-Specific Parameters ─────────────────────────────────────────
|
|
70417
|
-
/** Root short distance flag (hierarchy algorithms). */
|
|
70418
|
-
rtShortDist: "rtShortDist",
|
|
70419
|
-
// ── Fallback Parameter ────────────────────────────────────────────────────
|
|
70420
|
-
/** Fallback dimension for the algorithm. */
|
|
70421
|
-
fallback: "fallback"
|
|
70422
|
-
};
|
|
70423
|
-
VALID_PARAMS_BY_ALGORITHM = {
|
|
70424
|
-
composite: [ParameterId.ar],
|
|
70425
|
-
lin: [
|
|
70426
|
-
ParameterId.linDir,
|
|
70427
|
-
ParameterId.chDir,
|
|
70428
|
-
ParameterId.chAlign,
|
|
70429
|
-
ParameterId.horzAlign,
|
|
70430
|
-
ParameterId.vertAlign,
|
|
70431
|
-
ParameterId.stElem,
|
|
70432
|
-
ParameterId.fallback,
|
|
70433
|
-
ParameterId.nodeHorzAlign,
|
|
70434
|
-
ParameterId.nodeVertAlign
|
|
70435
|
-
],
|
|
70436
|
-
snake: [
|
|
70437
|
-
ParameterId.grDir,
|
|
70438
|
-
ParameterId.flowDir,
|
|
70439
|
-
ParameterId.contDir,
|
|
70440
|
-
ParameterId.bkpt,
|
|
70441
|
-
ParameterId.bkPtFixedVal,
|
|
70442
|
-
ParameterId.off
|
|
70443
|
-
],
|
|
70444
|
-
cycle: [ParameterId.stAng, ParameterId.spanAng, ParameterId.rotPath, ParameterId.ctrShpMap],
|
|
70445
|
-
hierRoot: [
|
|
70446
|
-
ParameterId.hierAlign,
|
|
70447
|
-
ParameterId.nodeHorzAlign,
|
|
70448
|
-
ParameterId.nodeVertAlign,
|
|
70449
|
-
ParameterId.rtShortDist
|
|
70450
|
-
],
|
|
70451
|
-
hierChild: [
|
|
70452
|
-
ParameterId.chAlign,
|
|
70453
|
-
ParameterId.linDir,
|
|
70454
|
-
ParameterId.secChAlign,
|
|
70455
|
-
ParameterId.secLinDir
|
|
70456
|
-
],
|
|
70457
|
-
pyra: [
|
|
70458
|
-
ParameterId.linDir,
|
|
70459
|
-
ParameterId.txDir,
|
|
70460
|
-
ParameterId.pyraAcctPos,
|
|
70461
|
-
ParameterId.pyraAcctTxMar,
|
|
70462
|
-
ParameterId.pyraLvlNode,
|
|
70463
|
-
ParameterId.pyraAcctBkgdNode,
|
|
70464
|
-
ParameterId.pyraAcctTxNode
|
|
70465
|
-
],
|
|
70466
|
-
conn: [
|
|
70467
|
-
ParameterId.srcNode,
|
|
70468
|
-
ParameterId.dstNode,
|
|
70469
|
-
ParameterId.connRout,
|
|
70470
|
-
ParameterId.begSty,
|
|
70471
|
-
ParameterId.endSty,
|
|
70472
|
-
ParameterId.dim,
|
|
70473
|
-
ParameterId.bendPt,
|
|
70474
|
-
ParameterId.begPts,
|
|
70475
|
-
ParameterId.endPts
|
|
70476
|
-
],
|
|
70477
|
-
tx: [
|
|
70478
|
-
ParameterId.parTxLTRAlign,
|
|
70479
|
-
ParameterId.parTxRTLAlign,
|
|
70480
|
-
ParameterId.shpTxLTRAlignCh,
|
|
70481
|
-
ParameterId.shpTxRTLAlignCh,
|
|
70482
|
-
ParameterId.txAnchorVert,
|
|
70483
|
-
ParameterId.txAnchorHorz,
|
|
70484
|
-
ParameterId.txAnchorVertCh,
|
|
70485
|
-
ParameterId.txAnchorHorzCh,
|
|
70486
|
-
ParameterId.txBlDir,
|
|
70487
|
-
ParameterId.autoTxRot,
|
|
70488
|
-
ParameterId.stBulletLvl,
|
|
70489
|
-
ParameterId.lnSpPar,
|
|
70490
|
-
ParameterId.lnSpAfParP,
|
|
70491
|
-
ParameterId.lnSpCh,
|
|
70492
|
-
ParameterId.lnSpAfChP,
|
|
70493
|
-
ParameterId.alignTx
|
|
70494
|
-
],
|
|
70495
|
-
sp: []
|
|
70496
|
-
};
|
|
70497
|
-
}
|
|
70498
|
-
});
|
|
70499
|
-
|
|
70500
|
-
// ../../contracts/src/smartart/ooxml-data-model-types.ts
|
|
70501
|
-
var init_ooxml_data_model_types = __esm({
|
|
70502
|
-
"../../contracts/src/smartart/ooxml-data-model-types.ts"() {
|
|
70503
|
-
"use strict";
|
|
70504
|
-
init_esm_shims();
|
|
70505
|
-
}
|
|
70506
|
-
});
|
|
70507
|
-
|
|
70508
|
-
// ../../contracts/src/smartart/ooxml-drawing-types.ts
|
|
70509
|
-
var init_ooxml_drawing_types = __esm({
|
|
70510
|
-
"../../contracts/src/smartart/ooxml-drawing-types.ts"() {
|
|
70511
|
-
"use strict";
|
|
70512
|
-
init_esm_shims();
|
|
70513
|
-
}
|
|
70514
|
-
});
|
|
70515
|
-
|
|
70516
|
-
// ../../contracts/src/smartart/ooxml-engine-types.ts
|
|
70517
|
-
var POSITIONAL_CONSTRAINT_TYPES, DIMENSIONAL_CONSTRAINT_TYPES, MARGIN_CONSTRAINT_TYPES, FONT_CONSTRAINT_TYPES, SPACING_CONSTRAINT_TYPES, GEOMETRY_CONSTRAINT_TYPES, USER_DEFINED_CONSTRAINT_TYPES, ALL_CONSTRAINT_TYPES, ALL_ELEMENT_TYPES, ALL_FUNCTION_TYPES, ALL_FUNCTION_OPERATORS, ALL_FUNCTION_ARGUMENTS;
|
|
70518
|
-
var init_ooxml_engine_types = __esm({
|
|
70519
|
-
"../../contracts/src/smartart/ooxml-engine-types.ts"() {
|
|
70520
|
-
"use strict";
|
|
70521
|
-
init_esm_shims();
|
|
70522
|
-
POSITIONAL_CONSTRAINT_TYPES = [
|
|
70523
|
-
"l",
|
|
70524
|
-
"t",
|
|
70525
|
-
"r",
|
|
70526
|
-
"b",
|
|
70527
|
-
"lOff",
|
|
70528
|
-
"tOff",
|
|
70529
|
-
"rOff",
|
|
70530
|
-
"bOff",
|
|
70531
|
-
"ctrX",
|
|
70532
|
-
"ctrY",
|
|
70533
|
-
"ctrXOff",
|
|
70534
|
-
"ctrYOff"
|
|
70535
|
-
];
|
|
70536
|
-
DIMENSIONAL_CONSTRAINT_TYPES = [
|
|
70537
|
-
"w",
|
|
70538
|
-
"h",
|
|
70539
|
-
"wOff",
|
|
70540
|
-
"hOff"
|
|
70541
|
-
];
|
|
70542
|
-
MARGIN_CONSTRAINT_TYPES = [
|
|
70543
|
-
"lMarg",
|
|
70544
|
-
"tMarg",
|
|
70545
|
-
"rMarg",
|
|
70546
|
-
"bMarg",
|
|
70547
|
-
"begMarg",
|
|
70548
|
-
"endMarg"
|
|
70549
|
-
];
|
|
70550
|
-
FONT_CONSTRAINT_TYPES = [
|
|
70551
|
-
"primFontSz",
|
|
70552
|
-
"secFontSz"
|
|
70553
|
-
];
|
|
70554
|
-
SPACING_CONSTRAINT_TYPES = [
|
|
70555
|
-
"sp",
|
|
70556
|
-
"sibSp",
|
|
70557
|
-
"secSibSp"
|
|
70558
|
-
];
|
|
70559
|
-
GEOMETRY_CONSTRAINT_TYPES = [
|
|
70560
|
-
"connDist",
|
|
70561
|
-
"diam",
|
|
70562
|
-
"stemThick",
|
|
70563
|
-
"begPad",
|
|
70564
|
-
"endPad",
|
|
70565
|
-
"wArH",
|
|
70566
|
-
"hArH",
|
|
70567
|
-
"bendDist"
|
|
70568
|
-
];
|
|
70569
|
-
USER_DEFINED_CONSTRAINT_TYPES = [
|
|
70570
|
-
"userA",
|
|
70571
|
-
"userB",
|
|
70572
|
-
"userC",
|
|
70573
|
-
"userD",
|
|
70574
|
-
"userE",
|
|
70575
|
-
"userF",
|
|
70576
|
-
"userG",
|
|
70577
|
-
"userH",
|
|
70578
|
-
"userI",
|
|
70579
|
-
"userJ",
|
|
70580
|
-
"userK",
|
|
70581
|
-
"userL",
|
|
70582
|
-
"userM",
|
|
70583
|
-
"userN",
|
|
70584
|
-
"userO",
|
|
70585
|
-
"userP",
|
|
70586
|
-
"userQ",
|
|
70587
|
-
"userR",
|
|
70588
|
-
"userS",
|
|
70589
|
-
"userT",
|
|
70590
|
-
"userU",
|
|
70591
|
-
"userV",
|
|
70592
|
-
"userW",
|
|
70593
|
-
"userX",
|
|
70594
|
-
"userY",
|
|
70595
|
-
"userZ"
|
|
70596
|
-
];
|
|
70597
|
-
ALL_CONSTRAINT_TYPES = [
|
|
70598
|
-
...POSITIONAL_CONSTRAINT_TYPES,
|
|
70599
|
-
...DIMENSIONAL_CONSTRAINT_TYPES,
|
|
70600
|
-
...MARGIN_CONSTRAINT_TYPES,
|
|
70601
|
-
...FONT_CONSTRAINT_TYPES,
|
|
70602
|
-
...SPACING_CONSTRAINT_TYPES,
|
|
70603
|
-
...GEOMETRY_CONSTRAINT_TYPES,
|
|
70604
|
-
"pyraAcctRatio",
|
|
70605
|
-
"alignOff",
|
|
70606
|
-
...USER_DEFINED_CONSTRAINT_TYPES,
|
|
70607
|
-
"none"
|
|
70608
|
-
];
|
|
70609
|
-
ALL_ELEMENT_TYPES = [
|
|
70610
|
-
"all",
|
|
70611
|
-
"doc",
|
|
70612
|
-
"node",
|
|
70613
|
-
"norm",
|
|
70614
|
-
"nonNorm",
|
|
70615
|
-
"asst",
|
|
70616
|
-
"nonAsst",
|
|
70617
|
-
"parTrans",
|
|
70618
|
-
"pres",
|
|
70619
|
-
"sibTrans"
|
|
70620
|
-
];
|
|
70621
|
-
ALL_FUNCTION_TYPES = [
|
|
70622
|
-
"cnt",
|
|
70623
|
-
"pos",
|
|
70624
|
-
"revPos",
|
|
70625
|
-
"posEven",
|
|
70626
|
-
"posOdd",
|
|
70627
|
-
"var",
|
|
70628
|
-
"depth",
|
|
70629
|
-
"maxDepth"
|
|
70630
|
-
];
|
|
70631
|
-
ALL_FUNCTION_OPERATORS = [
|
|
70632
|
-
"equ",
|
|
70633
|
-
"neq",
|
|
70634
|
-
"gt",
|
|
70635
|
-
"lt",
|
|
70636
|
-
"gte",
|
|
70637
|
-
"lte"
|
|
70638
|
-
];
|
|
70639
|
-
ALL_FUNCTION_ARGUMENTS = [
|
|
70640
|
-
"none",
|
|
70641
|
-
"orgChart",
|
|
70642
|
-
"chMax",
|
|
70643
|
-
"chPref",
|
|
70644
|
-
"bulEnabled",
|
|
70645
|
-
"dir",
|
|
70646
|
-
"hierBranch",
|
|
70647
|
-
"animOne",
|
|
70648
|
-
"animLvl",
|
|
70649
|
-
"resizeHandles"
|
|
70650
|
-
];
|
|
70651
|
-
}
|
|
70652
|
-
});
|
|
70653
|
-
|
|
70654
|
-
// ../../contracts/src/smartart/ooxml-layout-types.ts
|
|
70655
|
-
var init_ooxml_layout_types = __esm({
|
|
70656
|
-
"../../contracts/src/smartart/ooxml-layout-types.ts"() {
|
|
70657
|
-
"use strict";
|
|
70658
|
-
init_esm_shims();
|
|
70659
|
-
}
|
|
70660
|
-
});
|
|
70661
|
-
|
|
70662
|
-
// ../../contracts/src/smartart/ooxml-style-types.ts
|
|
70663
|
-
var init_ooxml_style_types = __esm({
|
|
70664
|
-
"../../contracts/src/smartart/ooxml-style-types.ts"() {
|
|
70665
|
-
"use strict";
|
|
70666
|
-
init_esm_shims();
|
|
70667
|
-
}
|
|
70668
|
-
});
|
|
70669
|
-
|
|
70670
|
-
// ../../contracts/src/smartart/styles.ts
|
|
70671
|
-
var init_styles3 = __esm({
|
|
70672
|
-
"../../contracts/src/smartart/styles.ts"() {
|
|
70673
|
-
"use strict";
|
|
70674
|
-
init_esm_shims();
|
|
70675
|
-
}
|
|
70676
|
-
});
|
|
70677
|
-
|
|
70678
|
-
// ../../contracts/src/smartart/types.ts
|
|
70679
|
-
var init_types4 = __esm({
|
|
70680
|
-
"../../contracts/src/smartart/types.ts"() {
|
|
70681
|
-
"use strict";
|
|
70682
|
-
init_esm_shims();
|
|
70683
|
-
}
|
|
70684
|
-
});
|
|
70685
|
-
|
|
70686
|
-
// ../../contracts/src/smartart/index.ts
|
|
70687
|
-
var init_smartart = __esm({
|
|
70688
|
-
"../../contracts/src/smartart/index.ts"() {
|
|
70689
|
-
"use strict";
|
|
70690
|
-
init_esm_shims();
|
|
70691
|
-
init_layouts2();
|
|
70692
|
-
init_ooxml_algorithm_types();
|
|
70693
|
-
init_ooxml_data_model_types();
|
|
70694
|
-
init_ooxml_drawing_types();
|
|
70695
|
-
init_ooxml_engine_types();
|
|
70696
|
-
init_ooxml_layout_types();
|
|
70697
|
-
init_ooxml_style_types();
|
|
70698
|
-
init_styles3();
|
|
70699
|
-
init_types4();
|
|
70700
|
-
}
|
|
70701
|
-
});
|
|
70702
|
-
|
|
70703
70158
|
// ../../canvas/drawing/smartart/src/engine/algorithms/composite.ts
|
|
70159
|
+
import { AlgorithmType } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70704
70160
|
var init_composite = __esm({
|
|
70705
70161
|
"../../canvas/drawing/smartart/src/engine/algorithms/composite.ts"() {
|
|
70706
70162
|
"use strict";
|
|
70707
70163
|
init_esm_shims();
|
|
70708
|
-
init_smartart();
|
|
70709
70164
|
}
|
|
70710
70165
|
});
|
|
70711
70166
|
|
|
70712
70167
|
// ../../canvas/drawing/smartart/src/engine/algorithms/linear.ts
|
|
70168
|
+
import { AlgorithmType as AlgorithmType2 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70713
70169
|
var init_linear2 = __esm({
|
|
70714
70170
|
"../../canvas/drawing/smartart/src/engine/algorithms/linear.ts"() {
|
|
70715
70171
|
"use strict";
|
|
70716
70172
|
init_esm_shims();
|
|
70717
|
-
init_smartart();
|
|
70718
70173
|
}
|
|
70719
70174
|
});
|
|
70720
70175
|
|
|
@@ -70727,82 +70182,82 @@ var init_param_utils = __esm({
|
|
|
70727
70182
|
});
|
|
70728
70183
|
|
|
70729
70184
|
// ../../canvas/drawing/smartart/src/engine/algorithms/snake.ts
|
|
70185
|
+
import { AlgorithmType as AlgorithmType3 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70730
70186
|
var init_snake = __esm({
|
|
70731
70187
|
"../../canvas/drawing/smartart/src/engine/algorithms/snake.ts"() {
|
|
70732
70188
|
"use strict";
|
|
70733
70189
|
init_esm_shims();
|
|
70734
|
-
init_smartart();
|
|
70735
70190
|
init_param_utils();
|
|
70736
70191
|
}
|
|
70737
70192
|
});
|
|
70738
70193
|
|
|
70739
70194
|
// ../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts
|
|
70195
|
+
import { AlgorithmType as AlgorithmType4 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70740
70196
|
var init_cycle2 = __esm({
|
|
70741
70197
|
"../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts"() {
|
|
70742
70198
|
"use strict";
|
|
70743
70199
|
init_esm_shims();
|
|
70744
|
-
init_smartart();
|
|
70745
70200
|
init_param_utils();
|
|
70746
70201
|
}
|
|
70747
70202
|
});
|
|
70748
70203
|
|
|
70749
70204
|
// ../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts
|
|
70205
|
+
import { AlgorithmType as AlgorithmType5 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70750
70206
|
var init_hier_root = __esm({
|
|
70751
70207
|
"../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts"() {
|
|
70752
70208
|
"use strict";
|
|
70753
70209
|
init_esm_shims();
|
|
70754
|
-
init_smartart();
|
|
70755
70210
|
init_param_utils();
|
|
70756
70211
|
}
|
|
70757
70212
|
});
|
|
70758
70213
|
|
|
70759
70214
|
// ../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts
|
|
70215
|
+
import { AlgorithmType as AlgorithmType6 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70760
70216
|
var init_hier_child = __esm({
|
|
70761
70217
|
"../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts"() {
|
|
70762
70218
|
"use strict";
|
|
70763
70219
|
init_esm_shims();
|
|
70764
|
-
init_smartart();
|
|
70765
70220
|
init_param_utils();
|
|
70766
70221
|
}
|
|
70767
70222
|
});
|
|
70768
70223
|
|
|
70769
70224
|
// ../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts
|
|
70225
|
+
import { AlgorithmType as AlgorithmType7 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70770
70226
|
var init_pyramid2 = __esm({
|
|
70771
70227
|
"../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts"() {
|
|
70772
70228
|
"use strict";
|
|
70773
70229
|
init_esm_shims();
|
|
70774
|
-
init_smartart();
|
|
70775
70230
|
init_param_utils();
|
|
70776
70231
|
}
|
|
70777
70232
|
});
|
|
70778
70233
|
|
|
70779
70234
|
// ../../canvas/drawing/smartart/src/engine/algorithms/connector.ts
|
|
70235
|
+
import { AlgorithmType as AlgorithmType8 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70780
70236
|
var init_connector = __esm({
|
|
70781
70237
|
"../../canvas/drawing/smartart/src/engine/algorithms/connector.ts"() {
|
|
70782
70238
|
"use strict";
|
|
70783
70239
|
init_esm_shims();
|
|
70784
|
-
init_smartart();
|
|
70785
70240
|
init_connector_routing();
|
|
70786
70241
|
init_param_utils();
|
|
70787
70242
|
}
|
|
70788
70243
|
});
|
|
70789
70244
|
|
|
70790
70245
|
// ../../canvas/drawing/smartart/src/engine/algorithms/text.ts
|
|
70246
|
+
import { AlgorithmType as AlgorithmType9 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70791
70247
|
var init_text3 = __esm({
|
|
70792
70248
|
"../../canvas/drawing/smartart/src/engine/algorithms/text.ts"() {
|
|
70793
70249
|
"use strict";
|
|
70794
70250
|
init_esm_shims();
|
|
70795
|
-
init_smartart();
|
|
70796
70251
|
init_param_utils();
|
|
70797
70252
|
}
|
|
70798
70253
|
});
|
|
70799
70254
|
|
|
70800
70255
|
// ../../canvas/drawing/smartart/src/engine/algorithms/space.ts
|
|
70256
|
+
import { AlgorithmType as AlgorithmType10 } from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70801
70257
|
var init_space = __esm({
|
|
70802
70258
|
"../../canvas/drawing/smartart/src/engine/algorithms/space.ts"() {
|
|
70803
70259
|
"use strict";
|
|
70804
70260
|
init_esm_shims();
|
|
70805
|
-
init_smartart();
|
|
70806
70261
|
}
|
|
70807
70262
|
});
|
|
70808
70263
|
|
|
@@ -70961,12 +70416,18 @@ var init_drawing_parser = __esm({
|
|
|
70961
70416
|
});
|
|
70962
70417
|
|
|
70963
70418
|
// ../../canvas/drawing/smartart/src/parser/layout-def-parser.ts
|
|
70419
|
+
import {
|
|
70420
|
+
ALL_ELEMENT_TYPES,
|
|
70421
|
+
ALL_FUNCTION_ARGUMENTS,
|
|
70422
|
+
ALL_FUNCTION_OPERATORS,
|
|
70423
|
+
ALL_FUNCTION_TYPES,
|
|
70424
|
+
VARIABLE_LIST_DEFAULTS
|
|
70425
|
+
} from "@mog-sdk/spreadsheet-contracts/smartart";
|
|
70964
70426
|
var VALID_ELEMENT_TYPES, VALID_FUNCTION_TYPES, VALID_FUNCTION_OPERATORS, VALID_FUNCTION_ARGUMENTS;
|
|
70965
70427
|
var init_layout_def_parser = __esm({
|
|
70966
70428
|
"../../canvas/drawing/smartart/src/parser/layout-def-parser.ts"() {
|
|
70967
70429
|
"use strict";
|
|
70968
70430
|
init_esm_shims();
|
|
70969
|
-
init_smartart();
|
|
70970
70431
|
init_data_model_parser();
|
|
70971
70432
|
init_drawingml_helpers();
|
|
70972
70433
|
init_xml_helpers();
|
|
@@ -74868,7 +74329,7 @@ var init_cell_anchor_resolver = __esm({
|
|
|
74868
74329
|
});
|
|
74869
74330
|
|
|
74870
74331
|
// ../../kernel/src/floating-objects/types.ts
|
|
74871
|
-
var
|
|
74332
|
+
var init_types4 = __esm({
|
|
74872
74333
|
"../../kernel/src/floating-objects/types.ts"() {
|
|
74873
74334
|
"use strict";
|
|
74874
74335
|
init_esm_shims();
|
|
@@ -74967,7 +74428,7 @@ var init_picture_manager = __esm({
|
|
|
74967
74428
|
"use strict";
|
|
74968
74429
|
init_esm_shims();
|
|
74969
74430
|
init_document();
|
|
74970
|
-
|
|
74431
|
+
init_types4();
|
|
74971
74432
|
}
|
|
74972
74433
|
});
|
|
74973
74434
|
|
|
@@ -75069,7 +74530,7 @@ var init_textbox_manager = __esm({
|
|
|
75069
74530
|
"../../kernel/src/floating-objects/managers/textbox-manager.ts"() {
|
|
75070
74531
|
"use strict";
|
|
75071
74532
|
init_esm_shims();
|
|
75072
|
-
|
|
74533
|
+
init_types4();
|
|
75073
74534
|
DEFAULT_TEXTBOX_FILL = { type: "solid", color: "#ffffff" };
|
|
75074
74535
|
DEFAULT_TEXTBOX_BORDER = { style: "solid", color: "#000000", width: 1 };
|
|
75075
74536
|
}
|
|
@@ -76250,7 +75711,7 @@ var init_kernel_context = __esm({
|
|
|
76250
75711
|
init_esm_shims();
|
|
76251
75712
|
init_chart_bridge();
|
|
76252
75713
|
init_equation_bridge();
|
|
76253
|
-
|
|
75714
|
+
init_ink_recognition_bridge();
|
|
76254
75715
|
init_locale_bridge();
|
|
76255
75716
|
init_pivot_bridge();
|
|
76256
75717
|
init_schema_bridge();
|
|
@@ -77260,21 +76721,8 @@ var WorkbookHistoryImpl = class {
|
|
|
77260
76721
|
|
|
77261
76722
|
// ../../kernel/src/api/workbook/names.ts
|
|
77262
76723
|
init_esm_shims();
|
|
77263
|
-
|
|
77264
|
-
// ../../contracts/src/api/index.ts
|
|
77265
|
-
init_esm_shims();
|
|
77266
|
-
|
|
77267
|
-
// ../../contracts/src/api/types.ts
|
|
77268
|
-
init_esm_shims();
|
|
77269
|
-
|
|
77270
|
-
// ../../contracts/src/api/worksheet/index.ts
|
|
77271
|
-
init_esm_shims();
|
|
77272
|
-
|
|
77273
|
-
// ../../contracts/src/api/worksheet/format-mappings.ts
|
|
77274
|
-
init_esm_shims();
|
|
77275
|
-
|
|
77276
|
-
// ../../kernel/src/api/workbook/names.ts
|
|
77277
76724
|
init_errors();
|
|
76725
|
+
import { RangeValueType } from "@mog-sdk/spreadsheet-contracts/api";
|
|
77278
76726
|
|
|
77279
76727
|
// ../../kernel/src/domain/formulas/named-ranges.ts
|
|
77280
76728
|
init_esm_shims();
|
|
@@ -77896,13 +77344,13 @@ var WorkbookNamesImpl = class {
|
|
|
77896
77344
|
if (!values) return null;
|
|
77897
77345
|
return values.map(
|
|
77898
77346
|
(row) => row.map((cell) => {
|
|
77899
|
-
if (cell === null || cell === void 0) return
|
|
77900
|
-
if (typeof cell === "boolean") return
|
|
77901
|
-
if (typeof cell === "number") return
|
|
77902
|
-
if (typeof cell === "string") return
|
|
77347
|
+
if (cell === null || cell === void 0) return RangeValueType.Empty;
|
|
77348
|
+
if (typeof cell === "boolean") return RangeValueType.Boolean;
|
|
77349
|
+
if (typeof cell === "number") return RangeValueType.Double;
|
|
77350
|
+
if (typeof cell === "string") return RangeValueType.String;
|
|
77903
77351
|
if (typeof cell === "object" && cell !== null && "type" in cell)
|
|
77904
|
-
return
|
|
77905
|
-
return
|
|
77352
|
+
return RangeValueType.Error;
|
|
77353
|
+
return RangeValueType.String;
|
|
77906
77354
|
})
|
|
77907
77355
|
);
|
|
77908
77356
|
}
|
|
@@ -77994,7 +77442,7 @@ var BUILT_IN_LISTS = [
|
|
|
77994
77442
|
];
|
|
77995
77443
|
|
|
77996
77444
|
// ../../kernel/src/domain/workbook/workbook.ts
|
|
77997
|
-
|
|
77445
|
+
import { DEFAULT_WORKBOOK_PROTECTION_OPTIONS } from "@mog-sdk/spreadsheet-contracts/protection";
|
|
77998
77446
|
|
|
77999
77447
|
// ../../spreadsheet-utils/src/protection.ts
|
|
78000
77448
|
init_esm_shims();
|
|
@@ -78450,9 +77898,9 @@ init_sheet_meta();
|
|
|
78450
77898
|
|
|
78451
77899
|
// ../../kernel/src/api/worksheet/worksheet-impl.ts
|
|
78452
77900
|
init_esm_shims();
|
|
78453
|
-
init_core3();
|
|
78454
77901
|
init_errors3();
|
|
78455
77902
|
init_errors();
|
|
77903
|
+
import { displayStringOrNull as displayStringOrNull3 } from "@mog-sdk/spreadsheet-contracts/core";
|
|
78456
77904
|
|
|
78457
77905
|
// ../../kernel/src/bridges/wire/cell-metadata-cache.ts
|
|
78458
77906
|
init_esm_shims();
|
|
@@ -79363,9 +78811,13 @@ async function setCells(ctx, sheetId, cells) {
|
|
|
79363
78811
|
const result = { cellsWritten: uniqueEdits.length, errors: null };
|
|
79364
78812
|
if (duplicatesRemoved > 0) {
|
|
79365
78813
|
result.warnings = [
|
|
79366
|
-
createWarning(
|
|
79367
|
-
|
|
79368
|
-
|
|
78814
|
+
createWarning(
|
|
78815
|
+
"API_DUPLICATE_COORDINATES",
|
|
78816
|
+
`${duplicatesRemoved} duplicate coordinate(s) resolved by last-write-wins`,
|
|
78817
|
+
{
|
|
78818
|
+
duplicatesRemoved
|
|
78819
|
+
}
|
|
78820
|
+
)
|
|
79369
78821
|
];
|
|
79370
78822
|
}
|
|
79371
78823
|
return result;
|
|
@@ -79466,22 +78918,18 @@ async function batchGetCellPositions(ctx, sheetId, cellIds) {
|
|
|
79466
78918
|
|
|
79467
78919
|
// ../../kernel/src/api/worksheet/operations/dependency-operations.ts
|
|
79468
78920
|
init_esm_shims();
|
|
79469
|
-
|
|
79470
|
-
let result = "";
|
|
79471
|
-
let c = col;
|
|
79472
|
-
while (c >= 0) {
|
|
79473
|
-
result = String.fromCharCode(c % 26 + 65) + result;
|
|
79474
|
-
c = Math.floor(c / 26) - 1;
|
|
79475
|
-
}
|
|
79476
|
-
return result;
|
|
79477
|
-
}
|
|
78921
|
+
init_a1();
|
|
79478
78922
|
async function getDependents(ctx, sheetId, row, col) {
|
|
79479
78923
|
const results = await ctx.computeBridge.getDependents(sheetId, row, col);
|
|
79480
|
-
return results.map(
|
|
78924
|
+
return results.map(
|
|
78925
|
+
(r) => r.sheetId === sheetId ? toA12(r.row, r.col) : toSheetA1(r.row, r.col, r.sheetName)
|
|
78926
|
+
);
|
|
79481
78927
|
}
|
|
79482
78928
|
async function getPrecedents(ctx, sheetId, row, col) {
|
|
79483
78929
|
const results = await ctx.computeBridge.getPrecedents(sheetId, row, col);
|
|
79484
|
-
return results.map(
|
|
78930
|
+
return results.map(
|
|
78931
|
+
(r) => r.sheetId === sheetId ? toA12(r.row, r.col) : toSheetA1(r.row, r.col, r.sheetName)
|
|
78932
|
+
);
|
|
79485
78933
|
}
|
|
79486
78934
|
|
|
79487
78935
|
// ../../kernel/src/api/worksheet/operations/fill-operations.ts
|
|
@@ -79802,7 +79250,7 @@ async function findCells(ctx, sheetId, predicate) {
|
|
|
79802
79250
|
const results = [];
|
|
79803
79251
|
for (const cell of rangeResult.cells) {
|
|
79804
79252
|
const cellData = {
|
|
79805
|
-
value:
|
|
79253
|
+
value: normalizeCellValue(cell.value),
|
|
79806
79254
|
formula: cell.formula
|
|
79807
79255
|
};
|
|
79808
79256
|
if (predicate(cellData, cell.row, cell.col)) {
|
|
@@ -79855,18 +79303,18 @@ async function regexSearch(ctx, sheetId, patterns, options) {
|
|
|
79855
79303
|
bounds.maxCol
|
|
79856
79304
|
);
|
|
79857
79305
|
for (const cell of rangeResult.cells) {
|
|
79858
|
-
const valueStr = cell.formatted ??
|
|
79306
|
+
const valueStr = cell.formatted ?? cellValueToString(cell.value);
|
|
79859
79307
|
for (const { regex, source } of compiledPatterns) {
|
|
79860
79308
|
regex.lastIndex = 0;
|
|
79861
79309
|
if (regex.test(valueStr)) {
|
|
79862
|
-
const address =
|
|
79310
|
+
const address = toA12(cell.row, cell.col);
|
|
79863
79311
|
results.push({ address, value: valueStr, sheetName, matchedPattern: source });
|
|
79864
79312
|
break;
|
|
79865
79313
|
}
|
|
79866
79314
|
if (options?.includeFormulas && cell.formula) {
|
|
79867
79315
|
regex.lastIndex = 0;
|
|
79868
79316
|
if (regex.test(cell.formula)) {
|
|
79869
|
-
const address =
|
|
79317
|
+
const address = toA12(cell.row, cell.col);
|
|
79870
79318
|
results.push({ address, value: valueStr, sheetName, matchedPattern: source });
|
|
79871
79319
|
break;
|
|
79872
79320
|
}
|
|
@@ -79899,9 +79347,9 @@ async function getRangeWithIdentity(ctx, sheetId, startRow, startCol, endRow, en
|
|
|
79899
79347
|
cellId: cell.cellId,
|
|
79900
79348
|
row: cell.row,
|
|
79901
79349
|
col: cell.col,
|
|
79902
|
-
value:
|
|
79350
|
+
value: normalizeCellValue(cell.value),
|
|
79903
79351
|
formulaText: cell.formula,
|
|
79904
|
-
displayString: cell.formatted ??
|
|
79352
|
+
displayString: cell.formatted ?? cellValueToString(cell.value)
|
|
79905
79353
|
}));
|
|
79906
79354
|
}
|
|
79907
79355
|
|
|
@@ -79930,7 +79378,7 @@ async function getRange(ctx, sheetId, range2) {
|
|
|
79930
79378
|
if (!cell) {
|
|
79931
79379
|
rowData.push({ value: null });
|
|
79932
79380
|
} else {
|
|
79933
|
-
const value =
|
|
79381
|
+
const value = normalizeCellValue(cell.value);
|
|
79934
79382
|
rowData.push({
|
|
79935
79383
|
value: value ?? null,
|
|
79936
79384
|
formula: cell.formula,
|
|
@@ -80035,6 +79483,10 @@ async function clearRange2(ctx, sheetId, range2) {
|
|
|
80035
79483
|
init_esm_shims();
|
|
80036
79484
|
init_a1();
|
|
80037
79485
|
init_value_conversions();
|
|
79486
|
+
import {
|
|
79487
|
+
NumberFormatCategory,
|
|
79488
|
+
RangeValueType as RangeValueType2
|
|
79489
|
+
} from "@mog-sdk/spreadsheet-contracts/api";
|
|
80038
79490
|
async function clearWithMode(ctx, sheetId, range2, applyTo = "all") {
|
|
80039
79491
|
const n = normalizeRange(range2);
|
|
80040
79492
|
const promises = [];
|
|
@@ -80108,7 +79560,7 @@ async function getDisplayText(ctx, sheetId, range2) {
|
|
|
80108
79560
|
if (!cell) {
|
|
80109
79561
|
rowData.push("");
|
|
80110
79562
|
} else {
|
|
80111
|
-
rowData.push(cell.formatted ??
|
|
79563
|
+
rowData.push(cell.formatted ?? cellValueToString(cell.value));
|
|
80112
79564
|
}
|
|
80113
79565
|
}
|
|
80114
79566
|
result.push(rowData);
|
|
@@ -80134,9 +79586,9 @@ async function getValueTypes(ctx, sheetId, range2) {
|
|
|
80134
79586
|
for (let col = n.startCol; col <= n.endCol; col++) {
|
|
80135
79587
|
const cell = cellMap.get(`${row},${col}`);
|
|
80136
79588
|
if (!cell) {
|
|
80137
|
-
rowData.push(
|
|
79589
|
+
rowData.push(RangeValueType2.Empty);
|
|
80138
79590
|
} else {
|
|
80139
|
-
rowData.push(classifyValueType(
|
|
79591
|
+
rowData.push(classifyValueType(normalizeCellValue(cell.value)));
|
|
80140
79592
|
}
|
|
80141
79593
|
}
|
|
80142
79594
|
result.push(rowData);
|
|
@@ -80144,12 +79596,16 @@ async function getValueTypes(ctx, sheetId, range2) {
|
|
|
80144
79596
|
return result;
|
|
80145
79597
|
}
|
|
80146
79598
|
function classifyValueType(value) {
|
|
80147
|
-
if (value === null || value === void 0) return
|
|
80148
|
-
if (typeof value === "string")
|
|
80149
|
-
|
|
80150
|
-
|
|
80151
|
-
|
|
80152
|
-
|
|
79599
|
+
if (value === null || value === void 0) return RangeValueType2.Empty;
|
|
79600
|
+
if (typeof value === "string") {
|
|
79601
|
+
if (value === "") return RangeValueType2.Empty;
|
|
79602
|
+
if (value.startsWith("#")) return RangeValueType2.Error;
|
|
79603
|
+
return RangeValueType2.String;
|
|
79604
|
+
}
|
|
79605
|
+
if (typeof value === "number") return RangeValueType2.Double;
|
|
79606
|
+
if (typeof value === "boolean") return RangeValueType2.Boolean;
|
|
79607
|
+
if (typeof value === "object" && value !== null && "type" in value) return RangeValueType2.Error;
|
|
79608
|
+
return RangeValueType2.String;
|
|
80153
79609
|
}
|
|
80154
79610
|
async function findInRange(ctx, sheetId, range2, text, options) {
|
|
80155
79611
|
const n = normalizeRange(range2);
|
|
@@ -80171,7 +79627,7 @@ async function findInRange(ctx, sheetId, range2, text, options) {
|
|
|
80171
79627
|
n.endCol
|
|
80172
79628
|
);
|
|
80173
79629
|
for (const cell of rangeResult.cells) {
|
|
80174
|
-
const valueStr = cell.formatted ??
|
|
79630
|
+
const valueStr = cell.formatted ?? cellValueToString(cell.value);
|
|
80175
79631
|
if (pattern.test(valueStr)) {
|
|
80176
79632
|
return {
|
|
80177
79633
|
address: `${colToLetter3(cell.col)}${cell.row + 1}`,
|
|
@@ -80203,7 +79659,7 @@ async function replaceAll(ctx, sheetId, range2, text, replacement, options) {
|
|
|
80203
79659
|
const edits = [];
|
|
80204
79660
|
for (const cell of rangeResult.cells) {
|
|
80205
79661
|
if (cell.formula) continue;
|
|
80206
|
-
const valueStr =
|
|
79662
|
+
const valueStr = cellValueToString(cell.value);
|
|
80207
79663
|
if (!valueStr) continue;
|
|
80208
79664
|
pattern.lastIndex = 0;
|
|
80209
79665
|
if (pattern.test(valueStr)) {
|
|
@@ -80246,46 +79702,46 @@ async function getNumberFormatCategories(ctx, sheetId, range2) {
|
|
|
80246
79702
|
}
|
|
80247
79703
|
function detectFormatType(formatCode) {
|
|
80248
79704
|
if (!formatCode || formatCode === "" || formatCode === "General") {
|
|
80249
|
-
return
|
|
79705
|
+
return NumberFormatCategory.General;
|
|
80250
79706
|
}
|
|
80251
79707
|
if (formatCode === "@") {
|
|
80252
|
-
return
|
|
79708
|
+
return NumberFormatCategory.Text;
|
|
80253
79709
|
}
|
|
80254
79710
|
const stripped = formatCode.replace(/\[[^\]]*\]/g, "").replace(/"[^"]*"/g, "");
|
|
80255
79711
|
if (/[yYmMdD]/.test(stripped) && /[yYdD]/.test(stripped)) {
|
|
80256
|
-
return
|
|
79712
|
+
return NumberFormatCategory.Date;
|
|
80257
79713
|
}
|
|
80258
79714
|
if (/[hHsS]/.test(stripped)) {
|
|
80259
79715
|
if (/[yYdD]/.test(stripped)) {
|
|
80260
|
-
return
|
|
79716
|
+
return NumberFormatCategory.Date;
|
|
80261
79717
|
}
|
|
80262
|
-
return
|
|
79718
|
+
return NumberFormatCategory.Time;
|
|
80263
79719
|
}
|
|
80264
79720
|
if (/AM\/PM/i.test(stripped)) {
|
|
80265
|
-
return
|
|
79721
|
+
return NumberFormatCategory.Time;
|
|
80266
79722
|
}
|
|
80267
79723
|
if (stripped.includes("%")) {
|
|
80268
|
-
return
|
|
79724
|
+
return NumberFormatCategory.Percentage;
|
|
80269
79725
|
}
|
|
80270
79726
|
if (/[eE][+-]/.test(stripped)) {
|
|
80271
|
-
return
|
|
79727
|
+
return NumberFormatCategory.Scientific;
|
|
80272
79728
|
}
|
|
80273
79729
|
if (stripped.includes("/") && !/[yYmMdDhHsS]/.test(stripped)) {
|
|
80274
|
-
return
|
|
79730
|
+
return NumberFormatCategory.Fraction;
|
|
80275
79731
|
}
|
|
80276
79732
|
if (/[_*]/.test(stripped) && /[$(]/.test(stripped)) {
|
|
80277
|
-
return
|
|
79733
|
+
return NumberFormatCategory.Accounting;
|
|
80278
79734
|
}
|
|
80279
79735
|
if (/[$€£¥₹]/.test(formatCode)) {
|
|
80280
|
-
return
|
|
79736
|
+
return NumberFormatCategory.Currency;
|
|
80281
79737
|
}
|
|
80282
79738
|
if (/^0{5}/.test(stripped) || /^0{3}-0{2}-0{4}/.test(stripped)) {
|
|
80283
|
-
return
|
|
79739
|
+
return NumberFormatCategory.Special;
|
|
80284
79740
|
}
|
|
80285
79741
|
if (/[#0]/.test(stripped)) {
|
|
80286
|
-
return
|
|
79742
|
+
return NumberFormatCategory.Number;
|
|
80287
79743
|
}
|
|
80288
|
-
return
|
|
79744
|
+
return NumberFormatCategory.Custom;
|
|
80289
79745
|
}
|
|
80290
79746
|
|
|
80291
79747
|
// ../../kernel/src/api/worksheet/operations/sort-operations.ts
|
|
@@ -80328,9 +79784,18 @@ init_esm_shims();
|
|
|
80328
79784
|
// ../../kernel/src/api/worksheet/collections/object-collection-impl.ts
|
|
80329
79785
|
init_esm_shims();
|
|
80330
79786
|
|
|
79787
|
+
// ../../kernel/src/api/worksheet/handles/floating-object-handle-factory.ts
|
|
79788
|
+
init_esm_shims();
|
|
79789
|
+
|
|
80331
79790
|
// ../../kernel/src/api/worksheet/handles/floating-object-handle-impl.ts
|
|
80332
79791
|
init_esm_shims();
|
|
80333
79792
|
init_errors();
|
|
79793
|
+
function narrowHandle(handle, expected) {
|
|
79794
|
+
if (handle.type !== expected) {
|
|
79795
|
+
throw new KernelError("OPERATION_FAILED", `Expected ${expected}, got ${handle.type}`);
|
|
79796
|
+
}
|
|
79797
|
+
return handle;
|
|
79798
|
+
}
|
|
80334
79799
|
var FloatingObjectHandleImpl = class _FloatingObjectHandleImpl {
|
|
80335
79800
|
constructor(id, type, objectsImpl, boundsReader) {
|
|
80336
79801
|
this.id = id;
|
|
@@ -80377,11 +79842,11 @@ var FloatingObjectHandleImpl = class _FloatingObjectHandleImpl {
|
|
|
80377
79842
|
return this.boundsReader?.getBounds(this.id) ?? null;
|
|
80378
79843
|
}
|
|
80379
79844
|
async getData() {
|
|
80380
|
-
const
|
|
80381
|
-
if (!
|
|
80382
|
-
return
|
|
79845
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
79846
|
+
if (!obj) throw new KernelError("OPERATION_FAILED", `Object ${this.id} not found`);
|
|
79847
|
+
return obj;
|
|
80383
79848
|
}
|
|
80384
|
-
// -- Type narrowing --
|
|
79849
|
+
// -- Type narrowing (is* predicates) --
|
|
80385
79850
|
isShape() {
|
|
80386
79851
|
return this.type === "shape";
|
|
80387
79852
|
}
|
|
@@ -80418,58 +79883,43 @@ var FloatingObjectHandleImpl = class _FloatingObjectHandleImpl {
|
|
|
80418
79883
|
isSlicer() {
|
|
80419
79884
|
return this.type === "slicer";
|
|
80420
79885
|
}
|
|
80421
|
-
/**
|
|
80422
|
-
|
|
80423
|
-
|
|
80424
|
-
|
|
80425
|
-
|
|
80426
|
-
}
|
|
79886
|
+
/**
|
|
79887
|
+
* Type-checked narrowing — throws if this handle's type does not match.
|
|
79888
|
+
* The factory (createFloatingObjectHandle) guarantees that when type === 'shape',
|
|
79889
|
+
* `this` is a ShapeHandleImpl which implements ShapeHandle, etc.
|
|
79890
|
+
*/
|
|
80427
79891
|
asShape() {
|
|
80428
|
-
this
|
|
80429
|
-
return this;
|
|
79892
|
+
return narrowHandle(this, "shape");
|
|
80430
79893
|
}
|
|
80431
79894
|
asPicture() {
|
|
80432
|
-
this
|
|
80433
|
-
return this;
|
|
79895
|
+
return narrowHandle(this, "picture");
|
|
80434
79896
|
}
|
|
80435
79897
|
asTextBox() {
|
|
80436
|
-
this
|
|
80437
|
-
return this;
|
|
79898
|
+
return narrowHandle(this, "textbox");
|
|
80438
79899
|
}
|
|
80439
79900
|
asDrawing() {
|
|
80440
|
-
this
|
|
80441
|
-
return this;
|
|
79901
|
+
return narrowHandle(this, "drawing");
|
|
80442
79902
|
}
|
|
80443
79903
|
asEquation() {
|
|
80444
|
-
this
|
|
80445
|
-
return this;
|
|
79904
|
+
return narrowHandle(this, "equation");
|
|
80446
79905
|
}
|
|
80447
79906
|
asWordArt() {
|
|
80448
|
-
|
|
80449
|
-
return this;
|
|
79907
|
+
throw new KernelError("OPERATION_FAILED", `Expected wordart, got ${this.type}`);
|
|
80450
79908
|
}
|
|
80451
79909
|
asSmartArt() {
|
|
80452
|
-
this
|
|
80453
|
-
return this;
|
|
79910
|
+
return narrowHandle(this, "smartart");
|
|
80454
79911
|
}
|
|
80455
79912
|
asChart() {
|
|
80456
|
-
this
|
|
80457
|
-
return this;
|
|
80458
|
-
}
|
|
80459
|
-
asCamera() {
|
|
80460
|
-
throw new KernelError("OPERATION_FAILED", "Camera objects are no longer supported");
|
|
79913
|
+
return narrowHandle(this, "chart");
|
|
80461
79914
|
}
|
|
80462
79915
|
asConnector() {
|
|
80463
|
-
this
|
|
80464
|
-
return this;
|
|
79916
|
+
return narrowHandle(this, "connector");
|
|
80465
79917
|
}
|
|
80466
79918
|
asOleObject() {
|
|
80467
|
-
this
|
|
80468
|
-
return this;
|
|
79919
|
+
return narrowHandle(this, "oleObject");
|
|
80469
79920
|
}
|
|
80470
79921
|
asSlicer() {
|
|
80471
|
-
this
|
|
80472
|
-
return this;
|
|
79922
|
+
return narrowHandle(this, "slicer");
|
|
80473
79923
|
}
|
|
80474
79924
|
};
|
|
80475
79925
|
|
|
@@ -80489,9 +79939,9 @@ var ShapeHandleImpl = class _ShapeHandleImpl extends FloatingObjectHandleImpl {
|
|
|
80489
79939
|
return new _ShapeHandleImpl(receipt.id, this.shapeType, this.objectsImpl, this.boundsReader);
|
|
80490
79940
|
}
|
|
80491
79941
|
async getData() {
|
|
80492
|
-
const
|
|
80493
|
-
if (!shape) throw new KernelError("OPERATION_FAILED", `Shape ${this.id} not found`);
|
|
80494
|
-
return
|
|
79942
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
79943
|
+
if (!obj || obj.type !== "shape") throw new KernelError("OPERATION_FAILED", `Shape ${this.id} not found`);
|
|
79944
|
+
return obj;
|
|
80495
79945
|
}
|
|
80496
79946
|
};
|
|
80497
79947
|
|
|
@@ -80510,9 +79960,9 @@ var PictureHandleImpl = class _PictureHandleImpl extends FloatingObjectHandleImp
|
|
|
80510
79960
|
return new _PictureHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80511
79961
|
}
|
|
80512
79962
|
async getData() {
|
|
80513
|
-
const
|
|
80514
|
-
if (!
|
|
80515
|
-
return
|
|
79963
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
79964
|
+
if (!obj || obj.type !== "picture") throw new KernelError("OPERATION_FAILED", `Picture ${this.id} not found`);
|
|
79965
|
+
return obj;
|
|
80516
79966
|
}
|
|
80517
79967
|
};
|
|
80518
79968
|
|
|
@@ -80531,9 +79981,9 @@ var TextBoxHandleImpl = class _TextBoxHandleImpl extends FloatingObjectHandleImp
|
|
|
80531
79981
|
return new _TextBoxHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80532
79982
|
}
|
|
80533
79983
|
async getData() {
|
|
80534
|
-
const
|
|
80535
|
-
if (!
|
|
80536
|
-
return
|
|
79984
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
79985
|
+
if (!obj || obj.type !== "textbox") throw new KernelError("OPERATION_FAILED", `TextBox ${this.id} not found`);
|
|
79986
|
+
return obj;
|
|
80537
79987
|
}
|
|
80538
79988
|
};
|
|
80539
79989
|
|
|
@@ -80588,9 +80038,9 @@ var EquationHandleImpl = class _EquationHandleImpl extends FloatingObjectHandleI
|
|
|
80588
80038
|
return new _EquationHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80589
80039
|
}
|
|
80590
80040
|
async getData() {
|
|
80591
|
-
const
|
|
80592
|
-
if (!
|
|
80593
|
-
return
|
|
80041
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80042
|
+
if (!obj || obj.type !== "equation") throw new KernelError("OPERATION_FAILED", `Equation ${this.id} not found`);
|
|
80043
|
+
return obj;
|
|
80594
80044
|
}
|
|
80595
80045
|
};
|
|
80596
80046
|
|
|
@@ -80609,9 +80059,9 @@ var ConnectorHandleImpl = class _ConnectorHandleImpl extends FloatingObjectHandl
|
|
|
80609
80059
|
return new _ConnectorHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80610
80060
|
}
|
|
80611
80061
|
async getData() {
|
|
80612
|
-
const
|
|
80613
|
-
if (!
|
|
80614
|
-
return
|
|
80062
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80063
|
+
if (!obj || obj.type !== "connector") throw new KernelError("OPERATION_FAILED", `Connector ${this.id} not found`);
|
|
80064
|
+
return obj;
|
|
80615
80065
|
}
|
|
80616
80066
|
};
|
|
80617
80067
|
|
|
@@ -80627,9 +80077,9 @@ var ChartHandleImpl = class _ChartHandleImpl extends FloatingObjectHandleImpl {
|
|
|
80627
80077
|
return new _ChartHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80628
80078
|
}
|
|
80629
80079
|
async getData() {
|
|
80630
|
-
const
|
|
80631
|
-
if (!
|
|
80632
|
-
return
|
|
80080
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80081
|
+
if (!obj || obj.type !== "chart") throw new KernelError("OPERATION_FAILED", `Chart ${this.id} not found`);
|
|
80082
|
+
return obj;
|
|
80633
80083
|
}
|
|
80634
80084
|
};
|
|
80635
80085
|
|
|
@@ -80645,9 +80095,9 @@ var SmartArtHandleImpl = class _SmartArtHandleImpl extends FloatingObjectHandleI
|
|
|
80645
80095
|
return new _SmartArtHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80646
80096
|
}
|
|
80647
80097
|
async getData() {
|
|
80648
|
-
const
|
|
80649
|
-
if (!
|
|
80650
|
-
return
|
|
80098
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80099
|
+
if (!obj || obj.type !== "smartart") throw new KernelError("OPERATION_FAILED", `SmartArt ${this.id} not found`);
|
|
80100
|
+
return obj;
|
|
80651
80101
|
}
|
|
80652
80102
|
};
|
|
80653
80103
|
|
|
@@ -80663,9 +80113,9 @@ var SlicerHandleImpl = class _SlicerHandleImpl extends FloatingObjectHandleImpl
|
|
|
80663
80113
|
return new _SlicerHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80664
80114
|
}
|
|
80665
80115
|
async getData() {
|
|
80666
|
-
const
|
|
80667
|
-
if (!
|
|
80668
|
-
return
|
|
80116
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80117
|
+
if (!obj) throw new KernelError("OPERATION_FAILED", `Slicer ${this.id} not found`);
|
|
80118
|
+
return obj;
|
|
80669
80119
|
}
|
|
80670
80120
|
};
|
|
80671
80121
|
|
|
@@ -80681,12 +80131,50 @@ var OleObjectHandleImpl = class _OleObjectHandleImpl extends FloatingObjectHandl
|
|
|
80681
80131
|
return new _OleObjectHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80682
80132
|
}
|
|
80683
80133
|
async getData() {
|
|
80684
|
-
const
|
|
80685
|
-
if (!
|
|
80686
|
-
return
|
|
80134
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80135
|
+
if (!obj || obj.type !== "oleObject") throw new KernelError("OPERATION_FAILED", `OleObject ${this.id} not found`);
|
|
80136
|
+
return obj;
|
|
80687
80137
|
}
|
|
80688
80138
|
};
|
|
80689
80139
|
|
|
80140
|
+
// ../../kernel/src/api/worksheet/handles/floating-object-handle-factory.ts
|
|
80141
|
+
function createFloatingObjectHandle(id, type, objectsImpl, boundsReader, shapeType) {
|
|
80142
|
+
switch (type) {
|
|
80143
|
+
case "shape":
|
|
80144
|
+
return new ShapeHandleImpl(
|
|
80145
|
+
id,
|
|
80146
|
+
shapeType ?? "rect",
|
|
80147
|
+
objectsImpl,
|
|
80148
|
+
boundsReader
|
|
80149
|
+
);
|
|
80150
|
+
case "picture":
|
|
80151
|
+
return new PictureHandleImpl(id, objectsImpl, boundsReader);
|
|
80152
|
+
case "textbox":
|
|
80153
|
+
return new TextBoxHandleImpl(id, objectsImpl, boundsReader);
|
|
80154
|
+
case "drawing":
|
|
80155
|
+
return new DrawingHandleImpl(id, objectsImpl, boundsReader);
|
|
80156
|
+
case "equation":
|
|
80157
|
+
return new EquationHandleImpl(id, objectsImpl, boundsReader);
|
|
80158
|
+
case "connector":
|
|
80159
|
+
return new ConnectorHandleImpl(id, objectsImpl, boundsReader);
|
|
80160
|
+
case "chart":
|
|
80161
|
+
return new ChartHandleImpl(id, objectsImpl, boundsReader);
|
|
80162
|
+
case "smartart":
|
|
80163
|
+
return new SmartArtHandleImpl(id, objectsImpl, boundsReader);
|
|
80164
|
+
case "slicer":
|
|
80165
|
+
return new SlicerHandleImpl(id, objectsImpl, boundsReader);
|
|
80166
|
+
case "oleObject":
|
|
80167
|
+
return new OleObjectHandleImpl(id, objectsImpl, boundsReader);
|
|
80168
|
+
default:
|
|
80169
|
+
return new FloatingObjectHandleImpl(
|
|
80170
|
+
id,
|
|
80171
|
+
type,
|
|
80172
|
+
objectsImpl,
|
|
80173
|
+
boundsReader
|
|
80174
|
+
);
|
|
80175
|
+
}
|
|
80176
|
+
}
|
|
80177
|
+
|
|
80690
80178
|
// ../../kernel/src/api/worksheet/collections/object-collection-impl.ts
|
|
80691
80179
|
var WorksheetObjectCollectionImpl = class {
|
|
80692
80180
|
constructor(objectsImpl, boundsReader) {
|
|
@@ -80755,30 +80243,7 @@ var WorksheetObjectCollectionImpl = class {
|
|
|
80755
80243
|
return this.objectsImpl.ungroup(groupId);
|
|
80756
80244
|
}
|
|
80757
80245
|
createHandle(id, type) {
|
|
80758
|
-
|
|
80759
|
-
case "shape":
|
|
80760
|
-
return new ShapeHandleImpl(id, "rect", this.objectsImpl, this.boundsReader);
|
|
80761
|
-
case "picture":
|
|
80762
|
-
return new PictureHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80763
|
-
case "textbox":
|
|
80764
|
-
return new TextBoxHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80765
|
-
case "drawing":
|
|
80766
|
-
return new DrawingHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80767
|
-
case "equation":
|
|
80768
|
-
return new EquationHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80769
|
-
case "connector":
|
|
80770
|
-
return new ConnectorHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80771
|
-
case "chart":
|
|
80772
|
-
return new ChartHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80773
|
-
case "smartart":
|
|
80774
|
-
return new SmartArtHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80775
|
-
case "slicer":
|
|
80776
|
-
return new SlicerHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80777
|
-
case "oleObject":
|
|
80778
|
-
return new OleObjectHandleImpl(id, this.objectsImpl, this.boundsReader);
|
|
80779
|
-
default:
|
|
80780
|
-
return new FloatingObjectHandleImpl(id, type, this.objectsImpl, this.boundsReader);
|
|
80781
|
-
}
|
|
80246
|
+
return createFloatingObjectHandle(id, type, this.objectsImpl, this.boundsReader);
|
|
80782
80247
|
}
|
|
80783
80248
|
};
|
|
80784
80249
|
|
|
@@ -80926,9 +80391,9 @@ var WordArtHandleImpl = class _WordArtHandleImpl extends FloatingObjectHandleImp
|
|
|
80926
80391
|
return new _WordArtHandleImpl(receipt.id, this.objectsImpl, this.boundsReader);
|
|
80927
80392
|
}
|
|
80928
80393
|
async getData() {
|
|
80929
|
-
const
|
|
80930
|
-
if (!
|
|
80931
|
-
return
|
|
80394
|
+
const obj = await this.objectsImpl.getFullObject(this.id);
|
|
80395
|
+
if (!obj || obj.type !== "textbox") throw new KernelError("OPERATION_FAILED", `WordArt ${this.id} not found`);
|
|
80396
|
+
return obj;
|
|
80932
80397
|
}
|
|
80933
80398
|
};
|
|
80934
80399
|
|
|
@@ -81206,7 +80671,7 @@ function chartConfigToInternal(config) {
|
|
|
81206
80671
|
series: config.series,
|
|
81207
80672
|
dataLabels: config.dataLabels,
|
|
81208
80673
|
pieSlice: config.pieSlice,
|
|
81209
|
-
trendline: config.trendline,
|
|
80674
|
+
trendline: config.trendlines ?? (config.trendline ? [config.trendline] : void 0),
|
|
81210
80675
|
showLines: config.showLines,
|
|
81211
80676
|
smoothLines: config.smoothLines,
|
|
81212
80677
|
radarFilled: config.radarFilled,
|
|
@@ -81223,7 +80688,7 @@ function chartConfigToInternal(config) {
|
|
|
81223
80688
|
splitValue: config.splitValue,
|
|
81224
80689
|
widthCells: config.width,
|
|
81225
80690
|
heightCells: config.height,
|
|
81226
|
-
|
|
80691
|
+
ooxml: buildStatisticalExtra(config)
|
|
81227
80692
|
};
|
|
81228
80693
|
}
|
|
81229
80694
|
function chartUpdatesToInternal(updates) {
|
|
@@ -81250,7 +80715,11 @@ function chartUpdatesToInternal(updates) {
|
|
|
81250
80715
|
if (updates.series !== void 0) result.series = updates.series;
|
|
81251
80716
|
if (updates.dataLabels !== void 0) result.dataLabels = updates.dataLabels;
|
|
81252
80717
|
if (updates.pieSlice !== void 0) result.pieSlice = updates.pieSlice;
|
|
81253
|
-
if (updates.
|
|
80718
|
+
if (updates.trendlines !== void 0) {
|
|
80719
|
+
result.trendline = updates.trendlines;
|
|
80720
|
+
} else if (updates.trendline !== void 0) {
|
|
80721
|
+
result.trendline = updates.trendline ? [updates.trendline] : void 0;
|
|
80722
|
+
}
|
|
81254
80723
|
if (updates.showLines !== void 0) result.showLines = updates.showLines;
|
|
81255
80724
|
if (updates.smoothLines !== void 0) result.smoothLines = updates.smoothLines;
|
|
81256
80725
|
if (updates.radarFilled !== void 0) result.radarFilled = updates.radarFilled;
|
|
@@ -81267,7 +80736,7 @@ function chartUpdatesToInternal(updates) {
|
|
|
81267
80736
|
if (updates.splitValue !== void 0) result.splitValue = updates.splitValue;
|
|
81268
80737
|
if (updates.name !== void 0) result.name = updates.name;
|
|
81269
80738
|
const statisticalExtra = buildStatisticalExtra(updates);
|
|
81270
|
-
if (statisticalExtra) result.
|
|
80739
|
+
if (statisticalExtra) result.ooxml = statisticalExtra;
|
|
81271
80740
|
return result;
|
|
81272
80741
|
}
|
|
81273
80742
|
function serializedChartToChart(chart) {
|
|
@@ -81292,7 +80761,8 @@ function serializedChartToChart(chart) {
|
|
|
81292
80761
|
series: chart.series,
|
|
81293
80762
|
dataLabels: chart.dataLabels,
|
|
81294
80763
|
pieSlice: chart.pieSlice,
|
|
81295
|
-
trendline: chart.trendline,
|
|
80764
|
+
trendline: Array.isArray(chart.trendline) ? chart.trendline[0] : chart.trendline,
|
|
80765
|
+
trendlines: chart.trendline,
|
|
81296
80766
|
showLines: chart.showLines,
|
|
81297
80767
|
smoothLines: chart.smoothLines,
|
|
81298
80768
|
radarFilled: chart.radarFilled,
|
|
@@ -81307,7 +80777,7 @@ function serializedChartToChart(chart) {
|
|
|
81307
80777
|
bubbleScale: chart.bubbleScale,
|
|
81308
80778
|
splitType: chart.splitType,
|
|
81309
80779
|
splitValue: chart.splitValue,
|
|
81310
|
-
...unpackStatisticalExtra(chart.
|
|
80780
|
+
...unpackStatisticalExtra(chart.ooxml),
|
|
81311
80781
|
name: chart.name || void 0,
|
|
81312
80782
|
createdAt: chart.createdAt,
|
|
81313
80783
|
updatedAt: chart.updatedAt
|
|
@@ -81335,7 +80805,10 @@ async function applyUpdate(ctx, sheetId, chartId, updates) {
|
|
|
81335
80805
|
function ensurePointsArray(series, minLength) {
|
|
81336
80806
|
const points = [...series.points ?? []];
|
|
81337
80807
|
while (points.length <= minLength) {
|
|
81338
|
-
points.push({});
|
|
80808
|
+
points.push({ idx: points.length });
|
|
80809
|
+
}
|
|
80810
|
+
for (let i = 0; i < points.length; i++) {
|
|
80811
|
+
points[i].idx = i;
|
|
81339
80812
|
}
|
|
81340
80813
|
return points;
|
|
81341
80814
|
}
|
|
@@ -81562,40 +81035,6 @@ init_esm_shims();
|
|
|
81562
81035
|
init_a1();
|
|
81563
81036
|
init_compute_core();
|
|
81564
81037
|
init_errors();
|
|
81565
|
-
function cellRefToA1(cellRef) {
|
|
81566
|
-
const parts = cellRef.split(":");
|
|
81567
|
-
if (parts.length !== 2) return cellRef;
|
|
81568
|
-
const col = parseInt(parts[0], 10);
|
|
81569
|
-
const row = parseInt(parts[1], 10);
|
|
81570
|
-
if (isNaN(col) || isNaN(row)) return cellRef;
|
|
81571
|
-
return toA12(row, col);
|
|
81572
|
-
}
|
|
81573
|
-
function toApiComment(c) {
|
|
81574
|
-
const text = c.content ?? c.runs.map((r) => r.text).join("");
|
|
81575
|
-
return {
|
|
81576
|
-
id: c.id,
|
|
81577
|
-
cellId: c.cellRef,
|
|
81578
|
-
cellAddress: cellRefToA1(c.cellRef),
|
|
81579
|
-
author: c.author,
|
|
81580
|
-
authorId: c.authorId,
|
|
81581
|
-
text,
|
|
81582
|
-
content: c.runs.length > 0 ? c.runs.map((r) => ({
|
|
81583
|
-
text: r.text,
|
|
81584
|
-
bold: r.bold || void 0,
|
|
81585
|
-
italic: r.italic || void 0,
|
|
81586
|
-
underline: r.underline || void 0,
|
|
81587
|
-
strikethrough: r.strikethrough || void 0,
|
|
81588
|
-
color: r.color ?? void 0,
|
|
81589
|
-
fontName: r.fontName ?? void 0,
|
|
81590
|
-
fontSize: r.fontSize ?? void 0
|
|
81591
|
-
})) : void 0,
|
|
81592
|
-
threadId: c.threadId || void 0,
|
|
81593
|
-
parentId: c.parentId ?? void 0,
|
|
81594
|
-
resolved: c.resolved ?? void 0,
|
|
81595
|
-
createdAt: c.createdAt ?? 0,
|
|
81596
|
-
modifiedAt: c.modifiedAt ?? void 0
|
|
81597
|
-
};
|
|
81598
|
-
}
|
|
81599
81038
|
function propagateResolved(comments) {
|
|
81600
81039
|
const rootResolved = /* @__PURE__ */ new Map();
|
|
81601
81040
|
for (const c of comments) {
|
|
@@ -81721,7 +81160,7 @@ var WorksheetCommentsImpl = class {
|
|
|
81721
81160
|
"addCommentByPosition: no comment returned in MutationResult.data"
|
|
81722
81161
|
);
|
|
81723
81162
|
}
|
|
81724
|
-
return
|
|
81163
|
+
return comment;
|
|
81725
81164
|
}
|
|
81726
81165
|
async update(commentId, text) {
|
|
81727
81166
|
if (!text || text.trim().length === 0) {
|
|
@@ -81740,7 +81179,7 @@ var WorksheetCommentsImpl = class {
|
|
|
81740
81179
|
}
|
|
81741
81180
|
async list() {
|
|
81742
81181
|
const comments = await this.ctx.computeBridge.getAllComments(this.sheetId);
|
|
81743
|
-
return propagateResolved(comments
|
|
81182
|
+
return propagateResolved(comments);
|
|
81744
81183
|
}
|
|
81745
81184
|
async getForCell(a, b) {
|
|
81746
81185
|
const { row, col } = resolveCell(a, b);
|
|
@@ -81749,7 +81188,7 @@ var WorksheetCommentsImpl = class {
|
|
|
81749
81188
|
row,
|
|
81750
81189
|
col
|
|
81751
81190
|
);
|
|
81752
|
-
return comments
|
|
81191
|
+
return comments;
|
|
81753
81192
|
}
|
|
81754
81193
|
async addReply(commentId, text, author) {
|
|
81755
81194
|
const parent = await this.ctx.computeBridge.getComment(this.sheetId, commentId);
|
|
@@ -81766,7 +81205,7 @@ var WorksheetCommentsImpl = class {
|
|
|
81766
81205
|
author,
|
|
81767
81206
|
{ parentId: commentId }
|
|
81768
81207
|
);
|
|
81769
|
-
return
|
|
81208
|
+
return comment;
|
|
81770
81209
|
}
|
|
81771
81210
|
async getThread(commentId) {
|
|
81772
81211
|
const comment = await this.ctx.computeBridge.getComment(this.sheetId, commentId);
|
|
@@ -81775,11 +81214,11 @@ var WorksheetCommentsImpl = class {
|
|
|
81775
81214
|
}
|
|
81776
81215
|
const threadId = comment.threadId ?? comment.id;
|
|
81777
81216
|
const thread = await this.ctx.computeBridge.getCommentThread(this.sheetId, threadId);
|
|
81778
|
-
return propagateResolved(thread
|
|
81217
|
+
return propagateResolved(thread);
|
|
81779
81218
|
}
|
|
81780
81219
|
async getById(commentId) {
|
|
81781
81220
|
const comment = await this.ctx.computeBridge.getComment(this.sheetId, commentId);
|
|
81782
|
-
return comment
|
|
81221
|
+
return comment ?? null;
|
|
81783
81222
|
}
|
|
81784
81223
|
};
|
|
81785
81224
|
|
|
@@ -82002,18 +81441,9 @@ var WorksheetFiltersImpl = class {
|
|
|
82002
81441
|
const filters = await this.ctx.computeBridge.getFiltersInSheet(this.sheetId);
|
|
82003
81442
|
if (filters.length === 0) return null;
|
|
82004
81443
|
const filter = filters[0];
|
|
82005
|
-
const columns = /* @__PURE__ */ new Map();
|
|
82006
|
-
if (filter.columnFilters) {
|
|
82007
|
-
for (const [key, value] of Object.entries(filter.columnFilters)) {
|
|
82008
|
-
const colIdx = parseInt(key, 10);
|
|
82009
|
-
if (!isNaN(colIdx) && value) {
|
|
82010
|
-
columns.set(colIdx, value);
|
|
82011
|
-
}
|
|
82012
|
-
}
|
|
82013
|
-
}
|
|
82014
81444
|
return {
|
|
82015
81445
|
range: `${toA12(filter.startRow ?? 0, filter.startCol ?? 0)}:${toA12(filter.endRow ?? 0, filter.endCol ?? 0)}`,
|
|
82016
|
-
|
|
81446
|
+
columnFilters: filter.columnFilters ?? {}
|
|
82017
81447
|
};
|
|
82018
81448
|
}
|
|
82019
81449
|
async getForRange(range2) {
|
|
@@ -82084,9 +81514,9 @@ var WorksheetFiltersImpl = class {
|
|
|
82084
81514
|
async list() {
|
|
82085
81515
|
const raw = await this.ctx.computeBridge.getFiltersInSheet(this.sheetId);
|
|
82086
81516
|
return raw.map((f) => ({
|
|
82087
|
-
id: f.id
|
|
82088
|
-
range:
|
|
82089
|
-
|
|
81517
|
+
id: f.id,
|
|
81518
|
+
range: void 0,
|
|
81519
|
+
columnFilters: f.columnFilters
|
|
82090
81520
|
}));
|
|
82091
81521
|
}
|
|
82092
81522
|
async listDetails() {
|
|
@@ -82104,13 +81534,22 @@ var WorksheetFiltersImpl = class {
|
|
|
82104
81534
|
}
|
|
82105
81535
|
async getSortState(filterId) {
|
|
82106
81536
|
try {
|
|
82107
|
-
|
|
81537
|
+
const sortState = await this.ctx.computeBridge.getFilterSortState(this.sheetId, filterId);
|
|
81538
|
+
if (!sortState) return null;
|
|
81539
|
+
return {
|
|
81540
|
+
column: sortState.columnCellId,
|
|
81541
|
+
direction: sortState.order === "asc" ? "asc" : "desc"
|
|
81542
|
+
};
|
|
82108
81543
|
} catch {
|
|
82109
81544
|
return null;
|
|
82110
81545
|
}
|
|
82111
81546
|
}
|
|
82112
81547
|
async setSortState(filterId, state) {
|
|
82113
|
-
await this.ctx.computeBridge.setFilterSortState(this.sheetId, filterId,
|
|
81548
|
+
await this.ctx.computeBridge.setFilterSortState(this.sheetId, filterId, {
|
|
81549
|
+
columnCellId: String(state.column),
|
|
81550
|
+
order: state.direction === "asc" ? "asc" : "desc",
|
|
81551
|
+
sortBy: "value"
|
|
81552
|
+
});
|
|
82114
81553
|
}
|
|
82115
81554
|
};
|
|
82116
81555
|
|
|
@@ -82144,6 +81583,25 @@ init_esm_shims();
|
|
|
82144
81583
|
|
|
82145
81584
|
// ../../number-formats/src/constants.ts
|
|
82146
81585
|
init_esm_shims();
|
|
81586
|
+
import {
|
|
81587
|
+
ACCOUNTING_FORMATS,
|
|
81588
|
+
CURRENCY_FORMATS,
|
|
81589
|
+
CURRENCY_SYMBOLS,
|
|
81590
|
+
DATE_FORMATS,
|
|
81591
|
+
DEFAULT_FORMAT_BY_TYPE,
|
|
81592
|
+
EXCEL_BUILTIN_FORMATS,
|
|
81593
|
+
FORMAT_CATEGORIES,
|
|
81594
|
+
FORMAT_PRESETS,
|
|
81595
|
+
FRACTION_FORMATS,
|
|
81596
|
+
GENERAL_FORMATS,
|
|
81597
|
+
NEGATIVE_FORMATS,
|
|
81598
|
+
NUMBER_FORMATS,
|
|
81599
|
+
PERCENTAGE_FORMATS,
|
|
81600
|
+
SCIENTIFIC_FORMATS,
|
|
81601
|
+
SPECIAL_FORMATS,
|
|
81602
|
+
TEXT_FORMATS,
|
|
81603
|
+
TIME_FORMATS
|
|
81604
|
+
} from "@mog-sdk/spreadsheet-contracts/number-formats/constants";
|
|
82147
81605
|
|
|
82148
81606
|
// ../../number-formats/src/format-utils.ts
|
|
82149
81607
|
init_esm_shims();
|
|
@@ -82387,7 +81845,11 @@ var WorksheetFormatsImpl = class {
|
|
|
82387
81845
|
col = b;
|
|
82388
81846
|
format = c;
|
|
82389
81847
|
}
|
|
82390
|
-
const result = await this.ctx.computeBridge.setFormatForRanges(
|
|
81848
|
+
const result = await this.ctx.computeBridge.setFormatForRanges(
|
|
81849
|
+
this.sheetId,
|
|
81850
|
+
[[row, col, row, col]],
|
|
81851
|
+
format
|
|
81852
|
+
);
|
|
82391
81853
|
return { cellCount: result.propertyChanges?.length ?? 0 };
|
|
82392
81854
|
}
|
|
82393
81855
|
async setRange(a, b) {
|
|
@@ -82436,7 +81898,11 @@ var WorksheetFormatsImpl = class {
|
|
|
82436
81898
|
}
|
|
82437
81899
|
async get(a, b) {
|
|
82438
81900
|
const { row, col } = resolveCell(a, b);
|
|
82439
|
-
return this.ctx.computeBridge.getResolvedFormat(
|
|
81901
|
+
return this.ctx.computeBridge.getResolvedFormat(
|
|
81902
|
+
this.sheetId,
|
|
81903
|
+
row,
|
|
81904
|
+
col
|
|
81905
|
+
);
|
|
82440
81906
|
}
|
|
82441
81907
|
async adjustIndent(a, b, c) {
|
|
82442
81908
|
let row, col, amount;
|
|
@@ -83478,7 +82944,12 @@ var WorksheetPivotsImpl = class _WorksheetPivotsImpl {
|
|
|
83478
82944
|
}
|
|
83479
82945
|
async queryPivot(pivotName, filters) {
|
|
83480
82946
|
const pivot = await this.findPivotByName(pivotName);
|
|
83481
|
-
if (!pivot)
|
|
82947
|
+
if (!pivot) {
|
|
82948
|
+
throw new KernelError(
|
|
82949
|
+
"COMPUTE_ERROR",
|
|
82950
|
+
`queryPivot: Pivot table "${pivotName}" not found on this sheet`
|
|
82951
|
+
);
|
|
82952
|
+
}
|
|
83482
82953
|
const pivotId = pivot.id ?? pivot.name;
|
|
83483
82954
|
const result = await this.ctx.pivot.compute(this.sheetId, pivotId);
|
|
83484
82955
|
if (!result) return null;
|
|
@@ -83835,7 +83306,7 @@ init_errors();
|
|
|
83835
83306
|
|
|
83836
83307
|
// ../../kernel/src/api/worksheet/operations/sheet-management-operations.ts
|
|
83837
83308
|
init_esm_shims();
|
|
83838
|
-
|
|
83309
|
+
import { DEFAULT_PROTECTION_OPTIONS as DEFAULT_PROTECTION_OPTIONS2 } from "@mog-sdk/spreadsheet-contracts/protection";
|
|
83839
83310
|
function parseCellRef2(ref) {
|
|
83840
83311
|
const match = ref.match(/^([A-Z]+)(\d+)$/i);
|
|
83841
83312
|
if (!match) return null;
|
|
@@ -84259,12 +83730,35 @@ var WorksheetSlicersImpl = class {
|
|
|
84259
83730
|
}
|
|
84260
83731
|
async add(config) {
|
|
84261
83732
|
const caption = config.caption ?? config.name ?? "";
|
|
83733
|
+
const source = config.source ?? {
|
|
83734
|
+
type: "table",
|
|
83735
|
+
tableId: config.tableName ?? "",
|
|
83736
|
+
columnCellId: config.columnName ?? ""
|
|
83737
|
+
};
|
|
83738
|
+
const defaultStyle = {
|
|
83739
|
+
columnCount: 1,
|
|
83740
|
+
buttonHeight: 30,
|
|
83741
|
+
showSelectionIndicator: true,
|
|
83742
|
+
crossFilter: "showItemsWithDataAtTop",
|
|
83743
|
+
customListSort: true,
|
|
83744
|
+
showItemsWithNoData: true,
|
|
83745
|
+
sortOrder: "ascending"
|
|
83746
|
+
};
|
|
84262
83747
|
const storedConfig = {
|
|
84263
|
-
|
|
84264
|
-
|
|
83748
|
+
id: config.id ?? "",
|
|
83749
|
+
sheetId: config.sheetId ?? "",
|
|
83750
|
+
source,
|
|
83751
|
+
caption,
|
|
83752
|
+
style: config.style ?? defaultStyle,
|
|
83753
|
+
position: config.position,
|
|
83754
|
+
zIndex: config.zIndex ?? 0,
|
|
83755
|
+
locked: config.locked ?? false,
|
|
83756
|
+
showHeader: config.showHeader ?? true,
|
|
83757
|
+
multiSelect: config.multiSelect ?? true,
|
|
83758
|
+
selectedValues: config.selectedValues ?? []
|
|
84265
83759
|
};
|
|
84266
83760
|
await this.ctx.computeBridge.createSlicer(this.sheetId, storedConfig);
|
|
84267
|
-
return storedConfig.id
|
|
83761
|
+
return storedConfig.id;
|
|
84268
83762
|
}
|
|
84269
83763
|
async remove(slicerId) {
|
|
84270
83764
|
validateSlicerId(slicerId, "deleteSlicer");
|
|
@@ -84426,11 +83920,15 @@ var WorksheetSlicersImpl = class {
|
|
|
84426
83920
|
}
|
|
84427
83921
|
async updateConfig(slicerId, updates) {
|
|
84428
83922
|
validateSlicerId(slicerId, "updateSlicerConfig");
|
|
84429
|
-
|
|
84430
|
-
|
|
84431
|
-
|
|
84432
|
-
updates
|
|
84433
|
-
|
|
83923
|
+
const bridgeUpdate = {};
|
|
83924
|
+
if (updates.caption !== void 0) bridgeUpdate.caption = updates.caption;
|
|
83925
|
+
if (updates.name !== void 0 && bridgeUpdate.caption === void 0) {
|
|
83926
|
+
bridgeUpdate.caption = updates.name;
|
|
83927
|
+
}
|
|
83928
|
+
if (updates.style !== void 0) bridgeUpdate.style = updates.style;
|
|
83929
|
+
if (updates.position !== void 0) bridgeUpdate.position = updates.position;
|
|
83930
|
+
if (updates.showHeader !== void 0) bridgeUpdate.showHeader = updates.showHeader;
|
|
83931
|
+
await this.ctx.computeBridge.updateSlicerConfig(this.sheetId, slicerId, bridgeUpdate);
|
|
84434
83932
|
}
|
|
84435
83933
|
async getState(slicerId) {
|
|
84436
83934
|
const state = await this.ctx.computeBridge.getSlicerState(this.sheetId, slicerId);
|
|
@@ -85024,6 +84522,7 @@ function toBridgeTextToColumnsOptions(options) {
|
|
|
85024
84522
|
// ../../kernel/src/api/worksheet/tables.ts
|
|
85025
84523
|
init_esm_shims();
|
|
85026
84524
|
init_errors();
|
|
84525
|
+
init_value_conversions();
|
|
85027
84526
|
|
|
85028
84527
|
// ../../kernel/src/api/worksheet/operations/table-operations.ts
|
|
85029
84528
|
init_esm_shims();
|
|
@@ -85045,31 +84544,15 @@ function bridgeTableToTableInfo(table) {
|
|
|
85045
84544
|
const endRowA1 = table.range.endRow + 1;
|
|
85046
84545
|
const range2 = `${startLetter}${startRowA1}:${endLetter}${endRowA1}`;
|
|
85047
84546
|
return {
|
|
85048
|
-
|
|
85049
|
-
|
|
85050
|
-
range: range2,
|
|
85051
|
-
hasHeaders: table.hasHeaderRow,
|
|
85052
|
-
showTotals: table.hasTotalsRow,
|
|
85053
|
-
style: table.style || void 0,
|
|
85054
|
-
highlightFirstColumn: table.emphasizeFirstColumn,
|
|
85055
|
-
highlightLastColumn: table.emphasizeLastColumn,
|
|
85056
|
-
showBandedColumns: table.bandedColumns,
|
|
85057
|
-
showBandedRows: table.bandedRows,
|
|
85058
|
-
showFilterButton: table.showFilterButtons,
|
|
85059
|
-
showHeaders: table.hasHeaderRow,
|
|
85060
|
-
columns: table.columns.map((col) => ({
|
|
85061
|
-
name: col.name,
|
|
85062
|
-
index: col.index,
|
|
85063
|
-
totalFunction: col.totalsFunction ?? void 0,
|
|
85064
|
-
calculatedFormula: col.calculatedFormula ?? void 0
|
|
85065
|
-
}))
|
|
84547
|
+
...table,
|
|
84548
|
+
range: range2
|
|
85066
84549
|
};
|
|
85067
84550
|
}
|
|
85068
84551
|
function getTableColumnDataCellsFromInfo(table, colIndex) {
|
|
85069
84552
|
const parsed = parseA1Range(table.range);
|
|
85070
84553
|
if (!parsed) return [];
|
|
85071
|
-
const dataStartRow = table.
|
|
85072
|
-
const dataEndRow = table.
|
|
84554
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
84555
|
+
const dataEndRow = table.hasTotalsRow ? parsed.endRow - 1 : parsed.endRow;
|
|
85073
84556
|
if (dataStartRow > dataEndRow) return [];
|
|
85074
84557
|
const col = parsed.startCol + colIndex;
|
|
85075
84558
|
if (col > parsed.endCol) return [];
|
|
@@ -85082,15 +84565,15 @@ function getTableColumnDataCellsFromInfo(table, colIndex) {
|
|
|
85082
84565
|
function getDataBodyRangeFromInfo(table) {
|
|
85083
84566
|
const parsed = parseA1Range(table.range);
|
|
85084
84567
|
if (!parsed) return null;
|
|
85085
|
-
const dataStartRow = table.
|
|
85086
|
-
const dataEndRow = table.
|
|
84568
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
84569
|
+
const dataEndRow = table.hasTotalsRow ? parsed.endRow - 1 : parsed.endRow;
|
|
85087
84570
|
if (dataStartRow > dataEndRow) return null;
|
|
85088
84571
|
const startLetter = colToLetter3(parsed.startCol);
|
|
85089
84572
|
const endLetter = colToLetter3(parsed.endCol);
|
|
85090
84573
|
return `${startLetter}${dataStartRow + 1}:${endLetter}${dataEndRow + 1}`;
|
|
85091
84574
|
}
|
|
85092
84575
|
function getHeaderRowRangeFromInfo(table) {
|
|
85093
|
-
if (!table.
|
|
84576
|
+
if (!table.hasHeaderRow) return null;
|
|
85094
84577
|
const parsed = parseA1Range(table.range);
|
|
85095
84578
|
if (!parsed) return null;
|
|
85096
84579
|
const startLetter = colToLetter3(parsed.startCol);
|
|
@@ -85099,7 +84582,7 @@ function getHeaderRowRangeFromInfo(table) {
|
|
|
85099
84582
|
return `${startLetter}${headerRow}:${endLetter}${headerRow}`;
|
|
85100
84583
|
}
|
|
85101
84584
|
function getTotalRowRangeFromInfo(table) {
|
|
85102
|
-
if (!table.
|
|
84585
|
+
if (!table.hasTotalsRow) return null;
|
|
85103
84586
|
const parsed = parseA1Range(table.range);
|
|
85104
84587
|
if (!parsed) return null;
|
|
85105
84588
|
const startLetter = colToLetter3(parsed.startCol);
|
|
@@ -85195,23 +84678,23 @@ var WorksheetTablesImpl = class {
|
|
|
85195
84678
|
if (updates.name !== void 0) {
|
|
85196
84679
|
await this.ctx.computeBridge.renameTable(tableName, updates.name);
|
|
85197
84680
|
}
|
|
85198
|
-
const
|
|
85199
|
-
|
|
85200
|
-
|
|
85201
|
-
|
|
85202
|
-
|
|
85203
|
-
|
|
85204
|
-
|
|
85205
|
-
for (const
|
|
84681
|
+
const boolOptions = [
|
|
84682
|
+
"emphasizeFirstColumn",
|
|
84683
|
+
"emphasizeLastColumn",
|
|
84684
|
+
"bandedColumns",
|
|
84685
|
+
"bandedRows",
|
|
84686
|
+
"showFilterButtons"
|
|
84687
|
+
];
|
|
84688
|
+
for (const key of boolOptions) {
|
|
85206
84689
|
if (updates[key] !== void 0) {
|
|
85207
|
-
await this.ctx.computeBridge.setTableBoolOption(tableName,
|
|
84690
|
+
await this.ctx.computeBridge.setTableBoolOption(tableName, key, updates[key]);
|
|
85208
84691
|
}
|
|
85209
84692
|
}
|
|
85210
|
-
if (updates.
|
|
85211
|
-
await this.setShowHeaders(tableName, updates.
|
|
84693
|
+
if (updates.hasHeaderRow !== void 0) {
|
|
84694
|
+
await this.setShowHeaders(tableName, updates.hasHeaderRow);
|
|
85212
84695
|
}
|
|
85213
|
-
if (updates.
|
|
85214
|
-
await this.setShowTotals(tableName, updates.
|
|
84696
|
+
if (updates.hasTotalsRow !== void 0) {
|
|
84697
|
+
await this.setShowTotals(tableName, updates.hasTotalsRow);
|
|
85215
84698
|
}
|
|
85216
84699
|
}
|
|
85217
84700
|
async getAtCell(row, col) {
|
|
@@ -85332,14 +84815,14 @@ var WorksheetTablesImpl = class {
|
|
|
85332
84815
|
async setShowHeaders(tableName, visible) {
|
|
85333
84816
|
const table = await this.get(tableName);
|
|
85334
84817
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85335
|
-
if (table.
|
|
84818
|
+
if (table.hasHeaderRow !== visible) {
|
|
85336
84819
|
await this.ctx.computeBridge.toggleHeaderRow(tableName);
|
|
85337
84820
|
}
|
|
85338
84821
|
}
|
|
85339
84822
|
async setShowTotals(tableName, visible) {
|
|
85340
84823
|
const table = await this.get(tableName);
|
|
85341
84824
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85342
|
-
if (
|
|
84825
|
+
if (table.hasTotalsRow !== visible) {
|
|
85343
84826
|
await this.ctx.computeBridge.toggleTotalsRow(tableName);
|
|
85344
84827
|
}
|
|
85345
84828
|
}
|
|
@@ -85373,8 +84856,8 @@ var WorksheetTablesImpl = class {
|
|
|
85373
84856
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85374
84857
|
const parsed = parseA1Range2(table.range);
|
|
85375
84858
|
if (!parsed) return 0;
|
|
85376
|
-
const dataStartRow = table.
|
|
85377
|
-
const dataEndRow = table.
|
|
84859
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
84860
|
+
const dataEndRow = table.hasTotalsRow ? parsed.endRow - 1 : parsed.endRow;
|
|
85378
84861
|
return Math.max(0, dataEndRow - dataStartRow + 1);
|
|
85379
84862
|
}
|
|
85380
84863
|
async getRowRange(tableName, index) {
|
|
@@ -85382,7 +84865,7 @@ var WorksheetTablesImpl = class {
|
|
|
85382
84865
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85383
84866
|
const parsed = parseA1Range2(table.range);
|
|
85384
84867
|
if (!parsed) throw new KernelError("COMPUTE_ERROR", `Invalid table range: ${table.range}`);
|
|
85385
|
-
const dataStartRow = table.
|
|
84868
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
85386
84869
|
const absRow = dataStartRow + index;
|
|
85387
84870
|
const startLetter = colToLetter3(parsed.startCol);
|
|
85388
84871
|
const endLetter = colToLetter3(parsed.endCol);
|
|
@@ -85393,7 +84876,7 @@ var WorksheetTablesImpl = class {
|
|
|
85393
84876
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85394
84877
|
const parsed = parseA1Range2(table.range);
|
|
85395
84878
|
if (!parsed) return [];
|
|
85396
|
-
const dataStartRow = table.
|
|
84879
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
85397
84880
|
const absRow = dataStartRow + index;
|
|
85398
84881
|
return queryRangeValues(this.ctx, this.sheetId, absRow, parsed.startCol, absRow, parsed.endCol);
|
|
85399
84882
|
}
|
|
@@ -85402,7 +84885,7 @@ var WorksheetTablesImpl = class {
|
|
|
85402
84885
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85403
84886
|
const parsed = parseA1Range2(table.range);
|
|
85404
84887
|
if (!parsed) return;
|
|
85405
|
-
const dataStartRow = table.
|
|
84888
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
85406
84889
|
const absRow = dataStartRow + index;
|
|
85407
84890
|
const edits = values.map((val, i) => ({
|
|
85408
84891
|
row: absRow,
|
|
@@ -85421,15 +84904,15 @@ var WorksheetTablesImpl = class {
|
|
|
85421
84904
|
if (!parsed) return null;
|
|
85422
84905
|
const col = parsed.startCol + columnIndex;
|
|
85423
84906
|
if (col > parsed.endCol) return null;
|
|
85424
|
-
const dataStartRow = table.
|
|
85425
|
-
const dataEndRow = table.
|
|
84907
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
84908
|
+
const dataEndRow = table.hasTotalsRow ? parsed.endRow - 1 : parsed.endRow;
|
|
85426
84909
|
if (dataStartRow > dataEndRow) return null;
|
|
85427
84910
|
const letter = colToLetter3(col);
|
|
85428
84911
|
return `${letter}${dataStartRow + 1}:${letter}${dataEndRow + 1}`;
|
|
85429
84912
|
}
|
|
85430
84913
|
async getColumnHeaderRange(tableName, columnIndex) {
|
|
85431
84914
|
const table = await this.get(tableName);
|
|
85432
|
-
if (!table || !table.
|
|
84915
|
+
if (!table || !table.hasHeaderRow) return null;
|
|
85433
84916
|
const parsed = parseA1Range2(table.range);
|
|
85434
84917
|
if (!parsed) return null;
|
|
85435
84918
|
const col = parsed.startCol + columnIndex;
|
|
@@ -85450,7 +84933,7 @@ var WorksheetTablesImpl = class {
|
|
|
85450
84933
|
}
|
|
85451
84934
|
async getColumnTotalRange(tableName, columnIndex) {
|
|
85452
84935
|
const table = await this.get(tableName);
|
|
85453
|
-
if (!table || !table.
|
|
84936
|
+
if (!table || !table.hasTotalsRow) return null;
|
|
85454
84937
|
const parsed = parseA1Range2(table.range);
|
|
85455
84938
|
if (!parsed) return null;
|
|
85456
84939
|
const col = parsed.startCol + columnIndex;
|
|
@@ -85466,8 +84949,8 @@ var WorksheetTablesImpl = class {
|
|
|
85466
84949
|
if (!parsed) return [];
|
|
85467
84950
|
const col = parsed.startCol + columnIndex;
|
|
85468
84951
|
if (col > parsed.endCol) return [];
|
|
85469
|
-
const dataStartRow = table.
|
|
85470
|
-
const dataEndRow = table.
|
|
84952
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
84953
|
+
const dataEndRow = table.hasTotalsRow ? parsed.endRow - 1 : parsed.endRow;
|
|
85471
84954
|
if (dataStartRow > dataEndRow) return [];
|
|
85472
84955
|
return queryRangeValues(this.ctx, this.sheetId, dataStartRow, col, dataEndRow, col);
|
|
85473
84956
|
}
|
|
@@ -85478,7 +84961,7 @@ var WorksheetTablesImpl = class {
|
|
|
85478
84961
|
if (!parsed) return;
|
|
85479
84962
|
const col = parsed.startCol + columnIndex;
|
|
85480
84963
|
if (col > parsed.endCol) return;
|
|
85481
|
-
const dataStartRow = table.
|
|
84964
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
85482
84965
|
const edits = values.map((val, i) => ({
|
|
85483
84966
|
row: dataStartRow + i,
|
|
85484
84967
|
col,
|
|
@@ -85494,8 +84977,8 @@ var WorksheetTablesImpl = class {
|
|
|
85494
84977
|
if (!table) throw new KernelError("COMPUTE_ERROR", `Table not found: ${tableName}`);
|
|
85495
84978
|
const parsed = parseA1Range2(table.range);
|
|
85496
84979
|
if (!parsed) return;
|
|
85497
|
-
const dataStartRow = table.
|
|
85498
|
-
const dataEndRow = table.
|
|
84980
|
+
const dataStartRow = table.hasHeaderRow ? parsed.startRow + 1 : parsed.startRow;
|
|
84981
|
+
const dataEndRow = table.hasTotalsRow ? parsed.endRow - 1 : parsed.endRow;
|
|
85499
84982
|
if (dataStartRow > dataEndRow) return;
|
|
85500
84983
|
const numCols = parsed.endCol - parsed.startCol + 1;
|
|
85501
84984
|
const numRows = dataEndRow - dataStartRow + 1;
|
|
@@ -85515,7 +84998,7 @@ var WorksheetTablesImpl = class {
|
|
|
85515
84998
|
const row = [];
|
|
85516
84999
|
for (let c = 0; c < numCols; c++) {
|
|
85517
85000
|
const cell = cellMap.get(`${dataStartRow + r},${parsed.startCol + c}`);
|
|
85518
|
-
row.push(cell?.value ?? null);
|
|
85001
|
+
row.push(normalizeCellValue(cell?.value ?? null));
|
|
85519
85002
|
}
|
|
85520
85003
|
rows.push(row);
|
|
85521
85004
|
}
|
|
@@ -85587,7 +85070,7 @@ async function queryRangeValues(ctx, sheetId, startRow, startCol, endRow, endCol
|
|
|
85587
85070
|
for (let r = startRow; r <= endRow; r++) {
|
|
85588
85071
|
for (let c = startCol; c <= endCol; c++) {
|
|
85589
85072
|
const cell = cellMap.get(`${r},${c}`);
|
|
85590
|
-
values.push(cell?.value ?? null);
|
|
85073
|
+
values.push(normalizeCellValue(cell?.value ?? null));
|
|
85591
85074
|
}
|
|
85592
85075
|
}
|
|
85593
85076
|
return values;
|
|
@@ -86177,6 +85660,117 @@ var WorksheetViewImpl = class {
|
|
|
86177
85660
|
}
|
|
86178
85661
|
};
|
|
86179
85662
|
|
|
85663
|
+
// ../../kernel/src/api/worksheet/what-if.ts
|
|
85664
|
+
init_esm_shims();
|
|
85665
|
+
|
|
85666
|
+
// ../../kernel/src/api/worksheet/operations/data-table-operations.ts
|
|
85667
|
+
init_esm_shims();
|
|
85668
|
+
init_errors();
|
|
85669
|
+
async function dataTable(ctx, sheetId, formulaCell, options) {
|
|
85670
|
+
const formulaPos = resolveCell(formulaCell);
|
|
85671
|
+
const formulaCellId = await getCellIdAt2(ctx, sheetId, formulaPos.row, formulaPos.col);
|
|
85672
|
+
if (!formulaCellId) {
|
|
85673
|
+
throw new KernelError("COMPUTE_ERROR", `Formula cell ${formulaCell} has no content.`);
|
|
85674
|
+
}
|
|
85675
|
+
let rowInputCellId = null;
|
|
85676
|
+
if (options.rowInputCell) {
|
|
85677
|
+
const pos = resolveCell(options.rowInputCell);
|
|
85678
|
+
const cid = await getCellIdAt2(ctx, sheetId, pos.row, pos.col);
|
|
85679
|
+
if (!cid) {
|
|
85680
|
+
throw new KernelError(
|
|
85681
|
+
"COMPUTE_ERROR",
|
|
85682
|
+
`Row input cell ${options.rowInputCell} must contain a value before calling dataTable().`
|
|
85683
|
+
);
|
|
85684
|
+
}
|
|
85685
|
+
rowInputCellId = cid;
|
|
85686
|
+
}
|
|
85687
|
+
let colInputCellId = null;
|
|
85688
|
+
if (options.colInputCell) {
|
|
85689
|
+
const pos = resolveCell(options.colInputCell);
|
|
85690
|
+
const cid = await getCellIdAt2(ctx, sheetId, pos.row, pos.col);
|
|
85691
|
+
if (!cid) {
|
|
85692
|
+
throw new KernelError(
|
|
85693
|
+
"COMPUTE_ERROR",
|
|
85694
|
+
`Column input cell ${options.colInputCell} must contain a value before calling dataTable().`
|
|
85695
|
+
);
|
|
85696
|
+
}
|
|
85697
|
+
colInputCellId = cid;
|
|
85698
|
+
}
|
|
85699
|
+
const bridgeResult = await ctx.computeBridge.dataTable({
|
|
85700
|
+
formula_cell: formulaCellId,
|
|
85701
|
+
row_input_cell: rowInputCellId,
|
|
85702
|
+
col_input_cell: colInputCellId,
|
|
85703
|
+
row_values: options.rowValues,
|
|
85704
|
+
col_values: options.colValues
|
|
85705
|
+
});
|
|
85706
|
+
const result = bridgeResult;
|
|
85707
|
+
return {
|
|
85708
|
+
results: result.results,
|
|
85709
|
+
cellCount: result.cellCount ?? result.cell_count ?? 0,
|
|
85710
|
+
elapsedMs: result.elapsedMs ?? result.elapsed_ms ?? 0,
|
|
85711
|
+
cancelled: result.cancelled ?? false
|
|
85712
|
+
};
|
|
85713
|
+
}
|
|
85714
|
+
|
|
85715
|
+
// ../../kernel/src/api/worksheet/operations/goal-seek-operations.ts
|
|
85716
|
+
init_esm_shims();
|
|
85717
|
+
init_errors();
|
|
85718
|
+
async function goalSeek(ctx, sheetId, targetCell, targetValue, changingCell) {
|
|
85719
|
+
const targetPos = resolveCell(targetCell);
|
|
85720
|
+
const changingPos = resolveCell(changingCell);
|
|
85721
|
+
const formulaCellId = await getCellIdAt2(
|
|
85722
|
+
ctx,
|
|
85723
|
+
sheetId,
|
|
85724
|
+
targetPos.row,
|
|
85725
|
+
targetPos.col
|
|
85726
|
+
);
|
|
85727
|
+
if (!formulaCellId) {
|
|
85728
|
+
throw new KernelError("COMPUTE_ERROR", `Target cell ${targetCell} has no content.`);
|
|
85729
|
+
}
|
|
85730
|
+
const inputCellId = await getCellIdAt2(
|
|
85731
|
+
ctx,
|
|
85732
|
+
sheetId,
|
|
85733
|
+
changingPos.row,
|
|
85734
|
+
changingPos.col
|
|
85735
|
+
);
|
|
85736
|
+
if (!inputCellId) {
|
|
85737
|
+
throw new KernelError("COMPUTE_ERROR", `Changing cell ${changingCell} has no content.`);
|
|
85738
|
+
}
|
|
85739
|
+
const changingData = await getCell(ctx, sheetId, changingPos.row, changingPos.col);
|
|
85740
|
+
const initialGuess = typeof changingData?.value === "number" ? changingData.value : 0;
|
|
85741
|
+
const bridgeResult = await ctx.computeBridge.goalSeek({
|
|
85742
|
+
formula_cell: formulaCellId,
|
|
85743
|
+
target: targetValue,
|
|
85744
|
+
input_cell: inputCellId,
|
|
85745
|
+
initial_guess: initialGuess
|
|
85746
|
+
});
|
|
85747
|
+
const result = bridgeResult;
|
|
85748
|
+
const solutionValue = result.solutionValue ?? result.solution_value;
|
|
85749
|
+
const iterations = result.iterations;
|
|
85750
|
+
if (result.found && solutionValue != null) {
|
|
85751
|
+
await setCell(ctx, sheetId, changingPos.row, changingPos.col, solutionValue);
|
|
85752
|
+
}
|
|
85753
|
+
return {
|
|
85754
|
+
found: result.found,
|
|
85755
|
+
value: solutionValue,
|
|
85756
|
+
iterations
|
|
85757
|
+
};
|
|
85758
|
+
}
|
|
85759
|
+
|
|
85760
|
+
// ../../kernel/src/api/worksheet/what-if.ts
|
|
85761
|
+
var WorksheetWhatIfImpl = class {
|
|
85762
|
+
constructor(ctx, sheetId) {
|
|
85763
|
+
this.ctx = ctx;
|
|
85764
|
+
this.sheetId = sheetId;
|
|
85765
|
+
}
|
|
85766
|
+
async goalSeek(targetCell, targetValue, changingCell) {
|
|
85767
|
+
return goalSeek(this.ctx, this.sheetId, targetCell, targetValue, changingCell);
|
|
85768
|
+
}
|
|
85769
|
+
async dataTable(formulaCell, options) {
|
|
85770
|
+
return dataTable(this.ctx, this.sheetId, formulaCell, options);
|
|
85771
|
+
}
|
|
85772
|
+
};
|
|
85773
|
+
|
|
86180
85774
|
// ../../kernel/src/api/worksheet/objects.ts
|
|
86181
85775
|
init_esm_shims();
|
|
86182
85776
|
init_errors();
|
|
@@ -86880,8 +86474,8 @@ function objectToInfo(obj) {
|
|
|
86880
86474
|
flipH: obj.position?.flipH,
|
|
86881
86475
|
flipV: obj.position?.flipV,
|
|
86882
86476
|
zIndex: obj.zIndex,
|
|
86883
|
-
visible: obj.visible,
|
|
86884
|
-
groupId: obj.groupId,
|
|
86477
|
+
visible: "visible" in obj ? obj.visible : void 0,
|
|
86478
|
+
groupId: "groupId" in obj ? obj.groupId : void 0,
|
|
86885
86479
|
anchorType: obj.position?.anchorType,
|
|
86886
86480
|
altText: obj.altText
|
|
86887
86481
|
};
|
|
@@ -87094,7 +86688,7 @@ async function getConnectorData(manager, connectorId) {
|
|
|
87094
86688
|
}
|
|
87095
86689
|
async function getGroupMembers(manager, _ctx, sheetId, groupId) {
|
|
87096
86690
|
const objects = await manager.getObjectsInSheet(sheetId);
|
|
87097
|
-
return objects.filter((obj) => obj.groupId === groupId).map((obj) => obj.id);
|
|
86691
|
+
return objects.filter((obj) => "groupId" in obj && obj.groupId === groupId).map((obj) => obj.id);
|
|
87098
86692
|
}
|
|
87099
86693
|
function deriveImageFormat(src) {
|
|
87100
86694
|
const dataUrlMatch = src.match(/^data:image\/([^;,]+)/);
|
|
@@ -87143,6 +86737,7 @@ async function getConnectionSiteCount(manager, objectId) {
|
|
|
87143
86737
|
|
|
87144
86738
|
// ../../kernel/src/api/worksheet/operations/shape-operations.ts
|
|
87145
86739
|
init_esm_shims();
|
|
86740
|
+
init_floating_object_mapper();
|
|
87146
86741
|
function shapeObjectToShape(shape, sheetId) {
|
|
87147
86742
|
return {
|
|
87148
86743
|
id: shape.id,
|
|
@@ -87182,7 +86777,7 @@ function buildMutationReceipt2(change, action) {
|
|
|
87182
86777
|
domain: "floatingObject",
|
|
87183
86778
|
action,
|
|
87184
86779
|
id: change.objectId,
|
|
87185
|
-
object: change.data,
|
|
86780
|
+
object: change.data ? toFloatingObject(change.data) : createMinimalFloatingObject("shape", change.objectId, ""),
|
|
87186
86781
|
bounds
|
|
87187
86782
|
};
|
|
87188
86783
|
}
|
|
@@ -87217,7 +86812,7 @@ async function createShape(ctx, sheetId, config) {
|
|
|
87217
86812
|
domain: "floatingObject",
|
|
87218
86813
|
action: "create",
|
|
87219
86814
|
id: "",
|
|
87220
|
-
object:
|
|
86815
|
+
object: createMinimalFloatingObject("shape", "", sheetId),
|
|
87221
86816
|
bounds: {
|
|
87222
86817
|
x: 0,
|
|
87223
86818
|
y: 0,
|
|
@@ -87307,7 +86902,7 @@ async function updateShape(ctx, sheetId, shapeId, updates) {
|
|
|
87307
86902
|
domain: "floatingObject",
|
|
87308
86903
|
action: "update",
|
|
87309
86904
|
id: shapeId,
|
|
87310
|
-
object:
|
|
86905
|
+
object: createMinimalFloatingObject("shape", shapeId, sheetId),
|
|
87311
86906
|
bounds: { x: 0, y: 0, width: 0, height: 0, rotation: 0 }
|
|
87312
86907
|
};
|
|
87313
86908
|
}
|
|
@@ -87583,6 +87178,15 @@ var WorksheetObjectsImpl = class {
|
|
|
87583
87178
|
async get(objectId) {
|
|
87584
87179
|
return await getFloatingObject(this.mgr, this.ctx, this.sheetId, objectId);
|
|
87585
87180
|
}
|
|
87181
|
+
/**
|
|
87182
|
+
* Get the full domain-typed FloatingObject for an object by ID.
|
|
87183
|
+
* Returns the discriminated union variant (ShapeObject, PictureObject, etc.)
|
|
87184
|
+
* directly from the manager, bypassing the API-level FloatingObjectInfo projection.
|
|
87185
|
+
*/
|
|
87186
|
+
async getFullObject(objectId) {
|
|
87187
|
+
const obj = await this.mgr.getObject(objectId);
|
|
87188
|
+
return obj ?? null;
|
|
87189
|
+
}
|
|
87586
87190
|
async computeObjectBounds(objectId) {
|
|
87587
87191
|
const obj = await this.mgr.getObject(objectId);
|
|
87588
87192
|
if (!obj) return null;
|
|
@@ -87951,7 +87555,7 @@ var WorksheetImpl = class {
|
|
|
87951
87555
|
async getValue(a, b) {
|
|
87952
87556
|
const { row, col } = resolveCell(a, b);
|
|
87953
87557
|
const data = await getCell(this.ctx, this.sheetId, row, col);
|
|
87954
|
-
return data?.value ?? null;
|
|
87558
|
+
return normalizeCellValue(data?.value ?? null);
|
|
87955
87559
|
}
|
|
87956
87560
|
async getData() {
|
|
87957
87561
|
const range2 = await getUsedRange2(this.ctx, this.sheetId);
|
|
@@ -87963,7 +87567,7 @@ var WorksheetImpl = class {
|
|
|
87963
87567
|
endRow: range2.endRow,
|
|
87964
87568
|
endCol: range2.endCol
|
|
87965
87569
|
});
|
|
87966
|
-
return cellData.map((row) => row.map((cell) => cell.value ?? null));
|
|
87570
|
+
return cellData.map((row) => row.map((cell) => normalizeCellValue(cell.value ?? null)));
|
|
87967
87571
|
}
|
|
87968
87572
|
async getRange(a, b, c, d) {
|
|
87969
87573
|
const bounds = resolveRange(a, b, c, d);
|
|
@@ -88087,7 +87691,7 @@ var WorksheetImpl = class {
|
|
|
88087
87691
|
rowData.push({ value: null });
|
|
88088
87692
|
} else {
|
|
88089
87693
|
rowData.push({
|
|
88090
|
-
value:
|
|
87694
|
+
value: normalizeCellValue(vc.value) ?? null,
|
|
88091
87695
|
formula: vc.formula,
|
|
88092
87696
|
format: vc.format ?? void 0
|
|
88093
87697
|
});
|
|
@@ -88114,10 +87718,10 @@ var WorksheetImpl = class {
|
|
|
88114
87718
|
const { row, col } = resolveCell(address);
|
|
88115
87719
|
const data = await getCell(this.ctx, this.sheetId, row, col);
|
|
88116
87720
|
if (!data) return "";
|
|
88117
|
-
const
|
|
88118
|
-
let result =
|
|
87721
|
+
const rawValue = cellValueToString(data.value);
|
|
87722
|
+
let result = rawValue;
|
|
88119
87723
|
if (data.formula) {
|
|
88120
|
-
result =
|
|
87724
|
+
result = rawValue !== "" ? `${rawValue}(${data.formula})` : `(${data.formula})`;
|
|
88121
87725
|
}
|
|
88122
87726
|
const styleHintsStr = await getStyleHints(this.ctx, this.sheetId, row, col);
|
|
88123
87727
|
if (styleHintsStr) {
|
|
@@ -88158,7 +87762,7 @@ var WorksheetImpl = class {
|
|
|
88158
87762
|
row,
|
|
88159
87763
|
col,
|
|
88160
87764
|
formula: vc.formula,
|
|
88161
|
-
value:
|
|
87765
|
+
value: normalizeCellValue(vc.value)
|
|
88162
87766
|
});
|
|
88163
87767
|
}
|
|
88164
87768
|
}
|
|
@@ -88183,8 +87787,8 @@ var WorksheetImpl = class {
|
|
|
88183
87787
|
rowValues.push(`${cellAddr}:`);
|
|
88184
87788
|
continue;
|
|
88185
87789
|
}
|
|
88186
|
-
const
|
|
88187
|
-
let cellStr =
|
|
87790
|
+
const rawValue = cellValueToString(vc.value);
|
|
87791
|
+
let cellStr = rawValue;
|
|
88188
87792
|
if (vc.formula) {
|
|
88189
87793
|
const abbreviation = formulaAnalysis.formulaToId.get(`${row},${col}`);
|
|
88190
87794
|
if (abbreviation) {
|
|
@@ -88205,7 +87809,7 @@ var WorksheetImpl = class {
|
|
|
88205
87809
|
const styleCells = rangeData.cells.map((vc) => ({
|
|
88206
87810
|
row: vc.row,
|
|
88207
87811
|
col: vc.col,
|
|
88208
|
-
value:
|
|
87812
|
+
value: normalizeCellValue(vc.value),
|
|
88209
87813
|
format: vc.format
|
|
88210
87814
|
}));
|
|
88211
87815
|
const styleLines = analyzeStylePatterns(styleCells);
|
|
@@ -88227,7 +87831,7 @@ var WorksheetImpl = class {
|
|
|
88227
87831
|
const leftCellData = leftRange.cells.map((vc) => ({
|
|
88228
87832
|
row: vc.row,
|
|
88229
87833
|
col: vc.col,
|
|
88230
|
-
value:
|
|
87834
|
+
value: normalizeCellValue(vc.value),
|
|
88231
87835
|
formatted: vc.formatted ?? void 0,
|
|
88232
87836
|
indent: 0
|
|
88233
87837
|
// indent not available from queryRange; would need format.indent
|
|
@@ -88256,7 +87860,7 @@ var WorksheetImpl = class {
|
|
|
88256
87860
|
const aboveCellData = aboveRange.cells.map((vc) => ({
|
|
88257
87861
|
row: vc.row,
|
|
88258
87862
|
col: vc.col,
|
|
88259
|
-
value:
|
|
87863
|
+
value: normalizeCellValue(vc.value),
|
|
88260
87864
|
formatted: vc.formatted ?? void 0
|
|
88261
87865
|
}));
|
|
88262
87866
|
const aboveLine = buildAboveContext(
|
|
@@ -88359,9 +87963,7 @@ var WorksheetImpl = class {
|
|
|
88359
87963
|
}
|
|
88360
87964
|
const firstRowCells = (rowMap.get(finalRange.startRow) ?? []).slice().sort((a, b) => a.col - b.col);
|
|
88361
87965
|
if (firstRowCells.length > 0) {
|
|
88362
|
-
const allStrings = firstRowCells.every(
|
|
88363
|
-
(vc) => typeof vc.value === "string" && !vc.formula
|
|
88364
|
-
);
|
|
87966
|
+
const allStrings = firstRowCells.every((vc) => typeof vc.value === "string" && !vc.formula);
|
|
88365
87967
|
if (allStrings) {
|
|
88366
87968
|
const headers = firstRowCells.map((vc) => String(vc.value));
|
|
88367
87969
|
lines.push(`Headers: ${headers.join(", ")}`);
|
|
@@ -88397,7 +87999,7 @@ var WorksheetImpl = class {
|
|
|
88397
87999
|
const cells = (rowMap.get(row) ?? []).slice().sort((a, b) => a.col - b.col);
|
|
88398
88000
|
const rowData = [];
|
|
88399
88001
|
for (const vc of cells) {
|
|
88400
|
-
const rawValue =
|
|
88002
|
+
const rawValue = cellValueToString(vc.value);
|
|
88401
88003
|
const addr = toA12(vc.row, vc.col);
|
|
88402
88004
|
if (vc.formula) {
|
|
88403
88005
|
rowData.push(`${addr}:${rawValue}(=${vc.formula})`);
|
|
@@ -88605,7 +88207,7 @@ var WorksheetImpl = class {
|
|
|
88605
88207
|
fields.push("");
|
|
88606
88208
|
continue;
|
|
88607
88209
|
}
|
|
88608
|
-
let str = cell.formatted != null && cell.formatted !== "" ? cell.formatted :
|
|
88210
|
+
let str = cell.formatted != null && cell.formatted !== "" ? cell.formatted : String(normalizeCellValue(val));
|
|
88609
88211
|
if (str.length > 0 && "=+-@".includes(str[0])) {
|
|
88610
88212
|
str = " " + str;
|
|
88611
88213
|
}
|
|
@@ -88658,7 +88260,7 @@ var WorksheetImpl = class {
|
|
|
88658
88260
|
const row = cellData[i];
|
|
88659
88261
|
const obj = {};
|
|
88660
88262
|
for (let j = 0; j < headers.length; j++) {
|
|
88661
|
-
obj[headers[j]] = row[j]?.value ?? null;
|
|
88263
|
+
obj[headers[j]] = normalizeCellValue(row[j]?.value ?? null);
|
|
88662
88264
|
}
|
|
88663
88265
|
result.push(obj);
|
|
88664
88266
|
}
|
|
@@ -88709,48 +88311,6 @@ var WorksheetImpl = class {
|
|
|
88709
88311
|
});
|
|
88710
88312
|
return formatValues(this.ctx, bridgeEntries);
|
|
88711
88313
|
}
|
|
88712
|
-
async goalSeek(targetCell, targetValue, changingCell) {
|
|
88713
|
-
const sheetId = this.sheetId;
|
|
88714
|
-
const targetPos = resolveCell(targetCell);
|
|
88715
|
-
const changingPos = resolveCell(changingCell);
|
|
88716
|
-
const formulaCellId = await getCellIdAt2(
|
|
88717
|
-
this.ctx,
|
|
88718
|
-
sheetId,
|
|
88719
|
-
targetPos.row,
|
|
88720
|
-
targetPos.col
|
|
88721
|
-
);
|
|
88722
|
-
if (!formulaCellId) {
|
|
88723
|
-
throw new KernelError("COMPUTE_ERROR", `Target cell ${targetCell} has no content.`);
|
|
88724
|
-
}
|
|
88725
|
-
const inputCellId = await getCellIdAt2(
|
|
88726
|
-
this.ctx,
|
|
88727
|
-
sheetId,
|
|
88728
|
-
changingPos.row,
|
|
88729
|
-
changingPos.col
|
|
88730
|
-
);
|
|
88731
|
-
if (!inputCellId) {
|
|
88732
|
-
throw new KernelError("COMPUTE_ERROR", `Changing cell ${changingCell} has no content.`);
|
|
88733
|
-
}
|
|
88734
|
-
const changingData = await getCell(this.ctx, sheetId, changingPos.row, changingPos.col);
|
|
88735
|
-
const initialGuess = typeof changingData?.value === "number" ? changingData.value : 0;
|
|
88736
|
-
const bridgeResult = await this.ctx.computeBridge.goalSeek({
|
|
88737
|
-
formula_cell: formulaCellId,
|
|
88738
|
-
target: targetValue,
|
|
88739
|
-
input_cell: inputCellId,
|
|
88740
|
-
initial_guess: initialGuess
|
|
88741
|
-
});
|
|
88742
|
-
const result = bridgeResult;
|
|
88743
|
-
const solutionValue = result.solutionValue ?? result.solution_value;
|
|
88744
|
-
const iterations = result.iterations;
|
|
88745
|
-
if (result.found && solutionValue != null) {
|
|
88746
|
-
await setCell(this.ctx, sheetId, changingPos.row, changingPos.col, solutionValue);
|
|
88747
|
-
}
|
|
88748
|
-
return {
|
|
88749
|
-
found: result.found,
|
|
88750
|
-
value: solutionValue,
|
|
88751
|
-
iterations
|
|
88752
|
-
};
|
|
88753
|
-
}
|
|
88754
88314
|
// ===========================================================================
|
|
88755
88315
|
// Visibility
|
|
88756
88316
|
// ===========================================================================
|
|
@@ -88822,7 +88382,7 @@ var WorksheetImpl = class {
|
|
|
88822
88382
|
case 1:
|
|
88823
88383
|
return accessor.numberValue;
|
|
88824
88384
|
case 2:
|
|
88825
|
-
return
|
|
88385
|
+
return displayStringOrNull3(accessor.displayText);
|
|
88826
88386
|
case 3:
|
|
88827
88387
|
return accessor.numberValue !== 0;
|
|
88828
88388
|
case 4: {
|
|
@@ -89088,6 +88648,9 @@ var WorksheetImpl = class {
|
|
|
89088
88648
|
get protection() {
|
|
89089
88649
|
return this._protection ??= new WorksheetProtectionImpl(this.ctx, this.sheetId);
|
|
89090
88650
|
}
|
|
88651
|
+
get whatIf() {
|
|
88652
|
+
return this._whatIf ??= new WorksheetWhatIfImpl(this.ctx, this.sheetId);
|
|
88653
|
+
}
|
|
89091
88654
|
get print() {
|
|
89092
88655
|
return this._print ??= new WorksheetPrintImpl(this.ctx, this.sheetId);
|
|
89093
88656
|
}
|
|
@@ -89319,8 +88882,7 @@ var WorkbookStylesImpl = class {
|
|
|
89319
88882
|
this.ctx = ctx;
|
|
89320
88883
|
}
|
|
89321
88884
|
async getTableStyles() {
|
|
89322
|
-
|
|
89323
|
-
return styles;
|
|
88885
|
+
return this.ctx.computeBridge.getAllCustomTableStyles();
|
|
89324
88886
|
}
|
|
89325
88887
|
async createTableStyle(config) {
|
|
89326
88888
|
const result = await this.ctx.computeBridge.createCustomTableStyle(
|
|
@@ -89446,7 +89008,7 @@ var WorkbookThemeImpl = class {
|
|
|
89446
89008
|
|
|
89447
89009
|
// ../../kernel/src/api/workbook/workbook-impl.ts
|
|
89448
89010
|
init_esm_shims();
|
|
89449
|
-
|
|
89011
|
+
init_disposable();
|
|
89450
89012
|
init_errors();
|
|
89451
89013
|
|
|
89452
89014
|
// ../../kernel/src/domain/form-controls/index.ts
|
|
@@ -90033,26 +89595,7 @@ var globalRegistry = new FunctionRegistry();
|
|
|
90033
89595
|
|
|
90034
89596
|
// ../../spreadsheet-utils/src/function-catalog.ts
|
|
90035
89597
|
init_esm_shims();
|
|
90036
|
-
|
|
90037
|
-
// ../../contracts/src/utils/function-registry.ts
|
|
90038
|
-
init_esm_shims();
|
|
90039
|
-
var FunctionCategory = /* @__PURE__ */ ((FunctionCategory2) => {
|
|
90040
|
-
FunctionCategory2["MATH"] = "Math";
|
|
90041
|
-
FunctionCategory2["STATISTICAL"] = "Statistical";
|
|
90042
|
-
FunctionCategory2["TEXT"] = "Text";
|
|
90043
|
-
FunctionCategory2["LOGICAL"] = "Logical";
|
|
90044
|
-
FunctionCategory2["DATE_TIME"] = "Date & Time";
|
|
90045
|
-
FunctionCategory2["LOOKUP"] = "Lookup & Reference";
|
|
90046
|
-
FunctionCategory2["FINANCIAL"] = "Financial";
|
|
90047
|
-
FunctionCategory2["INFORMATION"] = "Information";
|
|
90048
|
-
FunctionCategory2["DATABASE"] = "Database";
|
|
90049
|
-
FunctionCategory2["ENGINEERING"] = "Engineering";
|
|
90050
|
-
FunctionCategory2["WEB"] = "Web";
|
|
90051
|
-
FunctionCategory2["TESTING"] = "Testing";
|
|
90052
|
-
return FunctionCategory2;
|
|
90053
|
-
})(FunctionCategory || {});
|
|
90054
|
-
|
|
90055
|
-
// ../../spreadsheet-utils/src/function-catalog.ts
|
|
89598
|
+
import { FunctionCategory } from "@mog-sdk/spreadsheet-contracts/utils/function-registry";
|
|
90056
89599
|
var C = FunctionCategory;
|
|
90057
89600
|
var INLINE_FUNCTIONS = [
|
|
90058
89601
|
// Aggregates
|
|
@@ -90919,7 +90462,7 @@ function convertToFunctionInfo(metadata) {
|
|
|
90919
90462
|
|
|
90920
90463
|
// ../../kernel/src/api/workbook/viewport.ts
|
|
90921
90464
|
init_esm_shims();
|
|
90922
|
-
|
|
90465
|
+
init_disposable();
|
|
90923
90466
|
var regionCounter = 0;
|
|
90924
90467
|
var ViewportRegionImpl = class extends DisposableBase {
|
|
90925
90468
|
constructor(sheetId, bounds, computeBridge, viewportId) {
|
|
@@ -90973,7 +90516,7 @@ var WorkbookViewportImpl = class {
|
|
|
90973
90516
|
};
|
|
90974
90517
|
|
|
90975
90518
|
// ../../kernel/src/api/workbook/workbook-impl.ts
|
|
90976
|
-
|
|
90519
|
+
import { DEFAULT_CHROME_THEME } from "@mog-sdk/spreadsheet-contracts/rendering";
|
|
90977
90520
|
var API_EVENT_TO_INTERNAL = {
|
|
90978
90521
|
cellChanged: "cell:changed",
|
|
90979
90522
|
rangeChanged: "range:changed",
|
|
@@ -91267,24 +90810,41 @@ var WorkbookImpl = class {
|
|
|
91267
90810
|
timestamp: cp.timestamp
|
|
91268
90811
|
}));
|
|
91269
90812
|
}
|
|
91270
|
-
async calculate(
|
|
91271
|
-
const
|
|
91272
|
-
|
|
91273
|
-
|
|
91274
|
-
|
|
91275
|
-
|
|
91276
|
-
|
|
91277
|
-
|
|
91278
|
-
|
|
91279
|
-
|
|
91280
|
-
|
|
91281
|
-
|
|
91282
|
-
|
|
90813
|
+
async calculate(options) {
|
|
90814
|
+
const opts = typeof options === "string" ? { calculationType: options } : options ?? {};
|
|
90815
|
+
const recalcOptions = {};
|
|
90816
|
+
if (opts.iterative !== void 0) {
|
|
90817
|
+
if (typeof opts.iterative === "boolean") {
|
|
90818
|
+
recalcOptions.iterative = opts.iterative;
|
|
90819
|
+
} else {
|
|
90820
|
+
recalcOptions.iterative = true;
|
|
90821
|
+
if (opts.iterative.maxIterations !== void 0) {
|
|
90822
|
+
recalcOptions.maxIterations = opts.iterative.maxIterations;
|
|
90823
|
+
}
|
|
90824
|
+
if (opts.iterative.maxChange !== void 0) {
|
|
90825
|
+
recalcOptions.maxChange = opts.iterative.maxChange;
|
|
90826
|
+
}
|
|
91283
90827
|
}
|
|
90828
|
+
}
|
|
90829
|
+
try {
|
|
90830
|
+
const result = await this.ctx.computeBridge.fullRecalc(recalcOptions);
|
|
90831
|
+
return {
|
|
90832
|
+
hasCircularRefs: result.metrics?.hasCircularRefs ?? false,
|
|
90833
|
+
converged: result.metrics?.iterativeConverged ?? false,
|
|
90834
|
+
iterations: result.metrics?.iterativeIterations ?? 0,
|
|
90835
|
+
maxDelta: result.metrics?.iterativeMaxDelta ?? 0,
|
|
90836
|
+
circularCellCount: result.metrics?.circularCellCount ?? 0
|
|
90837
|
+
};
|
|
91284
90838
|
} catch (e) {
|
|
91285
90839
|
const msg = String(e);
|
|
91286
90840
|
if (msg.includes("Unknown napi method") || msg.includes("not a function") || msg.includes("not found")) {
|
|
91287
|
-
return
|
|
90841
|
+
return {
|
|
90842
|
+
hasCircularRefs: false,
|
|
90843
|
+
converged: false,
|
|
90844
|
+
iterations: 0,
|
|
90845
|
+
maxDelta: 0,
|
|
90846
|
+
circularCellCount: 0
|
|
90847
|
+
};
|
|
91288
90848
|
}
|
|
91289
90849
|
throw new KernelError("COMPUTE_ERROR", `Full recalculation failed: ${msg}`);
|
|
91290
90850
|
}
|
|
@@ -91314,7 +90874,10 @@ var WorkbookImpl = class {
|
|
|
91314
90874
|
}
|
|
91315
90875
|
async setIterativeCalculation(enabled) {
|
|
91316
90876
|
const settings = await this.ctx.computeBridge.getWorkbookSettings();
|
|
91317
|
-
const calcSettings = {
|
|
90877
|
+
const calcSettings = {
|
|
90878
|
+
...settings.calculationSettings ?? {},
|
|
90879
|
+
enableIterativeCalculation: enabled
|
|
90880
|
+
};
|
|
91318
90881
|
await this.ctx.computeBridge.patchWorkbookSettings({
|
|
91319
90882
|
calculationSettings: calcSettings
|
|
91320
90883
|
});
|
|
@@ -91743,6 +91306,7 @@ var api_spec_default = {
|
|
|
91743
91306
|
viewport: "WorkbookViewport"
|
|
91744
91307
|
},
|
|
91745
91308
|
ws: {
|
|
91309
|
+
whatIf: "WorksheetWhatIf",
|
|
91746
91310
|
smartArt: "WorksheetSmartArt",
|
|
91747
91311
|
changes: "WorksheetChanges",
|
|
91748
91312
|
formats: "WorksheetFormats",
|
|
@@ -91840,10 +91404,12 @@ var api_spec_default = {
|
|
|
91840
91404
|
]
|
|
91841
91405
|
},
|
|
91842
91406
|
calculate: {
|
|
91843
|
-
signature: "calculate(
|
|
91844
|
-
docstring: "Trigger recalculation of formulas.\n@param
|
|
91407
|
+
signature: "calculate(options?: CalculateOptions | CalculationType): Promise<CalculateResult>;",
|
|
91408
|
+
docstring: "Trigger recalculation of formulas.\n@param options - Calculation options, or a CalculationType string for backward compatibility",
|
|
91845
91409
|
usedTypes: [
|
|
91846
|
-
"
|
|
91410
|
+
"CalculateOptions",
|
|
91411
|
+
"CalculationType",
|
|
91412
|
+
"CalculateResult"
|
|
91847
91413
|
]
|
|
91848
91414
|
},
|
|
91849
91415
|
getCalculationMode: {
|
|
@@ -91863,17 +91429,17 @@ var api_spec_default = {
|
|
|
91863
91429
|
},
|
|
91864
91430
|
setIterativeCalculation: {
|
|
91865
91431
|
signature: "setIterativeCalculation(enabled: boolean): Promise<void>;",
|
|
91866
|
-
docstring: "Set whether iterative calculation is enabled for circular references.\nConvenience mutator \u2014 patches `calculationSettings.enableIterativeCalculation
|
|
91432
|
+
docstring: "Set whether iterative calculation is enabled for circular references.\nConvenience mutator \u2014 patches `calculationSettings.enableIterativeCalculation`.\n@deprecated Use calculate({ iterative: ... }) instead.",
|
|
91867
91433
|
usedTypes: []
|
|
91868
91434
|
},
|
|
91869
91435
|
setMaxIterations: {
|
|
91870
91436
|
signature: "setMaxIterations(n: number): Promise<void>;",
|
|
91871
|
-
docstring: "Set the maximum number of iterations for iterative calculation.\nConvenience mutator \u2014 patches `calculationSettings.maxIterations
|
|
91437
|
+
docstring: "Set the maximum number of iterations for iterative calculation.\nConvenience mutator \u2014 patches `calculationSettings.maxIterations`.\n@deprecated Use calculate({ iterative: { maxIterations: n } }) instead.",
|
|
91872
91438
|
usedTypes: []
|
|
91873
91439
|
},
|
|
91874
91440
|
setConvergenceThreshold: {
|
|
91875
91441
|
signature: "setConvergenceThreshold(threshold: number): Promise<void>;",
|
|
91876
|
-
docstring: "Set the convergence threshold (maximum change) for iterative calculation.\nConvenience mutator \u2014 patches `calculationSettings.maxChange
|
|
91442
|
+
docstring: "Set the convergence threshold (maximum change) for iterative calculation.\nConvenience mutator \u2014 patches `calculationSettings.maxChange`.\n@deprecated Use calculate({ iterative: { maxChange: threshold } }) instead.",
|
|
91877
91443
|
usedTypes: []
|
|
91878
91444
|
},
|
|
91879
91445
|
getUsePrecisionAsDisplayed: {
|
|
@@ -92331,13 +91897,6 @@ var api_spec_default = {
|
|
|
92331
91897
|
"FormatEntry"
|
|
92332
91898
|
]
|
|
92333
91899
|
},
|
|
92334
|
-
goalSeek: {
|
|
92335
|
-
signature: "goalSeek(targetCell: string, targetValue: number, changingCell: string): Promise<GoalSeekResult>;",
|
|
92336
|
-
docstring: "Run a goal seek to find the input value that produces a target result.",
|
|
92337
|
-
usedTypes: [
|
|
92338
|
-
"GoalSeekResult"
|
|
92339
|
-
]
|
|
92340
|
-
},
|
|
92341
91900
|
isVisible: {
|
|
92342
91901
|
signature: "isVisible(): boolean;",
|
|
92343
91902
|
docstring: "Check if the sheet is visible (sync -- local metadata).",
|
|
@@ -92859,6 +92418,25 @@ var api_spec_default = {
|
|
|
92859
92418
|
}
|
|
92860
92419
|
}
|
|
92861
92420
|
},
|
|
92421
|
+
WorksheetWhatIf: {
|
|
92422
|
+
docstring: "Sub-API for What-If analysis operations.",
|
|
92423
|
+
functions: {
|
|
92424
|
+
goalSeek: {
|
|
92425
|
+
signature: "goalSeek(targetCell: string, targetValue: number, changingCell: string): Promise<GoalSeekResult>;",
|
|
92426
|
+
docstring: "Run a goal seek to find the input value that produces a target result.",
|
|
92427
|
+
usedTypes: [
|
|
92428
|
+
"GoalSeekResult"
|
|
92429
|
+
]
|
|
92430
|
+
},
|
|
92431
|
+
dataTable: {
|
|
92432
|
+
signature: "dataTable(\n formulaCell: string,\n options: {\n rowInputCell?: string | null;\n colInputCell?: string | null;\n rowValues: (string | number | boolean | null)[];\n colValues: (string | number | boolean | null)[];\n },\n ): Promise<DataTableResult>;",
|
|
92433
|
+
docstring: "Evaluate a formula with different input values (What-If Data Table).\n\nOne-variable table: provide either `rowInputCell` or `colInputCell` (not both).\nTwo-variable table: provide both `rowInputCell` and `colInputCell`.\n\nFor one-variable tables, pass an empty array for the unused dimension's values.\n\nInput cells must already contain a value before calling this method.\n\n@param formulaCell - A1 address of the cell containing the formula to evaluate\n@param options - Input cells and substitution values\n@returns 2D grid of computed results",
|
|
92434
|
+
usedTypes: [
|
|
92435
|
+
"DataTableResult"
|
|
92436
|
+
]
|
|
92437
|
+
}
|
|
92438
|
+
}
|
|
92439
|
+
},
|
|
92862
92440
|
WorksheetSmartArt: {
|
|
92863
92441
|
docstring: "",
|
|
92864
92442
|
functions: {
|
|
@@ -92998,7 +92576,18 @@ var api_spec_default = {
|
|
|
92998
92576
|
functions: {
|
|
92999
92577
|
set: {
|
|
93000
92578
|
signature: "set(address: string, format: CellFormat): Promise<FormatChangeResult>;",
|
|
93001
|
-
docstring:
|
|
92579
|
+
docstring: `Set format for a single cell.
|
|
92580
|
+
|
|
92581
|
+
@param address - A1-style cell address (e.g. "A1", "B3")
|
|
92582
|
+
@param format - Format properties to apply
|
|
92583
|
+
|
|
92584
|
+
@example
|
|
92585
|
+
// Bold red currency
|
|
92586
|
+
await ws.formats.set('A1', { bold: true, fontColor: '#ff0000', numberFormat: '$#,##0.00' });
|
|
92587
|
+
// Date format
|
|
92588
|
+
await ws.formats.set('B1', { numberFormat: 'YYYY-MM-DD' });
|
|
92589
|
+
// Header style
|
|
92590
|
+
await ws.formats.set('A1', { bold: true, fontSize: 14, backgroundColor: '#4472c4', fontColor: '#ffffff' });`,
|
|
93002
92591
|
usedTypes: [
|
|
93003
92592
|
"CellFormat",
|
|
93004
92593
|
"FormatChangeResult"
|
|
@@ -93006,7 +92595,21 @@ var api_spec_default = {
|
|
|
93006
92595
|
},
|
|
93007
92596
|
setRange: {
|
|
93008
92597
|
signature: "setRange(range: string, format: CellFormat): Promise<FormatChangeResult>;",
|
|
93009
|
-
docstring:
|
|
92598
|
+
docstring: `Set format for a contiguous range.
|
|
92599
|
+
|
|
92600
|
+
@param range - A1-style range string (e.g. "A1:B2")
|
|
92601
|
+
@param format - Format properties to apply
|
|
92602
|
+
|
|
92603
|
+
@example
|
|
92604
|
+
// Currency column
|
|
92605
|
+
await ws.formats.setRange('B2:B100', { numberFormat: '$#,##0.00' });
|
|
92606
|
+
// Header row with borders
|
|
92607
|
+
await ws.formats.setRange('A1:F1', {
|
|
92608
|
+
bold: true,
|
|
92609
|
+
backgroundColor: '#4472c4',
|
|
92610
|
+
fontColor: '#ffffff',
|
|
92611
|
+
borders: { bottom: { style: 'medium', color: '#2f5496' } }
|
|
92612
|
+
});`,
|
|
93010
92613
|
usedTypes: [
|
|
93011
92614
|
"CellFormat",
|
|
93012
92615
|
"FormatChangeResult"
|
|
@@ -93838,7 +93441,7 @@ var api_spec_default = {
|
|
|
93838
93441
|
usedTypes: []
|
|
93839
93442
|
},
|
|
93840
93443
|
setCriteria: {
|
|
93841
|
-
signature: "setCriteria(
|
|
93444
|
+
signature: "setCriteria(filterId: string, col: number, criteria: ColumnFilterCriteria): Promise<void>;",
|
|
93842
93445
|
docstring: "Set filter criteria for a column using filter ID.\n\n@param filterId - Filter ID\n@param col - Column index (0-based)\n@param criteria - Filter criteria to apply",
|
|
93843
93446
|
usedTypes: [
|
|
93844
93447
|
"ColumnFilterCriteria"
|
|
@@ -95183,8 +94786,8 @@ var api_spec_default = {
|
|
|
95183
94786
|
},
|
|
95184
94787
|
AxisConfig: {
|
|
95185
94788
|
name: "AxisConfig",
|
|
95186
|
-
definition: "{\n
|
|
95187
|
-
docstring: "Axis configuration"
|
|
94789
|
+
definition: "{\n categoryAxis?: SingleAxisConfig;\n valueAxis?: SingleAxisConfig;\n secondaryCategoryAxis?: SingleAxisConfig;\n secondaryValueAxis?: SingleAxisConfig;\n /** @deprecated Use categoryAxis instead */\n xAxis?: SingleAxisConfig;\n /** @deprecated Use valueAxis instead */\n yAxis?: SingleAxisConfig;\n /** @deprecated Use secondaryValueAxis instead */\n secondaryYAxis?: SingleAxisConfig;\n}",
|
|
94790
|
+
docstring: "Axis configuration (matches AxisData wire type).\n\nWire field names: categoryAxis, valueAxis, secondaryCategoryAxis, secondaryValueAxis.\nLegacy aliases: xAxis, yAxis, secondaryYAxis (mapped in chart-bridge)."
|
|
95188
94791
|
},
|
|
95189
94792
|
AxisType: {
|
|
95190
94793
|
name: "AxisType",
|
|
@@ -95339,7 +94942,34 @@ var api_spec_default = {
|
|
|
95339
94942
|
CellFormat: {
|
|
95340
94943
|
name: "CellFormat",
|
|
95341
94944
|
definition: `{
|
|
94945
|
+
/** Excel-compatible number format code string.
|
|
94946
|
+
|
|
94947
|
+
Common format codes:
|
|
94948
|
+
- Currency: '$#,##0.00'
|
|
94949
|
+
- Accounting: '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)'
|
|
94950
|
+
- Percentage: '0.00%'
|
|
94951
|
+
- Date: 'M/D/YYYY', 'YYYY-MM-DD', 'MMM D, YYYY'
|
|
94952
|
+
- Time: 'h:mm AM/PM', 'HH:mm:ss'
|
|
94953
|
+
- Number: '#,##0.00', '0.00'
|
|
94954
|
+
- Scientific: '0.00E+00'
|
|
94955
|
+
- Text: '@'
|
|
94956
|
+
- Fraction: '# ?/?'
|
|
94957
|
+
|
|
94958
|
+
See the \`formatPresets\` section in api-spec.json for the full catalog
|
|
94959
|
+
of 85+ pre-defined format codes with examples.
|
|
94960
|
+
|
|
94961
|
+
@example
|
|
94962
|
+
// Currency
|
|
94963
|
+
{ numberFormat: '$#,##0.00' }
|
|
94964
|
+
// Percentage with 1 decimal
|
|
94965
|
+
{ numberFormat: '0.0%' }
|
|
94966
|
+
// ISO date
|
|
94967
|
+
{ numberFormat: 'YYYY-MM-DD' } */
|
|
95342
94968
|
numberFormat?: string;
|
|
94969
|
+
/** Number format category hint. Auto-detected from numberFormat when not set.
|
|
94970
|
+
Valid values: 'general' | 'number' | 'currency' | 'accounting' | 'date' |
|
|
94971
|
+
'time' | 'percentage' | 'fraction' | 'scientific' | 'text' |
|
|
94972
|
+
'special' | 'custom' */
|
|
95343
94973
|
numberFormatType?: NumberFormatType;
|
|
95344
94974
|
fontFamily?: string;
|
|
95345
94975
|
fontSize?: number;
|
|
@@ -95558,8 +95188,8 @@ Example: { ignoreError: true } to suppress error indicators. */
|
|
|
95558
95188
|
},
|
|
95559
95189
|
ChartBorder: {
|
|
95560
95190
|
name: "ChartBorder",
|
|
95561
|
-
definition: "{\n color?: string;\n width?: number;\n style?:
|
|
95562
|
-
docstring: "Shared chart border configuration"
|
|
95191
|
+
definition: "{\n color?: string;\n width?: number;\n style?: string;\n}",
|
|
95192
|
+
docstring: "Shared chart border configuration (matches ChartBorderData wire type)"
|
|
95563
95193
|
},
|
|
95564
95194
|
ChartConfig: {
|
|
95565
95195
|
name: "ChartConfig",
|
|
@@ -95590,7 +95220,10 @@ Example: { ignoreError: true } to suppress error indicators. */
|
|
|
95590
95220
|
series?: SeriesConfig[];
|
|
95591
95221
|
dataLabels?: DataLabelConfig;
|
|
95592
95222
|
pieSlice?: PieSliceConfig;
|
|
95223
|
+
/** @deprecated Use trendlines[] instead \u2014 kept for backward compat */
|
|
95593
95224
|
trendline?: TrendlineConfig;
|
|
95225
|
+
/** Wire-compatible trendline array */
|
|
95226
|
+
trendlines?: TrendlineConfig[];
|
|
95594
95227
|
/** Connect scatter points with lines (scatter-lines variant) */
|
|
95595
95228
|
showLines?: boolean;
|
|
95596
95229
|
/** Use smooth curves for scatter lines (scatter-smooth-lines variant) */
|
|
@@ -95700,11 +95333,6 @@ that are stored on the chart but not part of the core config schema. */
|
|
|
95700
95333
|
definition: "{\n /** Column index to write to (0-indexed) */\n columnIndex: number;\n /** JSONPath or field name to extract from data */\n dataPath: string;\n /** Optional transform formula (receives value as input) */\n transform?: string;\n /** Header text (if headerRow >= 0) */\n headerText?: string;\n}",
|
|
95701
95334
|
docstring: "Column mapping for a sheet data binding."
|
|
95702
95335
|
},
|
|
95703
|
-
Comment: {
|
|
95704
|
-
name: "Comment",
|
|
95705
|
-
definition: "{\n id: string;\n cellId: string;\n cellAddress: string;\n text: string;\n author: string;\n threadId?: string;\n resolved?: boolean;\n createdAt?: number;\n parentId?: string;\n authorId?: string;\n modifiedAt?: number;\n content?: RichTextSegment[];\n}",
|
|
95706
|
-
docstring: "A cell comment (thread-aware)."
|
|
95707
|
-
},
|
|
95708
95336
|
ConditionalFormat: {
|
|
95709
95337
|
name: "ConditionalFormat",
|
|
95710
95338
|
definition: "{\n /** Unique format identifier. */\n id: string;\n /** Cell ranges this format applies to. */\n ranges: CellRange[];\n /** Rules to evaluate (sorted by priority). */\n rules: CFRule[];\n}",
|
|
@@ -95762,8 +95390,8 @@ that are stored on the chart but not part of the core config schema. */
|
|
|
95762
95390
|
},
|
|
95763
95391
|
DataLabelConfig: {
|
|
95764
95392
|
name: "DataLabelConfig",
|
|
95765
|
-
definition: "{\n show: boolean;\n position?:
|
|
95766
|
-
docstring: "Data label configuration"
|
|
95393
|
+
definition: "{\n show: boolean;\n position?: string;\n format?: string;\n showValue?: boolean;\n showCategoryName?: boolean;\n showSeriesName?: boolean;\n showPercentage?: boolean;\n showBubbleSize?: boolean;\n showLegendKey?: boolean;\n separator?: string;\n showLeaderLines?: boolean;\n text?: string;\n}",
|
|
95394
|
+
docstring: "Data label configuration (matches DataLabelData wire type)"
|
|
95767
95395
|
},
|
|
95768
95396
|
DatePeriod: {
|
|
95769
95397
|
name: "DatePeriod",
|
|
@@ -95817,8 +95445,8 @@ that are stored on the chart but not part of the core config schema. */
|
|
|
95817
95445
|
},
|
|
95818
95446
|
ErrorBarConfig: {
|
|
95819
95447
|
name: "ErrorBarConfig",
|
|
95820
|
-
definition: "{\n visible?: boolean;\n
|
|
95821
|
-
docstring: "Error bar configuration for series"
|
|
95448
|
+
definition: "{\n visible?: boolean;\n direction?: string;\n barType?: string;\n valueType?: string;\n value?: number;\n noEndCap?: boolean;\n}",
|
|
95449
|
+
docstring: "Error bar configuration for series (matches ErrorBarData wire type)"
|
|
95822
95450
|
},
|
|
95823
95451
|
ErrorVariant: {
|
|
95824
95452
|
name: "ErrorVariant",
|
|
@@ -95860,7 +95488,7 @@ Used in condition filters where users specify rules like
|
|
|
95860
95488
|
},
|
|
95861
95489
|
FilterDetailInfo: {
|
|
95862
95490
|
name: "FilterDetailInfo",
|
|
95863
|
-
definition: "{\n /** Filter ID */\n id: string;\n /** Resolved numeric range of the filter */\n range: { startRow: number; startCol: number; endRow: number; endCol: number };\n /** Per-column filter criteria, keyed by header cell ID */\n columnFilters: Record<string,
|
|
95491
|
+
definition: "{\n /** Filter ID */\n id: string;\n /** Resolved numeric range of the filter */\n range: { startRow: number; startCol: number; endRow: number; endCol: number };\n /** Per-column filter criteria, keyed by header cell ID */\n columnFilters: Record<string, ColumnFilter>;\n}",
|
|
95864
95492
|
docstring: "Detailed filter information including resolved numeric range and column filters."
|
|
95865
95493
|
},
|
|
95866
95494
|
FilterInfo: {
|
|
@@ -95875,8 +95503,8 @@ Used in condition filters where users specify rules like
|
|
|
95875
95503
|
},
|
|
95876
95504
|
FilterState: {
|
|
95877
95505
|
name: "FilterState",
|
|
95878
|
-
definition: "{\n /** The range the auto-filter is applied to (A1 notation) */\n range: string;\n /** Per-column filter criteria, keyed by column
|
|
95879
|
-
docstring: "
|
|
95506
|
+
definition: "{\n /** The range the auto-filter is applied to (A1 notation) */\n range: string;\n /** Per-column filter criteria, keyed by column identifier (string) */\n columnFilters: Record<string, ColumnFilter>;\n}",
|
|
95507
|
+
docstring: "API filter state \u2014 derived from Rust FilterState with A1-notation range."
|
|
95880
95508
|
},
|
|
95881
95509
|
FloatingObject: {
|
|
95882
95510
|
name: "FloatingObject",
|
|
@@ -95978,13 +95606,8 @@ Used in condition filters where users specify rules like
|
|
|
95978
95606
|
},
|
|
95979
95607
|
LegendConfig: {
|
|
95980
95608
|
name: "LegendConfig",
|
|
95981
|
-
definition: "{\n show: boolean;\n position:
|
|
95982
|
-
docstring: "Legend configuration"
|
|
95983
|
-
},
|
|
95984
|
-
LegendPosition: {
|
|
95985
|
-
name: "LegendPosition",
|
|
95986
|
-
definition: "'top' | 'bottom' | 'left' | 'right' | 'none'",
|
|
95987
|
-
docstring: "Legend position options"
|
|
95609
|
+
definition: "{\n show: boolean;\n position: string;\n visible: boolean;\n overlay?: boolean;\n font?: ChartFont;\n}",
|
|
95610
|
+
docstring: "Legend configuration (matches LegendData wire type)"
|
|
95988
95611
|
},
|
|
95989
95612
|
LineDash: {
|
|
95990
95613
|
name: "LineDash",
|
|
@@ -96049,7 +95672,7 @@ Used in condition filters where users specify rules like
|
|
|
96049
95672
|
Note: {
|
|
96050
95673
|
name: "Note",
|
|
96051
95674
|
definition: "{\n content: string;\n author: string;\n cellAddress: string;\n}",
|
|
96052
|
-
docstring: "A cell note (simple, single string per cell)."
|
|
95675
|
+
docstring: "A cell note (simple, single string per cell). API-only type (no Rust equivalent)."
|
|
96053
95676
|
},
|
|
96054
95677
|
NumberFormatCategory: {
|
|
96055
95678
|
name: "NumberFormatCategory",
|
|
@@ -96070,11 +95693,6 @@ Used in condition filters where users specify rules like
|
|
|
96070
95693
|
},
|
|
96071
95694
|
docstring: "Number format category classification.\nMatches the FormatType enum from Rust compute-formats."
|
|
96072
95695
|
},
|
|
96073
|
-
NumberFormatType: {
|
|
96074
|
-
name: "NumberFormatType",
|
|
96075
|
-
definition: "| 'general'\n | 'number'\n | 'currency'\n | 'accounting'\n | 'date'\n | 'time'\n | 'percentage'\n | 'fraction'\n | 'scientific'\n | 'text'\n | 'special'\n | 'custom'",
|
|
96076
|
-
docstring: "Number format types"
|
|
96077
|
-
},
|
|
96078
95696
|
ObjectAnchorType: {
|
|
96079
95697
|
name: "ObjectAnchorType",
|
|
96080
95698
|
definition: "| 'twoCell' // Anchored to two cells (moves and resizes with cells)\n | 'oneCell' // Anchored to one cell (moves but doesn't resize)\n | 'absolute'",
|
|
@@ -96186,8 +95804,8 @@ Used in condition filters where users specify rules like
|
|
|
96186
95804
|
},
|
|
96187
95805
|
PieSliceConfig: {
|
|
96188
95806
|
name: "PieSliceConfig",
|
|
96189
|
-
definition: "{\n
|
|
96190
|
-
docstring: "Pie/doughnut slice configuration
|
|
95807
|
+
definition: "{\n explosion?: number;\n explodedIndices?: number[];\n explodeOffset?: number;\n}",
|
|
95808
|
+
docstring: "Pie/doughnut slice configuration (matches PieSliceData wire type)"
|
|
96191
95809
|
},
|
|
96192
95810
|
PivotQueryRecord: {
|
|
96193
95811
|
name: "PivotQueryRecord",
|
|
@@ -96226,8 +95844,8 @@ Used in condition filters where users specify rules like
|
|
|
96226
95844
|
},
|
|
96227
95845
|
PointFormat: {
|
|
96228
95846
|
name: "PointFormat",
|
|
96229
|
-
definition: "{\n fill?: string;\n border?: ChartBorder;\n dataLabel?: DataLabelConfig;\n}",
|
|
96230
|
-
docstring: "Per-point formatting for individual data points
|
|
95847
|
+
definition: "{\n idx: number;\n fill?: string;\n border?: ChartBorder;\n dataLabel?: DataLabelConfig;\n}",
|
|
95848
|
+
docstring: "Per-point formatting for individual data points (matches PointFormatData wire type)"
|
|
96231
95849
|
},
|
|
96232
95850
|
PrintSettings: {
|
|
96233
95851
|
name: "PrintSettings",
|
|
@@ -96276,11 +95894,6 @@ Used in condition filters where users specify rules like
|
|
|
96276
95894
|
definition: "{\n [K in keyof CellFormat]-?: CellFormat[K] | null;\n}",
|
|
96277
95895
|
docstring: "Dense cell format where every property is explicitly present (null when unset). Returned by formats.get()."
|
|
96278
95896
|
},
|
|
96279
|
-
RichTextSegment: {
|
|
96280
|
-
name: "RichTextSegment",
|
|
96281
|
-
definition: "{\n text: string;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n strikethrough?: boolean;\n color?: string;\n fontName?: string;\n fontSize?: number;\n}",
|
|
96282
|
-
docstring: "A single segment of rich text content."
|
|
96283
|
-
},
|
|
96284
95897
|
Scenario: {
|
|
96285
95898
|
name: "Scenario",
|
|
96286
95899
|
definition: "{\n /** Unique scenario ID */\n id: string;\n /** Creation timestamp (Unix ms) */\n createdAt: number;\n}",
|
|
@@ -96308,46 +95921,8 @@ Used in condition filters where users specify rules like
|
|
|
96308
95921
|
},
|
|
96309
95922
|
SeriesConfig: {
|
|
96310
95923
|
name: "SeriesConfig",
|
|
96311
|
-
definition:
|
|
96312
|
-
|
|
96313
|
-
type?: ChartType;
|
|
96314
|
-
color?: string;
|
|
96315
|
-
yAxisIndex?: 0 | 1;
|
|
96316
|
-
showMarkers?: boolean;
|
|
96317
|
-
markerSize?: number;
|
|
96318
|
-
markerStyle?: | 'circle'
|
|
96319
|
-
| 'dash'
|
|
96320
|
-
| 'diamond'
|
|
96321
|
-
| 'dot'
|
|
96322
|
-
| 'picture'
|
|
96323
|
-
| 'plus'
|
|
96324
|
-
| 'square'
|
|
96325
|
-
| 'star'
|
|
96326
|
-
| 'triangle'
|
|
96327
|
-
| 'x'
|
|
96328
|
-
| 'auto'
|
|
96329
|
-
| 'none';
|
|
96330
|
-
lineWidth?: number;
|
|
96331
|
-
smooth?: boolean;
|
|
96332
|
-
dataLabels?: DataLabelConfig;
|
|
96333
|
-
trendline?: TrendlineConfig;
|
|
96334
|
-
errorBars?: ErrorBarConfig;
|
|
96335
|
-
/** Separate X-axis error bars (for scatter/bubble charts) */
|
|
96336
|
-
xErrorBars?: ErrorBarConfig;
|
|
96337
|
-
/** Separate Y-axis error bars (for scatter/bubble charts) */
|
|
96338
|
-
yErrorBars?: ErrorBarConfig;
|
|
96339
|
-
/** Whether to invert the fill color for negative values */
|
|
96340
|
-
invertIfNegative?: boolean;
|
|
96341
|
-
/** Explosion distance for pie/doughnut per-series (0-400%) */
|
|
96342
|
-
explosion?: number;
|
|
96343
|
-
/** Data values range in A1 notation (e.g., "B2:B10") */
|
|
96344
|
-
values?: string;
|
|
96345
|
-
/** Category labels range in A1 notation (e.g., "A2:A10") */
|
|
96346
|
-
categories?: string;
|
|
96347
|
-
/** Per-point formatting overrides */
|
|
96348
|
-
points?: PointFormat[];
|
|
96349
|
-
}`,
|
|
96350
|
-
docstring: "Individual series configuration"
|
|
95924
|
+
definition: "{\n name?: string;\n type?: string;\n color?: string;\n values?: string;\n categories?: string;\n bubbleSize?: string;\n smooth?: boolean;\n explosion?: number;\n invertIfNegative?: boolean;\n yAxisIndex?: number;\n showMarkers?: boolean;\n markerSize?: number;\n markerStyle?: string;\n lineWidth?: number;\n points?: PointFormat[];\n dataLabels?: DataLabelConfig;\n trendlines?: TrendlineConfig[];\n errorBars?: ErrorBarConfig;\n xErrorBars?: ErrorBarConfig;\n yErrorBars?: ErrorBarConfig;\n idx?: number;\n order?: number;\n /** @deprecated Use trendlines[] instead */\n trendline?: TrendlineConfig;\n}",
|
|
95925
|
+
docstring: "Individual series configuration (matches ChartSeriesData wire type)"
|
|
96351
95926
|
},
|
|
96352
95927
|
SeriesOrientation: {
|
|
96353
95928
|
name: "SeriesOrientation",
|
|
@@ -96424,6 +95999,11 @@ Used in condition filters where users specify rules like
|
|
|
96424
95999
|
definition: "{\n /** Sheet ID */\n id: string;\n /** Sheet name */\n name: string;\n /** Sheet index (0-based) */\n index: number;\n /** Range containing all non-empty cells (A1 notation), or null if empty */\n usedRange: string | null;\n /** Number of cells with data */\n cellCount: number;\n /** Number of cells with formulas */\n formulaCount: number;\n /** Number of charts in this sheet */\n chartCount: number;\n /** Sheet dimensions */\n dimensions: { rows: number; cols: number };\n}",
|
|
96425
96000
|
docstring: "A summary snapshot of a single sheet."
|
|
96426
96001
|
},
|
|
96002
|
+
SingleAxisConfig: {
|
|
96003
|
+
name: "SingleAxisConfig",
|
|
96004
|
+
definition: "{\n title?: string;\n visible: boolean;\n min?: number;\n max?: number;\n axisType?: string;\n gridLines?: boolean;\n minorGridLines?: boolean;\n majorUnit?: number;\n minorUnit?: number;\n tickMarks?: string;\n minorTickMarks?: string;\n numberFormat?: string;\n reverse?: boolean;\n position?: string;\n logBase?: number;\n displayUnit?: string;\n /** @deprecated Alias for axisType \u2014 kept for backward compat with charts package */\n type?: AxisType;\n /** @deprecated Alias for visible \u2014 kept for backward compat with charts package */\n show?: boolean;\n}",
|
|
96005
|
+
docstring: "Single axis configuration (matches SingleAxisData wire type)."
|
|
96006
|
+
},
|
|
96427
96007
|
Slicer: {
|
|
96428
96008
|
name: "Slicer",
|
|
96429
96009
|
definition: "{\n /** Currently selected filter items */\n selectedItems: CellValue[];\n /** Position and dimensions in pixels */\n position: { x: number; y: number; width: number; height: number };\n}",
|
|
@@ -96431,7 +96011,7 @@ Used in condition filters where users specify rules like
|
|
|
96431
96011
|
},
|
|
96432
96012
|
SlicerConfig: {
|
|
96433
96013
|
name: "SlicerConfig",
|
|
96434
|
-
definition: "{\n /** Name of the table to connect the slicer to */\n tableName?: string;\n /** Column name within the table to filter on */\n columnName?: string;\n /** Display name for the slicer (auto-generated if omitted) */\n name?: string;\n /** Position and dimensions in pixels */\n position?: { x: number; y: number; width: number; height: number };\n /** Data source connection (rich alternative to tableName/columnName) */\n source?: SlicerSource;\n /** Slicer caption (header text) */\n caption?: string;\n /** Style configuration
|
|
96014
|
+
definition: "{\n /** Slicer ID (generated if omitted) */\n id?: string;\n /** Sheet ID the slicer belongs to */\n sheetId?: string;\n /** Name of the table to connect the slicer to */\n tableName?: string;\n /** Column name within the table to filter on */\n columnName?: string;\n /** Display name for the slicer (auto-generated if omitted) */\n name?: string;\n /** Position and dimensions in pixels */\n position?: { x: number; y: number; width: number; height: number };\n /** Data source connection (rich alternative to tableName/columnName) */\n source?: SlicerSource;\n /** Slicer caption (header text) */\n caption?: string;\n /** Style configuration */\n style?: SlicerStyle;\n /** Show slicer header */\n showHeader?: boolean;\n /** Z-order within the sheet */\n zIndex?: number;\n /** Whether slicer position is locked */\n locked?: boolean;\n /** Whether multi-select is enabled */\n multiSelect?: boolean;\n /** Initial selected values */\n selectedValues?: CellValue[];\n /** Currently selected date range start (timeline slicers) */\n selectedStartDate?: number;\n /** Currently selected date range end (timeline slicers) */\n selectedEndDate?: number;\n /** Current aggregation level (timeline slicers) */\n timelineLevel?: TimelineLevel;\n}",
|
|
96435
96015
|
docstring: "Configuration for creating a new slicer."
|
|
96436
96016
|
},
|
|
96437
96017
|
SlicerCustomStyle: {
|
|
@@ -96541,13 +96121,13 @@ Used in condition filters where users specify rules like
|
|
|
96541
96121
|
},
|
|
96542
96122
|
TableColumn: {
|
|
96543
96123
|
name: "TableColumn",
|
|
96544
|
-
definition: "{\n /** Column header name */\n name: string;\n /** Column index within the table (0-based) */\n index: number;\n /** Total row function type */\n
|
|
96545
|
-
docstring: "A single column in a table."
|
|
96124
|
+
definition: "{\n /** Unique column ID */\n id: string;\n /** Column header name */\n name: string;\n /** Column index within the table (0-based) */\n index: number;\n /** Total row function type */\n totalsFunction: TotalsFunction | null;\n /** Total row label */\n totalsLabel: string | null;\n /** Calculated column formula */\n calculatedFormula?: string;\n}",
|
|
96125
|
+
docstring: "A single column in a table.\n\nField names match the Rust-generated `TableColumn` type (compute-types.gen.ts)."
|
|
96546
96126
|
},
|
|
96547
96127
|
TableInfo: {
|
|
96548
96128
|
name: "TableInfo",
|
|
96549
|
-
definition: "{\n /** Internal table identifier
|
|
96550
|
-
docstring: "Information about an existing table."
|
|
96129
|
+
definition: "{\n /** Internal table identifier */\n id: string;\n /** Table name */\n name: string;\n /** Display name */\n displayName: string;\n /** Sheet the table belongs to */\n sheetId: string;\n /** Table range in A1 notation (converted from Rust SheetRange) */\n range: string;\n /** Column definitions */\n columns: TableColumn[];\n /** Whether the table has a header row */\n hasHeaderRow: boolean;\n /** Whether the totals row is visible */\n hasTotalsRow: boolean;\n /** Table style name */\n style: string;\n /** Whether banded rows are shown */\n bandedRows: boolean;\n /** Whether banded columns are shown */\n bandedColumns: boolean;\n /** Whether first column is emphasized */\n emphasizeFirstColumn: boolean;\n /** Whether last column is emphasized */\n emphasizeLastColumn: boolean;\n /** Whether filter buttons are shown */\n showFilterButtons: boolean;\n}",
|
|
96130
|
+
docstring: "Information about an existing table.\n\nField names match the Rust-generated `Table` type (compute-types.gen.ts)\nexcept `range` which is converted from `SheetRange` to A1 notation string."
|
|
96551
96131
|
},
|
|
96552
96132
|
TableOptions: {
|
|
96553
96133
|
name: "TableOptions",
|
|
@@ -96559,16 +96139,6 @@ Used in condition filters where users specify rules like
|
|
|
96559
96139
|
definition: "{\n /** Style name */\n name: string;\n}",
|
|
96560
96140
|
docstring: "Configuration for creating/updating a custom table style."
|
|
96561
96141
|
},
|
|
96562
|
-
TableStyleInfo: {
|
|
96563
|
-
name: "TableStyleInfo",
|
|
96564
|
-
definition: "{\n /** Style name/ID */\n name: string;\n /** Display name */\n displayName?: string;\n /** Whether this is a built-in style */\n isBuiltIn?: boolean;\n}",
|
|
96565
|
-
docstring: "Information about a custom table style."
|
|
96566
|
-
},
|
|
96567
|
-
TableStylePreset: {
|
|
96568
|
-
name: "TableStylePreset",
|
|
96569
|
-
definition: "| 'none'\n // Light styles\n | 'light1'\n | 'light2'\n | 'light3'\n | 'light4'\n | 'light5'\n | 'light6'\n | 'light7'\n | 'light8'\n | 'light9'\n | 'light10'\n | 'light11'\n | 'light12'\n | 'light13'\n | 'light14'\n | 'light15'\n | 'light16'\n | 'light17'\n | 'light18'\n | 'light19'\n | 'light20'\n | 'light21'\n // Medium styles\n | 'medium1'\n | 'medium2'\n | 'medium3'\n | 'medium4'\n | 'medium5'\n | 'medium6'\n | 'medium7'\n | 'medium8'\n | 'medium9'\n | 'medium10'\n | 'medium11'\n | 'medium12'\n | 'medium13'\n | 'medium14'\n | 'medium15'\n | 'medium16'\n | 'medium17'\n | 'medium18'\n | 'medium19'\n | 'medium20'\n | 'medium21'\n | 'medium22'\n | 'medium23'\n | 'medium24'\n | 'medium25'\n | 'medium26'\n | 'medium27'\n | 'medium28'\n // Dark styles\n | 'dark1'\n | 'dark2'\n | 'dark3'\n | 'dark4'\n | 'dark5'\n | 'dark6'\n | 'dark7'\n | 'dark8'\n | 'dark9'\n | 'dark10'\n | 'dark11'",
|
|
96570
|
-
docstring: "Table style presets matching Excel's table style gallery.\nLight styles (1-21), Medium styles (1-28), Dark styles (1-11)."
|
|
96571
|
-
},
|
|
96572
96142
|
TextBoxBorder: {
|
|
96573
96143
|
name: "TextBoxBorder",
|
|
96574
96144
|
definition: "{\n /** Corner radius in pixels (for rounded corners) */\n radius?: number;\n}",
|
|
@@ -96628,20 +96198,15 @@ Used in condition filters where users specify rules like
|
|
|
96628
96198
|
definition: "{\n text?: string;\n visible?: boolean;\n position?: 'top' | 'bottom' | 'left' | 'right' | 'overlay';\n font?: ChartFont;\n}",
|
|
96629
96199
|
docstring: "Rich title configuration"
|
|
96630
96200
|
},
|
|
96631
|
-
|
|
96632
|
-
name: "
|
|
96633
|
-
definition: "| '
|
|
96634
|
-
docstring: "
|
|
96201
|
+
TotalsFunction: {
|
|
96202
|
+
name: "TotalsFunction",
|
|
96203
|
+
definition: "| 'average'\n | 'count'\n | 'countNums'\n | 'max'\n | 'min'\n | 'stdDev'\n | 'sum'\n | 'var'\n | 'custom'\n | 'none'",
|
|
96204
|
+
docstring: "Totals function type (matches Rust TotalsFunction)."
|
|
96635
96205
|
},
|
|
96636
96206
|
TrendlineConfig: {
|
|
96637
96207
|
name: "TrendlineConfig",
|
|
96638
|
-
definition: "{\n show
|
|
96639
|
-
docstring: "Trendline configuration"
|
|
96640
|
-
},
|
|
96641
|
-
TrendlineType: {
|
|
96642
|
-
name: "TrendlineType",
|
|
96643
|
-
definition: "| 'linear'\n | 'exponential'\n | 'logarithmic'\n | 'polynomial'\n | 'power'\n | 'moving-average'",
|
|
96644
|
-
docstring: "Trendline types for scatter charts"
|
|
96208
|
+
definition: "{\n show?: boolean;\n type?: string;\n color?: string;\n lineWidth?: number;\n order?: number;\n period?: number;\n forward?: number;\n backward?: number;\n intercept?: number;\n displayEquation?: boolean;\n displayRSquared?: boolean;\n name?: string;\n /** @deprecated Use displayEquation instead */\n showEquation?: boolean;\n /** @deprecated Use displayRSquared instead */\n showR2?: boolean;\n /** @deprecated Use forward instead */\n forwardPeriod?: number;\n /** @deprecated Use backward instead */\n backwardPeriod?: number;\n}",
|
|
96209
|
+
docstring: "Trendline configuration (matches TrendlineData wire type)"
|
|
96645
96210
|
},
|
|
96646
96211
|
UndoHistoryEntry: {
|
|
96647
96212
|
name: "UndoHistoryEntry",
|
|
@@ -96760,6 +96325,415 @@ Used in condition filters where users specify rules like
|
|
|
96760
96325
|
definition: "{\n /** All sheets in the workbook */\n sheets: SheetSnapshot[];\n /** ID of the currently active sheet */\n activeSheetId: string;\n /** Total number of sheets */\n sheetCount: number;\n}",
|
|
96761
96326
|
docstring: "A summary snapshot of the entire workbook state."
|
|
96762
96327
|
}
|
|
96328
|
+
},
|
|
96329
|
+
formatPresets: {
|
|
96330
|
+
general: {
|
|
96331
|
+
default: {
|
|
96332
|
+
code: "General",
|
|
96333
|
+
description: "",
|
|
96334
|
+
example: "1234.5"
|
|
96335
|
+
}
|
|
96336
|
+
},
|
|
96337
|
+
number: {
|
|
96338
|
+
integer: {
|
|
96339
|
+
code: "0",
|
|
96340
|
+
description: "No decimal places",
|
|
96341
|
+
example: "1235"
|
|
96342
|
+
},
|
|
96343
|
+
decimal1: {
|
|
96344
|
+
code: "0.0",
|
|
96345
|
+
description: "1 decimal place",
|
|
96346
|
+
example: "1234.5"
|
|
96347
|
+
},
|
|
96348
|
+
decimal2: {
|
|
96349
|
+
code: "0.00",
|
|
96350
|
+
description: "2 decimal places",
|
|
96351
|
+
example: "1234.50"
|
|
96352
|
+
},
|
|
96353
|
+
decimal3: {
|
|
96354
|
+
code: "0.000",
|
|
96355
|
+
description: "3 decimal places",
|
|
96356
|
+
example: "1234.500"
|
|
96357
|
+
},
|
|
96358
|
+
thousands: {
|
|
96359
|
+
code: "#,##0",
|
|
96360
|
+
description: "Thousands separator, no decimals",
|
|
96361
|
+
example: "1,235"
|
|
96362
|
+
},
|
|
96363
|
+
thousandsDecimal1: {
|
|
96364
|
+
code: "#,##0.0",
|
|
96365
|
+
description: "Thousands separator, 1 decimal",
|
|
96366
|
+
example: "1,234.5"
|
|
96367
|
+
},
|
|
96368
|
+
thousandsDecimal2: {
|
|
96369
|
+
code: "#,##0.00",
|
|
96370
|
+
description: "Thousands separator, 2 decimals",
|
|
96371
|
+
example: "1,234.50"
|
|
96372
|
+
},
|
|
96373
|
+
negativeRed: {
|
|
96374
|
+
code: "#,##0.00;[Red]-#,##0.00",
|
|
96375
|
+
description: "Red negative numbers",
|
|
96376
|
+
example: "-1,234.50"
|
|
96377
|
+
},
|
|
96378
|
+
negativeParens: {
|
|
96379
|
+
code: "#,##0.00;(#,##0.00)",
|
|
96380
|
+
description: "Parentheses for negatives",
|
|
96381
|
+
example: "(1,234.50)"
|
|
96382
|
+
},
|
|
96383
|
+
negativeParensRed: {
|
|
96384
|
+
code: "#,##0.00;[Red](#,##0.00)",
|
|
96385
|
+
description: "Red parentheses for negatives",
|
|
96386
|
+
example: "(1,234.50)"
|
|
96387
|
+
}
|
|
96388
|
+
},
|
|
96389
|
+
currency: {
|
|
96390
|
+
usd: {
|
|
96391
|
+
code: "$#,##0.00",
|
|
96392
|
+
description: "US Dollar",
|
|
96393
|
+
example: "$1,234.50"
|
|
96394
|
+
},
|
|
96395
|
+
usdNegMinus: {
|
|
96396
|
+
code: "$#,##0.00;-$#,##0.00",
|
|
96397
|
+
description: "USD minus",
|
|
96398
|
+
example: "-$1,234.50"
|
|
96399
|
+
},
|
|
96400
|
+
usdNegParens: {
|
|
96401
|
+
code: "$#,##0.00;($#,##0.00)",
|
|
96402
|
+
description: "USD parentheses",
|
|
96403
|
+
example: "($1,234.50)"
|
|
96404
|
+
},
|
|
96405
|
+
usdNegRed: {
|
|
96406
|
+
code: "$#,##0.00;[Red]-$#,##0.00",
|
|
96407
|
+
description: "USD red minus",
|
|
96408
|
+
example: "-$1,234.50"
|
|
96409
|
+
},
|
|
96410
|
+
usdNegParensRed: {
|
|
96411
|
+
code: "$#,##0.00;[Red]($#,##0.00)",
|
|
96412
|
+
description: "USD red parentheses",
|
|
96413
|
+
example: "($1,234.50)"
|
|
96414
|
+
},
|
|
96415
|
+
eur: {
|
|
96416
|
+
code: "\u20AC#,##0.00",
|
|
96417
|
+
description: "Euro",
|
|
96418
|
+
example: "\u20AC1,234.50"
|
|
96419
|
+
},
|
|
96420
|
+
gbp: {
|
|
96421
|
+
code: "\xA3#,##0.00",
|
|
96422
|
+
description: "British Pound",
|
|
96423
|
+
example: "\xA31,234.50"
|
|
96424
|
+
},
|
|
96425
|
+
jpy: {
|
|
96426
|
+
code: "\xA5#,##0",
|
|
96427
|
+
description: "Japanese Yen (no decimals)",
|
|
96428
|
+
example: "\xA51,235"
|
|
96429
|
+
},
|
|
96430
|
+
cny: {
|
|
96431
|
+
code: "\xA5#,##0.00",
|
|
96432
|
+
description: "Chinese Yuan",
|
|
96433
|
+
example: "\xA51,234.50"
|
|
96434
|
+
},
|
|
96435
|
+
inr: {
|
|
96436
|
+
code: "\u20B9#,##0.00",
|
|
96437
|
+
description: "Indian Rupee",
|
|
96438
|
+
example: "\u20B91,234.50"
|
|
96439
|
+
},
|
|
96440
|
+
krw: {
|
|
96441
|
+
code: "\u20A9#,##0",
|
|
96442
|
+
description: "Korean Won (no decimals)",
|
|
96443
|
+
example: "\u20A91,235"
|
|
96444
|
+
},
|
|
96445
|
+
chf: {
|
|
96446
|
+
code: "CHF #,##0.00",
|
|
96447
|
+
description: "Swiss Franc",
|
|
96448
|
+
example: "CHF 1,234.50"
|
|
96449
|
+
},
|
|
96450
|
+
cad: {
|
|
96451
|
+
code: "CA$#,##0.00",
|
|
96452
|
+
description: "Canadian Dollar",
|
|
96453
|
+
example: "CA$1,234.50"
|
|
96454
|
+
},
|
|
96455
|
+
aud: {
|
|
96456
|
+
code: "A$#,##0.00",
|
|
96457
|
+
description: "Australian Dollar",
|
|
96458
|
+
example: "A$1,234.50"
|
|
96459
|
+
}
|
|
96460
|
+
},
|
|
96461
|
+
accounting: {
|
|
96462
|
+
usd: {
|
|
96463
|
+
code: '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)',
|
|
96464
|
+
description: "USD Accounting",
|
|
96465
|
+
example: "$ 1,234.50"
|
|
96466
|
+
},
|
|
96467
|
+
eur: {
|
|
96468
|
+
code: '_(\u20AC* #,##0.00_);_(\u20AC* (#,##0.00);_(\u20AC* "-"??_);_(@_)',
|
|
96469
|
+
description: "EUR Accounting",
|
|
96470
|
+
example: "\u20AC 1,234.50"
|
|
96471
|
+
},
|
|
96472
|
+
gbp: {
|
|
96473
|
+
code: '_(\xA3* #,##0.00_);_(\xA3* (#,##0.00);_(\xA3* "-"??_);_(@_)',
|
|
96474
|
+
description: "GBP Accounting",
|
|
96475
|
+
example: "\xA3 1,234.50"
|
|
96476
|
+
}
|
|
96477
|
+
},
|
|
96478
|
+
date: {
|
|
96479
|
+
shortUS: {
|
|
96480
|
+
code: "m/d/yyyy",
|
|
96481
|
+
description: "Short date (US)",
|
|
96482
|
+
example: "12/13/2025"
|
|
96483
|
+
},
|
|
96484
|
+
mediumUS: {
|
|
96485
|
+
code: "mmm d, yyyy",
|
|
96486
|
+
description: "Medium date (US)",
|
|
96487
|
+
example: "Dec 13, 2025"
|
|
96488
|
+
},
|
|
96489
|
+
longUS: {
|
|
96490
|
+
code: "mmmm d, yyyy",
|
|
96491
|
+
description: "Long date (US)",
|
|
96492
|
+
example: "December 13, 2025"
|
|
96493
|
+
},
|
|
96494
|
+
fullUS: {
|
|
96495
|
+
code: "dddd, mmmm d, yyyy",
|
|
96496
|
+
description: "Full date (US)",
|
|
96497
|
+
example: "Saturday, December 13, 2025"
|
|
96498
|
+
},
|
|
96499
|
+
iso: {
|
|
96500
|
+
code: "yyyy-mm-dd",
|
|
96501
|
+
description: "ISO 8601",
|
|
96502
|
+
example: "2025-12-13"
|
|
96503
|
+
},
|
|
96504
|
+
shortEU: {
|
|
96505
|
+
code: "d/m/yyyy",
|
|
96506
|
+
description: "Short date (EU)",
|
|
96507
|
+
example: "13/12/2025"
|
|
96508
|
+
},
|
|
96509
|
+
mediumEU: {
|
|
96510
|
+
code: "d mmm yyyy",
|
|
96511
|
+
description: "Medium date (EU)",
|
|
96512
|
+
example: "13 Dec 2025"
|
|
96513
|
+
},
|
|
96514
|
+
longEU: {
|
|
96515
|
+
code: "d mmmm yyyy",
|
|
96516
|
+
description: "Long date (EU)",
|
|
96517
|
+
example: "13 December 2025"
|
|
96518
|
+
},
|
|
96519
|
+
monthYear: {
|
|
96520
|
+
code: "mmmm yyyy",
|
|
96521
|
+
description: "Month and year",
|
|
96522
|
+
example: "December 2025"
|
|
96523
|
+
},
|
|
96524
|
+
monthYearShort: {
|
|
96525
|
+
code: "mmm yyyy",
|
|
96526
|
+
description: "Short month and year",
|
|
96527
|
+
example: "Dec 2025"
|
|
96528
|
+
},
|
|
96529
|
+
dayMonth: {
|
|
96530
|
+
code: "d mmmm",
|
|
96531
|
+
description: "Day and month",
|
|
96532
|
+
example: "13 December"
|
|
96533
|
+
},
|
|
96534
|
+
dayMonthShort: {
|
|
96535
|
+
code: "d mmm",
|
|
96536
|
+
description: "Short day and month",
|
|
96537
|
+
example: "13 Dec"
|
|
96538
|
+
},
|
|
96539
|
+
excelShort: {
|
|
96540
|
+
code: "m/d/yy",
|
|
96541
|
+
description: "Excel short date",
|
|
96542
|
+
example: "12/13/25"
|
|
96543
|
+
},
|
|
96544
|
+
excelMedium: {
|
|
96545
|
+
code: "d-mmm-yy",
|
|
96546
|
+
description: "Excel medium date",
|
|
96547
|
+
example: "13-Dec-25"
|
|
96548
|
+
},
|
|
96549
|
+
excelLong: {
|
|
96550
|
+
code: "d-mmm-yyyy",
|
|
96551
|
+
description: "Excel long date",
|
|
96552
|
+
example: "13-Dec-2025"
|
|
96553
|
+
}
|
|
96554
|
+
},
|
|
96555
|
+
time: {
|
|
96556
|
+
short12: {
|
|
96557
|
+
code: "h:mm AM/PM",
|
|
96558
|
+
description: "12-hour short",
|
|
96559
|
+
example: "3:45 PM"
|
|
96560
|
+
},
|
|
96561
|
+
long12: {
|
|
96562
|
+
code: "h:mm:ss AM/PM",
|
|
96563
|
+
description: "12-hour with seconds",
|
|
96564
|
+
example: "3:45:30 PM"
|
|
96565
|
+
},
|
|
96566
|
+
short24: {
|
|
96567
|
+
code: "HH:mm",
|
|
96568
|
+
description: "24-hour short",
|
|
96569
|
+
example: "15:45"
|
|
96570
|
+
},
|
|
96571
|
+
long24: {
|
|
96572
|
+
code: "HH:mm:ss",
|
|
96573
|
+
description: "24-hour with seconds",
|
|
96574
|
+
example: "15:45:30"
|
|
96575
|
+
},
|
|
96576
|
+
dateTime12: {
|
|
96577
|
+
code: "m/d/yyyy h:mm AM/PM",
|
|
96578
|
+
description: "Date and 12-hour time",
|
|
96579
|
+
example: "12/13/2025 3:45 PM"
|
|
96580
|
+
},
|
|
96581
|
+
dateTime24: {
|
|
96582
|
+
code: "yyyy-mm-dd HH:mm",
|
|
96583
|
+
description: "ISO date and 24-hour time",
|
|
96584
|
+
example: "2025-12-13 15:45"
|
|
96585
|
+
},
|
|
96586
|
+
durationHM: {
|
|
96587
|
+
code: "[h]:mm",
|
|
96588
|
+
description: "Hours and minutes (elapsed)",
|
|
96589
|
+
example: "25:30"
|
|
96590
|
+
},
|
|
96591
|
+
durationHMS: {
|
|
96592
|
+
code: "[h]:mm:ss",
|
|
96593
|
+
description: "Hours, minutes, seconds (elapsed)",
|
|
96594
|
+
example: "25:30:45"
|
|
96595
|
+
},
|
|
96596
|
+
durationMS: {
|
|
96597
|
+
code: "[mm]:ss",
|
|
96598
|
+
description: "Minutes and seconds (elapsed)",
|
|
96599
|
+
example: "1530:45"
|
|
96600
|
+
}
|
|
96601
|
+
},
|
|
96602
|
+
percentage: {
|
|
96603
|
+
integer: {
|
|
96604
|
+
code: "0%",
|
|
96605
|
+
description: "No decimal places",
|
|
96606
|
+
example: "50%"
|
|
96607
|
+
},
|
|
96608
|
+
decimal1: {
|
|
96609
|
+
code: "0.0%",
|
|
96610
|
+
description: "1 decimal place",
|
|
96611
|
+
example: "50.0%"
|
|
96612
|
+
},
|
|
96613
|
+
decimal2: {
|
|
96614
|
+
code: "0.00%",
|
|
96615
|
+
description: "2 decimal places",
|
|
96616
|
+
example: "50.00%"
|
|
96617
|
+
},
|
|
96618
|
+
decimal3: {
|
|
96619
|
+
code: "0.000%",
|
|
96620
|
+
description: "3 decimal places",
|
|
96621
|
+
example: "50.000%"
|
|
96622
|
+
}
|
|
96623
|
+
},
|
|
96624
|
+
fraction: {
|
|
96625
|
+
halves: {
|
|
96626
|
+
code: "# ?/2",
|
|
96627
|
+
description: "Halves (1/2)",
|
|
96628
|
+
example: "1 1/2"
|
|
96629
|
+
},
|
|
96630
|
+
quarters: {
|
|
96631
|
+
code: "# ?/4",
|
|
96632
|
+
description: "Quarters (1/4)",
|
|
96633
|
+
example: "1 1/4"
|
|
96634
|
+
},
|
|
96635
|
+
eighths: {
|
|
96636
|
+
code: "# ?/8",
|
|
96637
|
+
description: "Eighths (1/8)",
|
|
96638
|
+
example: "1 3/8"
|
|
96639
|
+
},
|
|
96640
|
+
sixteenths: {
|
|
96641
|
+
code: "# ??/16",
|
|
96642
|
+
description: "Sixteenths (1/16)",
|
|
96643
|
+
example: "1 5/16"
|
|
96644
|
+
},
|
|
96645
|
+
tenths: {
|
|
96646
|
+
code: "# ?/10",
|
|
96647
|
+
description: "Tenths (1/10)",
|
|
96648
|
+
example: "1 3/10"
|
|
96649
|
+
},
|
|
96650
|
+
hundredths: {
|
|
96651
|
+
code: "# ??/100",
|
|
96652
|
+
description: "Hundredths (1/100)",
|
|
96653
|
+
example: "1 25/100"
|
|
96654
|
+
},
|
|
96655
|
+
upToOneDigit: {
|
|
96656
|
+
code: "# ?/?",
|
|
96657
|
+
description: "Up to one digit (1/4)",
|
|
96658
|
+
example: "1 2/3"
|
|
96659
|
+
},
|
|
96660
|
+
upToTwoDigits: {
|
|
96661
|
+
code: "# ??/??",
|
|
96662
|
+
description: "Up to two digits (21/25)",
|
|
96663
|
+
example: "1 25/67"
|
|
96664
|
+
},
|
|
96665
|
+
upToThreeDigits: {
|
|
96666
|
+
code: "# ???/???",
|
|
96667
|
+
description: "Up to three digits (312/943)",
|
|
96668
|
+
example: "1 312/943"
|
|
96669
|
+
}
|
|
96670
|
+
},
|
|
96671
|
+
scientific: {
|
|
96672
|
+
default: {
|
|
96673
|
+
code: "0.00E+00",
|
|
96674
|
+
description: "2 decimal places",
|
|
96675
|
+
example: "1.23E+03"
|
|
96676
|
+
},
|
|
96677
|
+
decimal1: {
|
|
96678
|
+
code: "0.0E+00",
|
|
96679
|
+
description: "1 decimal place",
|
|
96680
|
+
example: "1.2E+03"
|
|
96681
|
+
},
|
|
96682
|
+
decimal3: {
|
|
96683
|
+
code: "0.000E+00",
|
|
96684
|
+
description: "3 decimal places",
|
|
96685
|
+
example: "1.235E+03"
|
|
96686
|
+
},
|
|
96687
|
+
noDecimals: {
|
|
96688
|
+
code: "0E+00",
|
|
96689
|
+
description: "No decimal places",
|
|
96690
|
+
example: "1E+03"
|
|
96691
|
+
}
|
|
96692
|
+
},
|
|
96693
|
+
text: {
|
|
96694
|
+
default: {
|
|
96695
|
+
code: "@",
|
|
96696
|
+
description: "Display as entered",
|
|
96697
|
+
example: "1234"
|
|
96698
|
+
}
|
|
96699
|
+
},
|
|
96700
|
+
special: {
|
|
96701
|
+
zipCode: {
|
|
96702
|
+
code: "00000",
|
|
96703
|
+
description: "ZIP Code (5-digit)",
|
|
96704
|
+
example: "01234"
|
|
96705
|
+
},
|
|
96706
|
+
zipPlus4: {
|
|
96707
|
+
code: "00000-0000",
|
|
96708
|
+
description: "ZIP+4 Code",
|
|
96709
|
+
example: "01234-5678"
|
|
96710
|
+
},
|
|
96711
|
+
phone: {
|
|
96712
|
+
code: "(###) ###-####",
|
|
96713
|
+
description: "Phone Number",
|
|
96714
|
+
example: "(555) 123-4567"
|
|
96715
|
+
},
|
|
96716
|
+
ssn: {
|
|
96717
|
+
code: "000-00-0000",
|
|
96718
|
+
description: "Social Security Number",
|
|
96719
|
+
example: "123-45-6789"
|
|
96720
|
+
}
|
|
96721
|
+
},
|
|
96722
|
+
custom: {}
|
|
96723
|
+
},
|
|
96724
|
+
defaultFormats: {
|
|
96725
|
+
accounting: '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)',
|
|
96726
|
+
currency: "$#,##0.00",
|
|
96727
|
+
custom: "General",
|
|
96728
|
+
date: "m/d/yyyy",
|
|
96729
|
+
fraction: "# ?/?",
|
|
96730
|
+
general: "General",
|
|
96731
|
+
number: "#,##0.00",
|
|
96732
|
+
percentage: "0.00%",
|
|
96733
|
+
scientific: "0.00E+00",
|
|
96734
|
+
special: "00000",
|
|
96735
|
+
text: "@",
|
|
96736
|
+
time: "h:mm AM/PM"
|
|
96763
96737
|
}
|
|
96764
96738
|
};
|
|
96765
96739
|
|