@rowsncolumns/spreadsheet 10.6.0 → 10.6.4
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/cf-data-bar.d.ts +73 -0
- package/dist/cjs/api/cf-data-bar.d.ts.map +1 -0
- package/dist/cjs/api/cf-data-bar.js +182 -0
- package/dist/cjs/api/cf-icons.d.ts +73 -0
- package/dist/cjs/api/cf-icons.d.ts.map +1 -0
- package/dist/cjs/api/cf-icons.js +322 -0
- package/dist/cjs/api/cf-overlays.d.ts +89 -3
- package/dist/cjs/api/cf-overlays.d.ts.map +1 -1
- package/dist/cjs/api/cf-overlays.js +256 -80
- package/dist/cjs/api/cf-priority.d.ts +34 -0
- package/dist/cjs/api/cf-priority.d.ts.map +1 -0
- package/dist/cjs/api/cf-priority.js +94 -0
- package/dist/cjs/api/heatmap.d.ts +7 -1
- package/dist/cjs/api/heatmap.d.ts.map +1 -1
- package/dist/cjs/api/heatmap.js +27 -11
- package/dist/cjs/api/selections.d.ts +2 -2
- package/dist/cjs/api/validation.d.ts +6 -0
- package/dist/cjs/api/validation.d.ts.map +1 -1
- package/dist/cjs/api/validation.js +10 -1
- package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/cjs/components/canvas-grid/index.js +194 -51
- package/dist/cjs/components/canvas-grid/overflow.d.ts +37 -0
- package/dist/cjs/components/canvas-grid/overflow.d.ts.map +1 -0
- package/dist/cjs/components/canvas-grid/overflow.js +49 -0
- package/dist/cjs/components/canvas-grid/page-breaks.d.ts +15 -0
- package/dist/cjs/components/canvas-grid/page-breaks.d.ts.map +1 -0
- package/dist/cjs/components/canvas-grid/page-breaks.js +77 -0
- package/dist/cjs/components/canvas-grid/typings.d.ts +25 -0
- package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.d.ts +58 -1
- package/dist/cjs/components/cell/alignment.d.ts.map +1 -1
- package/dist/cjs/components/cell/alignment.js +144 -1
- package/dist/cjs/components/cell/cell-background.d.ts +2 -0
- package/dist/cjs/components/cell/cell-background.d.ts.map +1 -1
- package/dist/cjs/components/cell/cell-background.js +5 -6
- package/dist/cjs/components/cell/cell-backgrounds.d.ts.map +1 -1
- package/dist/cjs/components/cell/cell-backgrounds.js +5 -1
- package/dist/cjs/components/cell/cell-text-runs.js +1 -1
- package/dist/cjs/components/cell/index.d.ts.map +1 -1
- package/dist/cjs/components/cell/index.js +378 -37
- package/dist/cjs/components/cell/number-format-layout.d.ts +35 -0
- package/dist/cjs/components/cell/number-format-layout.d.ts.map +1 -0
- package/dist/cjs/components/cell/number-format-layout.js +106 -0
- package/dist/cjs/components/cell/typings.d.ts +22 -0
- package/dist/cjs/components/cell/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell-editor/index.js +2 -2
- package/dist/cjs/components/cell-filter/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-filter/index.js +3 -3
- package/dist/cjs/components/cell-overlay/index.d.ts +20 -0
- package/dist/cjs/components/cell-overlay/index.d.ts.map +1 -1
- package/dist/cjs/components/cell-overlay/index.js +155 -28
- package/dist/cjs/components/cf-icon-preview/index.d.ts +16 -0
- package/dist/cjs/components/cf-icon-preview/index.d.ts.map +1 -0
- package/dist/cjs/components/cf-icon-preview/index.js +48 -0
- package/dist/cjs/components/embeds/embed-component.d.ts.map +1 -1
- package/dist/cjs/components/embeds/embed-component.js +3 -2
- package/dist/cjs/components/hidden-markers/index.d.ts.map +1 -1
- package/dist/cjs/components/hidden-markers/index.js +8 -7
- package/dist/cjs/components/hidden-markers/style.d.ts +7 -0
- package/dist/cjs/components/hidden-markers/style.d.ts.map +1 -1
- package/dist/cjs/components/hidden-markers/style.js +13 -2
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts +67 -0
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts.map +1 -0
- package/dist/cjs/components/protect-sheet-dialog/index.js +196 -0
- package/dist/cjs/components/toolbar/types.d.ts +1 -1
- package/dist/cjs/components/toolbar/types.d.ts.map +1 -1
- package/dist/cjs/config.d.ts +13 -1
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/config.js +15 -3
- package/dist/cjs/helpers.d.ts +10 -5
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +43 -31
- package/dist/cjs/hooks/use-border-styles.d.ts.map +1 -1
- package/dist/cjs/hooks/use-border-styles.js +5 -28
- package/dist/cjs/hooks/use-cell-renderer.d.ts +35 -3
- package/dist/cjs/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/cjs/hooks/use-cell-renderer.js +85 -47
- package/dist/cjs/hooks/use-conditional-formatting.d.ts +13 -1
- package/dist/cjs/hooks/use-conditional-formatting.d.ts.map +1 -1
- package/dist/cjs/hooks/use-conditional-formatting.js +281 -230
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/release-date.js +1 -1
- package/dist/cjs/themes.d.ts +8 -0
- package/dist/cjs/themes.d.ts.map +1 -1
- package/dist/cjs/themes.js +21 -3
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +81 -4
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/api/cf-data-bar.d.ts +73 -0
- package/dist/esm/api/cf-data-bar.d.ts.map +1 -0
- package/dist/esm/api/cf-data-bar.js +178 -0
- package/dist/esm/api/cf-icons.d.ts +73 -0
- package/dist/esm/api/cf-icons.d.ts.map +1 -0
- package/dist/esm/api/cf-icons.js +306 -0
- package/dist/esm/api/cf-overlays.d.ts +89 -3
- package/dist/esm/api/cf-overlays.d.ts.map +1 -1
- package/dist/esm/api/cf-overlays.js +223 -67
- package/dist/esm/api/cf-priority.d.ts +34 -0
- package/dist/esm/api/cf-priority.d.ts.map +1 -0
- package/dist/esm/api/cf-priority.js +61 -0
- package/dist/esm/api/heatmap.d.ts +7 -1
- package/dist/esm/api/heatmap.d.ts.map +1 -1
- package/dist/esm/api/heatmap.js +24 -9
- package/dist/esm/api/selections.d.ts +2 -2
- package/dist/esm/api/validation.d.ts +6 -0
- package/dist/esm/api/validation.d.ts.map +1 -1
- package/dist/esm/api/validation.js +6 -0
- package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/esm/components/canvas-grid/index.js +163 -47
- package/dist/esm/components/canvas-grid/overflow.d.ts +37 -0
- package/dist/esm/components/canvas-grid/overflow.d.ts.map +1 -0
- package/dist/esm/components/canvas-grid/overflow.js +39 -0
- package/dist/esm/components/canvas-grid/page-breaks.d.ts +15 -0
- package/dist/esm/components/canvas-grid/page-breaks.d.ts.map +1 -0
- package/dist/esm/components/canvas-grid/page-breaks.js +50 -0
- package/dist/esm/components/canvas-grid/typings.d.ts +25 -0
- package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.d.ts +58 -1
- package/dist/esm/components/cell/alignment.d.ts.map +1 -1
- package/dist/esm/components/cell/alignment.js +110 -1
- package/dist/esm/components/cell/cell-background.d.ts +2 -0
- package/dist/esm/components/cell/cell-background.d.ts.map +1 -1
- package/dist/esm/components/cell/cell-background.js +4 -5
- package/dist/esm/components/cell/cell-backgrounds.d.ts.map +1 -1
- package/dist/esm/components/cell/cell-backgrounds.js +5 -1
- package/dist/esm/components/cell/cell-text-runs.js +2 -2
- package/dist/esm/components/cell/index.d.ts.map +1 -1
- package/dist/esm/components/cell/index.js +339 -39
- package/dist/esm/components/cell/number-format-layout.d.ts +35 -0
- package/dist/esm/components/cell/number-format-layout.d.ts.map +1 -0
- package/dist/esm/components/cell/number-format-layout.js +99 -0
- package/dist/esm/components/cell/typings.d.ts +22 -0
- package/dist/esm/components/cell/typings.d.ts.map +1 -1
- package/dist/esm/components/cell-editor/index.js +2 -2
- package/dist/esm/components/cell-filter/index.d.ts.map +1 -1
- package/dist/esm/components/cell-filter/index.js +4 -4
- package/dist/esm/components/cell-overlay/index.d.ts +20 -0
- package/dist/esm/components/cell-overlay/index.d.ts.map +1 -1
- package/dist/esm/components/cell-overlay/index.js +111 -25
- package/dist/esm/components/cf-icon-preview/index.d.ts +16 -0
- package/dist/esm/components/cf-icon-preview/index.d.ts.map +1 -0
- package/dist/esm/components/cf-icon-preview/index.js +41 -0
- package/dist/esm/components/embeds/embed-component.d.ts.map +1 -1
- package/dist/esm/components/embeds/embed-component.js +4 -3
- package/dist/esm/components/hidden-markers/index.d.ts.map +1 -1
- package/dist/esm/components/hidden-markers/index.js +9 -8
- package/dist/esm/components/hidden-markers/style.d.ts +7 -0
- package/dist/esm/components/hidden-markers/style.d.ts.map +1 -1
- package/dist/esm/components/hidden-markers/style.js +8 -1
- package/dist/esm/components/protect-sheet-dialog/index.d.ts +67 -0
- package/dist/esm/components/protect-sheet-dialog/index.d.ts.map +1 -0
- package/dist/esm/components/protect-sheet-dialog/index.js +154 -0
- package/dist/esm/components/toolbar/types.d.ts +1 -1
- package/dist/esm/components/toolbar/types.d.ts.map +1 -1
- package/dist/esm/config.d.ts +13 -1
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +13 -1
- package/dist/esm/helpers.d.ts +10 -5
- package/dist/esm/helpers.d.ts.map +1 -1
- package/dist/esm/helpers.js +40 -28
- package/dist/esm/hooks/use-border-styles.d.ts.map +1 -1
- package/dist/esm/hooks/use-border-styles.js +5 -26
- package/dist/esm/hooks/use-cell-renderer.d.ts +35 -3
- package/dist/esm/hooks/use-cell-renderer.d.ts.map +1 -1
- package/dist/esm/hooks/use-cell-renderer.js +83 -42
- package/dist/esm/hooks/use-conditional-formatting.d.ts +13 -1
- package/dist/esm/hooks/use-conditional-formatting.d.ts.map +1 -1
- package/dist/esm/hooks/use-conditional-formatting.js +215 -120
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/release-date.js +1 -1
- package/dist/esm/themes.d.ts +8 -0
- package/dist/esm/themes.d.ts.map +1 -1
- package/dist/esm/themes.js +20 -3
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +81 -4
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/spreadsheet.min.css +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SheetProtection } from "../../types";
|
|
3
|
+
/** An OOXML `CT_SheetProtection` action flag the Protect Sheet dialog offers. */
|
|
4
|
+
export type SheetProtectionAllowFlag = "selectLockedCells" | "selectUnlockedCells" | "formatCells" | "formatColumns" | "formatRows" | "insertColumns" | "insertRows" | "insertHyperlinks" | "deleteColumns" | "deleteRows" | "sort" | "autoFilter" | "pivotTables" | "objects" | "scenarios";
|
|
5
|
+
/**
|
|
6
|
+
* Excel's "Allow all users of this worksheet to:" list, in the dialog's order
|
|
7
|
+
* (support.microsoft.com "Protect a worksheet"), with the dialog defaults:
|
|
8
|
+
* only selecting locked and unlocked cells is ticked.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SHEET_PROTECTION_ALLOW_OPTIONS: ReadonlyArray<{
|
|
11
|
+
flag: SheetProtectionAllowFlag;
|
|
12
|
+
label: string;
|
|
13
|
+
defaultAllowed: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
export type SheetProtectionAllowState = Record<SheetProtectionAllowFlag, boolean>;
|
|
16
|
+
/** The dialog's ticked boxes for a sheet's last protection (or the defaults). */
|
|
17
|
+
export declare const sheetProtectionToAllowState: (protection?: SheetProtection | null) => SheetProtectionAllowState;
|
|
18
|
+
/**
|
|
19
|
+
* The ticked boxes → OOXML flags, where `true` PROHIBITS the action. Every
|
|
20
|
+
* flag is written explicitly so the stored protection never depends on a
|
|
21
|
+
* schema default.
|
|
22
|
+
*/
|
|
23
|
+
export declare const allowStateToSheetProtection: (state: SheetProtectionAllowState) => Omit<SheetProtection, "password" | "algorithmName" | "hashValue" | "saltValue" | "spinCount">;
|
|
24
|
+
/** Excel's text when the re-entered password differs. */
|
|
25
|
+
export declare const CONFIRM_PASSWORD_MISMATCH = "Confirmation password is not identical.";
|
|
26
|
+
export type ProtectSheetDialogProps = {
|
|
27
|
+
open: boolean;
|
|
28
|
+
onOpenChange(open: boolean): void;
|
|
29
|
+
/** The sheet's previous protection, to pre-tick its choices. */
|
|
30
|
+
initial?: SheetProtection | null;
|
|
31
|
+
/**
|
|
32
|
+
* OK: the OOXML flags and the plaintext password (empty = none). rnc engine:
|
|
33
|
+
* `onProtectSheet(sheetId, { sheetProtection, password })`, which stores only
|
|
34
|
+
* the password's hash.
|
|
35
|
+
*/
|
|
36
|
+
onConfirm(options: {
|
|
37
|
+
sheetProtection: ReturnType<typeof allowStateToSheetProtection>;
|
|
38
|
+
password?: string;
|
|
39
|
+
}): void;
|
|
40
|
+
};
|
|
41
|
+
/** Review ▸ Protect Sheet (support.microsoft.com "Protect a worksheet"). */
|
|
42
|
+
export declare const ProtectSheetDialog: React.MemoExoticComponent<({ open, onOpenChange, initial, onConfirm }: ProtectSheetDialogProps) => React.JSX.Element>;
|
|
43
|
+
export type ProtectWorkbookDialogProps = {
|
|
44
|
+
open: boolean;
|
|
45
|
+
onOpenChange(open: boolean): void;
|
|
46
|
+
/** OK: rnc engine `onProtectWorkbook({ lockStructure, password })`. */
|
|
47
|
+
onConfirm(options: {
|
|
48
|
+
lockStructure: boolean;
|
|
49
|
+
password?: string;
|
|
50
|
+
}): void;
|
|
51
|
+
};
|
|
52
|
+
/** Review ▸ Protect Workbook (support.microsoft.com "Protect a workbook"). */
|
|
53
|
+
export declare const ProtectWorkbookDialog: React.MemoExoticComponent<({ open, onOpenChange, onConfirm }: ProtectWorkbookDialogProps) => React.JSX.Element>;
|
|
54
|
+
export type UnprotectDialogProps = {
|
|
55
|
+
open: boolean;
|
|
56
|
+
onOpenChange(open: boolean): void;
|
|
57
|
+
/** `"Unprotect Sheet"` or `"Unprotect Workbook"`. */
|
|
58
|
+
title: string;
|
|
59
|
+
/**
|
|
60
|
+
* OK with the typed password. The engine verifies it and refuses a wrong one
|
|
61
|
+
* (`incorrect-password`, shown by the host's rejection dialog).
|
|
62
|
+
*/
|
|
63
|
+
onConfirm(password: string): void;
|
|
64
|
+
};
|
|
65
|
+
/** The password prompt Excel shows for Unprotect Sheet / Unprotect Workbook. */
|
|
66
|
+
export declare const UnprotectDialog: React.MemoExoticComponent<({ open, onOpenChange, title, onConfirm }: UnprotectDialogProps) => React.JSX.Element>;
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/protect-sheet-dialog/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,iFAAiF;AACjF,MAAM,MAAM,wBAAwB,GAChC,mBAAmB,GACnB,qBAAqB,GACrB,aAAa,GACb,eAAe,GACf,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,aAAa,GACb,SAAS,GACT,WAAW,CAAC;AAEhB;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,aAAa,CAAC;IACzD,IAAI,EAAE,wBAAwB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;CACzB,CAgBA,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AAElF,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,GACtC,aAAa,eAAe,GAAG,IAAI,KAClC,yBAOF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,OAAO,yBAAyB,KAC/B,IAAI,CACL,eAAe,EACf,UAAU,GAAG,eAAe,GAAG,WAAW,GAAG,WAAW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ogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import React, { memo, useState } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Excel's "Allow all users of this worksheet to:" list, in the dialog's order
|
|
5
|
+
* (support.microsoft.com "Protect a worksheet"), with the dialog defaults:
|
|
6
|
+
* only selecting locked and unlocked cells is ticked.
|
|
7
|
+
*/
|
|
8
|
+
export const SHEET_PROTECTION_ALLOW_OPTIONS = [
|
|
9
|
+
{ flag: "selectLockedCells", label: "Select locked cells", defaultAllowed: true },
|
|
10
|
+
{ flag: "selectUnlockedCells", label: "Select unlocked cells", defaultAllowed: true },
|
|
11
|
+
{ flag: "formatCells", label: "Format cells", defaultAllowed: false },
|
|
12
|
+
{ flag: "formatColumns", label: "Format columns", defaultAllowed: false },
|
|
13
|
+
{ flag: "formatRows", label: "Format rows", defaultAllowed: false },
|
|
14
|
+
{ flag: "insertColumns", label: "Insert columns", defaultAllowed: false },
|
|
15
|
+
{ flag: "insertRows", label: "Insert rows", defaultAllowed: false },
|
|
16
|
+
{ flag: "insertHyperlinks", label: "Insert hyperlinks", defaultAllowed: false },
|
|
17
|
+
{ flag: "deleteColumns", label: "Delete columns", defaultAllowed: false },
|
|
18
|
+
{ flag: "deleteRows", label: "Delete rows", defaultAllowed: false },
|
|
19
|
+
{ flag: "sort", label: "Sort", defaultAllowed: false },
|
|
20
|
+
{ flag: "autoFilter", label: "Use AutoFilter", defaultAllowed: false },
|
|
21
|
+
{ flag: "pivotTables", label: "Use PivotTable & PivotChart", defaultAllowed: false },
|
|
22
|
+
{ flag: "objects", label: "Edit objects", defaultAllowed: false },
|
|
23
|
+
{ flag: "scenarios", label: "Edit scenarios", defaultAllowed: false },
|
|
24
|
+
];
|
|
25
|
+
/** The dialog's ticked boxes for a sheet's last protection (or the defaults). */
|
|
26
|
+
export const sheetProtectionToAllowState = (protection) => {
|
|
27
|
+
const state = {};
|
|
28
|
+
for (const { flag, defaultAllowed } of SHEET_PROTECTION_ALLOW_OPTIONS) {
|
|
29
|
+
const prohibited = protection?.[flag];
|
|
30
|
+
state[flag] = typeof prohibited === "boolean" ? !prohibited : defaultAllowed;
|
|
31
|
+
}
|
|
32
|
+
return state;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The ticked boxes → OOXML flags, where `true` PROHIBITS the action. Every
|
|
36
|
+
* flag is written explicitly so the stored protection never depends on a
|
|
37
|
+
* schema default.
|
|
38
|
+
*/
|
|
39
|
+
export const allowStateToSheetProtection = (state) => {
|
|
40
|
+
const protection = { sheet: true };
|
|
41
|
+
for (const { flag } of SHEET_PROTECTION_ALLOW_OPTIONS) {
|
|
42
|
+
protection[flag] = !state[flag];
|
|
43
|
+
}
|
|
44
|
+
return protection;
|
|
45
|
+
};
|
|
46
|
+
/** Excel's text when the re-entered password differs. */
|
|
47
|
+
export const CONFIRM_PASSWORD_MISMATCH = "Confirmation password is not identical.";
|
|
48
|
+
/** Password + "Reenter password to proceed", as Excel's Confirm Password step. */
|
|
49
|
+
const PasswordFields = ({ label, password, confirm, mismatch, onPassword, onConfirm, }) => (React.createElement(React.Fragment, null,
|
|
50
|
+
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
51
|
+
label,
|
|
52
|
+
React.createElement(Input, { type: "password", autoComplete: "new-password", value: password, onChange: (e) => onPassword(e.target.value), "data-testid": "protection-password" })),
|
|
53
|
+
password !== "" && (React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
54
|
+
"Reenter password to proceed:",
|
|
55
|
+
React.createElement(Input, { type: "password", autoComplete: "new-password", value: confirm, onChange: (e) => onConfirm(e.target.value), "data-testid": "protection-password-confirm" }))),
|
|
56
|
+
mismatch && (React.createElement("p", { role: "alert", className: "text-xs text-red-600" }, CONFIRM_PASSWORD_MISMATCH))));
|
|
57
|
+
const DialogButtons = ({ onCancel }) => (React.createElement("div", { className: "flex justify-end gap-2" },
|
|
58
|
+
React.createElement(Button, { type: "button", variant: "outline", size: "sm", onClick: onCancel }, "Cancel"),
|
|
59
|
+
React.createElement(Button, { type: "submit", size: "sm" }, "OK")));
|
|
60
|
+
/** Review ▸ Protect Sheet (support.microsoft.com "Protect a worksheet"). */
|
|
61
|
+
export const ProtectSheetDialog = memo(({ open, onOpenChange, initial, onConfirm }) => {
|
|
62
|
+
const [allow, setAllow] = useState(() => sheetProtectionToAllowState(initial));
|
|
63
|
+
const [password, setPassword] = useState("");
|
|
64
|
+
const [confirm, setConfirm] = useState("");
|
|
65
|
+
const [mismatch, setMismatch] = useState(false);
|
|
66
|
+
return (React.createElement(Dialog, { open: open, onOpenChange: onOpenChange, modal: true },
|
|
67
|
+
React.createElement(DialogContent, { className: "w-[360px] max-w-[92vw] pointer-events-auto" },
|
|
68
|
+
React.createElement(DialogTitle, null, "Protect Sheet"),
|
|
69
|
+
React.createElement(DialogCloseButton, null),
|
|
70
|
+
React.createElement(DialogBody, null,
|
|
71
|
+
React.createElement("form", { className: "flex flex-col gap-3", onSubmit: (e) => {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
if (password !== "" && password !== confirm) {
|
|
74
|
+
setMismatch(true);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
onConfirm({
|
|
78
|
+
sheetProtection: allowStateToSheetProtection(allow),
|
|
79
|
+
...(password ? { password } : {}),
|
|
80
|
+
});
|
|
81
|
+
onOpenChange(false);
|
|
82
|
+
} },
|
|
83
|
+
React.createElement(PasswordFields, { label: "Password to unprotect sheet:", password: password, confirm: confirm, mismatch: mismatch, onPassword: (v) => {
|
|
84
|
+
setPassword(v);
|
|
85
|
+
setMismatch(false);
|
|
86
|
+
}, onConfirm: (v) => {
|
|
87
|
+
setConfirm(v);
|
|
88
|
+
setMismatch(false);
|
|
89
|
+
} }),
|
|
90
|
+
React.createElement("fieldset", { className: "flex flex-col gap-1" },
|
|
91
|
+
React.createElement("legend", { className: "mb-1 text-xs font-medium" }, "Allow all users of this worksheet to:"),
|
|
92
|
+
React.createElement("div", { className: "flex max-h-56 flex-col gap-1 overflow-y-auto rounded border p-2" }, SHEET_PROTECTION_ALLOW_OPTIONS.map(({ flag, label }) => (React.createElement("label", { key: flag, className: "flex items-center gap-2 text-xs" },
|
|
93
|
+
React.createElement("input", { type: "checkbox", checked: allow[flag], "data-testid": `protect-allow-${flag}`, onChange: (e) => setAllow((prev) => ({ ...prev, [flag]: e.target.checked })) }),
|
|
94
|
+
label))))),
|
|
95
|
+
React.createElement(Separator, null),
|
|
96
|
+
React.createElement(DialogButtons, { onCancel: () => onOpenChange(false) }))))));
|
|
97
|
+
});
|
|
98
|
+
ProtectSheetDialog.displayName = "ProtectSheetDialog";
|
|
99
|
+
/** Review ▸ Protect Workbook (support.microsoft.com "Protect a workbook"). */
|
|
100
|
+
export const ProtectWorkbookDialog = memo(({ open, onOpenChange, onConfirm }) => {
|
|
101
|
+
const [structure, setStructure] = useState(true);
|
|
102
|
+
const [password, setPassword] = useState("");
|
|
103
|
+
const [confirm, setConfirm] = useState("");
|
|
104
|
+
const [mismatch, setMismatch] = useState(false);
|
|
105
|
+
return (React.createElement(Dialog, { open: open, onOpenChange: onOpenChange, modal: true },
|
|
106
|
+
React.createElement(DialogContent, { className: "w-[340px] max-w-[92vw] pointer-events-auto" },
|
|
107
|
+
React.createElement(DialogTitle, null, "Protect Structure and Windows"),
|
|
108
|
+
React.createElement(DialogCloseButton, null),
|
|
109
|
+
React.createElement(DialogBody, null,
|
|
110
|
+
React.createElement("form", { className: "flex flex-col gap-3", onSubmit: (e) => {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
if (password !== "" && password !== confirm) {
|
|
113
|
+
setMismatch(true);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (structure) {
|
|
117
|
+
onConfirm({ lockStructure: true, ...(password ? { password } : {}) });
|
|
118
|
+
}
|
|
119
|
+
onOpenChange(false);
|
|
120
|
+
} },
|
|
121
|
+
React.createElement("label", { className: "flex items-center gap-2 text-xs font-medium" },
|
|
122
|
+
React.createElement("input", { type: "checkbox", checked: structure, "data-testid": "protect-workbook-structure", onChange: (e) => setStructure(e.target.checked) }),
|
|
123
|
+
"Structure"),
|
|
124
|
+
React.createElement(PasswordFields, { label: "Password (optional):", password: password, confirm: confirm, mismatch: mismatch, onPassword: (v) => {
|
|
125
|
+
setPassword(v);
|
|
126
|
+
setMismatch(false);
|
|
127
|
+
}, onConfirm: (v) => {
|
|
128
|
+
setConfirm(v);
|
|
129
|
+
setMismatch(false);
|
|
130
|
+
} }),
|
|
131
|
+
React.createElement(Separator, null),
|
|
132
|
+
React.createElement(DialogButtons, { onCancel: () => onOpenChange(false) }))))));
|
|
133
|
+
});
|
|
134
|
+
ProtectWorkbookDialog.displayName = "ProtectWorkbookDialog";
|
|
135
|
+
/** The password prompt Excel shows for Unprotect Sheet / Unprotect Workbook. */
|
|
136
|
+
export const UnprotectDialog = memo(({ open, onOpenChange, title, onConfirm }) => {
|
|
137
|
+
const [password, setPassword] = useState("");
|
|
138
|
+
return (React.createElement(Dialog, { open: open, onOpenChange: onOpenChange, modal: true },
|
|
139
|
+
React.createElement(DialogContent, { className: "w-[320px] max-w-[92vw] pointer-events-auto" },
|
|
140
|
+
React.createElement(DialogTitle, null, title),
|
|
141
|
+
React.createElement(DialogCloseButton, null),
|
|
142
|
+
React.createElement(DialogBody, null,
|
|
143
|
+
React.createElement("form", { className: "flex flex-col gap-3", onSubmit: (e) => {
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
onConfirm(password);
|
|
146
|
+
onOpenChange(false);
|
|
147
|
+
} },
|
|
148
|
+
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
149
|
+
"Password:",
|
|
150
|
+
React.createElement(Input, { type: "password", autoComplete: "current-password", autoFocus: true, value: password, onChange: (e) => setPassword(e.target.value), "data-testid": "unprotect-password" })),
|
|
151
|
+
React.createElement(Separator, null),
|
|
152
|
+
React.createElement(DialogButtons, { onCancel: () => onOpenChange(false) }))))));
|
|
153
|
+
});
|
|
154
|
+
UnprotectDialog.displayName = "UnprotectDialog";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type BorderLocation = "all" | "outer" | "inner" | "vertical" | "horizontal" | "left" | "right" | "bottom" | "top";
|
|
1
|
+
export type BorderLocation = "all" | "outer" | "inner" | "vertical" | "horizontal" | "left" | "right" | "bottom" | "top" | "diagonalUp" | "diagonalDown" | "none";
|
|
2
2
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,OAAO,GACP,OAAO,GACP,UAAU,GACV,YAAY,GACZ,MAAM,GACN,OAAO,GACP,QAAQ,GACR,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../components/toolbar/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,OAAO,GACP,OAAO,GACP,UAAU,GACV,YAAY,GACZ,MAAM,GACN,OAAO,GACP,QAAQ,GACR,KAAK,GAGL,YAAY,GACZ,cAAc,GACd,MAAM,CAAC"}
|
package/dist/esm/config.d.ts
CHANGED
|
@@ -19,7 +19,19 @@ export declare const COLUMN_HEADER_HEIGHT = 24;
|
|
|
19
19
|
export declare const OUTLINE_GUTTER_LEVEL_PX = 17;
|
|
20
20
|
export declare const OUTLINE_GUTTER_PAD_PX = 4;
|
|
21
21
|
export declare const DEFAULT_CELL_SPACING = 2.5;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* One indent level (Format Cells ▸ Alignment ▸ Indent) at 100 % zoom. ECMA-376
|
|
24
|
+
* §18.8.1 defines a level as three spaces of the Normal font — 3 × 3.3 px for
|
|
25
|
+
* 11 pt Calibri at 96 dpi. Callers multiply it by the zoom scale.
|
|
26
|
+
*/
|
|
27
|
+
export declare const INDENT_SPACING = 10;
|
|
28
|
+
/**
|
|
29
|
+
* Excel's AutoFilter / table header button: a light grey square with a grey
|
|
30
|
+
* border and a dark grey glyph.
|
|
31
|
+
*/
|
|
32
|
+
export declare const FILTER_BUTTON_GLYPH_COLOR = "#444444";
|
|
33
|
+
export declare const FILTER_BUTTON_BORDER_COLOR = "#ABABAB";
|
|
34
|
+
export declare const FILTER_BUTTON_FILL_COLOR = "#F3F3F3";
|
|
23
35
|
export declare const MIN_COLUMN_WIDTH = 24;
|
|
24
36
|
export declare const CELL_VERTICAL_ALIGNMENT = "bottom";
|
|
25
37
|
export declare const CELL_HORIZONTAL_ALIGNMENT = "left";
|
package/dist/esm/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAE,aAGhC,CAAC;AACH,eAAO,MAAM,kBAAkB,kBAAoB,CAAC;AACpD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,GAAG,CAAM,CAAC;AAC5C,eAAO,MAAM,kBAAkB,kBAAqB,CAAC;AACrD,eAAO,MAAM,uBAAuB,EAAE,YAGpC,CAAC;AAEH,eAAO,MAAM,aAAa,UAAY,CAAC;AAEvC,eAAO,MAAM,gBAAgB,QAAS,CAAC;AAGvC,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,kBAAkB,KAAK,CAAC;A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A0B,KAAK,CAAC;AAG7C,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,eAAe,IAAI,CAAC;AAGjC,eAAO,MAAM,eAAe,KAAK,CAAC;AAGlC,eAAO,MAAM,aAAa,YAAY,CAAC;AAGvC,eAAO,MAAM,WAAW,YAAY,CAAC;AAGrC,eAAO,MAAM,UAAU,YAAY,CAAC;AAGpC,eAAO,MAAM,aAAa,YAAY,CAAC;AAGvC,eAAO,MAAM,8BAA8B,SAAS,CAAC;AAGrD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAGrC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC;IACnC,SAAS,EAAE,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf,CAqEA,CAAC;AAEF,eAAO,MAAM,cAAc,SAAS,CAAC;AAErC,eAAO,MAAM,2BAA2B,EAAE,OAAO,gBAchD,CAAC;AAEF,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,WAAW,QAC4a,CAAC;AACrc,eAAO,MAAM,SAAS,QACyF,CAAC;AAEhH,eAAO,MAAM,aAAa,mBAyExB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wDACiB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,mDACE,CAAC"}
|
package/dist/esm/config.js
CHANGED
|
@@ -30,7 +30,19 @@ export const COLUMN_HEADER_HEIGHT = 24;
|
|
|
30
30
|
export const OUTLINE_GUTTER_LEVEL_PX = 17;
|
|
31
31
|
export const OUTLINE_GUTTER_PAD_PX = 4;
|
|
32
32
|
export const DEFAULT_CELL_SPACING = 2.5;
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* One indent level (Format Cells ▸ Alignment ▸ Indent) at 100 % zoom. ECMA-376
|
|
35
|
+
* §18.8.1 defines a level as three spaces of the Normal font — 3 × 3.3 px for
|
|
36
|
+
* 11 pt Calibri at 96 dpi. Callers multiply it by the zoom scale.
|
|
37
|
+
*/
|
|
38
|
+
export const INDENT_SPACING = 10;
|
|
39
|
+
/**
|
|
40
|
+
* Excel's AutoFilter / table header button: a light grey square with a grey
|
|
41
|
+
* border and a dark grey glyph.
|
|
42
|
+
*/
|
|
43
|
+
export const FILTER_BUTTON_GLYPH_COLOR = "#444444";
|
|
44
|
+
export const FILTER_BUTTON_BORDER_COLOR = "#ABABAB";
|
|
45
|
+
export const FILTER_BUTTON_FILL_COLOR = "#F3F3F3";
|
|
34
46
|
export const MIN_COLUMN_WIDTH = 24;
|
|
35
47
|
export const CELL_VERTICAL_ALIGNMENT = "bottom";
|
|
36
48
|
export const CELL_HORIZONTAL_ALIGNMENT = "left";
|
package/dist/esm/helpers.d.ts
CHANGED
|
@@ -12,11 +12,16 @@ export declare const pixelToPoint: (px: number) => number;
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const normalizeDisplayText: (text: string | undefined, shouldWrap: boolean) => string | undefined;
|
|
14
14
|
/**
|
|
15
|
-
* Converts border style to dash array
|
|
16
|
-
*
|
|
17
|
-
|
|
15
|
+
* Converts border style to a dash array, scaled by the zoom so a dash keeps
|
|
16
|
+
* its length relative to the cells.
|
|
17
|
+
*/
|
|
18
|
+
export declare const convertBorderStyleToDashArray: (style: Border["style"] | undefined, scale?: number) => number[] | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Stroke width (unscaled px) Excel paints a dashed / dotted border style
|
|
21
|
+
* with: the medium variants and `slantDashDot` are 2 px, the thin ones 1 px.
|
|
22
|
+
* Solid and double styles keep the width they carry.
|
|
18
23
|
*/
|
|
19
|
-
export declare const
|
|
24
|
+
export declare const getBorderStyleWidth: (style: Border["style"] | undefined, width: number | undefined) => number;
|
|
20
25
|
/**
|
|
21
26
|
* Converts border thickness to value
|
|
22
27
|
* @param style
|
|
@@ -95,7 +100,7 @@ export declare const getDefaultColumnHeader: (columnIndex: number) => string;
|
|
|
95
100
|
* @param y
|
|
96
101
|
* @param cellHeight
|
|
97
102
|
*/
|
|
98
|
-
export declare const getChipVerticalPosition: (y: number, cellHeight: number, scale: number, verticalAlign: VerticalAlign) => number;
|
|
103
|
+
export declare const getChipVerticalPosition: (y: number, cellHeight: number, scale: number, verticalAlign: VerticalAlign) => number | undefined;
|
|
99
104
|
export declare const definedProps: <T extends Record<string, any> | undefined | null>(obj: T) => Partial<NonNullable<T>> | T;
|
|
100
105
|
export declare const isGridRange: (maybeCellOrRange: CellInterface | GridRange) => maybeCellOrRange is GridRange;
|
|
101
106
|
export declare const addIndent: (text: string, indent: number, alignment: HorizontalAlign) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAS5D,OAAO,KAAK,EACV,IAAI,EACJ,MAAM,EAEN,QAAQ,EACR,KAAK,EACL,aAAa,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,eAAe,EACf,KAAK,EACL,eAAe,EACf,UAAU,EACV,SAAS,EAET,eAAe,EACf,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,EACd,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,SAAS,SAEb,CAAC;AAGV,eAAO,MAAM,KAAK,SAAkB,CAAC;AAGrC,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,WAA+B,CAAC;AAGvE,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,WAA+B,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,MAAM,GAAG,SAAS,EACxB,YAAY,OAAO,KAClB,MAAM,GAAG,SA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|
}
|
|
24
24
|
return text.replace(/\n/g, " ");
|
|
25
25
|
};
|
|
26
|
-
// Dpr utils
|
|
27
|
-
const getPixelRatio = () => (canUseDOM ? window.devicePixelRatio : 1);
|
|
28
|
-
const dashDotWidth = Math.max(Math.floor(getPixelRatio() / 2), 0.5);
|
|
29
|
-
const getDotArray = () => getPixelRatio() === 1
|
|
30
|
-
? [dashDotWidth, dashDotWidth + getPixelRatio()]
|
|
31
|
-
: [dashDotWidth, dashDotWidth];
|
|
32
26
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
27
|
+
* Excel's border dash patterns at 100 % zoom, as `setLineDash` on/off runs in
|
|
28
|
+
* CSS pixels (Format Cells ▸ Border ▸ Line style; ECMA-376 §18.18.3
|
|
29
|
+
* ST_BorderStyle). Every style is distinct: hair and dotted differ in spacing,
|
|
30
|
+
* the medium variants share their thin pattern at twice the width (see
|
|
31
|
+
* {@link getBorderStyleWidth}), and `slantDashDot` is the medium dash-dot
|
|
32
|
+
* painted as slanted parallelograms (`getSlantDashQuads` in cell-overlay).
|
|
33
|
+
*/
|
|
34
|
+
const BORDER_DASH_PATTERNS = {
|
|
35
|
+
hair: [1, 1],
|
|
36
|
+
dotted: [2, 2],
|
|
37
|
+
dashed: [3, 1],
|
|
38
|
+
mediumDashed: [9, 3],
|
|
39
|
+
dashDot: [9, 3, 3, 3],
|
|
40
|
+
mediumDashDot: [9, 3, 3, 3],
|
|
41
|
+
dashDotDot: [9, 3, 3, 3, 3, 3],
|
|
42
|
+
mediumDashDotDot: [9, 3, 3, 3, 3, 3],
|
|
43
|
+
slantDashDot: [9, 1, 3, 1],
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Converts border style to a dash array, scaled by the zoom so a dash keeps
|
|
47
|
+
* its length relative to the cells.
|
|
36
48
|
*/
|
|
37
|
-
export const convertBorderStyleToDashArray = (style) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
export const convertBorderStyleToDashArray = (style, scale = 1) => {
|
|
50
|
+
const pattern = style ? BORDER_DASH_PATTERNS[style] : undefined;
|
|
51
|
+
return pattern?.map((length) => length * scale);
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Stroke width (unscaled px) Excel paints a dashed / dotted border style
|
|
55
|
+
* with: the medium variants and `slantDashDot` are 2 px, the thin ones 1 px.
|
|
56
|
+
* Solid and double styles keep the width they carry.
|
|
57
|
+
*/
|
|
58
|
+
export const getBorderStyleWidth = (style, width) => {
|
|
41
59
|
switch (style) {
|
|
42
|
-
case "dashed":
|
|
43
|
-
case "mediumDashed":
|
|
44
|
-
return [2, 2];
|
|
45
|
-
case "dotted":
|
|
46
|
-
return getDotArray();
|
|
47
60
|
case "hair":
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
case "dotted":
|
|
62
|
+
case "dashed":
|
|
50
63
|
case "dashDot":
|
|
51
|
-
case "mediumDashDot":
|
|
52
|
-
return [4, 2, 1, 2];
|
|
53
64
|
case "dashDotDot":
|
|
54
|
-
return
|
|
65
|
+
return 1;
|
|
66
|
+
case "mediumDashed":
|
|
67
|
+
case "mediumDashDot":
|
|
68
|
+
case "mediumDashDotDot":
|
|
55
69
|
case "slantDashDot":
|
|
56
|
-
|
|
57
|
-
// standard dash-dot pattern. Visually distinct from `solid` even
|
|
58
|
-
// without the slant.
|
|
59
|
-
return [4, 2, 1, 2];
|
|
70
|
+
return 2;
|
|
60
71
|
default:
|
|
61
|
-
return
|
|
72
|
+
return width ?? 0;
|
|
62
73
|
}
|
|
63
74
|
};
|
|
64
75
|
/**
|
|
@@ -71,6 +82,7 @@ export const convertThicknessStyleToScaleFactor = (style) => {
|
|
|
71
82
|
case "solid_medium":
|
|
72
83
|
case "mediumDashed":
|
|
73
84
|
case "mediumDashDot":
|
|
85
|
+
case "mediumDashDotDot":
|
|
74
86
|
return 1.5;
|
|
75
87
|
case "solid_thick":
|
|
76
88
|
return 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-border-styles.d.ts","sourceRoot":"","sources":["../../../hooks/use-border-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAS5B,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"use-border-styles.d.ts","sourceRoot":"","sources":["../../../hooks/use-border-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAS5B,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EACV,gBAAgB,EAChB,MAAM,EAEN,SAAS,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IAC7C,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IACnC,wBAAwB,CAAC,EAAE,eAAe,CAAC,0BAA0B,CAAC,CAAC;IACvE,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,CAAC,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACjE,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,uBAAuB,CAAC,EAAE,aAAa,CAAC;IACxC,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,KAAK,EAAE,gBAAgB,CAAC;IACxB,gBAAgB,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACtD,eAAe,EAAE,qBAAqB,EAAE,CAAC;CAC1C,CAAC;AA8BF,eAAO,MAAM,mCAAmC,GAC9C,WAAW,aAAa,CAAC,SAAS,CAAC,EACnC,SAAQ,SAAS,EAAE,GAAG,SAAS,GAAG,IAAS,oFAoC5C,CAAC;AA4BF,eAAO,MAAM,eAAe,GAAI,gXAsB7B,oBAAoB,iBA0XtB,CAAC"}
|
|
@@ -7,7 +7,6 @@ import { useMemo } from "react";
|
|
|
7
7
|
import { useGetAddressFromSelection } from "../atoms";
|
|
8
8
|
import { FROZEN_EMPTY_ARRAY, SELECTION_BORDER } from "../config";
|
|
9
9
|
import { isHoveredCellsWithinBounds } from "../helpers";
|
|
10
|
-
import { getStringifiedColor } from "../themes";
|
|
11
10
|
import { useMemoCompare } from "./use-memo-compare";
|
|
12
11
|
/**
|
|
13
12
|
* Checks if the user is dragging a table or basicFilter
|
|
@@ -81,18 +80,6 @@ const getDraggedColumnStyle = (direction, borderColor) => {
|
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
82
|
};
|
|
84
|
-
// Get first table border color
|
|
85
|
-
const getTableBorder = (properties) => {
|
|
86
|
-
if (properties.headerBorder) {
|
|
87
|
-
return properties.headerBorder.left?.color;
|
|
88
|
-
}
|
|
89
|
-
if (properties.firstBandBorder) {
|
|
90
|
-
return properties.firstBandBorder.bottom?.color;
|
|
91
|
-
}
|
|
92
|
-
if (properties.headerColor) {
|
|
93
|
-
return properties.headerColor;
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
83
|
export const useBorderStyles = ({ draggedSelection, initialDraggedSelection, users, userId: currentUserId, renderCollaboratorCursor, sheetId: currentSheetId, borderStyles, flashingBorders, copiedSelections, selectionDragBorderColor, selectionBorderColor = SELECTION_BORDER, tableBorderColor, pivotTableBorderColor = tableBorderColor, tables, pivotTables, basicFilter, hoveredCell, activeCell, theme, agentSuggestions, quickEditValues, }) => {
|
|
97
84
|
const getAddressFromSelection = useGetAddressFromSelection();
|
|
98
85
|
/**
|
|
@@ -186,20 +173,14 @@ export const useBorderStyles = ({ draggedSelection, initialDraggedSelection, use
|
|
|
186
173
|
if (table.sheetId === currentSheetId) {
|
|
187
174
|
const { range, id } = table;
|
|
188
175
|
const isWithinBounds = cachedRangeIds.has(id);
|
|
189
|
-
const hasBorder = table.bandedRange?.rowProperties ||
|
|
190
|
-
table.bandedRange?.columnProperties;
|
|
191
|
-
const tableBorder = hasBorder && table.bandedRange?.rowProperties
|
|
192
|
-
? getStringifiedColor(getTableBorder(table.bandedRange?.rowProperties), theme) ?? tableBorderColor
|
|
193
|
-
: tableBorderColor;
|
|
194
176
|
styles.push({
|
|
195
177
|
index: id,
|
|
196
178
|
title: isWithinBounds ? table.title : undefined,
|
|
197
179
|
type: "table",
|
|
198
180
|
range,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
},
|
|
181
|
+
// Excel draws no outline round a table: its own borders come from
|
|
182
|
+
// the table style. The entry stays for the name tag and dragging.
|
|
183
|
+
style: { strokeWidth: 0 },
|
|
203
184
|
table,
|
|
204
185
|
draggable: true,
|
|
205
186
|
});
|
|
@@ -344,10 +325,8 @@ export const useBorderStyles = ({ draggedSelection, initialDraggedSelection, use
|
|
|
344
325
|
index: id,
|
|
345
326
|
type: "table",
|
|
346
327
|
range,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
stroke: tableBorderColor,
|
|
350
|
-
},
|
|
328
|
+
// No outline round an AutoFilter range either (Excel).
|
|
329
|
+
style: { strokeWidth: 0 },
|
|
351
330
|
title: isWithinBounds ? basicFilter.title ?? undefined : undefined,
|
|
352
331
|
draggable: false,
|
|
353
332
|
});
|
|
@@ -62,6 +62,11 @@ export type CellRendererProps<T extends CellData = CellData> = {
|
|
|
62
62
|
* stays canonical. Canonical when omitted.
|
|
63
63
|
*/
|
|
64
64
|
formulaLocale?: FormulaLocale;
|
|
65
|
+
/**
|
|
66
|
+
* Number-format locale (BCP 47) the cells' formatted values were rendered
|
|
67
|
+
* with — the painter re-derives `*` fill / `_` / `?` widths with it.
|
|
68
|
+
*/
|
|
69
|
+
locale?: string;
|
|
65
70
|
/**
|
|
66
71
|
* Get error value of a cell
|
|
67
72
|
* @param rowIndex
|
|
@@ -131,15 +136,42 @@ export type CellRendererProps<T extends CellData = CellData> = {
|
|
|
131
136
|
* @param rowIndex
|
|
132
137
|
* @param columnIndex
|
|
133
138
|
*/
|
|
134
|
-
getMaximumOverflowTextWidth(formattedValue: string | undefined, sheetId: number, rowIndex: number, columnIndex: number, canOverflowToNextCell: (next: CellInterface) => boolean, textFormat: TextFormat | undefined | null, shouldWrap: boolean | undefined, direction: Direction
|
|
139
|
+
getMaximumOverflowTextWidth(formattedValue: string | undefined, sheetId: number, rowIndex: number, columnIndex: number, canOverflowToNextCell: (next: CellInterface) => boolean, textFormat: TextFormat | undefined | null, shouldWrap: boolean | undefined, direction: Direction,
|
|
140
|
+
/**
|
|
141
|
+
* Centred text: spill half the excess each way. The third tuple entry
|
|
142
|
+
* is then the width claimed on the left.
|
|
143
|
+
*/
|
|
144
|
+
centered?: boolean): [
|
|
135
145
|
number,
|
|
136
146
|
[
|
|
137
147
|
columnIndex: number,
|
|
138
148
|
columnOffset: number,
|
|
139
149
|
columnWidth: number,
|
|
140
150
|
cellBackground?: Color | null
|
|
141
|
-
][]
|
|
151
|
+
][],
|
|
152
|
+
number?
|
|
142
153
|
];
|
|
154
|
+
/**
|
|
155
|
+
* Center Across Selection (`centerContinuous`): the empty neighbours on
|
|
156
|
+
* either side that carry the same alignment, as
|
|
157
|
+
* `[totalWidth, columnSpans, leftWidth]`, or `undefined` when there are
|
|
158
|
+
* none.
|
|
159
|
+
*/
|
|
160
|
+
/**
|
|
161
|
+
* The active cell: a data-validation list shows its dropdown button beside
|
|
162
|
+
* it only.
|
|
163
|
+
*/
|
|
164
|
+
activeCell?: CellInterface | null;
|
|
165
|
+
getCenterAcrossSelectionSpan?(sheetId: number, rowIndex: number, columnIndex: number): [
|
|
166
|
+
number,
|
|
167
|
+
[
|
|
168
|
+
columnIndex: number,
|
|
169
|
+
columnOffset: number,
|
|
170
|
+
columnWidth: number,
|
|
171
|
+
cellBackground?: Color | null
|
|
172
|
+
][],
|
|
173
|
+
number
|
|
174
|
+
] | undefined;
|
|
143
175
|
/**
|
|
144
176
|
* Get dimensions of a text
|
|
145
177
|
* @param sheetId
|
|
@@ -248,5 +280,5 @@ export type CellRendererProps<T extends CellData = CellData> = {
|
|
|
248
280
|
*/
|
|
249
281
|
getDefaultHorizontalAlignment(sheetId: number, rowIndex: number, columnIndex: number): HorizontalAlign | undefined;
|
|
250
282
|
};
|
|
251
|
-
export declare const useCellRenderer: <T extends CellData = CellData>({ sheetId, scale, showGridLines, showZeros, isRowHeader, isColumnHeader, selectedRows, selectedColumns, selectedRowHeaders, selectedColumnHeaders, cellBackgroundColor, headerBorderColor, headerBackgroundColor, headerColor, headerActiveBackgroundColor, headerSelectedBackgroundColor, headerSelectedColor, headerTableBackgroundColor, headerTableActiveBackgroundColor, headerTableSelectedBackgroundColor, chipBackgroundColor, filterIconColor, showCalculatedColumnIcon, enableTextOverflow, showHeaders, theme, getDefaultHorizontalAlignment, isTableFilterVisible, columnContainsTable, rowsContainsTable, canOverflowToNextCell, getTableHeaderSortOrder, getDataValidation, getErrorValue, formulaLocale, getEffectiveValue, getSparklineGroup, getFormattedValue, getNote, getComment, getEffectiveCellFormat, getCellBounds, getCellImageUrl, getCellMetaType, getRowHeaderText, getColumnHeaderText, getMaximumOverflowTextWidth, getTextDimension, getCellGroupingInfo, getTextFormatRuns, onRequestEdit, onFilterClick, onCheckboxClick, isTableHeader, isTableTotalsCell, onTotalsArrowClick, isCalculatedColumnHeader, isTableHeaderFilterActive, HeaderCell, Cell, StructuredResult, gridLineWidth, showNotes, showComments, defaultFontSizePoint, lineHeightMode, readonly, onExpandCollapse, onOverflow, isComparing, getCellDiff, }: CellRendererProps<T>) => readonly [(props: RendererProps) => React.JSX.Element | null, (props: RendererProps) => React.JSX.Element, (props: RendererProps) => React.JSX.Element | null, (props: RendererProps) => React.JSX.Element | null | undefined, (cells: RendererProps[]) => React.JSX.Element];
|
|
283
|
+
export declare const useCellRenderer: <T extends CellData = CellData>({ sheetId, scale, showGridLines, showZeros, isRowHeader, isColumnHeader, selectedRows, selectedColumns, selectedRowHeaders, selectedColumnHeaders, cellBackgroundColor, headerBorderColor, headerBackgroundColor, headerColor, headerActiveBackgroundColor, headerSelectedBackgroundColor, headerSelectedColor, headerTableBackgroundColor, headerTableActiveBackgroundColor, headerTableSelectedBackgroundColor, chipBackgroundColor, filterIconColor, showCalculatedColumnIcon, enableTextOverflow, showHeaders, theme, getDefaultHorizontalAlignment, isTableFilterVisible, columnContainsTable, rowsContainsTable, canOverflowToNextCell, getTableHeaderSortOrder, getDataValidation, getErrorValue, formulaLocale, locale, getEffectiveValue, getSparklineGroup, getFormattedValue, getNote, getComment, getEffectiveCellFormat, getCellBounds, getCellImageUrl, getCellMetaType, getRowHeaderText, getColumnHeaderText, getMaximumOverflowTextWidth, getCenterAcrossSelectionSpan, activeCell, getTextDimension, getCellGroupingInfo, getTextFormatRuns, onRequestEdit, onFilterClick, onCheckboxClick, isTableHeader, isTableTotalsCell, onTotalsArrowClick, isCalculatedColumnHeader, isTableHeaderFilterActive, HeaderCell, Cell, StructuredResult, gridLineWidth, showNotes, showComments, defaultFontSizePoint, lineHeightMode, readonly, onExpandCollapse, onOverflow, isComparing, getCellDiff, }: CellRendererProps<T>) => readonly [(props: RendererProps) => React.JSX.Element | null, (props: RendererProps) => React.JSX.Element, (props: RendererProps) => React.JSX.Element | null, (props: RendererProps) => React.JSX.Element | null | undefined, (cells: RendererProps[]) => React.JSX.Element];
|
|
252
284
|
//# sourceMappingURL=use-cell-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-cell-renderer.d.ts","sourceRoot":"","sources":["../../../hooks/use-cell-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,4BAA4B,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-cell-renderer.d.ts","sourceRoot":"","sources":["../../../hooks/use-cell-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,4BAA4B,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAoB3C,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,KAAK,EACL,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,UAAU,EACX,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EA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