@sheetxl/react 0.8.0-beta.7 → 0.8.0-beta.9
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/browser/cjs/index.cjs +18 -17
- package/browser/cjs/xuAfpHmA2W4MFa_0.cjs +1 -0
- package/browser/esm/Dk6274Lic6AOmEAq.mjs +2624 -0
- package/browser/esm/index.mjs +6023 -4108
- package/licenses/dependencies.txt +0 -555
- package/node/esm/B-5p0wwNM6Y5jlI2.mjs +2624 -0
- package/node/esm/index.mjs +8080 -6160
- package/package.json +6 -7
- package/resources/locales/de/sheet.cmd.json +101 -0
- package/resources/locales/de/ui.msg.json +5 -0
- package/resources/locales/en/sheet.cmd.json +113 -0
- package/resources/locales/en/ui.msg.json +166 -0
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/index.d.ts +1 -0
- package/types/src/checklist/ValueChecklist.d.ts +15 -3
- package/types/src/control/FormControlRenderers.d.ts +14 -0
- package/types/src/control/index.d.ts +2 -0
- package/types/src/frame/CommandContext.d.ts +27 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/layer/SheetHeaderCellLayer.d.ts +9 -0
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/index.d.ts +1 -0
- package/types/src/movable/IMovableArea.d.ts +10 -0
- package/types/src/movable/MovableAdornment.d.ts +20 -0
- package/types/src/movable/MovableControl.d.ts +32 -0
- package/types/src/movable/MovableFrame.d.ts +13 -15
- package/types/src/movable/MovableRenderers.d.ts +55 -0
- package/types/src/movable/RotateHandle.d.ts +29 -0
- package/types/src/movable/framePlacement.d.ts +29 -0
- package/types/src/movable/geometry.d.ts +51 -0
- package/types/src/movable/index.d.ts +1 -0
- package/types/src/shape/ShapeEditor.d.ts +16 -2
- package/types/src/shape/ShapeGallery.d.ts +16 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeSVG.d.ts +24 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -0
- package/types/src/shape/shapeFrame.d.ts +6 -0
- package/types/src/shape/shapeStyle.d.ts +31 -0
- package/types/src/sheet/ISheetElement.d.ts +8 -1
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/workbook/DefaultMovableRenderers.d.ts +2 -0
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/esm/CwXbsCWTrl3QB1t6.mjs +0 -6286
- package/node/esm/CZc8rKcLzArmqJz2.mjs +0 -9
- package/types/src/movable/MoveableBundle.d.ts +0 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IFill, IResource, IShape, IStyleCollection } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* What a shape draws with, resolved to CSS: the colors a `<path>` can take and the line
|
|
4
|
+
* properties SVG strokes natively. Gradients and patterns are reduced to a solid color for now
|
|
5
|
+
* (SHAPES-PLAN phase e draws them properly). Which fill and line apply is the model's call
|
|
6
|
+
* (`ShapeStyleUtils`); this turns its answer into what the renderer sets.
|
|
7
|
+
*/
|
|
8
|
+
export interface ResolvedShapeStyle {
|
|
9
|
+
/** CSS color, or `null` for no fill (also when the fill is an image, see `image`). */
|
|
10
|
+
fill: string | null;
|
|
11
|
+
/** An image fill: the resource to draw and how, when the shape holds the image. */
|
|
12
|
+
image?: {
|
|
13
|
+
resource: IResource;
|
|
14
|
+
fill: IFill.ImageJSON;
|
|
15
|
+
};
|
|
16
|
+
/** CSS color, or `null` for no line. */
|
|
17
|
+
stroke: string | null;
|
|
18
|
+
/** In shape-local px (points in the model). */
|
|
19
|
+
strokeWidth: number;
|
|
20
|
+
lineJoin: 'miter' | 'round' | 'bevel';
|
|
21
|
+
lineCap: 'butt' | 'round' | 'square';
|
|
22
|
+
miterLimit: number;
|
|
23
|
+
/** The text color the theme style gives, or `null` when nothing says. */
|
|
24
|
+
textColor: string | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Resolves a shape's fill, line and text color to CSS: what it states itself over what its
|
|
28
|
+
* theme style gives, over Excel's defaults for a new shape.
|
|
29
|
+
*/
|
|
30
|
+
export declare const resolveShapeStyle: (json: IShape.JSON | null | undefined, styles: IStyleCollection | null, getResource?: (resourceId: number) => IResource | null) => ResolvedShapeStyle;
|
|
31
|
+
//# sourceMappingURL=shapeStyle.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { ISheet, ICell, IMovable } from '@sheetxl/sdk';
|
|
|
2
2
|
import { CellCoords } from '@sheetxl/utils';
|
|
3
3
|
import { ViewportMetrics, IShowToolTipProperties, ScrollPaneProps, Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
4
4
|
import { GridSurfaceProps, IGridSurface, IEditable, LayerNode } from '@sheetxl/grid-react';
|
|
5
|
-
import { SheetCellRendererProps, ColumnButtonConfigProps } from '../cell';
|
|
5
|
+
import { SheetCellRendererProps, ColumnButtonConfigProps, OutlineProps } from '../cell';
|
|
6
6
|
import { MovableElementProps } from '../movable';
|
|
7
7
|
import { CommentCardRenderProps } from '../comment';
|
|
8
8
|
import { CommandContext } from '../frame';
|
|
@@ -197,6 +197,13 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
197
197
|
* This does not invalidate the rendering
|
|
198
198
|
*/
|
|
199
199
|
propsCellRender?: Partial<SheetCellRendererProps> & ColumnButtonConfigProps;
|
|
200
|
+
/**
|
|
201
|
+
* Props for the outline: the gutters that show row and column groups, and their level buttons.
|
|
202
|
+
*
|
|
203
|
+
* @remarks
|
|
204
|
+
* Omitted renderers fall back to plain, unstyled buttons.
|
|
205
|
+
*/
|
|
206
|
+
propsOutline?: OutlineProps;
|
|
200
207
|
/**
|
|
201
208
|
* Ref to the sheet element.
|
|
202
209
|
*/
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FixedEdge } from '@sheetxl/utils';
|
|
3
|
+
import { IRange, ISheet } from '@sheetxl/sdk';
|
|
4
|
+
import { Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
5
|
+
import { OutlineButtonProps, OutlineLevelButtonProps } from '../cell/OutlineButton';
|
|
6
|
+
export interface SheetOutlineElementProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
|
+
/** The sheet whose outline is drawn. */
|
|
8
|
+
sheet: ISheet;
|
|
9
|
+
/** Rows (the gutter left of the row headers) or columns (above the column headers). */
|
|
10
|
+
axis: IRange.Axis;
|
|
11
|
+
/** The lanes across the gutter: one per level, plus one. */
|
|
12
|
+
lanes: number;
|
|
13
|
+
/** The gutter's thickness across the axis, in pixels. */
|
|
14
|
+
thickness: number;
|
|
15
|
+
/** The headers frozen at the start of the axis. */
|
|
16
|
+
freezeStart?: number | FixedEdge;
|
|
17
|
+
/** The sheet's main viewport; the gutter follows it along the axis. */
|
|
18
|
+
viewport?: Viewport;
|
|
19
|
+
/** The app color scheme. */
|
|
20
|
+
colorScheme?: ThemeMode;
|
|
21
|
+
/** Renders a group's collapse / expand button. Defaults to `OutlineButton`. */
|
|
22
|
+
renderButton?: (props: OutlineButtonProps) => React.ReactNode;
|
|
23
|
+
/** The space around the buttons, in pixels: between neighbors, before the first and after the last. */
|
|
24
|
+
laneGap?: number;
|
|
25
|
+
/** Space between a bracket's end and its button, in pixels. */
|
|
26
|
+
bracketGap?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The outline gutter for one axis: the brackets and collapse buttons of the row or column groups.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Built like `SheetHeaderElement` — its own `GridSurface` over the header's offsets, following the
|
|
33
|
+
* sheet's viewport along the axis, so it scrolls, zooms, hides and freezes with the headers. The
|
|
34
|
+
* owner decides whether there is one (see `ISheetView.isShowOutlineSymbols` and `getLevelCount`) and sizes
|
|
35
|
+
* it.
|
|
36
|
+
*
|
|
37
|
+
* It is app chrome, not header: it declares the `app` surface and paints no fill, so it shows what
|
|
38
|
+
* the sheet sits on, as the level buttons beside it do.
|
|
39
|
+
*/
|
|
40
|
+
export declare const SheetOutlineElement: React.MemoExoticComponent<(props: SheetOutlineElementProps) => React.JSX.Element>;
|
|
41
|
+
export interface SheetOutlineLevelsProps extends React.HTMLAttributes<HTMLElement> {
|
|
42
|
+
/** The sheet whose outline the buttons show levels of. */
|
|
43
|
+
sheet: ISheet;
|
|
44
|
+
/** Rows or columns. */
|
|
45
|
+
axis: IRange.Axis;
|
|
46
|
+
/** The number of buttons: one per level, plus one. */
|
|
47
|
+
lanes: number;
|
|
48
|
+
/** The size of one lane, in pixels. */
|
|
49
|
+
laneSize: number;
|
|
50
|
+
/**
|
|
51
|
+
* The space around the buttons, in pixels: between neighbors, before the first and after the last.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue 1
|
|
54
|
+
*/
|
|
55
|
+
laneGap?: number;
|
|
56
|
+
/** The app color scheme. */
|
|
57
|
+
colorScheme?: ThemeMode;
|
|
58
|
+
/** Renders a level button. Defaults to `OutlineLevelButton`. */
|
|
59
|
+
renderLevelButton?: (props: OutlineLevelButtonProps) => React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The level buttons `1`..`n` for one axis: button *k* shows the groups above level *k* and collapses
|
|
63
|
+
* the rest (`IOutline.setVisibleLevels`).
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* Row buttons run across the row gutter (beside the column headers); column buttons run down the
|
|
67
|
+
* column gutter (beside the row headers), one per lane.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SheetOutlineLevels: React.MemoExoticComponent<(props: SheetOutlineLevelsProps) => React.JSX.Element>;
|
|
70
|
+
//# sourceMappingURL=SheetOutlineElement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(o,s,c)=>(c=o==null?{}:e(i(o)),((e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c,l=r(i),u=0,d=l.length;u<d;u++)c=l[u],a.call(e,c)||c===o||t(e,c,{get:(e=>i[e]).bind(null,c),enumerable:!(s=n(i,c))||s.enumerable});return e})(!s&&o&&o.__esModule?c:t(c,`default`,{value:o,enumerable:!0}),o));Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|