@rowsncolumns/spreadsheet-state 29.1.3 → 29.1.6
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/cjs/api/circular-reference.d.ts +31 -0
- package/dist/cjs/api/circular-reference.d.ts.map +1 -0
- package/dist/cjs/api/circular-reference.js +85 -0
- package/dist/cjs/api/copy-paste.d.ts +6 -0
- package/dist/cjs/api/copy-paste.d.ts.map +1 -1
- package/dist/cjs/api/copy-paste.js +24 -15
- package/dist/cjs/api/datatype.d.ts +2 -0
- package/dist/cjs/api/datatype.d.ts.map +1 -1
- package/dist/cjs/api/datatype.js +50 -27
- package/dist/cjs/api/decimals.d.ts +10 -0
- package/dist/cjs/api/decimals.d.ts.map +1 -1
- package/dist/cjs/api/decimals.js +34 -11
- package/dist/cjs/api/dependency.d.ts +19 -1
- package/dist/cjs/api/dependency.d.ts.map +1 -1
- package/dist/cjs/api/dependency.js +30 -14
- package/dist/cjs/api/filter-condition.d.ts +58 -0
- package/dist/cjs/api/filter-condition.d.ts.map +1 -0
- package/dist/cjs/api/filter-condition.js +157 -0
- package/dist/cjs/api/formula.d.ts.map +1 -1
- package/dist/cjs/api/formula.js +9 -7
- package/dist/cjs/api/image-embed.d.ts +41 -0
- package/dist/cjs/api/image-embed.d.ts.map +1 -0
- package/dist/cjs/api/image-embed.js +55 -0
- package/dist/cjs/api/immer-utils.d.ts.map +1 -1
- package/dist/cjs/api/immer-utils.js +43 -15
- package/dist/cjs/api/named-range-structural.d.ts +29 -3
- package/dist/cjs/api/named-range-structural.d.ts.map +1 -1
- package/dist/cjs/api/named-range-structural.js +36 -11
- package/dist/cjs/api/parse-html.d.ts.map +1 -1
- package/dist/cjs/api/parse-html.js +11 -5
- package/dist/cjs/api/structural-formula-update.d.ts +20 -1
- package/dist/cjs/api/structural-formula-update.d.ts.map +1 -1
- package/dist/cjs/api/structural-formula-update.js +264 -90
- package/dist/cjs/api/structural-guards.d.ts +11 -0
- package/dist/cjs/api/structural-guards.d.ts.map +1 -1
- package/dist/cjs/api/structural-guards.js +45 -1
- package/dist/cjs/api/structural-table-refs.d.ts +15 -2
- package/dist/cjs/api/structural-table-refs.d.ts.map +1 -1
- package/dist/cjs/api/structural-table-refs.js +79 -35
- package/dist/cjs/commands.d.ts +17 -3
- package/dist/cjs/commands.d.ts.map +1 -1
- package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/conditional-format-rule-editor.js +19 -7
- package/dist/cjs/constants.d.ts +4 -1
- package/dist/cjs/constants.d.ts.map +1 -1
- package/dist/cjs/constants.js +4 -0
- package/dist/cjs/helpers/sheet-title.d.ts +2 -1
- package/dist/cjs/helpers/sheet-title.d.ts.map +1 -1
- package/dist/cjs/helpers/sheet-title.js +3 -1
- package/dist/cjs/hooks/use-can-edit-cellrange.d.ts +1 -1
- package/dist/cjs/hooks/use-can-edit-cellrange.d.ts.map +1 -1
- package/dist/cjs/hooks/use-can-edit-cellrange.js +1 -1
- package/dist/cjs/hooks/use-on-calculation-success.d.ts +5 -1
- package/dist/cjs/hooks/use-on-calculation-success.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-calculation-success.js +20 -3
- package/dist/cjs/hooks/use-on-copy.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-copy.js +23 -25
- package/dist/cjs/hooks/use-on-create-sheet.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-create-sheet.js +11 -1
- package/dist/cjs/hooks/use-on-delete.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete.js +15 -3
- package/dist/cjs/hooks/use-on-drag-n-drop.d.ts +5 -0
- package/dist/cjs/hooks/use-on-drag-n-drop.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-drag-n-drop.js +6 -5
- package/dist/cjs/hooks/use-on-filter-table.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-filter-table.js +6 -1
- package/dist/cjs/hooks/use-on-find-replace.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-find-replace.js +111 -23
- package/dist/cjs/hooks/use-on-insert-image.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-insert-image.js +20 -33
- package/dist/cjs/hooks/use-on-paste.d.ts +2 -1
- package/dist/cjs/hooks/use-on-paste.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-paste.js +53 -24
- package/dist/cjs/hooks/use-on-rename-sheet.d.ts +3 -1
- package/dist/cjs/hooks/use-on-rename-sheet.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-rename-sheet.js +19 -9
- package/dist/cjs/hooks/use-on-sort-column.d.ts +7 -1
- package/dist/cjs/hooks/use-on-sort-column.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-sort-column.js +25 -8
- package/dist/cjs/hooks/use-on-sort-range.d.ts +16 -2
- package/dist/cjs/hooks/use-on-sort-range.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-sort-range.js +72 -40
- package/dist/cjs/hooks/use-on-sort-table.d.ts +7 -2
- package/dist/cjs/hooks/use-on-sort-table.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-sort-table.js +25 -4
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts +5 -3
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -1
- package/dist/cjs/hooks/use-spreadsheet-state.js +7 -0
- package/dist/cjs/hooks/utils/sort-rows.d.ts +15 -0
- package/dist/cjs/hooks/utils/sort-rows.d.ts.map +1 -1
- package/dist/cjs/hooks/utils/sort-rows.js +16 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/interface/delete-column.d.ts.map +1 -1
- package/dist/cjs/interface/delete-column.js +254 -101
- package/dist/cjs/interface/delete-row.d.ts.map +1 -1
- package/dist/cjs/interface/delete-row.js +233 -81
- package/dist/cjs/interface/duplicate-sheet.d.ts.map +1 -1
- package/dist/cjs/interface/duplicate-sheet.js +4 -9
- package/dist/cjs/interface/insert-column.d.ts.map +1 -1
- package/dist/cjs/interface/insert-column.js +1 -1
- package/dist/cjs/interface/insert-row.d.ts.map +1 -1
- package/dist/cjs/interface/insert-row.js +1 -1
- package/dist/cjs/interface/new-sheet.d.ts.map +1 -1
- package/dist/cjs/interface/new-sheet.js +6 -13
- package/dist/cjs/sheet-cell.d.ts +9 -0
- package/dist/cjs/sheet-cell.d.ts.map +1 -1
- package/dist/cjs/sheet-cell.js +46 -9
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/api/circular-reference.d.ts +31 -0
- package/dist/esm/api/circular-reference.d.ts.map +1 -0
- package/dist/esm/api/circular-reference.js +55 -0
- package/dist/esm/api/copy-paste.d.ts +6 -0
- package/dist/esm/api/copy-paste.d.ts.map +1 -1
- package/dist/esm/api/copy-paste.js +26 -14
- package/dist/esm/api/datatype.d.ts +2 -0
- package/dist/esm/api/datatype.d.ts.map +1 -1
- package/dist/esm/api/datatype.js +50 -27
- package/dist/esm/api/decimals.d.ts +10 -0
- package/dist/esm/api/decimals.d.ts.map +1 -1
- package/dist/esm/api/decimals.js +31 -10
- package/dist/esm/api/dependency.d.ts +19 -1
- package/dist/esm/api/dependency.d.ts.map +1 -1
- package/dist/esm/api/dependency.js +15 -10
- package/dist/esm/api/filter-condition.d.ts +58 -0
- package/dist/esm/api/filter-condition.d.ts.map +1 -0
- package/dist/esm/api/filter-condition.js +146 -0
- package/dist/esm/api/formula.d.ts.map +1 -1
- package/dist/esm/api/formula.js +9 -7
- package/dist/esm/api/image-embed.d.ts +41 -0
- package/dist/esm/api/image-embed.d.ts.map +1 -0
- package/dist/esm/api/image-embed.js +52 -0
- package/dist/esm/api/immer-utils.d.ts.map +1 -1
- package/dist/esm/api/immer-utils.js +43 -14
- package/dist/esm/api/named-range-structural.d.ts +29 -3
- package/dist/esm/api/named-range-structural.d.ts.map +1 -1
- package/dist/esm/api/named-range-structural.js +35 -11
- package/dist/esm/api/parse-html.d.ts.map +1 -1
- package/dist/esm/api/parse-html.js +14 -5
- package/dist/esm/api/structural-formula-update.d.ts +20 -1
- package/dist/esm/api/structural-formula-update.d.ts.map +1 -1
- package/dist/esm/api/structural-formula-update.js +151 -55
- package/dist/esm/api/structural-guards.d.ts +11 -0
- package/dist/esm/api/structural-guards.d.ts.map +1 -1
- package/dist/esm/api/structural-guards.js +31 -0
- package/dist/esm/api/structural-table-refs.d.ts +15 -2
- package/dist/esm/api/structural-table-refs.d.ts.map +1 -1
- package/dist/esm/api/structural-table-refs.js +49 -18
- package/dist/esm/commands.d.ts +17 -3
- package/dist/esm/commands.d.ts.map +1 -1
- package/dist/esm/components/editors/conditional-format-rule-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/conditional-format-rule-editor.js +18 -7
- package/dist/esm/constants.d.ts +4 -1
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +4 -0
- package/dist/esm/helpers/sheet-title.d.ts +2 -1
- package/dist/esm/helpers/sheet-title.d.ts.map +1 -1
- package/dist/esm/helpers/sheet-title.js +3 -1
- package/dist/esm/hooks/use-can-edit-cellrange.d.ts +1 -1
- package/dist/esm/hooks/use-can-edit-cellrange.d.ts.map +1 -1
- package/dist/esm/hooks/use-can-edit-cellrange.js +1 -1
- package/dist/esm/hooks/use-on-calculation-success.d.ts +5 -1
- package/dist/esm/hooks/use-on-calculation-success.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-calculation-success.js +19 -3
- package/dist/esm/hooks/use-on-copy.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-copy.js +17 -17
- package/dist/esm/hooks/use-on-create-sheet.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-create-sheet.js +11 -1
- package/dist/esm/hooks/use-on-delete.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete.js +15 -3
- package/dist/esm/hooks/use-on-drag-n-drop.d.ts +5 -0
- package/dist/esm/hooks/use-on-drag-n-drop.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-drag-n-drop.js +7 -4
- package/dist/esm/hooks/use-on-filter-table.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-filter-table.js +13 -2
- package/dist/esm/hooks/use-on-find-replace.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-find-replace.js +111 -23
- package/dist/esm/hooks/use-on-insert-image.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-insert-image.js +15 -25
- package/dist/esm/hooks/use-on-paste.d.ts +2 -1
- package/dist/esm/hooks/use-on-paste.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-paste.js +46 -15
- package/dist/esm/hooks/use-on-rename-sheet.d.ts +3 -1
- package/dist/esm/hooks/use-on-rename-sheet.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-rename-sheet.js +19 -9
- package/dist/esm/hooks/use-on-sort-column.d.ts +7 -1
- package/dist/esm/hooks/use-on-sort-column.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-sort-column.js +18 -1
- package/dist/esm/hooks/use-on-sort-range.d.ts +16 -2
- package/dist/esm/hooks/use-on-sort-range.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-sort-range.js +30 -3
- package/dist/esm/hooks/use-on-sort-table.d.ts +7 -2
- package/dist/esm/hooks/use-on-sort-table.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-sort-table.js +25 -4
- package/dist/esm/hooks/use-spreadsheet-state.d.ts +5 -3
- package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -1
- package/dist/esm/hooks/use-spreadsheet-state.js +7 -0
- package/dist/esm/hooks/utils/sort-rows.d.ts +15 -0
- package/dist/esm/hooks/utils/sort-rows.d.ts.map +1 -1
- package/dist/esm/hooks/utils/sort-rows.js +15 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/interface/delete-column.d.ts.map +1 -1
- package/dist/esm/interface/delete-column.js +111 -80
- package/dist/esm/interface/delete-row.d.ts.map +1 -1
- package/dist/esm/interface/delete-row.js +91 -59
- package/dist/esm/interface/duplicate-sheet.d.ts.map +1 -1
- package/dist/esm/interface/duplicate-sheet.js +4 -9
- package/dist/esm/interface/insert-column.d.ts.map +1 -1
- package/dist/esm/interface/insert-column.js +1 -1
- package/dist/esm/interface/insert-row.d.ts.map +1 -1
- package/dist/esm/interface/insert-row.js +1 -1
- package/dist/esm/interface/new-sheet.d.ts.map +1 -1
- package/dist/esm/interface/new-sheet.js +6 -13
- package/dist/esm/sheet-cell.d.ts +9 -0
- package/dist/esm/sheet-cell.d.ts.map +1 -1
- package/dist/esm/sheet-cell.js +46 -7
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +15 -15
|
@@ -59,6 +59,12 @@ export const cloneCellWithFormatting = (celLData) => {
|
|
|
59
59
|
* first-specific-wins merging rule in `processPrecedentCell`.
|
|
60
60
|
*/
|
|
61
61
|
const isGenericNumberFormatType = (type) => !type || type === "NUMBER" || type === "GENERAL";
|
|
62
|
+
/**
|
|
63
|
+
* Whether a number format carries a real pattern — `General` (or a missing
|
|
64
|
+
* pattern) is "no format", the shape a plain typed number and an
|
|
65
|
+
* unformatted formula result have in Excel.
|
|
66
|
+
*/
|
|
67
|
+
const hasConcretePattern = (format) => !!format?.pattern && format.pattern !== "General";
|
|
62
68
|
/**
|
|
63
69
|
* Date-family types — when the derived (resolved) type is one of these
|
|
64
70
|
* and the precedent's type is also in this set, we preserve the
|
|
@@ -472,6 +478,8 @@ resolvePrecedentNumberFormat) => {
|
|
|
472
478
|
}
|
|
473
479
|
// Priority
|
|
474
480
|
// NUMBER -> PERCENTAGE -> CURRENCY
|
|
481
|
+
// Assigned inside `processPrecedentCell`; the cast keeps TypeScript from
|
|
482
|
+
// narrowing the declaration to `undefined` for the reads below.
|
|
475
483
|
let numFormat = undefined;
|
|
476
484
|
// Expected return type from function
|
|
477
485
|
let expectedOutputType = undefined;
|
|
@@ -590,8 +598,13 @@ resolvePrecedentNumberFormat) => {
|
|
|
590
598
|
// specific format is locked in we don't let a different specific
|
|
591
599
|
// format override it (e.g. PERCENT then CURRENCY → keep PERCENT,
|
|
592
600
|
// matching Excel; previously priority-based merging picked the
|
|
593
|
-
// higher-priority one regardless of position).
|
|
594
|
-
|
|
601
|
+
// higher-priority one regardless of position). Among generics, a
|
|
602
|
+
// pattern-less one (a General cell) never displaces an earlier one
|
|
603
|
+
// that carries a real pattern (`0.0`) — that pattern is the format
|
|
604
|
+
// Excel would inherit.
|
|
605
|
+
if (!numFormat ||
|
|
606
|
+
(isGenericNumberFormatType(numFormat.type) &&
|
|
607
|
+
!(hasConcretePattern(numFormat) && !hasConcretePattern(curNumFormat)))) {
|
|
595
608
|
numFormat = curNumFormat;
|
|
596
609
|
}
|
|
597
610
|
}
|
|
@@ -621,9 +634,10 @@ resolvePrecedentNumberFormat) => {
|
|
|
621
634
|
if (typeof calculatedValue === "number") {
|
|
622
635
|
maxDecimals = Math.max(maxDecimals, calculatedDecimals ?? 0);
|
|
623
636
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
637
|
+
// A result with no formatted precedent is General, as in Excel: `=1/3`
|
|
638
|
+
// displays `0.333333333`, `=PI()` `3.141592654`. Decimals in the computed
|
|
639
|
+
// value are never a reason to manufacture a NUMBER pattern — a General
|
|
640
|
+
// result used to get `0.000` here and paint `0.333`.
|
|
627
641
|
const applyDecimalHeuristic = (format) => {
|
|
628
642
|
// `#` is the implicit integer pattern inferred from plain numeric cells,
|
|
629
643
|
// but it suppresses zero. Formula results should still display a derived
|
|
@@ -650,24 +664,39 @@ resolvePrecedentNumberFormat) => {
|
|
|
650
664
|
};
|
|
651
665
|
}
|
|
652
666
|
}
|
|
653
|
-
//
|
|
654
|
-
|
|
655
|
-
|
|
667
|
+
// NUMBER decimals are only ever adjusted on a pattern a precedent
|
|
668
|
+
// actually carries (`0.0` → `0.00`). A NUMBER type without one — from
|
|
669
|
+
// General precedents, or from the AST reducing CURRENCY ÷ CURRENCY /
|
|
670
|
+
// DATE − DATE to a plain number — stays pattern-less and displays
|
|
671
|
+
// through General (`=D1/D2` → `1.5`, not `1.50`).
|
|
672
|
+
if (format?.type === "NUMBER" &&
|
|
673
|
+
hasConcretePattern(format) &&
|
|
674
|
+
maxDecimals > 0) {
|
|
656
675
|
return {
|
|
657
676
|
...format,
|
|
658
|
-
pattern: changeDecimals(
|
|
677
|
+
pattern: changeDecimals(format.pattern, Math.min(maxDecimals, 3), false),
|
|
659
678
|
};
|
|
660
679
|
}
|
|
661
680
|
return format;
|
|
662
681
|
};
|
|
663
682
|
// Useful for Percentages
|
|
664
683
|
// 20% x 50 => number
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
684
|
+
// The AST runs even when no precedent carried a format: it knows that
|
|
685
|
+
// `=NOW()-TODAY()` is a plain number where the function-return-type scan
|
|
686
|
+
// below would call it DATE_TIME. A General placeholder stands in for the
|
|
687
|
+
// missing precedent format and comes back as a pattern-less NUMBER for a
|
|
688
|
+
// General result. Does not support structured references as of now.
|
|
689
|
+
const astDerivedNumberFormat = getNumberFormatFromFormulaAst(formula, numFormat ?? { type: "NUMBER" }, draft, tokenizer, sheetId, getSheetId, cellXfsRegistry, getDataValidationById, locale);
|
|
690
|
+
if (astDerivedNumberFormat) {
|
|
691
|
+
if (!numFormat &&
|
|
692
|
+
astDerivedNumberFormat.type === "NUMBER" &&
|
|
693
|
+
!astDerivedNumberFormat.pattern) {
|
|
694
|
+
// The placeholder came back unchanged: a General result with no
|
|
695
|
+
// formatted precedent has no format at all (`=1/3`, `=B1` of a plain
|
|
696
|
+
// cell, `=NOW()-TODAY()`).
|
|
697
|
+
return undefined;
|
|
670
698
|
}
|
|
699
|
+
return applyDecimalHeuristic(astDerivedNumberFormat);
|
|
671
700
|
}
|
|
672
701
|
// If we could not derive from function
|
|
673
702
|
if (expectedOutputType === undefined) {
|
|
@@ -2,6 +2,21 @@ import type { NamedRange, SheetPrintSettings } from "@rowsncolumns/spreadsheet";
|
|
|
2
2
|
import type { WritableDraft } from "immer";
|
|
3
3
|
export type StructuralAxis = "row" | "column";
|
|
4
4
|
export type StructuralOp = "insert" | "delete";
|
|
5
|
+
/**
|
|
6
|
+
* The edited axis's extent, so a band can be recognised as UNBOUNDED on it:
|
|
7
|
+
* a whole-column name is modelled as `B1:B<rowCount>` and a whole-row name
|
|
8
|
+
* as `A1:<columnCount>1`, and Excel keeps `$B:$B` / `$1:$1` whole through
|
|
9
|
+
* every insert / delete on that axis.
|
|
10
|
+
*/
|
|
11
|
+
export type StructuralAxisBounds = {
|
|
12
|
+
/** The sheet's row / column count on the edited axis before the edit. */
|
|
13
|
+
length: number;
|
|
14
|
+
/**
|
|
15
|
+
* The hard cap the grid never grows past (`maxRowCount` / `maxColumnCount`);
|
|
16
|
+
* a band's end is clamped to it and a band pushed past it is `#REF!`.
|
|
17
|
+
*/
|
|
18
|
+
max?: number;
|
|
19
|
+
};
|
|
5
20
|
/**
|
|
6
21
|
* The `value` a defined name carries once every cell of its range has been
|
|
7
22
|
* deleted. Excel keeps the name in the Name Manager as `=Sheet1!#REF!` and
|
|
@@ -22,8 +37,15 @@ export declare const isRefErrorNamedRange: (namedRange: Pick<NamedRange, "range"
|
|
|
22
37
|
* - insert at the boundary directly below → unchanged;
|
|
23
38
|
* - delete wholly above → shifts back; delete overlapping → shrinks by the
|
|
24
39
|
* deleted indices inside the band; delete covering the band → `null`.
|
|
40
|
+
*
|
|
41
|
+
* With `bounds`, a band that spans the whole axis (`1..length` — a
|
|
42
|
+
* whole-column `$B:$B` / whole-row `$1:$1` name) is unbounded on it: an
|
|
43
|
+
* insert anywhere keeps its start at 1 and stretches its end with the grid
|
|
44
|
+
* (Excel never turns `$B:$B` into `$B$2:$B$1001`), a delete only shrinks the
|
|
45
|
+
* end with the grid. Ends never pass `bounds.max`; a band whose start would
|
|
46
|
+
* is `null` (`#REF!`), like a cell reference pushed off the sheet.
|
|
25
47
|
*/
|
|
26
|
-
export declare const shiftNamedBand: (start: number, end: number, op: StructuralOp, index: number, count: number) => [number, number] | null;
|
|
48
|
+
export declare const shiftNamedBand: (start: number, end: number, op: StructuralOp, index: number, count: number, bounds?: StructuralAxisBounds) => [number, number] | null;
|
|
27
49
|
export type NamedRangeStructuralUpdate<N extends NamedRange> = {
|
|
28
50
|
/** Names whose range moved, grew, or shrank. */
|
|
29
51
|
changed: N[];
|
|
@@ -41,13 +63,17 @@ export type NamedRangeStructuralUpdate<N extends NamedRange> = {
|
|
|
41
63
|
* A name whose entire range is deleted is NOT dropped: it keeps its entry
|
|
42
64
|
* with `range` cleared and `value: "#REF!"`, so `=SUM(Data)` evaluates to
|
|
43
65
|
* `#REF!` like Excel rather than `#NAME?`.
|
|
66
|
+
*
|
|
67
|
+
* `bounds` (the edited sheet's row / column count on the edited axis) lets a
|
|
68
|
+
* whole-column / whole-row name keep its whole-axis geometry — see
|
|
69
|
+
* {@link shiftNamedBand}.
|
|
44
70
|
*/
|
|
45
|
-
export declare const updateNamedRangesOnStructuralChange: (draft: WritableDraft<NamedRange>[], axis: StructuralAxis, op: StructuralOp, index: number, count: number, sheetId: number) => NamedRangeStructuralUpdate<WritableDraft<NamedRange>>;
|
|
71
|
+
export declare const updateNamedRangesOnStructuralChange: (draft: WritableDraft<NamedRange>[], axis: StructuralAxis, op: StructuralOp, index: number, count: number, sheetId: number, bounds?: StructuralAxisBounds) => NamedRangeStructuralUpdate<WritableDraft<NamedRange>>;
|
|
46
72
|
/**
|
|
47
73
|
* Pure variant of {@link updateNamedRangesOnStructuralChange}: returns the
|
|
48
74
|
* adjusted list (sharing untouched entries) plus the names that changed.
|
|
49
75
|
*/
|
|
50
|
-
export declare const shiftNamedRangesOnStructuralChange: <N extends NamedRange>(namedRanges: readonly N[], axis: StructuralAxis, op: StructuralOp, index: number, count: number, sheetId: number) => {
|
|
76
|
+
export declare const shiftNamedRangesOnStructuralChange: <N extends NamedRange>(namedRanges: readonly N[], axis: StructuralAxis, op: StructuralOp, index: number, count: number, sheetId: number, bounds?: StructuralAxisBounds) => {
|
|
51
77
|
next: N[];
|
|
52
78
|
} & NamedRangeStructuralUpdate<N>;
|
|
53
79
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-range-structural.d.ts","sourceRoot":"","sources":["../../../api/named-range-structural.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAEV,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC9C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,GAC/B,YAAY,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,YACmB,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"named-range-structural.d.ts","sourceRoot":"","sources":["../../../api/named-range-structural.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAEV,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC9C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,GAC/B,YAAY,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,YACmB,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,MAAM,EACb,KAAK,MAAM,EACX,IAAI,YAAY,EAChB,OAAO,MAAM,EACb,OAAO,MAAM,EACb,SAAS,oBAAoB,KAC5B,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IA2BrB,CAAC;AA2BF,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,UAAU,IAAI;IAC7D,gDAAgD;IAChD,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,gEAAgE;IAChE,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mCAAmC,GAC9C,OAAO,aAAa,CAAC,UAAU,CAAC,EAAE,EAClC,MAAM,cAAc,EACpB,IAAI,YAAY,EAChB,OAAO,MAAM,EACb,OAAO,MAAM,EACb,SAAS,MAAM,EACf,SAAS,oBAAoB,KAC5B,0BAA0B,CAAC,aAAa,CAAC,UAAU,CAAC,CAmBtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,GAAI,CAAC,SAAS,UAAU,EACrE,aAAa,SAAS,CAAC,EAAE,EACzB,MAAM,cAAc,EACpB,IAAI,YAAY,EAChB,OAAO,MAAM,EACb,OAAO,MAAM,EACb,SAAS,MAAM,EACf,SAAS,oBAAoB,KAC5B;IAAE,IAAI,EAAE,CAAC,EAAE,CAAA;CAAE,GAAG,0BAA0B,CAAC,CAAC,CAsB9C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,GAChD,eAAe,aAAa,CAAC,kBAAkB,CAAC,EAChD,MAAM,cAAc,EACpB,IAAI,YAAY,EAChB,OAAO,MAAM,EACb,OAAO,MAAM,KACZ,OAiDF,CAAC"}
|
|
@@ -18,20 +18,40 @@ export const isRefErrorNamedRange = (namedRange) => !namedRange.range && namedRa
|
|
|
18
18
|
* - insert at the boundary directly below → unchanged;
|
|
19
19
|
* - delete wholly above → shifts back; delete overlapping → shrinks by the
|
|
20
20
|
* deleted indices inside the band; delete covering the band → `null`.
|
|
21
|
+
*
|
|
22
|
+
* With `bounds`, a band that spans the whole axis (`1..length` — a
|
|
23
|
+
* whole-column `$B:$B` / whole-row `$1:$1` name) is unbounded on it: an
|
|
24
|
+
* insert anywhere keeps its start at 1 and stretches its end with the grid
|
|
25
|
+
* (Excel never turns `$B:$B` into `$B$2:$B$1001`), a delete only shrinks the
|
|
26
|
+
* end with the grid. Ends never pass `bounds.max`; a band whose start would
|
|
27
|
+
* is `null` (`#REF!`), like a cell reference pushed off the sheet.
|
|
21
28
|
*/
|
|
22
|
-
export const shiftNamedBand = (start, end, op, index, count) => {
|
|
29
|
+
export const shiftNamedBand = (start, end, op, index, count, bounds) => {
|
|
23
30
|
if (count <= 0)
|
|
24
31
|
return [start, end];
|
|
25
32
|
const s = Math.max(1, start);
|
|
26
33
|
const e = Math.max(s, end);
|
|
34
|
+
const max = bounds?.max ?? Number.POSITIVE_INFINITY;
|
|
35
|
+
const wholeAxis = bounds != null && s <= 1 && e >= bounds.length;
|
|
36
|
+
const deleteEnd = index + count - 1;
|
|
37
|
+
if (wholeAxis) {
|
|
38
|
+
if (op === "insert")
|
|
39
|
+
return [1, Math.min(e + count, max)];
|
|
40
|
+
if (index > e)
|
|
41
|
+
return [s, e];
|
|
42
|
+
const inside = Math.min(deleteEnd, e) - Math.max(index, 1) + 1;
|
|
43
|
+
return [1, Math.max(1, e - inside)];
|
|
44
|
+
}
|
|
27
45
|
if (op === "insert") {
|
|
28
|
-
if (index <= s)
|
|
29
|
-
|
|
46
|
+
if (index <= s) {
|
|
47
|
+
if (s + count > max)
|
|
48
|
+
return null;
|
|
49
|
+
return [s + count, Math.min(e + count, max)];
|
|
50
|
+
}
|
|
30
51
|
if (index <= e)
|
|
31
|
-
return [s, e + count];
|
|
52
|
+
return [s, Math.min(e + count, max)];
|
|
32
53
|
return [s, e];
|
|
33
54
|
}
|
|
34
|
-
const deleteEnd = index + count - 1;
|
|
35
55
|
if (deleteEnd < s)
|
|
36
56
|
return [s - count, e - count];
|
|
37
57
|
if (index > e)
|
|
@@ -42,11 +62,11 @@ export const shiftNamedBand = (start, end, op, index, count) => {
|
|
|
42
62
|
const inside = Math.min(deleteEnd, e) - Math.max(index, s) + 1;
|
|
43
63
|
return [s - before, e - before - inside];
|
|
44
64
|
};
|
|
45
|
-
const shiftGridRange = (range, axis, op, index, count) => {
|
|
65
|
+
const shiftGridRange = (range, axis, op, index, count, bounds) => {
|
|
46
66
|
const [startKey, endKey] = axis === "row"
|
|
47
67
|
? ["startRowIndex", "endRowIndex"]
|
|
48
68
|
: ["startColumnIndex", "endColumnIndex"];
|
|
49
|
-
const next = shiftNamedBand(range[startKey], range[endKey], op, index, count);
|
|
69
|
+
const next = shiftNamedBand(range[startKey], range[endKey], op, index, count, bounds);
|
|
50
70
|
if (!next)
|
|
51
71
|
return null;
|
|
52
72
|
if (next[0] === range[startKey] && next[1] === range[endKey])
|
|
@@ -64,8 +84,12 @@ const shiftGridRange = (range, axis, op, index, count) => {
|
|
|
64
84
|
* A name whose entire range is deleted is NOT dropped: it keeps its entry
|
|
65
85
|
* with `range` cleared and `value: "#REF!"`, so `=SUM(Data)` evaluates to
|
|
66
86
|
* `#REF!` like Excel rather than `#NAME?`.
|
|
87
|
+
*
|
|
88
|
+
* `bounds` (the edited sheet's row / column count on the edited axis) lets a
|
|
89
|
+
* whole-column / whole-row name keep its whole-axis geometry — see
|
|
90
|
+
* {@link shiftNamedBand}.
|
|
67
91
|
*/
|
|
68
|
-
export const updateNamedRangesOnStructuralChange = (draft, axis, op, index, count, sheetId) => {
|
|
92
|
+
export const updateNamedRangesOnStructuralChange = (draft, axis, op, index, count, sheetId, bounds) => {
|
|
69
93
|
const changed = [];
|
|
70
94
|
const refErrored = [];
|
|
71
95
|
if (count <= 0)
|
|
@@ -74,7 +98,7 @@ export const updateNamedRangesOnStructuralChange = (draft, axis, op, index, coun
|
|
|
74
98
|
const range = namedRange.range;
|
|
75
99
|
if (!range || range.sheetId !== sheetId)
|
|
76
100
|
continue;
|
|
77
|
-
const next = shiftGridRange(range, axis, op, index, count);
|
|
101
|
+
const next = shiftGridRange(range, axis, op, index, count, bounds);
|
|
78
102
|
if (next === range)
|
|
79
103
|
continue;
|
|
80
104
|
if (next === null) {
|
|
@@ -92,14 +116,14 @@ export const updateNamedRangesOnStructuralChange = (draft, axis, op, index, coun
|
|
|
92
116
|
* Pure variant of {@link updateNamedRangesOnStructuralChange}: returns the
|
|
93
117
|
* adjusted list (sharing untouched entries) plus the names that changed.
|
|
94
118
|
*/
|
|
95
|
-
export const shiftNamedRangesOnStructuralChange = (namedRanges, axis, op, index, count, sheetId) => {
|
|
119
|
+
export const shiftNamedRangesOnStructuralChange = (namedRanges, axis, op, index, count, sheetId, bounds) => {
|
|
96
120
|
const changed = [];
|
|
97
121
|
const refErrored = [];
|
|
98
122
|
const next = namedRanges.map((namedRange) => {
|
|
99
123
|
const range = namedRange.range;
|
|
100
124
|
if (!range || range.sheetId !== sheetId || count <= 0)
|
|
101
125
|
return namedRange;
|
|
102
|
-
const shifted = shiftGridRange(range, axis, op, index, count);
|
|
126
|
+
const shifted = shiftGridRange(range, axis, op, index, count, bounds);
|
|
103
127
|
if (shifted === range)
|
|
104
128
|
return namedRange;
|
|
105
129
|
if (shifted === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-html.d.ts","sourceRoot":"","sources":["../../../api/parse-html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EAGV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EAGf,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"parse-html.d.ts","sourceRoot":"","sources":["../../../api/parse-html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EAGV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EAGf,MAAM,2BAA2B,CAAC;AAqBnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAgE1E,eAAO,MAAM,SAAS,GACpB,gBAAgB,MAAM,EACtB,gBAAgB,MAAM,GAAG,SAAS,EAClC,YAAY,aAAa,EACzB,SAAS,MAAM,EACf,qBAAqB,OAAO,EAC5B,qBAAqB,mBAAmB,CAAC,oBAAoB,CAAC,EAC9D,SAAS,MAAM,EACf,eAAe,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM;;;;;;EAuDxC,CAAC;AAmrBF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAuBlE;AA2OD,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,GAAG,SAAS,GAAG,IAAI,uBAY5D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,GAAG,SAAS,GAAG,IAAI,EACnC,SAAS,MAAM,EACf,YAAY,aAAa,EACzB,qBAAqB,mBAAmB,CAAC,oBAAoB,CAAC,wCA2B/D,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,MAAM,OAAO,kFA2CvD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getImageDimensionsFromUrl } from "@rowsncolumns/toolkit";
|
|
2
|
-
import { colorStringToHex, getExtendedValueBool, getExtendedValueError, getExtendedValueFormula, getExtendedValueNumber, getExtendedValueString, htmlElementToRichText, isNil, mountClipboardHtml, normalizeColor, pixelToPoint, pointToPixel, uuid, } from "@rowsncolumns/utils";
|
|
2
|
+
import { colorStringToHex, getExtendedValueBool, getExtendedValueError, getExtendedValueFormula, getExtendedValueNumber, getExtendedValueString, htmlElementToRichText, isAFormula, isNil, isSafeHyperlinkUri, isSafeImageSrc, mountClipboardHtml, normalizeColor, pixelToPoint, pointToPixel, uuid, } from "@rowsncolumns/utils";
|
|
3
3
|
import { defaultCellCoords, SheetCell } from "../sheet-cell";
|
|
4
4
|
const BLOCK_TAGS = new Set([
|
|
5
5
|
"p",
|
|
@@ -56,6 +56,9 @@ export const parseHtml = async (clipboardValue, plainTextValue, activeCell, shee
|
|
|
56
56
|
rowStrings: [],
|
|
57
57
|
};
|
|
58
58
|
if (clipboardValue?.trim()) {
|
|
59
|
+
// A consumer's `sanitizeHtml` runs first and can only tighten the payload:
|
|
60
|
+
// `mountClipboardHtml` always applies the built-in sanitizer afterwards
|
|
61
|
+
// (scripts, handlers, frames, unsafe URLs) before anything reaches the DOM.
|
|
59
62
|
const safeHtml = sanitizeHtml ? sanitizeHtml(clipboardValue) : clipboardValue;
|
|
60
63
|
const { root, cleanup } = mountClipboardHtml(safeHtml);
|
|
61
64
|
try {
|
|
@@ -471,7 +474,7 @@ const tryHandleImageElement = async (element, context) => {
|
|
|
471
474
|
return false;
|
|
472
475
|
}
|
|
473
476
|
const imageUrl = image.getAttribute("src");
|
|
474
|
-
if (!imageUrl) {
|
|
477
|
+
if (!imageUrl || !isSafeImageSrc(imageUrl)) {
|
|
475
478
|
return false;
|
|
476
479
|
}
|
|
477
480
|
const text = extractTextContent(element);
|
|
@@ -516,9 +519,13 @@ const applyGoogleSheetsValue = (element, sheetCell) => {
|
|
|
516
519
|
return true;
|
|
517
520
|
}
|
|
518
521
|
}
|
|
522
|
+
// `"1"` is the Google Sheets value type: 2 = string, 3 = number, 4 = boolean. A STRING
|
|
523
|
+
// cell whose text starts with `=` is text in the source sheet (its formula would ride
|
|
524
|
+
// `data-sheets-formula`), so it lands as quote-prefixed text rather than a formula.
|
|
525
|
+
const isStringType = parsed["1"] === 2;
|
|
519
526
|
for (const candidate of candidates) {
|
|
520
527
|
if (typeof candidate === "string" && candidate.length) {
|
|
521
|
-
sheetCell.setUserEnteredValue(candidate);
|
|
528
|
+
sheetCell.setUserEnteredValue(isStringType && isAFormula(candidate) ? `'${candidate}` : candidate);
|
|
522
529
|
return true;
|
|
523
530
|
}
|
|
524
531
|
}
|
|
@@ -558,7 +565,9 @@ const applyExcelValue = (element, sheetCell) => {
|
|
|
558
565
|
sheetCell.setUserEnteredValue(excelValue === "1" || excelValue === "TRUE");
|
|
559
566
|
return true;
|
|
560
567
|
}
|
|
561
|
-
|
|
568
|
+
// A string-typed (`data-t="s"`) cell whose text starts with `=` is text in the source
|
|
569
|
+
// (a formula rides `data-formula`) — keep it text via the quote prefix.
|
|
570
|
+
sheetCell.setUserEnteredValue(excelType === "s" && isAFormula(excelValue) ? `'${excelValue}` : excelValue);
|
|
562
571
|
return true;
|
|
563
572
|
};
|
|
564
573
|
const excelSerialToDate = (serial) => {
|
|
@@ -574,7 +583,7 @@ const excelSerialToDate = (serial) => {
|
|
|
574
583
|
};
|
|
575
584
|
const applyAnchorValue = (element, sheetCell) => {
|
|
576
585
|
const href = element.getAttribute("href");
|
|
577
|
-
if (!href) {
|
|
586
|
+
if (!href || !isSafeHyperlinkUri(href)) {
|
|
578
587
|
return false;
|
|
579
588
|
}
|
|
580
589
|
const title = extractTextContent(element) || href;
|
|
@@ -14,11 +14,20 @@ export type StructuralFormulaUpdateParams<T extends CellData> = {
|
|
|
14
14
|
sheetId: number;
|
|
15
15
|
/**
|
|
16
16
|
* For insert: the index at which rows/columns are being inserted.
|
|
17
|
-
* For delete: the smallest
|
|
17
|
+
* For delete: the smallest deleted index.
|
|
18
18
|
*/
|
|
19
19
|
referenceIndex: number;
|
|
20
20
|
/** Number of rows/columns being inserted or deleted. */
|
|
21
21
|
count: number;
|
|
22
|
+
/**
|
|
23
|
+
* Delete only: the exact deleted indexes (any order) when the selection is
|
|
24
|
+
* NOT one contiguous band — Ctrl-selected rows 2 and 4. Excel shifts every
|
|
25
|
+
* reference by the number of deleted lines BEFORE it and breaks references
|
|
26
|
+
* INTO a deleted line; treating the selection as the band 2:4 would break
|
|
27
|
+
* `=A3` and slide `=A4` onto the wrong cell. Defaults to the contiguous band
|
|
28
|
+
* `referenceIndex .. referenceIndex + count - 1`.
|
|
29
|
+
*/
|
|
30
|
+
indexes?: number[];
|
|
22
31
|
rowCount: number;
|
|
23
32
|
columnCount: number;
|
|
24
33
|
getDependents: ReturnType<typeof useCalculation>["getDependents"];
|
|
@@ -71,5 +80,15 @@ export type StructuralFormulaUpdateParams<T extends CellData> = {
|
|
|
71
80
|
* and 3 don't double-process a cell.
|
|
72
81
|
*/
|
|
73
82
|
export declare const updateFormulasForStructuralChange: <T extends CellData>(params: StructuralFormulaUpdateParams<T>) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The maximal contiguous runs of `indexes` (any order, duplicates ignored),
|
|
85
|
+
* ascending — the bands of a Ctrl-selected delete (rows 2 and 4 → two runs).
|
|
86
|
+
* Shared by `deleteRow` / `deleteColumn`, which apply every band-shaped update
|
|
87
|
+
* once per run.
|
|
88
|
+
*/
|
|
89
|
+
export declare const contiguousRuns: (indexes: number[]) => Array<{
|
|
90
|
+
start: number;
|
|
91
|
+
count: number;
|
|
92
|
+
}>;
|
|
74
93
|
export {};
|
|
75
94
|
//# sourceMappingURL=structural-formula-update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structural-formula-update.d.ts","sourceRoot":"","sources":["../../../api/structural-formula-update.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAK1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"structural-formula-update.d.ts","sourceRoot":"","sources":["../../../api/structural-formula-update.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAK1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAcrD,KAAK,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAC;AACvC,KAAK,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExC,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,QAAQ,IAAI;IAC9D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,YAAY,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IAEpB,aAAa,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,eAAe,CAAC,CAAC;IAClE;;;;OAIG;IACH,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,eAAe,CAAC,CAAC;IACnE;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,UAAU,CAC/B,OAAO,cAAc,CACtB,CAAC,sBAAsB,CAAC,CAAC;IAC1B,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,kBAAkB,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC7E,qBAAqB,CAAC,EAAE,UAAU,CAChC,OAAO,cAAc,CACtB,CAAC,uBAAuB,CAAC,CAAC;IAE3B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAE/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,iCAAiC,GAAI,CAAC,SAAS,QAAQ,EAClE,QAAQ,6BAA6B,CAAC,CAAC,CAAC,SAybzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,MAAM,EAAE,KAChB,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAYxC,CAAC"}
|