@svgrid/enterprise 3.0.1 → 3.0.2
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/SvFormulaBar.svelte +606 -0
- package/dist/SvFormulaBar.svelte.d.ts +62 -0
- package/dist/SvPivotDesigner.svelte +65 -14
- package/dist/SvRibbonIcon.svelte +46 -0
- package/dist/SvRibbonIcon.svelte.d.ts +17 -0
- package/dist/SvSchemaChart.svelte +4 -2
- package/dist/SvSheet.svelte +4114 -0
- package/dist/SvSheet.svelte.d.ts +142 -0
- package/dist/SvSheetComment.svelte +98 -0
- package/dist/SvSheetComment.svelte.d.ts +22 -0
- package/dist/SvSheetConditionalFormat.svelte +162 -0
- package/dist/SvSheetConditionalFormat.svelte.d.ts +14 -0
- package/dist/SvSheetDataValidation.svelte +249 -0
- package/dist/SvSheetDataValidation.svelte.d.ts +14 -0
- package/dist/SvSheetFilterMenu.svelte +217 -0
- package/dist/SvSheetFilterMenu.svelte.d.ts +17 -0
- package/dist/SvSheetFindReplace.svelte +132 -0
- package/dist/SvSheetFindReplace.svelte.d.ts +10 -0
- package/dist/SvSheetFormatCells.svelte +421 -0
- package/dist/SvSheetFormatCells.svelte.d.ts +17 -0
- package/dist/SvSheetGoalSeek.svelte +144 -0
- package/dist/SvSheetGoalSeek.svelte.d.ts +12 -0
- package/dist/SvSheetInsertFunction.svelte +147 -0
- package/dist/SvSheetInsertFunction.svelte.d.ts +8 -0
- package/dist/SvSheetListPicker.svelte +89 -0
- package/dist/SvSheetListPicker.svelte.d.ts +16 -0
- package/dist/SvSheetManageRules.svelte +185 -0
- package/dist/SvSheetManageRules.svelte.d.ts +16 -0
- package/dist/SvSheetNameManager.svelte +225 -0
- package/dist/SvSheetNameManager.svelte.d.ts +11 -0
- package/dist/SvSheetPasteSpecial.svelte +105 -0
- package/dist/SvSheetPasteSpecial.svelte.d.ts +12 -0
- package/dist/SvSheetRemoveDuplicates.svelte +149 -0
- package/dist/SvSheetRemoveDuplicates.svelte.d.ts +12 -0
- package/dist/SvSheetRibbon.svelte +1201 -0
- package/dist/SvSheetRibbon.svelte.d.ts +34 -0
- package/dist/SvSheetSizeDialog.svelte +58 -0
- package/dist/SvSheetSizeDialog.svelte.d.ts +11 -0
- package/dist/SvSheetTabs.svelte +441 -0
- package/dist/SvSheetTabs.svelte.d.ts +36 -0
- package/dist/SvSheetTabs.test-harness.svelte.d.ts +17 -0
- package/dist/SvSheetTabs.test-harness.svelte.js +22 -0
- package/dist/SvSheetTextToColumns.svelte +172 -0
- package/dist/SvSheetTextToColumns.svelte.d.ts +13 -0
- package/dist/SvSheetValidationAlert.svelte +83 -0
- package/dist/SvSheetValidationAlert.svelte.d.ts +15 -0
- package/dist/cdn/svgrid-enterprise.svelte-external.js +18997 -5396
- package/dist/designer/assets/GridMenus-BlsvL_aU.js +8 -0
- package/dist/designer/assets/SvChartMenu-BYO9cYdy.css +1 -0
- package/dist/designer/assets/SvChartMenu-D9hEeHar.js +1 -0
- package/dist/designer/assets/SvDateRangeInput-BBRzrQeg.js +1 -0
- package/dist/designer/assets/SvDateTimePicker-DARvKUL2.js +1 -0
- package/dist/designer/assets/SvGridCellEditor-C7uQXYds.js +4 -0
- package/dist/designer/assets/SvGridChart-B8j1SSy3.js +3 -0
- package/dist/designer/assets/SvGridChart-BgLuPO7I.css +1 -0
- package/dist/designer/assets/SvGridChartBuilder-08YWWeqY.css +1 -0
- package/dist/designer/assets/SvGridChartBuilder-kvyIU_Rl.js +1 -0
- package/dist/designer/assets/SvGridChartPanel-4Pc8y5yO.css +1 -0
- package/dist/designer/assets/SvGridChartPanel-pT6ITc2P.js +4 -0
- package/dist/designer/assets/{SvGridChartView-DUc-1RUf.css → SvGridChartView-7msfnWZT.css} +1 -1
- package/dist/designer/assets/SvGridChartView-bg281UA1.js +1 -0
- package/dist/designer/assets/SvListBox-BDS66lmZ.js +110 -0
- package/dist/designer/assets/SvMenuList-DJ47ba1h.css +1 -0
- package/dist/designer/assets/SvMenuList-Dgq2D5VN.js +1 -0
- package/dist/designer/assets/SvTabs-DKmwb5p1.css +1 -0
- package/dist/designer/assets/SvTabs-UFCMTHXS.js +1 -0
- package/dist/designer/assets/chart-cIPUsbM5.js +1 -0
- package/dist/designer/assets/chart-export-B6bkQ3X8.js +11 -0
- package/dist/designer/assets/chart-export-pdf-BbA28-gt.js +11 -0
- package/dist/designer/assets/chart-panel-messages-DtTxpBUU.js +1 -0
- package/dist/designer/assets/chart-summary-Czu_5epb.js +1 -0
- package/dist/designer/assets/chart-trend-D5I5VEe8.js +1 -0
- package/dist/designer/assets/chart-validate-BMqM-qkF.js +1 -0
- package/dist/designer/assets/column-resize-BYDzR1Ve.js +1 -0
- package/dist/designer/assets/date-format-B8JbEtIG.js +1 -0
- package/dist/designer/assets/date-format-DKS-z0xS.css +1 -0
- package/dist/designer/assets/editor-contract-Bpoa7A5g.js +1 -0
- package/dist/designer/assets/focus-trap-CAreAhlU.js +1 -0
- package/dist/designer/assets/index-CMFgAoVV.css +1 -0
- package/dist/designer/assets/{index-C_a9Cj8Y.js → index-DwU7CAMm.js} +291 -290
- package/dist/designer/assets/list-option-BP_dWS66.js +1 -0
- package/dist/designer/assets/row-resize-DLktcqUK.js +1 -0
- package/dist/designer/assets/src-CITpcm6b.js +1 -0
- package/dist/designer/assets/src-EdI3Xqds.js +58 -0
- package/dist/designer/index.html +23 -14
- package/dist/export-pdf.d.ts +89 -0
- package/dist/export-pdf.js +130 -0
- package/dist/export.js +17 -10
- package/dist/index.d.ts +64 -1
- package/dist/index.js +68 -1
- package/dist/install.js +5 -0
- package/dist/node/studio.js +64 -2
- package/dist/pivot-chart.d.ts +25 -1
- package/dist/pivot-chart.js +25 -69
- package/dist/sheet/address.d.ts +43 -0
- package/dist/sheet/address.js +81 -0
- package/dist/sheet/ast.d.ts +94 -0
- package/dist/sheet/ast.js +56 -0
- package/dist/sheet/auto-filter.d.ts +66 -0
- package/dist/sheet/auto-filter.js +147 -0
- package/dist/sheet/autocomplete.d.ts +42 -0
- package/dist/sheet/autocomplete.js +162 -0
- package/dist/sheet/coerce.d.ts +31 -0
- package/dist/sheet/coerce.js +122 -0
- package/dist/sheet/commands.d.ts +89 -0
- package/dist/sheet/commands.js +230 -0
- package/dist/sheet/comments.d.ts +29 -0
- package/dist/sheet/comments.js +73 -0
- package/dist/sheet/conditional-formats.d.ts +144 -0
- package/dist/sheet/conditional-formats.js +316 -0
- package/dist/sheet/deps.d.ts +60 -0
- package/dist/sheet/deps.js +199 -0
- package/dist/sheet/document.d.ts +150 -0
- package/dist/sheet/document.js +264 -0
- package/dist/sheet/edit-keys.d.ts +14 -0
- package/dist/sheet/edit-keys.js +40 -0
- package/dist/sheet/entry.d.ts +31 -0
- package/dist/sheet/entry.js +76 -0
- package/dist/sheet/evaluate.d.ts +61 -0
- package/dist/sheet/evaluate.js +337 -0
- package/dist/sheet/find-replace.d.ts +62 -0
- package/dist/sheet/find-replace.js +152 -0
- package/dist/sheet/format-store.d.ts +99 -0
- package/dist/sheet/format-store.js +233 -0
- package/dist/sheet/freeze.d.ts +54 -0
- package/dist/sheet/freeze.js +58 -0
- package/dist/sheet/function-catalog.d.ts +10 -0
- package/dist/sheet/function-catalog.js +94 -0
- package/dist/sheet/functions.d.ts +28 -0
- package/dist/sheet/functions.js +362 -0
- package/dist/sheet/goal-seek.d.ts +73 -0
- package/dist/sheet/goal-seek.js +153 -0
- package/dist/sheet/index.d.ts +53 -0
- package/dist/sheet/index.js +53 -0
- package/dist/sheet/merges.d.ts +71 -0
- package/dist/sheet/merges.js +137 -0
- package/dist/sheet/names.d.ts +31 -0
- package/dist/sheet/names.js +87 -0
- package/dist/sheet/navigate.d.ts +52 -0
- package/dist/sheet/navigate.js +135 -0
- package/dist/sheet/number-format.d.ts +63 -0
- package/dist/sheet/number-format.js +508 -0
- package/dist/sheet/palette.d.ts +19 -0
- package/dist/sheet/palette.js +84 -0
- package/dist/sheet/parse.d.ts +13 -0
- package/dist/sheet/parse.js +108 -0
- package/dist/sheet/paste-special.d.ts +164 -0
- package/dist/sheet/paste-special.js +592 -0
- package/dist/sheet/protection.d.ts +21 -0
- package/dist/sheet/protection.js +48 -0
- package/dist/sheet/rects.d.ts +45 -0
- package/dist/sheet/rects.js +112 -0
- package/dist/sheet/refs.d.ts +82 -0
- package/dist/sheet/refs.js +266 -0
- package/dist/sheet/ribbon-icons.d.ts +31 -0
- package/dist/sheet/ribbon-icons.js +350 -0
- package/dist/sheet/ribbon.d.ts +173 -0
- package/dist/sheet/ribbon.js +753 -0
- package/dist/sheet/shortcuts.d.ts +164 -0
- package/dist/sheet/shortcuts.js +623 -0
- package/dist/sheet/structure.d.ts +87 -0
- package/dist/sheet/structure.js +166 -0
- package/dist/sheet/tables.d.ts +70 -0
- package/dist/sheet/tables.js +147 -0
- package/dist/sheet/tokenize.d.ts +54 -0
- package/dist/sheet/tokenize.js +304 -0
- package/dist/sheet/transforms.d.ts +76 -0
- package/dist/sheet/transforms.js +154 -0
- package/dist/sheet/validation.d.ts +92 -0
- package/dist/sheet/validation.js +241 -0
- package/dist/sheet/workbook.d.ts +72 -0
- package/dist/sheet/workbook.js +409 -0
- package/dist/sheet-enable.d.ts +6 -0
- package/dist/sheet-enable.js +46 -0
- package/dist/studio/ui-components.generated.js +63 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +9 -4
- package/dist/designer/assets/GridMenus-B1JtIN21.js +0 -8
- package/dist/designer/assets/SvDateRangeInput-CjO7nn_x.js +0 -1
- package/dist/designer/assets/SvDateTimePicker-ByBD_ov6.js +0 -1
- package/dist/designer/assets/SvField-YDLipR6O.css +0 -1
- package/dist/designer/assets/SvField-cj1PFNgZ.js +0 -1
- package/dist/designer/assets/SvGridCellEditor-0W1L2hJ1.js +0 -2
- package/dist/designer/assets/SvGridChart-DBOR4xcz.js +0 -2
- package/dist/designer/assets/SvGridChart-fkMWeh1J.css +0 -1
- package/dist/designer/assets/SvGridChartPanel-symrhNnR.js +0 -11
- package/dist/designer/assets/SvGridChartView-BmRxq6mU.js +0 -1
- package/dist/designer/assets/SvListBox-1oUF6Iav.js +0 -110
- package/dist/designer/assets/chart-DXFganU8.js +0 -1
- package/dist/designer/assets/column-resize-C_inr5zT.js +0 -1
- package/dist/designer/assets/date-format-DGagAqRc.css +0 -1
- package/dist/designer/assets/date-format-onlYDsrY.js +0 -1
- package/dist/designer/assets/easing-zaypKrr0.js +0 -3
- package/dist/designer/assets/index-k2stW6L8.css +0 -1
- package/dist/designer/assets/row-resize-B0FWHcNr.js +0 -1
- package/dist/designer/assets/src-D9p27OGC.js +0 -58
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workbook: several named sheets that can read each other.
|
|
3
|
+
*
|
|
4
|
+
* The engine already parsed `Orders!A1` and `'Price list'!A1:C9` from the day
|
|
5
|
+
* it was promoted, because demo 119 had them. What was missing is the thing
|
|
6
|
+
* those references point AT. This is that model, plus the recalculation that
|
|
7
|
+
* has to span sheets once they can.
|
|
8
|
+
*
|
|
9
|
+
* Cells hold raw text and nothing else. Everything derived - the computed
|
|
10
|
+
* value, the dependency edges, the display string - is recomputed from it, so
|
|
11
|
+
* there is exactly one copy of the truth and no way for a cached value to
|
|
12
|
+
* disagree with the formula above it.
|
|
13
|
+
*/
|
|
14
|
+
import { parseFormula } from './parse.js';
|
|
15
|
+
import { evaluate, rangeValues } from './evaluate.js';
|
|
16
|
+
import { withCustomFunctions } from './functions.js';
|
|
17
|
+
import { isError } from './ast.js';
|
|
18
|
+
import { createDependencyGraph, precedentsOf, cellKey } from './deps.js';
|
|
19
|
+
import { createNames } from './names.js';
|
|
20
|
+
import { fixupReferences, renameSheetReferences } from './refs.js';
|
|
21
|
+
/** A name Excel would accept for a sheet. */
|
|
22
|
+
export function isValidSheetName(name) {
|
|
23
|
+
if (name.trim() === '' || name.length > 31)
|
|
24
|
+
return false;
|
|
25
|
+
// Excel forbids these because they are the reference grammar.
|
|
26
|
+
return !/[:\\/?*[\]]/.test(name);
|
|
27
|
+
}
|
|
28
|
+
/** `Sheet1`, `Sheet2`, ... skipping any that already exist. */
|
|
29
|
+
function nextSheetName(taken) {
|
|
30
|
+
const used = new Set(taken.map((n) => n.toLowerCase()));
|
|
31
|
+
for (let i = 1;; i += 1) {
|
|
32
|
+
const candidate = `Sheet${i}`;
|
|
33
|
+
if (!used.has(candidate.toLowerCase()))
|
|
34
|
+
return candidate;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function createWorkbook(initial = [{ name: 'Sheet1', cells: [] }], options = {}) {
|
|
38
|
+
const order = [];
|
|
39
|
+
const byName = new Map();
|
|
40
|
+
const graph = createDependencyGraph();
|
|
41
|
+
const functions = withCustomFunctions(options.functions);
|
|
42
|
+
/** Computed values, keyed the same way the graph is. Rebuilt lazily and
|
|
43
|
+
* invalidated by every write, so it can never hold a value whose formula
|
|
44
|
+
* has since changed. */
|
|
45
|
+
const values = new Map();
|
|
46
|
+
/** Cells currently being resolved, for cycle detection. */
|
|
47
|
+
const visiting = new Set();
|
|
48
|
+
/** Parsed formulas, keyed by their TEXT rather than their position: a
|
|
49
|
+
* column of =A1*2 filled down is one parse, not one per row. */
|
|
50
|
+
const astCache = new Map();
|
|
51
|
+
// Changing what a name refers to changes every formula that uses it, and
|
|
52
|
+
// the dependency graph only knows the CELLS a name pointed at when the
|
|
53
|
+
// formula was last evaluated. Dropping the cache is the honest answer:
|
|
54
|
+
// names change rarely, and a full recompute costs less than one stale total.
|
|
55
|
+
const names = (() => {
|
|
56
|
+
const inner = createNames();
|
|
57
|
+
const drop = () => { values.clear(); graph.clear(); };
|
|
58
|
+
return {
|
|
59
|
+
...inner,
|
|
60
|
+
define: (name, refersTo) => { inner.define(name, refersTo); drop(); },
|
|
61
|
+
remove: (name) => { inner.remove(name); drop(); },
|
|
62
|
+
hydrate: (entries) => { inner.hydrate(entries); drop(); },
|
|
63
|
+
clear: () => { inner.clear(); drop(); },
|
|
64
|
+
};
|
|
65
|
+
})();
|
|
66
|
+
let active = '';
|
|
67
|
+
function sheetCells(name) {
|
|
68
|
+
return byName.get(name.toLowerCase());
|
|
69
|
+
}
|
|
70
|
+
/** Resolve a sheet reference. A null sheet means the one being evaluated,
|
|
71
|
+
* which the resolver tracks as it descends. */
|
|
72
|
+
function resolveSheetName(sheet, self) {
|
|
73
|
+
return sheet ?? self;
|
|
74
|
+
}
|
|
75
|
+
function parseCached(text) {
|
|
76
|
+
if (astCache.has(text))
|
|
77
|
+
return astCache.get(text) ?? null;
|
|
78
|
+
let ast;
|
|
79
|
+
try {
|
|
80
|
+
ast = parseFormula(text);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
ast = null;
|
|
84
|
+
}
|
|
85
|
+
astCache.set(text, ast);
|
|
86
|
+
return ast;
|
|
87
|
+
}
|
|
88
|
+
function contextFor(self, override) {
|
|
89
|
+
return {
|
|
90
|
+
resolve: (sheet, row, col) => {
|
|
91
|
+
const name = resolveSheetName(sheet, self);
|
|
92
|
+
// A validation rule reads the cell it is checking as the text being
|
|
93
|
+
// entered, which is not in the sheet yet; nothing else is overridden.
|
|
94
|
+
if (override && name === self && row === override.row && col === override.col)
|
|
95
|
+
return literal(override.text);
|
|
96
|
+
return compute(name, row, col);
|
|
97
|
+
},
|
|
98
|
+
lastRow: (sheet) => Math.max(rowCount(resolveSheetName(sheet, self)) - 1, 0),
|
|
99
|
+
resolveNameNode: (name) => names.resolve(name),
|
|
100
|
+
functions,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function compute(sheet, row, col) {
|
|
104
|
+
const cells = sheetCells(sheet);
|
|
105
|
+
if (!cells)
|
|
106
|
+
return { error: '#REF!' };
|
|
107
|
+
if (row < 0 || col < 0)
|
|
108
|
+
return { error: '#REF!' };
|
|
109
|
+
// Anything past the written area is BLANK. A sheet has no size in this
|
|
110
|
+
// model beyond what has been typed into it, so there is no edge to fall
|
|
111
|
+
// off: =SUM(A1:A100) over a twelve-row sheet is an ordinary thing to
|
|
112
|
+
// write, and returning #REF! for the empty rows would poison the total.
|
|
113
|
+
//
|
|
114
|
+
// #REF! is reserved for the two cases that really are broken: a sheet
|
|
115
|
+
// that does not exist, and a negative index, which is what a reference
|
|
116
|
+
// shifted off the top by a delete becomes.
|
|
117
|
+
if (row >= cells.length || col >= (cells[row]?.length ?? 0))
|
|
118
|
+
return '';
|
|
119
|
+
const key = cellKey(sheet, row, col);
|
|
120
|
+
const cached = values.get(key);
|
|
121
|
+
if (cached !== undefined)
|
|
122
|
+
return cached;
|
|
123
|
+
if (visiting.has(key))
|
|
124
|
+
return { error: '#CYCLE!' };
|
|
125
|
+
visiting.add(key);
|
|
126
|
+
const text = (cells[row]?.[col] ?? '').trim();
|
|
127
|
+
let value;
|
|
128
|
+
if (text === '') {
|
|
129
|
+
value = '';
|
|
130
|
+
}
|
|
131
|
+
else if (text.startsWith('=')) {
|
|
132
|
+
const ast = parseCached(text);
|
|
133
|
+
if (!ast)
|
|
134
|
+
value = { error: '#PARSE!' };
|
|
135
|
+
else {
|
|
136
|
+
value = evaluate(ast, contextFor(sheet));
|
|
137
|
+
graph.setPrecedents(key, precedentsOf(ast, { sheet }, (s) => Math.max(rowCount(s ?? sheet) - 1, 0), (name) => names.resolve(name)));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const n = Number(text);
|
|
142
|
+
const upper = text.toUpperCase();
|
|
143
|
+
value = text !== '' && Number.isFinite(n) ? n
|
|
144
|
+
: upper === 'TRUE' ? true
|
|
145
|
+
: upper === 'FALSE' ? false
|
|
146
|
+
: text;
|
|
147
|
+
}
|
|
148
|
+
visiting.delete(key);
|
|
149
|
+
values.set(key, value);
|
|
150
|
+
return value;
|
|
151
|
+
}
|
|
152
|
+
/** What typed text is worth when it is not a formula: a number, a boolean or itself. */
|
|
153
|
+
function literal(text) {
|
|
154
|
+
const t = text.trim();
|
|
155
|
+
if (t === '')
|
|
156
|
+
return '';
|
|
157
|
+
if (t.startsWith('='))
|
|
158
|
+
return t;
|
|
159
|
+
const n = Number(t);
|
|
160
|
+
const upper = t.toUpperCase();
|
|
161
|
+
return Number.isFinite(n) ? n : upper === 'TRUE' ? true : upper === 'FALSE' ? false : t;
|
|
162
|
+
}
|
|
163
|
+
function rowCount(sheet) {
|
|
164
|
+
return sheetCells(sheet)?.length ?? 0;
|
|
165
|
+
}
|
|
166
|
+
function colCount(sheet) {
|
|
167
|
+
const cells = sheetCells(sheet);
|
|
168
|
+
if (!cells)
|
|
169
|
+
return 0;
|
|
170
|
+
return cells.reduce((max, row) => Math.max(max, row.length), 0);
|
|
171
|
+
}
|
|
172
|
+
/** Drop cached values for a cell and everything downstream of it. */
|
|
173
|
+
function invalidate(keys) {
|
|
174
|
+
const touched = [...keys];
|
|
175
|
+
for (const key of keys)
|
|
176
|
+
values.delete(key);
|
|
177
|
+
for (const key of graph.dirtyFrom(keys)) {
|
|
178
|
+
values.delete(key);
|
|
179
|
+
touched.push(key);
|
|
180
|
+
}
|
|
181
|
+
return touched;
|
|
182
|
+
}
|
|
183
|
+
function reportRecalc(keys) {
|
|
184
|
+
const cb = options.onRecalc;
|
|
185
|
+
if (!cb || keys.length === 0)
|
|
186
|
+
return;
|
|
187
|
+
cb(keys.map((key) => {
|
|
188
|
+
const gap = key.indexOf(' ');
|
|
189
|
+
const gap2 = key.indexOf(' ', gap + 1);
|
|
190
|
+
const row = Number(key.slice(0, gap));
|
|
191
|
+
const col = Number(key.slice(gap + 1, gap2));
|
|
192
|
+
const sheet = key.slice(gap2 + 1);
|
|
193
|
+
return { sheet, row, col, value: compute(sheet, row, col) };
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
const workbook = {
|
|
197
|
+
get sheets() { return [...order]; },
|
|
198
|
+
get active() { return active; },
|
|
199
|
+
get names() { return names; },
|
|
200
|
+
setActive(name) {
|
|
201
|
+
if (sheetCells(name))
|
|
202
|
+
active = order.find((n) => n.toLowerCase() === name.toLowerCase()) ?? active;
|
|
203
|
+
},
|
|
204
|
+
addSheet(name, at) {
|
|
205
|
+
const chosen = name ?? nextSheetName(order);
|
|
206
|
+
if (!isValidSheetName(chosen)) {
|
|
207
|
+
throw new Error(`"${chosen}" is not a valid sheet name: it must be 1 to 31 characters and must not contain : \\ / ? * [ ]`);
|
|
208
|
+
}
|
|
209
|
+
if (sheetCells(chosen))
|
|
210
|
+
throw new Error(`a sheet named "${chosen}" already exists`);
|
|
211
|
+
byName.set(chosen.toLowerCase(), []);
|
|
212
|
+
const index = at === undefined ? order.length : Math.max(0, Math.min(at, order.length));
|
|
213
|
+
order.splice(index, 0, chosen);
|
|
214
|
+
active = chosen;
|
|
215
|
+
return chosen;
|
|
216
|
+
},
|
|
217
|
+
removeSheet(name) {
|
|
218
|
+
const index = order.findIndex((n) => n.toLowerCase() === name.toLowerCase());
|
|
219
|
+
// A workbook with no sheets has nowhere to put the cursor, and Excel
|
|
220
|
+
// refuses the same way.
|
|
221
|
+
if (index < 0 || order.length <= 1)
|
|
222
|
+
return false;
|
|
223
|
+
const [removed] = order.splice(index, 1);
|
|
224
|
+
byName.delete(removed.toLowerCase());
|
|
225
|
+
// Every cached value may have read the sheet that just went.
|
|
226
|
+
values.clear();
|
|
227
|
+
graph.clear();
|
|
228
|
+
if (active.toLowerCase() === removed.toLowerCase()) {
|
|
229
|
+
active = order[Math.min(index, order.length - 1)] ?? order[0];
|
|
230
|
+
}
|
|
231
|
+
return true;
|
|
232
|
+
},
|
|
233
|
+
renameSheet(from, to) {
|
|
234
|
+
const index = order.findIndex((n) => n.toLowerCase() === from.toLowerCase());
|
|
235
|
+
if (index < 0 || !isValidSheetName(to))
|
|
236
|
+
return false;
|
|
237
|
+
if (from.toLowerCase() !== to.toLowerCase() && sheetCells(to))
|
|
238
|
+
return false;
|
|
239
|
+
const cells = sheetCells(from);
|
|
240
|
+
byName.delete(from.toLowerCase());
|
|
241
|
+
byName.set(to.toLowerCase(), cells);
|
|
242
|
+
order[index] = to;
|
|
243
|
+
if (active.toLowerCase() === from.toLowerCase())
|
|
244
|
+
active = to;
|
|
245
|
+
// Every formula and name that pointed at the old name points at the
|
|
246
|
+
// new one, as in Excel; otherwise =Orders!B2 on Summary read #REF!
|
|
247
|
+
// the moment Orders became Sales. The rewrite goes through the parser,
|
|
248
|
+
// so a string literal holding the old name is not touched.
|
|
249
|
+
for (const [, sheet] of byName) {
|
|
250
|
+
for (const line of sheet) {
|
|
251
|
+
for (let c = 0; c < line.length; c += 1) {
|
|
252
|
+
const next = renameSheetReferences(line[c], from, to);
|
|
253
|
+
if (typeof next === 'string')
|
|
254
|
+
line[c] = next;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
for (const entry of names.list()) {
|
|
259
|
+
const next = renameSheetReferences(entry.refersTo, from, to);
|
|
260
|
+
if (typeof next === 'string' && next !== entry.refersTo)
|
|
261
|
+
names.define(entry.name, next);
|
|
262
|
+
}
|
|
263
|
+
values.clear();
|
|
264
|
+
graph.clear();
|
|
265
|
+
return true;
|
|
266
|
+
},
|
|
267
|
+
moveSheet(name, to) {
|
|
268
|
+
const index = order.findIndex((n) => n.toLowerCase() === name.toLowerCase());
|
|
269
|
+
if (index < 0)
|
|
270
|
+
return false;
|
|
271
|
+
const [moved] = order.splice(index, 1);
|
|
272
|
+
order.splice(Math.max(0, Math.min(to, order.length)), 0, moved);
|
|
273
|
+
return true;
|
|
274
|
+
},
|
|
275
|
+
getRaw(sheet, row, col) {
|
|
276
|
+
return sheetCells(sheet)?.[row]?.[col] ?? '';
|
|
277
|
+
},
|
|
278
|
+
setRaw(sheet, row, col, text) {
|
|
279
|
+
const cells = sheetCells(sheet);
|
|
280
|
+
if (!cells || row < 0 || col < 0)
|
|
281
|
+
return;
|
|
282
|
+
while (cells.length <= row)
|
|
283
|
+
cells.push([]);
|
|
284
|
+
const line = cells[row];
|
|
285
|
+
while (line.length <= col)
|
|
286
|
+
line.push('');
|
|
287
|
+
if (line[col] === text)
|
|
288
|
+
return;
|
|
289
|
+
line[col] = text;
|
|
290
|
+
const key = cellKey(sheet, row, col);
|
|
291
|
+
// A cell that is no longer a formula reads nothing.
|
|
292
|
+
if (!text.trim().startsWith('='))
|
|
293
|
+
graph.setPrecedents(key, null);
|
|
294
|
+
reportRecalc(invalidate([key]));
|
|
295
|
+
},
|
|
296
|
+
getValue(sheet, row, col) {
|
|
297
|
+
return compute(sheet, row, col);
|
|
298
|
+
},
|
|
299
|
+
evaluateText(sheet, text, override) {
|
|
300
|
+
const t = text.trim();
|
|
301
|
+
if (t === '')
|
|
302
|
+
return '';
|
|
303
|
+
if (t.startsWith('=')) {
|
|
304
|
+
if (!sheetCells(sheet))
|
|
305
|
+
return { error: '#REF!' };
|
|
306
|
+
const ast = parseCached(t);
|
|
307
|
+
return ast ? evaluate(ast, contextFor(sheet, override)) : { error: '#PARSE!' };
|
|
308
|
+
}
|
|
309
|
+
return literal(t);
|
|
310
|
+
},
|
|
311
|
+
evaluateRange(sheet, text) {
|
|
312
|
+
const t = text.trim();
|
|
313
|
+
if (!t.startsWith('=') || !sheetCells(sheet))
|
|
314
|
+
return null;
|
|
315
|
+
const ast = parseCached(t);
|
|
316
|
+
return ast ? rangeValues(ast, contextFor(sheet)) : null;
|
|
317
|
+
},
|
|
318
|
+
snapshot(sheet) {
|
|
319
|
+
const rows = rowCount(sheet);
|
|
320
|
+
const cols = colCount(sheet);
|
|
321
|
+
const out = [];
|
|
322
|
+
for (let r = 0; r < rows; r += 1) {
|
|
323
|
+
const line = [];
|
|
324
|
+
for (let c = 0; c < cols; c += 1)
|
|
325
|
+
line.push(compute(sheet, r, c));
|
|
326
|
+
out.push(line);
|
|
327
|
+
}
|
|
328
|
+
return out;
|
|
329
|
+
},
|
|
330
|
+
applyStructuralEdit(sheet, edit) {
|
|
331
|
+
const target = sheetCells(sheet);
|
|
332
|
+
if (!target || edit.count <= 0)
|
|
333
|
+
return;
|
|
334
|
+
// Rewrite every formula in the WORKBOOK, not just this sheet: another
|
|
335
|
+
// sheet may hold =Orders!A5, and inserting a row in Orders has to move
|
|
336
|
+
// it exactly as if it were local.
|
|
337
|
+
for (const other of order) {
|
|
338
|
+
const cells = sheetCells(other);
|
|
339
|
+
for (let r = 0; r < cells.length; r += 1) {
|
|
340
|
+
const line = cells[r];
|
|
341
|
+
for (let c = 0; c < line.length; c += 1) {
|
|
342
|
+
const text = line[c] ?? '';
|
|
343
|
+
if (!text.startsWith('='))
|
|
344
|
+
continue;
|
|
345
|
+
// Only references INTO this sheet move: an unqualified one on
|
|
346
|
+
// another sheet belongs to that sheet's geometry, which did not
|
|
347
|
+
// change, and a reference on THIS sheet that names another sheet
|
|
348
|
+
// belongs to that one. The scope tells the rewriter both.
|
|
349
|
+
if (other !== sheet && !text.includes(`${sheet}!`) && !text.includes(`'${sheet}'!`))
|
|
350
|
+
continue;
|
|
351
|
+
const next = fixupReferences(text, edit, { sheet, self: other });
|
|
352
|
+
if (typeof next === 'string')
|
|
353
|
+
line[c] = next;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
// A name has no home sheet, so only one that names this sheet moves.
|
|
358
|
+
// NetSales = Orders!$I$2:$I$25 must not shift because a column went
|
|
359
|
+
// into Summary.
|
|
360
|
+
for (const entry of names.list()) {
|
|
361
|
+
const next = fixupReferences(entry.refersTo, edit, { sheet, self: null });
|
|
362
|
+
if (typeof next === 'string' && next !== entry.refersTo)
|
|
363
|
+
names.define(entry.name, next);
|
|
364
|
+
}
|
|
365
|
+
const blankRow = () => [];
|
|
366
|
+
if (edit.kind === 'insertRows') {
|
|
367
|
+
target.splice(edit.at, 0, ...Array.from({ length: edit.count }, blankRow));
|
|
368
|
+
}
|
|
369
|
+
else if (edit.kind === 'deleteRows') {
|
|
370
|
+
target.splice(edit.at, edit.count);
|
|
371
|
+
}
|
|
372
|
+
else if (edit.kind === 'insertCols') {
|
|
373
|
+
for (const line of target) {
|
|
374
|
+
if (line.length >= edit.at)
|
|
375
|
+
line.splice(edit.at, 0, ...Array(edit.count).fill(''));
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
for (const line of target) {
|
|
380
|
+
if (line.length > edit.at)
|
|
381
|
+
line.splice(edit.at, edit.count);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
values.clear();
|
|
385
|
+
graph.clear();
|
|
386
|
+
astCache.clear();
|
|
387
|
+
},
|
|
388
|
+
recalculate() {
|
|
389
|
+
values.clear();
|
|
390
|
+
graph.clear();
|
|
391
|
+
},
|
|
392
|
+
rowCount,
|
|
393
|
+
colCount,
|
|
394
|
+
serialize() {
|
|
395
|
+
return {
|
|
396
|
+
sheets: order.map((name) => ({ name, cells: sheetCells(name).map((r) => [...r]) })),
|
|
397
|
+
active,
|
|
398
|
+
names: names.serialize(),
|
|
399
|
+
};
|
|
400
|
+
},
|
|
401
|
+
};
|
|
402
|
+
for (const sheet of initial.length > 0 ? initial : [{ name: 'Sheet1', cells: [] }]) {
|
|
403
|
+
byName.set(sheet.name.toLowerCase(), sheet.cells.map((r) => [...r]));
|
|
404
|
+
order.push(sheet.name);
|
|
405
|
+
}
|
|
406
|
+
active = order[0] ?? '';
|
|
407
|
+
return workbook;
|
|
408
|
+
}
|
|
409
|
+
export { isError };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the Excel keymap. Idempotent - safe to call from every component
|
|
3
|
+
* that wants it, or once at app start. Also invoked by {@link installEnterprise}
|
|
4
|
+
* so wiring the Pro API turns the shortcuts on too.
|
|
5
|
+
*/
|
|
6
|
+
export declare function enableSheet(): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Excel keyboard commands (Pro). `enableSheet()` registers the sheet keymap
|
|
3
|
+
* with the grid, so Ctrl+Arrow jumps to the edge of a data region, Ctrl+D and
|
|
4
|
+
* Ctrl+R fill, Ctrl+A selects the current region, and the rest of the Excel
|
|
5
|
+
* muscle memory works on any `<SvGrid>` with cell selection on.
|
|
6
|
+
*
|
|
7
|
+
* The grid ships the `registerGridShortcuts` seam for free and interprets a key
|
|
8
|
+
* itself only when nothing claims it; the commands are here. Soft-gated like
|
|
9
|
+
* the rest of Enterprise: it works without a license key but the grid shows the
|
|
10
|
+
* unlicensed watermark and a one-time console nudge.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { setLicenseKey, enableSheet } from '@svgrid/enterprise'
|
|
14
|
+
* setLicenseKey('YOUR-KEY')
|
|
15
|
+
* enableSheet()
|
|
16
|
+
* // then: <SvGrid {data} {columns} enableCellSelection />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
// The Svelte-free subpath: importing the barrel would drag SvGrid.svelte into
|
|
20
|
+
// this module's chunk, and into any unit test that touches it.
|
|
21
|
+
import { registerGridShortcuts } from '@svgrid/grid/shortcuts';
|
|
22
|
+
import { isLicenseKeySet } from './license.js';
|
|
23
|
+
import { emitUnlicensedNudge } from './watermark.js';
|
|
24
|
+
import { handleSheetKey } from './sheet/shortcuts.js';
|
|
25
|
+
import { setFillTranslator } from './sheet/commands.js';
|
|
26
|
+
import { translateFormula } from './sheet/refs.js';
|
|
27
|
+
let enabled = false;
|
|
28
|
+
/**
|
|
29
|
+
* Register the Excel keymap. Idempotent - safe to call from every component
|
|
30
|
+
* that wants it, or once at app start. Also invoked by {@link installEnterprise}
|
|
31
|
+
* so wiring the Pro API turns the shortcuts on too.
|
|
32
|
+
*/
|
|
33
|
+
export function enableSheet() {
|
|
34
|
+
if (enabled)
|
|
35
|
+
return;
|
|
36
|
+
enabled = true;
|
|
37
|
+
// Priority 100 so the sheet keymap sits above anything an app registers of
|
|
38
|
+
// its own without asking for a priority.
|
|
39
|
+
registerGridShortcuts(handleSheetKey, { id: 'svgrid-sheet', priority: 100 });
|
|
40
|
+
// Teach fill about formulas. Without this Ctrl+D copies '=A1*2' down as
|
|
41
|
+
// literal text into every row; with it the relative half of each reference
|
|
42
|
+
// shifts and the absolute half does not, the way Excel fills.
|
|
43
|
+
setFillTranslator((value, delta) => translateFormula(value, delta.rows, delta.cols));
|
|
44
|
+
if (!isLicenseKeySet())
|
|
45
|
+
emitUnlicensedNudge();
|
|
46
|
+
}
|
|
@@ -7021,11 +7021,34 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7021
7021
|
"description": "Prepend a header row (the column labels) to copied cell ranges, so pasting into Excel / Sheets includes the headers. Applies per copied range.",
|
|
7022
7022
|
"group": "common"
|
|
7023
7023
|
},
|
|
7024
|
+
{
|
|
7025
|
+
"key": "processCellForFill",
|
|
7026
|
+
"label": "Process Cell For Fill",
|
|
7027
|
+
"type": "json",
|
|
7028
|
+
"description": "Decide what the fill handle writes into one cell, ahead of the grid's own pattern rules (series, weekdays, \"Item 1\"). Receives the source cell's value and how far the target sits from it; return the value to write, or `undefined` to let the pattern decide. A spreadsheet uses it to move a formula's references by the distance filled, which the pattern rules would otherwise mangle (\"=A1+B1\" reads as \"Item 1\").",
|
|
7029
|
+
"code": true,
|
|
7030
|
+
"group": "advanced"
|
|
7031
|
+
},
|
|
7024
7032
|
{
|
|
7025
7033
|
"key": "processCellForClipboard",
|
|
7026
7034
|
"label": "Process Cell For Clipboard",
|
|
7027
7035
|
"type": "json",
|
|
7028
|
-
"
|
|
7036
|
+
"code": true,
|
|
7037
|
+
"group": "advanced"
|
|
7038
|
+
},
|
|
7039
|
+
{
|
|
7040
|
+
"key": "clipboardHtml",
|
|
7041
|
+
"label": "Clipboard Html",
|
|
7042
|
+
"type": "json",
|
|
7043
|
+
"description": "An HTML rendering of what Ctrl+C copies, written to the clipboard as `text/html` beside the TSV. Excel and Google Sheets read the HTML first, so a table with inline styles pastes into them with its formats, and the same markup can carry what the text cannot (a formula in a `data-` attribute) for a round trip back into a grid that reads it. Called after every cell has been through `processCellForClipboard`, with the rectangles copied and the text about to be written. Return nothing to write text alone. Runs synchronously inside the key press, which is what the clipboard needs.",
|
|
7044
|
+
"code": true,
|
|
7045
|
+
"group": "advanced"
|
|
7046
|
+
},
|
|
7047
|
+
{
|
|
7048
|
+
"key": "processCellFromClipboard",
|
|
7049
|
+
"label": "Process Cell From Clipboard",
|
|
7050
|
+
"type": "json",
|
|
7051
|
+
"description": "Transform each cell on its way IN from the clipboard, before the grid coerces it for the column's editor. Symmetric with `processCellForClipboard`: the pair is what lets a round trip survive. Receives the raw clipboard text for the cell plus where it is landing. Return the value to write, or `undefined` to leave the cell untouched. This is also the seam a feature pack uses to take over a paste entirely: `@svgrid/enterprise`'s paste-special reads the clipboard's `text/html` for formats and formulas and writes through here.",
|
|
7029
7052
|
"code": true,
|
|
7030
7053
|
"group": "advanced"
|
|
7031
7054
|
},
|
|
@@ -7036,6 +7059,13 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7036
7059
|
"description": "Inline cell editing: F2 or double-click opens an editor in the active cell, Enter commits, Esc cancels. Off by default. A column still needs an `editorType` to pick its editor (text, number, date, checkbox, list, ...); without one it gets a plain text editor. `editable` is the shortcut alias and wins over this.",
|
|
7037
7060
|
"group": "common"
|
|
7038
7061
|
},
|
|
7062
|
+
{
|
|
7063
|
+
"key": "editOnSecondClick",
|
|
7064
|
+
"label": "Edit On Second Click",
|
|
7065
|
+
"type": "boolean",
|
|
7066
|
+
"description": "A click on the cell that is already active opens its editor, the way a second click on a selected file name starts renaming it. On by default. A spreadsheet turns it off: Excel edits on double-click or F2 only, and a user clicking the cell they are on to get back to it after a dialog would otherwise find the next shortcut typed into an editor.",
|
|
7067
|
+
"group": "common"
|
|
7068
|
+
},
|
|
7039
7069
|
{
|
|
7040
7070
|
"key": "fullRowEditing",
|
|
7041
7071
|
"label": "Full Row Editing",
|
|
@@ -7244,6 +7274,20 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7244
7274
|
"description": "Rows to pin to the TOP of the grid - rendered above the regular rows and sticky-positioned so they stay visible while the user scrolls. Typical use: a \"totals\" or \"headline\" row that should always be in view. Rows are read-only (no inline editing, no row-selection checkbox). They share the column schema with the main grid; field/format/cell/cellClass all apply.",
|
|
7245
7275
|
"group": "common"
|
|
7246
7276
|
},
|
|
7277
|
+
{
|
|
7278
|
+
"key": "frozenRows",
|
|
7279
|
+
"label": "Frozen Rows",
|
|
7280
|
+
"type": "number",
|
|
7281
|
+
"description": "Freeze the first N rows: they stay under the header while the body scrolls, and unlike `pinnedTopRows` they are the grid's own rows, still editable, selectable and numbered as rows 1..N. Excel's Freeze Panes, for the row half; the column half is `columnPinning`. Under `virtualization` the frozen rows are always rendered and the window skips them.",
|
|
7282
|
+
"group": "common"
|
|
7283
|
+
},
|
|
7284
|
+
{
|
|
7285
|
+
"key": "mergedCells",
|
|
7286
|
+
"label": "Merged Cells",
|
|
7287
|
+
"type": "json",
|
|
7288
|
+
"description": "Merged cells: rectangles drawn as one cell, a spreadsheet's Merge & Center. Each entry is the top-left cell (display indices) and how many rows and columns it covers. The origin's td takes the span and shows the origin's value; the covered cells are not drawn, a selection grows to whole merges, the active cell inside a merge is its origin, and the arrow keys step over a merge as one cell. A merge that crosses the frozen boundary or the rendered window is drawn in parts, one per band. The grid does not write into covered cells on its own; a consumer that merges cells keeps them empty or marks them read-only through the column's `editable`.",
|
|
7289
|
+
"group": "common"
|
|
7290
|
+
},
|
|
7247
7291
|
{
|
|
7248
7292
|
"key": "pinnedBottomRows",
|
|
7249
7293
|
"label": "Pinned Bottom Rows",
|
|
@@ -7320,6 +7364,24 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7320
7364
|
"prop": "onPaginationChange",
|
|
7321
7365
|
"description": "Fires when the user changes page or page size while `externalPagination` is on. Fetch that page and update `data` / `rowCount` / `pageIndex`."
|
|
7322
7366
|
},
|
|
7367
|
+
{
|
|
7368
|
+
"key": "columnResize",
|
|
7369
|
+
"label": "Column Resize",
|
|
7370
|
+
"prop": "onColumnResize",
|
|
7371
|
+
"description": "The user dragged a column's edge (or double-clicked it to autosize). Programmatic `api.setColumnWidth` does not fire it."
|
|
7372
|
+
},
|
|
7373
|
+
{
|
|
7374
|
+
"key": "rowResize",
|
|
7375
|
+
"label": "Row Resize",
|
|
7376
|
+
"prop": "onRowResize",
|
|
7377
|
+
"description": "The user dragged a row's edge, or double-clicked it: `height` is then `null`, the row back at its declared height. Programmatic `api.setRowHeight` does not fire it."
|
|
7378
|
+
},
|
|
7379
|
+
{
|
|
7380
|
+
"key": "pasteClipboard",
|
|
7381
|
+
"label": "Paste Clipboard",
|
|
7382
|
+
"prop": "onPasteClipboard",
|
|
7383
|
+
"description": "Take over a paste. Receives the clipboard's `text/plain` and, when the source put one there, its `text/html` (Excel's carries formats and formulas; a grid's own `clipboardHtml` carries whatever it chose to). Return `true` to say the paste was applied; anything else lets the grid paste the text as it always has. Runs inside one history group, so every `setCellValue` and `recordUndo` the handler makes is one Ctrl+Z. With this set, Ctrl+V lets the browser's own `paste` event through (that is where the unsanitised HTML is), and the async Clipboard API is the fallback for a browser that does not deliver it. `source` says which path the payload came by."
|
|
7384
|
+
},
|
|
7323
7385
|
{
|
|
7324
7386
|
"key": "apiReady",
|
|
7325
7387
|
"label": "Api Ready",
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "commercial",
|
|
5
5
|
"url": "https://svgrid.com/pricing"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.0.
|
|
7
|
+
"version": "3.0.2",
|
|
8
8
|
"description": "Enterprise feature pack for SvGrid: Excel (xlsx) and PDF export, Excel/CSV/JSON import, pivot tables with a drag-and-drop designer, paginated print, Kanban board and scheduler renderers, no-code alerts and batch editing. CSV, TSV and JSON export are already free in @svgrid/grid. Requires a paid license key.",
|
|
9
9
|
"license": "SEE LICENSE IN LICENSE",
|
|
10
10
|
"author": "jQWidgets <sales@jqwidgets.com>",
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
"svelte": "./dist/pivot.js",
|
|
43
43
|
"import": "./dist/pivot.js"
|
|
44
44
|
},
|
|
45
|
+
"./sheet": {
|
|
46
|
+
"types": "./dist/sheet/index.d.ts",
|
|
47
|
+
"svelte": "./dist/sheet/index.js",
|
|
48
|
+
"import": "./dist/sheet/index.js"
|
|
49
|
+
},
|
|
45
50
|
"./license": {
|
|
46
51
|
"types": "./dist/license.d.ts",
|
|
47
52
|
"svelte": "./dist/license.js",
|
|
@@ -73,7 +78,7 @@
|
|
|
73
78
|
"jszip": "^3.10.0",
|
|
74
79
|
"pdfmake": "^0.2.0",
|
|
75
80
|
"svelte": "^5.0.0",
|
|
76
|
-
"@svgrid/grid": "^3.0.
|
|
81
|
+
"@svgrid/grid": "^3.0.4"
|
|
77
82
|
},
|
|
78
83
|
"peerDependenciesMeta": {
|
|
79
84
|
"jszip": {
|
|
@@ -91,7 +96,7 @@
|
|
|
91
96
|
"svelte": "^5.55.5",
|
|
92
97
|
"typescript": "6.0.3",
|
|
93
98
|
"vite": "^8.2.1",
|
|
94
|
-
"@svgrid/grid": "^3.0.
|
|
99
|
+
"@svgrid/grid": "^3.0.4"
|
|
95
100
|
},
|
|
96
101
|
"repository": {
|
|
97
102
|
"type": "git",
|
|
@@ -122,7 +127,7 @@
|
|
|
122
127
|
"test": "vitest run",
|
|
123
128
|
"test:types": "tsc -p tsconfig.json --noEmit",
|
|
124
129
|
"build": "svelte-package --input ./src --output ./dist && node ../../tools/strip-dist-tests.mjs ./dist && node ../../tools/add-dist-extensions.mjs ./dist && node ./scripts/build-cdn.mjs && node ./scripts/build-node.mjs && node ./scripts/build-designer.mjs",
|
|
125
|
-
"build:lib": "svelte-package --input ./src --output ./dist && node ../../tools/strip-dist-tests.mjs ./dist && node ../../tools/add-dist-extensions.mjs ./dist",
|
|
130
|
+
"build:lib": "svelte-package --input ./src --output ./dist && node ../../tools/strip-dist-tests.mjs ./dist && node ../../tools/add-dist-extensions.mjs ./dist && node ./scripts/build-node.mjs",
|
|
126
131
|
"build:cdn": "node ./scripts/build-cdn.mjs",
|
|
127
132
|
"build:node": "node ./scripts/build-node.mjs",
|
|
128
133
|
"build:designer": "node ./scripts/build-designer.mjs",
|